-
Notifications
You must be signed in to change notification settings - Fork 0
/
apexcharts-card.js
908 lines (778 loc) · 767 KB
/
apexcharts-card.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
function t(t,e,i,a){var r,n=arguments.length,s=n<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,a);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(s=(n<3?r(s):n>3?r(e,i,s):r(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s}Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function t(){var e=isNaN(arguments[0])?1:Number(arguments[0]);return e?Array.prototype.reduce.call(this,(function(i,a){return Array.isArray(a)?i.push.apply(i,t.call(a,e-1)):i.push(a),i}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(t){return Array.prototype.map.apply(this,arguments).flat()},writable:!0});const e=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),a=new Map;class r{constructor(t,e){if(this._$cssResult$=!0,e!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=a.get(this.cssText);return e&&void 0===t&&(a.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const n=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new r("string"==typeof t?t:t+"",i))(e)})(t):t;var s;const o=window.trustedTypes,l=o?o.emptyScript:"",h=window.reactiveElementPolyfillSupport,c={toAttribute(t,e){switch(e){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},d=(t,e)=>e!==t&&(e==e||t==t),u={attribute:!0,type:String,converter:c,reflect:!1,hasChanged:d};class f extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const a=this._$Eh(i,e);void 0!==a&&(this._$Eu.set(a,i),t.push(a))})),t}static createProperty(t,e=u){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,a=this.getPropertyDescriptor(t,i,e);void 0!==a&&Object.defineProperty(this.prototype,t,a)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(a){const r=this[t];this[e]=a,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||u}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(n(t))}else void 0!==t&&e.push(n(t));return e}static _$Eh(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ep=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Em(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$Eg)&&void 0!==e?e:this._$Eg=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$Eg)||void 0===e||e.splice(this._$Eg.indexOf(t)>>>0,1)}_$Em(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const i=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{e?t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):i.forEach((e=>{const i=document.createElement("style"),a=window.litNonce;void 0!==a&&i.setAttribute("nonce",a),i.textContent=e.cssText,t.appendChild(i)}))})(i,this.constructor.elementStyles),i}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ES(t,e,i=u){var a,r;const n=this.constructor._$Eh(t,i);if(void 0!==n&&!0===i.reflect){const s=(null!==(r=null===(a=i.converter)||void 0===a?void 0:a.toAttribute)&&void 0!==r?r:c.toAttribute)(e,i.type);this._$Ei=t,null==s?this.removeAttribute(n):this.setAttribute(n,s),this._$Ei=null}}_$AK(t,e){var i,a,r;const n=this.constructor,s=n._$Eu.get(t);if(void 0!==s&&this._$Ei!==s){const t=n.getPropertyOptions(s),o=t.converter,l=null!==(r=null!==(a=null===(i=o)||void 0===i?void 0:i.fromAttribute)&&void 0!==a?a:"function"==typeof o?o:null)&&void 0!==r?r:c.fromAttribute;this._$Ei=s,this[s]=l(e,t.type),this._$Ei=null}}requestUpdate(t,e,i){let a=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||d)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Ei!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):a=!1),!this.isUpdatePending&&a&&(this._$Ep=this._$E_())}async _$E_(){this.isUpdatePending=!0;try{await this._$Ep}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$Eg)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Eg)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ep}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$ES(e,this[e],t))),this._$EC=void 0),this._$EU()}updated(t){}firstUpdated(t){}}var p;f.finalized=!0,f.elementProperties=new Map,f.elementStyles=[],f.shadowRootOptions={mode:"open"},null==h||h({ReactiveElement:f}),(null!==(s=globalThis.reactiveElementVersions)&&void 0!==s?s:globalThis.reactiveElementVersions=[]).push("1.3.1");const g=globalThis.trustedTypes,x=g?g.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,v="?"+m,b=`<${v}>`,y=document,w=(t="")=>y.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,C=/>/g,M=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,T=/'/g,P=/"/g,L=/^(?:script|style|textarea|title)$/i,D=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),E=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),I=new WeakMap,z=y.createTreeWalker(y,129,null,!1),N=(t,e)=>{const i=t.length-1,a=[];let r,n=2===e?"<svg>":"",s=k;for(let l=0;l<i;l++){const e=t[l];let i,o,h=-1,c=0;for(;c<e.length&&(s.lastIndex=c,o=s.exec(e),null!==o);)c=s.lastIndex,s===k?"!--"===o[1]?s=A:void 0!==o[1]?s=C:void 0!==o[2]?(L.test(o[2])&&(r=RegExp("</"+o[2],"g")),s=M):void 0!==o[3]&&(s=M):s===M?">"===o[0]?(s=null!=r?r:k,h=-1):void 0===o[1]?h=-2:(h=s.lastIndex-o[2].length,i=o[1],s=void 0===o[3]?M:'"'===o[3]?P:T):s===P||s===T?s=M:s===A||s===C?s=k:(s=M,r=void 0);const d=s===M&&t[l+1].startsWith("/>")?" ":"";n+=s===k?e+b:h>=0?(a.push(i),e.slice(0,h)+"$lit$"+e.slice(h)+m+d):e+m+(-2===h?(a.push(void 0),l):d)}const o=n+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==x?x.createHTML(o):o,a]};class Y{constructor({strings:t,_$litType$:e},i){let a;this.parts=[];let r=0,n=0;const s=t.length-1,o=this.parts,[l,h]=N(t,e);if(this.el=Y.createElement(l,i),z.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(a=z.nextNode())&&o.length<s;){if(1===a.nodeType){if(a.hasAttributes()){const t=[];for(const e of a.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(m)){const i=h[n++];if(t.push(e),void 0!==i){const t=a.getAttribute(i.toLowerCase()+"$lit$").split(m),e=/([.?@])?(.*)/.exec(i);o.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?W:"?"===e[1]?B:"@"===e[1]?j:X})}else o.push({type:6,index:r})}for(const e of t)a.removeAttribute(e)}if(L.test(a.tagName)){const t=a.textContent.split(m),e=t.length-1;if(e>0){a.textContent=g?g.emptyScript:"";for(let i=0;i<e;i++)a.append(t[i],w()),z.nextNode(),o.push({type:2,index:++r});a.append(t[e],w())}}}else if(8===a.nodeType)if(a.data===v)o.push({type:2,index:r});else{let t=-1;for(;-1!==(t=a.data.indexOf(m,t+1));)o.push({type:7,index:r}),t+=m.length-1}r++}}static createElement(t,e){const i=y.createElement("template");return i.innerHTML=t,i}}function F(t,e,i=t,a){var r,n,s,o;if(e===E)return e;let l=void 0!==a?null===(r=i._$Cl)||void 0===r?void 0:r[a]:i._$Cu;const h=S(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(n=null==l?void 0:l._$AO)||void 0===n||n.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,a)),void 0!==a?(null!==(s=(o=i)._$Cl)&&void 0!==s?s:o._$Cl=[])[a]=l:i._$Cu=l),void 0!==l&&(e=F(t,l._$AS(t,e.values),l,a)),e}class R{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:a}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:y).importNode(i,!0);z.currentNode=r;let n=z.nextNode(),s=0,o=0,l=a[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new H(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new G(n,this,t)),this.v.push(e),l=a[++o]}s!==(null==l?void 0:l.index)&&(n=z.nextNode(),s++)}return r}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class H{constructor(t,e,i,a){var r;this.type=2,this._$AH=O,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=a,this._$Cg=null===(r=null==a?void 0:a.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=F(this,t,e),S(t)?t===O||null==t||""===t?(this._$AH!==O&&this._$AR(),this._$AH=O):t!==this._$AH&&t!==E&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.k(t):(t=>{var e;return _(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.S(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==O&&S(this._$AH)?this._$AA.nextSibling.data=t:this.k(y.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:a}=t,r="number"==typeof a?this._$AC(t):(void 0===a.el&&(a.el=Y.createElement(a.h,this.options)),a);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.m(i);else{const t=new R(r,this),e=t.p(this.options);t.m(i),this.k(e),this._$AH=t}}_$AC(t){let e=I.get(t.strings);return void 0===e&&I.set(t.strings,e=new Y(t)),e}S(t){_(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,a=0;for(const r of t)a===e.length?e.push(i=new H(this.M(w()),this.M(w()),this,this.options)):i=e[a],i._$AI(r),a++;a<e.length&&(this._$AR(i&&i._$AB.nextSibling,a),e.length=a)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class X{constructor(t,e,i,a,r){this.type=1,this._$AH=O,this._$AN=void 0,this.element=t,this.name=e,this._$AM=a,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=O}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,a){const r=this.strings;let n=!1;if(void 0===r)t=F(this,t,e,0),n=!S(t)||t!==this._$AH&&t!==E,n&&(this._$AH=t);else{const a=t;let s,o;for(t=r[0],s=0;s<r.length-1;s++)o=F(this,a[i+s],e,s),o===E&&(o=this._$AH[s]),n||(n=!S(o)||o!==this._$AH[s]),o===O?t=O:t!==O&&(t+=(null!=o?o:"")+r[s+1]),this._$AH[s]=o}n&&!a&&this.C(t)}C(t){t===O?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class W extends X{constructor(){super(...arguments),this.type=3}C(t){this.element[this.name]=t===O?void 0:t}}const V=g?g.emptyScript:"";class B extends X{constructor(){super(...arguments),this.type=4}C(t){t&&t!==O?this.element.setAttribute(this.name,V):this.element.removeAttribute(this.name)}}class j extends X{constructor(t,e,i,a,r){super(t,e,i,a,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=F(this,t,e,0))&&void 0!==i?i:O)===E)return;const a=this._$AH,r=t===O&&a!==O||t.capture!==a.capture||t.once!==a.once||t.passive!==a.passive,n=t!==O&&(a===O||r);r&&this.element.removeEventListener(this.name,this,a),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class G{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){F(this,t)}}const U=window.litHtmlPolyfillSupport;var $,Z;null==U||U(Y,H),(null!==(p=globalThis.litHtmlVersions)&&void 0!==p?p:globalThis.litHtmlVersions=[]).push("2.2.2");class q extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=((t,e,i)=>{var a,r;const n=null!==(a=null==i?void 0:i.renderBefore)&&void 0!==a?a:e;let s=n._$litPart$;if(void 0===s){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;n._$litPart$=s=new H(e.insertBefore(w(),t),t,void 0,null!=i?i:{})}return s._$AI(t),s})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return E}}q.finalized=!0,q._$litElement$=!0,null===($=globalThis.litElementHydrateSupport)||void 0===$||$.call(globalThis,{LitElement:q});const J=globalThis.litElementPolyfillSupport;null==J||J({LitElement:q}),(null!==(Z=globalThis.litElementVersions)&&void 0!==Z?Z:globalThis.litElementVersions=[]).push("3.2.0");const K=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function Q(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):K(t,e)}var tt;null===(tt=window.HTMLSlotElement)||void 0===tt||tt.prototype.assignedElements;const et=1,it=t=>(...e)=>({_$litDirective$:t,values:e});class at{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const rt=it(class extends at{constructor(t){var e;if(super(t),t.type!==et||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,a;if(void 0===this.et){this.et=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.et.add(t);return this.render(e)}const r=t.element.classList;this.et.forEach((t=>{t in e||(r.remove(t),this.et.delete(t))}));for(const n in e){const t=!!e[n];t===this.et.has(n)||(null===(a=this.st)||void 0===a?void 0:a.has(n))||(t?(r.add(n),this.et.add(n)):(r.remove(n),this.et.delete(n)))}return E}});var nt,st,ot;function lt(){return(lt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t}).apply(this,arguments)}!function(t){t[t.AUTO=0]="AUTO",t[t.FIXED=1]="FIXED",t[t.SOFT=2]="SOFT",t[t.ABSOLUTE=3]="ABSOLUTE"}(nt||(nt={})),function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(st||(st={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(ot||(ot={}));var ht=function(t,e,i){var a=e?function(t){switch(t.number_format){case st.comma_decimal:return["en-US","en"];case st.decimal_comma:return["de","es","it"];case st.space_comma:return["fr","sv","cs"];case st.system:return;default:return t.language}}(e):void 0;if(Number.isNaN=Number.isNaN||function t(e){return"number"==typeof e&&t(e)},(null==e?void 0:e.number_format)!==st.none&&!Number.isNaN(Number(t))&&Intl)try{return new Intl.NumberFormat(a,ct(t,i)).format(Number(t))}catch(st){return console.error(st),new Intl.NumberFormat(void 0,ct(t,i)).format(Number(t))}return"string"==typeof t?t:function(t,e){return void 0===e&&(e=2),Math.round(t*Math.pow(10,e))/Math.pow(10,e)}(t,null==i?void 0:i.maximumFractionDigits).toString()+("currency"===(null==i?void 0:i.style)?" "+i.currency:"")},ct=function(t,e){var i=lt({maximumFractionDigits:2},e);if("string"!=typeof t)return i;if(!e||!e.minimumFractionDigits&&!e.maximumFractionDigits){var a=t.indexOf(".")>-1?t.split(".")[1].length:0;i.minimumFractionDigits=a,i.maximumFractionDigits=a}return i},dt=["closed","locked","off"],ut=function(t,e,i,a){a=a||{},i=null==i?{}:i;var r=new Event(e,{bubbles:void 0===a.bubbles||a.bubbles,cancelable:Boolean(a.cancelable),composed:void 0===a.composed||a.composed});return r.detail=i,t.dispatchEvent(r),r},ft=function(t){ut(window,"haptic",t)},pt=function(t,e,i,a){if(a||(a={action:"more-info"}),!a.confirmation||a.confirmation.exemptions&&a.confirmation.exemptions.some((function(t){return t.user===e.user.id}))||(ft("warning"),confirm(a.confirmation.text||"Are you sure you want to "+a.action+"?")))switch(a.action){case"more-info":(i.entity||i.camera_image)&&ut(t,"hass-more-info",{entityId:i.entity?i.entity:i.camera_image});break;case"navigate":a.navigation_path&&function(t,e,i){void 0===i&&(i=!1),i?history.replaceState(null,"",e):history.pushState(null,"",e),ut(window,"location-changed",{replace:i})}(0,a.navigation_path);break;case"url":a.url_path&&window.open(a.url_path);break;case"toggle":i.entity&&(function(t,e){(function(t,e,i){void 0===i&&(i=!0);var a,r=function(t){return t.substr(0,t.indexOf("."))}(e),n="group"===r?"homeassistant":r;switch(r){case"lock":a=i?"unlock":"lock";break;case"cover":a=i?"open_cover":"close_cover";break;default:a=i?"turn_on":"turn_off"}t.callService(n,a,{entity_id:e})})(t,e,dt.includes(t.states[e].state))}(e,i.entity),ft("success"));break;case"call-service":if(!a.service)return void ft("failure");var r=a.service.split(".",2);e.callService(r[0],r[1],a.service_data,a.target),ft("success");break;case"fire-dom-event":ut(t,"ll-custom",a)}},gt=function(t,e,i,a){var r;"double_tap"===a&&i.double_tap_action?r=i.double_tap_action:"hold"===a&&i.hold_action?r=i.hold_action:"tap"===a&&i.tap_action&&(r=i.tap_action),pt(t,e,i,r)},xt=function(){var t=document.querySelector("home-assistant");if(t=(t=(t=(t=(t=(t=(t=(t=t&&t.shadowRoot)&&t.querySelector("home-assistant-main"))&&t.shadowRoot)&&t.querySelector("app-drawer-layout partial-panel-resolver"))&&t.shadowRoot||t)&&t.querySelector("ha-panel-lovelace"))&&t.shadowRoot)&&t.querySelector("hui-root")){var e=t.lovelace;return e.current_view=t.___curView,e}return null},mt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function vt(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bt,yt,wt={exports:{}},St=wt.exports=function t(e,i,a){function r(s,o){if(!i[s]){if(!e[s]){if(!o&&vt)return vt(s);if(n)return n(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var h=i[s]={exports:{}};e[s][0].call(h.exports,(function(t){var i=e[s][1][t];return r(i||t)}),h,h.exports,t,e,i,a)}return i[s].exports}for(var n=vt,s=0;s<a.length;s++)r(a[s]);return r}({1:[function(t,e,i){(function(t){var i,a,r=t.MutationObserver||t.WebKitMutationObserver;if(r){var n=0,s=new r(c),o=t.document.createTextNode("");s.observe(o,{characterData:!0}),i=function(){o.data=n=++n%2}}else if(t.setImmediate||void 0===t.MessageChannel)i="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){c(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(c,0)};else{var l=new t.MessageChannel;l.port1.onmessage=c,i=function(){l.port2.postMessage(0)}}var h=[];function c(){var t,e;a=!0;for(var i=h.length;i;){for(e=h,h=[],t=-1;++t<i;)e[t]();i=h.length}a=!1}function d(t){1!==h.push(t)||a||i()}e.exports=d}).call(this,void 0!==mt?mt:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,i){var a=t(1);function r(){}var n={},s=["REJECTED"],o=["FULFILLED"],l=["PENDING"];function h(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,t!==r&&f(this,t)}function c(t,e,i){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof i&&(this.onRejected=i,this.callRejected=this.otherCallRejected)}function d(t,e,i){a((function(){var a;try{a=e(i)}catch(it){return n.reject(t,it)}a===t?n.reject(t,new TypeError("Cannot resolve promise with itself")):n.resolve(t,a)}))}function u(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function f(t,e){var i=!1;function a(e){i||(i=!0,n.reject(t,e))}function r(e){i||(i=!0,n.resolve(t,e))}function s(){e(r,a)}var o=p(s);"error"===o.status&&a(o.value)}function p(t,e){var i={};try{i.value=t(e),i.status="success"}catch(it){i.status="error",i.value=it}return i}function g(t){return t instanceof this?t:n.resolve(new this(r),t)}function x(t){var e=new this(r);return n.reject(e,t)}function m(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,a=!1;if(!i)return this.resolve([]);for(var s=new Array(i),o=0,l=-1,h=new this(r);++l<i;)c(t[l],l);return h;function c(t,r){function l(t){s[r]=t,++o!==i||a||(a=!0,n.resolve(h,s))}e.resolve(t).then(l,(function(t){a||(a=!0,n.reject(h,t))}))}}function v(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var i=t.length,a=!1;if(!i)return this.resolve([]);for(var s=-1,o=new this(r);++s<i;)l(t[s]);return o;function l(t){e.resolve(t).then((function(t){a||(a=!0,n.resolve(o,t))}),(function(t){a||(a=!0,n.reject(o,t))}))}}e.exports=h,h.prototype.catch=function(t){return this.then(null,t)},h.prototype.then=function(t,e){if("function"!=typeof t&&this.state===o||"function"!=typeof e&&this.state===s)return this;var i=new this.constructor(r);return this.state!==l?d(i,this.state===o?t:e,this.outcome):this.queue.push(new c(i,t,e)),i},c.prototype.callFulfilled=function(t){n.resolve(this.promise,t)},c.prototype.otherCallFulfilled=function(t){d(this.promise,this.onFulfilled,t)},c.prototype.callRejected=function(t){n.reject(this.promise,t)},c.prototype.otherCallRejected=function(t){d(this.promise,this.onRejected,t)},n.resolve=function(t,e){var i=p(u,e);if("error"===i.status)return n.reject(t,i.value);var a=i.value;if(a)f(t,a);else{t.state=o,t.outcome=e;for(var r=-1,s=t.queue.length;++r<s;)t.queue[r].callFulfilled(e)}return t},n.reject=function(t,e){t.state=s,t.outcome=e;for(var i=-1,a=t.queue.length;++i<a;)t.queue[i].callRejected(e);return t},h.resolve=g,h.reject=x,h.all=m,h.race=v},{1:1}],3:[function(t,e,i){(function(e){"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,void 0!==mt?mt:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(t,e,i){var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(it){return}}var s=n();function o(){try{if(!s||!s.open)return!1;var t="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),e="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!t||e)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(it){return!1}}function l(t,e){t=t||[],e=e||{};try{return new Blob(t,e)}catch(it){if("TypeError"!==it.name)throw it;for(var i=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),a=0;a<t.length;a+=1)i.append(t[a]);return i.getBlob(e.type)}}"undefined"==typeof Promise&&t(3);var h=Promise;function c(t,e){e&&t.then((function(t){e(null,t)}),(function(t){e(t)}))}function d(t,e,i){"function"==typeof e&&t.then(e),"function"==typeof i&&t.catch(i)}function u(t){return"string"!=typeof t&&(console.warn(t+" used as a key, but it is not a string."),t=String(t)),t}function f(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var p="local-forage-detect-blob-support",g=void 0,x={},m=Object.prototype.toString,v="readonly",b="readwrite";function y(t){for(var e=t.length,i=new ArrayBuffer(e),a=new Uint8Array(i),r=0;r<e;r++)a[r]=t.charCodeAt(r);return i}function w(t){return new h((function(e){var i=t.transaction(p,b),a=l([""]);i.objectStore(p).put(a,"key"),i.onabort=function(t){t.preventDefault(),t.stopPropagation(),e(!1)},i.oncomplete=function(){var t=navigator.userAgent.match(/Chrome\/(\d+)/),i=navigator.userAgent.match(/Edge\//);e(i||!t||parseInt(t[1],10)>=43)}})).catch((function(){return!1}))}function S(t){return"boolean"==typeof g?h.resolve(g):w(t).then((function(t){return g=t}))}function _(t){var e=x[t.name],i={};i.promise=new h((function(t,e){i.resolve=t,i.reject=e})),e.deferredOperations.push(i),e.dbReady?e.dbReady=e.dbReady.then((function(){return i.promise})):e.dbReady=i.promise}function k(t){var e=x[t.name].deferredOperations.pop();if(e)return e.resolve(),e.promise}function A(t,e){var i=x[t.name].deferredOperations.pop();if(i)return i.reject(e),i.promise}function C(t,e){return new h((function(i,a){if(x[t.name]=x[t.name]||N(),t.db){if(!e)return i(t.db);_(t),t.db.close()}var r=[t.name];e&&r.push(t.version);var n=s.open.apply(s,r);e&&(n.onupgradeneeded=function(e){var i=n.result;try{i.createObjectStore(t.storeName),e.oldVersion<=1&&i.createObjectStore(p)}catch(a){if("ConstraintError"!==a.name)throw a;console.warn('The database "'+t.name+'" has been upgraded from version '+e.oldVersion+" to version "+e.newVersion+', but the storage "'+t.storeName+'" already exists.')}}),n.onerror=function(t){t.preventDefault(),a(n.error)},n.onsuccess=function(){var e=n.result;e.onversionchange=function(t){t.target.close()},i(e),k(t)}}))}function M(t){return C(t,!1)}function T(t){return C(t,!0)}function P(t,e){if(!t.db)return!0;var i=!t.db.objectStoreNames.contains(t.storeName),a=t.version<t.db.version,r=t.version>t.db.version;if(a&&(t.version!==e&&console.warn('The database "'+t.name+"\" can't be downgraded from version "+t.db.version+" to version "+t.version+"."),t.version=t.db.version),r||i){if(i){var n=t.db.version+1;n>t.version&&(t.version=n)}return!0}return!1}function L(t){return new h((function(e,i){var a=new FileReader;a.onerror=i,a.onloadend=function(i){var a=btoa(i.target.result||"");e({__local_forage_encoded_blob:!0,data:a,type:t.type})},a.readAsBinaryString(t)}))}function D(t){return l([y(atob(t.data))],{type:t.type})}function E(t){return t&&t.__local_forage_encoded_blob}function O(t){var e=this,i=e._initReady().then((function(){var t=x[e._dbInfo.name];if(t&&t.dbReady)return t.dbReady}));return d(i,t,t),i}function I(t){_(t);for(var e=x[t.name],i=e.forages,a=0;a<i.length;a++){var r=i[a];r._dbInfo.db&&(r._dbInfo.db.close(),r._dbInfo.db=null)}return t.db=null,M(t).then((function(e){return t.db=e,P(t)?T(t):e})).then((function(a){t.db=e.db=a;for(var r=0;r<i.length;r++)i[r]._dbInfo.db=a})).catch((function(e){throw A(t,e),e}))}function z(t,e,i,a){void 0===a&&(a=1);try{var r=t.db.transaction(t.storeName,e);i(null,r)}catch(n){if(a>0&&(!t.db||"InvalidStateError"===n.name||"NotFoundError"===n.name))return h.resolve().then((function(){if(!t.db||"NotFoundError"===n.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),T(t)})).then((function(){return I(t).then((function(){z(t,e,i,a-1)}))})).catch(i);i(n)}}function N(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Y(t){var e=this,i={db:null};if(t)for(var a in t)i[a]=t[a];var r=x[i.name];r||(r=N(),x[i.name]=r),r.forages.push(e),e._initReady||(e._initReady=e.ready,e.ready=O);var n=[];function s(){return h.resolve()}for(var o=0;o<r.forages.length;o++){var l=r.forages[o];l!==e&&n.push(l._initReady().catch(s))}var c=r.forages.slice(0);return h.all(n).then((function(){return i.db=r.db,M(i)})).then((function(t){return i.db=t,P(i,e._defaultConfig.version)?T(i):t})).then((function(t){i.db=r.db=t,e._dbInfo=i;for(var a=0;a<c.length;a++){var n=c[a];n!==e&&(n._dbInfo.db=i.db,n._dbInfo.version=i.version)}}))}function F(t,e){var i=this;t=u(t);var a=new h((function(e,a){i.ready().then((function(){z(i._dbInfo,v,(function(r,n){if(r)return a(r);try{var s=n.objectStore(i._dbInfo.storeName).get(t);s.onsuccess=function(){var t=s.result;void 0===t&&(t=null),E(t)&&(t=D(t)),e(t)},s.onerror=function(){a(s.error)}}catch(it){a(it)}}))})).catch(a)}));return c(a,e),a}function R(t,e){var i=this,a=new h((function(e,a){i.ready().then((function(){z(i._dbInfo,v,(function(r,n){if(r)return a(r);try{var s=n.objectStore(i._dbInfo.storeName).openCursor(),o=1;s.onsuccess=function(){var i=s.result;if(i){var a=i.value;E(a)&&(a=D(a));var r=t(a,i.key,o++);void 0!==r?e(r):i.continue()}else e()},s.onerror=function(){a(s.error)}}catch(it){a(it)}}))})).catch(a)}));return c(a,e),a}function H(t,e,i){var a=this;t=u(t);var r=new h((function(i,r){var n;a.ready().then((function(){return n=a._dbInfo,"[object Blob]"===m.call(e)?S(n.db).then((function(t){return t?e:L(e)})):e})).then((function(e){z(a._dbInfo,b,(function(n,s){if(n)return r(n);try{var o=s.objectStore(a._dbInfo.storeName);null===e&&(e=void 0);var l=o.put(e,t);s.oncomplete=function(){void 0===e&&(e=null),i(e)},s.onabort=s.onerror=function(){var t=l.error?l.error:l.transaction.error;r(t)}}catch(it){r(it)}}))})).catch(r)}));return c(r,i),r}function X(t,e){var i=this;t=u(t);var a=new h((function(e,a){i.ready().then((function(){z(i._dbInfo,b,(function(r,n){if(r)return a(r);try{var s=n.objectStore(i._dbInfo.storeName).delete(t);n.oncomplete=function(){e()},n.onerror=function(){a(s.error)},n.onabort=function(){var t=s.error?s.error:s.transaction.error;a(t)}}catch(it){a(it)}}))})).catch(a)}));return c(a,e),a}function W(t){var e=this,i=new h((function(t,i){e.ready().then((function(){z(e._dbInfo,b,(function(a,r){if(a)return i(a);try{var n=r.objectStore(e._dbInfo.storeName).clear();r.oncomplete=function(){t()},r.onabort=r.onerror=function(){var t=n.error?n.error:n.transaction.error;i(t)}}catch(it){i(it)}}))})).catch(i)}));return c(i,t),i}function V(t){var e=this,i=new h((function(t,i){e.ready().then((function(){z(e._dbInfo,v,(function(a,r){if(a)return i(a);try{var n=r.objectStore(e._dbInfo.storeName).count();n.onsuccess=function(){t(n.result)},n.onerror=function(){i(n.error)}}catch(it){i(it)}}))})).catch(i)}));return c(i,t),i}function B(t,e){var i=this,a=new h((function(e,a){t<0?e(null):i.ready().then((function(){z(i._dbInfo,v,(function(r,n){if(r)return a(r);try{var s=n.objectStore(i._dbInfo.storeName),o=!1,l=s.openKeyCursor();l.onsuccess=function(){var i=l.result;i?0===t||o?e(i.key):(o=!0,i.advance(t)):e(null)},l.onerror=function(){a(l.error)}}catch(it){a(it)}}))})).catch(a)}));return c(a,e),a}function j(t){var e=this,i=new h((function(t,i){e.ready().then((function(){z(e._dbInfo,v,(function(a,r){if(a)return i(a);try{var n=r.objectStore(e._dbInfo.storeName).openKeyCursor(),s=[];n.onsuccess=function(){var e=n.result;e?(s.push(e.key),e.continue()):t(s)},n.onerror=function(){i(n.error)}}catch(it){i(it)}}))})).catch(i)}));return c(i,t),i}function G(t,e){e=f.apply(this,arguments);var i=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||i.name,t.storeName=t.storeName||i.storeName);var a,r=this;if(t.name){var n=t.name===i.name&&r._dbInfo.db?h.resolve(r._dbInfo.db):M(t).then((function(e){var i=x[t.name],a=i.forages;i.db=e;for(var r=0;r<a.length;r++)a[r]._dbInfo.db=e;return e}));a=t.storeName?n.then((function(e){if(e.objectStoreNames.contains(t.storeName)){var i=e.version+1;_(t);var a=x[t.name],r=a.forages;e.close();for(var n=0;n<r.length;n++){var o=r[n];o._dbInfo.db=null,o._dbInfo.version=i}var l=new h((function(e,a){var r=s.open(t.name,i);r.onerror=function(t){r.result.close(),a(t)},r.onupgradeneeded=function(){r.result.deleteObjectStore(t.storeName)},r.onsuccess=function(){var t=r.result;t.close(),e(t)}}));return l.then((function(t){a.db=t;for(var e=0;e<r.length;e++){var i=r[e];i._dbInfo.db=t,k(i._dbInfo)}})).catch((function(e){throw(A(t,e)||h.resolve()).catch((function(){})),e}))}})):n.then((function(e){_(t);var i=x[t.name],a=i.forages;e.close();for(var r=0;r<a.length;r++)a[r]._dbInfo.db=null;var n=new h((function(e,i){var a=s.deleteDatabase(t.name);a.onerror=function(){var t=a.result;t&&t.close(),i(a.error)},a.onblocked=function(){console.warn('dropInstance blocked for database "'+t.name+'" until all open connections are closed')},a.onsuccess=function(){var t=a.result;t&&t.close(),e(t)}}));return n.then((function(t){i.db=t;for(var e=0;e<a.length;e++)k(a[e]._dbInfo)})).catch((function(e){throw(A(t,e)||h.resolve()).catch((function(){})),e}))}))}else a=h.reject("Invalid arguments");return c(a,e),a}var U={_driver:"asyncStorage",_initStorage:Y,_support:o(),iterate:R,getItem:F,setItem:H,removeItem:X,clear:W,length:V,key:B,keys:j,dropInstance:G};function $(){return"function"==typeof openDatabase}var Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",q="~~local_forage_type~",J=/^~~local_forage_type~([^~]+)~/,K="__lfsc__:",Q=K.length,tt="arbf",et="blob",at="si08",rt="ui08",nt="uic8",st="si16",ot="si32",lt="ur16",ht="ui32",ct="fl32",dt="fl64",ut=Q+tt.length,ft=Object.prototype.toString;function pt(t){var e,i,a,r,n,s=.75*t.length,o=t.length,l=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var h=new ArrayBuffer(s),c=new Uint8Array(h);for(e=0;e<o;e+=4)i=Z.indexOf(t[e]),a=Z.indexOf(t[e+1]),r=Z.indexOf(t[e+2]),n=Z.indexOf(t[e+3]),c[l++]=i<<2|a>>4,c[l++]=(15&a)<<4|r>>2,c[l++]=(3&r)<<6|63&n;return h}function gt(t){var e,i=new Uint8Array(t),a="";for(e=0;e<i.length;e+=3)a+=Z[i[e]>>2],a+=Z[(3&i[e])<<4|i[e+1]>>4],a+=Z[(15&i[e+1])<<2|i[e+2]>>6],a+=Z[63&i[e+2]];return i.length%3==2?a=a.substring(0,a.length-1)+"=":i.length%3==1&&(a=a.substring(0,a.length-2)+"=="),a}function xt(t,e){var i="";if(t&&(i=ft.call(t)),t&&("[object ArrayBuffer]"===i||t.buffer&&"[object ArrayBuffer]"===ft.call(t.buffer))){var a,r=K;t instanceof ArrayBuffer?(a=t,r+=tt):(a=t.buffer,"[object Int8Array]"===i?r+=at:"[object Uint8Array]"===i?r+=rt:"[object Uint8ClampedArray]"===i?r+=nt:"[object Int16Array]"===i?r+=st:"[object Uint16Array]"===i?r+=lt:"[object Int32Array]"===i?r+=ot:"[object Uint32Array]"===i?r+=ht:"[object Float32Array]"===i?r+=ct:"[object Float64Array]"===i?r+=dt:e(new Error("Failed to get type for BinaryArray"))),e(r+gt(a))}else if("[object Blob]"===i){var n=new FileReader;n.onload=function(){var i=q+t.type+"~"+gt(this.result);e(K+et+i)},n.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(it){console.error("Couldn't convert value into a JSON string: ",t),e(null,it)}}function mt(t){if(t.substring(0,Q)!==K)return JSON.parse(t);var e,i=t.substring(ut),a=t.substring(Q,ut);if(a===et&&J.test(i)){var r=i.match(J);e=r[1],i=i.substring(r[0].length)}var n=pt(i);switch(a){case tt:return n;case et:return l([n],{type:e});case at:return new Int8Array(n);case rt:return new Uint8Array(n);case nt:return new Uint8ClampedArray(n);case st:return new Int16Array(n);case lt:return new Uint16Array(n);case ot:return new Int32Array(n);case ht:return new Uint32Array(n);case ct:return new Float32Array(n);case dt:return new Float64Array(n);default:throw new Error("Unkown type: "+a)}}var vt={serialize:xt,deserialize:mt,stringToBuffer:pt,bufferToString:gt};function bt(t,e,i,a){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],i,a)}function yt(t){var e=this,i={db:null};if(t)for(var a in t)i[a]="string"!=typeof t[a]?t[a].toString():t[a];var r=new h((function(t,a){try{i.db=openDatabase(i.name,String(i.version),i.description,i.size)}catch(it){return a(it)}i.db.transaction((function(r){bt(r,i,(function(){e._dbInfo=i,t()}),(function(t,e){a(e)}))}),a)}));return i.serializer=vt,r}function wt(t,e,i,a,r,n){t.executeSql(i,a,r,(function(t,s){s.code===s.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,o){o.rows.length?n(t,s):bt(t,e,(function(){t.executeSql(i,a,r,n)}),n)}),n):n(t,s)}),n)}function St(t,e){var i=this;t=u(t);var a=new h((function(e,a){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){wt(i,r,"SELECT * FROM "+r.storeName+" WHERE key = ? LIMIT 1",[t],(function(t,i){var a=i.rows.length?i.rows.item(0).value:null;a&&(a=r.serializer.deserialize(a)),e(a)}),(function(t,e){a(e)}))}))})).catch(a)}));return c(a,e),a}function _t(t,e){var i=this,a=new h((function(e,a){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){wt(i,r,"SELECT * FROM "+r.storeName,[],(function(i,a){for(var n=a.rows,s=n.length,o=0;o<s;o++){var l=n.item(o),h=l.value;if(h&&(h=r.serializer.deserialize(h)),void 0!==(h=t(h,l.key,o+1)))return void e(h)}e()}),(function(t,e){a(e)}))}))})).catch(a)}));return c(a,e),a}function kt(t,e,i,a){var r=this;t=u(t);var n=new h((function(n,s){r.ready().then((function(){void 0===e&&(e=null);var o=e,l=r._dbInfo;l.serializer.serialize(e,(function(e,h){h?s(h):l.db.transaction((function(i){wt(i,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){n(o)}),(function(t,e){s(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(a>0)return void n(kt.apply(r,[t,o,i,a-1]));s(e)}}))}))})).catch(s)}));return c(n,i),n}function At(t,e,i){return kt.apply(this,[t,e,i,1])}function Ct(t,e){var i=this;t=u(t);var a=new h((function(e,a){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){wt(i,r,"DELETE FROM "+r.storeName+" WHERE key = ?",[t],(function(){e()}),(function(t,e){a(e)}))}))})).catch(a)}));return c(a,e),a}function Mt(t){var e=this,i=new h((function(t,i){e.ready().then((function(){var a=e._dbInfo;a.db.transaction((function(e){wt(e,a,"DELETE FROM "+a.storeName,[],(function(){t()}),(function(t,e){i(e)}))}))})).catch(i)}));return c(i,t),i}function Tt(t){var e=this,i=new h((function(t,i){e.ready().then((function(){var a=e._dbInfo;a.db.transaction((function(e){wt(e,a,"SELECT COUNT(key) as c FROM "+a.storeName,[],(function(e,i){var a=i.rows.item(0).c;t(a)}),(function(t,e){i(e)}))}))})).catch(i)}));return c(i,t),i}function Pt(t,e){var i=this,a=new h((function(e,a){i.ready().then((function(){var r=i._dbInfo;r.db.transaction((function(i){wt(i,r,"SELECT key FROM "+r.storeName+" WHERE id = ? LIMIT 1",[t+1],(function(t,i){var a=i.rows.length?i.rows.item(0).key:null;e(a)}),(function(t,e){a(e)}))}))})).catch(a)}));return c(a,e),a}function Lt(t){var e=this,i=new h((function(t,i){e.ready().then((function(){var a=e._dbInfo;a.db.transaction((function(e){wt(e,a,"SELECT key FROM "+a.storeName,[],(function(e,i){for(var a=[],r=0;r<i.rows.length;r++)a.push(i.rows.item(r).key);t(a)}),(function(t,e){i(e)}))}))})).catch(i)}));return c(i,t),i}function Dt(t){return new h((function(e,i){t.transaction((function(a){a.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(i,a){for(var r=[],n=0;n<a.rows.length;n++)r.push(a.rows.item(n).name);e({db:t,storeNames:r})}),(function(t,e){i(e)}))}),(function(t){i(t)}))}))}function Et(t,e){e=f.apply(this,arguments);var i=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||i.name,t.storeName=t.storeName||i.storeName);var a,r=this;return a=t.name?new h((function(e){var a;a=t.name===i.name?r._dbInfo.db:openDatabase(t.name,"","",0),t.storeName?e({db:a,storeNames:[t.storeName]}):e(Dt(a))})).then((function(t){return new h((function(e,i){t.db.transaction((function(a){function r(t){return new h((function(e,i){a.executeSql("DROP TABLE IF EXISTS "+t,[],(function(){e()}),(function(t,e){i(e)}))}))}for(var n=[],s=0,o=t.storeNames.length;s<o;s++)n.push(r(t.storeNames[s]));h.all(n).then((function(){e()})).catch((function(t){i(t)}))}),(function(t){i(t)}))}))})):h.reject("Invalid arguments"),c(a,e),a}var Ot={_driver:"webSQLStorage",_initStorage:yt,_support:$(),iterate:_t,getItem:St,setItem:At,removeItem:Ct,clear:Mt,length:Tt,key:Pt,keys:Lt,dropInstance:Et};function It(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(it){return!1}}function zt(t,e){var i=t.name+"/";return t.storeName!==e.storeName&&(i+=t.storeName+"/"),i}function Nt(){var t="_localforage_support_test";try{return localStorage.setItem(t,!0),localStorage.removeItem(t),!1}catch(it){return!0}}function Yt(){return!Nt()||localStorage.length>0}function Ft(t){var e=this,i={};if(t)for(var a in t)i[a]=t[a];return i.keyPrefix=zt(t,e._defaultConfig),Yt()?(e._dbInfo=i,i.serializer=vt,h.resolve()):h.reject()}function Rt(t){var e=this,i=e.ready().then((function(){for(var t=e._dbInfo.keyPrefix,i=localStorage.length-1;i>=0;i--){var a=localStorage.key(i);0===a.indexOf(t)&&localStorage.removeItem(a)}}));return c(i,t),i}function Ht(t,e){var i=this;t=u(t);var a=i.ready().then((function(){var e=i._dbInfo,a=localStorage.getItem(e.keyPrefix+t);return a&&(a=e.serializer.deserialize(a)),a}));return c(a,e),a}function Xt(t,e){var i=this,a=i.ready().then((function(){for(var e=i._dbInfo,a=e.keyPrefix,r=a.length,n=localStorage.length,s=1,o=0;o<n;o++){var l=localStorage.key(o);if(0===l.indexOf(a)){var h=localStorage.getItem(l);if(h&&(h=e.serializer.deserialize(h)),void 0!==(h=t(h,l.substring(r),s++)))return h}}}));return c(a,e),a}function Wt(t,e){var i=this,a=i.ready().then((function(){var e,a=i._dbInfo;try{e=localStorage.key(t)}catch(r){e=null}return e&&(e=e.substring(a.keyPrefix.length)),e}));return c(a,e),a}function Vt(t){var e=this,i=e.ready().then((function(){for(var t=e._dbInfo,i=localStorage.length,a=[],r=0;r<i;r++){var n=localStorage.key(r);0===n.indexOf(t.keyPrefix)&&a.push(n.substring(t.keyPrefix.length))}return a}));return c(i,t),i}function Bt(t){var e=this.keys().then((function(t){return t.length}));return c(e,t),e}function jt(t,e){var i=this;t=u(t);var a=i.ready().then((function(){var e=i._dbInfo;localStorage.removeItem(e.keyPrefix+t)}));return c(a,e),a}function Gt(t,e,i){var a=this;t=u(t);var r=a.ready().then((function(){void 0===e&&(e=null);var i=e;return new h((function(r,n){var s=a._dbInfo;s.serializer.serialize(e,(function(e,a){if(a)n(a);else try{localStorage.setItem(s.keyPrefix+t,e),r(i)}catch(it){"QuotaExceededError"!==it.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==it.name||n(it),n(it)}}))}))}));return c(r,i),r}function Ut(t,e){if(e=f.apply(this,arguments),!(t="function"!=typeof t&&t||{}).name){var i=this.config();t.name=t.name||i.name,t.storeName=t.storeName||i.storeName}var a,r=this;return a=t.name?new h((function(e){t.storeName?e(zt(t,r._defaultConfig)):e(t.name+"/")})).then((function(t){for(var e=localStorage.length-1;e>=0;e--){var i=localStorage.key(e);0===i.indexOf(t)&&localStorage.removeItem(i)}})):h.reject("Invalid arguments"),c(a,e),a}var $t={_driver:"localStorageWrapper",_initStorage:Ft,_support:It(),iterate:Xt,getItem:Ht,setItem:Gt,removeItem:jt,clear:Rt,length:Bt,key:Wt,keys:Vt,dropInstance:Ut},Zt=function(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)},qt=function(t,e){for(var i=t.length,a=0;a<i;){if(Zt(t[a],e))return!0;a++}return!1},Jt=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},Kt={},Qt={},te={INDEXEDDB:U,WEBSQL:Ot,LOCALSTORAGE:$t},ee=[te.INDEXEDDB._driver,te.WEBSQL._driver,te.LOCALSTORAGE._driver],ie=["dropInstance"],ae=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ie),re={description:"",driver:ee.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ne(t,e){t[e]=function(){var i=arguments;return t.ready().then((function(){return t[e].apply(t,i)}))}}function se(){for(var t=1;t<arguments.length;t++){var e=arguments[t];if(e)for(var i in e)e.hasOwnProperty(i)&&(Jt(e[i])?arguments[0][i]=e[i].slice():arguments[0][i]=e[i])}return arguments[0]}var oe=function(){function t(e){for(var i in r(this,t),te)if(te.hasOwnProperty(i)){var a=te[i],n=a._driver;this[i]=n,Kt[n]||this.defineDriver(a)}this._defaultConfig=se({},re),this._config=se({},this._defaultConfig,e),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return t.prototype.config=function(t){if("object"===(void 0===t?"undefined":a(t))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var e in t){if("storeName"===e&&(t[e]=t[e].replace(/\W/g,"_")),"version"===e&&"number"!=typeof t[e])return new Error("Database version must be a number.");this._config[e]=t[e]}return!("driver"in t)||!t.driver||this.setDriver(this._config.driver)}return"string"==typeof t?this._config[t]:this._config},t.prototype.defineDriver=function(t,e,i){var a=new h((function(e,i){try{var a=t._driver,r=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!t._driver)return void i(r);for(var n=ae.concat("_initStorage"),s=0,o=n.length;s<o;s++){var l=n[s];if((!qt(ie,l)||t[l])&&"function"!=typeof t[l])return void i(r)}var d=function(){for(var e=function(t){return function(){var e=new Error("Method "+t+" is not implemented by the current driver"),i=h.reject(e);return c(i,arguments[arguments.length-1]),i}},i=0,a=ie.length;i<a;i++){var r=ie[i];t[r]||(t[r]=e(r))}};d();var u=function(i){Kt[a]&&console.info("Redefining LocalForage driver: "+a),Kt[a]=t,Qt[a]=i,e()};"_support"in t?t._support&&"function"==typeof t._support?t._support().then(u,i):u(!!t._support):u(!0)}catch(it){i(it)}}));return d(a,e,i),a},t.prototype.driver=function(){return this._driver||null},t.prototype.getDriver=function(t,e,i){var a=Kt[t]?h.resolve(Kt[t]):h.reject(new Error("Driver not found."));return d(a,e,i),a},t.prototype.getSerializer=function(t){var e=h.resolve(vt);return d(e,t),e},t.prototype.ready=function(t){var e=this,i=e._driverSet.then((function(){return null===e._ready&&(e._ready=e._initDriver()),e._ready}));return d(i,t,t),i},t.prototype.setDriver=function(t,e,i){var a=this;Jt(t)||(t=[t]);var r=this._getSupportedDrivers(t);function n(){a._config.driver=a.driver()}function s(t){return a._extend(t),n(),a._ready=a._initStorage(a._config),a._ready}function o(t){return function(){var e=0;function i(){for(;e<t.length;){var r=t[e];return e++,a._dbInfo=null,a._ready=null,a.getDriver(r).then(s).catch(i)}n();var o=new Error("No available storage method found.");return a._driverSet=h.reject(o),a._driverSet}return i()}}var l=null!==this._driverSet?this._driverSet.catch((function(){return h.resolve()})):h.resolve();return this._driverSet=l.then((function(){var t=r[0];return a._dbInfo=null,a._ready=null,a.getDriver(t).then((function(t){a._driver=t._driver,n(),a._wrapLibraryMethodsWithReady(),a._initDriver=o(r)}))})).catch((function(){n();var t=new Error("No available storage method found.");return a._driverSet=h.reject(t),a._driverSet})),d(this._driverSet,e,i),this._driverSet},t.prototype.supports=function(t){return!!Qt[t]},t.prototype._extend=function(t){se(this,t)},t.prototype._getSupportedDrivers=function(t){for(var e=[],i=0,a=t.length;i<a;i++){var r=t[i];this.supports(r)&&e.push(r)}return e},t.prototype._wrapLibraryMethodsWithReady=function(){for(var t=0,e=ae.length;t<e;t++)ne(this,ae[t])},t.prototype.createInstance=function(e){return new t(e)},t}(),le=new oe;e.exports=le},{3:3}]},{},[4])(4),_t={exports:{}};function kt(t,e){(function(t){return"string"==typeof t&&-1!==t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var i=function(t){return"string"==typeof t&&-1!==t.indexOf("%")}(t);return t=360===e?t:Math.min(e,Math.max(0,parseFloat(t))),i&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:t=360===e?(t<0?t%e+e:t%e)/parseFloat(String(e)):t%e/parseFloat(String(e))}function At(t){return Math.min(1,Math.max(0,t))}function Ct(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Mt(t){return t<=1?100*Number(t)+"%":t}function Tt(t){return 1===t.length?"0"+t:String(t)}function Pt(t,e,i){t=kt(t,255),e=kt(e,255),i=kt(i,255);var a=Math.max(t,e,i),r=Math.min(t,e,i),n=0,s=0,o=(a+r)/2;if(a===r)s=0,n=0;else{var l=a-r;switch(s=o>.5?l/(2-a-r):l/(a+r),a){case t:n=(e-i)/l+(e<i?6:0);break;case e:n=(i-t)/l+2;break;case i:n=(t-e)/l+4}n/=6}return{h:n,s:s,l:o}}function Lt(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*i*(e-t):i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function Dt(t,e,i){t=kt(t,255),e=kt(e,255),i=kt(i,255);var a=Math.max(t,e,i),r=Math.min(t,e,i),n=0,s=a,o=a-r,l=0===a?0:o/a;if(a===r)n=0;else{switch(a){case t:n=(e-i)/o+(e<i?6:0);break;case e:n=(i-t)/o+2;break;case i:n=(t-e)/o+4}n/=6}return{h:n,s:l,v:s}}function Et(t,e,i,a){var r=[Tt(Math.round(t).toString(16)),Tt(Math.round(e).toString(16)),Tt(Math.round(i).toString(16))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Ot(t){return Math.round(255*parseFloat(t)).toString(16)}function It(t){return zt(t)/255}function zt(t){return parseInt(t,16)}bt=_t,yt=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",a={};function r(t,e){if(!a[t]){a[t]={};for(var i=0;i<t.length;i++)a[t][t.charAt(i)]=i}return a[t][e]}var n={compressToBase64:function(t){if(null==t)return"";var i=n._compress(t,6,(function(t){return e.charAt(t)}));switch(i.length%4){default:case 0:return i;case 1:return i+"===";case 2:return i+"==";case 3:return i+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:n._decompress(t.length,32,(function(i){return r(e,t.charAt(i))}))},compressToUTF16:function(e){return null==e?"":n._compress(e,15,(function(e){return t(e+32)}))+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:n._decompress(t.length,16384,(function(e){return t.charCodeAt(e)-32}))},compressToUint8Array:function(t){for(var e=n.compress(t),i=new Uint8Array(2*e.length),a=0,r=e.length;a<r;a++){var s=e.charCodeAt(a);i[2*a]=s>>>8,i[2*a+1]=s%256}return i},decompressFromUint8Array:function(e){if(null==e)return n.decompress(e);for(var i=new Array(e.length/2),a=0,r=i.length;a<r;a++)i[a]=256*e[2*a]+e[2*a+1];var s=[];return i.forEach((function(e){s.push(t(e))})),n.decompress(s.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":n._compress(t,6,(function(t){return i.charAt(t)}))},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),n._decompress(t.length,32,(function(e){return r(i,t.charAt(e))})))},compress:function(e){return n._compress(e,16,(function(e){return t(e)}))},_compress:function(t,e,i){if(null==t)return"";var a,r,n,s={},o={},l="",h="",c="",d=2,u=3,f=2,p=[],g=0,x=0;for(n=0;n<t.length;n+=1)if(l=t.charAt(n),Object.prototype.hasOwnProperty.call(s,l)||(s[l]=u++,o[l]=!0),h=c+l,Object.prototype.hasOwnProperty.call(s,h))c=h;else{if(Object.prototype.hasOwnProperty.call(o,c)){if(c.charCodeAt(0)<256){for(a=0;a<f;a++)g<<=1,x==e-1?(x=0,p.push(i(g)),g=0):x++;for(r=c.charCodeAt(0),a=0;a<8;a++)g=g<<1|1&r,x==e-1?(x=0,p.push(i(g)),g=0):x++,r>>=1}else{for(r=1,a=0;a<f;a++)g=g<<1|r,x==e-1?(x=0,p.push(i(g)),g=0):x++,r=0;for(r=c.charCodeAt(0),a=0;a<16;a++)g=g<<1|1&r,x==e-1?(x=0,p.push(i(g)),g=0):x++,r>>=1}0==--d&&(d=Math.pow(2,f),f++),delete o[c]}else for(r=s[c],a=0;a<f;a++)g=g<<1|1&r,x==e-1?(x=0,p.push(i(g)),g=0):x++,r>>=1;0==--d&&(d=Math.pow(2,f),f++),s[h]=u++,c=String(l)}if(""!==c){if(Object.prototype.hasOwnProperty.call(o,c)){if(c.charCodeAt(0)<256){for(a=0;a<f;a++)g<<=1,x==e-1?(x=0,p.push(i(g)),g=0):x++;for(r=c.charCodeAt(0),a=0;a<8;a++)g=g<<1|1&r,x==e-1?(x=0,p.push(i(g)),g=0):x++,r>>=1}else{for(r=1,a=0;a<f;a++)g=g<<1|r,x==e-1?(x=0,p.push(i(g)),g=0):x++,r=0;for(r=c.charCodeAt(0),a=0;a<16;a++)g=g<<1|1&r,x==e-1?(x=0,p.push(i(g)),g=0):x++,r>>=1}0==--d&&(d=Math.pow(2,f),f++),delete o[c]}else for(r=s[c],a=0;a<f;a++)g=g<<1|1&r,x==e-1?(x=0,p.push(i(g)),g=0):x++,r>>=1;0==--d&&(d=Math.pow(2,f),f++)}for(r=2,a=0;a<f;a++)g=g<<1|1&r,x==e-1?(x=0,p.push(i(g)),g=0):x++,r>>=1;for(;;){if(g<<=1,x==e-1){p.push(i(g));break}x++}return p.join("")},decompress:function(t){return null==t?"":""==t?null:n._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,i,a){var r,n,s,o,l,h,c,d=[],u=4,f=4,p=3,g="",x=[],m={val:a(0),position:i,index:1};for(r=0;r<3;r+=1)d[r]=r;for(s=0,l=Math.pow(2,2),h=1;h!=l;)o=m.val&m.position,m.position>>=1,0==m.position&&(m.position=i,m.val=a(m.index++)),s|=(o>0?1:0)*h,h<<=1;switch(s){case 0:for(s=0,l=Math.pow(2,8),h=1;h!=l;)o=m.val&m.position,m.position>>=1,0==m.position&&(m.position=i,m.val=a(m.index++)),s|=(o>0?1:0)*h,h<<=1;c=t(s);break;case 1:for(s=0,l=Math.pow(2,16),h=1;h!=l;)o=m.val&m.position,m.position>>=1,0==m.position&&(m.position=i,m.val=a(m.index++)),s|=(o>0?1:0)*h,h<<=1;c=t(s);break;case 2:return""}for(d[3]=c,n=c,x.push(c);;){if(m.index>e)return"";for(s=0,l=Math.pow(2,p),h=1;h!=l;)o=m.val&m.position,m.position>>=1,0==m.position&&(m.position=i,m.val=a(m.index++)),s|=(o>0?1:0)*h,h<<=1;switch(c=s){case 0:for(s=0,l=Math.pow(2,8),h=1;h!=l;)o=m.val&m.position,m.position>>=1,0==m.position&&(m.position=i,m.val=a(m.index++)),s|=(o>0?1:0)*h,h<<=1;d[f++]=t(s),c=f-1,u--;break;case 1:for(s=0,l=Math.pow(2,16),h=1;h!=l;)o=m.val&m.position,m.position>>=1,0==m.position&&(m.position=i,m.val=a(m.index++)),s|=(o>0?1:0)*h,h<<=1;d[f++]=t(s),c=f-1,u--;break;case 2:return x.join("")}if(0==u&&(u=Math.pow(2,p),p++),d[c])g=d[c];else{if(c!==f)return null;g=n+n.charAt(0)}x.push(g),d[f++]=n+g.charAt(0),n=g,0==--u&&(u=Math.pow(2,p),p++)}}};return n}(),null!=bt&&(bt.exports=yt);var Nt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Yt(t){var e={r:0,g:0,b:0},i=1,a=null,r=null,n=null,s=!1,o=!1;return"string"==typeof t&&(t=function(t){if(0===(t=t.trim().toLowerCase()).length)return!1;var e=!1;if(Nt[t])t=Nt[t],e=!0;else if("transparent"===t)return{r:0,g:0,b:0,a:0,format:"name"};var i=Xt.rgb.exec(t);if(i)return{r:i[1],g:i[2],b:i[3]};if(i=Xt.rgba.exec(t))return{r:i[1],g:i[2],b:i[3],a:i[4]};if(i=Xt.hsl.exec(t))return{h:i[1],s:i[2],l:i[3]};if(i=Xt.hsla.exec(t))return{h:i[1],s:i[2],l:i[3],a:i[4]};if(i=Xt.hsv.exec(t))return{h:i[1],s:i[2],v:i[3]};if(i=Xt.hsva.exec(t))return{h:i[1],s:i[2],v:i[3],a:i[4]};if(i=Xt.hex8.exec(t))return{r:zt(i[1]),g:zt(i[2]),b:zt(i[3]),a:It(i[4]),format:e?"name":"hex8"};if(i=Xt.hex6.exec(t))return{r:zt(i[1]),g:zt(i[2]),b:zt(i[3]),format:e?"name":"hex"};if(i=Xt.hex4.exec(t))return{r:zt(i[1]+i[1]),g:zt(i[2]+i[2]),b:zt(i[3]+i[3]),a:It(i[4]+i[4]),format:e?"name":"hex8"};if(i=Xt.hex3.exec(t))return{r:zt(i[1]+i[1]),g:zt(i[2]+i[2]),b:zt(i[3]+i[3]),format:e?"name":"hex"};return!1}(t)),"object"==typeof t&&(Wt(t.r)&&Wt(t.g)&&Wt(t.b)?(e=function(t,e,i){return{r:255*kt(t,255),g:255*kt(e,255),b:255*kt(i,255)}}(t.r,t.g,t.b),s=!0,o="%"===String(t.r).substr(-1)?"prgb":"rgb"):Wt(t.h)&&Wt(t.s)&&Wt(t.v)?(a=Mt(t.s),r=Mt(t.v),e=function(t,e,i){t=6*kt(t,360),e=kt(e,100),i=kt(i,100);var a=Math.floor(t),r=t-a,n=i*(1-e),s=i*(1-r*e),o=i*(1-(1-r)*e),l=a%6;return{r:255*[i,s,n,n,o,i][l],g:255*[o,i,i,s,n,n][l],b:255*[n,n,o,i,i,s][l]}}(t.h,a,r),s=!0,o="hsv"):Wt(t.h)&&Wt(t.s)&&Wt(t.l)&&(a=Mt(t.s),n=Mt(t.l),e=function(t,e,i){var a,r,n;if(t=kt(t,360),e=kt(e,100),i=kt(i,100),0===e)r=i,n=i,a=i;else{var s=i<.5?i*(1+e):i+e-i*e,o=2*i-s;a=Lt(o,s,t+1/3),r=Lt(o,s,t),n=Lt(o,s,t-1/3)}return{r:255*a,g:255*r,b:255*n}}(t.h,a,n),s=!0,o="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(i=t.a)),i=Ct(i),{ok:s,format:t.format||o,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:i}}var Ft="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",Rt="[\\s|\\(]+("+Ft+")[,|\\s]+("+Ft+")[,|\\s]+("+Ft+")\\s*\\)?",Ht="[\\s|\\(]+("+Ft+")[,|\\s]+("+Ft+")[,|\\s]+("+Ft+")[,|\\s]+("+Ft+")\\s*\\)?",Xt={CSS_UNIT:new RegExp(Ft),rgb:new RegExp("rgb"+Rt),rgba:new RegExp("rgba"+Ht),hsl:new RegExp("hsl"+Rt),hsla:new RegExp("hsla"+Ht),hsv:new RegExp("hsv"+Rt),hsva:new RegExp("hsva"+Ht),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Wt(t){return Boolean(Xt.CSS_UNIT.exec(String(t)))}var Vt=function(){function t(e,i){var a;if(void 0===e&&(e=""),void 0===i&&(i={}),e instanceof t)return e;"number"==typeof e&&(e=function(t){return{r:t>>16,g:(65280&t)>>8,b:255&t}}(e)),this.originalInput=e;var r=Yt(e);this.originalInput=e,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(a=i.format)&&void 0!==a?a:r.format,this.gradientType=i.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},t.prototype.getLuminance=function(){var t=this.toRgb(),e=t.r/255,i=t.g/255,a=t.b/255;return.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.0722*(a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4))},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(t){return this.a=Ct(t),this.roundA=Math.round(100*this.a)/100,this},t.prototype.toHsv=function(){var t=Dt(this.r,this.g,this.b);return{h:360*t.h,s:t.s,v:t.v,a:this.a}},t.prototype.toHsvString=function(){var t=Dt(this.r,this.g,this.b),e=Math.round(360*t.h),i=Math.round(100*t.s),a=Math.round(100*t.v);return 1===this.a?"hsv("+e+", "+i+"%, "+a+"%)":"hsva("+e+", "+i+"%, "+a+"%, "+this.roundA+")"},t.prototype.toHsl=function(){var t=Pt(this.r,this.g,this.b);return{h:360*t.h,s:t.s,l:t.l,a:this.a}},t.prototype.toHslString=function(){var t=Pt(this.r,this.g,this.b),e=Math.round(360*t.h),i=Math.round(100*t.s),a=Math.round(100*t.l);return 1===this.a?"hsl("+e+", "+i+"%, "+a+"%)":"hsla("+e+", "+i+"%, "+a+"%, "+this.roundA+")"},t.prototype.toHex=function(t){return void 0===t&&(t=!1),Et(this.r,this.g,this.b,t)},t.prototype.toHexString=function(t){return void 0===t&&(t=!1),"#"+this.toHex(t)},t.prototype.toHex8=function(t){return void 0===t&&(t=!1),function(t,e,i,a,r){var n=[Tt(Math.round(t).toString(16)),Tt(Math.round(e).toString(16)),Tt(Math.round(i).toString(16)),Tt(Ot(a))];return r&&n[0].startsWith(n[0].charAt(1))&&n[1].startsWith(n[1].charAt(1))&&n[2].startsWith(n[2].charAt(1))&&n[3].startsWith(n[3].charAt(1))?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0)+n[3].charAt(0):n.join("")}(this.r,this.g,this.b,this.a,t)},t.prototype.toHex8String=function(t){return void 0===t&&(t=!1),"#"+this.toHex8(t)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var t=Math.round(this.r),e=Math.round(this.g),i=Math.round(this.b);return 1===this.a?"rgb("+t+", "+e+", "+i+")":"rgba("+t+", "+e+", "+i+", "+this.roundA+")"},t.prototype.toPercentageRgb=function(){var t=function(t){return Math.round(100*kt(t,255))+"%"};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var t=function(t){return Math.round(100*kt(t,255))};return 1===this.a?"rgb("+t(this.r)+"%, "+t(this.g)+"%, "+t(this.b)+"%)":"rgba("+t(this.r)+"%, "+t(this.g)+"%, "+t(this.b)+"%, "+this.roundA+")"},t.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var t="#"+Et(this.r,this.g,this.b,!1),e=0,i=Object.entries(Nt);e<i.length;e++){var a=i[e],r=a[0];if(t===a[1])return r}return!1},t.prototype.toString=function(t){var e=Boolean(t);t=null!=t?t:this.format;var i=!1,a=this.a<1&&this.a>=0;return e||!a||!t.startsWith("hex")&&"name"!==t?("rgb"===t&&(i=this.toRgbString()),"prgb"===t&&(i=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(i=this.toHexString()),"hex3"===t&&(i=this.toHexString(!0)),"hex4"===t&&(i=this.toHex8String(!0)),"hex8"===t&&(i=this.toHex8String()),"name"===t&&(i=this.toName()),"hsl"===t&&(i=this.toHslString()),"hsv"===t&&(i=this.toHsvString()),i||this.toHexString()):"name"===t&&0===this.a?this.toName():this.toRgbString()},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){void 0===e&&(e=10);var i=this.toHsl();return i.l+=e/100,i.l=At(i.l),new t(i)},t.prototype.brighten=function(e){void 0===e&&(e=10);var i=this.toRgb();return i.r=Math.max(0,Math.min(255,i.r-Math.round(-e/100*255))),i.g=Math.max(0,Math.min(255,i.g-Math.round(-e/100*255))),i.b=Math.max(0,Math.min(255,i.b-Math.round(-e/100*255))),new t(i)},t.prototype.darken=function(e){void 0===e&&(e=10);var i=this.toHsl();return i.l-=e/100,i.l=At(i.l),new t(i)},t.prototype.tint=function(t){return void 0===t&&(t=10),this.mix("white",t)},t.prototype.shade=function(t){return void 0===t&&(t=10),this.mix("black",t)},t.prototype.desaturate=function(e){void 0===e&&(e=10);var i=this.toHsl();return i.s-=e/100,i.s=At(i.s),new t(i)},t.prototype.saturate=function(e){void 0===e&&(e=10);var i=this.toHsl();return i.s+=e/100,i.s=At(i.s),new t(i)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var i=this.toHsl(),a=(i.h+e)%360;return i.h=a<0?360+a:a,new t(i)},t.prototype.mix=function(e,i){void 0===i&&(i=50);var a=this.toRgb(),r=new t(e).toRgb(),n=i/100;return new t({r:(r.r-a.r)*n+a.r,g:(r.g-a.g)*n+a.g,b:(r.b-a.b)*n+a.b,a:(r.a-a.a)*n+a.a})},t.prototype.analogous=function(e,i){void 0===e&&(e=6),void 0===i&&(i=30);var a=this.toHsl(),r=360/i,n=[this];for(a.h=(a.h-(r*e>>1)+720)%360;--e;)a.h=(a.h+r)%360,n.push(new t(a));return n},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){void 0===e&&(e=6);for(var i=this.toHsv(),a=i.h,r=i.s,n=i.v,s=[],o=1/e;e--;)s.push(new t({h:a,s:r,v:n})),n=(n+o)%1;return s},t.prototype.splitcomplement=function(){var e=this.toHsl(),i=e.h;return[this,new t({h:(i+72)%360,s:e.s,l:e.l}),new t({h:(i+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var i=this.toRgb(),a=new t(e).toRgb();return new t({r:a.r+(i.r-a.r)*i.a,g:a.g+(i.g-a.g)*i.a,b:a.b+(i.b-a.b)*i.a})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var i=this.toHsl(),a=i.h,r=[this],n=360/e,s=1;s<e;s++)r.push(new t({h:(a+s*n)%360,s:i.s,l:i.l}));return r},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function Bt(t,e){return void 0===t&&(t=""),void 0===e&&(e={}),new Vt(t,e)}let jt=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([\p{L}]*)/giu;function Gt(t="",e="ms"){var i=null;return(t=(t+"").replace(/(\d)[,_](\d)/g,"$1$2")).replace(jt,(function(t,e,a){(a=Ut(a))&&(i=(i||0)+parseFloat(e,10)*a)})),i&&i/(Ut(e)||1)}function Ut(t){return Gt[t]||Gt[t.toLowerCase().replace(/s$/,"")]}Gt.nanosecond=Gt.ns=1e-6,Gt["µs"]=Gt["μs"]=Gt.us=Gt.microsecond=.001,Gt.millisecond=Gt.ms=Gt[""]=1,Gt.second=Gt.sec=Gt.s=1e3*Gt.ms,Gt.minute=Gt.min=Gt.m=60*Gt.s,Gt.hour=Gt.hr=Gt.h=60*Gt.m,Gt.day=Gt.d=24*Gt.h,Gt.week=Gt.wk=Gt.w=7*Gt.d,Gt.month=Gt.b=30.4375*Gt.d,Gt.year=Gt.yr=Gt.y=365.25*Gt.d;var $t={exports:{}};!function(t,e){t.exports=function(){var e,i;function a(){return e.apply(null,arguments)}function r(t){e=t}function n(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function l(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(o(t,e))return!1;return!0}function h(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function d(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function u(t,e){var i,a=[],r=t.length;for(i=0;i<r;++i)a.push(e(t[i],i));return a}function f(t,e){for(var i in e)o(e,i)&&(t[i]=e[i]);return o(e,"toString")&&(t.toString=e.toString),o(e,"valueOf")&&(t.valueOf=e.valueOf),t}function p(t,e,i,a){return Zi(t,e,i,a,!0).utc()}function g(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function x(t){return null==t._pf&&(t._pf=g()),t._pf}function m(t){if(null==t._isValid){var e=x(t),a=i.call(e.parsedDateParts,(function(t){return null!=t})),r=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&a);if(t._strict&&(r=r&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return r;t._isValid=r}return t._isValid}function v(t){var e=p(NaN);return null!=t?f(x(e),t):x(e).userInvalidated=!0,e}i=Array.prototype.some?Array.prototype.some:function(t){var e,i=Object(this),a=i.length>>>0;for(e=0;e<a;e++)if(e in i&&t.call(this,i[e],e,i))return!0;return!1};var b=a.momentProperties=[],y=!1;function w(t,e){var i,a,r,n=b.length;if(h(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),h(e._i)||(t._i=e._i),h(e._f)||(t._f=e._f),h(e._l)||(t._l=e._l),h(e._strict)||(t._strict=e._strict),h(e._tzm)||(t._tzm=e._tzm),h(e._isUTC)||(t._isUTC=e._isUTC),h(e._offset)||(t._offset=e._offset),h(e._pf)||(t._pf=x(e)),h(e._locale)||(t._locale=e._locale),n>0)for(i=0;i<n;i++)h(r=e[a=b[i]])||(t[a]=r);return t}function S(t){w(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,a.updateOffset(this),y=!1)}function _(t){return t instanceof S||null!=t&&null!=t._isAMomentObject}function k(t){!1===a.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function A(t,e){var i=!0;return f((function(){if(null!=a.deprecationHandler&&a.deprecationHandler(null,t),i){var r,n,s,l=[],h=arguments.length;for(n=0;n<h;n++){if(r="","object"==typeof arguments[n]){for(s in r+="\n["+n+"] ",arguments[0])o(arguments[0],s)&&(r+=s+": "+arguments[0][s]+", ");r=r.slice(0,-2)}else r=arguments[n];l.push(r)}k(t+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),i=!1}return e.apply(this,arguments)}),e)}var C,M={};function T(t,e){null!=a.deprecationHandler&&a.deprecationHandler(t,e),M[t]||(k(e),M[t]=!0)}function P(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function L(t){var e,i;for(i in t)o(t,i)&&(P(e=t[i])?this[i]=e:this["_"+i]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function D(t,e){var i,a=f({},t);for(i in e)o(e,i)&&(s(t[i])&&s(e[i])?(a[i]={},f(a[i],t[i]),f(a[i],e[i])):null!=e[i]?a[i]=e[i]:delete a[i]);for(i in t)o(t,i)&&!o(e,i)&&s(t[i])&&(a[i]=f({},a[i]));return a}function E(t){null!=t&&this.set(t)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,C=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)o(t,e)&&i.push(e);return i};var O={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function I(t,e,i){var a=this._calendar[t]||this._calendar.sameElse;return P(a)?a.call(e,i):a}function z(t,e,i){var a=""+Math.abs(t),r=e-a.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+a}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Y=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},R={};function H(t,e,i,a){var r=a;"string"==typeof a&&(r=function(){return this[a]()}),t&&(R[t]=r),e&&(R[e[0]]=function(){return z(r.apply(this,arguments),e[1],e[2])}),i&&(R[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function X(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function W(t){var e,i,a=t.match(N);for(e=0,i=a.length;e<i;e++)R[a[e]]?a[e]=R[a[e]]:a[e]=X(a[e]);return function(e){var r,n="";for(r=0;r<i;r++)n+=P(a[r])?a[r].call(e,t):a[r];return n}}function V(t,e){return t.isValid()?(e=B(e,t.localeData()),F[e]=F[e]||W(e),F[e](t)):t.localeData().invalidDate()}function B(t,e){var i=5;function a(t){return e.longDateFormat(t)||t}for(Y.lastIndex=0;i>=0&&Y.test(t);)t=t.replace(Y,a),Y.lastIndex=0,i-=1;return t}var j={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function G(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(N).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])}var U="Invalid date";function $(){return this._invalidDate}var Z="%d",q=/\d{1,2}/;function J(t){return this._ordinal.replace("%d",t)}var K={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Q(t,e,i,a){var r=this._relativeTime[i];return P(r)?r(t,e,i,a):r.replace(/%d/i,t)}function tt(t,e){var i=this._relativeTime[t>0?"future":"past"];return P(i)?i(e):i.replace(/%s/i,e)}var et={};function at(t,e){var i=t.toLowerCase();et[i]=et[i+"s"]=et[e]=t}function rt(t){return"string"==typeof t?et[t]||et[t.toLowerCase()]:void 0}function nt(t){var e,i,a={};for(i in t)o(t,i)&&(e=rt(i))&&(a[e]=t[i]);return a}var st={};function ot(t,e){st[t]=e}function lt(t){var e,i=[];for(e in t)o(t,e)&&i.push({unit:e,priority:st[e]});return i.sort((function(t,e){return t.priority-e.priority})),i}function ht(t){return t%4==0&&t%100!=0||t%400==0}function ct(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function dt(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=ct(e)),i}function ut(t,e){return function(i){return null!=i?(pt(this,t,i),a.updateOffset(this,e),this):ft(this,t)}}function ft(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function pt(t,e,i){t.isValid()&&!isNaN(i)&&("FullYear"===e&&ht(t.year())&&1===t.month()&&29===t.date()?(i=dt(i),t._d["set"+(t._isUTC?"UTC":"")+e](i,t.month(),ee(i,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](i))}function gt(t){return P(this[t=rt(t)])?this[t]():this}function xt(t,e){if("object"==typeof t){var i,a=lt(t=nt(t)),r=a.length;for(i=0;i<r;i++)this[a[i].unit](t[a[i].unit])}else if(P(this[t=rt(t)]))return this[t](e);return this}var mt,bt=/\d/,yt=/\d\d/,wt=/\d{3}/,St=/\d{4}/,_t=/[+-]?\d{6}/,kt=/\d\d?/,At=/\d\d\d\d?/,Ct=/\d\d\d\d\d\d?/,Mt=/\d{1,3}/,Tt=/\d{1,4}/,Pt=/[+-]?\d{1,6}/,Lt=/\d+/,Dt=/[+-]?\d+/,Et=/Z|[+-]\d\d:?\d\d/gi,Ot=/Z|[+-]\d\d(?::?\d\d)?/gi,It=/[+-]?\d+(\.\d{1,3})?/,zt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Nt(t,e,i){mt[t]=P(e)?e:function(t,a){return t&&i?i:e}}function Yt(t,e){return o(mt,t)?mt[t](e._strict,e._locale):new RegExp(Ft(t))}function Ft(t){return Rt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,i,a,r){return e||i||a||r})))}function Rt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}mt={};var Ht={};function Xt(t,e){var i,a,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,i){i[e]=dt(t)}),a=t.length,i=0;i<a;i++)Ht[t[i]]=r}function Wt(t,e){Xt(t,(function(t,i,a,r){a._w=a._w||{},e(t,a._w,a,r)}))}function Vt(t,e,i){null!=e&&o(Ht,t)&&Ht[t](e,i._a,i,t)}var Bt,jt=0,Gt=1,Ut=2,$t=3,Zt=4,qt=5,Jt=6,Kt=7,Qt=8;function te(t,e){return(t%e+e)%e}function ee(t,e){if(isNaN(t)||isNaN(e))return NaN;var i=te(e,12);return t+=(e-i)/12,1===i?ht(t)?29:28:31-i%7%2}Bt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},H("M",["MM",2],"Mo",(function(){return this.month()+1})),H("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),H("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),at("month","M"),ot("month",8),Nt("M",kt),Nt("MM",kt,yt),Nt("MMM",(function(t,e){return e.monthsShortRegex(t)})),Nt("MMMM",(function(t,e){return e.monthsRegex(t)})),Xt(["M","MM"],(function(t,e){e[Gt]=dt(t)-1})),Xt(["MMM","MMMM"],(function(t,e,i,a){var r=i._locale.monthsParse(t,a,i._strict);null!=r?e[Gt]=r:x(i).invalidMonth=t}));var ie="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ae="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),re=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ne=zt,se=zt;function oe(t,e){return t?n(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||re).test(e)?"format":"standalone"][t.month()]:n(this._months)?this._months:this._months.standalone}function le(t,e){return t?n(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[re.test(e)?"format":"standalone"][t.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function he(t,e,i){var a,r,n,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],a=0;a<12;++a)n=p([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(n,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(n,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(r=Bt.call(this._shortMonthsParse,s))?r:null:-1!==(r=Bt.call(this._longMonthsParse,s))?r:null:"MMM"===e?-1!==(r=Bt.call(this._shortMonthsParse,s))||-1!==(r=Bt.call(this._longMonthsParse,s))?r:null:-1!==(r=Bt.call(this._longMonthsParse,s))||-1!==(r=Bt.call(this._shortMonthsParse,s))?r:null}function ce(t,e,i){var a,r,n;if(this._monthsParseExact)return he.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),a=0;a<12;a++){if(r=p([2e3,a]),i&&!this._longMonthsParse[a]&&(this._longMonthsParse[a]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[a]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[a]||(n="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[a]=new RegExp(n.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[a].test(t))return a;if(i&&"MMM"===e&&this._shortMonthsParse[a].test(t))return a;if(!i&&this._monthsParse[a].test(t))return a}}function de(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=dt(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),ee(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function ue(t){return null!=t?(de(this,t),a.updateOffset(this,!0),this):ft(this,"Month")}function fe(){return ee(this.year(),this.month())}function pe(t){return this._monthsParseExact?(o(this,"_monthsRegex")||xe.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=ne),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function ge(t){return this._monthsParseExact?(o(this,"_monthsRegex")||xe.call(this),t?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=se),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function xe(){function t(t,e){return e.length-t.length}var e,i,a=[],r=[],n=[];for(e=0;e<12;e++)i=p([2e3,e]),a.push(this.monthsShort(i,"")),r.push(this.months(i,"")),n.push(this.months(i,"")),n.push(this.monthsShort(i,""));for(a.sort(t),r.sort(t),n.sort(t),e=0;e<12;e++)a[e]=Rt(a[e]),r[e]=Rt(r[e]);for(e=0;e<24;e++)n[e]=Rt(n[e]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+a.join("|")+")","i")}function me(t){return ht(t)?366:365}H("Y",0,0,(function(){var t=this.year();return t<=9999?z(t,4):"+"+t})),H(0,["YY",2],0,(function(){return this.year()%100})),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),at("year","y"),ot("year",1),Nt("Y",Dt),Nt("YY",kt,yt),Nt("YYYY",Tt,St),Nt("YYYYY",Pt,_t),Nt("YYYYYY",Pt,_t),Xt(["YYYYY","YYYYYY"],jt),Xt("YYYY",(function(t,e){e[jt]=2===t.length?a.parseTwoDigitYear(t):dt(t)})),Xt("YY",(function(t,e){e[jt]=a.parseTwoDigitYear(t)})),Xt("Y",(function(t,e){e[jt]=parseInt(t,10)})),a.parseTwoDigitYear=function(t){return dt(t)+(dt(t)>68?1900:2e3)};var ve=ut("FullYear",!0);function be(){return ht(this.year())}function ye(t,e,i,a,r,n,s){var o;return t<100&&t>=0?(o=new Date(t+400,e,i,a,r,n,s),isFinite(o.getFullYear())&&o.setFullYear(t)):o=new Date(t,e,i,a,r,n,s),o}function we(t){var e,i;return t<100&&t>=0?((i=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Se(t,e,i){var a=7+e-i;return-(7+we(t,0,a).getUTCDay()-e)%7+a-1}function _e(t,e,i,a,r){var n,s,o=1+7*(e-1)+(7+i-a)%7+Se(t,a,r);return o<=0?s=me(n=t-1)+o:o>me(t)?(n=t+1,s=o-me(t)):(n=t,s=o),{year:n,dayOfYear:s}}function ke(t,e,i){var a,r,n=Se(t.year(),e,i),s=Math.floor((t.dayOfYear()-n-1)/7)+1;return s<1?a=s+Ae(r=t.year()-1,e,i):s>Ae(t.year(),e,i)?(a=s-Ae(t.year(),e,i),r=t.year()+1):(r=t.year(),a=s),{week:a,year:r}}function Ae(t,e,i){var a=Se(t,e,i),r=Se(t+1,e,i);return(me(t)-a+r)/7}function Ce(t){return ke(t,this._week.dow,this._week.doy).week}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),at("week","w"),at("isoWeek","W"),ot("week",5),ot("isoWeek",5),Nt("w",kt),Nt("ww",kt,yt),Nt("W",kt),Nt("WW",kt,yt),Wt(["w","ww","W","WW"],(function(t,e,i,a){e[a.substr(0,1)]=dt(t)}));var Me={dow:0,doy:6};function Te(){return this._week.dow}function Pe(){return this._week.doy}function Le(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function De(t){var e=ke(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Ee(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function Oe(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Ie(t,e){return t.slice(e,7).concat(t.slice(0,e))}H("d",0,"do","day"),H("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),H("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),H("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),at("day","d"),at("weekday","e"),at("isoWeekday","E"),ot("day",11),ot("weekday",11),ot("isoWeekday",11),Nt("d",kt),Nt("e",kt),Nt("E",kt),Nt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),Nt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),Nt("dddd",(function(t,e){return e.weekdaysRegex(t)})),Wt(["dd","ddd","dddd"],(function(t,e,i,a){var r=i._locale.weekdaysParse(t,a,i._strict);null!=r?e.d=r:x(i).invalidWeekday=t})),Wt(["d","e","E"],(function(t,e,i,a){e[a]=dt(t)}));var ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ne="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ye="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Fe=zt,Re=zt,He=zt;function Xe(t,e){var i=n(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ie(i,this._week.dow):t?i[t.day()]:i}function We(t){return!0===t?Ie(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Ve(t){return!0===t?Ie(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Be(t,e,i){var a,r,n,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;a<7;++a)n=p([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(n,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(n,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(n,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(r=Bt.call(this._weekdaysParse,s))?r:null:"ddd"===e?-1!==(r=Bt.call(this._shortWeekdaysParse,s))?r:null:-1!==(r=Bt.call(this._minWeekdaysParse,s))?r:null:"dddd"===e?-1!==(r=Bt.call(this._weekdaysParse,s))||-1!==(r=Bt.call(this._shortWeekdaysParse,s))||-1!==(r=Bt.call(this._minWeekdaysParse,s))?r:null:"ddd"===e?-1!==(r=Bt.call(this._shortWeekdaysParse,s))||-1!==(r=Bt.call(this._weekdaysParse,s))||-1!==(r=Bt.call(this._minWeekdaysParse,s))?r:null:-1!==(r=Bt.call(this._minWeekdaysParse,s))||-1!==(r=Bt.call(this._weekdaysParse,s))||-1!==(r=Bt.call(this._shortWeekdaysParse,s))?r:null}function je(t,e,i){var a,r,n;if(this._weekdaysParseExact)return Be.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),a=0;a<7;a++){if(r=p([2e3,1]).day(a),i&&!this._fullWeekdaysParse[a]&&(this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[a]||(n="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[a]=new RegExp(n.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[a].test(t))return a;if(i&&"ddd"===e&&this._shortWeekdaysParse[a].test(t))return a;if(i&&"dd"===e&&this._minWeekdaysParse[a].test(t))return a;if(!i&&this._weekdaysParse[a].test(t))return a}}function Ge(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Ee(t,this.localeData()),this.add(t-e,"d")):e}function Ue(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function $e(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Oe(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Ze(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ke.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=Fe),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function qe(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ke.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Re),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Je(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ke.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=He),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ke(){function t(t,e){return e.length-t.length}var e,i,a,r,n,s=[],o=[],l=[],h=[];for(e=0;e<7;e++)i=p([2e3,1]).day(e),a=Rt(this.weekdaysMin(i,"")),r=Rt(this.weekdaysShort(i,"")),n=Rt(this.weekdays(i,"")),s.push(a),o.push(r),l.push(n),h.push(a),h.push(r),h.push(n);s.sort(t),o.sort(t),l.sort(t),h.sort(t),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Qe(){return this.hours()%12||12}function ti(){return this.hours()||24}function ei(t,e){H(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function ii(t,e){return e._meridiemParse}function ai(t){return"p"===(t+"").toLowerCase().charAt(0)}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Qe),H("k",["kk",2],0,ti),H("hmm",0,0,(function(){return""+Qe.apply(this)+z(this.minutes(),2)})),H("hmmss",0,0,(function(){return""+Qe.apply(this)+z(this.minutes(),2)+z(this.seconds(),2)})),H("Hmm",0,0,(function(){return""+this.hours()+z(this.minutes(),2)})),H("Hmmss",0,0,(function(){return""+this.hours()+z(this.minutes(),2)+z(this.seconds(),2)})),ei("a",!0),ei("A",!1),at("hour","h"),ot("hour",13),Nt("a",ii),Nt("A",ii),Nt("H",kt),Nt("h",kt),Nt("k",kt),Nt("HH",kt,yt),Nt("hh",kt,yt),Nt("kk",kt,yt),Nt("hmm",At),Nt("hmmss",Ct),Nt("Hmm",At),Nt("Hmmss",Ct),Xt(["H","HH"],$t),Xt(["k","kk"],(function(t,e,i){var a=dt(t);e[$t]=24===a?0:a})),Xt(["a","A"],(function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t})),Xt(["h","hh"],(function(t,e,i){e[$t]=dt(t),x(i).bigHour=!0})),Xt("hmm",(function(t,e,i){var a=t.length-2;e[$t]=dt(t.substr(0,a)),e[Zt]=dt(t.substr(a)),x(i).bigHour=!0})),Xt("hmmss",(function(t,e,i){var a=t.length-4,r=t.length-2;e[$t]=dt(t.substr(0,a)),e[Zt]=dt(t.substr(a,2)),e[qt]=dt(t.substr(r)),x(i).bigHour=!0})),Xt("Hmm",(function(t,e,i){var a=t.length-2;e[$t]=dt(t.substr(0,a)),e[Zt]=dt(t.substr(a))})),Xt("Hmmss",(function(t,e,i){var a=t.length-4,r=t.length-2;e[$t]=dt(t.substr(0,a)),e[Zt]=dt(t.substr(a,2)),e[qt]=dt(t.substr(r))}));var ri=/[ap]\.?m?\.?/i,ni=ut("Hours",!0);function si(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}var oi,li={calendar:O,longDateFormat:j,invalidDate:U,ordinal:Z,dayOfMonthOrdinalParse:q,relativeTime:K,months:ie,monthsShort:ae,week:Me,weekdays:ze,weekdaysMin:Ye,weekdaysShort:Ne,meridiemParse:ri},hi={},ci={};function di(t,e){var i,a=Math.min(t.length,e.length);for(i=0;i<a;i+=1)if(t[i]!==e[i])return i;return a}function ui(t){return t?t.toLowerCase().replace("_","-"):t}function fi(t){for(var e,i,a,r,n=0;n<t.length;){for(e=(r=ui(t[n]).split("-")).length,i=(i=ui(t[n+1]))?i.split("-"):null;e>0;){if(a=gi(r.slice(0,e).join("-")))return a;if(i&&i.length>=e&&di(r,i)>=e-1)break;e--}n++}return oi}function pi(t){return null!=t.match("^[^/\\\\]*$")}function gi(e){var i=null;if(void 0===hi[e]&&t&&t.exports&&pi(e))try{i=oi._abbr,vt("./locale/"+e),xi(i)}catch(it){hi[e]=null}return hi[e]}function xi(t,e){var i;return t&&((i=h(e)?bi(t):mi(t,e))?oi=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),oi._abbr}function mi(t,e){if(null!==e){var i,a=li;if(e.abbr=t,null!=hi[t])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),a=hi[t]._config;else if(null!=e.parentLocale)if(null!=hi[e.parentLocale])a=hi[e.parentLocale]._config;else{if(null==(i=gi(e.parentLocale)))return ci[e.parentLocale]||(ci[e.parentLocale]=[]),ci[e.parentLocale].push({name:t,config:e}),null;a=i._config}return hi[t]=new E(D(a,e)),ci[t]&&ci[t].forEach((function(t){mi(t.name,t.config)})),xi(t),hi[t]}return delete hi[t],null}function vi(t,e){if(null!=e){var i,a,r=li;null!=hi[t]&&null!=hi[t].parentLocale?hi[t].set(D(hi[t]._config,e)):(null!=(a=gi(t))&&(r=a._config),e=D(r,e),null==a&&(e.abbr=t),(i=new E(e)).parentLocale=hi[t],hi[t]=i),xi(t)}else null!=hi[t]&&(null!=hi[t].parentLocale?(hi[t]=hi[t].parentLocale,t===xi()&&xi(t)):null!=hi[t]&&delete hi[t]);return hi[t]}function bi(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return oi;if(!n(t)){if(e=gi(t))return e;t=[t]}return fi(t)}function yi(){return C(hi)}function wi(t){var e,i=t._a;return i&&-2===x(t).overflow&&(e=i[Gt]<0||i[Gt]>11?Gt:i[Ut]<1||i[Ut]>ee(i[jt],i[Gt])?Ut:i[$t]<0||i[$t]>24||24===i[$t]&&(0!==i[Zt]||0!==i[qt]||0!==i[Jt])?$t:i[Zt]<0||i[Zt]>59?Zt:i[qt]<0||i[qt]>59?qt:i[Jt]<0||i[Jt]>999?Jt:-1,x(t)._overflowDayOfYear&&(e<jt||e>Ut)&&(e=Ut),x(t)._overflowWeeks&&-1===e&&(e=Kt),x(t)._overflowWeekday&&-1===e&&(e=Qt),x(t).overflow=e),t}var Si=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_i=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ki=/Z|[+-]\d\d(?::?\d\d)?/,Ai=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ci=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mi=/^\/?Date\((-?\d+)/i,Ti=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Pi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Li(t){var e,i,a,r,n,s,o=t._i,l=Si.exec(o)||_i.exec(o),h=Ai.length,c=Ci.length;if(l){for(x(t).iso=!0,e=0,i=h;e<i;e++)if(Ai[e][1].exec(l[1])){r=Ai[e][0],a=!1!==Ai[e][2];break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,i=c;e<i;e++)if(Ci[e][1].exec(l[3])){n=(l[2]||" ")+Ci[e][0];break}if(null==n)return void(t._isValid=!1)}if(!a&&null!=n)return void(t._isValid=!1);if(l[4]){if(!ki.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=r+(n||"")+(s||""),Wi(t)}else t._isValid=!1}function Di(t,e,i,a,r,n){var s=[Ei(t),ae.indexOf(e),parseInt(i,10),parseInt(a,10),parseInt(r,10)];return n&&s.push(parseInt(n,10)),s}function Ei(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Oi(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Ii(t,e,i){return!t||Ne.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(x(i).weekdayMismatch=!0,i._isValid=!1,!1)}function zi(t,e,i){if(t)return Pi[t];if(e)return 0;var a=parseInt(i,10),r=a%100;return(a-r)/100*60+r}function Ni(t){var e,i=Ti.exec(Oi(t._i));if(i){if(e=Di(i[4],i[3],i[2],i[5],i[6],i[7]),!Ii(i[1],e,t))return;t._a=e,t._tzm=zi(i[8],i[9],i[10]),t._d=we.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),x(t).rfc2822=!0}else t._isValid=!1}function Yi(t){var e=Mi.exec(t._i);null===e?(Li(t),!1===t._isValid&&(delete t._isValid,Ni(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:a.createFromInputFallback(t)))):t._d=new Date(+e[1])}function Fi(t,e,i){return null!=t?t:null!=e?e:i}function Ri(t){var e=new Date(a.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Hi(t){var e,i,a,r,n,s=[];if(!t._d){for(a=Ri(t),t._w&&null==t._a[Ut]&&null==t._a[Gt]&&Xi(t),null!=t._dayOfYear&&(n=Fi(t._a[jt],a[jt]),(t._dayOfYear>me(n)||0===t._dayOfYear)&&(x(t)._overflowDayOfYear=!0),i=we(n,0,t._dayOfYear),t._a[Gt]=i.getUTCMonth(),t._a[Ut]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=a[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[$t]&&0===t._a[Zt]&&0===t._a[qt]&&0===t._a[Jt]&&(t._nextDay=!0,t._a[$t]=0),t._d=(t._useUTC?we:ye).apply(null,s),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[$t]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(x(t).weekdayMismatch=!0)}}function Xi(t){var e,i,a,r,n,s,o,l,h;null!=(e=t._w).GG||null!=e.W||null!=e.E?(n=1,s=4,i=Fi(e.GG,t._a[jt],ke(qi(),1,4).year),a=Fi(e.W,1),((r=Fi(e.E,1))<1||r>7)&&(l=!0)):(n=t._locale._week.dow,s=t._locale._week.doy,h=ke(qi(),n,s),i=Fi(e.gg,t._a[jt],h.year),a=Fi(e.w,h.week),null!=e.d?((r=e.d)<0||r>6)&&(l=!0):null!=e.e?(r=e.e+n,(e.e<0||e.e>6)&&(l=!0)):r=n),a<1||a>Ae(i,n,s)?x(t)._overflowWeeks=!0:null!=l?x(t)._overflowWeekday=!0:(o=_e(i,a,r,n,s),t._a[jt]=o.year,t._dayOfYear=o.dayOfYear)}function Wi(t){if(t._f!==a.ISO_8601)if(t._f!==a.RFC_2822){t._a=[],x(t).empty=!0;var e,i,r,n,s,o,l,h=""+t._i,c=h.length,d=0;for(l=(r=B(t._f,t._locale).match(N)||[]).length,e=0;e<l;e++)n=r[e],(i=(h.match(Yt(n,t))||[])[0])&&((s=h.substr(0,h.indexOf(i))).length>0&&x(t).unusedInput.push(s),h=h.slice(h.indexOf(i)+i.length),d+=i.length),R[n]?(i?x(t).empty=!1:x(t).unusedTokens.push(n),Vt(n,i,t)):t._strict&&!i&&x(t).unusedTokens.push(n);x(t).charsLeftOver=c-d,h.length>0&&x(t).unusedInput.push(h),t._a[$t]<=12&&!0===x(t).bigHour&&t._a[$t]>0&&(x(t).bigHour=void 0),x(t).parsedDateParts=t._a.slice(0),x(t).meridiem=t._meridiem,t._a[$t]=Vi(t._locale,t._a[$t],t._meridiem),null!==(o=x(t).era)&&(t._a[jt]=t._locale.erasConvertYear(o,t._a[jt])),Hi(t),wi(t)}else Ni(t);else Li(t)}function Vi(t,e,i){var a;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((a=t.isPM(i))&&e<12&&(e+=12),a||12!==e||(e=0),e):e}function Bi(t){var e,i,a,r,n,s,o=!1,l=t._f.length;if(0===l)return x(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;r<l;r++)n=0,s=!1,e=w({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],Wi(e),m(e)&&(s=!0),n+=x(e).charsLeftOver,n+=10*x(e).unusedTokens.length,x(e).score=n,o?n<a&&(a=n,i=e):(null==a||n<a||s)&&(a=n,i=e,s&&(o=!0));f(t,i||e)}function ji(t){if(!t._d){var e=nt(t._i),i=void 0===e.day?e.date:e.day;t._a=u([e.year,e.month,i,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),Hi(t)}}function Gi(t){var e=new S(wi(Ui(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Ui(t){var e=t._i,i=t._f;return t._locale=t._locale||bi(t._l),null===e||void 0===i&&""===e?v({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),_(e)?new S(wi(e)):(d(e)?t._d=e:n(i)?Bi(t):i?Wi(t):$i(t),m(t)||(t._d=null),t))}function $i(t){var e=t._i;h(e)?t._d=new Date(a.now()):d(e)?t._d=new Date(e.valueOf()):"string"==typeof e?Yi(t):n(e)?(t._a=u(e.slice(0),(function(t){return parseInt(t,10)})),Hi(t)):s(e)?ji(t):c(e)?t._d=new Date(e):a.createFromInputFallback(t)}function Zi(t,e,i,a,r){var o={};return!0!==e&&!1!==e||(a=e,e=void 0),!0!==i&&!1!==i||(a=i,i=void 0),(s(t)&&l(t)||n(t)&&0===t.length)&&(t=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=r,o._l=i,o._i=t,o._f=e,o._strict=a,Gi(o)}function qi(t,e,i,a){return Zi(t,e,i,a,!1)}a.createFromInputFallback=A("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),a.ISO_8601=function(){},a.RFC_2822=function(){};var Ji=A("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=qi.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:v()})),Ki=A("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=qi.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:v()}));function Qi(t,e){var i,a;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return qi();for(i=e[0],a=1;a<e.length;++a)e[a].isValid()&&!e[a][t](i)||(i=e[a]);return i}function ta(){return Qi("isBefore",[].slice.call(arguments,0))}function ea(){return Qi("isAfter",[].slice.call(arguments,0))}var ia=function(){return Date.now?Date.now():+new Date},aa=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ra(t){var e,i,a=!1,r=aa.length;for(e in t)if(o(t,e)&&(-1===Bt.call(aa,e)||null!=t[e]&&isNaN(t[e])))return!1;for(i=0;i<r;++i)if(t[aa[i]]){if(a)return!1;parseFloat(t[aa[i]])!==dt(t[aa[i]])&&(a=!0)}return!0}function na(){return this._isValid}function sa(){return Pa(NaN)}function oa(t){var e=nt(t),i=e.year||0,a=e.quarter||0,r=e.month||0,n=e.week||e.isoWeek||0,s=e.day||0,o=e.hour||0,l=e.minute||0,h=e.second||0,c=e.millisecond||0;this._isValid=ra(e),this._milliseconds=+c+1e3*h+6e4*l+1e3*o*60*60,this._days=+s+7*n,this._months=+r+3*a+12*i,this._data={},this._locale=bi(),this._bubble()}function la(t){return t instanceof oa}function ha(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function ca(t,e,i){var a,r=Math.min(t.length,e.length),n=Math.abs(t.length-e.length),s=0;for(a=0;a<r;a++)(i&&t[a]!==e[a]||!i&&dt(t[a])!==dt(e[a]))&&s++;return s+n}function da(t,e){H(t,0,0,(function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+z(~~(t/60),2)+e+z(~~t%60,2)}))}da("Z",":"),da("ZZ",""),Nt("Z",Ot),Nt("ZZ",Ot),Xt(["Z","ZZ"],(function(t,e,i){i._useUTC=!0,i._tzm=fa(Ot,t)}));var ua=/([\+\-]|\d\d)/gi;function fa(t,e){var i,a,r=(e||"").match(t);return null===r?null:0===(a=60*(i=((r[r.length-1]||[])+"").match(ua)||["-",0,0])[1]+dt(i[2]))?0:"+"===i[0]?a:-a}function pa(t,e){var i,r;return e._isUTC?(i=e.clone(),r=(_(t)||d(t)?t.valueOf():qi(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+r),a.updateOffset(i,!1),i):qi(t).local()}function ga(t){return-Math.round(t._d.getTimezoneOffset())}function xa(t,e,i){var r,n=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=fa(Ot,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(r=ga(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),n!==t&&(!e||this._changeInProgress?Ia(this,Pa(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?n:ga(this)}function ma(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function va(t){return this.utcOffset(0,t)}function ba(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(ga(this),"m")),this}function ya(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=fa(Et,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function wa(t){return!!this.isValid()&&(t=t?qi(t).utcOffset():0,(this.utcOffset()-t)%60==0)}function Sa(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _a(){if(!h(this._isDSTShifted))return this._isDSTShifted;var t,e={};return w(e,this),(e=Ui(e))._a?(t=e._isUTC?p(e._a):qi(e._a),this._isDSTShifted=this.isValid()&&ca(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ka(){return!!this.isValid()&&!this._isUTC}function Aa(){return!!this.isValid()&&this._isUTC}function Ca(){return!!this.isValid()&&this._isUTC&&0===this._offset}a.updateOffset=function(){};var Ma=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ta=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Pa(t,e){var i,a,r,n=t,s=null;return la(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:c(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(s=Ma.exec(t))?(i="-"===s[1]?-1:1,n={y:0,d:dt(s[Ut])*i,h:dt(s[$t])*i,m:dt(s[Zt])*i,s:dt(s[qt])*i,ms:dt(ha(1e3*s[Jt]))*i}):(s=Ta.exec(t))?(i="-"===s[1]?-1:1,n={y:La(s[2],i),M:La(s[3],i),w:La(s[4],i),d:La(s[5],i),h:La(s[6],i),m:La(s[7],i),s:La(s[8],i)}):null==n?n={}:"object"==typeof n&&("from"in n||"to"in n)&&(r=Ea(qi(n.from),qi(n.to)),(n={}).ms=r.milliseconds,n.M=r.months),a=new oa(n),la(t)&&o(t,"_locale")&&(a._locale=t._locale),la(t)&&o(t,"_isValid")&&(a._isValid=t._isValid),a}function La(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Da(t,e){var i={};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Ea(t,e){var i;return t.isValid()&&e.isValid()?(e=pa(e,t),t.isBefore(e)?i=Da(t,e):((i=Da(e,t)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Oa(t,e){return function(i,a){var r;return null===a||isNaN(+a)||(T(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=i,i=a,a=r),Ia(this,Pa(i,a),t),this}}function Ia(t,e,i,r){var n=e._milliseconds,s=ha(e._days),o=ha(e._months);t.isValid()&&(r=null==r||r,o&&de(t,ft(t,"Month")+o*i),s&&pt(t,"Date",ft(t,"Date")+s*i),n&&t._d.setTime(t._d.valueOf()+n*i),r&&a.updateOffset(t,s||o))}Pa.fn=oa.prototype,Pa.invalid=sa;var za=Oa(1,"add"),Na=Oa(-1,"subtract");function Ya(t){return"string"==typeof t||t instanceof String}function Fa(t){return _(t)||d(t)||Ya(t)||c(t)||Ha(t)||Ra(t)||null==t}function Ra(t){var e,i,a=s(t)&&!l(t),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],h=n.length;for(e=0;e<h;e+=1)i=n[e],r=r||o(t,i);return a&&r}function Ha(t){var e=n(t),i=!1;return e&&(i=0===t.filter((function(e){return!c(e)&&Ya(t)})).length),e&&i}function Xa(t){var e,i,a=s(t)&&!l(t),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<n.length;e+=1)i=n[e],r=r||o(t,i);return a&&r}function Wa(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Va(t,e){1===arguments.length&&(arguments[0]?Fa(arguments[0])?(t=arguments[0],e=void 0):Xa(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var i=t||qi(),r=pa(i,this).startOf("day"),n=a.calendarFormat(this,r)||"sameElse",s=e&&(P(e[n])?e[n].call(this,i):e[n]);return this.format(s||this.localeData().calendar(n,this,qi(i)))}function Ba(){return new S(this)}function ja(t,e){var i=_(t)?t:qi(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=rt(e)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())}function Ga(t,e){var i=_(t)?t:qi(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=rt(e)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())}function Ua(t,e,i,a){var r=_(t)?t:qi(t),n=_(e)?e:qi(e);return!!(this.isValid()&&r.isValid()&&n.isValid())&&("("===(a=a||"()")[0]?this.isAfter(r,i):!this.isBefore(r,i))&&(")"===a[1]?this.isBefore(n,i):!this.isAfter(n,i))}function $a(t,e){var i,a=_(t)?t:qi(t);return!(!this.isValid()||!a.isValid())&&("millisecond"===(e=rt(e)||"millisecond")?this.valueOf()===a.valueOf():(i=a.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))}function Za(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function qa(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Ja(t,e,i){var a,r,n;if(!this.isValid())return NaN;if(!(a=pa(t,this)).isValid())return NaN;switch(r=6e4*(a.utcOffset()-this.utcOffset()),e=rt(e)){case"year":n=Ka(this,a)/12;break;case"month":n=Ka(this,a);break;case"quarter":n=Ka(this,a)/3;break;case"second":n=(this-a)/1e3;break;case"minute":n=(this-a)/6e4;break;case"hour":n=(this-a)/36e5;break;case"day":n=(this-a-r)/864e5;break;case"week":n=(this-a-r)/6048e5;break;default:n=this-a}return i?n:ct(n)}function Ka(t,e){if(t.date()<e.date())return-Ka(e,t);var i=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(i,"months");return-(i+(e-a<0?(e-a)/(a-t.clone().add(i-1,"months")):(e-a)/(t.clone().add(i+1,"months")-a)))||0}function Qa(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function tr(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?V(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):P(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(i,"Z")):V(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function er(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,i,a,r="moment",n="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",n="Z"),t="["+r+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=n+'[")]',this.format(t+e+i+a)}function ir(t){t||(t=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var e=V(this,t);return this.localeData().postformat(e)}function ar(t,e){return this.isValid()&&(_(t)&&t.isValid()||qi(t).isValid())?Pa({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function rr(t){return this.from(qi(),t)}function nr(t,e){return this.isValid()&&(_(t)&&t.isValid()||qi(t).isValid())?Pa({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function sr(t){return this.to(qi(),t)}function or(t){var e;return void 0===t?this._locale._abbr:(null!=(e=bi(t))&&(this._locale=e),this)}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lr=A("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function hr(){return this._locale}var cr=1e3,dr=60*cr,ur=60*dr,fr=3506328*ur;function pr(t,e){return(t%e+e)%e}function gr(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-fr:new Date(t,e,i).valueOf()}function xr(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-fr:Date.UTC(t,e,i)}function mr(t){var e,i;if(void 0===(t=rt(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?xr:gr,t){case"year":e=i(this.year(),0,1);break;case"quarter":e=i(this.year(),this.month()-this.month()%3,1);break;case"month":e=i(this.year(),this.month(),1);break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=i(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=pr(e+(this._isUTC?0:this.utcOffset()*dr),ur);break;case"minute":e=this._d.valueOf(),e-=pr(e,dr);break;case"second":e=this._d.valueOf(),e-=pr(e,cr)}return this._d.setTime(e),a.updateOffset(this,!0),this}function vr(t){var e,i;if(void 0===(t=rt(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?xr:gr,t){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=ur-pr(e+(this._isUTC?0:this.utcOffset()*dr),ur)-1;break;case"minute":e=this._d.valueOf(),e+=dr-pr(e,dr)-1;break;case"second":e=this._d.valueOf(),e+=cr-pr(e,cr)-1}return this._d.setTime(e),a.updateOffset(this,!0),this}function br(){return this._d.valueOf()-6e4*(this._offset||0)}function yr(){return Math.floor(this.valueOf()/1e3)}function wr(){return new Date(this.valueOf())}function Sr(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function _r(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function kr(){return this.isValid()?this.toISOString():null}function Ar(){return m(this)}function Cr(){return f({},x(this))}function Mr(){return x(this).overflow}function Tr(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Pr(t,e){var i,r,n,s=this._eras||bi("en")._eras;for(i=0,r=s.length;i<r;++i)switch("string"==typeof s[i].since&&(n=a(s[i].since).startOf("day"),s[i].since=n.valueOf()),typeof s[i].until){case"undefined":s[i].until=1/0;break;case"string":n=a(s[i].until).startOf("day").valueOf(),s[i].until=n.valueOf()}return s}function Lr(t,e,i){var a,r,n,s,o,l=this.eras();for(t=t.toUpperCase(),a=0,r=l.length;a<r;++a)if(n=l[a].name.toUpperCase(),s=l[a].abbr.toUpperCase(),o=l[a].narrow.toUpperCase(),i)switch(e){case"N":case"NN":case"NNN":if(s===t)return l[a];break;case"NNNN":if(n===t)return l[a];break;case"NNNNN":if(o===t)return l[a]}else if([n,s,o].indexOf(t)>=0)return l[a]}function Dr(t,e){var i=t.since<=t.until?1:-1;return void 0===e?a(t.since).year():a(t.since).year()+(e-t.offset)*i}function Er(){var t,e,i,a=this.localeData().eras();for(t=0,e=a.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),a[t].since<=i&&i<=a[t].until)return a[t].name;if(a[t].until<=i&&i<=a[t].since)return a[t].name}return""}function Or(){var t,e,i,a=this.localeData().eras();for(t=0,e=a.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),a[t].since<=i&&i<=a[t].until)return a[t].narrow;if(a[t].until<=i&&i<=a[t].since)return a[t].narrow}return""}function Ir(){var t,e,i,a=this.localeData().eras();for(t=0,e=a.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),a[t].since<=i&&i<=a[t].until)return a[t].abbr;if(a[t].until<=i&&i<=a[t].since)return a[t].abbr}return""}function zr(){var t,e,i,r,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t)if(i=n[t].since<=n[t].until?1:-1,r=this.clone().startOf("day").valueOf(),n[t].since<=r&&r<=n[t].until||n[t].until<=r&&r<=n[t].since)return(this.year()-a(n[t].since).year())*i+n[t].offset;return this.year()}function Nr(t){return o(this,"_erasNameRegex")||Vr.call(this),t?this._erasNameRegex:this._erasRegex}function Yr(t){return o(this,"_erasAbbrRegex")||Vr.call(this),t?this._erasAbbrRegex:this._erasRegex}function Fr(t){return o(this,"_erasNarrowRegex")||Vr.call(this),t?this._erasNarrowRegex:this._erasRegex}function Rr(t,e){return e.erasAbbrRegex(t)}function Hr(t,e){return e.erasNameRegex(t)}function Xr(t,e){return e.erasNarrowRegex(t)}function Wr(t,e){return e._eraYearOrdinalRegex||Lt}function Vr(){var t,e,i=[],a=[],r=[],n=[],s=this.eras();for(t=0,e=s.length;t<e;++t)a.push(Rt(s[t].name)),i.push(Rt(s[t].abbr)),r.push(Rt(s[t].narrow)),n.push(Rt(s[t].name)),n.push(Rt(s[t].abbr)),n.push(Rt(s[t].narrow));this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function Br(t,e){H(0,[t,t.length],0,e)}function jr(t){return Jr.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Gr(t){return Jr.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Ur(){return Ae(this.year(),1,4)}function $r(){return Ae(this.isoWeekYear(),1,4)}function Zr(){var t=this.localeData()._week;return Ae(this.year(),t.dow,t.doy)}function qr(){var t=this.localeData()._week;return Ae(this.weekYear(),t.dow,t.doy)}function Jr(t,e,i,a,r){var n;return null==t?ke(this,a,r).year:(e>(n=Ae(t,a,r))&&(e=n),Kr.call(this,t,e,i,a,r))}function Kr(t,e,i,a,r){var n=_e(t,e,i,a,r),s=we(n.year,0,n.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Qr(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),Nt("N",Rr),Nt("NN",Rr),Nt("NNN",Rr),Nt("NNNN",Hr),Nt("NNNNN",Xr),Xt(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,i,a){var r=i._locale.erasParse(t,a,i._strict);r?x(i).era=r:x(i).invalidEra=t})),Nt("y",Lt),Nt("yy",Lt),Nt("yyy",Lt),Nt("yyyy",Lt),Nt("yo",Wr),Xt(["y","yy","yyy","yyyy"],jt),Xt(["yo"],(function(t,e,i,a){var r;i._locale._eraYearOrdinalRegex&&(r=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?e[jt]=i._locale.eraYearOrdinalParse(t,r):e[jt]=parseInt(t,10)})),H(0,["gg",2],0,(function(){return this.weekYear()%100})),H(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Br("gggg","weekYear"),Br("ggggg","weekYear"),Br("GGGG","isoWeekYear"),Br("GGGGG","isoWeekYear"),at("weekYear","gg"),at("isoWeekYear","GG"),ot("weekYear",1),ot("isoWeekYear",1),Nt("G",Dt),Nt("g",Dt),Nt("GG",kt,yt),Nt("gg",kt,yt),Nt("GGGG",Tt,St),Nt("gggg",Tt,St),Nt("GGGGG",Pt,_t),Nt("ggggg",Pt,_t),Wt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,i,a){e[a.substr(0,2)]=dt(t)})),Wt(["gg","GG"],(function(t,e,i,r){e[r]=a.parseTwoDigitYear(t)})),H("Q",0,"Qo","quarter"),at("quarter","Q"),ot("quarter",7),Nt("Q",bt),Xt("Q",(function(t,e){e[Gt]=3*(dt(t)-1)})),H("D",["DD",2],"Do","date"),at("date","D"),ot("date",9),Nt("D",kt),Nt("DD",kt,yt),Nt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),Xt(["D","DD"],Ut),Xt("Do",(function(t,e){e[Ut]=dt(t.match(kt)[0])}));var tn=ut("Date",!0);function en(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}H("DDD",["DDDD",3],"DDDo","dayOfYear"),at("dayOfYear","DDD"),ot("dayOfYear",4),Nt("DDD",Mt),Nt("DDDD",wt),Xt(["DDD","DDDD"],(function(t,e,i){i._dayOfYear=dt(t)})),H("m",["mm",2],0,"minute"),at("minute","m"),ot("minute",14),Nt("m",kt),Nt("mm",kt,yt),Xt(["m","mm"],Zt);var an=ut("Minutes",!1);H("s",["ss",2],0,"second"),at("second","s"),ot("second",15),Nt("s",kt),Nt("ss",kt,yt),Xt(["s","ss"],qt);var rn,nn,sn=ut("Seconds",!1);for(H("S",0,0,(function(){return~~(this.millisecond()/100)})),H(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),H(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),H(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),H(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),H(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),H(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),at("millisecond","ms"),ot("millisecond",16),Nt("S",Mt,bt),Nt("SS",Mt,yt),Nt("SSS",Mt,wt),rn="SSSS";rn.length<=9;rn+="S")Nt(rn,Lt);function on(t,e){e[Jt]=dt(1e3*("0."+t))}for(rn="S";rn.length<=9;rn+="S")Xt(rn,on);function ln(){return this._isUTC?"UTC":""}function hn(){return this._isUTC?"Coordinated Universal Time":""}nn=ut("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var cn=S.prototype;function dn(t){return qi(1e3*t)}function un(){return qi.apply(null,arguments).parseZone()}function fn(t){return t}cn.add=za,cn.calendar=Va,cn.clone=Ba,cn.diff=Ja,cn.endOf=vr,cn.format=ir,cn.from=ar,cn.fromNow=rr,cn.to=nr,cn.toNow=sr,cn.get=gt,cn.invalidAt=Mr,cn.isAfter=ja,cn.isBefore=Ga,cn.isBetween=Ua,cn.isSame=$a,cn.isSameOrAfter=Za,cn.isSameOrBefore=qa,cn.isValid=Ar,cn.lang=lr,cn.locale=or,cn.localeData=hr,cn.max=Ki,cn.min=Ji,cn.parsingFlags=Cr,cn.set=xt,cn.startOf=mr,cn.subtract=Na,cn.toArray=Sr,cn.toObject=_r,cn.toDate=wr,cn.toISOString=tr,cn.inspect=er,"undefined"!=typeof Symbol&&null!=Symbol.for&&(cn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),cn.toJSON=kr,cn.toString=Qa,cn.unix=yr,cn.valueOf=br,cn.creationData=Tr,cn.eraName=Er,cn.eraNarrow=Or,cn.eraAbbr=Ir,cn.eraYear=zr,cn.year=ve,cn.isLeapYear=be,cn.weekYear=jr,cn.isoWeekYear=Gr,cn.quarter=cn.quarters=Qr,cn.month=ue,cn.daysInMonth=fe,cn.week=cn.weeks=Le,cn.isoWeek=cn.isoWeeks=De,cn.weeksInYear=Zr,cn.weeksInWeekYear=qr,cn.isoWeeksInYear=Ur,cn.isoWeeksInISOWeekYear=$r,cn.date=tn,cn.day=cn.days=Ge,cn.weekday=Ue,cn.isoWeekday=$e,cn.dayOfYear=en,cn.hour=cn.hours=ni,cn.minute=cn.minutes=an,cn.second=cn.seconds=sn,cn.millisecond=cn.milliseconds=nn,cn.utcOffset=xa,cn.utc=va,cn.local=ba,cn.parseZone=ya,cn.hasAlignedHourOffset=wa,cn.isDST=Sa,cn.isLocal=ka,cn.isUtcOffset=Aa,cn.isUtc=Ca,cn.isUTC=Ca,cn.zoneAbbr=ln,cn.zoneName=hn,cn.dates=A("dates accessor is deprecated. Use date instead.",tn),cn.months=A("months accessor is deprecated. Use month instead",ue),cn.years=A("years accessor is deprecated. Use year instead",ve),cn.zone=A("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",ma),cn.isDSTShifted=A("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_a);var pn=E.prototype;function gn(t,e,i,a){var r=bi(),n=p().set(a,e);return r[i](n,t)}function xn(t,e,i){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return gn(t,e,i,"month");var a,r=[];for(a=0;a<12;a++)r[a]=gn(t,a,i,"month");return r}function mn(t,e,i,a){"boolean"==typeof t?(c(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,c(e)&&(i=e,e=void 0),e=e||"");var r,n=bi(),s=t?n._week.dow:0,o=[];if(null!=i)return gn(e,(i+s)%7,a,"day");for(r=0;r<7;r++)o[r]=gn(e,(r+s)%7,a,"day");return o}function vn(t,e){return xn(t,e,"months")}function bn(t,e){return xn(t,e,"monthsShort")}function yn(t,e,i){return mn(t,e,i,"weekdays")}function wn(t,e,i){return mn(t,e,i,"weekdaysShort")}function Sn(t,e,i){return mn(t,e,i,"weekdaysMin")}pn.calendar=I,pn.longDateFormat=G,pn.invalidDate=$,pn.ordinal=J,pn.preparse=fn,pn.postformat=fn,pn.relativeTime=Q,pn.pastFuture=tt,pn.set=L,pn.eras=Pr,pn.erasParse=Lr,pn.erasConvertYear=Dr,pn.erasAbbrRegex=Yr,pn.erasNameRegex=Nr,pn.erasNarrowRegex=Fr,pn.months=oe,pn.monthsShort=le,pn.monthsParse=ce,pn.monthsRegex=ge,pn.monthsShortRegex=pe,pn.week=Ce,pn.firstDayOfYear=Pe,pn.firstDayOfWeek=Te,pn.weekdays=Xe,pn.weekdaysMin=Ve,pn.weekdaysShort=We,pn.weekdaysParse=je,pn.weekdaysRegex=Ze,pn.weekdaysShortRegex=qe,pn.weekdaysMinRegex=Je,pn.isPM=ai,pn.meridiem=si,xi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===dt(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),a.lang=A("moment.lang is deprecated. Use moment.locale instead.",xi),a.langData=A("moment.langData is deprecated. Use moment.localeData instead.",bi);var _n=Math.abs;function kn(){var t=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),t.milliseconds=_n(t.milliseconds),t.seconds=_n(t.seconds),t.minutes=_n(t.minutes),t.hours=_n(t.hours),t.months=_n(t.months),t.years=_n(t.years),this}function An(t,e,i,a){var r=Pa(e,i);return t._milliseconds+=a*r._milliseconds,t._days+=a*r._days,t._months+=a*r._months,t._bubble()}function Cn(t,e){return An(this,t,e,1)}function Mn(t,e){return An(this,t,e,-1)}function Tn(t){return t<0?Math.floor(t):Math.ceil(t)}function Pn(){var t,e,i,a,r,n=this._milliseconds,s=this._days,o=this._months,l=this._data;return n>=0&&s>=0&&o>=0||n<=0&&s<=0&&o<=0||(n+=864e5*Tn(Dn(o)+s),s=0,o=0),l.milliseconds=n%1e3,t=ct(n/1e3),l.seconds=t%60,e=ct(t/60),l.minutes=e%60,i=ct(e/60),l.hours=i%24,s+=ct(i/24),o+=r=ct(Ln(s)),s-=Tn(Dn(r)),a=ct(o/12),o%=12,l.days=s,l.months=o,l.years=a,this}function Ln(t){return 4800*t/146097}function Dn(t){return 146097*t/4800}function En(t){if(!this.isValid())return NaN;var e,i,a=this._milliseconds;if("month"===(t=rt(t))||"quarter"===t||"year"===t)switch(e=this._days+a/864e5,i=this._months+Ln(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(Dn(this._months)),t){case"week":return e/7+a/6048e5;case"day":return e+a/864e5;case"hour":return 24*e+a/36e5;case"minute":return 1440*e+a/6e4;case"second":return 86400*e+a/1e3;case"millisecond":return Math.floor(864e5*e)+a;default:throw new Error("Unknown unit "+t)}}function On(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*dt(this._months/12):NaN}function In(t){return function(){return this.as(t)}}var zn=In("ms"),Nn=In("s"),Yn=In("m"),Fn=In("h"),Rn=In("d"),Hn=In("w"),Xn=In("M"),Wn=In("Q"),Vn=In("y");function Bn(){return Pa(this)}function jn(t){return t=rt(t),this.isValid()?this[t+"s"]():NaN}function Gn(t){return function(){return this.isValid()?this._data[t]:NaN}}var Un=Gn("milliseconds"),$n=Gn("seconds"),Zn=Gn("minutes"),qn=Gn("hours"),Jn=Gn("days"),Kn=Gn("months"),Qn=Gn("years");function ts(){return ct(this.days()/7)}var es=Math.round,is={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function as(t,e,i,a,r){return r.relativeTime(e||1,!!i,t,a)}function rs(t,e,i,a){var r=Pa(t).abs(),n=es(r.as("s")),s=es(r.as("m")),o=es(r.as("h")),l=es(r.as("d")),h=es(r.as("M")),c=es(r.as("w")),d=es(r.as("y")),u=n<=i.ss&&["s",n]||n<i.s&&["ss",n]||s<=1&&["m"]||s<i.m&&["mm",s]||o<=1&&["h"]||o<i.h&&["hh",o]||l<=1&&["d"]||l<i.d&&["dd",l];return null!=i.w&&(u=u||c<=1&&["w"]||c<i.w&&["ww",c]),(u=u||h<=1&&["M"]||h<i.M&&["MM",h]||d<=1&&["y"]||["yy",d])[2]=e,u[3]=+t>0,u[4]=a,as.apply(null,u)}function ns(t){return void 0===t?es:"function"==typeof t&&(es=t,!0)}function ss(t,e){return void 0!==is[t]&&(void 0===e?is[t]:(is[t]=e,"s"===t&&(is.ss=e-1),!0))}function os(t,e){if(!this.isValid())return this.localeData().invalidDate();var i,a,r=!1,n=is;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(r=t),"object"==typeof e&&(n=Object.assign({},is,e),null!=e.s&&null==e.ss&&(n.ss=e.s-1)),a=rs(this,!r,n,i=this.localeData()),r&&(a=i.pastFuture(+this,a)),i.postformat(a)}var ls=Math.abs;function hs(t){return(t>0)-(t<0)||+t}function cs(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,a,r,n,s,o,l=ls(this._milliseconds)/1e3,h=ls(this._days),c=ls(this._months),d=this.asSeconds();return d?(t=ct(l/60),e=ct(t/60),l%=60,t%=60,i=ct(c/12),c%=12,a=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=d<0?"-":"",n=hs(this._months)!==hs(d)?"-":"",s=hs(this._days)!==hs(d)?"-":"",o=hs(this._milliseconds)!==hs(d)?"-":"",r+"P"+(i?n+i+"Y":"")+(c?n+c+"M":"")+(h?s+h+"D":"")+(e||t||l?"T":"")+(e?o+e+"H":"")+(t?o+t+"M":"")+(l?o+a+"S":"")):"P0D"}var ds=oa.prototype;return ds.isValid=na,ds.abs=kn,ds.add=Cn,ds.subtract=Mn,ds.as=En,ds.asMilliseconds=zn,ds.asSeconds=Nn,ds.asMinutes=Yn,ds.asHours=Fn,ds.asDays=Rn,ds.asWeeks=Hn,ds.asMonths=Xn,ds.asQuarters=Wn,ds.asYears=Vn,ds.valueOf=On,ds._bubble=Pn,ds.clone=Bn,ds.get=jn,ds.milliseconds=Un,ds.seconds=$n,ds.minutes=Zn,ds.hours=qn,ds.days=Jn,ds.weeks=ts,ds.months=Kn,ds.years=Qn,ds.humanize=os,ds.toISOString=cs,ds.toString=cs,ds.toJSON=cs,ds.locale=or,ds.localeData=hr,ds.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",cs),ds.lang=lr,H("X",0,0,"unix"),H("x",0,0,"valueOf"),Nt("x",Dt),Nt("X",It),Xt("X",(function(t,e,i){i._d=new Date(1e3*parseFloat(t))})),Xt("x",(function(t,e,i){i._d=new Date(dt(t))})),a.version="2.29.2",r(qi),a.fn=cn,a.min=ta,a.max=ea,a.now=ia,a.utc=p,a.unix=dn,a.months=vn,a.isDate=d,a.locale=xi,a.invalid=v,a.duration=Pa,a.isMoment=_,a.weekdays=yn,a.parseZone=un,a.localeData=bi,a.isDuration=la,a.monthsShort=bn,a.weekdaysMin=Sn,a.defineLocale=mi,a.updateLocale=vi,a.locales=yi,a.weekdaysShort=wn,a.normalizeUnits=rt,a.relativeTimeRounding=ns,a.relativeTimeThreshold=ss,a.calendarFormat=Wa,a.prototype=cn,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},a}()}($t);var Zt=$t.exports,qt={exports:{}};qt.exports=function(t){return function(t){function e(a){if(i[a])return i[a].exports;var r=i[a]={i:a,l:!1,exports:{}};return t[a].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,a){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([function(t,e,i){var a=i(5)();t.exports=function(t){return t!==a&&null!==t}},function(t,e,i){t.exports=i(18)()?Symbol:i(20)},function(e,i){e.exports=t},function(t,e,i){function a(t){return t&&t.__esModule?t:{default:t}}function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t){return t.range=function(e,i){var a=this;return"string"==typeof e&&f.hasOwnProperty(e)?new p(t(a).startOf(e),t(a).endOf(e)):new p(e,i)},t.rangeFromInterval=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t();if(t.isMoment(a)||(a=t(a)),!a.isValid())throw new Error("Invalid date.");var r=a.clone().add(i,e),n=[];return n.push(t.min(a,r)),n.push(t.max(a,r)),new p(n)},t.rangeFromISOString=function(e){var i=o(e),a=t.parseZone(i[0]),r=t.parseZone(i[1]);return new p(a,r)},t.parseZoneRange=t.rangeFromISOString,t.fn.range=t.range,t.range.constructor=p,t.isRange=function(t){return t instanceof p},t.fn.within=function(t){return t.contains(this.toDate())},t}function o(t){return t.split("/")}Object.defineProperty(e,"__esModule",{value:!0}),e.DateRange=void 0;var l=function(){function t(t,e){var i=[],a=!0,r=!1,n=void 0;try{for(var s,o=t[Symbol.iterator]();!(a=(s=o.next()).done)&&(i.push(s.value),!e||i.length!==e);a=!0);}catch(t){r=!0,n=t}finally{try{!a&&o.return&&o.return()}finally{if(r)throw n}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=function(){function t(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(e,i,a){return i&&t(e.prototype,i),a&&t(e,a),e}}();e.extendMoment=s;var d=a(i(2)),u=a(i(1)),f={year:!0,quarter:!0,month:!0,week:!0,day:!0,hour:!0,minute:!0,second:!0},p=e.DateRange=function(){function t(e,i){n(this,t);var a=e,r=i;if(1===arguments.length||void 0===i)if("object"===(void 0===e?"undefined":h(e))&&2===e.length){var s=l(e,2);a=s[0],r=s[1]}else if("string"==typeof e){var c=o(e),u=l(c,2);a=u[0],r=u[1]}this.start=a||0===a?(0,d.default)(a):(0,d.default)(-864e13),this.end=r||0===r?(0,d.default)(r):(0,d.default)(864e13)}return c(t,[{key:"adjacent",value:function(t){var e=this.start.isSame(t.end),i=this.end.isSame(t.start);return e&&t.start.valueOf()<=this.start.valueOf()||i&&t.end.valueOf()>=this.end.valueOf()}},{key:"add",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{adjacent:!1};return this.overlaps(t,e)?new this.constructor(d.default.min(this.start,t.start),d.default.max(this.end,t.end)):null}},{key:"by",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{excludeEnd:!1,step:1},i=this;return r({},u.default.iterator,(function(){var a=e.step||1,r=Math.abs(i.start.diff(i.end,t))/a,n=e.excludeEnd||!1,s=0;return e.hasOwnProperty("exclusive")&&(n=e.exclusive),{next:function(){var e=i.start.clone().add(s*a,t),o=n?!(s<r):!(s<=r);return s++,{done:o,value:o?void 0:e}}}}))}},{key:"byRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{excludeEnd:!1,step:1},i=this,a=e.step||1,n=this.valueOf()/t.valueOf()/a,s=Math.floor(n),o=e.excludeEnd||!1,l=0;return e.hasOwnProperty("exclusive")&&(o=e.exclusive),r({},u.default.iterator,(function(){return s===1/0?{done:!0}:{next:function(){var e=(0,d.default)(i.start.valueOf()+t.valueOf()*l*a),r=s===n&&o?!(l<s):!(l<=s);return l++,{done:r,value:r?void 0:e}}}}))}},{key:"center",value:function(){var t=this.start.valueOf()+this.diff()/2;return(0,d.default)(t)}},{key:"clone",value:function(){return new this.constructor(this.start.clone(),this.end.clone())}},{key:"contains",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{excludeStart:!1,excludeEnd:!1},a=this.start.valueOf(),r=this.end.valueOf(),n=e.valueOf(),s=e.valueOf(),o=i.excludeStart||!1,l=i.excludeEnd||!1;return i.hasOwnProperty("exclusive")&&(o=l=i.exclusive),e instanceof t&&(n=e.start.valueOf(),s=e.end.valueOf()),(a<n||a<=n&&!o)&&(r>s||r>=s&&!l)}},{key:"diff",value:function(t,e){return this.end.diff(this.start,t,e)}},{key:"duration",value:function(t,e){return this.diff(t,e)}},{key:"intersect",value:function(t){var e=this.start.valueOf(),i=this.end.valueOf(),a=t.start.valueOf(),r=t.end.valueOf(),n=a==r;if(e==i){if(e==a||e==r)return null;if(e>a&&e<r)return this.clone()}else if(n){var s=a;if(s==e||s==i)return null;if(s>e&&s<i)return new this.constructor(s,s)}return e<=a&&a<i&&i<r?new this.constructor(a,i):a<e&&e<r&&r<=i?new this.constructor(e,r):a<e&&e<=i&&i<r?this.clone():e<=a&&a<=r&&r<=i?new this.constructor(a,r):null}},{key:"isEqual",value:function(t){return this.start.isSame(t.start)&&this.end.isSame(t.end)}},{key:"isSame",value:function(t){return this.isEqual(t)}},{key:"overlaps",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{adjacent:!1},i=null!==this.intersect(t);return e.adjacent&&!i?this.adjacent(t):i}},{key:"reverseBy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{excludeStart:!1,step:1},i=this;return r({},u.default.iterator,(function(){var a=e.step||1,r=Math.abs(i.start.diff(i.end,t))/a,n=e.excludeStart||!1,s=0;return e.hasOwnProperty("exclusive")&&(n=e.exclusive),{next:function(){var e=i.end.clone().subtract(s*a,t),o=n?!(s<r):!(s<=r);return s++,{done:o,value:o?void 0:e}}}}))}},{key:"reverseByRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{excludeStart:!1,step:1},i=this,a=e.step||1,n=this.valueOf()/t.valueOf()/a,s=Math.floor(n),o=e.excludeStart||!1,l=0;return e.hasOwnProperty("exclusive")&&(o=e.exclusive),r({},u.default.iterator,(function(){return s===1/0?{done:!0}:{next:function(){var e=(0,d.default)(i.end.valueOf()-t.valueOf()*l*a),r=s===n&&o?!(l<s):!(l<=s);return l++,{done:r,value:r?void 0:e}}}}))}},{key:"snapTo",value:function(t){var e=this.clone();return e.start.isSame((0,d.default)(-864e13))||(e.start=e.start.startOf(t)),e.end.isSame((0,d.default)(864e13))||(e.end=e.end.endOf(t)),e}},{key:"subtract",value:function(t){var e=this.start.valueOf(),i=this.end.valueOf(),a=t.start.valueOf(),r=t.end.valueOf();return null===this.intersect(t)?[this]:a<=e&&e<i&&i<=r?[]:a<=e&&e<r&&r<i?[new this.constructor(r,i)]:e<a&&a<i&&i<=r?[new this.constructor(e,a)]:e<a&&a<r&&r<i?[new this.constructor(e,a),new this.constructor(r,i)]:e<a&&a<i&&r<i?[new this.constructor(e,a),new this.constructor(a,i)]:[]}},{key:"toDate",value:function(){return[this.start.toDate(),this.end.toDate()]}},{key:"toString",value:function(){return this.start.format()+"/"+this.end.format()}},{key:"valueOf",value:function(){return this.end.valueOf()-this.start.valueOf()}}]),t}()},function(t,e,i){var a,r=i(6),n=i(13),s=i(9),o=i(15);a=t.exports=function(t,e){var i,a,s,l,h;return arguments.length<2||"string"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(i=s=!0,a=!1):(i=o.call(t,"c"),a=o.call(t,"e"),s=o.call(t,"w")),h={value:e,configurable:i,enumerable:a,writable:s},l?r(n(l),h):h},a.gs=function(t,e,i){var a,l,h,c;return"string"!=typeof t?(h=i,i=e,e=t,t=null):h=arguments[3],null==e?e=void 0:s(e)?null==i?i=void 0:s(i)||(h=i,i=void 0):(h=e,e=i=void 0),null==t?(a=!0,l=!1):(a=o.call(t,"c"),l=o.call(t,"e")),c={get:e,set:i,configurable:a,enumerable:l},h?r(n(h),c):c}},function(t,e,i){t.exports=function(){}},function(t,e,i){t.exports=i(7)()?Object.assign:i(8)},function(t,e,i){t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,i){var a=i(10),r=i(14),n=Math.max;t.exports=function(t,e){var i,s,o,l=n(arguments.length,2);for(t=Object(r(t)),o=function(a){try{t[a]=e[a]}catch(t){i||(i=t)}},s=1;s<l;++s)a(e=arguments[s]).forEach(o);if(void 0!==i)throw i;return t}},function(t,e,i){t.exports=function(t){return"function"==typeof t}},function(t,e,i){t.exports=i(11)()?Object.keys:i(12)},function(t,e,i){t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e,i){var a=i(0),r=Object.keys;t.exports=function(t){return r(a(t)?Object(t):t)}},function(t,e,i){var a=i(0),r=Array.prototype.forEach,n=Object.create,s=function(t,e){var i;for(i in t)e[i]=t[i]};t.exports=function(t){var e=n(null);return r.call(arguments,(function(t){a(t)&&s(Object(t),e)})),e}},function(t,e,i){var a=i(0);t.exports=function(t){if(!a(t))throw new TypeError("Cannot use null or undefined");return t}},function(t,e,i){t.exports=i(16)()?String.prototype.contains:i(17)},function(t,e,i){var a="razdwatrzy";t.exports=function(){return"function"==typeof a.contains&&!0===a.contains("dwa")&&!1===a.contains("foo")}},function(t,e,i){var a=String.prototype.indexOf;t.exports=function(t){return a.call(this,t,arguments[1])>-1}},function(t,e,i){var a={object:!0,symbol:!0};t.exports=function(){var t;if("function"!=typeof Symbol)return!1;t=Symbol("test symbol");try{String(t)}catch(t){return!1}return!!a[typeof Symbol.iterator]&&!!a[typeof Symbol.toPrimitive]&&!!a[typeof Symbol.toStringTag]}},function(t,e,i){t.exports=function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&"Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag])}},function(t,e,i){var a,r,n,s,o=i(4),l=i(21),h=Object.create,c=Object.defineProperties,d=Object.defineProperty,u=Object.prototype,f=h(null);if("function"==typeof Symbol){a=Symbol;try{String(a()),s=!0}catch(t){}}var p=function(){var t=h(null);return function(e){for(var i,a,r=0;t[e+(r||"")];)++r;return t[e+=r||""]=!0,d(u,i="@@"+e,o.gs(null,(function(t){a||(a=!0,d(this,i,o(t)),a=!1)}))),i}}();n=function(t){if(this instanceof n)throw new TypeError("Symbol is not a constructor");return r(t)},t.exports=r=function t(e){var i;if(this instanceof t)throw new TypeError("Symbol is not a constructor");return s?a(e):(i=h(n.prototype),e=void 0===e?"":String(e),c(i,{__description__:o("",e),__name__:o("",p(e))}))},c(r,{for:o((function(t){return f[t]?f[t]:f[t]=r(String(t))})),keyFor:o((function(t){var e;for(e in l(t),f)if(f[e]===t)return e})),hasInstance:o("",a&&a.hasInstance||r("hasInstance")),isConcatSpreadable:o("",a&&a.isConcatSpreadable||r("isConcatSpreadable")),iterator:o("",a&&a.iterator||r("iterator")),match:o("",a&&a.match||r("match")),replace:o("",a&&a.replace||r("replace")),search:o("",a&&a.search||r("search")),species:o("",a&&a.species||r("species")),split:o("",a&&a.split||r("split")),toPrimitive:o("",a&&a.toPrimitive||r("toPrimitive")),toStringTag:o("",a&&a.toStringTag||r("toStringTag")),unscopables:o("",a&&a.unscopables||r("unscopables"))}),c(n.prototype,{constructor:o(r),toString:o("",(function(){return this.__name__}))}),c(r.prototype,{toString:o((function(){return"Symbol ("+l(this).__description__+")"})),valueOf:o((function(){return l(this)}))}),d(r.prototype,r.toPrimitive,o("",(function(){var t=l(this);return"symbol"==typeof t?t:t.toString()}))),d(r.prototype,r.toStringTag,o("c","Symbol")),d(n.prototype,r.toStringTag,o("c",r.prototype[r.toStringTag])),d(n.prototype,r.toPrimitive,o("c",r.prototype[r.toPrimitive]))},function(t,e,i){var a=i(19);t.exports=function(t){if(!a(t))throw new TypeError(t+" is not a symbol");return t}}])}($t.exports);var Jt={exports:{}};!function(t,e){!function(e,i){try{t.exports=i(require("moment"))}catch(it){t.exports=i}e&&(e.momentDurationFormatSetup=e.moment?i(e.moment):i)}(mt,(function(t){var e=!1,i=!1,a=!1,r=!1,n="escape years months weeks days hours minutes seconds milliseconds general".split(" "),s=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];function o(t,e){return!(e.length>t.length)&&-1!==t.indexOf(e)}function l(t){for(var e="";t;)e+="0",t-=1;return e}function h(t,e){var i=t+"+"+v(C(e).sort(),(function(t){return t+":"+e[t]})).join(",");return h.cache[i]||(h.cache[i]=Intl.NumberFormat(t,e)),h.cache[i]}function c(t,e,n){var s,o,d,u=e.useToLocaleString,f=e.useGrouping,p=f&&e.grouping.slice(),g=e.maximumSignificantDigits,x=e.minimumIntegerDigits||1,m=e.fractionDigits||0,v=e.groupingSeparator,b=e.decimalSeparator;if(u&&n){var y={minimumIntegerDigits:x,useGrouping:f};if(m&&(y.maximumFractionDigits=m,y.minimumFractionDigits=m),g&&t>0&&(y.maximumSignificantDigits=g),a){var w;if(!r)(w=A({},e)).useGrouping=!1,w.decimalSeparator=".",t=parseFloat(c(t,w),10);return h(n,y).format(t)}return i||((w=A({},e)).useGrouping=!1,w.decimalSeparator=".",t=parseFloat(c(t,w),10)),t.toLocaleString(n,y)}var S=(g?t.toPrecision(g+1):t.toFixed(m+1)).split("e");d=S[1]||"",o=(S=S[0].split("."))[1]||"";var _=(s=S[0]||"").length,k=o.length,C=_+k,M=s+o;(g&&C===g+1||!g&&k===m+1)&&(M=function(t){for(var e=t.split("").reverse(),i=0,a=!0;a&&i<e.length;)i?"9"===e[i]?e[i]="0":(e[i]=(parseInt(e[i],10)+1).toString(),a=!1):(parseInt(e[i],10)<5&&(a=!1),e[i]="0"),i+=1;return a&&e.push("1"),e.reverse().join("")}(M),M.length===C+1&&(_+=1),k&&(M=M.slice(0,-1)),s=M.slice(0,_),o=M.slice(_)),g&&(o=o.replace(/0*$/,""));var T=parseInt(d,10);T>0?o.length<=T?(s+=o+=l(T-o.length),o=""):(s+=o.slice(0,T),o=o.slice(T)):T<0&&(o=l(Math.abs(T)-s.length)+s+o,s="0"),g||((o=o.slice(0,m)).length<m&&(o+=l(m-o.length)),s.length<x&&(s=l(x-s.length)+s));var P,L="";if(f)for(S=s;S.length;)p.length&&(P=p.shift()),L&&(L=v+L),L=S.slice(-P)+L,S=S.slice(0,-P);else L=s;return o&&(L=L+b+o),L}function d(t,e){return t.label.length>e.label.length?-1:t.label.length<e.label.length?1:0}function u(t,e){var i=[];return m(C(e),(function(a){if("_durationLabels"===a.slice(0,15)){var r=a.slice(15).toLowerCase();m(C(e[a]),(function(n){n.slice(0,1)===t&&i.push({type:r,key:n,label:e[a][n]})}))}})),i}h.cache={};var f={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:function(t,e,i){return 1===e&&null===i?t:t+t}};function p(t){return"[object Array]"===Object.prototype.toString.call(t)}function g(t){return"[object Object]"===Object.prototype.toString.call(t)}function x(t,e){var i,a=0,r=t&&t.length||0;for("function"!=typeof e&&(i=e,e=function(t){return t===i});a<r;){if(e(t[a]))return t[a];a+=1}}function m(t,e){var i=0,a=t.length;if(t&&a)for(;i<a;){if(!1===e(t[i],i))return;i+=1}}function v(t,e){var i=0,a=t.length,r=[];if(!t||!a)return r;for(;i<a;)r[i]=e(t[i],i),i+=1;return r}function b(t,e){return v(t,(function(t){return t[e]}))}function y(t){var e=[];return m(t,(function(t){t&&e.push(t)})),e}function w(t){var e=[];return m(t,(function(t){x(e,t)||e.push(t)})),e}function S(t,e){var i=[];return m(t,(function(t){m(e,(function(e){t===e&&i.push(t)}))})),w(i)}function _(t,e){var i=[];return m(t,(function(a,r){if(!e(a))return i=t.slice(r),!1})),i}function k(t,e){return _(t.slice().reverse(),e).reverse()}function A(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function C(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e}function M(t,e){var i=0,a=t.length;if(!t||!a)return!1;for(;i<a;){if(!0===e(t[i],i))return!0;i+=1}return!1}function T(t){var e=[];return m(t,(function(t){e=e.concat(t)})),e}function P(t){return"3.6"===t(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})}function L(t){var e=!0;return!!(e=(e=(e=e&&"1"===t(1,"en",{minimumIntegerDigits:1}))&&"01"===t(1,"en",{minimumIntegerDigits:2}))&&"001"===t(1,"en",{minimumIntegerDigits:3}))&&(!!(e=(e=(e=(e=e&&"100"===t(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0}))&&"100.0"===t(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1}))&&"99.99"===t(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2}))&&"99.990"===t(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3}))&&(!!(e=(e=(e=(e=(e=e&&"100"===t(99.99,"en",{maximumSignificantDigits:1}))&&"100"===t(99.99,"en",{maximumSignificantDigits:2}))&&"100"===t(99.99,"en",{maximumSignificantDigits:3}))&&"99.99"===t(99.99,"en",{maximumSignificantDigits:4}))&&"99.99"===t(99.99,"en",{maximumSignificantDigits:5}))&&!!(e=(e=e&&"1,000"===t(1e3,"en",{useGrouping:!0}))&&"1000"===t(1e3,"en",{useGrouping:!1}))))}function D(){var t,e=[].slice.call(arguments),i={};if(m(e,(function(e,a){if(!a){if(!p(e))throw"Expected array as the first argument to durationsFormat.";t=e}"string"!=typeof e&&"function"!=typeof e?"number"!=typeof e?g(e)&&A(i,e):i.precision=e:i.template=e})),!t||!t.length)return[];i.returnMomentTypes=!0;var a=v(t,(function(t){return t.format(i)})),r=S(n,w(b(T(a),"type"))),s=i.largest;return s&&(r=r.slice(0,s)),i.returnMomentTypes=!1,i.outputTypes=r,v(t,(function(t){return t.format(i)}))}function E(){var i=[].slice.call(arguments),r=A({},this.format.defaults),l=this.asMilliseconds(),h=this.asMonths();"function"==typeof this.isValid&&!1===this.isValid()&&(l=0,h=0);var T=l<0,P=t.duration(Math.abs(l),"milliseconds"),L=t.duration(Math.abs(h),"months");m(i,(function(t){"string"!=typeof t&&"function"!=typeof t?"number"!=typeof t?g(t)&&A(r,t):r.precision=t:r.template=t}));var D={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},E={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};r.types=n;var O=function(t){return x(n,(function(e){return E[e].test(t)}))},I=new RegExp(v(n,(function(t){return E[t].source})).join("|"),"g");r.duration=this;var z="function"==typeof r.template?r.template.apply(r):r.template,N=r.outputTypes,Y=r.returnMomentTypes,F=r.largest,R=[];N||(p(r.stopTrim)&&(r.stopTrim=r.stopTrim.join("")),r.stopTrim&&m(r.stopTrim.match(I),(function(t){var e=O(t);"escape"!==e&&"general"!==e&&R.push(e)})));var H=t.localeData();H||(H={}),m(C(f),(function(t){"function"!=typeof f[t]?H["_"+t]||(H["_"+t]=f[t]):H[t]||(H[t]=f[t])})),m(C(H._durationTimeTemplates),(function(t){z=z.replace("_"+t+"_",H._durationTimeTemplates[t])}));var X=r.userLocale||t.locale(),W=r.useLeftUnits,V=r.usePlural,B=r.precision,j=r.forceLength,G=r.useGrouping,U=r.trunc,$=r.useSignificantDigits&&B>0,Z=$?r.precision:0,q=Z,J=r.minValue,K=!1,Q=r.maxValue,tt=!1,et=r.useToLocaleString,it=r.groupingSeparator,at=r.decimalSeparator,rt=r.grouping;et=et&&(e||a);var nt=r.trim;p(nt)&&(nt=nt.join(" ")),null===nt&&(F||Q||$)&&(nt="all"),null!==nt&&!0!==nt&&"left"!==nt&&"right"!==nt||(nt="large"),!1===nt&&(nt="");var st=function(t){return t.test(nt)},ot=/large/,lt=/small/,ht=/both/,ct=/mid/,dt=/^all|[^sm]all/,ut=/final/,ft=F>0||M([ot,ht,dt],st),pt=M([lt,ht,dt],st),gt=M([ct,dt],st),xt=M([ut,dt],st),mt=v(z.match(I),(function(t,e){var i=O(t);return"*"===t.slice(0,1)&&(t=t.slice(1),"escape"!==i&&"general"!==i&&R.push(i)),{index:e,length:t.length,text:"",token:"escape"===i?t.replace(E.escape,"$1"):t,type:"escape"===i||"general"===i?null:i}})),vt={index:0,length:0,token:"",text:"",type:null},bt=[];W&&mt.reverse(),m(mt,(function(t){if(t.type)return(vt.type||vt.text)&&bt.push(vt),void(vt=t);W?vt.text=t.token+vt.text:vt.text+=t.token})),(vt.type||vt.text)&&bt.push(vt),W&&bt.reverse();var yt=S(n,w(y(b(bt,"type"))));if(!yt.length)return b(bt,"text").join("");yt=v(yt,(function(t,e){var i,a=e+1===yt.length,n=!e;i="years"===t||"months"===t?L.as(t):P.as(t);var s=Math.floor(i),o=i-s,l=x(bt,(function(e){return t===e.type}));return n&&Q&&i>Q&&(tt=!0),a&&J&&Math.abs(r.duration.as(t))<J&&(K=!0),n&&null===j&&l.length>1&&(j=!0),P.subtract(s,t),L.subtract(s,t),{rawValue:i,wholeValue:s,decimalValue:a?o:0,isSmallest:a,isLargest:n,type:t,tokenLength:l.length}}));var wt=U?Math.floor:Math.round,St=function(t,e){var i=Math.pow(10,e);return wt(t*i)/i},_t=!1,kt=!1,At=function(t,e){var i={useGrouping:G,groupingSeparator:it,decimalSeparator:at,grouping:rt,useToLocaleString:et};return $&&(Z<=0?(t.rawValue=0,t.wholeValue=0,t.decimalValue=0):(i.maximumSignificantDigits=Z,t.significantDigits=Z)),tt&&!kt&&(t.isLargest?(t.wholeValue=Q,t.decimalValue=0):(t.wholeValue=0,t.decimalValue=0)),K&&!kt&&(t.isSmallest?(t.wholeValue=J,t.decimalValue=0):(t.wholeValue=0,t.decimalValue=0)),t.isSmallest||t.significantDigits&&t.significantDigits-t.wholeValue.toString().length<=0?B<0?t.value=St(t.wholeValue,B):0===B?t.value=wt(t.wholeValue+t.decimalValue):$?(t.value=U?St(t.rawValue,Z-t.wholeValue.toString().length):t.rawValue,t.wholeValue&&(Z-=t.wholeValue.toString().length)):(i.fractionDigits=B,t.value=U?t.wholeValue+St(t.decimalValue,B):t.wholeValue+t.decimalValue):$&&t.wholeValue?(t.value=Math.round(St(t.wholeValue,t.significantDigits-t.wholeValue.toString().length)),Z-=t.wholeValue.toString().length):t.value=t.wholeValue,t.tokenLength>1&&(j||_t)&&(i.minimumIntegerDigits=t.tokenLength,kt&&i.maximumSignificantDigits<t.tokenLength&&delete i.maximumSignificantDigits),!_t&&(t.value>0||""===nt||x(R,t.type)||x(N,t.type))&&(_t=!0),t.formattedValue=c(t.value,i,X),i.useGrouping=!1,i.decimalSeparator=".",t.formattedValueEn=c(t.value,i,"en"),2===t.tokenLength&&"milliseconds"===t.type&&(t.formattedValueMS=c(t.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),t};if((yt=y(yt=v(yt,At))).length>1){var Ct=function(t){return x(yt,(function(e){return e.type===t}))},Mt=function(t){var e=Ct(t.type);e&&m(t.targets,(function(t){var i=Ct(t.type);i&&parseInt(e.formattedValueEn,10)===t.value&&(e.rawValue=0,e.wholeValue=0,e.decimalValue=0,i.rawValue+=1,i.wholeValue+=1,i.decimalValue=0,i.formattedValueEn=i.wholeValue.toString(),kt=!0)}))};m(s,Mt)}return kt&&(_t=!1,Z=q,yt=y(yt=v(yt,At))),!N||tt&&!r.trim?(ft&&(yt=_(yt,(function(t){return!t.isSmallest&&!t.wholeValue&&!x(R,t.type)}))),F&&yt.length&&(yt=yt.slice(0,F)),pt&&yt.length>1&&(yt=k(yt,(function(t){return!t.wholeValue&&!x(R,t.type)&&!t.isLargest}))),gt&&(yt=y(yt=v(yt,(function(t,e){return e>0&&e<yt.length-1&&!t.wholeValue?null:t})))),!xt||1!==yt.length||yt[0].wholeValue||!U&&yt[0].isSmallest&&yt[0].rawValue<J||(yt=[])):yt=y(yt=v(yt,(function(t){return x(N,(function(e){return t.type===e}))?t:null}))),Y?yt:(m(bt,(function(t){var e=D[t.type],i=x(yt,(function(e){return e.type===t.type}));if(e&&i){var a=i.formattedValueEn.split(".");a[0]=parseInt(a[0],10),a[1]?a[1]=parseFloat("0."+a[1],10):a[1]=null;var r=H.durationPluralKey(e,a[0],a[1]),n=u(e,H),s=!1,l={};m(H._durationLabelTypes,(function(e){var i=x(n,(function(t){return t.type===e.type&&t.key===r}));i&&(l[i.type]=i.label,o(t.text,e.string)&&(t.text=t.text.replace(e.string,i.label),s=!0))})),V&&!s&&(n.sort(d),m(n,(function(e){return l[e.type]===e.label?!o(t.text,e.label)&&void 0:o(t.text,e.label)?(t.text=t.text.replace(e.label,l[e.type]),!1):void 0})))}})),(bt=v(bt,(function(t){if(!t.type)return t.text;var e=x(yt,(function(e){return e.type===t.type}));if(!e)return"";var i="";return W&&(i+=t.text),(T&&tt||!T&&K)&&(i+="< ",tt=!1,K=!1),(T&&K||!T&&tt)&&(i+="> ",tt=!1,K=!1),T&&(e.value>0||""===nt||x(R,e.type)||x(N,e.type))&&(i+="-",T=!1),"milliseconds"===t.type&&e.formattedValueMS?i+=e.formattedValueMS:i+=e.formattedValue,W||(i+=t.text),i}))).join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function O(){var t=this.duration,e=function(e){return t._data[e]},i=x(this.types,e),a=function(t,e){for(var i=t.length;i-=1;)if(e(t[i]))return t[i]}(this.types,e);switch(i){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(i===a)return"d __";case"weeks":return i===a?"w __":(null===this.trim&&(this.trim="both"),"w __, d __, h __");case"months":if(i===a)return"M __";case"years":return i===a?"y __":(null===this.trim&&(this.trim="both"),"y __, M __, d __");default:return null===this.trim&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function I(t){if(!t)throw"Moment Duration Format init cannot find moment instance.";t.duration.format=D,t.duration.fn.format=E,t.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:O,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},t.updateLocale("en",f)}var z=function(t,e,i){return t.toLocaleString(e,i)};e=function(){try{(0).toLocaleString("i")}catch(it){return"RangeError"===it.name}return!1}()&&L(z),i=e&&P(z);var N=function(t,e,i){if("undefined"!=typeof window&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(e,i).format(t)};return a=L(N),r=a&&P(N),I(t),I}))}(Jt),(0,Jt.exports)(Zt);const Kt=qt.exports.extendMoment(Zt),Qt=["var(--accent-color)","#3498db","#e74c3c","#9b59b6","#f1c40f","#2ecc71","#1abc9c","#34495e","#e67e22","#7f8c8d","#27ae60","#2980b9","#8e44ad"],te=["line","scatter",void 0],ee=["scatter","radialBar","pie","donut"];function ie(t){if(void 0!==t&&"string"==typeof t){const e=_t.exports.decompress(t);return e&&JSON.parse(e)}return t}function ae(t){console.warn("apexcharts-card: ",t)}function re(t,e){const i=t=>t&&"object"==typeof t;return i(t)&&i(e)?(Object.keys(e).forEach((a=>{const r=t[a],n=e[a];Array.isArray(r)&&Array.isArray(n)?t[a]=r.concat(n):i(r)&&i(n)?t[a]=re(Object.assign({},r),n):t[a]=n})),t):e}function ne(t,e,i,a){var r,n,s,o,l;if(!e||!i&&!a)return"";let h="";return a?h=e[t].name||(null===(r=a.attributes)||void 0===r?void 0:r.friendly_name)||a.entity_id||"":i&&(h=e[t].name||(null===(s=null===(n=i[t])||void 0===n?void 0:n.attributes)||void 0===s?void 0:s.friendly_name)||(null===(o=i[t])||void 0===o?void 0:o.entity_id)||""),h+((null===(l=e[t].show)||void 0===l?void 0:l.offset_in_name)&&e[t].offset?` (${e[t].offset})`:"")}function se(t,e,i,a){var r,n,s;return e&&(i||a)?a?e[t].unit||(null===(r=a.attributes)||void 0===r?void 0:r.unit_of_measurement)||"":i&&(e[t].unit||(null===(s=null===(n=i[t])||void 0===n?void 0:n.attributes)||void 0===s?void 0:s.unit_of_measurement))||"":""}function oe(t){return t?t.map((t=>le(t))):[]}function le(t){return"#"===t[0]?new Vt(t).toHexString():"var"===t.substring(0,3)?new Vt(window.getComputedStyle(document.documentElement).getPropertyValue(t.substring(4).slice(0,-1)).trim()).toHexString():new Vt(t).toHexString()}function he(t){const e=new Vt(t);return e.isValid&&e.getLuminance()>.5?"#000":"#fff"}function ce(t,e){const i=Gt(t);if(null===i)throw new Error(`'${e}: ${t}' is not a valid range of time`);return i}function de(t,e){if("+"!==t[0]&&"-"!==t[0])throw new Error(`'${e}: ${t}' should start with a '+' or a '-'`);return ce(t,e)}function ue(t,e){return null===t?"N/A":Kt.duration(t,e).format("y[y] d[d] h[h] m[m] s[s] S[ms]",{trim:"both"})}function fe(t,e,i){const a=void 0===e?0:e;return 100*(t-a)/((void 0===i?100:i)-a)}function pe(t,e,i){const a=+t.replace("#","0x"),r=a>>16,n=a>>8&255,s=255&a,o=+e.replace("#","0x");return`#${((1<<24)+(r+i*((o>>16)-r)<<16)+(n+i*((o>>8&255)-n)<<8)+(s+i*((255&o)-s))|0).toString(16).slice(1)}`}function ge(t,e){const i=e.config_templates;if(!i)return e;let a={};const r=i&&Array.isArray(i)?i:[i];return null==r||r.forEach((e=>{var i;if(!(null===(i=t.config.apexcharts_card_templates)||void 0===i?void 0:i[e]))throw new Error(`apexchart-card template '${e}' is missing from your config!`);const r=ge(t,JSON.parse(JSON.stringify(t.config.apexcharts_card_templates[e])));a=xe(a,r)})),a=xe(a,e),a}function xe(t,e){const i=t=>t&&"object"==typeof t;return i(t)&&i(e)?(Object.keys(e).forEach((a=>{const r=t[a],n=e[a];Array.isArray(r)&&Array.isArray(n)?t[a]=xe(r,n):i(r)&&i(n)?t[a]=xe(Object.assign({},r),n):t[a]=n})),t):e}function me(t){return!(new Date(2021,1,1,15,0,0,0).toLocaleTimeString(t).indexOf("15")>-1)}function ve(t,e){if(void 0!==(null==t?void 0:t.hours_12))return t.hours_12;{const i=null==e?void 0:e.locale;return(null==i?void 0:i.time_format)?"language"===i.time_format?me(i.language):"system"===i.time_format?me(navigator.language):"12"===i.time_format:me(be(t,e))}}function be(t,e){return(null==t?void 0:t.locale)||(null==e?void 0:e.language)||"en"}function ye(t,e,i){let a=t;return null==a?null:"string"==typeof a&&(a=parseFloat(a),Number.isNaN(a))?t:ht(a,e,{maximumFractionDigits:void 0===i?1:i})}var we={exports:{}};!function(t,e){function i(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function a(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?i(Object(a),!0).forEach((function(e){l(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function o(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),t}function l(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){var e=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(t){return!1}}();return function(){var i,a=c(t);if(e){var r=c(this).constructor;i=Reflect.construct(a,arguments,r)}else i=a.apply(this,arguments);return u(this,i)}}function p(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||g(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){if(t){if("string"==typeof t)return x(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?x(t,e):void 0}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var m=function(){function t(){n(this,t)}return o(t,[{key:"shadeRGBColor",value:function(t,e){var i=e.split(","),a=t<0?0:255,r=t<0?-1*t:t,n=parseInt(i[0].slice(4),10),s=parseInt(i[1],10),o=parseInt(i[2],10);return"rgb("+(Math.round((a-n)*r)+n)+","+(Math.round((a-s)*r)+s)+","+(Math.round((a-o)*r)+o)+")"}},{key:"shadeHexColor",value:function(t,e){var i=parseInt(e.slice(1),16),a=t<0?0:255,r=t<0?-1*t:t,n=i>>16,s=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-n)*r)+n)+256*(Math.round((a-s)*r)+s)+(Math.round((a-o)*r)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===r(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e<t.length;e++)i[e]=t[e];return i}},{key:"extend",value:function(t,e){var i=this;"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var a=arguments[i];if(null!=a)for(var r in a)a.hasOwnProperty(r)&&(e[r]=a[r])}return e});var a=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach((function(r){i.isObject(e[r])&&r in t?a[r]=i.extend(t[r],e[r]):Object.assign(a,l({},r,e[r]))})),a}},{key:"extendArray",value:function(e,i){var a=[];return e.map((function(e){a.push(t.extend(i,e))})),a}},{key:"monthMod",value:function(t){return t%12}},{key:"clone",value:function(e){if(t.is("Array",e)){for(var i=[],a=0;a<e.length;a++)i[a]=this.clone(e[a]);return i}if(t.is("Null",e))return null;if(t.is("Date",e))return e;if("object"===r(e)){var n={};for(var s in e)e.hasOwnProperty(s)&&(n[s]=this.clone(e[s]));return n}return e}},{key:"log10",value:function(t){return Math.log(t)/Math.LN10}},{key:"roundToBase10",value:function(t){return Math.pow(10,Math.floor(Math.log10(t)))}},{key:"roundToBase",value:function(t,e){return Math.pow(e,Math.floor(Math.log(t)/Math.log(e)))}},{key:"parseNumber",value:function(t){return null===t?t:parseFloat(t)}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",r=e[0].replace(".",""),n=Number(e[1])+1;if(n<0){for(i=a+"0.";n++;)i+="0";return i+r.replace(/^-/,"")}for(n-=r.length;n--;)i+="0";return r+i}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a<i.length;a++)i[a]=parseInt(1===i[a].length?i[a]+i[a]:i[a],16);return void 0!==e&&i.push(e),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}},{key:"getPolygonPos",value:function(t,e){for(var i=[],a=2*Math.PI/e,r=0;r<e;r++){var n={};n.x=t*Math.sin(r*a),n.y=-t*Math.cos(r*a),i.push(n)}return i}},{key:"polarToCartesian",value:function(t,e,i,a){var r=(a-90)*Math.PI/180;return{x:t+i*Math.cos(r),y:e+i*Math.sin(r)}}},{key:"escapeString",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i.replace(/[` ~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var a=t.indexOf("Edge/");return a>0&&parseInt(t.substring(a+5,t.indexOf(".",a)),10)}}]),t}(),v=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.setEasingFunctions()}return o(t,[{key:"setEasingFunctions",value:function(){var t;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":t="-";break;case"easein":t="<";break;case"easeout":t=">";break;case"easeinout":default:t="<>";break;case"swing":t=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1};break;case"bounce":t=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375};break;case"elastic":t=function(t){return t===!!t?t:Math.pow(2,-10*t)*Math.sin((t-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=t}}},{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a,r,n){e||(e=0),t.attr({r:e,width:e,height:e}).animate(a,r).attr({r:i,width:i.width,height:i.height}).afterAll((function(){n()}))}},{key:"animateCircle",value:function(t,e,i,a,r){t.attr({r:e.r,cx:e.cx,cy:e.cy}).animate(a,r).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(t,e,i,a,r){t.attr(e).animate(a).attr(i).afterAll((function(){return r()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,r=t.fill,n=t.pathFrom,s=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?r:"stroke",n,s,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){t.el.classList.remove("apexcharts-element-hidden")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,r,n,s,o){var l=this,h=this.w;r||(r=t.attr("pathFrom")),n||(n=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(s=1),"M 0 ".concat(h.globals.gridHeight)};(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),(!n||n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n=c()),h.globals.shouldAnimate||(s=1),t.plot(r).animate(1,h.globals.easing,o).plot(r).animate(s,h.globals.easing,o).plot(n).afterAll((function(){m.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}(),b=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(t,e,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"addNormalFilter",value:function(t,e){var i=this.w;i.config.chart.dropShadow.enabled&&!t.node.classList.contains("apexcharts-marker")&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"addLightenFilter",value:function(t,e,i){var a=this,r=this.w,n=i.intensity;t.unfilter(!0),new window.SVG.Filter,t.filter((function(t){var i=r.config.chart.dropShadow;(i.enabled?a.addShadow(t,e,i):t).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:n}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)}},{key:"addDarkenFilter",value:function(t,e,i){var a=this,r=this.w,n=i.intensity;t.unfilter(!0),new window.SVG.Filter,t.filter((function(t){var i=r.config.chart.dropShadow;(i.enabled?a.addShadow(t,e,i):t).componentTransfer({rgb:{type:"linear",slope:n}})})),t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)}},{key:"applyFilter",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(t,e);break;case"lighten":this.addLightenFilter(t,e,{intensity:a});break;case"darken":this.addDarkenFilter(t,e,{intensity:a})}}},{key:"addShadow",value:function(t,e,i){var a=i.blur,r=i.top,n=i.left,s=i.color,o=i.opacity,l=t.flood(Array.isArray(s)?s[e]:s,o).composite(t.sourceAlpha,"in").offset(n,r).gaussianBlur(a).merge(t.source);return t.blend(t.source,l)}},{key:"dropShadow",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=e.top,r=e.left,n=e.blur,s=e.color,o=e.opacity,l=e.noUserSpaceOnUse,h=this.w;return t.unfilter(!0),m.isIE()&&"radialBar"===h.config.chart.type||(s=Array.isArray(s)?s[i]:s,t.filter((function(t){var e;e=m.isSafari()||m.isFirefox()||m.isIE()?t.flood(s,o).composite(t.sourceAlpha,"in").offset(r,a).gaussianBlur(n):t.flood(s,o).composite(t.sourceAlpha,"in").offset(r,a).gaussianBlur(n).merge(t.source),t.blend(t.source,e)})),l||t.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(t.filterer.node)),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var r=a.config.states.active.filter;"none"!==r&&this.applyFilter(t,e,r.type,r.value)}}},{key:"_scaleFilterSize",value:function(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),t}(),y=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"drawLine",value:function(t,e,i,a){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt",l=this.w,h=l.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:r,"stroke-dasharray":n,"stroke-width":s,"stroke-linecap":o});return h}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w,d=c.globals.dom.Paper.rect();return d.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:r,ry:r,opacity:s,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),d.node.setAttribute("fill",n),d}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",r=this.w,n=r.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i});return n}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;t<0&&(t=0);var a=i.globals.dom.Paper.circle(2*t);return null!==e&&a.attr(e),a}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,r=void 0===a?"#a8a8a8":a,n=t.strokeWidth,s=void 0===n?1:n,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,f=t.strokeLinecap,p=void 0===f?null:f,g=t.strokeDashArray,x=void 0===g?0:g,m=this.w;return null===p&&(p=m.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(m.globals.gridHeight)),m.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:r,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":s,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=e.globals.dom.Paper.group();return null!==t&&i.attr(t),i}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=["L",t,e].join(" "):"H"===i?a=["H",t].join(" "):"V"===i&&(a=["V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,r,n){return["C",t,e,i,a,r,n].join(" ")}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,r,n,s){var o=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l="A";o&&(l="a");var h=[l,t,e,i,a,r,n,s].join(" ");return h}},{key:"renderPaths",value:function(t){var e,i=t.j,r=t.realIndex,n=t.pathFrom,s=t.pathTo,o=t.stroke,l=t.strokeWidth,h=t.strokeLinecap,c=t.fill,d=t.animationDelay,u=t.initialSpeed,f=t.dataChangeSpeed,p=t.className,g=t.shouldClipToGrid,x=void 0===g||g,m=t.bindEventsOnPaths,y=void 0===m||m,w=t.drawShadow,S=void 0===w||w,_=this.w,k=new b(this.ctx),A=new v(this.ctx),C=this.w.config.chart.animations.enabled,M=C&&this.w.config.chart.animations.dynamicAnimation.enabled,T=!!(C&&!_.globals.resized||M&&_.globals.dataChanged&&_.globals.shouldAnimate);T?e=n:(e=s,_.globals.animationEnded=!0);var P,L=_.config.stroke.dashArray;P=Array.isArray(L)?L[r]:_.config.stroke.dashArray;var D=this.drawPath({d:e,stroke:o,strokeWidth:l,fill:c,fillOpacity:1,classes:p,strokeLinecap:h,strokeDashArray:P});if(D.attr("index",r),x&&D.attr({"clip-path":"url(#gridRectMask".concat(_.globals.cuid,")")}),"none"!==_.config.states.normal.filter.type)k.getDefaultFilter(D,r);else if(_.config.chart.dropShadow.enabled&&S&&(!_.config.chart.dropShadow.enabledOnSeries||_.config.chart.dropShadow.enabledOnSeries&&-1!==_.config.chart.dropShadow.enabledOnSeries.indexOf(r))){var E=_.config.chart.dropShadow;k.dropShadow(D,E,r)}y&&(D.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,D)),D.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,D)),D.node.addEventListener("mousedown",this.pathMouseDown.bind(this,D))),D.attr({pathTo:s,pathFrom:n});var O={el:D,j:i,realIndex:r,pathFrom:n,pathTo:s,fill:c,strokeWidth:l,delay:d};return!C||_.globals.resized||_.globals.dataChanged?!_.globals.resized&&_.globals.dataChanged||A.showDelayedElements():A.animatePathsGradually(a(a({},O),{},{speed:u})),_.globals.dataChanged&&M&&T&&A.animatePathsGradually(a(a({},O),{},{speed:f})),D}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=this.w,s=n.globals.dom.Paper.pattern(e,i,(function(n){"horizontalLines"===t?n.line(0,0,i,0).stroke({color:a,width:r+1}):"verticalLines"===t?n.line(0,0,0,e).stroke({color:a,width:r+1}):"slantedLines"===t?n.line(0,0,e,i).stroke({color:a,width:r}):"squares"===t?n.rect(e,i).fill("none").stroke({color:a,width:r}):"circles"===t&&n.circle(e).fill("none").stroke({color:a,width:r})}));return s}},{key:"drawGradient",value:function(t,e,i,a,r){var n,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=m.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=m.hexToRgba(i,r));var d=0,u=1,f=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,f=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var g=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(n=null===l||0===l.length?c.globals.dom.Paper.gradient(g?"radial":"linear",(function(t){t.at(d,e,a),t.at(u,i,r),t.at(f,i,r),null!==p&&t.at(p,e,a)})):c.globals.dom.Paper.gradient(g?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.at(e.offset/100,e.color,e.opacity)}))})),g){var x=c.globals.gridWidth/2,v=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?n.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:v,r:s}):n.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?n.from(0,0).to(0,1):"diagonal"===t?n.from(0,0).to(1,1):"horizontal"===t?n.from(0,1).to(1,1):"diagonal2"===t&&n.from(1,0).to(0,1);return n}},{key:"drawText",value:function(t){var e,i=t.x,a=t.y,r=t.text,n=t.textAnchor,s=t.fontSize,o=t.fontFamily,l=t.fontWeight,h=t.foreColor,c=t.opacity,d=t.cssClass,u=void 0===d?"":d,f=t.isPlainText,p=void 0===f||f,g=this.w;return void 0===r&&(r=""),n||(n="start"),h&&h.length||(h=g.config.chart.foreColor),o=o||g.config.chart.fontFamily,l=l||"regular",(e=Array.isArray(r)?g.globals.dom.Paper.text((function(t){for(var e=0;e<r.length;e++)0===e?t.tspan(r[e]):t.tspan(r[e]).newLine()})):p?g.globals.dom.Paper.plain(r):g.globals.dom.Paper.text((function(t){return t.tspan(r)}))).attr({x:i,y:a,"text-anchor":n,"dominant-baseline":"auto","font-size":s,"font-family":o,"font-weight":l,fill:h,class:"apexcharts-text "+u}),e.node.style.fontFamily=o,e.node.style.opacity=c,e}},{key:"drawMarker",value:function(t,e,i){t=t||0;var a=i.pSize||0,r=null;if("square"===i.shape||"rect"===i.shape){var n=void 0===i.pRadius?a/2:i.pRadius;null!==e&&a||(a=0,n=0);var s=1.2*a+n,o=this.drawRect(s,s,s,s,n);o.attr({x:t-s/2,y:e-s/2,cx:t,cy:e,class:i.class?i.class:"",fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,stroke:i.pointStrokeColor,"stroke-width":i.pointStrokeWidth?i.pointStrokeWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}),r=o}else"circle"!==i.shape&&i.shape||(m.isNumber(e)||(a=0,e=0),r=this.drawCircle(a,{cx:t,cy:e,class:i.class?i.class:"",stroke:i.pointStrokeColor,fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,"stroke-width":i.pointStrokeWidth?i.pointStrokeWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}));return r}},{key:"pathMouseEnter",value:function(t,e){var i=this.w,a=new b(this.ctx),r=parseInt(t.node.getAttribute("index"),10),n=parseInt(t.node.getAttribute("j"),10);if("function"==typeof i.config.chart.events.dataPointMouseEnter&&i.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:i}),this.ctx.events.fireEvent("dataPointMouseEnter",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:i}]),("none"===i.config.states.active.filter.type||"true"!==t.node.getAttribute("selected"))&&"none"!==i.config.states.hover.filter.type&&!i.globals.isTouchDevice){var s=i.config.states.hover.filter;a.applyFilter(t,r,s.type,s.value)}}},{key:"pathMouseLeave",value:function(t,e){var i=this.w,a=new b(this.ctx),r=parseInt(t.node.getAttribute("index"),10),n=parseInt(t.node.getAttribute("j"),10);"function"==typeof i.config.chart.events.dataPointMouseLeave&&i.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:i}),this.ctx.events.fireEvent("dataPointMouseLeave",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:i}]),"none"!==i.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"!==i.config.states.hover.filter.type&&a.getDefaultFilter(t,r)}},{key:"pathMouseDown",value:function(t,e){var i=this.w,a=new b(this.ctx),r=parseInt(t.node.getAttribute("index"),10),n=parseInt(t.node.getAttribute("j"),10),s="false";if("true"===t.node.getAttribute("selected")){if(t.node.setAttribute("selected","false"),i.globals.selectedDataPoints[r].indexOf(n)>-1){var o=i.globals.selectedDataPoints[r].indexOf(n);i.globals.selectedDataPoints[r].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.select(".apexcharts-series path").members,h=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,r)}))};c(l),c(h)}t.node.setAttribute("selected","true"),s="true",void 0===i.globals.selectedDataPoints[r]&&(i.globals.selectedDataPoints[r]=[]),i.globals.selectedDataPoints[r].push(n)}if("true"===s){var d=i.config.states.active.filter;"none"!==d&&a.applyFilter(t,r,d.type,d.value)}else"none"!==i.config.states.active.filter.type&&a.getDefaultFilter(t,r);"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w,s=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&s.attr("transform",a),n.globals.dom.Paper.add(s);var o=s.bbox();return r||(o=s.node.getBoundingClientRect()),s.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),w=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"getStackedSeriesTotals",value:function(){var t=this.w,e=[];if(0===t.globals.series.length)return e;for(var i=0;i<t.globals.series[t.globals.maxValsInArrayIndex].length;i++){for(var a=0,r=0;r<t.globals.series.length;r++)void 0!==t.globals.series[r][i]&&(a+=t.globals.series[r][i]);e.push(a)}return t.globals.stackedSeriesTotals=e,e}},{key:"getSeriesTotalByIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"isSeriesNull",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(e+=t.config.markers.hover.sizeOffset+1),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;a<t.length;a++)i+=t[a];else i+=t;return i}))}},{key:"getSeriesTotalsXRange",value:function(t,e){var i=this.w;return i.globals.series.map((function(a,r){for(var n=0,s=0;s<a.length;s++)i.globals.seriesX[r][s]>t&&i.globals.seriesX[r][s]<e&&(n+=a[s]);return n}))}},{key:"getPercentSeries",value:function(){var t=this.w;t.globals.seriesPercent=t.globals.series.map((function(e,i){var a=[];if(Array.isArray(e))for(var r=0;r<e.length;r++){var n=t.globals.stackedSeriesTotals[r],s=0;n&&(s=100*e[r]/n),a.push(s)}else{var o=100*e/t.globals.seriesTotals.reduce((function(t,e){return t+e}),0);a.push(o)}return a}))}},{key:"getCalculatedRatios",value:function(){var t,e,i,a,r=this.w.globals,n=[],s=0,o=[],l=.1,h=0;if(r.yRange=[],r.isMultipleYAxis)for(var c=0;c<r.minYArr.length;c++)r.yRange.push(Math.abs(r.minYArr[c]-r.maxYArr[c])),o.push(0);else r.yRange.push(Math.abs(r.minY-r.maxY));r.xRange=Math.abs(r.maxX-r.minX),r.zRange=Math.abs(r.maxZ-r.minZ);for(var d=0;d<r.yRange.length;d++)n.push(r.yRange[d]/r.gridHeight);if(e=r.xRange/r.gridWidth,i=Math.abs(r.initialMaxX-r.initialMinX)/r.gridWidth,t=r.yRange/r.gridWidth,a=r.xRange/r.gridHeight,(s=r.zRange/r.gridHeight*16)||(s=1),r.minY!==Number.MIN_VALUE&&0!==Math.abs(r.minY)&&(r.hasNegs=!0),r.isMultipleYAxis){o=[];for(var u=0;u<n.length;u++)o.push(-r.minYArr[u]/n[u])}else o.push(-r.minY/n[0]),r.minY!==Number.MIN_VALUE&&0!==Math.abs(r.minY)&&(l=-r.minY/t,h=r.minX/e);return{yRatio:n,invertedYRatio:t,zRatio:s,xRatio:e,initialXRatio:i,invertedXRatio:a,baseLineInvertedY:l,baseLineY:o,baseLineX:h}}},{key:"getLogSeries",value:function(t){var e=this,i=this.w;return i.globals.seriesLog=t.map((function(t,a){return i.config.yaxis[a]&&i.config.yaxis[a].logarithmic?t.map((function(t){return null===t?null:e.getLogVal(i.config.yaxis[a].logBase,t,a)})):t})),i.globals.invalidLogScale?t:i.globals.seriesLog}},{key:"getBaseLog",value:function(t,e){return Math.log(e)/Math.log(t)}},{key:"getLogVal",value:function(t,e,i){if(0===e)return 0;var a=this.w,r=0===a.globals.minYArr[i]?-1:this.getBaseLog(t,a.globals.minYArr[i]),n=(0===a.globals.maxYArr[i]?0:this.getBaseLog(t,a.globals.maxYArr[i]))-r;return e<1?e/n:(this.getBaseLog(t,e)-r)/n}},{key:"getLogYRatios",value:function(t){var e=this,i=this.w,a=this.w.globals;return a.yLogRatio=t.slice(),a.logYRange=a.yRange.map((function(t,r){if(i.config.yaxis[r]&&e.w.config.yaxis[r].logarithmic){var n,s=-Number.MAX_VALUE,o=Number.MIN_VALUE;return a.seriesLog.forEach((function(t,e){t.forEach((function(t){i.config.yaxis[e]&&i.config.yaxis[e].logarithmic&&(s=Math.max(t,s),o=Math.min(t,o))}))})),n=Math.pow(a.yRange[r],Math.abs(o-s)/a.yRange[r]),a.yLogRatio[r]=n/a.gridHeight,n}})),a.invalidLogScale?t.slice():a.yLogRatio}}],[{key:"checkComboSeries",value:function(t){var e=!1,i=0,a=0;return t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||i++,void 0!==t.type&&a++})),a>0&&(e=!0),{comboBarCount:i,comboCharts:e}}},{key:"extendArrayProps",value:function(t,e,i){return e.yaxis&&(e=t.extendYAxis(e,i)),e.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),e.annotations.xaxis&&(e=t.extendXAxisAnnotations(e)),e.annotations.points&&(e=t.extendPointAnnotations(e))),e}}]),t}(),S=function(){function t(e){n(this,t),this.w=e.w,this.annoCtx=e}return o(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,r=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==r){var n=r.getBoundingClientRect();r.setAttribute("x",parseFloat(r.getAttribute("x"))-n.height+4),"top"===t.label.position?r.setAttribute("y",parseFloat(r.getAttribute("y"))+n.width):r.setAttribute("y",parseFloat(r.getAttribute("y"))-n.width);var s=this.annoCtx.graphics.rotateAroundCenter(r),o=s.x,l=s.y;r.setAttribute("transform","rotate(-90 ".concat(o," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||void 0===e.label.text||void 0!==e.label.text&&!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),r=t.getBoundingClientRect(),n=e.label.style.padding.left,s=e.label.style.padding.right,o=e.label.style.padding.top,l=e.label.style.padding.bottom;"vertical"===e.label.orientation&&(o=e.label.style.padding.left,l=e.label.style.padding.right,n=e.label.style.padding.top,s=e.label.style.padding.bottom);var h=r.left-a.left-n,c=r.top-a.top-o,d=this.annoCtx.graphics.drawRect(h-i.globals.barPadForNumericAxis,c,r.width+n+s,r.height+o+l,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&d.node.classList.add(e.id),d}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,r){var n=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(a,"']"));if(n){var s=n.parentNode,o=t.addBackgroundToAnno(n,i);o&&(s.insertBefore(o.node,n),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)))}};e.config.annotations.xaxis.map((function(t,e){i(t,e,"xaxis")})),e.config.annotations.yaxis.map((function(t,e){i(t,e,"yaxis")})),e.config.annotations.points.map((function(t,e){i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a="y1"===t?e.y:e.y2,r=this.w;if(this.annoCtx.invertAxis){var n=r.globals.labels.indexOf(a);r.config.xaxis.convertedCatToNumeric&&(n=r.globals.categoryLabels.indexOf(a));var s=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(n+1)+")");s&&(i=parseFloat(s.getAttribute("y")))}else{var o;o=r.config.yaxis[e.yAxisIndex].logarithmic?(a=new w(this.annoCtx.ctx).getLogVal(a,e.yAxisIndex))/r.globals.yLogRatio[e.yAxisIndex]:(a-r.globals.minYArr[e.yAxisIndex])/(r.globals.yRange[e.yAxisIndex]/r.globals.gridHeight),i=r.globals.gridHeight-o,r.config.yaxis[e.yAxisIndex]&&r.config.yaxis[e.yAxisIndex].reversed&&(i=o)}return i}},{key:"getX1X2",value:function(t,e){var i=this.w,a=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,s=(e.x-a)/(n/i.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(s=(r-e.x)/(n/i.globals.gridWidth)),"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||(s=this.getStringX(e.x));var o=(e.x2-a)/(n/i.globals.gridWidth);return this.annoCtx.inversedReversedAxis&&(o=(r-e.x2)/(n/i.globals.gridWidth)),"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||(o=this.getStringX(e.x2)),"x1"===t?s:o}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.indexOf(t),r=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(a+1)+")");return r&&(i=parseFloat(r.getAttribute("x"))),i}}]),t}(),_=function(){function t(e){n(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new S(this.annoCtx)}return o(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,r=this.w,n=this.helpers.getX1X2("x1",t),s=t.label.text,o=t.strokeDashArray;if(m.isNumber(n)){if(null===t.x2||void 0===t.x2){var l=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,r.globals.gridHeight+t.offsetY,t.borderColor,o,t.borderWidth);e.appendChild(l.node),t.id&&l.node.classList.add(t.id)}else{if((a=this.helpers.getX1X2("x2",t))<n){var h=n;n=a,a=h}var c=this.annoCtx.graphics.drawRect(n+t.offsetX,0+t.offsetY,a-n,r.globals.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,o);c.node.classList.add("apexcharts-annotation-rect"),c.attr("clip-path","url(#gridRectMask".concat(r.globals.cuid,")")),e.appendChild(c.node),t.id&&c.node.classList.add(t.id)}var d="top"===t.label.position?4:r.globals.gridHeight,u=this.annoCtx.graphics.getTextRects(s,parseFloat(t.label.style.fontSize)),f=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:d+t.label.offsetY-("vertical"===t.label.orientation?"top"===t.label.position?u.width/2-12:-u.width/2:0),text:s,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});f.attr({rel:i}),e.appendChild(f.node),this.annoCtx.helpers.setOrientations(t,i)}}},{key:"drawXAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return e.config.annotations.xaxis.map((function(e,a){t.addXaxisAnnotation(e,i.node,a)})),i}}]),t}(),k=function(){function t(e){n(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new S(this.annoCtx)}return o(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,r=this.w,n=t.strokeDashArray,s=this.helpers.getY1Y2("y1",t),o=t.label.text;if(null===t.y2||void 0===t.y2){var l=this.annoCtx.graphics.drawLine(0+t.offsetX,s+t.offsetY,this._getYAxisAnnotationWidth(t),s+t.offsetY,t.borderColor,n,t.borderWidth);e.appendChild(l.node),t.id&&l.node.classList.add(t.id)}else{if((a=this.helpers.getY1Y2("y2",t))>s){var h=s;s=a,a=h}var c=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),s-a,0,t.fillColor,t.opacity,1,t.borderColor,n);c.node.classList.add("apexcharts-annotation-rect"),c.attr("clip-path","url(#gridRectMask".concat(r.globals.cuid,")")),e.appendChild(c.node),t.id&&c.node.classList.add(t.id)}var d="right"===t.label.position?r.globals.gridWidth:0,u=this.annoCtx.graphics.drawText({x:d+t.label.offsetX,y:(null!=a?a:s)+t.label.offsetY-3,text:o,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});u.attr({rel:i}),e.appendChild(u.node)}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.map((function(e,a){t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),A=function(){function t(e){n(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new S(this.annoCtx)}return o(t,[{key:"addPointAnnotation",value:function(t,e,i){this.w;var a=this.helpers.getX1X2("x1",t),r=this.helpers.getY1Y2("y1",t);if(m.isNumber(a)){var n={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},s=this.annoCtx.graphics.drawMarker(a+t.marker.offsetX,r+t.marker.offsetY,n);e.appendChild(s.node);var o=t.label.text?t.label.text:"",l=this.annoCtx.graphics.drawText({x:a+t.label.offsetX,y:r+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:o,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(l.attr({rel:i}),e.appendChild(l.node),t.customSVG.SVG){var h=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});h.attr({transform:"translate(".concat(a+t.customSVG.offsetX,", ").concat(r+t.customSVG.offsetY,")")}),h.node.innerHTML=t.customSVG.SVG,e.appendChild(h.node)}if(t.image.path){var c=t.image.width?t.image.width:20,d=t.image.height?t.image.height:20;s=this.annoCtx.addImage({x:a+t.image.offsetX-c/2,y:r+t.image.offsetY-d/2,width:c,height:d,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&s.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&s.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t))}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}(),C={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},M=function(){function t(){n(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:0,mouseEnter:void 0,mouseLeave:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return o(t,[{key:"init",value:function(){return{annotations:{position:"front",yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[C],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0},stacked:!1,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(t){return new Date(t).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,rangeBarOverlap:!0,rangeBarGroupRows:!1,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal"}},bubble:{minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),T=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.graphics=new y(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new S(this),this.xAxisAnnotations=new _(this),this.yAxisAnnotations=new k(this),this.pointsAnnotations=new A(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return o(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),r=t.config.chart.animations.enabled,n=[e,i,a],s=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(n[o]),!r||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&s[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:s[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,r=t.text,n=t.textAnchor,s=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,f=t.strokeDashArray,p=t.borderRadius,g=t.borderColor,x=t.appendTo,m=void 0===x?".apexcharts-annotations":x,v=t.paddingLeft,b=void 0===v?4:v,y=t.paddingRight,w=void 0===y?4:y,S=t.paddingBottom,_=void 0===S?2:S,k=t.paddingTop,A=void 0===k?2:k,C=this.w,M=this.graphics.drawText({x:i,y:a,text:r,textAnchor:n||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||C.config.chart.fontFamily,foreColor:s||C.config.chart.foreColor,cssClass:c}),T=C.globals.dom.baseEl.querySelector(m);T&&T.appendChild(M.node);var P=M.bbox();if(r){var L=this.graphics.drawRect(P.x-b,P.y-A,P.width+b+w,P.height+_+A,p,d||"transparent",1,u,g,f);T.insertBefore(L.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,r=t.x,n=void 0===r?0:r,s=t.y,o=void 0===s?0:s,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,f=void 0===u?".apexcharts-annotations":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(n,o);var g=i.globals.dom.baseEl.querySelector(f);return g&&g.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,r=t.type,n=t.contextMethod,s=a,o=s.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations")),h=l.childNodes.length+1,c=new M,d=Object.assign({},"xaxis"===r?c.xAxisAnnotation:"yaxis"===r?c.yAxisAnnotation:c.pointAnnotation),u=m.extend(d,e);switch(r){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var f=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(f,u);return p&&l.insertBefore(p.node,f),i&&o.globals.memory.methodsToExec.push({context:s,id:u.id?u.id:m.randomId(),method:n,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");e.globals.memory.methodsToExec.map((function(t,i){"addText"!==t.label&&"addAnnotation"!==t.label||e.globals.memory.methodsToExec.splice(i,1)})),i=m.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),P=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0}return o(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),r=parseInt(e.globals.gridHeight,10),n=a>r?a:r,s=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=n+1,l=n):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");y.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",s),y.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w;return("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||"heatmap"===e.config.chart.type||"treemap"===e.config.chart.type?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(t){var e=this.w;this.opts=t;var i,a,r,n=this.w.config;this.seriesIndex=this.getSeriesIndex(t);var s=this.getFillColors()[this.seriesIndex];void 0!==e.globals.seriesColors[this.seriesIndex]&&(s=e.globals.seriesColors[this.seriesIndex]),"function"==typeof s&&(s=s({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:e}));var o=this.getFillType(this.seriesIndex),l=Array.isArray(n.fill.opacity)?n.fill.opacity[this.seriesIndex]:n.fill.opacity;t.color&&(s=t.color);var h=s;if(-1===s.indexOf("rgb")?s.length<9&&(h=m.hexToRgba(s,l)):s.indexOf("rgba")>-1&&(l=m.getOpacityFromRGBA(s)),t.opacity&&(l=t.opacity),"pattern"===o&&(a=this.handlePatternFill(a,s,l,h)),"gradient"===o&&(r=this.handleGradientFill(s,l,this.seriesIndex)),"image"===o){var c=n.fill.image.src,d=t.patternID?t.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(c)?t.seriesNumber<c.length?c[t.seriesNumber]:c[0]:c,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:"pattern".concat(e.globals.cuid).concat(t.seriesNumber+1).concat(d)}),i="url(#pattern".concat(e.globals.cuid).concat(t.seriesNumber+1).concat(d,")")}else i="gradient"===o?r:"pattern"===o?a:h;return t.solid&&(i=h),i}},{key:"getFillType",value:function(t){var e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}},{key:"getFillColors",value:function(){var t=this.w,e=t.config,i=this.opts,a=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?Array.isArray(t.globals.stroke.colors)?a=t.globals.stroke.colors:a.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?a=t.globals.fill.colors:a.push(t.globals.fill.colors):"line"===e.chart.type?Array.isArray(t.globals.stroke.colors)?a=t.globals.stroke.colors:a.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?a=t.globals.fill.colors:a.push(t.globals.fill.colors),void 0!==i.fillColors&&(a=[],Array.isArray(i.fillColors)?a=i.fillColors.slice():a.push(i.fillColors)),a}},{key:"handlePatternFill",value:function(t,e,i,a){var r=this.w.config,n=this.opts,s=new y(this.ctx),o=void 0===r.fill.pattern.strokeWidth?Array.isArray(r.stroke.width)?r.stroke.width[this.seriesIndex]:r.stroke.width:Array.isArray(r.fill.pattern.strokeWidth)?r.fill.pattern.strokeWidth[this.seriesIndex]:r.fill.pattern.strokeWidth,l=e;return Array.isArray(r.fill.pattern.style)?void 0!==r.fill.pattern.style[n.seriesNumber]?s.drawPattern(r.fill.pattern.style[n.seriesNumber],r.fill.pattern.width,r.fill.pattern.height,l,o,i):a:s.drawPattern(r.fill.pattern.style,r.fill.pattern.width,r.fill.pattern.height,l,o,i)}},{key:"handleGradientFill",value:function(t,e,i){var a,r=this.w.config,n=this.opts,s=new y(this.ctx),o=new m,l=r.fill.gradient.type,h=t,c=void 0===r.fill.gradient.opacityFrom?e:Array.isArray(r.fill.gradient.opacityFrom)?r.fill.gradient.opacityFrom[i]:r.fill.gradient.opacityFrom;h.indexOf("rgba")>-1&&(c=m.getOpacityFromRGBA(h));var d=void 0===r.fill.gradient.opacityTo?e:Array.isArray(r.fill.gradient.opacityTo)?r.fill.gradient.opacityTo[i]:r.fill.gradient.opacityTo;if(void 0===r.fill.gradient.gradientToColors||0===r.fill.gradient.gradientToColors.length)a="dark"===r.fill.gradient.shade?o.shadeColor(-1*parseFloat(r.fill.gradient.shadeIntensity),t.indexOf("rgb")>-1?m.rgb2hex(t):t):o.shadeColor(parseFloat(r.fill.gradient.shadeIntensity),t.indexOf("rgb")>-1?m.rgb2hex(t):t);else if(r.fill.gradient.gradientToColors[n.seriesNumber]){var u=r.fill.gradient.gradientToColors[n.seriesNumber];a=u,u.indexOf("rgba")>-1&&(d=m.getOpacityFromRGBA(u))}else a=t;if(r.fill.gradient.inverseColors){var f=h;h=a,a=f}return h.indexOf("rgb")>-1&&(h=m.rgb2hex(h)),a.indexOf("rgb")>-1&&(a=m.rgb2hex(a)),s.drawGradient(l,h,a,c,d,n.size,r.fill.gradient.stops,r.fill.gradient.colorStops,i)}}]),t}(),L=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.globals.series.length+1)for(var e=0;e<=t.globals.series.length;e++)void 0===t.globals.markers.size[e]&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map((function(e){return t.config.markers.size}))}},{key:"plotChartMarkers",value:function(t,e,i,a){var r,n=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=this.w,o=e,l=t,h=null,c=new y(this.ctx),d=s.config.markers.discrete&&s.config.markers.discrete.length;if((s.globals.markers.size[e]>0||n||d)&&(h=c.group({class:n||d?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(s.globals.cuid,")")),Array.isArray(l.x))for(var u=0;u<l.x.length;u++){var f=i;1===i&&0===u&&(f=0),1===i&&1===u&&(f=1);var p="apexcharts-marker";"line"!==s.config.chart.type&&"area"!==s.config.chart.type||s.globals.comboCharts||s.config.tooltip.intersect||(p+=" no-pointer-events");var g=Array.isArray(s.config.markers.size)?s.globals.markers.size[e]>0:s.config.markers.size>0;if(g||n||d){m.isNumber(l.y[u])?p+=" w".concat(m.randomId()):p="apexcharts-nullpoint";var x=this.getMarkerConfig({cssClass:p,seriesIndex:e,dataPointIndex:f});s.config.series[o].data[f]&&(s.config.series[o].data[f].fillColor&&(x.pointFillColor=s.config.series[o].data[f].fillColor),s.config.series[o].data[f].strokeColor&&(x.pointStrokeColor=s.config.series[o].data[f].strokeColor)),a&&(x.pSize=a),(r=c.drawMarker(l.x[u],l.y[u],x)).attr("rel",f),r.attr("j",f),r.attr("index",e),r.node.setAttribute("default-marker-size",x.pSize);var v=new b(this.ctx);v.setSelectionFilter(r,e,f),this.addEvents(r),h&&h.add(r)}else void 0===s.globals.pointsArray[e]&&(s.globals.pointsArray[e]=[]),s.globals.pointsArray[e].push([l.x[u],l.y[u]])}return h}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,r=void 0===a?null:a,n=t.finishRadius,s=void 0===n?null:n,o=this.w,l=this.getMarkerStyle(i),h=o.globals.markers.size[i],c=o.config.markers;return null!==r&&c.discrete.length&&c.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===r&&(l.pointStrokeColor=t.strokeColor,l.pointFillColor=t.fillColor,h=t.size,l.pointShape=t.shape)})),{pSize:null===s?h:s,pRadius:c.radius,width:Array.isArray(c.width)?c.width[i]:c.width,height:Array.isArray(c.height)?c.height[i]:c.height,pointStrokeWidth:Array.isArray(c.strokeWidth)?c.strokeWidth[i]:c.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(c.shape)?c.shape[i]:c.shape),class:e,pointStrokeOpacity:Array.isArray(c.strokeOpacity)?c.strokeOpacity[i]:c.strokeOpacity,pointStrokeDashArray:Array.isArray(c.strokeDashArray)?c.strokeDashArray[i]:c.strokeDashArray,pointFillOpacity:Array.isArray(c.fillOpacity)?c.fillOpacity[i]:c.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new y(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),D=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return o(t,[{key:"draw",value:function(t,e,i){var a=this.w,r=new y(this.ctx),n=i.realIndex,s=i.pointsPos,o=i.zRatio,l=i.elParent,h=r.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(s.x))for(var c=0;c<s.x.length;c++){var d=e+1,u=!0;0===e&&0===c&&(d=0),0===e&&1===c&&(d=1);var f=0,p=a.globals.markers.size[n];if(o!==1/0){p=a.globals.seriesZ[n][d]/o;var g=a.config.plotOptions.bubble;g.minBubbleRadius&&p<g.minBubbleRadius&&(p=g.minBubbleRadius),g.maxBubbleRadius&&p>g.maxBubbleRadius&&(p=g.maxBubbleRadius)}a.config.chart.animations.enabled||(f=p);var x=s.x[c],m=s.y[c];if(f=f||0,null!==m&&void 0!==a.globals.series[n][d]||(u=!1),u){var v=this.drawPoint(x,m,f,p,n,d,e);h.add(v)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,r,n,s){var o=this.w,l=r,h=new v(this.ctx),c=new b(this.ctx),d=new P(this.ctx),u=new L(this.ctx),f=new y(this.ctx),p=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:n,finishRadius:"bubble"===o.config.chart.type||o.globals.comboCharts&&o.config.series[r]&&"bubble"===o.config.series[r].type?a:null});a=p.pSize;var g,x=d.fillPath({seriesNumber:r,dataPointIndex:n,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[r][s]});if("circle"===p.shape?g=f.drawCircle(i):"square"!==p.shape&&"rect"!==p.shape||(g=f.drawRect(0,0,p.width-p.pointStrokeWidth/2,p.height-p.pointStrokeWidth/2,p.pRadius)),o.config.series[l].data[n]&&o.config.series[l].data[n].fillColor&&(x=o.config.series[l].data[n].fillColor),g.attr({x:t-p.width/2-p.pointStrokeWidth/2,y:e-p.height/2-p.pointStrokeWidth/2,cx:t,cy:e,fill:x,"fill-opacity":p.pointFillOpacity,stroke:p.pointStrokeColor,r:a,"stroke-width":p.pointStrokeWidth,"stroke-dasharray":p.pointStrokeDashArray,"stroke-opacity":p.pointStrokeOpacity}),o.config.chart.dropShadow.enabled){var m=o.config.chart.dropShadow;c.dropShadow(g,m,r)}if(!this.initialAnim||o.globals.dataChanged||o.globals.resized)o.globals.animationEnded=!0;else{var w=o.config.chart.animations.speed;h.animateMarker(g,0,"circle"===p.shape?a:{width:p.width,height:p.height},w,o.globals.easing,(function(){window.setTimeout((function(){h.animationCompleted(g)}),100)}))}if(o.globals.dataChanged&&"circle"===p.shape)if(this.dynamicAnim){var S,_,k,A,C=o.config.chart.animations.dynamicAnimation.speed;null!=(A=o.globals.previousPaths[r]&&o.globals.previousPaths[r][s])&&(S=A.x,_=A.y,k=void 0!==A.r?A.r:a);for(var M=0;M<o.globals.collapsedSeries.length;M++)o.globals.collapsedSeries[M].index===r&&(C=1,a=0);0===t&&0===e&&(a=0),h.animateCircle(g,{cx:S,cy:_,r:k},{cx:t,cy:e,r:a},C,o.globals.easing)}else g.attr({r:a});return g.attr({rel:n,j:n,index:r,"default-marker-size":a}),c.setSelectionFilter(g,r,n),u.addEvents(g),g.node.classList.add("apexcharts-marker"),g}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),E=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,r,n,s){var o=this.w,l=!1,h=new y(this.ctx).getTextRects(i,s),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,f=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][f];(t>p.x+p.width+2||e>p.y+p.height+2||t+c<p.x)&&(l=!0)}return(0===r||n)&&(l=!0),{x:t,y:e,textRects:h,drawnextLabel:l}}},{key:"drawDataLabel",value:function(t,e,i){var a=this,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,n=this.w,s=new y(this.ctx),o=n.config.dataLabels,l=0,h=0,c=i,d=null;if(!o.enabled||!Array.isArray(t.x))return d;d=s.group({class:"apexcharts-data-labels"});for(var u=0;u<t.x.length;u++)if(l=t.x[u]+o.offsetX,h=t.y[u]+o.offsetY+r,!isNaN(l)){1===i&&0===u&&(c=0),1===i&&1===u&&(c=1);var f=n.globals.series[e][c],p="",g=function(t){return n.config.dataLabels.formatter(t,{ctx:a.ctx,seriesIndex:e,dataPointIndex:c,w:n})};if("bubble"===n.config.chart.type){p=g(f=n.globals.seriesZ[e][c]),h=t.y[u];var x=new D(this.ctx),m=x.centerTextInBubble(h,e,c);h=m.y}else void 0!==f&&(p=g(f));this.plotDataLabelsText({x:l,y:h,text:p,i:e,j:c,parent:d,offsetCorrection:!0,dataLabelsConfig:n.config.dataLabels})}return d}},{key:"plotDataLabelsText",value:function(t){var e=this.w,i=new y(this.ctx),a=t.x,r=t.y,n=t.i,s=t.j,o=t.text,l=t.textAnchor,h=t.fontSize,c=t.parent,d=t.dataLabelsConfig,u=t.color,f=t.alwaysDrawDataLabel,p=t.offsetCorrection;if(!(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(n)<0)){var g={x:a,y:r,drawnextLabel:!0,textRects:null};p&&(g=this.dataLabelsCorrection(a,r,o,n,s,f,parseInt(d.style.fontSize,10))),e.globals.zoomed||(a=g.x,r=g.y),g.textRects&&(a<-10-g.textRects.width||a>e.globals.gridWidth+g.textRects.width+10)&&(o="");var x=e.globals.dataLabels.style.colors[n];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(x=e.globals.dataLabels.style.colors[s]),"function"==typeof x&&(x=x({series:e.globals.series,seriesIndex:n,dataPointIndex:s,w:e})),u&&(x=u);var m=d.offsetX,v=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(m=0,v=0),g.drawnextLabel){var w=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+m,y:r+v,foreColor:x,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"});if(w.attr({class:"apexcharts-datalabel",cx:a,cy:r}),d.dropShadow.enabled){var S=d.dropShadow;new b(this.ctx).dropShadow(w,S)}c.add(w),void 0===e.globals.lastDrawnDataLabelsIndexes[n]&&(e.globals.lastDrawnDataLabelsIndexes[n]=[]),e.globals.lastDrawnDataLabelsIndexes[n].push(s)}}}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,r=a.padding,n=a.padding/2,s=e.width,o=e.height,l=new y(this.ctx).drawRect(e.x-r,e.y-n/2,s+2*r,o+n,a.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,a.opacity,a.borderWidth,a.borderColor);return a.dropShadow.enabled&&new b(this.ctx).dropShadow(l,a.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i<e.length;i++){var a=e[i],r=a.getBBox(),n=null;if(r.width&&r.height&&(n=this.addBackgroundToDataLabel(a,r)),n){a.parentNode.insertBefore(n.node,a);var s=a.getAttribute("fill");!t.config.chart.animations.enabled||t.globals.resized||t.globals.dataChanged?n.attr({fill:s}):n.animate().attr({fill:s}),a.setAttribute("fill",t.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var t=this.w,e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=t.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),a=0;a<e.length;a++)i&&i.insertBefore(e[a],i.nextSibling)}}]),t}(),O=function(){function t(e){n(this,t),this.w=e.w,this.barCtx=e}return o(t,[{key:"handleBarDataLabels",value:function(t){var e=t.x,i=t.y,a=t.y1,r=t.y2,n=t.i,s=t.j,o=t.realIndex,l=t.series,h=t.barHeight,c=t.barWidth,d=t.barYPosition,u=t.visibleSeries,f=t.renderedPath,p=this.w,g=new y(this.barCtx.ctx),x=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[o]:this.barCtx.strokeWidth,m=e+parseFloat(c*u),v=i+parseFloat(h*u);p.globals.isXNumeric&&!p.globals.isBarHorizontal&&(m=e+parseFloat(c*(u+1)),v=i+parseFloat(h*(u+1))-x);var b,w=e,S=i,_=p.config.dataLabels,k=this.barCtx.barOptions.dataLabels;void 0!==d&&this.barCtx.isRangeBar&&(v=d,S=d);var A=_.offsetX,C=_.offsetY,M={width:0,height:0};if(p.config.dataLabels.enabled){var T=this.barCtx.series[n][s];M=g.getTextRects(p.globals.yLabelFormatters[0](T),parseFloat(_.style.fontSize))}var P={x:e,y:i,i:n,j:s,renderedPath:f,bcx:m,bcy:v,barHeight:h,barWidth:c,textRects:M,strokeWidth:x,dataLabelsX:w,dataLabelsY:S,barDataLabelsConfig:k,offX:A,offY:C};return b=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(P):this.calculateColumnsDataLabelsPosition(P),f.attr({cy:b.bcy,cx:b.bcx,j:s,val:l[n][s],barHeight:h,barWidth:c}),this.drawCalculatedDataLabels({x:b.dataLabelsX,y:b.dataLabelsY,val:this.barCtx.isRangeBar?[a,r]:l[n][s],i:o,j:s,barWidth:c,barHeight:h,textRects:M,dataLabelsConfig:_})}},{key:"calculateColumnsDataLabelsPosition",value:function(t){var e,i=this.w,a=t.i,r=t.j,n=t.y,s=t.bcx,o=t.barWidth,l=t.barHeight,h=t.textRects,c=t.dataLabelsY,d=t.barDataLabelsConfig,u=t.strokeWidth,f=t.offX,p=t.offY;l=Math.abs(l);var g="vertical"===i.config.plotOptions.bar.dataLabels.orientation;s-=u/2;var x=i.globals.gridWidth/i.globals.dataPoints;e=i.globals.isXNumeric?s-o/2+f:s-x+o/2+f,g&&(e=e+h.height/2-u/2-2);var m=this.barCtx.series[a][r]<0,v=n;switch(this.barCtx.isReversed&&(v=n-l+(m?2*l:0),n-=l),d.position){case"center":c=g?m?v+l/2+p:v+l/2-p:m?v-l/2+h.height/2+p:v+l/2+h.height/2-p;break;case"bottom":c=g?m?v+l+p:v+l-p:m?v-l+h.height+u+p:v+l-h.height/2+u-p;break;case"top":c=g?m?v+p:v-p:m?v-h.height/2-p:v+h.height+p}return i.config.chart.stacked||(c<0?c=0+u:c+h.height/3>i.globals.gridHeight&&(c=i.globals.gridHeight-u)),{bcx:s,bcy:n,dataLabelsX:e,dataLabelsY:c}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,r=t.j,n=t.bcy,s=t.barHeight,o=t.barWidth,l=t.textRects,h=t.dataLabelsX,c=t.strokeWidth,d=t.barDataLabelsConfig,u=t.offX,f=t.offY,p=e.globals.gridHeight/e.globals.dataPoints;o=Math.abs(o);var g=n-(this.barCtx.isRangeBar?0:p)+s/2+l.height/2+f-3,x=this.barCtx.series[a][r]<0,m=i;switch(this.barCtx.isReversed&&(m=i+o-(x?2*o:0),i=e.globals.gridWidth-o),d.position){case"center":h=x?m+o/2-u:Math.max(l.width/2,m-o/2)+u;break;case"bottom":h=x?m+o-c-Math.round(l.width/2)-u:m-o+c+Math.round(l.width/2)+u;break;case"top":h=x?m-c+Math.round(l.width/2)-u:m-c-Math.round(l.width/2)+u}return e.config.chart.stacked||(h<0?h=h+l.width+c:h+l.width/2>e.globals.gridWidth&&(h=e.globals.gridWidth-l.width-c)),{bcx:i,bcy:n,dataLabelsX:h,dataLabelsY:g}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,r=t.val,n=t.i,s=t.j,o=t.textRects,l=t.barHeight,h=t.barWidth,c=t.dataLabelsConfig,d=this.w,u="rotate(0)";"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&(u="rotate(-90, ".concat(e,", ").concat(i,")"));var f=new E(this.barCtx.ctx),p=new y(this.barCtx.ctx),g=c.formatter,x=null,m=d.globals.collapsedSeriesIndices.indexOf(n)>-1;if(c.enabled&&!m){x=p.group({class:"apexcharts-data-labels",transform:u});var v="";void 0!==r&&(v=g(r,{seriesIndex:n,dataPointIndex:s,w:d}));var b=d.globals.series[n][s]<0,w=d.config.plotOptions.bar.dataLabels.position;"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&("top"===w&&(c.textAnchor=b?"end":"start"),"center"===w&&(c.textAnchor="middle"),"bottom"===w&&(c.textAnchor=b?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&h<p.getTextRects(v,parseFloat(c.style.fontSize)).width&&(v=""),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?o.width/1.6>Math.abs(h)&&(v=""):o.height/1.6>Math.abs(l)&&(v=""));var S=a({},c);this.barCtx.isHorizontal&&r<0&&("start"===c.textAnchor?S.textAnchor="end":"end"===c.textAnchor&&(S.textAnchor="start")),f.plotDataLabelsText({x:e,y:i,text:v,i:n,j:s,parent:x,dataLabelsConfig:S,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}}]),t}(),I=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return o(t,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(t){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(m.escapeString(t),"']"))}},{key:"isSeriesHidden",value:function(t){var e=this.getSeriesByName(t),i=parseInt(e.getAttribute("data:realIndex"),10);return{isHidden:e.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(t,e){var i=this.w;function a(i){for(var a=0;a<i.length;a++)i[a].index===e&&t.node.classList.add("apexcharts-series-collapsed")}a(i.globals.collapsedSeries),a(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(t){var e=this.isSeriesHidden(t);return this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,e.isHidden),e.isHidden}},{key:"showSeries",value:function(t){var e=this.isSeriesHidden(t);e.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,!0)}},{key:"hideSeries",value:function(t){var e=this.isSeriesHidden(t);e.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(e.realIndex,!1)}},{key:"resetSeries",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,r=m.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),a.config.series=r,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(r,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i<t.length;i++)e.globals.collapsedSeriesIndices.indexOf(i)>-1&&(t[i].data=[]);return t}},{key:"toggleSeriesOnHover",value:function(t,e){var i=this.w;e||(e=t.target);var a=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===t.type){var r=parseInt(e.getAttribute("rel"),10)-1,n=null,s=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(n=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(r,"']")),s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(r,"']"))):n=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"']")):n=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"'] path"));for(var o=0;o<a.length;o++)a[o].classList.add(this.legendInactiveClass);null!==n&&(i.globals.axisCharts||n.parentNode.classList.remove(this.legendInactiveClass),n.classList.remove(this.legendInactiveClass),null!==s&&s.classList.remove(this.legendInactiveClass))}else if("mouseout"===t.type)for(var l=0;l<a.length;l++)a[l].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(t,e){var i=this,a=this.w,r=a.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),n=function(t){for(var e=0;e<r.length;e++)r[e].classList[t](i.legendInactiveClass)};if("mousemove"===t.type){var s=parseInt(e.getAttribute("rel"),10)-1;n("add"),function(t){for(var e=0;e<r.length;e++){var a=parseInt(r[e].getAttribute("val"),10);a>=t.from&&a<=t.to&&r[e].classList.remove(i.legendInactiveClass)}}(a.config.plotOptions.heatmap.colorScale.ranges[s])}else"mouseout"===t.type&&n("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",i=this.w,a=0;if(i.config.series.length>1)for(var r=i.config.series.map((function(e,a){var r=!1;return t&&(r="bar"===i.config.series[a].type||"column"===i.config.series[a].type),e.data&&e.data.length>0&&!r?a:-1})),n="asc"===e?0:r.length-1;"asc"===e?n<r.length:n>=0;"asc"===e?n++:n--)if(-1!==r[n]){a=r[n];break}return a}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var r=e[i].childNodes,n={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},s=0;s<r.length;s++)if(r[s].hasAttribute("pathTo")){var o=r[s].getAttribute("pathTo");n.paths.push({d:o})}t.globals.previousPaths.push(n)}t.globals.previousPaths=[],["line","area","bar","rangebar","candlestick","radar"].forEach((function(i){for(var a,r=(a=i,t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(a,"-series .apexcharts-series"))),n=0;n<r.length;n++)e(r,n,i)})),this.handlePrevBubbleScatterPaths("bubble"),this.handlePrevBubbleScatterPaths("scatter");var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series"));if(i.length>0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],r=function(t){var e=function(e){return i[t].getAttribute(e)},r={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:r,color:i[t].getAttribute("color")})},n=0;n<i.length;n++)r(n);t.globals.previousPaths.push(a)},r=0;r<i.length;r++)a(r);t.globals.axisCharts||(t.globals.previousPaths=t.globals.series)}},{key:"handlePrevBubbleScatterPaths",value:function(t){var e=this.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t,"-series .apexcharts-series"));if(i.length>0)for(var a=0;a<i.length;a++){for(var r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t,"-series .apexcharts-series[data\\:realIndex='").concat(a,"'] circle")),n=[],s=0;s<r.length;s++)n.push({x:r[s].getAttribute("cx"),y:r[s].getAttribute("cy"),r:r[s].getAttribute("r")});e.globals.previousPaths.push(n)}}},{key:"clearPreviousPaths",value:function(){var t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var t=this.w,e=t.config.noData,i=new y(this.ctx),a=t.globals.svgWidth/2,r=t.globals.svgHeight/2,n="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(a=10,n="start"):"right"===e.align&&(a=t.globals.svgWidth-10,n="end"),"top"===e.verticalAlign?r=50:"bottom"===e.verticalAlign&&(r=t.globals.svgHeight-50),a+=e.offsetX,r=r+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){var s=i.drawText({x:a,y:r,text:e.text,textAnchor:n,fontSize:e.style.fontSize,fontFamily:e.style.fontFamily,foreColor:e.style.color,opacity:1,class:"apexcharts-text-nodata"});t.globals.dom.Paper.add(s)}}},{key:"setNullSeriesToZeroValues",value:function(t){for(var e=this.w,i=0;i<t.length;i++)if(0===t[i].length)for(var a=0;a<t[e.globals.maxValsInArrayIndex].length;a++)t[i].push(0);return t}},{key:"hasAllSeriesEqualX",value:function(){for(var t=!0,e=this.w,i=this.filteredSeriesX(),a=0;a<i.length-1;a++)if(i[a][0]!==i[a+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}},{key:"filteredSeriesX",value:function(){return this.w.globals.seriesX.map((function(t){return t.length>0?t:[]}))}}]),t}(),z=function(){function t(e){n(this,t),this.w=e.w,this.barCtx=e}return o(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i<t.length;i++)if(t[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;a<t[i].length;a++)e.globals.seriesX[i][a]>e.globals.minX&&e.globals.seriesX[i][a]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],this.barCtx.radiusOnSeriesNumber=t.length-1,e.globals.comboCharts||this.checkZeroSeries({series:t})}},{key:"initialPositions",value:function(){var t,e,i,a,r,n,s,o,l=this.w,h=l.globals.dataPoints;this.barCtx.isRangeBar&&(h=l.globals.labels.length);var c=this.barCtx.seriesLen;if(l.config.plotOptions.bar.rangeBarGroupRows&&(c=1),this.barCtx.isHorizontal)r=(i=l.globals.gridHeight/h)/c,l.globals.isXNumeric&&(r=(i=l.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),r=r*parseInt(this.barCtx.barOptions.barHeight,10)/100,o=this.barCtx.baseLineInvertedY+l.globals.padHorizontal+(this.barCtx.isReversed?l.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),e=(i-r*this.barCtx.seriesLen)/2;else{if(a=l.globals.gridWidth/this.barCtx.visibleItems,l.config.xaxis.convertedCatToNumeric&&(a=l.globals.gridWidth/l.globals.dataPoints),n=a/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100,l.globals.isXNumeric){var d=this.barCtx.xRatio;l.config.xaxis.convertedCatToNumeric&&(d=this.barCtx.initialXRatio),l.globals.minXDiff&&.5!==l.globals.minXDiff&&l.globals.minXDiff/d>0&&(a=l.globals.minXDiff/d),(n=a/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(n=1)}s=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),t=l.globals.padHorizontal+(a-n*this.barCtx.seriesLen)/2}return{x:t,y:e,yDivision:i,xDivision:a,barHeight:r,barWidth:n,zeroH:s,zeroW:o}}},{key:"getPathFillColor",value:function(t,e,i,a){var r=this.w,n=new P(this.barCtx.ctx),s=null,o=this.barCtx.barOptions.distributed?i:e;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(s=a.color)})),r.config.series[e].data[i]&&r.config.series[e].data[i].fillColor&&(s=r.config.series[e].data[i].fillColor),n.fillPath({seriesNumber:this.barCtx.barOptions.distributed?o:a,dataPointIndex:i,color:s,value:t[e][i]})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,r=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,r.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,r=t.x2,n=t.y1,s=t.y2,o=t.elSeries,l=this.w,h=new y(this.barCtx.ctx),c=new I(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==n?n:0,void 0!==r?r:l.globals.gridWidth,void 0!==s?s:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e=t.barWidth,i=t.barXPosition,a=t.yRatio,r=t.y1,n=t.y2,s=t.strokeWidth,o=t.series,l=t.realIndex,h=t.i,c=t.j,d=t.w,u=new y(this.barCtx.ctx);(s=Array.isArray(s)?s[l]:s)||(s=0);var f={barWidth:e,strokeWidth:s,yRatio:a,barXPosition:i,y1:r,y2:n},p=this.getRoundedBars(d,f,o,h,c),g=i,x=i+e,m=u.move(g,r),v=u.move(g,r),b=u.line(x-s,r);return d.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(l,c,!1)),m=m+u.line(g,p.y2)+p.pathWithRadius+u.line(x-s,p.y2)+b+b+"z",v=v+u.line(g,r)+b+b+b+b+b+u.line(g,r),d.config.chart.stacked&&(this.barCtx.yArrj.push(p.y2),this.barCtx.yArrjF.push(Math.abs(r-p.y2)),this.barCtx.yArrjVal.push(this.barCtx.series[h][c])),{pathTo:m,pathFrom:v}}},{key:"getBarpaths",value:function(t){var e=t.barYPosition,i=t.barHeight,a=t.x1,r=t.x2,n=t.strokeWidth,s=t.series,o=t.realIndex,l=t.i,h=t.j,c=t.w,d=new y(this.barCtx.ctx);(n=Array.isArray(n)?n[o]:n)||(n=0);var u={barHeight:i,strokeWidth:n,barYPosition:e,x2:r,x1:a},f=this.getRoundedBars(c,u,s,l,h),p=d.move(a,e),g=d.move(a,e);c.globals.previousPaths.length>0&&(g=this.barCtx.getPreviousPath(o,h,!1));var x=e,m=e+i,v=d.line(a,m-n);return p=p+d.line(f.x2,x)+f.pathWithRadius+d.line(f.x2,m-n)+v+v+"z",g=g+d.line(a,x)+v+v+v+v+v+d.line(a,x),c.config.chart.stacked&&(this.barCtx.xArrj.push(f.x2),this.barCtx.xArrjF.push(Math.abs(a-f.x2)),this.barCtx.xArrjVal.push(this.barCtx.series[l][h])),{pathTo:p,pathFrom:g}}},{key:"getRoundedBars",value:function(t,e,i,a,r){var n=new y(this.barCtx.ctx),s=0,o=t.config.plotOptions.bar.borderRadius,l=Array.isArray(o);if(s=l?o[a>o.length-1?o.length-1:a]:o,t.config.chart.stacked&&i.length>1&&a!==this.barCtx.radiusOnSeriesNumber&&!l&&(s=0),this.barCtx.isHorizontal){var h="",c=e.x2;if(Math.abs(e.x1-e.x2)<s&&(s=Math.abs(e.x1-e.x2)),void 0!==i[a][r]||null!==i[a][r]){var d=this.barCtx.isReversed?i[a][r]>0:i[a][r]<0;d&&(s*=-1),c-=s,h=n.quadraticCurve(c+s,e.barYPosition,c+s,e.barYPosition+(d?-1*s:s))+n.line(c+s,e.barYPosition+e.barHeight-e.strokeWidth-(d?-1*s:s))+n.quadraticCurve(c+s,e.barYPosition+e.barHeight-e.strokeWidth,c,e.barYPosition+e.barHeight-e.strokeWidth)}return{pathWithRadius:h,x2:c}}var u="",f=e.y2;if(Math.abs(e.y1-e.y2)<s&&(s=Math.abs(e.y1-e.y2)),void 0!==i[a][r]||null!==i[a][r]){var p=i[a][r]<0;p&&(s*=-1),f+=s,u=n.quadraticCurve(e.barXPosition,f-s,e.barXPosition+(p?-1*s:s),f-s)+n.line(e.barXPosition+e.barWidth-e.strokeWidth-(p?-1*s:s),f-s)+n.quadraticCurve(e.barXPosition+e.barWidth-e.strokeWidth,f-s,e.barXPosition+e.barWidth-e.strokeWidth,f)}return{pathWithRadius:u,y2:f}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a<e.length;a++){for(var r=0,n=0;n<e[i.globals.maxValsInArrayIndex].length;n++)r+=e[a][n];0===r&&this.barCtx.zeroSerieses.push(a)}for(var s=e.length-1;s>=0;s--)this.barCtx.zeroSerieses.indexOf(s)>-1&&s===this.radiusOnSeriesNumber&&(this.barCtx.radiusOnSeriesNumber-=1);for(var o=e.length-1;o>=0;o--)i.globals.collapsedSeriesIndices.indexOf(this.barCtx.radiusOnSeriesNumber)>-1&&(this.barCtx.radiusOnSeriesNumber-=1)}},{key:"getXForValue",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=i?e:null;return null!=t&&(a=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),a}},{key:"getYForValue",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=i?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,r){var n=this,s=this.w,o=[];return s.globals.seriesGoals[a]&&s.globals.seriesGoals[a][r]&&Array.isArray(s.globals.seriesGoals[a][r])&&s.globals.seriesGoals[a][r].forEach((function(a){var r;o.push((l(r={},t,"x"===t?n.getXForValue(a.value,e,!1):n.getYForValue(a.value,i,!1)),l(r,"attrs",a),r))})),o}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,r=t.goalY,n=t.barWidth,s=t.barHeight,o=new y(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"}),h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:s/2,a=i+e+s/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)})):Array.isArray(r)&&r.forEach((function(t){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:n/2,a=e+i+n/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)})),l}}]),t}(),N=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.barOptions=a.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=a.config.stroke.width,this.isNullValue=!1,this.isRangeBar=a.globals.seriesRangeBar.length&&this.isHorizontal,this.xyRatios=i,null!==this.xyRatios&&(this.xRatio=i.xRatio,this.initialXRatio=i.initialXRatio,this.yRatio=i.yRatio,this.invertedXRatio=i.invertedXRatio,this.invertedYRatio=i.invertedYRatio,this.baseLineY=i.baseLineY,this.baseLineInvertedY=i.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0,this.barHelpers=new z(this)}return o(t,[{key:"draw",value:function(t,e){var i=this.w,r=new y(this.ctx),n=new w(this.ctx,i);t=n.getLogSeries(t),this.series=t,this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var s=r.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var o=0,l=0;o<t.length;o++,l++){var h,c,d,u,f=void 0,p=void 0,g=[],x=[],v=i.globals.comboCharts?e[o]:o,b=r.group({class:"apexcharts-series",rel:o+1,seriesName:m.escapeString(i.globals.seriesNames[v]),"data:realIndex":v});this.ctx.series.addCollapsedClassToSeries(b,v),t[o].length>0&&(this.visibleI=this.visibleI+1);var S=0,_=0;this.yRatio.length>1&&(this.yaxisIndex=v),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();p=k.y,S=k.barHeight,c=k.yDivision,u=k.zeroW,f=k.x,_=k.barWidth,h=k.xDivision,d=k.zeroH,this.horizontal||x.push(f+_/2);for(var A=r.group({class:"apexcharts-datalabels","data:realIndex":v}),C=r.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),M=0;M<i.globals.dataPoints;M++){var T=this.barHelpers.getStrokeWidth(o,M,v),P=null,L={indexes:{i:o,j:M,realIndex:v,bc:l},x:f,y:p,strokeWidth:T,elSeries:b};this.isHorizontal?(P=this.drawBarPaths(a(a({},L),{},{barHeight:S,zeroW:u,yDivision:c})),_=this.series[o][M]/this.invertedYRatio):(P=this.drawColumnPaths(a(a({},L),{},{xDivision:h,barWidth:_,zeroH:d})),S=this.series[o][M]/this.yRatio[this.yaxisIndex]);var D=this.barHelpers.drawGoalLine({barXPosition:P.barXPosition,barYPosition:P.barYPosition,goalX:P.goalX,goalY:P.goalY,barHeight:S,barWidth:_});D&&C.add(D),p=P.y,f=P.x,M>0&&x.push(f+_/2),g.push(p);var E=this.barHelpers.getPathFillColor(t,o,M,v);this.renderSeries({realIndex:v,pathFill:E,j:M,i:o,pathFrom:P.pathFrom,pathTo:P.pathTo,strokeWidth:T,elSeries:b,x:f,y:p,series:t,barHeight:S,barWidth:_,elDataLabelsWrap:A,elGoalsMarkers:C,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[v]=x,i.globals.seriesYvalues[v]=g,s.add(b)}return s}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,r=t.j,n=t.i,s=t.pathFrom,o=t.pathTo,l=t.strokeWidth,h=t.elSeries,c=t.x,d=t.y,u=t.y1,f=t.y2,p=t.series,g=t.barHeight,x=t.barWidth,m=t.barYPosition,v=t.elDataLabelsWrap,w=t.elGoalsMarkers,S=t.visibleSeries,_=t.type,k=this.w,A=new y(this.ctx);a||(a=this.barOptions.distributed?k.globals.stroke.colors[r]:k.globals.stroke.colors[e]),k.config.series[n].data[r]&&k.config.series[n].data[r].strokeColor&&(a=k.config.series[n].data[r].strokeColor),this.isNullValue&&(i="none");var C=r/k.config.chart.animations.animateGradually.delay*(k.config.chart.animations.speed/k.globals.dataPoints)/2.4,M=A.renderPaths({i:n,j:r,realIndex:e,pathFrom:s,pathTo:o,stroke:a,strokeWidth:l,strokeLineCap:k.config.stroke.lineCap,fill:i,animationDelay:C,initialSpeed:k.config.chart.animations.speed,dataChangeSpeed:k.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(_,"-area")});M.attr("clip-path","url(#gridRectMask".concat(k.globals.cuid,")"));var T=k.config.forecastDataPoints;T.count>0&&r>=k.globals.dataPoints-T.count&&(M.node.setAttribute("stroke-dasharray",T.dashArray),M.node.setAttribute("stroke-width",T.strokeWidth),M.node.setAttribute("fill-opacity",T.fillOpacity)),void 0!==u&&void 0!==f&&(M.attr("data-range-y1",u),M.attr("data-range-y2",f)),new b(this.ctx).setSelectionFilter(M,e,r),h.add(M);var P=new O(this).handleBarDataLabels({x:c,y:d,y1:u,y2:f,i:n,j:r,series:p,realIndex:e,barHeight:g,barWidth:x,barYPosition:m,renderedPath:M,visibleSeries:S});return null!==P&&v.add(P),h.add(v),w&&h.add(w),h}},{key:"drawBarPaths",value:function(t){var e=t.indexes,i=t.barHeight,a=t.strokeWidth,r=t.zeroW,n=t.x,s=t.y,o=t.yDivision,l=t.elSeries,h=this.w,c=e.i,d=e.j;h.globals.isXNumeric&&(s=(h.globals.seriesX[c][d]-h.globals.minX)/this.invertedXRatio-i);var u=s+i*this.visibleI;n=this.barHelpers.getXForValue(this.series[c][d],r);var f=this.barHelpers.getBarpaths({barYPosition:u,barHeight:i,x1:r,x2:n,strokeWidth:a,series:this.series,realIndex:e.realIndex,i:c,j:d,w:h});return h.globals.isXNumeric||(s+=o),this.barHelpers.barBackground({j:d,i:c,y1:u-i*this.visibleI,y2:i*this.seriesLen,elSeries:l}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x:n,y:s,goalX:this.barHelpers.getGoalValues("x",r,null,c,d),barYPosition:u}}},{key:"drawColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,r=t.xDivision,n=t.barWidth,s=t.zeroH,o=t.strokeWidth,l=t.elSeries,h=this.w,c=e.realIndex,d=e.i,u=e.j,f=e.bc;if(h.globals.isXNumeric){var p=c;h.globals.seriesX[c].length||(p=h.globals.maxValsInArrayIndex),i=(h.globals.seriesX[p][u]-h.globals.minX)/this.xRatio-n*this.seriesLen/2}var g=i+n*this.visibleI;a=this.barHelpers.getYForValue(this.series[d][u],s);var x=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:n,y1:s,y2:a,strokeWidth:o,series:this.series,realIndex:e.realIndex,i:d,j:u,w:h});return h.globals.isXNumeric||(i+=r),this.barHelpers.barBackground({bc:f,j:u,i:d,x1:g-o/2-n*this.visibleI,x2:n*this.seriesLen+o/2,elSeries:l}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:i,y:a,goalY:this.barHelpers.getGoalValues("y",null,s,d,u),barXPosition:g}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,r=0;r<a.globals.previousPaths.length;r++){var n=a.globals.previousPaths[r];n.paths&&n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[r].paths[e]&&(i=a.globals.previousPaths[r].paths[e].d)}return i}}]),t}(),Y=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return o(t,[{key:"isValidDate",value:function(t){return!isNaN(this.parseDate(t))}},{key:"getTimeStamp",value:function(t){return Date.parse(t)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime():t}},{key:"getDate",value:function(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}},{key:"parseDate",value:function(t){var e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);var i=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(t,e){var i=this.w.globals.locale,a=this.w.config.xaxis.labels.datetimeUTC,r=["\0"].concat(p(i.months)),n=[""].concat(p(i.shortMonths)),s=[""].concat(p(i.days)),o=[""].concat(p(i.shortDays));function l(t,e){var i=t+"";for(e=e||2;i.length<e;)i="0"+i;return i}var h=a?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+h)).replace(/(^|[^\\])yy/g,"$1"+h.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+h);var c=(a?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+r[0])).replace(/(^|[^\\])MMM/g,"$1"+n[0])).replace(/(^|[^\\])MM/g,"$1"+l(c))).replace(/(^|[^\\])M/g,"$1"+c);var d=a?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+s[0])).replace(/(^|[^\\])ddd/g,"$1"+o[0])).replace(/(^|[^\\])dd/g,"$1"+l(d))).replace(/(^|[^\\])d/g,"$1"+d);var u=a?t.getUTCHours():t.getHours(),f=u>12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(f))).replace(/(^|[^\\])h/g,"$1"+f);var g=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(g))).replace(/(^|[^\\])m/g,"$1"+g);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var m=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(m,3)),m=Math.round(m/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(m)),m=Math.round(m/10);var v=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+m)).replace(/(^|[^\\])TT+/g,"$1"+v)).replace(/(^|[^\\])T/g,"$1"+v.charAt(0));var b=v.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+b)).replace(/(^|[^\\])t/g,"$1"+b.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var S=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(S)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var _=(a?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(s[0],"g"),s[_])).replace(new RegExp(o[0],"g"),o[_])).replace(new RegExp(r[0],"g"),r[c])).replace(new RegExp(n[0],"g"),n[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var r=this.getDate(t),n=this.getDate(e),s=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(s[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(s[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(s[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(s[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(s[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(s[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(s[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=m.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),F=function(t){h(i,N);var e=f(i);function i(){return n(this,i),e.apply(this,arguments)}return o(i,[{key:"draw",value:function(t,e){var i=this.w,r=new y(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var n=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),s=0;s<t.length;s++){var o,l,h,c=void 0,d=void 0,u=void 0,f=i.globals.comboCharts?e[s]:s,p=r.group({class:"apexcharts-series",seriesName:m.escapeString(i.globals.seriesNames[f]),rel:s+1,"data:realIndex":f});this.ctx.series.addCollapsedClassToSeries(p,f),t[s].length>0&&(this.visibleI=this.visibleI+1);var g=0,x=0;this.yRatio.length>1&&(this.yaxisIndex=f);var v=this.barHelpers.initialPositions();d=v.y,h=v.zeroW,c=v.x,x=v.barWidth,o=v.xDivision,l=v.zeroH;for(var b=r.group({class:"apexcharts-datalabels","data:realIndex":f}),w=r.group({class:"apexcharts-rangebar-goals-markers",style:"pointer-events: none"}),S=0;S<i.globals.dataPoints;S++){var _=this.barHelpers.getStrokeWidth(s,S,f),k=this.seriesRangeStart[s][S],A=this.seriesRangeEnd[s][S],C=null,M=null,T={x:c,y:d,strokeWidth:_,elSeries:p};if(u=v.yDivision,g=v.barHeight,this.isHorizontal){M=d+g*this.visibleI;var P=this.seriesLen;i.config.plotOptions.bar.rangeBarGroupRows&&(P=1);var L=(u-g*P)/2;if(void 0===i.config.series[s].data[S])break;if(i.config.series[s].data[S].x){var D=this.detectOverlappingBars({i:s,j:S,barYPosition:M,srty:L,barHeight:g,yDivision:u,initPositions:v});g=D.barHeight,M=D.barYPosition}x=(C=this.drawRangeBarPaths(a({indexes:{i:s,j:S,realIndex:f},barHeight:g,barYPosition:M,zeroW:h,yDivision:u,y1:k,y2:A},T))).barWidth}else g=(C=this.drawRangeColumnPaths(a({indexes:{i:s,j:S,realIndex:f},zeroH:l,barWidth:x,xDivision:o},T))).barHeight;var E=this.barHelpers.drawGoalLine({barXPosition:C.barXPosition,barYPosition:M,goalX:C.goalX,goalY:C.goalY,barHeight:g,barWidth:x});E&&w.add(E),d=C.y,c=C.x;var O=this.barHelpers.getPathFillColor(t,s,S,f),I=i.globals.stroke.colors[f];this.renderSeries({realIndex:f,pathFill:O,lineFill:I,j:S,i:s,x:c,y:d,y1:k,y2:A,pathFrom:C.pathFrom,pathTo:C.pathTo,strokeWidth:_,elSeries:p,series:t,barHeight:g,barYPosition:M,barWidth:x,elDataLabelsWrap:b,elGoalsMarkers:w,visibleSeries:this.visibleI,type:"rangebar"})}n.add(p)}return n}},{key:"detectOverlappingBars",value:function(t){var e=t.i,i=t.j,a=t.barYPosition,r=t.srty,n=t.barHeight,s=t.yDivision,o=t.initPositions,l=this.w,h=[],c=l.config.series[e].data[i].rangeName,d=l.config.series[e].data[i].x,u=l.globals.labels.indexOf(d),f=l.globals.seriesRangeBar[e].findIndex((function(t){return t.x===d&&t.overlaps.length>0}));return a=l.config.plotOptions.bar.rangeBarGroupRows?r+s*u:r+n*this.visibleI+s*u,f>-1&&!l.config.plotOptions.bar.rangeBarOverlap&&(h=l.globals.seriesRangeBar[e][f].overlaps).indexOf(c)>-1&&(a=(n=o.barHeight/h.length)*this.visibleI+s*(100-parseInt(this.barOptions.barHeight,10))/100/2+n*(this.visibleI+h.indexOf(c))+s*u),{barYPosition:a,barHeight:n}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x;t.strokeWidth;var a=t.xDivision,r=t.barWidth,n=t.zeroH,s=this.w,o=e.i,l=e.j,h=this.yRatio[this.yaxisIndex],c=e.realIndex,d=this.getRangeValue(c,l),u=Math.min(d.start,d.end),f=Math.max(d.start,d.end);s.globals.isXNumeric&&(i=(s.globals.seriesX[o][l]-s.globals.minX)/this.xRatio-r/2);var p=i+r*this.visibleI;void 0===this.series[o][l]||null===this.series[o][l]?u=n:(u=n-u/h,f=n-f/h);var g=Math.abs(f-u),x=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:r,y1:u,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:e.realIndex,i:c,j:l,w:s});return s.globals.isXNumeric||(i+=a),{pathTo:x.pathTo,pathFrom:x.pathFrom,barHeight:g,x:i,y:f,goalY:this.barHelpers.getGoalValues("y",null,n,o,l),barXPosition:p}}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,r=t.y2,n=t.yDivision,s=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=l+a/this.invertedYRatio,d=l+r/this.invertedYRatio,u=Math.abs(d-c),f=this.barHelpers.getBarpaths({barYPosition:o,barHeight:s,x1:c,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:e.realIndex,realIndex:e.realIndex,j:e.j,w:h});return h.globals.isXNumeric||(i+=n),{pathTo:f.pathTo,pathFrom:f.pathFrom,barWidth:u,x:d,goalX:this.barHelpers.getGoalValues("x",l,null,e.realIndex,e.j),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}},{key:"getTooltipValues",value:function(t){var e=t.ctx,i=t.seriesIndex,a=t.dataPointIndex,r=t.y1,n=t.y2,s=t.w,o=s.globals.seriesRangeStart[i][a],l=s.globals.seriesRangeEnd[i][a],h=s.globals.labels[a],c=s.config.series[i].name?s.config.series[i].name:"",d=s.config.tooltip.y.formatter,u=s.config.tooltip.y.title.formatter,f={w:s,seriesIndex:i,dataPointIndex:a,start:o,end:l};"function"==typeof u&&(c=u(c,f)),Number.isFinite(r)&&Number.isFinite(n)&&(o=r,l=n,s.config.series[i].data[a].x&&(h=s.config.series[i].data[a].x+":"),"function"==typeof d&&(h=d(h,f)));var p="",g="",x=s.globals.colors[i];if(void 0===s.config.tooltip.x.formatter)if("datetime"===s.config.xaxis.type){var m=new Y(e);p=m.formatDate(m.getDate(o),s.config.tooltip.x.format),g=m.formatDate(m.getDate(l),s.config.tooltip.x.format)}else p=o,g=l;else p=s.config.tooltip.x.formatter(o),g=s.config.tooltip.x.formatter(l);return{start:o,end:l,startVal:p,endVal:g,ylabel:h,color:x,seriesName:c}}},{key:"buildCustomTooltipHTML",value:function(t){return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+t.color+'">'+(t.seriesName||"")+'</span></div><div> <span class="category">'+t.ylabel+' </span> <span class="value start-value">'+t.start+'</span> <span class="separator">-</span> <span class="value end-value">'+t.end+"</span></div></div>"}}]),i}(),R=function(){function t(e){n(this,t),this.opts=e}return o(t,[{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0,m.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,r=e.w;return t._getBoxTooltip(r,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,r=e.w;return t._getBoxTooltip(r,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,r=e.w,n=r.globals.seriesRangeStart[i][a];return r.globals.seriesRangeEnd[i][a]-n},background:{enabled:!1},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=new F(t.ctx,null),i=e.getTooltipValues(t),a=i.color,r=i.seriesName,n=i.ylabel,s=i.startVal,o=i.endVal;return e.buildCustomTooltipHTML({color:a,seriesName:r,ylabel:n,start:s,end:o})}(t):function(t){var e=new F(t.ctx,null),i=e.getTooltipValues(t),a=i.color,r=i.seriesName,n=i.ylabel,s=i.start,o=i.end;return e.buildCustomTooltipHTML({color:a,seriesName:r,ylabel:n,start:s,end:o})}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"area",value:function(){return{stroke:{width:4},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"brush",value:function(t){return m.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return m.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,r=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(r=i.map((function(t){return Array.isArray(t)?t:String(t)}))),r&&r.length&&(t.xaxis.labels.formatter=function(t){return m.isNumber(t)?a(r[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,r){var n=t.globals.seriesCandleO[e][i],s=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==r?'<div class="apexcharts-custom-tooltip">\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": <strong>").concat(t.globals.series[e][i],"</strong>\n </div>"):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(t.config.chart.type,'">')+"<div>".concat(a[0],': <span class="value">')+n+"</span></div>"+"<div>".concat(a[1],': <span class="value">')+s+"</span></div>"+(o?"<div>".concat(a[2],': <span class="value">')+o+"</span></div>":"")+"<div>".concat(a[3],': <span class="value">')+l+"</span></div>"+"<div>".concat(a[4],': <span class="value">')+h+"</span></div></div>"}}]),t}(),H=function(){function t(e){n(this,t),this.opts=e}return o(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new M,n=new R(i);this.chartType=i.chart.type,"histogram"===this.chartType&&(i.chart.type="bar",i=m.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},i)),i=this.extendYAxis(i),i=this.extendAnnotations(i);var s=a.init(),o={};if(i&&"object"===r(i)){var l={};l=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","histogram","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?n[i.chart.type]():n.line(),i.chart.brush&&i.chart.brush.enabled&&(l=n.brush(l)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=n.stacked100(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),((i=this.checkForCatToNumericXAxis(this.chartType,l,i)).chart.sparkline&&i.chart.sparkline.enabled||window.Apex.chart&&window.Apex.chart.sparkline&&window.Apex.chart.sparkline.enabled)&&(l=n.sparkline(l)),o=m.extend(s,l)}var h=m.extend(o,window.Apex);return s=m.extend(h,i),this.handleUserInputErrors(s)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a=new R(i),r=("bar"===t||"boxPlot"===t)&&i.plotOptions&&i.plotOptions.bar&&i.plotOptions.bar.horizontal,n="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,s="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,o=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return r||n||!s||"between"===o||(i=a.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new M;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=m.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[m.extend(i.yAxis,t.yaxis)]:t.yaxis=m.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var r=t.series;return e&&!r&&(r=e.config.series),a&&r.length!==t.yaxis.length&&r.length&&(t.yaxis=r.map((function(e,a){if(e.name||(r[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=r[a].name,t.yaxis[a];var n=m.extend(i.yAxis,t.yaxis[0]);return n.show=!1,n}))),a&&r.length>1&&r.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new M;return t.annotations.yaxis=m.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new M;return t.annotations.xaxis=m.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new M;return t.annotations.points=m.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.chart.background||(t.chart.background="#424242"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),X=function(){function t(){n(this,t)}return o(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRangeBar=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasGroups=!1,t.groups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.xaxisLabelsCount=0,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=m.extend({},t),e.initialSeries=m.clone(t.series),e.lastXAxis=m.clone(e.initialConfig.xaxis),e.lastYAxis=m.clone(e.initialConfig.yaxis),e}}]),t}(),W=function(){function t(e){n(this,t),this.opts=e}return o(t,[{key:"init",value:function(){var t=new H(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new X).init(t)}}}]),t}(),V=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new w(this.ctx)}return o(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new I(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new I(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,r="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,n=0;n<t[e].data.length;n++)if(void 0!==t[e].data[n][1]&&(Array.isArray(t[e].data[n][1])&&4===t[e].data[n][1].length&&!r?this.twoDSeries.push(m.parseNumber(t[e].data[n][1][3])):t[e].data[n].length>=5?this.twoDSeries.push(m.parseNumber(t[e].data[n][4])):this.twoDSeries.push(m.parseNumber(t[e].data[n][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var s=new Date(t[e].data[n][0]);s=new Date(s).getTime(),this.twoDSeriesX.push(s)}else this.twoDSeriesX.push(t[e].data[n][0]);for(var o=0;o<t[e].data.length;o++)void 0!==t[e].data[o][2]&&(this.threeDSeries.push(t[e].data[o][2]),a.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(t,e){var i=this.w.config,a=this.w.globals,r=new Y(this.ctx),n=e;a.collapsedSeriesIndices.indexOf(e)>-1&&(n=this.activeSeriesIndex);for(var s=0;s<t[e].data.length;s++)void 0!==t[e].data[s].y&&(Array.isArray(t[e].data[s].y)?this.twoDSeries.push(m.parseNumber(t[e].data[s].y[t[e].data[s].y.length-1])):this.twoDSeries.push(m.parseNumber(t[e].data[s].y))),void 0!==t[e].data[s].goals&&Array.isArray(t[e].data[s].goals)?(void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),this.seriesGoals[e].push(t[e].data[s].goals)):(void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),this.seriesGoals[e].push(null));for(var o=0;o<t[n].data.length;o++){var l="string"==typeof t[n].data[o].x,h=Array.isArray(t[n].data[o].x),c=!h&&!!r.isValidDate(t[n].data[o].x.toString());if(l||c)if(l||i.xaxis.convertedCatToNumeric){var d=a.isBarHorizontal&&a.isRangeData;"datetime"!==i.xaxis.type||d?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t[n].data[o].x)):this.twoDSeriesX.push(r.parseDate(t[n].data[o].x))}else"datetime"===i.xaxis.type?this.twoDSeriesX.push(r.parseDate(t[n].data[o].x.toString())):(a.dataFormatXNumeric=!0,a.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(t[n].data[o].x)));else h?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t[n].data[o].x)):(a.isXNumeric=!0,a.dataFormatXNumeric=!0,this.twoDSeriesX.push(t[n].data[o].x))}if(t[e].data[0]&&void 0!==t[e].data[0].z){for(var u=0;u<t[e].data.length;u++)this.threeDSeries.push(t[e].data[u].z);a.isDataXYZ=!0}}},{key:"handleRangeData",value:function(t,e){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(a=this.handleRangeDataFormat("xy",t,e)),i.seriesRangeStart.push(a.start),i.seriesRangeEnd.push(a.end),i.seriesRangeBar.push(a.rangeUniques),i.seriesRangeBar.forEach((function(t,e){t&&t.forEach((function(t,e){t.y.forEach((function(e,i){for(var a=0;a<t.y.length;a++)if(i!==a){var r=e.y1,n=e.y2,s=t.y[a].y1;r<=t.y[a].y2&&s<=n&&(t.overlaps.indexOf(e.rangeName)<0&&t.overlaps.push(e.rangeName),t.overlaps.indexOf(t.y[a].rangeName)<0&&t.overlaps.push(t.y[a].rangeName))}}))}))})),a}},{key:"handleCandleStickBoxData",value:function(t,e){var i=this.w.globals,a={};return this.isFormat2DArray()?a=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(a=this.handleCandleStickBoxDataFormat("xy",t,e)),i.seriesCandleO[e]=a.o,i.seriesCandleH[e]=a.h,i.seriesCandleM[e]=a.m,i.seriesCandleL[e]=a.l,i.seriesCandleC[e]=a.c,a}},{key:"handleRangeDataFormat",value:function(t,e,i){var a=[],r=[],n=e[i].data.filter((function(t,e,i){return e===i.findIndex((function(e){return e.x===t.x}))})).map((function(t,e){return{x:t.x,overlaps:[],y:[]}})),s="Please provide [Start, End] values in valid format. Read more https://apexcharts.com/docs/series/#rangecharts",o=new I(this.ctx).getActiveConfigSeriesIndex();if("array"===t){if(2!==e[o].data[0][1].length)throw new Error(s);for(var l=0;l<e[i].data.length;l++)a.push(e[i].data[l][1][0]),r.push(e[i].data[l][1][1])}else if("xy"===t){if(2!==e[o].data[0].y.length)throw new Error(s);for(var h=function(t){var s=m.randomId(),o=e[i].data[t].x,l={y1:e[i].data[t].y[0],y2:e[i].data[t].y[1],rangeName:s};e[i].data[t].rangeName=s;var h=n.findIndex((function(t){return t.x===o}));n[h].y.push(l),a.push(l.y1),r.push(l.y2)},c=0;c<e[i].data.length;c++)h(c)}return{start:a,end:r,rangeUniques:n}}},{key:"handleCandleStickBoxDataFormat",value:function(t,e,i){var a=this.w,r="boxPlot"===a.config.chart.type||"boxPlot"===a.config.series[i].type,n=[],s=[],o=[],l=[],h=[];if("array"===t)if(r&&6===e[i].data[0].length||!r&&5===e[i].data[0].length)for(var c=0;c<e[i].data.length;c++)n.push(e[i].data[c][1]),s.push(e[i].data[c][2]),r?(o.push(e[i].data[c][3]),l.push(e[i].data[c][4]),h.push(e[i].data[c][5])):(l.push(e[i].data[c][3]),h.push(e[i].data[c][4]));else for(var d=0;d<e[i].data.length;d++)Array.isArray(e[i].data[d][1])&&(n.push(e[i].data[d][1][0]),s.push(e[i].data[d][1][1]),r?(o.push(e[i].data[d][1][2]),l.push(e[i].data[d][1][3]),h.push(e[i].data[d][1][4])):(l.push(e[i].data[d][1][2]),h.push(e[i].data[d][1][3])));else if("xy"===t)for(var u=0;u<e[i].data.length;u++)Array.isArray(e[i].data[u].y)&&(n.push(e[i].data[u].y[0]),s.push(e[i].data[u].y[1]),r?(o.push(e[i].data[u].y[2]),l.push(e[i].data[u].y[3]),h.push(e[i].data[u].y[4])):(l.push(e[i].data[u].y[2]),h.push(e[i].data[u].y[3])));return{o:n,h:s,m:o,l:l,c:h}}},{key:"parseDataAxisCharts",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,r=this.w.globals,n=new Y(i),s=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();r.isRangeBar="rangeBar"===a.chart.type&&r.isBarHorizontal,r.hasGroups="category"===a.xaxis.type&&void 0!==a.xaxis.group&&void 0!==a.xaxis.group.groups&&a.xaxis.group.groups.length>0,r.hasGroups&&(r.groups=a.xaxis.group.groups);for(var o=function(){for(var t=0;t<s.length;t++)if("string"==typeof s[t]){if(!n.isValidDate(s[t]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");e.twoDSeriesX.push(n.parseDate(s[t]))}else e.twoDSeriesX.push(s[t])},l=0;l<t.length;l++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[l].data)return void console.error("It is a possibility that you may have not included 'data' property in series.");if("rangeBar"!==a.chart.type&&"rangeArea"!==a.chart.type&&"rangeBar"!==t[l].type&&"rangeArea"!==t[l].type||(r.isRangeData=!0,this.handleRangeData(t,l)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,l):this.isFormatXY()&&this.handleFormatXY(t,l),"candlestick"!==a.chart.type&&"candlestick"!==t[l].type&&"boxPlot"!==a.chart.type&&"boxPlot"!==t[l].type||this.handleCandleStickBoxData(t,l),r.series.push(this.twoDSeries),r.labels.push(this.twoDSeriesX),r.seriesX.push(this.twoDSeriesX),r.seriesGoals=this.seriesGoals,l!==this.activeSeriesIndex||this.fallbackToCategory||(r.isXNumeric=!0);else{"datetime"===a.xaxis.type?(r.isXNumeric=!0,o(),r.seriesX.push(this.twoDSeriesX)):"numeric"===a.xaxis.type&&(r.isXNumeric=!0,s.length>0&&(this.twoDSeriesX=s,r.seriesX.push(this.twoDSeriesX))),r.labels.push(this.twoDSeriesX);var h=t[l].data.map((function(t){return m.parseNumber(t)}));r.series.push(h)}r.seriesZ.push(this.threeDSeries),void 0!==t[l].name?r.seriesNames.push(t[l].name):r.seriesNames.push("series-"+parseInt(l+1,10)),void 0!==t[l].color?r.seriesColors.push(t[l].color):r.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a<e.series.length;a++)void 0===e.seriesNames[a]&&e.seriesNames.push("series-"+(a+1));return this.w}},{key:"handleExternalLabelsData",value:function(t){var e=this.w.config,i=this.w.globals;e.xaxis.categories.length>0?i.labels=e.xaxis.categories:e.labels.length>0?i.labels=e.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRangeBar.length&&(i.seriesRangeBar.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=i.labels.filter((function(t,e,i){return i.indexOf(t)===e}))),e.xaxis.convertedCatToNumeric&&(new R(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var r=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),n=r.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),s=0;s<r[n].length;s++)a.push(s+1);else for(var o=0;o<e.series[e.maxValsInArrayIndex].length;o++)a.push(o+1);e.seriesX=[];for(var l=0;l<t.length;l++)e.seriesX.push(a);e.isXNumeric=!0}if(0===a.length){a=e.axisCharts?[]:e.series.map((function(t,e){return e+1}));for(var h=0;h<t.length;h++)e.seriesX.push(a)}e.labels=a,i.xaxis.convertedCatToNumeric&&(e.categoryLabels=a.map((function(t){return i.xaxis.labels.formatter(t)}))),e.noLabelsProvided=!0}},{key:"parseData",value:function(t){var e=this.w,i=e.config,a=e.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),a.axisCharts?this.parseDataAxisCharts(t):this.parseDataNonAxisCharts(t),this.coreUtils.getLargestSeries(),"bar"===i.chart.type&&i.chart.stacked){var r=new I(this.ctx);a.series=r.setNullSeriesToZeroValues(a.series)}this.coreUtils.getSeriesTotals(),a.axisCharts&&this.coreUtils.getStackedSeriesTotals(),this.coreUtils.getPercentSeries(),a.dataFormatXNumeric||a.isXNumeric&&("numeric"!==i.xaxis.type||0!==i.labels.length||0!==i.xaxis.categories.length)||this.handleExternalLabelsData(t);for(var n=this.coreUtils.getCategoryLabels(a.labels),s=0;s<n.length;s++)if(Array.isArray(n[s])){a.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var t=this,e=this.w;e.globals.ignoreYAxisIndexes=e.globals.collapsedSeries.map((function(i,a){if(t.w.globals.isMultipleYAxis&&!e.config.chart.stacked)return i.index}))}}]),t}(),B=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return o(t,[{key:"xLabelFormat",value:function(t,e,i,a){var r=this.w;if("datetime"===r.config.xaxis.type&&void 0===r.config.xaxis.labels.formatter&&void 0===r.config.tooltip.x.formatter){var n=new Y(this.ctx);return n.formatDate(n.getDate(e),r.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;return m.isNumber(t)&&(t=0!==a.globals.yValueDecimal?t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal):a.globals.maxYArr[i]-a.globals.minYArr[i]<5?t.toFixed(1):t.toFixed(0)),t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(m.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(m.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(r){return e.globals.xyCharts?Array.isArray(r)?r.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(r,i,a):r}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),j=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"getLabel",value:function(t,e,i,a){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",s=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,f=new B(this.ctx),p=l;s&&(h=f.xLabelFormat(c,l,p,{i:a,dateFormatter:new Y(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new Y(this.ctx).formatDate,w:o})));var g=function(t){var i=null;return e.forEach((function(t){"month"===t.unit?i="year":"day"===t.unit?i="month":"hour"===t.unit?i="day":"minute"===t.unit&&(i="hour")})),i===t};e.length>0?(u=g(e[a].unit),i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var x=new y(this.ctx),m={};m=o.globals.rotateXLabels&&s?x.getTextRects(h,parseInt(n,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):x.getTextRects(h,parseInt(n,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&(0===h.indexOf("NaN")||0===h.toLowerCase().indexOf("invalid")||h.toLowerCase().indexOf("infinity")>=0||r.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,r=a.config.xaxis.tickAmount;return"dataPoints"===r&&(r=Math.round(a.globals.gridWidth/120)),r>i||t%Math.round(i/(r+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,r){var n=this.w;if(0===t&&n.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&n.globals.skipLastTimelinelabel&&(e.text=""),n.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var s=r[r.length-1];e.x<s.textRect.width/(n.globals.rotateXLabels?Math.abs(n.config.xaxis.labels.rotate)/12:1.01)+s.x&&(e.text="")}return e}},{key:"checkForReversedLabels",value:function(t,e){var i=this.w;return i.config.yaxis[t]&&i.config.yaxis[t].reversed&&e.reverse(),e}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=new w(this.ctx);return!e.config.yaxis[t].show||!e.config.yaxis[t].showForNullSeries&&i.isSeriesNull(t)&&-1===e.globals.collapsedSeriesIndices.indexOf(t)}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,r,n,s){var o=this.w,l=new y(this.ctx),h=o.globals.translateY;if(a.show&&e>0){!0===o.config.yaxis[r].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=h+e/10+o.config.yaxis[r].labels.offsetY-1;o.globals.isBarHorizontal&&(d=n*c),"heatmap"===o.config.chart.type&&(d+=n/2);var u=l.drawLine(t+i.offsetX-a.width+a.offsetX,d+a.offsetY,t+i.offsetX+a.offsetX,d+a.offsetY,a.color);s.add(u),h+=n}}}}]),t}(),G=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"fixSvgStringForIe11",value:function(t){if(!m.isIE11())return t.replace(/ /g," ");var e=0,i=t.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(t){return 2==++e?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':t}));return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(t){var e=this.w.globals.dom.Paper.svg();if(1!==t){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,t),e=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(e)}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var t=this.getSvgString(),e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,r=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var n=document.createElement("canvas");n.width=a.globals.svgWidth*r,n.height=parseInt(a.globals.dom.elWrap.style.height,10)*r;var s="transparent"===a.config.chart.background?"#fff":a.config.chart.background,o=n.getContext("2d");o.fillStyle=s,o.fillRect(0,0,n.width*r,n.height*r);var l=e.getSvgString(r);if(window.canvg&&m.isIE11()){var h=window.canvg.Canvg.fromString(o,l,{ignoreClear:!0,ignoreDimensions:!0});h.start();var c=n.msToBlob();h.stop(),i({blob:c})}else{var d="data:image/svg+xml,"+encodeURIComponent(l),u=new Image;u.crossOrigin="anonymous",u.onload=function(){if(o.drawImage(u,0,0),n.msToBlob){var t=n.msToBlob();i({blob:t})}else{var e=n.toDataURL("image/png");i({imgURI:e})}},u.src=d}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var t=this;this.dataURI().then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.columnDelimiter,r=t.lineDelimiter,n=void 0===r?"\n":r,s=this.w,o=[],l=[],h="",c=new V(this.ctx),d=new j(this.ctx),u=function(t){var i="";if(s.globals.axisCharts){if("category"===s.config.xaxis.type||s.config.xaxis.convertedCatToNumeric)if(s.globals.isBarHorizontal){var r=s.globals.yLabelFormatters[0],n=new I(e.ctx).getActiveConfigSeriesIndex();i=r(s.globals.labels[t],{seriesIndex:n,dataPointIndex:t,w:s})}else i=d.getLabel(s.globals.labels,s.globals.timescaleLabels,0,t).text;"datetime"===s.config.xaxis.type&&(s.config.xaxis.categories.length?i=s.config.xaxis.categories[t]:s.config.labels.length&&(i=s.config.labels[t]))}else i=s.config.labels[t];return Array.isArray(i)&&(i=i.join(" ")),m.isNumber(i)?i:i.split(a).join("")};o.push(s.config.chart.toolbar.export.csv.headerCategory),i.map((function(t,e){var i=t.name?t.name:"series-".concat(e);s.globals.axisCharts&&o.push(i.split(a).join("")?i.split(a).join(""):"series-".concat(e))})),s.globals.axisCharts||(o.push(s.config.chart.toolbar.export.csv.headerValue),l.push(o.join(a))),i.map((function(t,e){s.globals.axisCharts?function(t,e){if(o.length&&0===e&&l.push(o.join(a)),t.data&&t.data.length)for(var r=0;r<t.data.length;r++){o=[];var n=u(r);if(n||(c.isFormatXY()?n=i[e].data[r].x:c.isFormat2DArray()&&(n=i[e].data[r]?i[e].data[r][0]:"")),0===e){o.push((d=n,"datetime"===s.config.xaxis.type&&String(d).length>=10?s.config.chart.toolbar.export.csv.dateFormatter(n):m.isNumber(n)?n:n.split(a).join("")));for(var h=0;h<s.globals.series.length;h++)o.push(s.globals.series[h][r])}("candlestick"===s.config.chart.type||t.type&&"candlestick"===t.type)&&(o.pop(),o.push(s.globals.seriesCandleO[e][r]),o.push(s.globals.seriesCandleH[e][r]),o.push(s.globals.seriesCandleL[e][r]),o.push(s.globals.seriesCandleC[e][r])),("boxPlot"===s.config.chart.type||t.type&&"boxPlot"===t.type)&&(o.pop(),o.push(s.globals.seriesCandleO[e][r]),o.push(s.globals.seriesCandleH[e][r]),o.push(s.globals.seriesCandleM[e][r]),o.push(s.globals.seriesCandleL[e][r]),o.push(s.globals.seriesCandleC[e][r])),"rangeBar"===s.config.chart.type&&(o.pop(),o.push(s.globals.seriesRangeStart[e][r]),o.push(s.globals.seriesRangeEnd[e][r])),o.length&&l.push(o.join(a))}var d}(t,e):((o=[]).push(s.globals.labels[e].split(a).join("")),o.push(s.globals.series[e]),l.push(o.join(a)))})),h+=l.join(n),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+h),s.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(t,e,i){var a=document.createElement("a");a.href=t,a.download=(e||this.w.globals.chartID)+i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}]),t}(),U=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.axesUtils=new j(e),this.xaxisLabels=i.globals.labels.slice(),i.globals.timescaleLabels.length>0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight+1,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return o(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new y(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var r=[],n=0;n<this.xaxisLabels.length;n++)r.push(this.xaxisLabels[n]);if(this.drawXAxisLabelAndGroup(!0,e,a,r,t.globals.isXNumeric,(function(t,e){return e})),t.globals.hasGroups){var s=t.globals.groups;r=[];for(var o=0;o<s.length;o++)r.push(s[o].title);var l={};t.config.xaxis.group.style&&(l.xaxisFontSize=t.config.xaxis.group.style.fontSize,l.xaxisFontFamily=t.config.xaxis.group.style.fontFamily,l.xaxisForeColors=t.config.xaxis.group.style.colors,l.fontWeight=t.config.xaxis.group.style.fontWeight,l.cssClass=t.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,e,a,r,!1,(function(t,e){return s[t].cols*e}),l)}if(void 0!==t.config.xaxis.title.text){var h=e.group({class:"apexcharts-xaxis-title"}),c=e.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+t.globals.xAxisLabelsHeight+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});h.add(c),i.add(h)}if(t.config.xaxis.axisBorder.show){var d=t.globals.barPadForNumericAxis,u=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-d,this.offY,this.xaxisBorderWidth+d,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);i.add(u)}return i}},{key:"drawXAxisLabelAndGroup",value:function(t,e,i,a,r,n){var s,o=this,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,f=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,m=d.globals.padHorizontal,v=a.length,b="category"===d.config.xaxis.type?d.globals.dataPoints:v;if(r){var y=b>1?b-1:b;s=d.globals.gridWidth/y,m=m+n(0,s)/2+d.config.xaxis.labels.offsetX}else s=d.globals.gridWidth/b,m=m+n(0,s)+d.config.xaxis.labels.offsetX;for(var w=function(r){var l=m-n(r,s)/2+d.config.xaxis.labels.offsetX;0===r&&1===v&&s/2===m&&1===b&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,r,h,u,t),w=28;if(d.globals.rotateXLabels&&t&&(w=22),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(r,y,v):o.axesUtils.checkForOverflowingLabels(r,y,v,h,c),t&&y.text&&d.globals.xaxisLabelsCount++,d.config.xaxis.labels.show){var S=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:g,fontSize:u,fontFamily:f,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+r-1]:p[r]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(S),t){var _=document.createElementNS(d.globals.SVGNS,"title");_.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,S.node.appendChild(_),""!==y.text&&(h.push(y.text),c.push(y))}}r<v-1&&(m+=n(r+1,s))},S=0;S<=v-1;S++)w(S)}},{key:"drawXaxisInversed",value:function(t){var e,i,a=this,r=this.w,n=new y(this.ctx),s=r.config.yaxis[0].opposite?r.globals.translateYAxisX[t]:0,o=n.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),l=n.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+s+", 0)"});o.add(l);var h=[];if(r.config.yaxis[t].show)for(var c=0;c<this.xaxisLabels.length;c++)h.push(this.xaxisLabels[c]);e=r.globals.gridHeight/h.length,i=-e/2.2;var d=r.globals.yLabelFormatters[0],u=r.config.yaxis[0].labels;if(u.show)for(var f=function(s){var o=void 0===h[s]?"":h[s];o=d(o,{seriesIndex:t,dataPointIndex:s,w:r});var c=a.axesUtils.getYAxisForeColor(u.style.colors,t),f=0;Array.isArray(o)&&(f=o.length/2*parseInt(u.style.fontSize,10));var p=n.drawText({x:u.offsetX-15,y:i+e+u.offsetY-f,text:o,textAnchor:a.yaxis.opposite?"start":"end",foreColor:Array.isArray(c)?c[s]:c,fontSize:u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+u.style.cssClass});l.add(p);var g=document.createElementNS(r.globals.SVGNS,"title");if(g.textContent=Array.isArray(o)?o.join(" "):o,p.node.appendChild(g),0!==r.config.yaxis[t].labels.rotate){var x=n.rotateAroundCenter(p.node);p.node.setAttribute("transform","rotate(".concat(r.config.yaxis[t].labels.rotate," 0 ").concat(x.y,")"))}i+=e},p=0;p<=h.length-1;p++)f(p);if(void 0!==r.config.yaxis[0].title.text){var g=n.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+s+", 0)"}),x=n.drawText({x:0,y:r.globals.gridHeight/2,text:r.config.yaxis[0].title.text,textAnchor:"middle",foreColor:r.config.yaxis[0].title.style.color,fontSize:r.config.yaxis[0].title.style.fontSize,fontWeight:r.config.yaxis[0].title.style.fontWeight,fontFamily:r.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+r.config.yaxis[0].title.style.cssClass});g.add(x),o.add(g)}var m=0;this.isCategoryBarHorizontal&&r.config.yaxis[0].opposite&&(m=r.globals.gridWidth);var v=r.config.xaxis.axisBorder;if(v.show){var b=n.drawLine(r.globals.padHorizontal+v.offsetX+m,1+v.offsetY,r.globals.padHorizontal+v.offsetX+m,r.globals.gridHeight+v.offsetY,v.color,0);o.add(b)}return r.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(m,h.length,r.config.yaxis[0].axisBorder,r.config.yaxis[0].axisTicks,0,e,o),o}},{key:"drawXaxisTicks",value:function(t,e,i){var a=this.w,r=t;if(!(t<0||t-2>a.globals.gridWidth)){var n=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+n+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=n-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var s=new y(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,n+a.config.xaxis.offsetY,r+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(s),s.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var r=0;r<i;r++)a=this.xaxisLabels[r].position,e.push(a);else for(var n=i,s=0;s<n;s++){var o=n;t.globals.isXNumeric&&"bar"!==t.config.chart.type&&(o-=1),a+=t.globals.gridWidth/o,e.push(a)}return e}},{key:"xAxisLabelCorrections",value:function(){var t=this.w,e=new y(this.ctx),i=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(t.globals.rotateXLabels||t.config.xaxis.labels.rotateAlways)for(var s=0;s<a.length;s++){var o=e.rotateAroundCenter(a[s]);o.y=o.y-1,o.x=o.x+1,a[s].setAttribute("transform","rotate(".concat(t.config.xaxis.labels.rotate," ").concat(o.x," ").concat(o.y,")")),a[s].setAttribute("text-anchor","end"),i.setAttribute("transform","translate(0, ".concat(-10,")"));var l=a[s].childNodes;t.config.xaxis.labels.trim&&Array.prototype.forEach.call(l,(function(i){e.placeTextWithEllipsis(i,i.textContent,t.globals.xAxisLabelsHeight-("bottom"===t.config.legend.position?20:10))}))}else!function(){for(var i=t.globals.gridWidth/(t.globals.labels.length+1),r=0;r<a.length;r++){var n=a[r].childNodes;t.config.xaxis.labels.trim&&"datetime"!==t.config.xaxis.type&&Array.prototype.forEach.call(n,(function(t){e.placeTextWithEllipsis(t,t.textContent,i)}))}}();if(r.length>0){var h=r[r.length-1].getBBox(),c=r[0].getBBox();h.x<-20&&r[r.length-1].parentNode.removeChild(r[r.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&r[0].parentNode.removeChild(r[0]);for(var d=0;d<n.length;d++)e.placeTextWithEllipsis(n[d],n[d].textContent,t.config.yaxis[0].labels.maxWidth-2*parseFloat(t.config.yaxis[0].title.style.fontSize)-20)}}}]),t}(),$=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.xaxisLabels=i.globals.labels.slice(),this.axesUtils=new j(e),this.isRangeBar=i.globals.seriesRangeBar.length,i.globals.timescaleLabels.length>0&&(this.xaxisLabels=i.globals.timescaleLabels.slice())}return o(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new y(this.ctx);null===t&&(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),r=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(r),t.add(a),t}},{key:"drawGrid",value:function(){var t=null;return this.w.globals.axisCharts&&(t=this.renderGrid(),this.drawGridArea(t.el)),t}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new y(this.ctx),a=Array.isArray(t.config.stroke.width)?0:t.config.stroke.width;if(Array.isArray(t.config.stroke.width)){var r=0;t.config.stroke.width.forEach((function(t){r=Math.max(r,t)})),a=r}e.dom.elGridRectMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elForecastMask.setAttribute("id","forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(e.cuid));var n=t.config.chart.type,s=0,o=0;("bar"===n||"rangeBar"===n||"candlestick"===n||"boxPlot"===n||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(s=t.config.grid.padding.left,o=t.config.grid.padding.right,e.barPadForNumericAxis>s&&(s=e.barPadForNumericAxis,o=e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(-a/2-s-2,-a/2,e.gridWidth+a+o+s+4,e.gridHeight+a,0,"#fff");var l=t.globals.markers.largestSize+1;e.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,e.gridWidth+4*l,e.gridHeight+4*l,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var h=e.dom.baseEl.querySelector("defs");h.appendChild(e.dom.elGridRectMask),h.appendChild(e.dom.elForecastMask),h.appendChild(e.dom.elNonForecastMask),h.appendChild(e.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,r=t.x2,n=t.y2,s=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===s-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({x1:i,y1:a,x2:r,y2:n,parent:o});var h=0;if(l.globals.hasGroups&&(void 0===l.config.xaxis.tickAmount||"dataPoints"===l.config.xaxis.tickAmount)&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d<e&&u<c.length;u++)d+=c[u].cols;d===e&&(h=.6*l.globals.xAxisLabelsHeight)}}new U(this.ctx).drawXaxisTicks(i,h,this.elg)}}},{key:"_drawGridLine",value:function(t){var e=t.x1,i=t.y1,a=t.x2,r=t.y2,n=t.parent,s=this.w,o=n.node.classList.contains("apexcharts-gridlines-horizontal"),l=s.config.grid.strokeDashArray,h=s.globals.barPadForNumericAxis,c=new y(this).drawLine(e-(o?h:0),i,a+(o?h:0),r,s.config.grid.borderColor,l);c.node.classList.add("apexcharts-gridline"),n.add(c)}},{key:"_drawGridBandRect",value:function(t){var e=t.c,i=t.x1,a=t.y1,r=t.x2,n=t.y2,s=t.type,o=this.w,l=new y(this.ctx),h=o.globals.barPadForNumericAxis;if("column"!==s||"datetime"!==o.config.xaxis.type){var c=o.config.grid[s].colors[e],d=l.drawRect(i-("row"===s?h:0),a,r+("row"===s?2*h:0),n,0,c,o.config.grid[s].opacity);this.elg.add(d),d.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),d.node.classList.add("apexcharts-grid-".concat(s))}}},{key:"_drawXYLines",value:function(t){var e=this,i=t.xCount,a=t.tickAmount,r=this.w;if(r.config.grid.xaxis.lines.show||r.config.xaxis.axisTicks.show){var n,s=r.globals.padHorizontal,o=r.globals.gridHeight;r.globals.timescaleLabels.length?function(t){for(var a=t.xC,r=t.x1,n=t.y1,s=t.x2,o=t.y2,l=0;l<a;l++)r=e.xaxisLabels[l].position,s=e.xaxisLabels[l].position,e._drawGridLines({i:l,x1:r,y1:n,x2:s,y2:o,xCount:i,parent:e.elgridLinesV})}({xC:i,x1:s,y1:0,x2:n,y2:o}):(r.globals.isXNumeric&&(i=r.globals.xAxisScale.result.length),r.config.xaxis.convertedCatToNumeric&&(i=r.globals.xaxisLabelsCount),function(t){var a=t.xC,n=t.x1,s=t.y1,o=t.x2,l=t.y2;if(void 0!==r.config.xaxis.tickAmount&&"dataPoints"!==r.config.xaxis.tickAmount)r.globals.dom.baseEl.querySelectorAll(".apexcharts-text.apexcharts-xaxis-label tspan:not(:empty)").forEach((function(t,a){var r=t.getBBox();e._drawGridLines({i:a,x1:r.x+r.width/2,y1:s,x2:r.x+r.width/2,y2:l,xCount:i,parent:e.elgridLinesV})}));else for(var h=0;h<a+(r.globals.isXNumeric?0:1);h++)0===h&&1===a&&1===r.globals.dataPoints&&(o=n=r.globals.gridWidth/2),e._drawGridLines({i:h,x1:n,y1:s,x2:o,y2:l,xCount:i,parent:e.elgridLinesV}),o=n+=r.globals.gridWidth/(r.globals.isXNumeric?a-1:a)}({xC:i,x1:s,y1:0,x2:n,y2:o}))}if(r.config.grid.yaxis.lines.show){var l=0,h=0,c=r.globals.gridWidth,d=a+1;this.isRangeBar&&(d=r.globals.labels.length);for(var u=0;u<d+(this.isRangeBar?1:0);u++)this._drawGridLine({x1:0,y1:l,x2:c,y2:h,parent:this.elgridLinesH}),h=l+=r.globals.gridHeight/(this.isRangeBar?d:a)}}},{key:"_drawInvertedXYLines",value:function(t){var e=t.xCount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show)for(var a,r=i.globals.padHorizontal,n=i.globals.gridHeight,s=0;s<e+1;s++)i.config.grid.xaxis.lines.show&&this._drawGridLine({x1:r,y1:0,x2:a,y2:n,parent:this.elgridLinesV}),new U(this.ctx).drawXaxisTicks(r,0,this.elg),a=r=r+i.globals.gridWidth/e+.3;if(i.config.grid.yaxis.lines.show)for(var o=0,l=0,h=i.globals.gridWidth,c=0;c<i.globals.dataPoints+1;c++)this._drawGridLine({x1:0,y1:o,x2:h,y2:l,parent:this.elgridLinesH}),l=o+=i.globals.gridHeight/i.globals.dataPoints}},{key:"renderGrid",value:function(){var t=this.w,e=new y(this.ctx);this.elg=e.group({class:"apexcharts-grid"}),this.elgridLinesH=e.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=e.group({class:"apexcharts-gridlines-vertical"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),t.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide());for(var i,a=t.globals.yAxisScale.length?t.globals.yAxisScale[0].result.length-1:5,r=0;r<t.globals.series.length&&(void 0!==t.globals.yAxisScale[r]&&(a=t.globals.yAxisScale[r].result.length-1),!(a>2));r++);return!t.globals.isBarHorizontal||this.isRangeBar?(i=this.xaxisLabels.length,this.isRangeBar&&(a=t.globals.labels.length,t.config.xaxis.tickAmount&&t.config.xaxis.labels.formatter&&(i=t.config.xaxis.tickAmount)),this._drawXYLines({xCount:i,tickAmount:a})):(i=a,a=t.globals.xTickAmount,this._drawInvertedXYLines({xCount:i,tickAmount:a})),this.drawGridBands(i,a),{el:this.elg,xAxisTickWidth:t.globals.gridWidth/i}}},{key:"drawGridBands",value:function(t,e){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var a=0,r=i.globals.gridHeight/e,n=i.globals.gridWidth,s=0,o=0;s<e;s++,o++)o>=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:a,x2:n,y2:r,type:"row"}),a+=i.globals.gridHeight/e;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var l=i.globals.isBarHorizontal||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?t:t-1,h=i.globals.padHorizontal,c=i.globals.padHorizontal+i.globals.gridWidth/l,d=i.globals.gridHeight,u=0,f=0;u<t;u++,f++)f>=i.config.grid.column.colors.length&&(f=0),this._drawGridBandRect({c:f,x1:h,y1:0,x2:c,y2:d,type:"column"}),h+=i.globals.gridWidth/l}}]),t}(),Z=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"niceScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0,n=this.w,s=Math.abs(e-t);if("dataPoints"===(i=this._adjustTicksForSmallRange(i,a,s))&&(i=n.globals.dataPoints-1),t===Number.MIN_VALUE&&0===e||!m.isNumber(t)&&!m.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE){t=0,e=i;var o=this.linearScale(t,e,i);return o}t>e?(console.warn("axis.min cannot be greater than axis.max"),e=t+.1):t===e&&(t=0===t?0:t-.5,e=0===e?2:e+.5);var l=[];s<1&&r&&("candlestick"===n.config.chart.type||"candlestick"===n.config.series[a].type||"boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[a].type||n.globals.isRangeData)&&(e*=1.01);var h=i+1;h<2?h=2:h>2&&(h-=2);var c=s/h,d=Math.floor(m.log10(c)),u=Math.pow(10,d),f=Math.round(c/u);f<1&&(f=1);var p=f*u,g=p*Math.floor(t/p),x=p*Math.ceil(e/p),v=g;if(r&&s>2){for(;l.push(v),!((v+=p)>x););return{result:l,niceMin:l[0],niceMax:l[l.length-1]}}var b=t;(l=[]).push(b);for(var y=Math.abs(e-t)/i,w=0;w<=i;w++)b+=y,l.push(b);return l[l.length-2]>=e&&l.pop(),{result:l,niceMin:l[0],niceMax:l[l.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3?arguments[3]:void 0,r=Math.abs(e-t);"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1);var n=r/i;i===Number.MAX_VALUE&&(i=10,n=1);for(var s=[],o=t;i>=0;)s.push(o),o+=n,i-=1;return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}},{key:"logarithmicScale",value:function(t,e,i){for(var a=[],r=Math.ceil(Math.log(e)/Math.log(i))+1,n=0;n<r;n++)a.push(Math.pow(i,n));return 0===t&&a.unshift(t),{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"_adjustTicksForSmallRange",value:function(t,e,i){var a=t;if(void 0!==e&&this.w.config.yaxis[e].labels.formatter&&void 0===this.w.config.yaxis[e].tickAmount){var r=this.w.config.yaxis[e].labels.formatter(1);m.isNumber(Number(r))&&!m.isFloat(r)&&(a=Math.ceil(i))}return a<t?a:t}},{key:"setYScaleForIndex",value:function(t,e,i){var a=this.w.globals,r=this.w.config,n=a.isBarHorizontal?r.xaxis:r.yaxis[t];void 0===a.yAxisScale[t]&&(a.yAxisScale[t]=[]);var s=Math.abs(i-e);if(n.logarithmic&&s<=5&&(a.invalidLogScale=!0),n.logarithmic&&s>5)a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.logarithmicScale(e,i,n.logBase);else if(i!==-Number.MAX_VALUE&&m.isNumber(i))if(a.allSeriesCollapsed=!1,void 0===n.min&&void 0===n.max||n.forceNiceScale){var o=void 0===r.yaxis[t].max&&void 0===r.yaxis[t].min||r.yaxis[t].forceNiceScale;a.yAxisScale[t]=this.niceScale(e,i,n.tickAmount?n.tickAmount:s<5&&s>1?s+1:5,t,o)}else a.yAxisScale[t]=this.linearScale(e,i,n.tickAmount,t);else a.yAxisScale[t]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,r=i.config.xaxis,n=Math.abs(e-t);return e!==-Number.MAX_VALUE&&m.isNumber(e)?a.xAxisScale=this.linearScale(t,e,r.tickAmount?r.tickAmount:n<5&&n>1?n+1:5,0):a.xAxisScale=this.linearScale(0,5,5),a.xAxisScale}},{key:"setMultipleYScales",value:function(){var t=this,e=this.w.globals,i=this.w.config,a=e.minYArr.concat([]),r=e.maxYArr.concat([]),n=[];i.yaxis.forEach((function(e,s){var o=s;i.series.forEach((function(t,i){t.name===e.seriesName&&(o=i,s!==i?n.push({index:i,similarIndex:s,alreadyExists:!0}):n.push({index:i}))}));var l=a[o],h=r[o];t.setYScaleForIndex(s,l,h)})),this.sameScaleInMultipleAxes(a,r,n)}},{key:"sameScaleInMultipleAxes",value:function(t,e,i){var a=this,r=this.w.config,n=this.w.globals,s=[];i.forEach((function(t){t.alreadyExists&&(void 0===s[t.index]&&(s[t.index]=[]),s[t.index].push(t.index),s[t.index].push(t.similarIndex))})),n.yAxisSameScaleIndices=s,s.forEach((function(t,e){s.forEach((function(i,a){var r,n;e!==a&&(r=t,n=i,r.filter((function(t){return-1!==n.indexOf(t)}))).length>0&&(s[e]=s[e].concat(s[a]))}))}));var o=s.map((function(t){return t.filter((function(e,i){return t.indexOf(e)===i}))})).map((function(t){return t.sort()}));s=s.filter((function(t){return!!t}));var l=o.slice(),h=l.map((function(t){return JSON.stringify(t)}));l=l.filter((function(t,e){return h.indexOf(JSON.stringify(t))===e}));var c=[],d=[];t.forEach((function(t,i){l.forEach((function(a,r){a.indexOf(i)>-1&&(void 0===c[r]&&(c[r]=[],d[r]=[]),c[r].push({key:i,value:t}),d[r].push({key:i,value:e[i]}))}))}));var u=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),f=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);c.forEach((function(t,e){t.forEach((function(t,i){u[e]=Math.min(t.value,u[e])}))})),d.forEach((function(t,e){t.forEach((function(t,i){f[e]=Math.max(t.value,f[e])}))})),t.forEach((function(t,e){d.forEach((function(t,i){var s=u[i],o=f[i];r.chart.stacked&&(o=0,t.forEach((function(t,e){t.value!==-Number.MAX_VALUE&&(o+=t.value),s!==Number.MIN_VALUE&&(s+=c[i][e].value)}))),t.forEach((function(i,l){t[l].key===e&&(void 0!==r.yaxis[e].min&&(s="function"==typeof r.yaxis[e].min?r.yaxis[e].min(n.minY):r.yaxis[e].min),void 0!==r.yaxis[e].max&&(o="function"==typeof r.yaxis[e].max?r.yaxis[e].max(n.maxY):r.yaxis[e].max),a.setYScaleForIndex(e,s,o))}))}))}))}},{key:"autoScaleY",value:function(t,e,i){t||(t=this);var a=t.w;if(a.globals.isMultipleYAxis||a.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),e;var r=a.globals.seriesX[0],n=a.config.chart.stacked;return e.forEach((function(t,s){for(var o=0,l=0;l<r.length;l++)if(r[l]>=i.xaxis.min){o=l;break}var h,c,d=a.globals.minYArr[s],u=a.globals.maxYArr[s],f=a.globals.stackedSeriesTotals;a.globals.series.forEach((function(s,l){var p=s[o];n?(p=f[o],h=c=p,f.forEach((function(t,e){r[e]<=i.xaxis.max&&r[e]>=i.xaxis.min&&(t>c&&null!==t&&(c=t),s[e]<h&&null!==s[e]&&(h=s[e]))}))):(h=c=p,s.forEach((function(t,e){if(r[e]<=i.xaxis.max&&r[e]>=i.xaxis.min){var n=t,s=t;a.globals.series.forEach((function(i,a){null!==t&&(n=Math.min(i[e],n),s=Math.max(i[e],s))})),s>c&&null!==s&&(c=s),n<h&&null!==n&&(h=n)}}))),void 0===h&&void 0===c&&(h=d,c=u),(c*=c<0?.9:1.1)<0&&c<u&&(c=u),(h*=h<0?1.1:.9)<0&&h>d&&(h=d),e.length>1?(e[l].min=void 0===t.min?h:t.min,e[l].max=void 0===t.max?c:t.max):(e[0].min=void 0===t.min?h:t.min,e[0].max=void 0===t.max?c:t.max)}))})),e}}]),t}(),q=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.scales=new Z(e)}return o(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w.config,n=this.w.globals,s=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=n.series,h=l,c=l;"candlestick"===r.chart.type?(h=n.seriesCandleL,c=n.seriesCandleH):"boxPlot"===r.chart.type?(h=n.seriesCandleO,c=n.seriesCandleC):n.isRangeData&&(h=n.seriesRangeStart,c=n.seriesRangeEnd);for(var d=t;d<a;d++){n.dataPoints=Math.max(n.dataPoints,l[d].length),n.categoryLabels.length&&(n.dataPoints=n.categoryLabels.filter((function(t){return void 0!==t})).length);for(var u=0;u<n.series[d].length;u++){var f=l[d][u];null!==f&&m.isNumber(f)?(void 0!==c[d][u]&&(s=Math.max(s,c[d][u]),e=Math.min(e,c[d][u])),void 0!==h[d][u]&&(e=Math.min(e,h[d][u]),i=Math.max(i,h[d][u])),"candlestick"!==this.w.config.chart.type&&"boxPlot"!==this.w.config.chart.type||(void 0!==n.seriesCandleC[d][u]&&(s=Math.max(s,n.seriesCandleO[d][u]),s=Math.max(s,n.seriesCandleH[d][u]),s=Math.max(s,n.seriesCandleL[d][u]),s=Math.max(s,n.seriesCandleC[d][u]),"boxPlot"===this.w.config.chart.type&&(s=Math.max(s,n.seriesCandleM[d][u]))),!r.series[d].type||"candlestick"===r.series[d].type&&"boxPlot"===r.series[d].type||(s=Math.max(s,n.series[d][u]),e=Math.min(e,n.series[d][u])),i=s),n.seriesGoals[d]&&n.seriesGoals[d][u]&&Array.isArray(n.seriesGoals[d][u])&&n.seriesGoals[d][u].forEach((function(t){o!==Number.MIN_VALUE&&(o=Math.min(o,t.value),e=o),s=Math.max(s,t.value),i=s})),m.isFloat(f)&&(f=m.noExponents(f),n.yValueDecimal=Math.max(n.yValueDecimal,f.toString().split(".")[1].length)),o>h[d][u]&&h[d][u]<0&&(o=h[d][u])):n.hasNullValues=!0}}return"rangeBar"===r.chart.type&&n.seriesRangeStart.length&&n.isBarHorizontal&&(o=e),"bar"===r.chart.type&&(o<0&&s<0&&(s=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:s,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i=Number.MAX_VALUE;if(t.isMultipleYAxis)for(var a=0;a<t.series.length;a++){var r=this.getMinYMaxY(a,i,null,a+1);t.minYArr.push(r.minY),t.maxYArr.push(r.maxY),i=r.lowestY}var n=this.getMinYMaxY(0,i,null,t.series.length);if(t.minY=n.minY,t.maxY=n.maxY,i=n.lowestY,e.chart.stacked&&this._setStackedMinMax(),("line"===e.chart.type||"area"===e.chart.type||"candlestick"===e.chart.type||"boxPlot"===e.chart.type||"rangeBar"===e.chart.type&&!t.isBarHorizontal)&&t.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==t.maxY){var s=t.maxY-i;(i>=0&&i<=10||void 0!==e.yaxis[0].min||void 0!==e.yaxis[0].max)&&(s=0),t.minY=i-5*s/100,i>0&&t.minY<0&&(t.minY=0),t.maxY=t.maxY+5*s/100}return e.yaxis.forEach((function(e,i){void 0!==e.max&&("number"==typeof e.max?t.maxYArr[i]=e.max:"function"==typeof e.max&&(t.maxYArr[i]=e.max(t.isMultipleYAxis?t.maxYArr[i]:t.maxY)),t.maxY=t.maxYArr[i]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[i]=e.min:"function"==typeof e.min&&(t.minYArr[i]=e.min(t.isMultipleYAxis?t.minYArr[i]===Number.MIN_VALUE?0:t.minYArr[i]:t.minY)),t.minY=t.minYArr[i])})),t.isBarHorizontal&&["min","max"].forEach((function(i){void 0!==e.xaxis[i]&&"number"==typeof e.xaxis[i]&&("min"===i?t.minY=e.xaxis[i]:t.maxY=e.xaxis[i])})),t.isMultipleYAxis?(this.scales.setMultipleYScales(),t.minY=i,t.yAxisScale.forEach((function(e,i){t.minYArr[i]=e.niceMin,t.maxYArr[i]=e.niceMax}))):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.yAxisScale[0].niceMin,t.maxYArr[0]=t.yAxisScale[0].niceMax),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}},{key:"setXRange",value:function(){var t=this.w.globals,e=this.w.config,i="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided||t.noLabelsProvided||t.isXNumeric;if(t.isXNumeric&&function(){for(var e=0;e<t.series.length;e++)if(t.labels[e])for(var i=0;i<t.labels[e].length;i++)null!==t.labels[e][i]&&m.isNumber(t.labels[e][i])&&(t.maxX=Math.max(t.maxX,t.labels[e][i]),t.initialMaxX=Math.max(t.maxX,t.labels[e][i]),t.minX=Math.min(t.minX,t.labels[e][i]),t.initialMinX=Math.min(t.minX,t.labels[e][i]))}(),t.noLabelsProvided&&0===e.xaxis.categories.length&&(t.maxX=t.labels[t.labels.length-1],t.initialMaxX=t.labels[t.labels.length-1],t.minX=1,t.initialMinX=1),t.isXNumeric||t.noLabelsProvided||t.dataFormatXNumeric){var a;if(void 0===e.xaxis.tickAmount?(a=Math.round(t.svgWidth/150),"numeric"===e.xaxis.type&&t.dataPoints<30&&(a=t.dataPoints-1),a>t.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1)):"dataPoints"===e.xaxis.tickAmount?(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric&&(a=t.maxX-t.minX-1)):a=e.xaxis.tickAmount,t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n<t.maxX;n++)r.push(n+1);t.xAxisScale={result:r,niceMin:r[0],niceMax:r[r.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(1,a,a),t.noLabelsProvided&&t.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e<t.series.length;e++)if(void 0!==t.seriesZ[e])for(var i=0;i<t.seriesZ[e].length;i++)null!==t.seriesZ[e][i]&&m.isNumber(t.seriesZ[e][i])&&(t.maxZ=Math.max(t.maxZ,t.seriesZ[e][i]),t.minZ=Math.min(t.minZ,t.seriesZ[e][i]))}},{key:"_handleSingleDataPoint",value:function(){var t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){var i=new Y(this.ctx);if("datetime"===e.xaxis.type){var a=i.getDate(t.minX);e.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()-2):a.setDate(a.getDate()-2),t.minX=new Date(a).getTime();var r=i.getDate(t.maxX);e.xaxis.labels.datetimeUTC?r.setUTCDate(r.getUTCDate()+2):r.setDate(r.getDate()+2),t.maxX=new Date(r).getTime()}else("numeric"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided)&&(t.minX=t.minX-2,t.initialMinX=t.minX,t.maxX=t.maxX+2,t.initialMaxX=t.maxX)}}},{key:"_getMinXDiff",value:function(){var t=this.w.globals;t.isXNumeric&&t.seriesX.forEach((function(e,i){1===e.length&&e.push(t.seriesX[t.maxValsInArrayIndex][t.seriesX[t.maxValsInArrayIndex].length-1]);var a=e.slice();a.sort((function(t,e){return t-e})),a.forEach((function(e,i){if(i>0){var r=e-a[i-1];r>0&&(t.minXDiff=Math.min(r,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this.w.globals,e=[],i=[];if(t.series.length)for(var a=0;a<t.series[t.maxValsInArrayIndex].length;a++)for(var r=0,n=0,s=0;s<t.series.length;s++)null!==t.series[s][a]&&m.isNumber(t.series[s][a])&&(t.series[s][a]>0?r=r+parseFloat(t.series[s][a])+1e-4:n+=parseFloat(t.series[s][a])),s===t.series.length-1&&(e.push(r),i.push(n));for(var o=0;o<e.length;o++)t.maxY=Math.max(t.maxY,e[o]),t.minY=Math.min(t.minY,i[o])}}]),t}(),J=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.axisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===i.config.xaxis.position&&(this.xAxisoffX=i.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new j(e)}return o(t,[{key:"drawYaxis",value:function(t){var e=this,i=this.w,a=new y(this.ctx),r=i.config.yaxis[t].labels.style,n=r.fontSize,s=r.fontFamily,o=r.fontWeight,l=a.group({class:"apexcharts-yaxis",rel:t,transform:"translate("+i.globals.translateYAxisX[t]+", 0)"});if(this.axesUtils.isYAxisHidden(t))return l;var h=a.group({class:"apexcharts-yaxis-texts-g"});l.add(h);var c=i.globals.yAxisScale[t].result.length-1,d=i.globals.gridHeight/c,u=i.globals.translateY,f=i.globals.yLabelFormatters[t],p=i.globals.yAxisScale[t].result.slice();p=this.axesUtils.checkForReversedLabels(t,p);var g="";if(i.config.yaxis[t].labels.show)for(var x=function(l){var x=p[l];x=f(x,l,i);var m=i.config.yaxis[t].labels.padding;i.config.yaxis[t].opposite&&0!==i.config.yaxis.length&&(m*=-1);var v=e.axesUtils.getYAxisForeColor(r.colors,t),b=a.drawText({x:m,y:u+c/10+i.config.yaxis[t].labels.offsetY+1,text:x,textAnchor:i.config.yaxis[t].opposite?"start":"end",fontSize:n,fontFamily:s,fontWeight:o,foreColor:Array.isArray(v)?v[l]:v,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+r.cssClass});l===c&&(g=b),h.add(b);var y=document.createElementNS(i.globals.SVGNS,"title");if(y.textContent=Array.isArray(x)?x.join(" "):x,b.node.appendChild(y),0!==i.config.yaxis[t].labels.rotate){var w=a.rotateAroundCenter(g.node),S=a.rotateAroundCenter(b.node);b.node.setAttribute("transform","rotate(".concat(i.config.yaxis[t].labels.rotate," ").concat(w.x," ").concat(S.y,")"))}u+=d},m=c;m>=0;m--)x(m);if(void 0!==i.config.yaxis[t].title.text){var v=a.group({class:"apexcharts-yaxis-title"}),b=0;i.config.yaxis[t].opposite&&(b=i.globals.translateYAxisX[t]);var w=a.drawText({x:b,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[t].title.offsetY,text:i.config.yaxis[t].title.text,textAnchor:"end",foreColor:i.config.yaxis[t].title.style.color,fontSize:i.config.yaxis[t].title.style.fontSize,fontWeight:i.config.yaxis[t].title.style.fontWeight,fontFamily:i.config.yaxis[t].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[t].title.style.cssClass});v.add(w),l.add(v)}var S=i.config.yaxis[t].axisBorder,_=31+S.offsetX;if(i.config.yaxis[t].opposite&&(_=-31-S.offsetX),S.show){var k=a.drawLine(_,i.globals.translateY+S.offsetY-2,_,i.globals.gridHeight+i.globals.translateY+S.offsetY+2,S.color,0,S.width);l.add(k)}return i.config.yaxis[t].axisTicks.show&&this.axesUtils.drawYAxisTicks(_,c,S,i.config.yaxis[t].axisTicks,t,d,l),l}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new y(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),r=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(r);var n=e.globals.yAxisScale[t].result.length-1,s=e.globals.gridWidth/n+.1,o=s+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=e.globals.yAxisScale[t].result.slice(),c=e.globals.timescaleLabels;c.length>0&&(this.xaxisLabels=c.slice(),n=(h=c.slice()).length),h=this.axesUtils.checkForReversedLabels(t,h);var d=c.length;if(e.config.xaxis.labels.show)for(var u=d?0:n;d?u<d:u>=0;d?u++:u--){var f=h[u];f=l(f,u,e);var p=e.globals.gridWidth+e.globals.padHorizontal-(o-s+e.config.xaxis.labels.offsetX);if(c.length){var g=this.axesUtils.getLabel(h,c,p,u,this.drawnLabels,this.xaxisFontSize);p=g.x,f=g.text,this.drawnLabels.push(g.text),0===u&&e.globals.skipFirstTimelinelabel&&(f=""),u===h.length-1&&e.globals.skipLastTimelinelabel&&(f="")}var x=i.drawText({x:p,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});r.add(x),x.tspan(f);var m=document.createElementNS(e.globals.SVGNS,"title");m.textContent=f,x.node.appendChild(m),o+=s}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new y(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var r=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(r-=15);var n=i.drawLine(e.globals.padHorizontal+r+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);t.add(n)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new y(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),r=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});a.add(r),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new y(this.ctx),r={width:0,height:0},n={width:0,height:0},s=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g"));null!==s&&(r=s.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text"));if(null!==o&&(n=o.getBoundingClientRect()),null!==o){var l=this.xPaddingForYAxisTitle(t,r,n,e);o.setAttribute("x",l.xPos-(e?10:0))}if(null!==o){var h=a.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var r=this.w,n=0,s=0,o=10;return void 0===r.config.yaxis[t].title.text||t<0?{xPos:s,padd:0}:(a?(s=e.width+r.config.yaxis[t].title.offsetX+i.width/2+o/2,0===(n+=1)&&(s-=o/2)):(s=-1*e.width+r.config.yaxis[t].title.offsetX+o/2+i.width/2,r.globals.isBarHorizontal&&(o=25,s=-1*e.width-r.config.yaxis[t].title.offsetX-o)),{xPos:s,padd:o})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,r=0,n=18,s=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map((function(o,l){var h=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(r=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=r-o.labels.offsetX):(r=i.globals.gridWidth+i.globals.translateX+s,h||(s=s+c+20),i.globals.translateYAxisX[l]=r-o.labels.offsetX+20):(a=i.globals.translateX-n,h||(n=n+c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(e=m.listToArray(e)).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&void 0!==a.labels.align){var r=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"));n=m.listToArray(n);var s=r.getBoundingClientRect();"left"===a.labels.align?(n.forEach((function(t,e){t.setAttribute("text-anchor","start")})),a.opposite||r.setAttribute("transform","translate(-".concat(s.width,", 0)"))):"center"===a.labels.align?(n.forEach((function(t,e){t.setAttribute("text-anchor","middle")})),r.setAttribute("transform","translate(".concat(s.width/2*(a.opposite?1:-1),", 0)"))):"right"===a.labels.align&&(n.forEach((function(t,e){t.setAttribute("text-anchor","end")})),a.opposite&&r.setAttribute("transform","translate(".concat(s.width,", 0)")))}}))}}]),t}(),K=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.documentEvent=m.bind(this.documentEvent,this)}return o(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],r=a.length,n=0;n<r;n++)a[n].apply(null,e)}}},{key:"setupEventHandlers",value:function(){var t=this,e=this.w,i=this.ctx,a=e.globals.dom.baseEl.querySelector(e.globals.chartClass);this.ctx.eventList.forEach((function(t){a.addEventListener(t,(function(t){var a=Object.assign({},e,{seriesIndex:e.globals.capturedSeriesIndex,dataPointIndex:e.globals.capturedDataPointIndex});"mousemove"===t.type||"touchmove"===t.type?"function"==typeof e.config.chart.events.mouseMove&&e.config.chart.events.mouseMove(t,i,a):"mouseleave"===t.type||"touchleave"===t.type?"function"==typeof e.config.chart.events.mouseLeave&&e.config.chart.events.mouseLeave(t,i,a):("mouseup"===t.type&&1===t.which||"touchend"===t.type)&&("function"==typeof e.config.chart.events.click&&e.config.chart.events.click(t,i,a),i.ctx.events.fireEvent("click",[t,i,a]))}),{capture:!1,passive:!0})})),this.ctx.eventList.forEach((function(i){e.globals.dom.baseEl.addEventListener(i,t.documentEvent,{passive:!0})})),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(t){var e=this.w,i=t.target.className;if("click"===t.type){var a=e.globals.dom.baseEl.querySelector(".apexcharts-menu");a&&a.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==i&&a.classList.remove("apexcharts-menu-open")}e.globals.clientX="touchmove"===t.type?t.touches[0].clientX:t.clientX,e.globals.clientY="touchmove"===t.type?t.touches[0].clientY:t.clientY}}]),t}(),Q=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"setCurrentLocaleValues",value:function(t){var e=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=m.extend(C,i);this.w.globals.locale=a.options}}]),t}(),tt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"drawAxis",value:function(t,e){var i,a,r=this.w.globals,n=this.w.config,s=new U(this.ctx),o=new J(this.ctx);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=o.drawYaxisInversed(0),i=s.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=s.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=o.drawYaxis(e),r.dom.Paper.add(a))}))))}}]),t}(),et=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new y(this.ctx),i=new b(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,r=t.config.xaxis.crosshairs.dropShadow,n=t.config.xaxis.crosshairs.fill.type,s=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=r.enabled,u=r.left,f=r.top,p=r.blur,g=r.color,x=r.opacity,v=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===n&&(v=e.drawGradient("vertical",s,o,l,h,null,c,null));var w=e.drawRect();1===t.config.xaxis.crosshairs.width&&(w=e.drawLine());var S=t.globals.gridHeight;(!m.isNumber(S)||S<0)&&(S=0);var _=t.config.xaxis.crosshairs.width;(!m.isNumber(_)||_<0)&&(_=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:S,width:_,height:S,fill:v,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(w=i.dropShadow(w,{left:u,top:f,blur:p,color:g,opacity:x})),t.globals.dom.elGraphical.add(w)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new y(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);r.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(r)}var n=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);n.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(n)}}]),t}(),it=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var r=a.responsive.slice();r.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var n=new H({}),s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=r[0].breakpoint,s=window.innerWidth>0?window.innerWidth:screen.width;if(s>a){var o=w.extendArrayProps(n,i.globals.initialConfig,i);t=m.extend(o,t),t=m.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var l=0;l<r.length;l++)s<r[l].breakpoint&&(t=w.extendArrayProps(n,r[l].options,i),t=m.extend(i.config,t),e.overrideResponsiveOptions(t))};if(t){var o=w.extendArrayProps(n,t,i);o=m.extend(i.config,o),s(o=m.extend(o,t))}else s({})}}},{key:"overrideResponsiveOptions",value:function(t){var e=new H(t).init({responsiveOverride:!0});this.w.config=e}}]),t}(),at=function(){function t(e){n(this,t),this.ctx=e,this.colors=[],this.w=e.w;var i=this.w;this.isColorFn=!1,this.isHeatmapDistributed="treemap"===i.config.chart.type&&i.config.plotOptions.treemap.distributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap.distributed,this.isBarDistributed=i.config.plotOptions.bar.distributed&&("bar"===i.config.chart.type||"rangeBar"===i.config.chart.type)}return o(t,[{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var t=this,e=this.w,i=new m;if(e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode)),void 0===e.config.colors?e.globals.colors=this.predefined():(e.globals.colors=e.config.colors,Array.isArray(e.config.colors)&&e.config.colors.length>0&&"function"==typeof e.config.colors[0]&&(e.globals.colors=e.config.series.map((function(i,a){var r=e.config.colors[a];return r||(r=e.config.colors[0]),"function"==typeof r?(t.isColorFn=!0,r({value:e.globals.axisCharts?e.globals.series[a][0]?e.globals.series[a][0]:0:e.globals.series[a],seriesIndex:a,dataPointIndex:a,w:e})):r})))),e.globals.seriesColors.map((function(t,i){t&&(e.globals.colors[i]=t)})),e.config.theme.monochrome.enabled){var a=[],r=e.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(r=e.globals.series[0].length*e.globals.series.length);for(var n=e.config.theme.monochrome.color,s=1/(r/e.config.theme.monochrome.shadeIntensity),o=e.config.theme.monochrome.shadeTo,l=0,h=0;h<r;h++){var c=void 0;"dark"===o?(c=i.shadeColor(-1*l,n),l+=s):(c=i.shadeColor(l,n),l+=s),a.push(c)}e.globals.colors=a.slice()}var d=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),["fill","stroke"].forEach((function(i){void 0===e.config[i].colors?e.globals[i].colors=t.isColorFn?e.config.colors:d:e.globals[i].colors=e.config[i].colors.slice(),t.pushExtraColors(e.globals[i].colors)})),void 0===e.config.dataLabels.style.colors?e.globals.dataLabels.style.colors=d:e.globals.dataLabels.style.colors=e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50),void 0===e.config.plotOptions.radar.polygons.fill.colors?e.globals.radarPolygons.fill.colors=["dark"===e.config.theme.mode?"#424242":"none"]:e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20),void 0===e.config.markers.colors?e.globals.markers.colors=d:e.globals.markers.colors=e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,r=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(r=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.length<r)for(var n=r-t.length,s=0;s<n;s++)t.push(t[s])}},{key:"updateThemeOptions",value:function(t){t.chart=t.chart||{},t.tooltip=t.tooltip||{};var e=t.theme.mode||"light",i=t.theme.palette?t.theme.palette:"dark"===e?"palette4":"palette1",a=t.chart.foreColor?t.chart.foreColor:"dark"===e?"#f6f7f8":"#373d3f";return t.tooltip.theme=e,t.chart.foreColor=a,t.theme.palette=i,t}},{key:"predefined",value:function(){switch(this.w.config.theme.palette){case"palette1":default:this.colors=["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"];break;case"palette2":this.colors=["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"];break;case"palette3":this.colors=["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"];break;case"palette4":this.colors=["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"];break;case"palette5":this.colors=["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"];break;case"palette6":this.colors=["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"];break;case"palette7":this.colors=["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"];break;case"palette8":this.colors=["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"];break;case"palette9":this.colors=["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"];break;case"palette10":this.colors=["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"]}return this.colors}}]),t}(),rt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(t){var e=this.w,i="title"===t?e.config.title:e.config.subtitle,a=e.globals.svgWidth/2,r=i.offsetY,n="middle";if("left"===i.align?(a=10,n="start"):"right"===i.align&&(a=e.globals.svgWidth-10,n="end"),a+=i.offsetX,r=r+parseInt(i.style.fontSize,10)+i.margin/2,void 0!==i.text){var s=new y(this.ctx).drawText({x:a,y:r,text:i.text,textAnchor:n,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});s.node.setAttribute("class","apexcharts-".concat(t,"-text")),e.globals.dom.Paper.add(s)}}}]),t}(),nt=function(){function t(e){n(this,t),this.w=e.w,this.dCtx=e}return o(t,[{key:"getTitleSubtitleCoords",value:function(t){var e=this.w,i=0,a=0,r="title"===t?e.config.title.floating:e.config.subtitle.floating,n=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(t,"-text"));if(null!==n&&!r){var s=n.getBoundingClientRect();i=s.width,a=e.globals.axisCharts?s.height+5:s.height}return{width:i,height:a}}},{key:"getLegendsRect",value:function(){var t=this.w,e=t.globals.dom.baseEl.querySelector(".apexcharts-legend");t.config.legend.height||"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||(e.style.maxHeight=t.globals.svgHeight/2+"px");var i=Object.assign({},m.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:i.x,y:i.y,height:i.height,width:0===i.height?0:i.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},"left"!==t.config.legend.position&&"right"!==t.config.legend.position||1.5*this.dCtx.lgRect.width>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),r=Math.max.apply(Math,p(a));i=e[a.indexOf(r)]}return i}}]),t}(),st=function(){function t(e){n(this,t),this.w=e.w,this.dCtx=e}return o(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var r=e.globals.xLabelFormatter,n=m.getLargestStringFromArr(i),s=this.dCtx.dimHelpers.getLargestStringFromMultiArr(n,i);e.globals.isBarHorizontal&&(s=n=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new B(this.dCtx.ctx),l=n;n=o.xLabelFormat(r,n,l,{i:void 0,dateFormatter:new Y(this.dCtx.ctx).formatDate,w:e}),s=o.xLabelFormat(r,s,l,{i:void 0,dateFormatter:new Y(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===n||""===String(n).trim())&&(s=n="1");var h=new y(this.dCtx.ctx),c=h.getTextRects(n,e.config.xaxis.labels.style.fontSize),d=c;if(n!==s&&(d=h.getTextRects(s,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(n),n!==s&&(d=u(s)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,r=e.globals.groups.map((function(t){return t.title})),n=m.getLargestStringFromArr(r),s=this.dCtx.dimHelpers.getLargestStringFromMultiArr(n,r),o=new y(this.dCtx.ctx),l=o.getTextRects(n,a),h=l;return n!==s&&(h=o.getTextRects(s,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new y(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new y(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,r=i.config,n=r.xaxis.type,s=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){(function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)})(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+s/1.75-e.dCtx.yAxisWidthRight,h=o.position-s/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==r.chart.type&&"candlestick"!==r.chart.type&&"rangeBar"!==r.chart.type&&"boxPlot"!==r.chart.type?10:s/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===n?e.dCtx.gridPad.right<s&&!a.rotateXLabels&&(a.skipLastTimelinelabel=!0):"datetime"!==n&&e.dCtx.gridPad.right<s/2-e.dCtx.yAxisWidthRight&&!a.rotateXLabels&&!i.config.xaxis.labels.trim&&("between"!==i.config.xaxis.tickPlacement||i.globals.isBarHorizontal)&&(e.dCtx.xPadRight=s/2+1)}(t)};r.yaxis.forEach((function(t,i){o?(e.dCtx.gridPad.left<s&&(e.dCtx.xPadLeft=s/2+1),e.dCtx.xPadRight=s/2+1):l(t,i)}))}}]),t}(),ot=function(){function t(e){n(this,t),this.w=e.w,this.dCtx=e}return o(t,[{key:"getyAxisLabelsCoords",value:function(){var t=this,e=this.w,i=[],a=10,r=new j(this.dCtx.ctx);return e.config.yaxis.map((function(n,s){var o=e.globals.yAxisScale[s],l=0;if(!r.isYAxisHidden(s)&&n.labels.show&&void 0!==n.labels.minWidth&&(l=n.labels.minWidth),!r.isYAxisHidden(s)&&n.labels.show&&o.result.length){var h=e.globals.yLabelFormatters[s],c=o.niceMin===Number.MIN_VALUE?0:o.niceMin,d=String(c).length>String(o.niceMax).length?c:o.niceMax,u=h(d,{seriesIndex:s,dataPointIndex:-1,w:e}),f=u;if(void 0!==u&&0!==u.length||(u=d),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=h(u=m.getLargestStringFromArr(p),{seriesIndex:s,dataPointIndex:-1,w:e}),f=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var g=new y(t.dCtx.ctx),x="rotate(".concat(n.labels.rotate," 0 0)"),v=g.getTextRects(u,n.labels.style.fontSize,n.labels.style.fontFamily,x,!1),b=v;u!==f&&(b=g.getTextRects(f,n.labels.style.fontSize,n.labels.style.fontFamily,x,!1)),i.push({width:(l>b.width||l>v.width?l:b.width>v.width?b.width:v.width)+a,height:b.height>v.height?b.height:v.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var r=new y(t.dCtx.ctx),n="rotate(".concat(e.title.rotate," 0 0)"),s=r.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,n,!1);i.push({width:s.width,height:s.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,r=t.globals.yAxisScale.length>1?10:0,n=new j(this.dCtx.ctx),s=function(s,o){var l=t.config.yaxis[o].floating,h=0;s.width>0&&!l?(h=s.width+r,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-s.width-r)):h=l||n.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){s(t,e)})),t.globals.yTitleCoords.map((function(t,e){s(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),lt=function(){function t(e){n(this,t),this.w=e.w,this.dCtx=e}return o(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w;if(e.globals.noData||e.globals.allSeriesCollapsed)return 0;var i=function(t){return"bar"===t||"rangeBar"===t||"candlestick"===t||"boxPlot"===t},a=e.config.chart.type,r=0,n=i(a)?e.config.series.length:1;if(e.globals.comboBarCount>0&&(n=e.globals.comboBarCount),e.globals.collapsedSeries.forEach((function(t){i(t.type)&&(n-=1)})),e.config.chart.stacked&&(n=1),(i(a)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&n>0){var s,o,l=Math.abs(e.globals.initialMaxX-e.globals.initialMinX);l<=3&&(l=e.globals.dataPoints),s=l/t,e.globals.minXDiff&&e.globals.minXDiff/s>0&&(o=e.globals.minXDiff/s),o>t/2&&(o/=2),(r=o/n*parseInt(e.config.plotOptions.bar.columnWidth,10)/100)<1&&(r=1),r=r/(n>1?1:1.5)+5,e.globals.barPadForNumericAxis=r}return r}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!e.globals.axisCharts?0:10;["title","subtitle"].forEach((function(i){void 0!==e.config[i].text?a+=e.config[i].margin:a+=t.dCtx.isSparkline||!e.globals.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||e.globals.axisCharts||(a+=10);var r=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),n=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-r.height-n.height-a,i.translateY=i.translateY+r.height+n.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new j(this.dCtx.ctx);i.config.yaxis.map((function(r,n){-1!==i.globals.ignoreYAxisIndexes.indexOf(n)||r.floating||a.isYAxisHidden(n)||(r.opposite&&(i.globals.translateX=i.globals.translateX-(e[n].width+t[n].width)-parseInt(i.config.yaxis[n].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),ht=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new nt(this),this.dimYAxis=new ot(this),this.dimXAxis=new st(this),this.dimGrid=new lt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return o(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&(e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var a,r,n=[],s=!0,o=!1;try{for(i=i.call(t);!(s=(a=i.next()).done)&&(n.push(a.value),!e||n.length!==e);s=!0);}catch(t){o=!0,r=t}finally{try{s||null==i.return||i.return()}finally{if(o)throw r}}return n}}(t,e)||g(t,e)||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,2),a=i[0],r=i[1];t.gridPad[a]=Math.max(r,t.w.globals.markers.largestSize/1.5)})),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var a=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*a,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(a>0?a+4:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),r=this.dimYAxis.getyAxisTitleCoords();e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:r[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var n=this.dimXAxis.getxAxisLabelsCoords(),s=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(n,o,s),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-n.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(n);var d=function(){i.translateX=l,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l;break;case"right":i.translateY=c,i.translateX=l,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(r,a),new J(this.ctx).setYAxisXPosition(a,r)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var r="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",n=i.plotOptions[r].offsetY,s=i.plotOptions[r].offsetX;if(!i.legend.show||i.legend.floating)return e.gridHeight=e.svgHeight-i.grid.padding.left+i.grid.padding.right,e.gridWidth=e.gridHeight,e.translateY=n,void(e.translateX=s+(e.svgWidth-e.gridWidth)/2);switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=n-10,e.translateX=s+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+n+10,e.translateX=s+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=n,e.translateX=s+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=n,e.translateX=s+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,r=a.globals.hasGroups?2:1,n=i.height+t.height+e.height,s=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=n*s+r*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeight<a.config.xaxis.labels.minHeight&&(this.xAxisHeight=a.config.xaxis.labels.minHeight),a.config.xaxis.floating&&(this.xAxisHeight=0);var h=0,c=0;a.config.yaxis.forEach((function(t){h+=t.labels.minWidth,c+=t.labels.maxWidth})),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>c&&(this.yAxisWidth=c)}}]),t}(),ct=function(){function t(e){n(this,t),this.w=e.w,this.lgCtx=e}return o(t,[{key:"getLegendStyles",value:function(){var t=document.createElement("style");t.setAttribute("type","text/css");var e=document.createTextNode("\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }");return t.appendChild(e),t}},{key:"getLegendBBox",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){var t=this.w.globals;t.dom.elLegendForeign=document.createElementNS(t.SVGNS,"foreignObject");var e=t.dom.elLegendForeign;e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("width",t.svgWidth),e.setAttribute("height",t.svgHeight),t.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.appendChild(t.dom.elLegendWrap),e.appendChild(this.getLegendStyles()),t.dom.Paper.node.insertBefore(e,t.dom.elGraphical.node)}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var r=null,n=null;a.globals.risingSeries=[],a.globals.axisCharts?(r=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),n=parseInt(r.getAttribute("data:realIndex"),10)):(r=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),n=parseInt(r.getAttribute("rel"),10)-1),e?[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,n)})):this.hideSeries({seriesEl:r,realIndex:n})}else{var s=a.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new y(this.lgCtx.ctx).pathMouseDown(s.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(s.members[0].node,l)}s.fire("click")}}},{key:"hideSeries",value:function(t){var e=t.seriesEl,i=t.realIndex,a=this.w,r=m.clone(a.config.series);if(a.globals.axisCharts){var n=!1;if(a.config.yaxis[i]&&a.config.yaxis[i].show&&a.config.yaxis[i].showAlways&&(n=!0,a.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(a.globals.ancillaryCollapsedSeries.push({index:i,data:r[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),a.globals.ancillaryCollapsedSeriesIndices.push(i))),!n){a.globals.collapsedSeries.push({index:i,data:r[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),a.globals.collapsedSeriesIndices.push(i);var s=a.globals.risingSeries.indexOf(i);a.globals.risingSeries.splice(s,1)}}else a.globals.collapsedSeries.push({index:i,data:r[i]}),a.globals.collapsedSeriesIndices.push(i);for(var o=e.childNodes,l=0;l<o.length;l++)o[l].classList.contains("apexcharts-series-markers-wrap")&&(o[l].classList.contains("apexcharts-hide")?o[l].classList.remove("apexcharts-hide"):o[l].classList.add("apexcharts-hide"));a.globals.allSeriesCollapsed=a.globals.collapsedSeries.length===a.config.series.length,r=this._getSeriesBasedOnCollapsedState(r),this.lgCtx.ctx.updateHelpers._updateSeries(r,a.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(t,e,i){var a=this.w,r=m.clone(a.config.series);if(t.length>0){for(var n=0;n<t.length;n++)t[n].index===i&&(a.globals.axisCharts?(r[i].data=t[n].data.slice(),t.splice(n,1),e.splice(n,1),a.globals.risingSeries.push(i)):(r[i]=t[n].data,t.splice(n,1),e.splice(n,1),a.globals.risingSeries.push(i)));r=this._getSeriesBasedOnCollapsedState(r),this.lgCtx.ctx.updateHelpers._updateSeries(r,a.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(t){var e=this.w;return e.globals.axisCharts?t.forEach((function(i,a){e.globals.collapsedSeriesIndices.indexOf(a)>-1&&(t[a].data=[])})):t.forEach((function(i,a){e.globals.collapsedSeriesIndices.indexOf(a)>-1&&(t[a]=0)})),t}}]),t}(),dt=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new ct(this)}return o(t,[{key:"init",value:function(){var t=this.w,e=t.globals,i=t.config;if((i.legend.showForSingleSeries&&1===e.series.length||this.isBarsDistributed||e.series.length>1||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),m.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,r=e.globals.colors.slice();if("heatmap"===e.config.chart.type){var n=e.config.plotOptions.heatmap.colorScale.ranges;a=n.map((function(t){return t.name?t.name:t.from+" - "+t.to})),r=n.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var s=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h=s(a[l],{seriesIndex:l,w:e}),c=!1,d=!1;if(e.globals.collapsedSeries.length>0)for(var u=0;u<e.globals.collapsedSeries.length;u++)e.globals.collapsedSeries[u].index===l&&(c=!0);if(e.globals.ancillaryCollapsedSeriesIndices.length>0)for(var f=0;f<e.globals.ancillaryCollapsedSeriesIndices.length;f++)e.globals.ancillaryCollapsedSeriesIndices[f]===l&&(d=!0);var p=document.createElement("span");p.classList.add("apexcharts-legend-marker");var g=e.config.legend.markers.offsetX,x=e.config.legend.markers.offsetY,v=e.config.legend.markers.height,b=e.config.legend.markers.width,S=e.config.legend.markers.strokeWidth,_=e.config.legend.markers.strokeColor,k=e.config.legend.markers.radius,A=p.style;A.background=r[l],A.color=r[l],A.setProperty("background",r[l],"important"),e.config.legend.markers.fillColors&&e.config.legend.markers.fillColors[l]&&(A.background=e.config.legend.markers.fillColors[l]),void 0!==e.globals.seriesColors[l]&&(A.background=e.globals.seriesColors[l],A.color=e.globals.seriesColors[l]),A.height=Array.isArray(v)?parseFloat(v[l])+"px":parseFloat(v)+"px",A.width=Array.isArray(b)?parseFloat(b[l])+"px":parseFloat(b)+"px",A.left=(Array.isArray(g)?parseFloat(g[l]):parseFloat(g))+"px",A.top=(Array.isArray(x)?parseFloat(x[l]):parseFloat(x))+"px",A.borderWidth=Array.isArray(S)?S[l]:S,A.borderColor=Array.isArray(_)?_[l]:_,A.borderRadius=Array.isArray(k)?parseFloat(k[l])+"px":parseFloat(k)+"px",e.config.legend.markers.customHTML&&(Array.isArray(e.config.legend.markers.customHTML)?e.config.legend.markers.customHTML[l]&&(p.innerHTML=e.config.legend.markers.customHTML[l]()):p.innerHTML=e.config.legend.markers.customHTML()),y.setAttrs(p,{rel:l+1,"data:collapsed":c||d}),(c||d)&&p.classList.add("apexcharts-inactive-legend");var C=document.createElement("div"),M=document.createElement("span");M.classList.add("apexcharts-legend-text"),M.innerHTML=Array.isArray(h)?h.join(" "):h;var T=e.config.legend.labels.useSeriesColors?e.globals.colors[l]:e.config.legend.labels.colors;T||(T=e.config.chart.foreColor),M.style.color=T,M.style.fontSize=parseFloat(e.config.legend.fontSize)+"px",M.style.fontWeight=e.config.legend.fontWeight,M.style.fontFamily=i||e.config.chart.fontFamily,y.setAttrs(M,{rel:l+1,i:l,"data:default-text":encodeURIComponent(h),"data:collapsed":c||d}),C.appendChild(p),C.appendChild(M);var P=new w(this.ctx);e.config.legend.showForZeroSeries||0===P.getSeriesTotalByIndex(l)&&P.seriesHaveSameValues(l)&&!P.isSeriesNull(l)&&-1===e.globals.collapsedSeriesIndices.indexOf(l)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&C.classList.add("apexcharts-hidden-zero-series"),e.config.legend.showForNullSeries||P.isSeriesNull(l)&&-1===e.globals.collapsedSeriesIndices.indexOf(l)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&C.classList.add("apexcharts-hidden-null-series"),e.globals.dom.elLegendWrap.appendChild(C),e.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(e.config.legend.horizontalAlign)),e.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+e.config.legend.position),C.classList.add("apexcharts-legend-series"),C.style.margin="".concat(e.config.legend.itemMargin.vertical,"px ").concat(e.config.legend.itemMargin.horizontal,"px"),e.globals.dom.elLegendWrap.style.width=e.config.legend.width?e.config.legend.width+"px":"",e.globals.dom.elLegendWrap.style.height=e.config.legend.height?e.config.legend.height+"px":"",y.setAttrs(C,{rel:l+1,seriesName:m.escapeString(a[l]),"data:collapsed":c||d}),(c||d)&&C.classList.add("apexcharts-inactive-legend"),e.config.legend.onItemClick.toggleDataSeries||C.classList.add("apexcharts-no-click")}e.globals.dom.elWrap.addEventListener("click",t.onLegendClick,!0),e.config.legend.onItemHover.highlightDataSeries&&0===e.config.legend.customLegendItems.length&&(e.globals.dom.elWrap.addEventListener("mousemove",t.onLegendHovered,!0),e.globals.dom.elWrap.addEventListener("mouseout",t.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(t,e){var i=this.w,a=i.globals.dom.baseEl.querySelector(".apexcharts-legend"),r=a.getBoundingClientRect(),n=0,s=0;if("bottom"===i.config.legend.position)s+=i.globals.svgHeight-r.height/2;else if("top"===i.config.legend.position){var o=new ht(this.ctx),l=o.dimHelpers.getTitleSubtitleCoords("title").height,h=o.dimHelpers.getTitleSubtitleCoords("subtitle").height;s=s+(l>0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",n=n+t+i.config.legend.offsetX,s=s+e+i.config.legend.offsetY,a.style.left=n+"px",a.style.top=s+"px","bottom"===i.config.legend.position?(a.style.top="auto",a.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var e=this.legendHelpers.getLegendBBox(),i=new ht(this.ctx),a=i.dimHelpers.getTitleSubtitleCoords("title"),r=i.dimHelpers.getTitleSubtitleCoords("subtitle"),n=0;"bottom"===t.config.legend.position?n=-e.clwh/1.8:"top"===t.config.legend.position&&(n=a.height+r.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,n)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendBBox(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new I(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new I(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),r=this.w.config.chart.events.legendClick;"function"==typeof r&&r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var n=this.w.config.legend.markers.onClick;"function"==typeof n&&t.target.classList.contains("apexcharts-legend-marker")&&(n(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ut=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=i.globals.minX,this.maxX=i.globals.maxX}return o(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var r=0;r<this.t.customIcons.length;r++)this.elCustomIcons.push(i());var n=[],s=function(i,a,r){var s=i.toLowerCase();t.t[s]&&e.config.chart.zoom.enabled&&n.push({el:a,icon:"string"==typeof t.t[s]?t.t[s]:r,title:t.localeValues[i],class:"apexcharts-".concat(s,"-icon")})};s("zoomIn",this.elZoomIn,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n'),s("zoomOut",this.elZoomOut,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&n.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>\n <path d="M0 0h24v24H0V0z" fill="none"/>\n <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>\n</svg>':'<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>\n</svg>',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&n.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n <defs>\n <path d="M0 0h24v24H0z" id="a"/>\n </defs>\n <clipPath id="b">\n <use overflow="visible" xlink:href="#a"/>\n </clipPath>\n <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>\n</svg>',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),s("reset",this.elZoomReset,'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n</svg>'),this.t.download&&n.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l<this.elCustomIcons.length;l++)n.push({el:this.elCustomIcons[l],icon:this.t.customIcons[l].icon,title:this.t.customIcons[l].title,index:this.t.customIcons[l].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[l].class});n.forEach((function(t,e){t.index&&m.moveIndexInArray(n,e,t.index)}));for(var h=0;h<n.length;h++)y.setAttrs(n[h].el,{class:n[h].class,title:n[h].title}),n[h].el.innerHTML=n[h].icon,a.appendChild(n[h].el);this._createHamburgerMenu(a),e.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):e.globals.panEnabled?this.elPan.classList.add(this.selectedClass):e.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(t){this.elMenuItems=[],t.appendChild(this.elMenu),y.setAttrs(this.elMenu,{class:"apexcharts-menu"});var e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];this.w.globals.allSeriesHasEqualX||e.splice(2,1);for(var i=0;i<e.length;i++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[i].innerHTML=e[i].title,y.setAttrs(this.elMenuItems[i],{class:"apexcharts-menu-item ".concat(e[i].name),title:e[i].title}),this.elMenu.appendChild(this.elMenuItems[i])}},{key:"addToolbarEventListeners",value:function(){var t=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach((function(e){e.classList.contains("exportSVG")?e.addEventListener("click",t.handleDownload.bind(t,"svg")):e.classList.contains("exportPNG")?e.addEventListener("click",t.handleDownload.bind(t,"png")):e.classList.contains("exportCSV")&&e.addEventListener("click",t.handleDownload.bind(t,"csv"))}));for(var e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener("click",this.t.customIcons[e].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(t){this.ctx.getSyncedCharts().forEach((function(e){e.ctx.toolbar.toggleOtherControls();var i="selection"===t?e.ctx.toolbar.elSelection:e.ctx.toolbar.elZoom,a="selection"===t?"selectionEnabled":"zoomEnabled";e.w.globals[a]=!e.w.globals[a],i.classList.contains(e.ctx.toolbar.selectedClass)?i.classList.remove(e.ctx.toolbar.selectedClass):i.classList.add(e.ctx.toolbar.selectedClass)}))}},{key:"getToolbarIconsReference",value:function(){var t=this.w;this.elZoom||(this.elZoom=t.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(t){this.toggleOtherControls(),"pan"===t?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var e="pan"===t?this.elPan:this.elZoom,i="pan"===t?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach((function(t){t.ctx.toolbar.toggleOtherControls(),t.w.globals.panEnabled=!t.w.globals.panEnabled,t.ctx.toolbar.elPan.classList.contains(t.ctx.toolbar.selectedClass)?t.ctx.toolbar.elPan.classList.remove(t.ctx.toolbar.selectedClass):t.ctx.toolbar.elPan.classList.add(t.ctx.toolbar.selectedClass)}))}},{key:"toggleOtherControls",value:function(){var t=this,e=this.w;e.globals.panEnabled=!1,e.globals.zoomEnabled=!1,e.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach((function(e){e&&e.classList.remove(t.selectedClass)}))}},{key:"handleZoomIn",value:function(){var t=this.w;t.globals.isRangeBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY);var e=(this.minX+this.maxX)/2,i=(this.minX+e)/2,a=(this.maxX+e)/2,r=this._getNewMinXMaxX(i,a);t.globals.disableZoomIn||this.zoomUpdateOptions(r.minX,r.maxX)}},{key:"handleZoomOut",value:function(){var t=this.w;if(t.globals.isRangeBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY),!("datetime"===t.config.xaxis.type&&new Date(this.minX).getUTCFullYear()<1e3)){var e=(this.minX+this.maxX)/2,i=this.minX-(e-this.minX),a=this.maxX-(e-this.maxX),r=this._getNewMinXMaxX(i,a);t.globals.disableZoomOut||this.zoomUpdateOptions(r.minX,r.maxX)}}},{key:"_getNewMinXMaxX",value:function(t,e){var i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(t):t,maxX:i?Math.floor(e):e}}},{key:"zoomUpdateOptions",value:function(t,e){var i=this.w;if(void 0!==t||void 0!==e){if(!(i.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=i.globals.dataPoints),e-t<2))){var a={min:t,max:e},r=this.getBeforeZoomRange(a);r&&(a=r.xaxis);var n={xaxis:a},s=m.clone(i.globals.initialConfig.yaxis);i.config.chart.zoom.autoScaleYaxis&&(s=new Z(this.ctx).autoScaleY(this.ctx,s,{xaxis:a})),i.config.chart.group||(n.yaxis=s),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(n,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(a,s)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(t,e){"function"==typeof this.ev.zoomed&&this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e})}},{key:"getBeforeZoomRange",value:function(t,e){var i=null;return"function"==typeof this.ev.beforeZoom&&(i=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),i}},{key:"toggleMenu",value:function(){var t=this;window.setTimeout((function(){t.elMenu.classList.contains("apexcharts-menu-open")?t.elMenu.classList.remove("apexcharts-menu-open"):t.elMenu.classList.add("apexcharts-menu-open")}),0)}},{key:"handleDownload",value:function(t){var e=this.w,i=new G(this.ctx);switch(t){case"svg":i.exportToSVG(this.ctx);break;case"png":i.exportToPng(this.ctx);break;case"csv":i.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(t){this.ctx.getSyncedCharts().forEach((function(t){var e=t.w;if(e.globals.lastXAxis.min=void 0,e.globals.lastXAxis.max=void 0,t.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof e.config.chart.events.beforeResetZoom){var i=e.config.chart.events.beforeResetZoom(t,e);i&&t.updateHelpers.revertDefaultAxisMinMax(i)}"function"==typeof e.config.chart.events.zoomed&&t.ctx.toolbar.zoomCallback({min:e.config.xaxis.min,max:e.config.xaxis.max}),e.globals.zoomed=!1;var a=t.ctx.series.emptyCollapsedSeries(m.clone(e.globals.initialSeries));t.updateHelpers._updateSeries(a,e.config.chart.animations.dynamicAnimation.enabled)}))}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),t}(),ft=function(t){h(i,ut);var e=f(i);function i(t){var a;return n(this,i),(a=e.call(this,t)).ctx=t,a.w=t.w,a.dragged=!1,a.graphics=new y(a.ctx),a.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],a.clientX=0,a.clientY=0,a.startX=0,a.endX=0,a.dragX=0,a.startY=0,a.endY=0,a.dragY=0,a.moveDirection="none",a}return o(i,[{key:"init",value:function(t){var e=this,i=t.xyRatios,a=this.w,r=this;this.xyRatios=i,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=a.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),a.globals.dom.elGraphical.add(this.zoomRect),a.globals.dom.elGraphical.add(this.selectionRect),"x"===a.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:a.globals.gridWidth,maxY:a.globals.gridHeight}).on("dragmove",this.selectionDragging.bind(this,"dragging")):"y"===a.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:a.globals.gridWidth}).on("dragmove",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=a.globals.dom.baseEl.querySelector("".concat(a.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach((function(t){e.hoverArea.addEventListener(t,r.svgMouseEvents.bind(r,i),{capture:!1,passive:!0})}))}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(t,e){var i=this.w,a=this,r=this.ctx.toolbar,n=i.globals.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,s=i.config.chart.toolbar.autoSelected;if(e.shiftKey?(this.shiftWasPressed=!0,r.enableZoomPanFromToolbar("pan"===s?"zoom":"pan")):this.shiftWasPressed&&(r.enableZoomPanFromToolbar(s),this.shiftWasPressed=!1),e.target){var o,l=e.target.classList;if(e.target.parentNode&&null!==e.target.parentNode&&(o=e.target.parentNode.classList),!(l.contains("apexcharts-selection-rect")||l.contains("apexcharts-legend-marker")||l.contains("apexcharts-legend-text")||o&&o.contains("apexcharts-toolbar"))){if(a.clientX="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientX:"touchend"===e.type?e.changedTouches[0].clientX:e.clientX,a.clientY="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientY:"touchend"===e.type?e.changedTouches[0].clientY:e.clientY,"mousedown"===e.type&&1===e.which){var h=a.gridRect.getBoundingClientRect();a.startX=a.clientX-h.left,a.startY=a.clientY-h.top,a.dragged=!1,a.w.globals.mousedown=!0}if(("mousemove"===e.type&&1===e.which||"touchmove"===e.type)&&(a.dragged=!0,i.globals.panEnabled?(i.globals.selection=null,a.w.globals.mousedown&&a.panDragging({context:a,zoomtype:n,xyRatios:t})):(a.w.globals.mousedown&&i.globals.zoomEnabled||a.w.globals.mousedown&&i.globals.selectionEnabled)&&(a.selection=a.selectionDrawing({context:a,zoomtype:n}))),"mouseup"===e.type||"touchend"===e.type||"mouseleave"===e.type){var c=a.gridRect.getBoundingClientRect();a.w.globals.mousedown&&(a.endX=a.clientX-c.left,a.endY=a.clientY-c.top,a.dragX=Math.abs(a.endX-a.startX),a.dragY=Math.abs(a.endY-a.startY),(i.globals.zoomEnabled||i.globals.selectionEnabled)&&a.selectionDrawn({context:a,zoomtype:n}),i.globals.panEnabled&&i.config.xaxis.convertedCatToNumeric&&a.delayedPanScrolled()),i.globals.zoomEnabled&&a.hideSelectionRect(this.selectionRect),a.dragged=!1,a.w.globals.mousedown=!1}this.makeSelectionRectDraggable()}}}},{key:"makeSelectionRectDraggable",value:function(){var t=this.w;if(this.selectionRect){var e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:t.globals.gridWidth,maxY:t.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(t.globals.selection);else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a={x:i,y:0,width:t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i,height:t.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,r=t.height,n=t.translateX,s=void 0===n?0:n,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+s+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:r,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),y.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:r>0?r:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),y.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e,i=t.context,a=t.zoomtype,r=this.w,n=i,s=this.gridRect.getBoundingClientRect(),o=n.startX-1,l=n.startY,h=!1,c=!1,d=n.clientX-s.left-o,u=n.clientY-s.top-l;return Math.abs(d+o)>r.globals.gridWidth?d=r.globals.gridWidth-o:n.clientX-s.left<0&&(d=o),o>n.clientX-s.left&&(h=!0,d=Math.abs(d)),l>n.clientY-s.top&&(c=!0,u=Math.abs(u)),e="x"===a?{x:h?o-d:o,y:0,width:d,height:r.globals.gridHeight}:"y"===a?{x:0,y:c?l-u:l,width:r.globals.gridWidth,height:u}:{x:h?o-d:o,y:c?l-u:l,width:d,height:u},n.drawSelectionRect(e),n.selectionDragging("resizing"),e}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w,r=this.xyRatios,n=this.selectionRect,s=0;"resizing"===t&&(s=30);var o=function(t){return parseFloat(n.node.getAttribute(t))},l={x:o("x"),y:o("y"),width:o("width"),height:o("height")};a.globals.selection=l,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t=i.gridRect.getBoundingClientRect(),e=n.node.getBoundingClientRect(),s={xaxis:{min:a.globals.xAxisScale.niceMin+(e.left-t.left)*r.xRatio,max:a.globals.xAxisScale.niceMin+(e.right-t.left)*r.xRatio},yaxis:{min:a.globals.yAxisScale[0].niceMin+(t.bottom-e.bottom)*r.yRatio[0],max:a.globals.yAxisScale[0].niceMax-(e.top-t.top)*r.yRatio[0]}};a.config.chart.events.selection(i.ctx,s),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,s)}),s))}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,r=e,n=this.xyRatios,s=this.ctx.toolbar;if(r.startX>r.endX){var o=r.startX;r.startX=r.endX,r.endX=o}if(r.startY>r.endY){var l=r.startY;r.startY=r.endY,r.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+r.startX*n.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+r.endX*n.invertedYRatio):(h=a.globals.xAxisScale.niceMin+r.startX*n.xRatio,c=a.globals.xAxisScale.niceMin+r.endX*n.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){d.push(a.globals.yAxisScale[e].niceMax-n.yRatio[e]*r.startY),u.push(a.globals.yAxisScale[e].niceMax-n.yRatio[e]*r.endY)})),r.dragged&&(r.dragX>10||r.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var f=m.clone(a.globals.initialConfig.yaxis),p=m.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||f.forEach((function(t,e){f[e].min=u[e],f[e].max=d[e]})),a.config.chart.zoom.autoScaleYaxis){var g=new Z(r.ctx);f=g.autoScaleY(r.ctx,f,{xaxis:p})}if(s){var x=s.getBeforeZoomRange(p,f);x&&(p=x.xaxis?x.xaxis:p,f=x.yaxis?x.yaxis:f)}var v={xaxis:p};a.config.chart.group||(v.yaxis=f),r.ctx.updateHelpers._updateOptions(v,!1,r.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&s.zoomCallback(p,f)}else if(a.globals.selectionEnabled){var b,y=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(y=m.clone(a.config.yaxis)).forEach((function(t,e){y[e].min=u[e],y[e].max=d[e]})),a.globals.selection=r.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(r.ctx,{xaxis:b,yaxis:y})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var r=i.globals.lastClientPosition.x-a.clientX,n=i.globals.lastClientPosition.y-a.clientY;Math.abs(r)>Math.abs(n)&&r>0?this.moveDirection="left":Math.abs(r)>Math.abs(n)&&r<0?this.moveDirection="right":Math.abs(n)>Math.abs(r)&&n>0?this.moveDirection="up":Math.abs(n)>Math.abs(r)&&n<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var s=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(s,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,r=m.clone(i.globals.initialConfig.yaxis),n=a.xRatio,s=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(n=a.invertedYRatio,s=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=s+i.globals.gridWidth/15*n,e=o+i.globals.gridWidth/15*n):"right"===this.moveDirection&&(t=s-i.globals.gridWidth/15*n,e=o-i.globals.gridWidth/15*n),i.globals.isRangeBar||(t<i.globals.initialMinX||e>i.globals.initialMaxX)&&(t=s,e=o);var l={min:t,max:e};i.config.chart.zoom.autoScaleYaxis&&(r=new Z(this.ctx).autoScaleY(this.ctx,r,{xaxis:l}));var h={xaxis:{min:t,max:e}};i.config.chart.group||(h.yaxis=r),this.updateScrolledChart(h,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),i}(),pt=function(){function t(e){n(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return o(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,r=t.clientY,n=this.w,s=i.getBoundingClientRect(),o=s.width,l=s.height,h=o/(n.globals.dataPoints-1),c=l/n.globals.dataPoints,d=this.hasBars();!n.globals.comboCharts&&!d||n.config.xaxis.convertedCatToNumeric||(h=o/n.globals.dataPoints);var u=a-s.left-n.globals.barPadForNumericAxis,f=r-s.top;u<0||f<0||u>o||f>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):n.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):n.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),g=Math.floor(f/c);d&&!n.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,v=null,b=[],y=[];if(n.globals.seriesXvalues.forEach((function(t){b.push([t[0]+1e-6].concat(t))})),n.globals.seriesYvalues.forEach((function(t){y.push([t[0]+1e-6].concat(t))})),b=b.map((function(t){return t.filter((function(t){return m.isNumber(t)}))})),y=y.map((function(t){return t.filter((function(t){return m.isNumber(t)}))})),n.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),S=u*(w.width/o),_=f*(w.height/l);x=(v=this.closestInMultiArray(S,_,b,y)).index,p=v.j,null!==x&&(b=n.globals.seriesXvalues[x],p=(v=this.closestInArray(S,b)).index)}return n.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),n.globals.isBarHorizontal?n.globals.capturedDataPointIndex=g:n.globals.capturedDataPointIndex=p,{capturedSeries:x,j:n.globals.isBarHorizontal?g:p,hoverX:u,hoverY:f}}},{key:"closestInMultiArray",value:function(t,e,i,a){var r=this.w,n=0,s=null,o=-1;r.globals.series.length>1?n=this.getFirstActiveXArray(i):s=0;var l=i[n][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<h&&(h=a,o=i)}))})),-1!==o){var c=a[n][o],d=Math.abs(e-c);s=n,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<d&&(d=a,s=i)}))}return{index:s,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),r=0;r<a.length;r++)if(-1!==a[r]&&-1===e.globals.collapsedSeriesIndices.indexOf(r)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(r)){i=a[r];break}return i}},{key:"closestInArray",value:function(t,e){for(var i=e[0],a=null,r=Math.abs(t-i),n=0;n<e.length;n++){var s=Math.abs(t-e[n]);s<r&&(r=s,a=n)}return{index:a}}},{key:"isXoverlap",value:function(t){var e=[],i=this.w.globals.seriesX.filter((function(t){return void 0!==t[0]}));if(i.length>0)for(var a=0;a<i.length-1;a++)void 0!==i[a][t]&&void 0!==i[a+1][t]&&i[a][t]!==i[a+1][t]&&e.push("unEqual");return 0===e.length}},{key:"isInitialSeriesSameLen",value:function(){for(var t=!0,e=this.w.globals.initialSeries,i=0;i<e.length-1;i++)if(e[i].data.length!==e[i+1].data.length){t=!1;break}return t}},{key:"getBarsHeight",value:function(t){return p(t).reduce((function(t,e){return t+e.getBBox().height}),0)}},{key:"getElMarkers",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(" .apexcharts-series-markers")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=p(t)).sort((function(t,e){return Number(e.getAttribute("data:realIndex"))<Number(t.getAttribute("data:realIndex"))?0:-1}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(){return this.getElMarkers().length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,r=0;r<a.length;r++)"enable"===t?(a[r].classList.add("apexcharts-active"),a[r].style.display=e.config.tooltip.items.display):(a[r].classList.remove("apexcharts-active"),a[r].style.display="none")}}]),t}(),gt=function(){function t(e){n(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new pt(e)}return o(t,[{key:"drawSeriesTexts",value:function(t){var e=t.shared,i=void 0===e||e,a=t.ttItems,r=t.i,n=void 0===r?0:r,s=t.j,o=void 0===s?null:s,l=t.y1,h=t.y2,c=t.e,d=this.w;void 0!==d.config.tooltip.custom?this.handleCustomTooltip({i:n,j:o,y1:l,y2:h,w:d}):this.toggleActiveInactiveSeries(i);var u=this.getValuesToPrint({i:n,j:o});this.printLabels({i:n,j:o,values:u,ttItems:a,shared:i,e:c});var f=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=f.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=f.getBoundingClientRect().height}},{key:"printLabels",value:function(t){var e,i=this,r=t.i,n=t.j,s=t.values,o=t.ttItems,l=t.shared,h=t.e,c=this.w,d=[],u=function(t){return c.globals.seriesGoals[t]&&c.globals.seriesGoals[t][n]&&Array.isArray(c.globals.seriesGoals[t][n])},f=s.xVal,p=s.zVal,g=s.xAxisTTVal,x="",m=c.globals.colors[r];null!==n&&c.config.plotOptions.bar.distributed&&(m=c.globals.colors[n]);for(var v=function(t,s){var v=i.getFormatters(r);x=i.getSeriesName({fn:v.yLbTitleFormatter,index:r,seriesIndex:r,j:n}),"treemap"===c.config.chart.type&&(x=v.yLbTitleFormatter(String(c.config.series[r].data[n].x),{series:c.globals.series,seriesIndex:r,dataPointIndex:n,w:c}));var b=c.config.tooltip.inverseOrder?s:t;if(c.globals.axisCharts){var y=function(t){return v.yLbFormatter(c.globals.series[t][n],{series:c.globals.series,seriesIndex:t,dataPointIndex:n,w:c})};if(l)v=i.getFormatters(b),x=i.getSeriesName({fn:v.yLbTitleFormatter,index:b,seriesIndex:r,j:n}),m=c.globals.colors[b],e=y(b),u(b)&&(d=c.globals.seriesGoals[b][n].map((function(t){return{attrs:t,val:v.yLbFormatter(t.value,{seriesIndex:b,dataPointIndex:n,w:c})}})));else{var w,S=null==h||null===(w=h.target)||void 0===w?void 0:w.getAttribute("fill");S&&(m=-1!==S.indexOf("url")?document.querySelector(S.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke"):S),e=y(r),u(r)&&Array.isArray(c.globals.seriesGoals[r][n])&&(d=c.globals.seriesGoals[r][n].map((function(t){return{attrs:t,val:v.yLbFormatter(t.value,{seriesIndex:r,dataPointIndex:n,w:c})}})))}}null===n&&(e=v.yLbFormatter(c.globals.series[r],a(a({},c),{},{seriesIndex:r,dataPointIndex:r}))),i.DOMHandling({i:r,t:b,j:n,ttItems:o,values:{val:e,goalVals:d,xVal:f,xAxisTTVal:g,zVal:p},seriesName:x,shared:l,pColor:m})},b=0,y=c.globals.series.length-1;b<c.globals.series.length;b++,y--)v(b,y)}},{key:"getFormatters",value:function(t){var e,i=this.w,a=i.globals.yLabelFormatters[t];return void 0!==i.globals.ttVal?Array.isArray(i.globals.ttVal)?(a=i.globals.ttVal[t]&&i.globals.ttVal[t].formatter,e=i.globals.ttVal[t]&&i.globals.ttVal[t].title&&i.globals.ttVal[t].title.formatter):(a=i.globals.ttVal.formatter,"function"==typeof i.globals.ttVal.title.formatter&&(e=i.globals.ttVal.title.formatter)):e=i.config.tooltip.y.title.formatter,"function"!=typeof a&&(a=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(t){return t}),"function"!=typeof e&&(e=function(t){return t}),{yLbFormatter:a,yLbTitleFormatter:e}}},{key:"getSeriesName",value:function(t){var e=t.fn,i=t.index,a=t.seriesIndex,r=t.j,n=this.w;return e(String(n.globals.seriesNames[i]),{series:n.globals.series,seriesIndex:a,dataPointIndex:r,w:n})}},{key:"DOMHandling",value:function(t){t.i;var e=t.t,i=t.j,a=t.ttItems,r=t.values,n=t.seriesName,s=t.shared,o=t.pColor,l=this.w,h=this.ttCtx,c=r.val,d=r.goalVals,u=r.xVal,f=r.xAxisTTVal,p=r.zVal,g=null;g=a[e].children,l.config.tooltip.fillSeriesColor&&(a[e].style.backgroundColor=o,g[0].style.display="none"),h.showTooltipTitle&&(null===h.tooltipTitle&&(h.tooltipTitle=l.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),h.tooltipTitle.innerHTML=u),h.isXAxisTooltipEnabled&&(h.xaxisTooltipText.innerHTML=""!==f?f:u);var x=a[e].querySelector(".apexcharts-tooltip-text-y-label");x&&(x.innerHTML=n||"");var m=a[e].querySelector(".apexcharts-tooltip-text-y-value");m&&(m.innerHTML=void 0!==c?c:""),g[0]&&g[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(o=l.config.tooltip.marker.fillColors[e]),g[0].style.backgroundColor=o),l.config.tooltip.marker.show||(g[0].style.display="none");var v=a[e].querySelector(".apexcharts-tooltip-text-goals-label"),b=a[e].querySelector(".apexcharts-tooltip-text-goals-value");if(d.length&&l.globals.seriesGoals[e]){var y=function(){var t="<div >",e="<div>";d.forEach((function(i,a){t+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(i.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(i.attrs.name,"</div>"),e+="<div>".concat(i.val,"</div>")})),v.innerHTML=t+"</div>",b.innerHTML=e+"</div>"};s?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(v.innerHTML="",b.innerHTML=""):y()}else v.innerHTML="",b.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),s&&g[0]&&(null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(t){var e=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=e.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=e.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,r=this.ctx.series.filteredSeriesX(),n="",s="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(n=r[e][i],0===r[e].length&&(n=r[this.tooltipUtil.getFirstActiveXArray(r)][i])):n=void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=n;return n=a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?new B(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new Y(this.ctx).formatDate,w:this.w}):a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h),void 0!==a.config.tooltip.x.formatter&&(n=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),s="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):n,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(n)?n.join(" "):n,xAxisTTVal:Array.isArray(s)?s.join(" "):s,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,r=t.y2,n=t.w,s=this.ttCtx.getElTooltip(),o=n.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),s.innerHTML=o({ctx:this.ctx,series:n.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:r,w:n})}}]),t}(),xt=function(){function t(e){n(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return o(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,r=i.getElXCrosshairs(),n=t-i.xcrosshairsWidth/2,s=a.globals.labels.slice().length;if(null!==e&&(n=a.globals.gridWidth/s*e),null===r||a.globals.isBarHorizontal||(r.setAttribute("x",n),r.setAttribute("x1",n),r.setAttribute("x2",n),r.setAttribute("y2",a.globals.gridHeight),r.classList.add("apexcharts-active")),n<0&&(n=0),n>a.globals.gridWidth&&(n=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=n;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=n+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&y.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&y.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a,r=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t))t+=e.globals.translateX,a=new y(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=a.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=r+"px"}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),r=e.globals.translateY+a,n=i.yaxisTTEls[t].getBoundingClientRect().height,s=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(s-=26),r-=n/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=r+"px",i.yaxisTTEls[t].style.left=s+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,r=this.ttCtx,n=r.getElTooltip(),s=r.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-s.ttWidth-o-10),l>a.globals.gridWidth-s.ttWidth-10&&(l=a.globals.gridWidth-s.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=r.getElGrid(),d=c.getBoundingClientRect();h=r.e.clientY+a.globals.translateY-d.top-s.ttHeight/2}else a.globals.isBarHorizontal||(s.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-s.ttHeight+a.globals.translateY),h<0&&(h=0));isNaN(l)||(l+=a.globals.translateX,n.style.left=l+"px",n.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var r=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),n=0;n<r.length;n++)parseInt(r[n].getAttribute("rel"),10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,r[n]));else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}},{key:"moveDynamicPointOnHover",value:function(t,e){var i,a,r=this.w,n=this.ttCtx,s=r.globals.pointsArray,o=n.tooltipUtil.getHoverMarkerSize(e),l=r.config.series[e].type;if(!l||"column"!==l&&"candlestick"!==l&&"boxPlot"!==l){i=s[e][t][0],a=s[e][t][1]?s[e][t][1]:0;var h=r.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers circle"));h&&a<r.globals.gridHeight&&a>0&&(h.setAttribute("r",o),h.setAttribute("cx",i),h.setAttribute("cy",a)),this.moveXCrosshairs(i),n.fixedTooltip||this.moveTooltip(i,a,o)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,r=0,n=0,s=a.globals.pointsArray;e=new I(this.ctx).getActiveConfigSeriesIndex(!0);var o=i.tooltipUtil.getHoverMarkerSize(e);s[e]&&(r=s[e][t][0],n=s[e][t][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var h=0;h<a.globals.series.length;h++){var c=s[h];if(a.globals.comboCharts&&void 0===c&&l.splice(h,0,null),c&&c.length){var d=s[h][t][1];l[h].setAttribute("cx",r),null!==d&&!isNaN(d)&&d<a.globals.gridHeight+o&&d+o>0?(l[h]&&l[h].setAttribute("r",o),l[h]&&l[h].setAttribute("cy",d)):l[h]&&l[h].setAttribute("r",0)}}if(this.moveXCrosshairs(r),!i.fixedTooltip){var u=n||a.globals.gridHeight;this.moveTooltip(r,u,o)}}},{key:"moveStickyTooltipOverBars",value:function(t){var e=this.w,i=this.ttCtx,a=e.globals.columnSeries?e.globals.columnSeries.length:e.globals.series.length,r=a>=2&&a%2==0?Math.floor(a/2):Math.floor(a/2)+1;e.globals.isBarHorizontal&&(r=new I(this.ctx).getActiveConfigSeriesIndex(!1,"desc")+1);var n=e.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']")),s=n?parseFloat(n.getAttribute("cx")):0,o=n?parseFloat(n.getAttribute("cy")):0,l=n?parseFloat(n.getAttribute("barWidth")):0,h=n?parseFloat(n.getAttribute("barHeight")):0,c=i.getElGrid().getBoundingClientRect(),d=n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area");if(e.globals.isXNumeric?(n&&!d&&(s-=a%2!=0?l/2:0),n&&d&&e.globals.comboCharts&&(s-=l/2)):e.globals.isBarHorizontal||(s=i.xAxisTicksPositions[t-1]+i.dataPointsDividedWidth/2,isNaN(s)&&(s=i.xAxisTicksPositions[t]-i.dataPointsDividedWidth/2)),e.globals.isBarHorizontal?(o>e.globals.gridHeight/2&&(o-=i.tooltipRect.ttHeight),(o=o+e.config.grid.padding.top+h/3)+h>e.globals.gridHeight&&(o=e.globals.gridHeight-h)):e.config.tooltip.followCursor?o=i.e.clientY-c.top-i.tooltipRect.ttHeight/2:o+i.tooltipRect.ttHeight+15>e.globals.gridHeight&&(o=e.globals.gridHeight),o<-10&&(o=-10),e.globals.isBarHorizontal||this.moveXCrosshairs(s),!i.fixedTooltip){var u=o||e.globals.gridHeight;this.moveTooltip(s,u)}}}]),t}(),mt=function(){function t(e){n(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new xt(e)}return o(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new y(this.ctx),i=new L(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=p(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var r=0;r<a.length;r++){var n=a[r].querySelector(".apexcharts-series-markers-wrap");if(null!==n){var s=void 0,o="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));"line"!==t.config.chart.type&&"area"!==t.config.chart.type||t.globals.comboCharts||t.config.tooltip.intersect||(o+=" no-pointer-events");var l=i.getMarkerConfig({cssClass:o,seriesIndex:Number(n.getAttribute("data:realIndex"))});(s=e.drawMarker(0,0,l)).node.setAttribute("default-marker-size",0);var h=document.createElementNS(t.globals.SVGNS,"g");h.classList.add("apexcharts-series-markers"),h.appendChild(s.node),n.appendChild(h)}}}},{key:"enlargeCurrentPoint",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w;"bubble"!==r.config.chart.type&&this.newPointSize(t,e);var n=e.getAttribute("cx"),s=e.getAttribute("cy");if(null!==i&&null!==a&&(n=i,s=a),this.tooltipPosition.moveXCrosshairs(n),!this.fixedTooltip){if("radar"===r.config.chart.type){var o=this.ttCtx.getElGrid(),l=o.getBoundingClientRect();n=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(n,s,r.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,r=t,n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),s=e.config.markers.hover.size,o=0;o<n.length;o++){var l=n[o].getAttribute("rel"),h=n[o].getAttribute("index");if(void 0===s&&(s=e.globals.markers.size[h]+e.config.markers.hover.sizeOffset),r===parseInt(l,10)){i.newPointSize(r,n[o]);var c=n[o].getAttribute("cx"),d=n[o].getAttribute("cy");i.tooltipPosition.moveXCrosshairs(c),a.fixedTooltip||i.tooltipPosition.moveTooltip(c,d,s)}else i.oldPointSize(n[o])}}},{key:"newPointSize",value:function(t,e){var i=this.w,a=i.config.markers.hover.size,r=0===t?e.parentNode.firstChild:e.parentNode.lastChild;if("0"!==r.getAttribute("default-marker-size")){var n=parseInt(r.getAttribute("index"),10);void 0===a&&(a=i.globals.markers.size[n]+i.config.markers.hover.sizeOffset),a<0&&(a=0),r.setAttribute("r",a)}}},{key:"oldPointSize",value:function(t){var e=parseFloat(t.getAttribute("default-marker-size"));t.setAttribute("r",e)}},{key:"resetPointsSize",value:function(){for(var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),e=0;e<t.length;e++){var i=parseFloat(t[e].getAttribute("default-marker-size"));m.isNumber(i)&&i>=0?t[e].setAttribute("r",i):t[e].setAttribute("r",0)}}}]),t}(),vt=function(){function t(e){n(this,t),this.w=e.w,this.ttCtx=e}return o(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,r=t.y,n=t.type,s=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(n,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),f=this.getAttr(e,"height");if(s.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+s.tooltipRect.ttWidth/2+u,r=d+s.tooltipRect.ttHeight/2-f/2,s.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-s.tooltipRect.ttWidth/2+u),s.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?s.tooltipRect.ttWidth:0),r=o.globals.clientY-p.top-(r>o.globals.gridHeight/2?s.tooltipRect.ttHeight:0)}}return{x:a,y:r}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,r=t.opt,n=t.x,s=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(r.paths.getAttribute("cx"),10),c=parseInt(r.paths.getAttribute("cy"),10),d=parseFloat(r.paths.getAttribute("val"));if(i=parseInt(r.paths.getAttribute("rel"),10),e=parseInt(r.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=m.findAncestor(r.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:r.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,n=h,s=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var f=l.getElGrid().getBoundingClientRect();s=l.e.clientY+o.globals.translateY-f.top}d<0&&(s=c),l.marker.enlargeCurrentPoint(i,r.paths,n,s)}return{x:n,y:s}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,r=t.opt,n=this.w,s=this.ttCtx,o=s.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:r});e=d.i;var u=d.barHeight,f=d.j;n.globals.capturedSeriesIndex=e,n.globals.capturedDataPointIndex=f,n.globals.isBarHorizontal&&s.tooltipUtil.hasBars()||!n.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(n.config.stroke.width)?n.config.stroke.width[e]:n.config.stroke.width,l=h):n.globals.comboCharts||n.config.tooltip.shared||(l/=2),isNaN(c)?c=n.globals.svgHeight-s.tooltipRect.ttHeight:c<0&&(c=0);var p=parseInt(r.paths.parentNode.getAttribute("data:realIndex"),10),g=n.globals.isMultipleYAxis?n.config.yaxis[p]&&n.config.yaxis[p].reversed:n.config.yaxis[0].reversed;if(h+s.tooltipRect.ttWidth>n.globals.gridWidth&&!g?h-=s.tooltipRect.ttWidth:h<0&&(h=0),s.w.config.tooltip.followCursor){var x=s.getElGrid().getBoundingClientRect();c=s.e.clientY-x.top}null===s.tooltip&&(s.tooltip=n.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),n.config.tooltip.shared||(n.globals.comboBarCount>0?s.tooltipPosition.moveXCrosshairs(l+i/2):s.tooltipPosition.moveXCrosshairs(l)),!s.fixedTooltip&&(!n.config.tooltip.shared||n.globals.isBarHorizontal&&s.tooltipUtil.hasBars())&&(g&&(h-=s.tooltipRect.ttWidth)<0&&(h=0),!g||n.globals.isBarHorizontal&&s.tooltipUtil.hasBars()||(c=c+u-2*(n.globals.series[e][f]<0?u:0)),s.tooltipRect.ttHeight+c>n.globals.gridHeight?c=n.globals.gridHeight-s.tooltipRect.ttHeight+n.globals.translateY:(c=c+n.globals.translateY-s.tooltipRect.ttHeight/2)<0&&(c=0),o.style.left=h+n.globals.translateX+"px",o.style.top=c+"px")}},{key:"getBarTooltipXY",value:function(t){var e=t.e,i=t.opt,a=this.w,r=null,n=this.ttCtx,s=0,o=0,l=0,h=0,c=0,d=e.target.classList;if(d.contains("apexcharts-bar-area")||d.contains("apexcharts-candlestick-area")||d.contains("apexcharts-boxPlot-area")||d.contains("apexcharts-rangebar-area")){var u=e.target,f=u.getBoundingClientRect(),p=i.elGrid.getBoundingClientRect(),g=f.height;c=f.height;var x=f.width,m=parseInt(u.getAttribute("cx"),10),v=parseInt(u.getAttribute("cy"),10);h=parseFloat(u.getAttribute("barWidth"));var b="touchmove"===e.type?e.touches[0].clientX:e.clientX;r=parseInt(u.getAttribute("j"),10),s=parseInt(u.parentNode.getAttribute("rel"),10)-1;var y=u.getAttribute("data-range-y1"),w=u.getAttribute("data-range-y2");a.globals.comboCharts&&(s=parseInt(u.parentNode.getAttribute("data:realIndex"),10)),n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:s,j:r,y1:y?parseInt(y,10):null,y2:w?parseInt(w,10):null,shared:!n.showOnIntersect&&a.config.tooltip.shared,e:e}),a.config.tooltip.followCursor?a.globals.isBarHorizontal?(o=b-p.left+15,l=v-n.dataPointsDividedHeight+g/2-n.tooltipRect.ttHeight/2):(o=a.globals.isXNumeric?m-x/2:m-n.dataPointsDividedWidth+x/2,l=e.clientY-p.top-n.tooltipRect.ttHeight/2-15):a.globals.isBarHorizontal?((o=m)<n.xyRatios.baseLineInvertedY&&(o=m-n.tooltipRect.ttWidth),l=v-n.dataPointsDividedHeight+g/2-n.tooltipRect.ttHeight/2):(o=a.globals.isXNumeric?m-x/2:m-n.dataPointsDividedWidth+x/2,l=v)}return{x:o,y:l,barHeight:c,barWidth:h,i:s,j:r}}}]),t}(),bt=function(){function t(e){n(this,t),this.w=e.w,this.ttCtx=e}return o(t,[{key:"drawXaxisTooltip",value:function(){var t=this.w,e=this.ttCtx,i="bottom"===t.config.xaxis.position;e.xaxisOffY=i?t.globals.gridHeight+1:-t.globals.xAxisHeight-t.config.xaxis.axisTicks.height+3;var a=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",r=t.globals.dom.elWrap;e.isXAxisTooltipEnabled&&null===t.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(e.xaxisTooltip=document.createElement("div"),e.xaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),r.appendChild(e.xaxisTooltip),e.xaxisTooltipText=document.createElement("div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var t=this.w,e=this.ttCtx,i=function(i){var a=t.config.yaxis[i].opposite||t.config.yaxis[i].crosshairs.opposite;e.yaxisOffX=a?t.globals.gridWidth+1:1;var r="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i,a?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left");t.globals.yAxisSameScaleIndices.map((function(e,a){e.map((function(e,a){a===i&&(r+=t.config.yaxis[a].show?" ":" apexcharts-yaxistooltip-hidden")}))}));var n=t.globals.dom.elWrap;null===t.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i))&&(e.yaxisTooltip=document.createElement("div"),e.yaxisTooltip.setAttribute("class",r+" apexcharts-theme-"+t.config.tooltip.theme),n.appendChild(e.yaxisTooltip),0===i&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[i]=document.createElement("div"),e.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[i]))},a=0;a<t.config.yaxis.length;a++)i(a)}},{key:"setXCrosshairWidth",value:function(){var t=this.w,e=this.ttCtx,i=e.getElXCrosshairs();if(e.xcrosshairsWidth=parseInt(t.config.xaxis.crosshairs.width,10),t.globals.comboCharts){var a=t.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==a&&"barWidth"===t.config.xaxis.crosshairs.width){var r=parseFloat(a.getAttribute("barWidth"));e.xcrosshairsWidth=r}else if("tickWidth"===t.config.xaxis.crosshairs.width){var n=t.globals.labels.length;e.xcrosshairsWidth=t.globals.gridWidth/n}}else if("tickWidth"===t.config.xaxis.crosshairs.width){var s=t.globals.labels.length;e.xcrosshairsWidth=t.globals.gridWidth/s}else if("barWidth"===t.config.xaxis.crosshairs.width){var o=t.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==o){var l=parseFloat(o.getAttribute("barWidth"));e.xcrosshairsWidth=l}else e.xcrosshairsWidth=1}t.globals.isBarHorizontal&&(e.xcrosshairsWidth=0),null!==i&&e.xcrosshairsWidth>0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,r=this.w,n=r.globals.yLabelFormatters[t];if(a.yaxisTooltips[t]){var s=a.getElGrid().getBoundingClientRect(),o=(e-s.top)*i.yRatio[t],l=r.globals.maxYArr[t]-r.globals.minYArr[t],h=r.globals.minYArr[t]+(l-o);a.tooltipPosition.moveYCrosshairs(e-s.top),a.yaxisTooltipText[t].innerHTML=n(h),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),yt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.tConfig=i.config.tooltip,this.tooltipUtil=new pt(this),this.tooltipLabels=new gt(this),this.tooltipPosition=new xt(this),this.marker=new mt(this),this.intersect=new vt(this),this.axesTooltip=new bt(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!i.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return o(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new U(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var r=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],r=this.getElTooltip(),n=function(n){var s=document.createElement("div");s.classList.add("apexcharts-tooltip-series-group"),s.style.order=i.config.tooltip.inverseOrder?t-n:n+1,e.tConfig.shared&&e.tConfig.enabledOnSeries&&Array.isArray(e.tConfig.enabledOnSeries)&&e.tConfig.enabledOnSeries.indexOf(n)<0&&s.classList.add("apexcharts-tooltip-series-group-hidden");var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[n],s.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),s.appendChild(l),r.appendChild(s),a.push(s)},s=0;s<t;s++)n(s);return a}},{key:"addSVGEvents",value:function(){var t=this.w,e=t.config.chart.type,i=this.getElTooltip(),a=!("bar"!==e&&"candlestick"!==e&&"boxPlot"!==e&&"rangeBar"!==e),r="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,n=t.globals.dom.Paper.node,s=this.getElGrid();s&&(this.seriesBound=s.getBoundingClientRect());var o,l=[],h=[],c={hoverArea:n,elGrid:s,tooltipEl:i,tooltipY:l,tooltipX:h,ttItems:this.ttItems};if(t.globals.axisCharts&&(r?o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):a?o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):"heatmap"!==e&&"treemap"!==e||(o=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),o&&o.length))for(var d=0;d<o.length;d++)l.push(o[d].getAttribute("cy")),h.push(o[d].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||a&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([n],c);else if(a&&!t.globals.comboCharts||r&&this.showOnIntersect)this.addDatapointEventsListeners(c);else if(!t.globals.axisCharts||"heatmap"===e||"treemap"===e){var u=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(u,c)}if(this.showOnIntersect){var f=t.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");f.length>0&&this.addPathsEventListeners(f,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,r=i.height+10,n=this.tConfig.fixed.offsetX,s=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(n=n+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(s=s+t.globals.svgHeight-r-10),e.style.left=n+"px",e.style.top=s+"px",{x:n,y:s,ttWidth:a,ttHeight:r}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var r={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,r),{capture:!1,passive:!0})}))},r=0;r<t.length;r++)a(r)}},{key:"onSeriesHover",value:function(t,e){var i=this,a=Date.now()-this.lastHoverTime;a>=100?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),100-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],r=this.w;r.config.chart.group&&(a=this.ctx.getGroupedCharts()),r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||0===r.globals.dataPoints)||(a.length?a.forEach((function(a){var r=i.getElTooltip(a),n={paths:t.paths,tooltipEl:r,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:n,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,r=t.e,n=e.w,s=this.getElTooltip();s&&(i.tooltipRect={x:0,y:0,ttWidth:s.getBoundingClientRect().width,ttHeight:s.getBoundingClientRect().height},i.e=r,!i.tooltipUtil.hasBars()||n.globals.comboCharts||i.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new I(e).toggleSeriesOnHover(r,r.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),n.globals.axisCharts?i.axisChartsTooltips({e:r,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:r,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,r=t.opt,n=this.w,s=r.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,n.globals.capturedSeriesIndex=-1,n.globals.capturedDataPointIndex=-1,l<s.top||l>s.top+s.height)this.handleMouseOut(r);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!n.config.tooltip.shared){var h=parseInt(r.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(r)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=n.globals.xyCharts||"bar"===n.config.chart.type&&!n.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||n.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(n.globals.collapsedSeries.length+n.globals.ancillaryCollapsedSeries.length===n.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var f=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&f.length&&this.ycrosshairs.classList.add("apexcharts-active"),u&&!this.showOnIntersect)this.handleStickyTooltip(a,o,l,r);else if("heatmap"===n.config.chart.type||"treemap"===n.config.chart.type){var p=this.intersect.handleHeatTreeTooltip({e:a,opt:r,x:e,y:i,type:n.config.chart.type});e=p.x,i=p.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:r}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:r,x:e,y:i});if(this.yaxisTooltips.length)for(var g=0;g<n.config.yaxis.length;g++)this.axesTooltip.drawYaxisTooltipText(g,l,this.xyRatios);r.tooltipEl.classList.add("apexcharts-active")}else"mouseout"!==a.type&&"touchend"!==a.type||this.handleMouseOut(r)}}},{key:"nonAxisChartsTooltips",value:function(t){var e=t.e,i=t.opt,a=t.tooltipRect,r=this.w,n=i.paths.getAttribute("rel"),s=this.getElTooltip(),o=r.globals.dom.elWrap.getBoundingClientRect();if("mousemove"===e.type||"touchmove"===e.type){s.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(n,10)-1,shared:!1});var l=r.globals.clientX-o.left-a.ttWidth/2,h=r.globals.clientY-o.top-a.ttHeight-10;if(s.style.left=l+"px",s.style.top=h+"px",r.config.legend.tooltipHoverFormatter){var c=n-1,d=(0,r.config.legend.tooltipHoverFormatter)(this.legendLabels[c].getAttribute("data:default-text"),{seriesIndex:c,dataPointIndex:c,w:r});this.legendLabels[c].innerHTML=d}}else"mouseout"!==e.type&&"touchend"!==e.type||(s.classList.remove("apexcharts-active"),r.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)})))}},{key:"handleStickyTooltip",value:function(t,e,i,a){var r=this.w,n=this.tooltipUtil.getNearestValues({context:this,hoverArea:a.hoverArea,elGrid:a.elGrid,clientX:e,clientY:i}),s=n.j,o=n.capturedSeries,l=a.elGrid.getBoundingClientRect();n.hoverX<0||n.hoverX>l.width?this.handleMouseOut(a):null!==o?this.handleStickyCapturedSeries(t,o,a,s):(this.tooltipUtil.isXoverlap(s)||r.globals.isBarHorizontal)&&this.create(t,this,0,s,a.ttItems)}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var r=this.w;this.tConfig.shared||null!==r.globals.series[e][a]?void 0!==r.globals.series[e][a]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1):this.tooltipUtil.isXoverlap(a)&&this.create(t,this,0,a,i.ttItems):this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new y(this.ctx),i=t.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a<i.length;a++)e.pathMouseLeave(i[a])}},{key:"handleMouseOut",value:function(t){var e=this.w,i=this.getElXCrosshairs();if(t.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),"bubble"!==e.config.chart.type&&this.marker.resetPointsSize(),null!==i&&i.classList.remove("apexcharts-active"),null!==this.ycrosshairs&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){null===this.yaxisTTEls&&(this.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var a=0;a<this.yaxisTTEls.length;a++)this.yaxisTTEls[a].classList.remove("apexcharts-active")}e.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}))}},{key:"markerClick",value:function(t,e,i){var a=this.w;"function"==typeof a.config.chart.events.markerClick&&a.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:a}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:i,w:a}])}},{key:"create",value:function(t,e,i,a,r){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=this.w,o=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===n&&(n=this.tConfig.shared);var l=this.tooltipUtil.hasMarkers(),h=this.tooltipUtil.getElBars();if(s.config.legend.tooltipHoverFormatter){var c=s.config.legend.tooltipHoverFormatter,d=Array.from(this.legendLabels);d.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var u=0;u<d.length;u++){var f=d[u],p=parseInt(f.getAttribute("i"),10),g=decodeURIComponent(f.getAttribute("data:default-text")),x=c(g,{seriesIndex:n?p:i,dataPointIndex:a,w:s});if(n)f.innerHTML=s.globals.collapsedSeriesIndices.indexOf(p)<0?x:g;else if(f.innerHTML=p===i?x:g,i===p)break}}if(n){if(o.tooltipLabels.drawSeriesTexts({ttItems:r,i:i,j:a,shared:!this.showOnIntersect&&this.tConfig.shared}),l&&(s.globals.markers.largestSize>0?o.marker.enlargePoints(a):o.tooltipPosition.moveDynamicPointsOnHover(a)),this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(h),this.barSeriesHeight>0)){var m=new y(this.ctx),v=s.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a);for(var b=0;b<v.length;b++)m.pathMouseEnter(v[b])}}else o.tooltipLabels.drawSeriesTexts({shared:!1,ttItems:r,i:i,j:a}),this.tooltipUtil.hasBars()&&o.tooltipPosition.moveStickyTooltipOverBars(a),l&&o.tooltipPosition.moveMarkers(i,a)}}]),t}(),wt=function(t){h(i,N);var e=f(i);function i(){return n(this,i),e.apply(this,arguments)}return o(i,[{key:"draw",value:function(t,e){var i=this,r=this.w;this.graphics=new y(this.ctx),this.bar=new N(this.ctx,this.xyRatios);var n=new w(this.ctx,r);t=n.getLogSeries(t),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===r.config.chart.stackType&&(t=r.globals.seriesPercent.slice()),this.series=t,this.totalItems=0,this.prevY=[],this.prevX=[],this.prevYF=[],this.prevXF=[],this.prevYVal=[],this.prevXVal=[],this.xArrj=[],this.xArrjF=[],this.xArrjVal=[],this.yArrj=[],this.yArrjF=[],this.yArrjVal=[];for(var s=0;s<t.length;s++)t[s].length>0&&(this.totalItems+=t[s].length);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),l=0,h=0,c=function(n,s){var c=void 0,d=void 0,u=void 0,f=void 0,p=[],g=[],x=r.globals.comboCharts?e[n]:n;i.yRatio.length>1&&(i.yaxisIndex=x),i.isReversed=r.config.yaxis[i.yaxisIndex]&&r.config.yaxis[i.yaxisIndex].reversed;var v=i.graphics.group({class:"apexcharts-series",seriesName:m.escapeString(r.globals.seriesNames[x]),rel:n+1,"data:realIndex":x});i.ctx.series.addCollapsedClassToSeries(v,x);var b=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":x}),y=0,w=0,S=i.initialPositions(l,h,c,d,u,f);h=S.y,y=S.barHeight,d=S.yDivision,f=S.zeroW,l=S.x,w=S.barWidth,c=S.xDivision,u=S.zeroH,i.yArrj=[],i.yArrjF=[],i.yArrjVal=[],i.xArrj=[],i.xArrjF=[],i.xArrjVal=[],1===i.prevY.length&&i.prevY[0].every((function(t){return isNaN(t)}))&&(i.prevY[0]=i.prevY[0].map((function(t){return u})),i.prevYF[0]=i.prevYF[0].map((function(t){return 0})));for(var _=0;_<r.globals.dataPoints;_++){var k=i.barHelpers.getStrokeWidth(n,_,x),A={indexes:{i:n,j:_,realIndex:x,bc:s},strokeWidth:k,x:l,y:h,elSeries:v},C=null;i.isHorizontal?(C=i.drawStackedBarPaths(a(a({},A),{},{zeroW:f,barHeight:y,yDivision:d})),w=i.series[n][_]/i.invertedYRatio):(C=i.drawStackedColumnPaths(a(a({},A),{},{xDivision:c,barWidth:w,zeroH:u})),y=i.series[n][_]/i.yRatio[i.yaxisIndex]),h=C.y,l=C.x,p.push(l),g.push(h);var M=i.barHelpers.getPathFillColor(t,n,_,x);v=i.renderSeries({realIndex:x,pathFill:M,j:_,i:n,pathFrom:C.pathFrom,pathTo:C.pathTo,strokeWidth:k,elSeries:v,x:l,y:h,series:t,barHeight:y,barWidth:w,elDataLabelsWrap:b,type:"bar",visibleSeries:0})}r.globals.seriesXvalues[x]=p,r.globals.seriesYvalues[x]=g,i.prevY.push(i.yArrj),i.prevYF.push(i.yArrjF),i.prevYVal.push(i.yArrjVal),i.prevX.push(i.xArrj),i.prevXF.push(i.xArrjF),i.prevXVal.push(i.xArrjVal),o.add(v)},d=0,u=0;d<t.length;d++,u++)c(d,u);return o}},{key:"initialPositions",value:function(t,e,i,a,r,n){var s,o,l=this.w;return this.isHorizontal?(s=(s=a=l.globals.gridHeight/l.globals.dataPoints)*parseInt(l.config.plotOptions.bar.barHeight,10)/100,n=this.baseLineInvertedY+l.globals.padHorizontal+(this.isReversed?l.globals.gridWidth:0)-(this.isReversed?2*this.baseLineInvertedY:0),e=(a-s)/2):(o=i=l.globals.gridWidth/l.globals.dataPoints,o=l.globals.isXNumeric&&l.globals.dataPoints>1?(i=l.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:o*parseInt(l.config.plotOptions.bar.columnWidth,10)/100,r=this.baseLineY[this.yaxisIndex]+(this.isReversed?l.globals.gridHeight:0)-(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),t=l.globals.padHorizontal+(i-o)/2),{x:t,y:e,yDivision:a,xDivision:i,barHeight:s,barWidth:o,zeroH:r,zeroW:n}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,r=t.strokeWidth,n=t.zeroW,s=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=o,u=i.i,f=i.j,p=0,g=0;g<this.prevXF.length;g++)p+=this.prevXF[g][f];if(u>0){var x=n;this.prevXVal[u-1][f]<0?x=this.series[u][f]>=0?this.prevX[u-1][f]+p-2*(this.isReversed?p:0):this.prevX[u-1][f]:this.prevXVal[u-1][f]>=0&&(x=this.series[u][f]>=0?this.prevX[u-1][f]:this.prevX[u-1][f]-p+2*(this.isReversed?p:0)),e=x}else e=n;s=null===this.series[u][f]?e:e+this.series[u][f]/this.invertedYRatio-2*(this.isReversed?this.series[u][f]/this.invertedYRatio:0);var m=this.barHelpers.getBarpaths({barYPosition:d,barHeight:a,x1:e,x2:s,strokeWidth:r,series:this.series,realIndex:i.realIndex,i:u,j:f,w:c});return this.barHelpers.barBackground({j:f,i:u,y1:d,y2:a,elSeries:h}),o+=l,{pathTo:m.pathTo,pathFrom:m.pathFrom,x:s,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,r=t.xDivision,n=t.barWidth,s=t.zeroH;t.strokeWidth;var o=t.elSeries,l=this.w,h=e.i,c=e.j,d=e.bc;if(l.globals.isXNumeric){var u=l.globals.seriesX[h][c];u||(u=0),i=(u-l.globals.minX)/this.xRatio-n/2}for(var f,p=i,g=0,x=0;x<this.prevYF.length;x++)g+=isNaN(this.prevYF[x][c])?0:this.prevYF[x][c];if(h>0&&!l.globals.isXNumeric||h>0&&l.globals.isXNumeric&&l.globals.seriesX[h-1][c]===l.globals.seriesX[h][c]){var m,v,b=Math.min(this.yRatio.length+1,h+1);if(void 0!==this.prevY[h-1])for(var y=1;y<b;y++)if(!isNaN(this.prevY[h-y][c])){v=this.prevY[h-y][c];break}for(var w=1;w<b;w++){if(this.prevYVal[h-w][c]<0){m=this.series[h][c]>=0?v-g+2*(this.isReversed?g:0):v;break}if(this.prevYVal[h-w][c]>=0){m=this.series[h][c]>=0?v:v+g-2*(this.isReversed?g:0);break}}void 0===m&&(m=l.globals.gridHeight),f=this.prevYF[0].every((function(t){return 0===t}))&&this.prevYF.slice(1,h).every((function(t){return t.every((function(t){return isNaN(t)}))}))?l.globals.gridHeight-s:m}else f=l.globals.gridHeight-s;a=f-this.series[h][c]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[h][c]/this.yRatio[this.yaxisIndex]:0);var S=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:n,y1:f,y2:a,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,realIndex:e.realIndex,i:h,j:c,w:l});return this.barHelpers.barBackground({bc:d,j:c,i:h,x1:p,x2:n,elSeries:o}),i+=r,{pathTo:S.pathTo,pathFrom:S.pathFrom,x:l.globals.isXNumeric?i-r:i,y:a}}}]),i}(),St=function(t){h(i,N);var e=f(i);function i(){return n(this,i),e.apply(this,arguments)}return o(i,[{key:"draw",value:function(t,e){var i=this,r=this.w,n=new y(this.ctx),s=new P(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=r.config.plotOptions.bar.horizontal;var o=new w(this.ctx,r);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var l=n.group({class:"apexcharts-".concat(r.config.chart.type,"-series apexcharts-plot-series")}),h=function(o){i.isBoxPlot="boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[o].type;var h,c,d,u,f,p,g=void 0,x=void 0,v=[],b=[],y=r.globals.comboCharts?e[o]:o,w=n.group({class:"apexcharts-series",seriesName:m.escapeString(r.globals.seriesNames[y]),rel:o+1,"data:realIndex":y});i.ctx.series.addCollapsedClassToSeries(w,y),t[o].length>0&&(i.visibleI=i.visibleI+1),i.yRatio.length>1&&(i.yaxisIndex=y);var S=i.barHelpers.initialPositions();x=S.y,f=S.barHeight,c=S.yDivision,u=S.zeroW,g=S.x,p=S.barWidth,h=S.xDivision,d=S.zeroH,b.push(g+p/2);for(var _=n.group({class:"apexcharts-datalabels","data:realIndex":y}),k=function(e){var n=i.barHelpers.getStrokeWidth(o,e,y),l=null,m={indexes:{i:o,j:e,realIndex:y},x:g,y:x,strokeWidth:n,elSeries:w};l=i.isHorizontal?i.drawHorizontalBoxPaths(a(a({},m),{},{yDivision:c,barHeight:f,zeroW:u})):i.drawVerticalBoxPaths(a(a({},m),{},{xDivision:h,barWidth:p,zeroH:d})),x=l.y,g=l.x,e>0&&b.push(g+p/2),v.push(x),l.pathTo.forEach((function(a,h){var c=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?l.color[h]:r.globals.stroke.colors[o],d=s.fillPath({seriesNumber:y,dataPointIndex:e,color:l.color[h],value:t[o][e]});i.renderSeries({realIndex:y,pathFill:d,lineFill:c,j:e,i:o,pathFrom:l.pathFrom,pathTo:a,strokeWidth:n,elSeries:w,x:g,y:x,series:t,barHeight:f,barWidth:p,elDataLabelsWrap:_,visibleSeries:i.visibleI,type:r.config.chart.type})}))},A=0;A<r.globals.dataPoints;A++)k(A);r.globals.seriesXvalues[y]=b,r.globals.seriesYvalues[y]=v,l.add(w)},c=0;c<t.length;c++)h(c);return l}},{key:"drawVerticalBoxPaths",value:function(t){var e=t.indexes,i=t.x;t.y;var a=t.xDivision,r=t.barWidth,n=t.zeroH,s=t.strokeWidth,o=this.w,l=new y(this.ctx),h=e.i,c=e.j,d=!0,u=o.config.plotOptions.candlestick.colors.upward,f=o.config.plotOptions.candlestick.colors.downward,p="";this.isBoxPlot&&(p=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var g=this.yRatio[this.yaxisIndex],x=e.realIndex,m=this.getOHLCValue(x,c),v=n,b=n;m.o>m.c&&(d=!1);var w=Math.min(m.o,m.c),S=Math.max(m.o,m.c),_=m.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[x][c]-o.globals.minX)/this.xRatio-r/2);var k=i+r*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(w=n,S=n):(w=n-w/g,S=n-S/g,v=n-m.h/g,b=n-m.l/g,_=n-m.m/g);var A=l.move(k,n),C=l.move(k+r/2,w);return o.globals.previousPaths.length>0&&(C=this.getPreviousPath(x,c,!0)),A=this.isBoxPlot?[l.move(k,w)+l.line(k+r/2,w)+l.line(k+r/2,v)+l.line(k+r/4,v)+l.line(k+r-r/4,v)+l.line(k+r/2,v)+l.line(k+r/2,w)+l.line(k+r,w)+l.line(k+r,_)+l.line(k,_)+l.line(k,w+s/2),l.move(k,_)+l.line(k+r,_)+l.line(k+r,S)+l.line(k+r/2,S)+l.line(k+r/2,b)+l.line(k+r-r/4,b)+l.line(k+r/4,b)+l.line(k+r/2,b)+l.line(k+r/2,S)+l.line(k,S)+l.line(k,_)+"z"]:[l.move(k,S)+l.line(k+r/2,S)+l.line(k+r/2,v)+l.line(k+r/2,S)+l.line(k+r,S)+l.line(k+r,w)+l.line(k+r/2,w)+l.line(k+r/2,b)+l.line(k+r/2,w)+l.line(k,w)+l.line(k,S-s/2)],C+=l.move(k,w),o.globals.isXNumeric||(i+=a),{pathTo:A,pathFrom:C,x:i,y:S,barXPosition:k,color:this.isBoxPlot?p:d?[u]:[f]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,r=t.barHeight,n=t.zeroW,s=t.strokeWidth,o=this.w,l=new y(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,f=e.realIndex,p=this.getOHLCValue(f,c),g=n,x=n,m=Math.min(p.o,p.c),v=Math.max(p.o,p.c),b=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[f][c]-o.globals.minX)/this.invertedXRatio-r/2);var w=i+r*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(m=n,v=n):(m=n+m/u,v=n+v/u,g=n+p.h/u,x=n+p.l/u,b=n+p.m/u);var S=l.move(n,w),_=l.move(m,w+r/2);return o.globals.previousPaths.length>0&&(_=this.getPreviousPath(f,c,!0)),S=[l.move(m,w)+l.line(m,w+r/2)+l.line(g,w+r/2)+l.line(g,w+r/2-r/4)+l.line(g,w+r/2+r/4)+l.line(g,w+r/2)+l.line(m,w+r/2)+l.line(m,w+r)+l.line(b,w+r)+l.line(b,w)+l.line(m+s/2,w),l.move(b,w)+l.line(b,w+r)+l.line(v,w+r)+l.line(v,w+r/2)+l.line(x,w+r/2)+l.line(x,w+r-r/4)+l.line(x,w+r/4)+l.line(x,w+r/2)+l.line(v,w+r/2)+l.line(v,w)+l.line(b,w)+"z"],_+=l.move(m,w),o.globals.isXNumeric||(i+=a),{pathTo:S,pathFrom:_,x:v,y:i,barYPosition:w,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),i}(),_t=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var r=this.w,n=1,s=r.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);r.globals.hasNegs||a?n=r.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*s):(1-o.percent/100)*(1.25*s):o.percent<=0?1-(1+o.percent/100)*s:(1-o.percent/100)*s:(n=1-o.percent/100,"treemap"===t&&(n=(1-o.percent/100)*(1.25*s)));var l=o.color,h=new m;return r.config.plotOptions[t].enableShades&&(l="dark"===this.w.config.theme.mode?m.hexToRgba(h.shadeColor(-1*n,o.color),r.config.fill.opacity):m.hexToRgba(h.shadeColor(n,o.color),r.config.fill.opacity)),{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,r=a.globals.series[e][i],n=a.config.plotOptions[t],s=n.colorScale.inverse?i:e;n.distributed&&"treemap"===a.config.chart.type&&(s=i);var o=a.globals.colors[s],l=null,h=Math.min.apply(Math,p(a.globals.series[e])),c=Math.max.apply(Math,p(a.globals.series[e]));n.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==n.colorScale.min&&(h=n.colorScale.min<a.globals.minY?n.colorScale.min:a.globals.minY,c=n.colorScale.max>a.globals.maxY?n.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*r/(0===d?d-1e-6:d);return n.colorScale.ranges.length>0&&n.colorScale.ranges.map((function(t,e){if(r>=t.from&&r<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*r/(0===i?i-1e-6:i)}})),{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,r=t.i,n=t.j,s=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new y(this.ctx),c=new E(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,f=l.offsetY,p=i+u,g=a+parseFloat(l.style.fontSize)/3+f;c.plotDataLabelsText({x:p,y:g,text:e,i:r,j:n,color:s.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new y(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),kt=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w,this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new _t(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return o(t,[{key:"draw",value:function(t){var e=this.w,i=new y(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var r=e.globals.gridWidth/e.globals.dataPoints,n=e.globals.gridHeight/e.globals.series.length,s=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h<l.length:h>=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:m.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new b(this.ctx).dropShadow(c,d,h)}for(var u=0,f=e.config.plotOptions.heatmap.shadeIntensity,p=0;p<l[h].length;p++){var g=this.helpers.getShadeColor(e.config.chart.type,h,p,this.negRange),x=g.color,v=g.colorProps;"image"===e.config.fill.type&&(x=new P(this.ctx).fillPath({seriesNumber:h,dataPointIndex:p,opacity:e.globals.hasNegs?v.percent<0?1-(1+v.percent/100):f+v.percent/100:v.percent/100,patternID:m.randomId(),width:e.config.fill.image.width?e.config.fill.image.width:r,height:e.config.fill.image.height?e.config.fill.image.height:n}));var w=this.rectRadius,S=i.drawRect(u,s,r,n,w);if(S.attr({cx:u,cy:s}),S.node.classList.add("apexcharts-heatmap-rect"),c.add(S),S.attr({fill:x,i:h,index:h,j:p,val:l[h][p],"stroke-width":this.strokeWidth,stroke:e.config.plotOptions.heatmap.useFillColorAsStroke?x:e.globals.stroke.colors[0],color:x}),this.helpers.addListeners(S),e.config.chart.animations.enabled&&!e.globals.dataChanged){var _=1;e.globals.resized||(_=e.config.chart.animations.speed),this.animateHeatMap(S,u,s,r,n,_)}if(e.globals.dataChanged){var k=1;if(this.dynamicAnim.enabled&&e.globals.shouldAnimate){k=this.dynamicAnim.speed;var A=e.globals.previousPaths[h]&&e.globals.previousPaths[h][p]&&e.globals.previousPaths[h][p].color;A||(A="rgba(255, 255, 255, 0)"),this.animateHeatColor(S,m.isColorHex(A)?A:m.rgb2hex(A),m.isColorHex(x)?x:m.rgb2hex(x),k)}}var C=(0,e.config.dataLabels.formatter)(e.globals.series[h][p],{value:e.globals.series[h][p],seriesIndex:h,dataPointIndex:p,w:e}),M=this.helpers.calculateDataLabels({text:C,x:u+r/2,y:s+n/2,i:h,j:p,colorProps:v,series:l});null!==M&&c.add(M),u+=r}s+=n,a.add(c)}var T=e.globals.yAxisScale[0].result.slice();e.config.yaxis[0].reversed?T.unshift(""):T.push(""),e.globals.yAxisScale[0].result=T;var L=e.globals.gridHeight/e.globals.series.length;return e.config.yaxis[0].labels.offsetY=-L/2,a}},{key:"animateHeatMap",value:function(t,e,i,a,r,n){var s=new v(this.ctx);s.animateRect(t,{x:e+a/2,y:i+r/2,width:0,height:0},{x:e,y:i,width:a,height:r},n,(function(){s.animationCompleted(t)}))}},{key:"animateHeatColor",value:function(t,e,i,a){t.attr({fill:e}).animate(a).attr({fill:i})}}]),t}(),At=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"drawYAxisTexts",value:function(t,e,i,a){var r=this.w,n=r.config.yaxis[0],s=r.globals.yLabelFormatters[0];return new y(this.ctx).drawText({x:t+n.labels.offsetX,y:e+n.labels.offsetY,text:s(a,i),textAnchor:"middle",fontSize:n.labels.style.fontSize,fontFamily:n.labels.style.fontFamily,foreColor:Array.isArray(n.labels.style.colors)?n.labels.style.colors[i]:n.labels.style.colors})}}]),t}(),Ct=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=void 0!==i.globals.stroke.colors?i.globals.stroke.colors:i.globals.colors,this.defaultSize=Math.min(i.globals.gridWidth,i.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=i.globals.gridWidth/2,"radialBar"===i.config.chart.type?this.fullAngle=360:this.fullAngle=Math.abs(i.config.plotOptions.pie.endAngle-i.config.plotOptions.pie.startAngle),this.initialAngle=i.config.plotOptions.pie.startAngle%this.fullAngle,i.globals.radialSize=this.defaultSize/2.05-i.config.stroke.width-(i.config.chart.sparkline.enabled?0:i.config.chart.dropShadow.blur),this.donutSize=i.globals.radialSize*parseInt(i.config.plotOptions.pie.donut.size,10)/100,this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return o(t,[{key:"draw",value:function(t){var e=this,i=this.w,a=new y(this.ctx);if(this.ret=a.group({class:"apexcharts-pie"}),i.globals.noData)return this.ret;for(var r=0,n=0;n<t.length;n++)r+=m.negToZero(t[n]);var s=[],o=a.group();0===r&&(r=1e-5),t.forEach((function(t){e.maxY=Math.max(e.maxY,t)})),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),"back"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret);for(var l=0;l<t.length;l++){var h=this.fullAngle*m.negToZero(t[l])/r;s.push(h),"polarArea"===this.chartType?(s[l]=this.fullAngle/t.length,this.sliceSizes.push(i.globals.radialSize*t[l]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}if(i.globals.dataChanged){for(var c,d=0,u=0;u<i.globals.previousPaths.length;u++)d+=m.negToZero(i.globals.previousPaths[u]);for(var f=0;f<i.globals.previousPaths.length;f++)c=this.fullAngle*m.negToZero(i.globals.previousPaths[f])/d,this.prevSectorAngleArr.push(c)}this.donutSize<0&&(this.donutSize=0);var p=i.config.plotOptions.pie.customScale,g=i.globals.gridWidth/2,x=i.globals.gridHeight/2,v=g-i.globals.gridWidth/2*p,b=x-i.globals.gridHeight/2*p;if("donut"===this.chartType){var w=a.drawCircle(this.donutSize);w.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),o.add(w)}var S=this.drawArcs(s,t);if(this.sliceLabels.forEach((function(t){S.add(t)})),o.attr({transform:"translate(".concat(v,", ").concat(b,") scale(").concat(p,")")}),o.add(S),this.ret.add(o),this.donutDataLabels.show){var _=this.renderInnerDataLabels(this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show,translateX:v,translateY:b});this.ret.add(_)}return"front"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret),this.ret}},{key:"drawArcs",value:function(t,e){var i=this.w,a=new b(this.ctx),r=new y(this.ctx),n=new P(this.ctx),s=r.group({class:"apexcharts-slices"}),o=this.initialAngle,l=this.initialAngle,h=this.initialAngle,c=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var d=0;d<t.length;d++){var u=r.group({class:"apexcharts-series apexcharts-pie-series",seriesName:m.escapeString(i.globals.seriesNames[d]),rel:d+1,"data:realIndex":d});s.add(u),l=c,h=(o=h)+t[d],c=l+this.prevSectorAngleArr[d];var f=h<o?this.fullAngle+h-o:h-o,p=n.fillPath({seriesNumber:d,size:this.sliceSizes[d],value:e[d]}),g=this.getChangedPath(l,c),x=r.drawPath({d:g,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[d]:this.lineColorArr,strokeWidth:0,fill:p,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(d)});if(x.attr({index:0,j:d}),a.setSelectionFilter(x,0,d),i.config.chart.dropShadow.enabled){var v=i.config.chart.dropShadow;a.dropShadow(x,v,d)}this.addListeners(x,this.donutDataLabels),y.setAttrs(x.node,{"data:angle":f,"data:startAngle":o,"data:strokeWidth":this.strokeWidth,"data:value":e[d]});var w={x:0,y:0};"pie"===this.chartType||"polarArea"===this.chartType?w=m.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,(o+f/2)%this.fullAngle):"donut"===this.chartType&&(w=m.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,(o+f/2)%this.fullAngle)),u.add(x);var S=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):(0==(S=f/this.fullAngle*i.config.chart.animations.speed)&&(S=1),this.animDur=S+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(x,{size:this.sliceSizes[d],endAngle:h,startAngle:o,prevStartAngle:l,prevEndAngle:c,animateStartingPos:!0,i:d,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(x,{size:this.sliceSizes[d],endAngle:h,startAngle:o,i:d,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:S}),i.config.plotOptions.pie.expandOnClick&&"polarArea"!==this.chartType&&x.click(this.pieClicked.bind(this,d)),void 0!==i.globals.selectedDataPoints[0]&&i.globals.selectedDataPoints[0].indexOf(d)>-1&&this.pieClicked(d),i.config.dataLabels.enabled){var _=w.x,k=w.y,A=100*f/this.fullAngle+"%";if(0!==f&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[d]){var C=i.config.dataLabels.formatter;void 0!==C&&(A=C(i.globals.seriesPercent[d][0],{seriesIndex:d,w:i}));var M=i.globals.dataLabels.style.colors[d],T=r.group({class:"apexcharts-datalabels"}),L=r.drawText({x:_,y:k,text:A,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:M});if(T.add(L),i.config.dataLabels.dropShadow.enabled){var D=i.config.dataLabels.dropShadow;a.dropShadow(L,D)}L.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&!1===i.globals.resized&&(L.node.classList.add("apexcharts-pie-label-delay"),L.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(T)}}}return s}},{key:"addListeners",value:function(t,e){var i=new y(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this,t)),this.donutDataLabels.total.showAlways||(t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e)))}},{key:"animatePaths",value:function(t,e){var i=this.w,a=e.endAngle<e.startAngle?this.fullAngle+e.endAngle-e.startAngle:e.endAngle-e.startAngle,r=a,n=e.startAngle,s=e.startAngle;void 0!==e.prevStartAngle&&void 0!==e.prevEndAngle&&(n=e.prevEndAngle,r=e.prevEndAngle<e.prevStartAngle?this.fullAngle+e.prevEndAngle-e.prevStartAngle:e.prevEndAngle-e.prevStartAngle),e.i===i.config.series.length-1&&(a+s>this.fullAngle?e.endAngle=e.endAngle-(a+s):a+s<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(a+s)))),a===this.fullAngle&&(a=this.fullAngle-.01),this.animateArc(t,n,s,a,r,e)}},{key:"animateArc",value:function(t,e,i,a,r,n){var s,o=this,l=this.w,h=new v(this.ctx),c=n.size;(isNaN(e)||isNaN(r))&&(e=i,r=a,n.dur=0);var d=a,u=i,f=e<i?this.fullAngle+e-i:e-i;l.globals.dataChanged&&n.shouldSetPrevPaths&&n.prevEndAngle&&(s=o.getPiePath({me:o,startAngle:n.prevStartAngle,angle:n.prevEndAngle<n.prevStartAngle?this.fullAngle+n.prevEndAngle-n.prevStartAngle:n.prevEndAngle-n.prevStartAngle,size:c}),t.attr({d:s})),0!==n.dur?t.animate(n.dur,l.globals.easing,n.animBeginArr[n.i]).afterAll((function(){"pie"!==o.chartType&&"donut"!==o.chartType&&"polarArea"!==o.chartType||this.animate(l.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),n.i===l.config.series.length-1&&h.animationCompleted(t)})).during((function(l){d=f+(a-f)*l,n.animateStartingPos&&(d=r+(a-r)*l,u=e-r+(i-(e-r))*l),s=o.getPiePath({me:o,startAngle:u,angle:d,size:c}),t.node.setAttribute("data:pathOrig",s),t.attr({d:s})})):(s=o.getPiePath({me:o,startAngle:u,angle:a,size:c}),n.isTrack||(l.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",s),t.attr({d:s,"stroke-width":o.strokeWidth}))}},{key:"pieClicked",value:function(t){var e,i=this.w,a=this,r=a.sliceSizes[t]+(i.config.plotOptions.pie.expandOnClick?4:0),n=i.globals.dom.Paper.select(".apexcharts-".concat(a.chartType.toLowerCase(),"-slice-").concat(t)).members[0];if("true"!==n.attr("data:pieClicked")){var s=i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(s,(function(t){t.setAttribute("data:pieClicked","false");var e=t.getAttribute("data:pathOrig");t.setAttribute("d",e)})),n.attr("data:pieClicked","true");var o=parseInt(n.attr("data:startAngle"),10),l=parseInt(n.attr("data:angle"),10);e=a.getPiePath({me:a,startAngle:o,angle:l,size:r}),360!==l&&n.plot(e)}else{n.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(n.node,this.donutDataLabels);var h=n.attr("data:pathOrig");n.attr({d:h})}}},{key:"getChangedPath",value:function(t,e){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:t,angle:e-t,size:this.size})),i}},{key:"getPiePath",value:function(t){var e=t.me,i=t.startAngle,a=t.angle,r=t.size,n=i,s=Math.PI*(n-90)/180,o=a+i;Math.ceil(o)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(o=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(o)>this.fullAngle&&(o-=this.fullAngle);var l=Math.PI*(o-90)/180,h=e.centerX+r*Math.cos(s),c=e.centerY+r*Math.sin(s),d=e.centerX+r*Math.cos(l),u=e.centerY+r*Math.sin(l),f=m.polarToCartesian(e.centerX,e.centerY,e.donutSize,o),p=m.polarToCartesian(e.centerX,e.centerY,e.donutSize,n),g=a>180?1:0,x=["M",h,c,"A",r,r,0,g,1,d,u];return"donut"===e.chartType?[].concat(x,["L",f.x,f.y,"A",e.donutSize,e.donutSize,0,g,0,p.x,p.y,"L",h,c,"z"]).join(" "):"pie"===e.chartType||"polarArea"===e.chartType?[].concat(x,["L",e.centerX,e.centerY,"L",h,c]).join(" "):[].concat(x).join(" ")}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new Z(this.ctx),a=new y(this.ctx),r=new At(this.ctx),n=a.group(),s=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),e.config.yaxis[0].tickAmount,0,!0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u<h-1;u++){var f=a.drawCircle(c);if(f.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.rings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){var p=r.drawYAxisTexts(this.centerX,this.centerY-c+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,u,l[u]);s.add(p)}n.add(f),c-=d}this.drawSpokes(t),t.add(n),t.add(s)}},{key:"renderInnerDataLabels",value:function(t,e){var i=this.w,a=new y(this.ctx),r=a.group({class:"apexcharts-datalabels-group",transform:"translate(".concat(e.translateX?e.translateX:0,", ").concat(e.translateY?e.translateY:0,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),n=t.total.show;r.node.style.opacity=e.opacity;var s,o,l=e.centerX,h=e.centerY;s=void 0===t.name.color?i.globals.colors[0]:t.name.color;var c=t.name.fontSize,d=t.name.fontFamily,u=t.name.fontWeight;o=void 0===t.value.color?i.config.chart.foreColor:t.value.color;var f=t.value.formatter,p="",g="";if(n?(s=t.total.color,c=t.total.fontSize,d=t.total.fontFamily,u=t.total.fontWeight,g=t.total.label,p=t.total.formatter(i)):1===i.globals.series.length&&(p=f(i.globals.series[0],i),g=i.globals.seriesNames[0]),g&&(g=t.name.formatter(g,t.total.show,i)),t.name.show){var x=a.drawText({x:l,y:h+parseFloat(t.name.offsetY),text:g,textAnchor:"middle",foreColor:s,fontSize:c,fontWeight:u,fontFamily:d});x.node.classList.add("apexcharts-datalabel-label"),r.add(x)}if(t.value.show){var m=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,v=a.drawText({x:l,y:h+m,text:p,textAnchor:"middle",foreColor:o,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});v.node.classList.add("apexcharts-datalabel-value"),r.add(v)}return r}},{key:"printInnerLabels",value:function(t,e,i,a){var r,n=this.w;a?r=void 0===t.name.color?n.globals.colors[parseInt(a.parentNode.getAttribute("rel"),10)-1]:t.name.color:n.globals.series.length>1&&t.total.show&&(r=t.total.color);var s=n.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=n.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,n),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(n));var l=e===t.total.label;e=t.name.formatter(e,l,n),null!==s&&(s.textContent=e),null!==o&&(o.textContent=i),null!==s&&(s.style.fill=r)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),r=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,r,a,t);var n=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==n&&(n.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new y(this.ctx),r=i.config.plotOptions.polarArea.spokes;if(0!==r.strokeWidth){for(var n=[],s=360/i.globals.series.length,o=0;o<i.globals.series.length;o++)n.push(m.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,i.config.plotOptions.pie.startAngle+s*o));n.forEach((function(i,n){var s=a.drawLine(i.x,i.y,e.centerX,e.centerY,Array.isArray(r.connectorColors)?r.connectorColors[n]:r.connectorColors);t.add(s)}))}}},{key:"revertDataLabelsInner",value:function(t,e,i){var a=this,r=this.w,n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group"),s=!1,o=r.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area"),l=function(t){var i=t.makeSliceOut,r=t.printLabel;Array.prototype.forEach.call(o,(function(t){"true"===t.getAttribute("data:pieClicked")&&(i&&(s=!0),r&&a.printDataLabelsInner(t,e))}))};if(l({makeSliceOut:!0,printLabel:!1}),e.total.show&&r.globals.series.length>1)s&&!e.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(e,e.total.label,e.total.formatter(r));else if(l({makeSliceOut:!1,printLabel:!0}),!s)if(r.globals.selectedDataPoints.length&&r.globals.series.length>1)if(r.globals.selectedDataPoints[0].length>0){var h=r.globals.selectedDataPoints[0],c=r.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(h));this.printDataLabelsInner(c,e)}else n&&r.globals.selectedDataPoints.length&&0===r.globals.selectedDataPoints[0].length&&(n.style.opacity=0);else n&&r.globals.series.length>1&&(n.style.opacity=0)}}]),t}(),Mt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var i=this.w;this.graphics=new y(this.ctx),this.lineColorArr=void 0!==i.globals.stroke.colors?i.globals.stroke.colors:i.globals.colors,this.defaultSize=i.globals.svgHeight<i.globals.svgWidth?i.globals.gridHeight+1.5*i.globals.goldenPadding:i.globals.gridWidth,this.isLog=i.config.yaxis[0].logarithmic,this.coreUtils=new w(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(i.globals.maxY,0):i.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.w.globals.minY,0):i.globals.minY,this.polygons=i.config.plotOptions.radar.polygons,this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-i.config.chart.dropShadow.blur,i.config.xaxis.labels.show&&(this.size=this.size-i.globals.xAxisLabelsWidth/1.75),void 0!==i.config.plotOptions.radar.size&&(this.size=i.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return o(t,[{key:"draw",value:function(t){var e=this,i=this.w,r=new P(this.ctx),n=[],s=new E(this.ctx);t.length&&(this.dataPointsLen=t[i.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var o=i.globals.gridWidth/2,l=i.globals.gridHeight/2,h=o+i.config.plotOptions.radar.offsetX,c=l+i.config.plotOptions.radar.offsetY,d=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(h||0,", ").concat(c||0,")")}),u=[],f=null,p=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((function(t,o){var l=t.length===i.globals.dataPoints,h=e.graphics.group().attr({class:"apexcharts-series","data:longestSeries":l,seriesName:m.escapeString(i.globals.seriesNames[o]),rel:o+1,"data:realIndex":o});e.dataRadiusOfPercent[o]=[],e.dataRadius[o]=[],e.angleArr[o]=[],t.forEach((function(t,i){var a=Math.abs(e.maxValue-e.minValue);t+=Math.abs(e.minValue),e.isLog&&(t=e.coreUtils.getLogVal(t,0)),e.dataRadiusOfPercent[o][i]=t/a,e.dataRadius[o][i]=e.dataRadiusOfPercent[o][i]*e.size,e.angleArr[o][i]=i*e.disAngle})),u=e.getDataPointsPos(e.dataRadius[o],e.angleArr[o]);var c=e.createPaths(u,{x:0,y:0});f=e.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),p=e.graphics.group({class:"apexcharts-datalabels","data:realIndex":o}),i.globals.delayedElements.push({el:f.node,index:o});var d={i:o,realIndex:o,animationDelay:o,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:i.globals.stroke.colors[o],strokeLineCap:i.config.stroke.lineCap},g=null;i.globals.previousPaths.length>0&&(g=e.getPreviousPath(o));for(var x=0;x<c.linePathsTo.length;x++){var v=e.graphics.renderPaths(a(a({},d),{},{pathFrom:null===g?c.linePathsFrom[x]:g,pathTo:c.linePathsTo[x],strokeWidth:Array.isArray(e.strokeWidth)?e.strokeWidth[o]:e.strokeWidth,fill:"none",drawShadow:!1}));h.add(v);var y=r.fillPath({seriesNumber:o}),w=e.graphics.renderPaths(a(a({},d),{},{pathFrom:null===g?c.areaPathsFrom[x]:g,pathTo:c.areaPathsTo[x],strokeWidth:0,fill:y,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var S=new b(e.ctx),_=i.config.chart.dropShadow;S.dropShadow(w,Object.assign({},_,{noUserSpaceOnUse:!0}),o)}h.add(w)}t.forEach((function(t,r){var n=new L(e.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:r}),l=e.graphics.drawMarker(u[r].x,u[r].y,n);l.attr("rel",r),l.attr("j",r),l.attr("index",o),l.node.setAttribute("default-marker-size",n.pSize);var c=e.graphics.group({class:"apexcharts-series-markers"});c&&c.add(l),f.add(c),h.add(f);var d=i.config.dataLabels;if(d.enabled){var g=d.formatter(i.globals.series[o][r],{seriesIndex:o,dataPointIndex:r,w:i});s.plotDataLabelsText({x:u[r].x,y:u[r].y,text:g,textAnchor:"middle",i:o,j:o,parent:p,offsetCorrection:!1,dataLabelsConfig:a({},d)})}h.add(p)})),n.push(h)})),this.drawPolygons({parent:d}),i.config.xaxis.labels.show){var g=this.drawXAxisTexts();d.add(g)}return n.forEach((function(t){d.add(t)})),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(t){for(var e=this,i=this.w,a=t.parent,r=new At(this.ctx),n=i.globals.yAxisScale[0].result.reverse(),s=n.length,o=[],l=this.size/(s-1),h=0;h<s;h++)o[h]=l*h;o.reverse();var c=[],d=[];o.forEach((function(t,i){var a=m.getPolygonPos(t,e.dataPointsLen),r="";a.forEach((function(t,a){if(0===i){var n=e.graphics.drawLine(t.x,t.y,0,0,Array.isArray(e.polygons.connectorColors)?e.polygons.connectorColors[a]:e.polygons.connectorColors);d.push(n)}0===a&&e.yaxisLabelsTextsPos.push({x:t.x,y:t.y}),r+=t.x+","+t.y+" "})),c.push(r)})),c.forEach((function(t,r){var n=e.polygons.strokeColors,s=e.polygons.strokeWidth,o=e.graphics.drawPolygon(t,Array.isArray(n)?n[r]:n,Array.isArray(s)?s[r]:s,i.globals.radarPolygons.fill.colors[r]);a.add(o)})),d.forEach((function(t){a.add(t)})),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((function(t,i){var a=r.drawYAxisTexts(t.x,t.y,i,n[i]);e.yaxisLabels.add(a)}))}},{key:"drawXAxisTexts",value:function(){var t=this,e=this.w,i=e.config.xaxis.labels,r=this.graphics.group({class:"apexcharts-xaxis"}),n=m.getPolygonPos(this.size,this.dataPointsLen);return e.globals.labels.forEach((function(s,o){var l=e.config.xaxis.labels.formatter,h=new E(t.ctx);if(n[o]){var c=t.getTextPos(n[o],t.size),d=l(s,{seriesIndex:-1,dataPointIndex:o,w:e});h.plotDataLabelsText({x:c.newX,y:c.newY,text:d,textAnchor:c.textAnchor,i:o,j:o,parent:r,color:Array.isArray(i.style.colors)&&i.style.colors[o]?i.style.colors[o]:"#a8a8a8",dataLabelsConfig:a({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},i),offsetCorrection:!1})}})),r}},{key:"createPaths",value:function(t,e){var i=this,a=[],r=[],n=[],s=[];if(t.length){r=[this.graphics.move(e.x,e.y)],s=[this.graphics.move(e.x,e.y)];var o=this.graphics.move(t[0].x,t[0].y),l=this.graphics.move(t[0].x,t[0].y);t.forEach((function(e,a){o+=i.graphics.line(e.x,e.y),l+=i.graphics.line(e.x,e.y),a===t.length-1&&(o+="Z",l+="Z")})),a.push(o),n.push(l)}return{linePathsFrom:r,linePathsTo:a,areaPathsFrom:s,areaPathsTo:n}}},{key:"getTextPos",value:function(t,e){var i="middle",a=t.x,r=t.y;return Math.abs(t.x)>=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?r-=10:t.y>0&&(r+=10)),{textAnchor:i,newX:a,newY:r}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a<e.globals.previousPaths.length;a++){var r=e.globals.previousPaths[a];r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],r=0;r<i;r++){var n={};n.x=t[r]*Math.sin(e[r]),n.y=-t[r]*Math.cos(e[r]),a.push(n)}return a}}]),t}(),Tt=function(t){h(i,Ct);var e=f(i);function i(t){var a;n(this,i),(a=e.call(this,t)).ctx=t,a.w=t.w,a.animBeginArr=[0],a.animDur=0;var r=a.w;return a.startAngle=r.config.plotOptions.radialBar.startAngle,a.endAngle=r.config.plotOptions.radialBar.endAngle,a.totalAngle=Math.abs(r.config.plotOptions.radialBar.endAngle-r.config.plotOptions.radialBar.startAngle),a.trackStartAngle=r.config.plotOptions.radialBar.track.startAngle,a.trackEndAngle=r.config.plotOptions.radialBar.track.endAngle,a.donutDataLabels=a.w.config.plotOptions.radialBar.dataLabels,a.radialDataLabels=a.donutDataLabels,a.trackStartAngle||(a.trackStartAngle=a.startAngle),a.trackEndAngle||(a.trackEndAngle=a.endAngle),360===a.endAngle&&(a.endAngle=359.99),a.margin=parseInt(r.config.plotOptions.radialBar.track.margin,10),a}return o(i,[{key:"draw",value:function(t){var e=this.w,i=new y(this.ctx),a=i.group({class:"apexcharts-radialbar"});if(e.globals.noData)return a;var r=i.group(),n=this.defaultSize/2,s=e.globals.gridWidth/2,o=this.defaultSize/2.05;e.config.chart.sparkline.enabled||(o=o-e.config.stroke.width-e.config.chart.dropShadow.blur);var l=e.globals.fill.colors;if(e.config.plotOptions.radialBar.track.show){var h=this.drawTracks({size:o,centerX:s,centerY:n,colorArr:l,series:t});r.add(h)}var c=this.drawArcs({size:o,centerX:s,centerY:n,colorArr:l,series:t}),d=360;e.config.plotOptions.radialBar.startAngle<0&&(d=this.totalAngle);var u=(360-d)/360;if(e.globals.radialSize=o-o*u,this.radialDataLabels.value.show){var f=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);e.globals.radialSize+=f*u}return r.add(c.g),"front"===e.config.plotOptions.radialBar.hollow.position&&(c.g.add(c.elHollow),c.dataLabels&&c.g.add(c.dataLabels)),a.add(r),a}},{key:"drawTracks",value:function(t){var e=this.w,i=new y(this.ctx),a=i.group({class:"apexcharts-tracks"}),r=new b(this.ctx),n=new P(this.ctx),s=this.getStrokeWidth(t);t.size=t.size-s/2;for(var o=0;o<t.series.length;o++){var l=i.group({class:"apexcharts-radialbar-track apexcharts-track"});a.add(l),l.attr({rel:o+1}),t.size=t.size-s-this.margin;var h=e.config.plotOptions.radialBar.track,c=n.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(h.background)?h.background[o]:h.background,solid:!0}),d=this.trackStartAngle,u=this.trackEndAngle;Math.abs(u)+Math.abs(d)>=360&&(u=360-Math.abs(this.startAngle)-.1);var f=i.drawPath({d:"",stroke:c,strokeWidth:s*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;r.dropShadow(f,p)}l.add(f),f.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(f,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:e.globals.easing})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new y(this.ctx),a=new P(this.ctx),r=new b(this.ctx),n=i.group(),s=this.getStrokeWidth(t);t.size=t.size-s/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-s*t.series.length-this.margin*t.series.length-s*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,n,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;r.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var f=null;this.radialDataLabels.show&&(f=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})),"back"===e.config.plotOptions.radialBar.hollow.position&&(n.add(c),f&&n.add(f));var p=!1;e.config.plotOptions.radialBar.inverseOrder&&(p=!0);for(var g=p?t.series.length-1:0;p?g>=0:g<t.series.length;p?g--:g++){var x=i.group({class:"apexcharts-series apexcharts-radial-series",seriesName:m.escapeString(e.globals.seriesNames[g])});n.add(x),x.attr({rel:g+1,"data:realIndex":g}),this.ctx.series.addCollapsedClassToSeries(x,g),t.size=t.size-s-this.margin;var v=a.fillPath({seriesNumber:g,size:t.size,value:t.series[g]}),w=this.startAngle,S=void 0,_=m.negToZero(t.series[g]>100?100:t.series[g])/100,k=Math.round(this.totalAngle*_)+this.startAngle,A=void 0;e.globals.dataChanged&&(S=this.startAngle,A=Math.round(this.totalAngle*m.negToZero(e.globals.previousPaths[g])/100)+S),Math.abs(k)+Math.abs(w)>=360&&(k-=.01),Math.abs(A)+Math.abs(S)>=360&&(A-=.01);var C=k-w,M=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[g]:e.config.stroke.dashArray,T=i.drawPath({d:"",stroke:v,strokeWidth:s,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+g,strokeDashArray:M});if(y.setAttrs(T.node,{"data:angle":C,"data:value":t.series[g]}),e.config.chart.dropShadow.enabled){var L=e.config.chart.dropShadow;r.dropShadow(T,L,g)}r.setSelectionFilter(T,0,g),this.addListeners(T,this.radialDataLabels),x.add(T),T.attr({index:0,j:g});var D=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(D=e.config.chart.animations.speed),e.globals.dataChanged&&(D=e.config.chart.animations.dynamicAnimation.speed),this.animDur=D/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(T,{centerX:t.centerX,centerY:t.centerY,endAngle:k,startAngle:w,prevEndAngle:A,prevStartAngle:S,size:t.size,i:g,totalItems:2,animBeginArr:this.animBeginArr,dur:D,shouldSetPrevPaths:!0,easing:e.globals.easing})}return{g:n,elHollow:c,dataLabels:f}}},{key:"drawHollow",value:function(t){var e=new y(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var r=this.w,n=new P(this.ctx),s=m.randomId(),o=r.config.plotOptions.radialBar.hollow.image;if(r.config.plotOptions.radialBar.hollow.imageClipped)n.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(r.globals.cuid).concat(s)}),a="url(#pattern".concat(r.globals.cuid).concat(s,")");else{var l=r.config.plotOptions.radialBar.hollow.imageWidth,h=r.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=r.globals.dom.Paper.image(o).loaded((function(e){this.move(t.centerX-e.width/2+r.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+r.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=r.globals.dom.Paper.image(o).loaded((function(e){this.move(t.centerX-l/2+r.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+r.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}}]),i}(),Pt=function(){function t(e){n(this,t),this.w=e.w,this.lineCtx=e}return o(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if("line"===i.config.chart.type&&("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new w(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,r=t.y,n=t.i,s=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===s){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(m.isNumber(e[n][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(m.isNumber(e[n][s+1])?r+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(m.isNumber(e[n][s+1])?r+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,r=this.w,n=0;n<r.globals.previousPaths.length;n++){var s=r.globals.previousPaths[n];("line"===s.type||"area"===s.type)&&s.paths.length>0&&parseInt(s.realIndex,10)===parseInt(a,10)&&("line"===s.type?(this.lineCtx.appendPathFrom=!1,e=r.globals.previousPaths[n].paths[0].d):"area"===s.type&&(this.lineCtx.appendPathFrom=!1,i=r.globals.previousPaths[n].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[n].paths[1]&&(e=r.globals.previousPaths[n].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e=t.i,i=t.series,a=t.prevY,r=t.lineYPosition,n=this.w;if(void 0!==i[e][0])a=(r=n.config.chart.stacked&&e>0?this.lineCtx.prevSeriesY[e-1][0]:this.lineCtx.zeroY)-i[e][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?i[e][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(n.config.chart.stacked&&e>0&&void 0===i[e][0])for(var s=e-1;s>=0;s--)if(null!==i[s][0]&&void 0!==i[s][0]){a=r=this.lineCtx.prevSeriesY[s][0];break}return{prevY:a,lineYPosition:r}}}]),t}(),Lt=function(){function t(e,i,a){n(this,t),this.ctx=e,this.w=e.w,this.xyRatios=i,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||a,this.scatter=new D(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Pt(this),this.markers=new L(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return o(t,[{key:"draw",value:function(t,e,i){var a=this.w,r=new y(this.ctx),n=a.globals.comboCharts?e:a.config.chart.type,s=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),o=new w(this.ctx,a);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=o.getLogSeries(t),this.yRatio=o.getLogYRatios(this.yRatio);for(var l=[],h=0;h<t.length;h++){t=this.lineHelpers.sameValueSeriesFix(h,t);var c=a.globals.comboCharts?i[h]:h;this._initSerieVariables(t,h,c);var d=[],u=[],f=a.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,c),a.globals.isXNumeric&&a.globals.seriesX.length>0&&(f=(a.globals.seriesX[c][0]-a.globals.minX)/this.xRatio),u.push(f);var p,g=f,x=g,m=this.zeroY;m=this.lineHelpers.determineFirstPrevY({i:h,series:t,prevY:m,lineYPosition:0}).prevY,d.push(m),p=m;var v=this._calculatePathsFrom({series:t,i:h,realIndex:c,prevX:x,prevY:m}),b=this._iterateOverDataPoints({series:t,realIndex:c,i:h,x:f,y:1,pX:g,pY:p,pathsFrom:v,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:u,yArrj:d});this._handlePaths({type:n,realIndex:c,i:h,paths:b}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(a.config.chart.stacked)for(var S=l.length;S>0;S--)s.add(l[S-1]);else for(var _=0;_<l.length;_++)s.add(l[_]);return s}},{key:"_initSerieVariables",value:function(t,e,i){var a=this.w,r=new y(this.ctx);this.xDivision=a.globals.gridWidth/(a.globals.dataPoints-("on"===a.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(a.config.stroke.width)?a.config.stroke.width[i]:a.config.stroke.width,this.yRatio.length>1&&(this.yaxisIndex=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=r.group({class:"apexcharts-series",seriesName:m.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=r.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=r.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,r,n=t.series,s=t.i,o=t.realIndex,l=t.prevX,h=t.prevY,c=this.w,d=new y(this.ctx);if(null===n[s][0]){for(var u=0;u<n[s].length;u++)if(null!==n[s][u]){l=this.xDivision*u,h=this.zeroY-n[s][u]/this.yRatio[this.yaxisIndex],e=d.move(l,h),i=d.move(l,this.areaBottomY);break}}else e=d.move(l,h),i=d.move(l,this.areaBottomY)+d.line(l,h);if(a=d.move(-1,this.zeroY)+d.line(-1,this.zeroY),r=d.move(-1,this.zeroY)+d.line(-1,this.zeroY),c.globals.previousPaths.length>0){var f=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:r,realIndex:o});a=f.pathFromLine,r=f.pathFromArea}return{prevX:l,prevY:h,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:r}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,r=t.i,n=t.paths,s=this.w,o=new y(this.ctx),l=new P(this.ctx);this.prevSeriesY.push(n.yArrj),s.globals.seriesXvalues[i]=n.xArrj,s.globals.seriesYvalues[i]=n.yArrj;var h=s.config.forecastDataPoints;if(h.count>0){var c=s.globals.seriesXvalues[i][s.globals.seriesXvalues[i].length-h.count-1],d=o.drawRect(c,0,s.globals.gridWidth,s.globals.gridHeight,0);s.globals.dom.elForecastMask.appendChild(d.node);var u=o.drawRect(0,0,c,s.globals.gridHeight,0);s.globals.dom.elNonForecastMask.appendChild(u.node)}this.pointsChart||s.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var f={i:r,realIndex:i,animationDelay:r,initialSpeed:s.config.chart.animations.speed,dataChangeSpeed:s.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=l.fillPath({seriesNumber:i}),g=0;g<n.areaPaths.length;g++){var x=o.renderPaths(a(a({},f),{},{pathFrom:n.pathFromArea,pathTo:n.areaPaths[g],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:p}));this.elSeries.add(x)}if(s.config.stroke.show&&!this.pointsChart){var m;m="line"===e?l.fillPath({seriesNumber:i,i:r}):s.globals.stroke.colors[i];for(var v=0;v<n.linePaths.length;v++){var b=a(a({},f),{},{pathFrom:n.pathFromLine,pathTo:n.linePaths[v],stroke:m,strokeWidth:this.strokeWidth,strokeLineCap:s.config.stroke.lineCap,fill:"none"}),w=o.renderPaths(b);if(this.elSeries.add(w),h.count>0){var S=o.renderPaths(b);S.node.setAttribute("stroke-dasharray",h.dashArray),h.strokeWidth&&S.node.setAttribute("stroke-width",h.strokeWidth),this.elSeries.add(S),S.attr("clip-path","url(#forecastMask".concat(s.globals.cuid,")")),w.attr("clip-path","url(#nonForecastMask".concat(s.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){for(var e=t.series,i=t.realIndex,a=t.i,r=t.x,n=t.y,s=t.pX,o=t.pY,l=t.pathsFrom,h=t.linePaths,c=t.areaPaths,d=t.seriesIndex,u=t.lineYPosition,f=t.xArrj,p=t.yArrj,g=this.w,x=new y(this.ctx),v=this.yRatio,b=l.prevY,w=l.linePath,S=l.areaPath,_=l.pathFromLine,k=l.pathFromArea,A=m.isNumber(g.globals.minYArr[i])?g.globals.minYArr[i]:g.globals.minY,C=g.globals.dataPoints>1?g.globals.dataPoints-1:g.globals.dataPoints,M=0;M<C;M++){var T=void 0===e[a][M+1]||null===e[a][M+1];if(g.globals.isXNumeric){var P=g.globals.seriesX[i][M+1];void 0===g.globals.seriesX[i][M+1]&&(P=g.globals.seriesX[i][C-1]),r=(P-g.globals.minX)/this.xRatio}else r+=this.xDivision;u=g.config.chart.stacked&&a>0&&g.globals.collapsedSeries.length<g.config.series.length-1?this.prevSeriesY[function(t){for(var e=t,i=0;i<g.globals.series.length;i++)if(g.globals.collapsedSeriesIndices.indexOf(t)>-1){e--;break}return e>=0?e:0}(a-1)][M+1]:this.zeroY,n=T?u-A/v[this.yaxisIndex]+2*(this.isReversed?A/v[this.yaxisIndex]:0):u-e[a][M+1]/v[this.yaxisIndex]+2*(this.isReversed?e[a][M+1]/v[this.yaxisIndex]:0),f.push(r),p.push(n);var L=this.lineHelpers.calculatePoints({series:e,x:r,y:n,realIndex:i,i:a,j:M,prevY:b}),D=this._createPaths({series:e,i:a,realIndex:i,j:M,x:r,y:n,pX:s,pY:o,linePath:w,areaPath:S,linePaths:h,areaPaths:c,seriesIndex:d});c=D.areaPaths,h=D.linePaths,s=D.pX,o=D.pY,S=D.areaPath,w=D.linePath,this.appendPathFrom&&(_+=x.line(r,this.zeroY),k+=x.line(r,this.zeroY)),this.handleNullDataPoints(e,L,a,M,i),this._handleMarkersAndLabels({pointsPos:L,series:e,x:r,y:n,prevY:b,i:a,j:M,realIndex:i})}return{yArrj:p,xArrj:f,pathFromArea:k,areaPaths:c,pathFromLine:_,linePaths:h}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.pointsPos;t.series,t.x,t.y,t.prevY;var i=t.i,a=t.j,r=t.realIndex,n=this.w,s=new E(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,a,{realIndex:r,pointsPos:e,zRatio:this.zRatio,elParent:this.elPointsMain});else{n.globals.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var o=this.markers.plotChartMarkers(e,r,a+1);null!==o&&this.elPointsMain.add(o)}var l=s.drawDataLabel(e,r,a+1,null);null!==l&&this.elDataLabelsWrap.add(l)}},{key:"_createPaths",value:function(t){var e=t.series,i=t.i,a=t.realIndex,r=t.j,n=t.x,s=t.y,o=t.pX,l=t.pY,h=t.linePath,c=t.areaPath,d=t.linePaths,u=t.areaPaths,f=t.seriesIndex,p=this.w,g=new y(this.ctx),x=p.config.stroke.curve,m=this.areaBottomY;if(Array.isArray(p.config.stroke.curve)&&(x=Array.isArray(f)?p.config.stroke.curve[f[i]]:p.config.stroke.curve[i]),"smooth"===x){var v=.35*(n-o);p.globals.hasNullValues?(null!==e[i][r]&&(null!==e[i][r+1]?(h=g.move(o,l)+g.curve(o+v,l,n-v,s,n+1,s),c=g.move(o+1,l)+g.curve(o+v,l,n-v,s,n+1,s)+g.line(n,m)+g.line(o,m)+"z"):(h=g.move(o,l),c=g.move(o,l)+"z")),d.push(h),u.push(c)):(h+=g.curve(o+v,l,n-v,s,n,s),c+=g.curve(o+v,l,n-v,s,n,s)),o=n,l=s,r===e[i].length-2&&(c=c+g.curve(o,l,n,s,n,m)+g.move(n,s)+"z",p.globals.hasNullValues||(d.push(h),u.push(c)))}else{if(null===e[i][r+1]){h+=g.move(n,s);var b=p.globals.isXNumeric?(p.globals.seriesX[a][r]-p.globals.minX)/this.xRatio:n-this.xDivision;c=c+g.line(b,m)+g.move(n,s)+"z"}null===e[i][r]&&(h+=g.move(n,s),c+=g.move(n,m)),"stepline"===x?(h=h+g.line(n,null,"H")+g.line(null,s,"V"),c=c+g.line(n,null,"H")+g.line(null,s,"V")):"straight"===x&&(h+=g.line(n,s),c+=g.line(n,s)),r===e[i].length-2&&(c=c+g.line(n,m)+g.move(n,s)+"z",d.push(h),u.push(c))}return{linePaths:d,areaPaths:u,pX:o,pY:l,linePath:h,areaPath:c}}},{key:"handleNullDataPoints",value:function(t,e,i,a,r){var n=this.w;if(null===t[i][a]&&n.config.markers.showNullDataPoints||1===t[i].length){var s=this.markers.plotChartMarkers(e,r,a+1,this.strokeWidth-n.config.markers.strokeWidth/2,!0);null!==s&&this.elPointsMain.add(s)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,r){this.xoffset=e,this.yoffset=i,this.height=r,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,r=this.yoffset,s=n(t)/this.height,o=n(t)/this.width;if(this.width>=this.height)for(e=0;e<t.length;e++)i.push([a,r,a+s,r+t[e]/s]),r+=t[e]/s;else for(e=0;e<t.length;e++)i.push([a,r,a+t[e]/o,r+o]),a+=t[e]/o;return i},this.cutArea=function(e){var i;if(this.width>=this.height){var a=e/this.height,r=this.width-a;i=new t(this.xoffset+a,this.yoffset,r,this.height)}else{var n=e/this.width,s=this.height-n;i=new t(this.xoffset,this.yoffset+n,this.width,s)}return i}}function e(e,a,r,s,o){return s=void 0===s?0:s,o=void 0===o?0:o,function(t){var e,i,a=[];for(e=0;e<t.length;e++)for(i=0;i<t[e].length;i++)a.push(t[e][i]);return a}(i(function(t,e){var i,a=[],r=e/n(t);for(i=0;i<t.length;i++)a[i]=t[i]*r;return a}(e,a*r),[],new t(s,o,a,r),[]))}function i(t,e,r,s){var o,l,h;if(0!==t.length)return o=r.shortestEdge(),function(t,e,i){var r;return 0===t.length||((r=t.slice()).push(e),a(t,i)>=a(r,i))}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,r,s)):(h=r.cutArea(n(e),s),s.push(r.getCoordinates(e)),i(t,[],h,s)),s;s.push(r.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),r=n(t);return Math.max(Math.pow(e,2)*a/Math.pow(r,2),Math.pow(r,2)/(Math.pow(e,2)*i))}function r(t){return t&&t.constructor===Array}function n(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e];return i}function s(t){var e,i=0;if(r(t[0]))for(e=0;e<t.length;e++)i+=s(t[e]);else i=n(t);return i}return function t(i,a,n,o,l){o=void 0===o?0:o,l=void 0===l?0:l;var h,c,d=[],u=[];if(r(i[0])){for(c=0;c<i.length;c++)d[c]=s(i[c]);for(h=e(d,a,n,o,l),c=0;c<i.length;c++)u.push(t(i[c],h[c][2]-h[c][0],h[c][3]-h[c][1],h[c][0],h[c][1]))}else u=e(i,a,n,o,l);return u}}();var Dt,Et,Ot=function(){function t(e,i){n(this,t),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new _t(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return o(t,[{key:"draw",value:function(t){var e=this,i=this.w,a=new y(this.ctx),r=new P(this.ctx),n=a.group({class:"apexcharts-treemap"});if(i.globals.noData)return n;var s=[];return t.forEach((function(t){var e=t.map((function(t){return Math.abs(t)}));s.push(e)})),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach((function(t,i){t.data.forEach((function(t){Array.isArray(e.labels[i])||(e.labels[i]=[]),e.labels[i].push(t.x)}))})),window.TreemapSquared.generate(s,i.globals.gridWidth,i.globals.gridHeight).forEach((function(s,o){var l=a.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:m.escapeString(i.globals.seriesNames[o]),rel:o+1,"data:realIndex":o});if(i.config.chart.dropShadow.enabled){var h=i.config.chart.dropShadow;new b(e.ctx).dropShadow(n,h,o)}var c=a.group({class:"apexcharts-data-labels"});s.forEach((function(n,s){var h=n[0],c=n[1],d=n[2],u=n[3],f=a.drawRect(h,c,d-h,u-c,0,"#fff",1,e.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?g:i.globals.stroke.colors[o]);f.attr({cx:h,cy:c,index:o,i:o,j:s,width:d-h,height:u-c});var p=e.helpers.getShadeColor(i.config.chart.type,o,s,e.negRange),g=p.color;void 0!==i.config.series[o].data[s]&&i.config.series[o].data[s].fillColor&&(g=i.config.series[o].data[s].fillColor);var x=r.fillPath({color:g,seriesNumber:o,dataPointIndex:s});f.node.classList.add("apexcharts-treemap-rect"),f.attr({fill:x}),e.helpers.addListeners(f);var m={x:h+(d-h)/2,y:c+(u-c)/2,width:0,height:0},v={x:h,y:c,width:d-h,height:u-c};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var b=1;i.globals.resized||(b=i.config.chart.animations.speed),e.animateTreemap(f,m,v,b)}if(i.globals.dataChanged){var y=1;e.dynamicAnim.enabled&&i.globals.shouldAnimate&&(y=e.dynamicAnim.speed,i.globals.previousPaths[o]&&i.globals.previousPaths[o][s]&&i.globals.previousPaths[o][s].rect&&(m=i.globals.previousPaths[o][s].rect),e.animateTreemap(f,m,v,y))}var w=e.getFontSize(n),S=i.config.dataLabels.formatter(e.labels[o][s],{value:i.globals.series[o][s],seriesIndex:o,dataPointIndex:s,w:i}),_=e.helpers.calculateDataLabels({text:S,x:(h+d)/2,y:(c+u)/2+e.strokeWidth/2+w/3,i:o,j:s,colorProps:p,fontSize:w,series:t});i.config.dataLabels.enabled&&_&&e.rotateToFitLabel(_,S,h,c,d,u),l.add(f),null!==_&&l.add(_)})),l.add(c),n.add(l)})),n}},{key:"getFontSize",value:function(t){var e,i,a=this.w,r=function t(e){var i,a=0;if(Array.isArray(e[0]))for(i=0;i<e.length;i++)a+=t(e[i]);else for(i=0;i<e.length;i++)a+=e[i].length;return a}(this.labels)/function t(e){var i,a=0;if(Array.isArray(e[0]))for(i=0;i<e.length;i++)a+=t(e[i]);else for(i=0;i<e.length;i++)a+=1;return a}(this.labels);return e=(t[2]-t[0])*(t[3]-t[1]),i=Math.pow(e,.5),Math.min(i/r,parseInt(a.config.dataLabels.style.fontSize,10))}},{key:"rotateToFitLabel",value:function(t,e,i,a,r,n){var s=new y(this.ctx),o=s.getTextRects(e);if(o.width+5>r-i&&o.width<=n-a){var l=s.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(l.x," ").concat(l.y,")"))}}},{key:"animateTreemap",value:function(t,e,i,a){var r=new v(this.ctx);r.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){r.animationCompleted(t)}))}}]),t}(),It=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return o(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,r=this.w;if(r.globals.allSeriesCollapsed)return r.globals.labels=[],r.globals.timescaleLabels=[],[];var n=new Y(this.ctx),s=(e-t)/864e5;this.determineInterval(s),r.globals.disableZoomIn=!1,r.globals.disableZoomOut=!1,s<.00011574074074074075?r.globals.disableZoomIn=!0:s>5e4&&(r.globals.disableZoomOut=!0);var o=n.getTimeUnitsfromTimestamp(t,e,this.utc),l=r.globals.gridWidth/s,h=l/24,c=h/60,d=c/60,u=Math.floor(24*s),f=Math.floor(1440*s),p=Math.floor(86400*s),g=Math.floor(s),x=Math.floor(s/30),m=Math.floor(s/365),v={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},b={firstVal:v,currentMillisecond:v.minMillisecond,currentSecond:v.minSecond,currentMinute:v.minMinute,currentHour:v.minHour,currentMonthDate:v.minDate,currentDate:v.minDate,currentMonth:v.minMonth,currentYear:v.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:h,minutesWidthOnXAxis:c,secondsWidthOnXAxis:d,numberOfSeconds:p,numberOfMinutes:f,numberOfHours:u,numberOfDays:g,numberOfMonths:x,numberOfYears:m};switch(this.tickInterval){case"years":this.generateYearScale(b);break;case"months":case"half_year":this.generateMonthScale(b);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(b);break;case"hours":this.generateHourScale(b);break;case"minutes_fives":case"minutes":this.generateMinuteScale(b);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(b)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?a(a({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?a(a({},e),{},{value:t.value}):"minute"===t.unit?a(a({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?a(a({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,a=Math.ceil(r.globals.gridWidth/120),n=t.value;void 0!==r.config.xaxis.tickAmount&&(a=r.config.xaxis.tickAmount),y.length>a&&(e=Math.floor(y.length/a));var s=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(s=!0);break;case"half_year":e=7,"year"===t.unit&&(s=!0);break;case"months":e=1,"year"===t.unit&&(s=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(s=!0),30===n&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(s=!0),30===n&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(s=!0);break;case"days":e=1,"month"===t.unit&&(s=!0);break;case"hours":"day"===t.unit&&(s=!0);break;case"minutes_fives":case"seconds_fives":n%5!=0&&(o=!0);break;case"seconds_tens":n%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((n%e==0||s)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),r=this.removeOverlappingTS(a);i.globals.timescaleLabels=r.slice(),new ht(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,r=t.daysWidthOnXAxis,n=t.numberOfYears,s=e.minYear,o=0,l=new Y(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*r,s=e.minYear+1,this.timeScaleArray.push({position:o,value:s,unit:h,year:s,month:m.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:s,unit:h,year:a,month:m.monthMod(i+1)});for(var d=s,u=o,f=0;f<n;f++)d++,u=l.determineDaysOfYear(d-1)*r+u,this.timeScaleArray.push({position:u,value:d,unit:h,year:d,month:1})}},{key:"generateMonthScale",value:function(t){var e=t.firstVal,i=t.currentMonthDate,a=t.currentMonth,r=t.currentYear,n=t.daysWidthOnXAxis,s=t.numberOfMonths,o=a,l=0,h=new Y(this.ctx),c="month",d=0;if(e.minDate>1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*n,o=m.monthMod(a+1);var u=r+d,f=m.monthMod(o),p=o;0===o&&(c="year",p=u,f=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:f})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:r,month:m.monthMod(a)});for(var g=o+1,x=l,v=0,b=1;v<s;v++,b++){0===(g=m.monthMod(g))?(c="year",d+=1):c="month";var y=this._getYear(r,g,d);x=h.determineDaysOfMonths(g,y)*n+x;var w=0===g?y:g;this.timeScaleArray.push({position:x,value:w,unit:c,year:y,month:0===g?1:g}),g++}}},{key:"generateDayScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,r=t.hoursWidthOnXAxis,n=t.numberOfDays,s=new Y(this.ctx),o="day",l=e.minDate+1,h=l,c=function(t,e,i){return t>s.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*r,u=l,f=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=m.monthMod(e.minMonth),o="month",h=e.minDate,n++):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,f=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,f,0),month:m.monthMod(f),day:h});for(var p=d,g=0;g<n;g++){o="day",f=c(h+=1,f,this._getYear(a,f,0));var x=this._getYear(a,f,0);p=24*r+p;var v=1===h?m.monthMod(f):h;this.timeScaleArray.push({position:p,value:v,unit:o,year:x,month:m.monthMod(f),day:v})}}},{key:"generateHourScale",value:function(t){var e=t.firstVal,i=t.currentDate,a=t.currentMonth,r=t.currentYear,n=t.minutesWidthOnXAxis,s=t.numberOfHours,o=new Y(this.ctx),l="hour",h=function(t,e){return t>o.determineDaysOfMonths(e+1,r)&&(g=1,e+=1),{month:e,date:g}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,r)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*n,f=e.minHour+1,p=f+1;60===d&&(u=0,p=(f=e.minHour)+1);var g=i,x=c(g,a);this.timeScaleArray.push({position:u,value:f,unit:l,day:g,hour:p,year:r,month:m.monthMod(x)});for(var v=u,b=0;b<s;b++){l="hour",p>=24&&(p=0,l="day",x=h(g+=1,x).month,x=c(g,x));var y=this._getYear(r,x,0);v=0===p&&0===b?d*n:60*n+v;var w=0===p?g:p;this.timeScaleArray.push({position:v,value:w,unit:l,hour:p,day:g,year:y,month:m.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,r=t.currentHour,n=t.currentDate,s=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=n,f=s,p=o,g=r,x=(60-i-e/1e3)*h,v=0;v<c;v++)d>=60&&(d=0,24===(g+=1)&&(g=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:g,minute:d,day:u,year:this._getYear(p,f,0),month:m.monthMod(f)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,r=t.currentHour,n=t.currentDate,s=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=n,f=s,p=o,g=r,x=(1e3-e)/1e3*l,v=0;v<h;v++)c>=60&&(c=0,++d>=60&&(d=0,24==++g&&(g=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:g,minute:d,second:c,day:u,year:this._getYear(p,f,0),month:m.monthMod(f)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),r=new Y(e.ctx),n=e.createRawDateString(t,a),s=r.getDate(r.parseDate(n));if(e.utc||(s=r.getDate(r.parseDateWithTimezone(n))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=r.formatDate(s,o)}else a=r.formatDate(s,i.config.xaxis.labels.format);return{dateString:n,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new y(this.ctx),r=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(r=!0,e=a.getTextRects(t[0].value).width);var n=0,s=t.map((function(s,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=r?e:a.getTextRects(t[n].value).width,h=t[n].position;return s.position>h+l+10?(n=o,s):null}return s}));return s.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),zt=function(){function t(e,i){n(this,t),this.ctx=i,this.w=i.w,this.el=e}return o(t,[{key:"setupElements",value:function(){var t=this.w.globals,e=this.w.config,i=e.chart.type;t.axisCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,t.xyCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,t.isBarHorizontal=("bar"===e.chart.type||"rangeBar"===e.chart.type||"boxPlot"===e.chart.type)&&e.plotOptions.bar.horizontal,t.chartClass=".apexcharts"+t.chartID,t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),y.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas "+t.chartClass.substring(1)}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=new window.SVG.Doc(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(e.chart.offsetX,", ").concat(e.chart.offsetY,")")}),t.dom.Paper.node.style.background=e.chart.background,this.setSVGDimensions(),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elAnnotations=t.dom.Paper.group().attr({class:"apexcharts-annotations"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elWrap.appendChild(t.dom.elLegendWrap),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=i.config,r=i.globals,n={series:[],i:[]},s={series:[],i:[]},o={series:[],i:[]},l={series:[],i:[]},h={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]};r.series.map((function(e,u){var f=0;void 0!==t[u].type?("column"===t[u].type||"bar"===t[u].type?(r.series.length>1&&a.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),h.series.push(e),h.i.push(u),f++,i.globals.columnSeries=h.series):"area"===t[u].type?(s.series.push(e),s.i.push(u),f++):"line"===t[u].type?(n.series.push(e),n.i.push(u),f++):"scatter"===t[u].type?(o.series.push(e),o.i.push(u)):"bubble"===t[u].type?(l.series.push(e),l.i.push(u),f++):"candlestick"===t[u].type?(c.series.push(e),c.i.push(u),f++):"boxPlot"===t[u].type?(d.series.push(e),d.i.push(u),f++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble"),f>1&&(r.comboCharts=!0)):(n.series.push(e),n.i.push(u))}));var u=new Lt(this.ctx,e),f=new St(this.ctx,e);this.ctx.pie=new Ct(this.ctx);var p=new Tt(this.ctx);this.ctx.rangeBar=new F(this.ctx,e);var g=new Mt(this.ctx),x=[];if(r.comboCharts){if(s.series.length>0&&x.push(u.draw(s.series,"area",s.i)),h.series.length>0)if(i.config.chart.stacked){var m=new wt(this.ctx,e);x.push(m.draw(h.series,h.i))}else this.ctx.bar=new N(this.ctx,e),x.push(this.ctx.bar.draw(h.series,h.i));if(n.series.length>0&&x.push(u.draw(n.series,"line",n.i)),c.series.length>0&&x.push(f.draw(c.series,c.i)),d.series.length>0&&x.push(f.draw(d.series,d.i)),o.series.length>0){var v=new Lt(this.ctx,e,!0);x.push(v.draw(o.series,"scatter",o.i))}if(l.series.length>0){var b=new Lt(this.ctx,e,!0);x.push(b.draw(l.series,"bubble",l.i))}}else switch(a.chart.type){case"line":x=u.draw(r.series,"line");break;case"area":x=u.draw(r.series,"area");break;case"bar":a.chart.stacked?x=new wt(this.ctx,e).draw(r.series):(this.ctx.bar=new N(this.ctx,e),x=this.ctx.bar.draw(r.series));break;case"candlestick":case"boxPlot":x=new St(this.ctx,e).draw(r.series);break;case"rangeBar":x=this.ctx.rangeBar.draw(r.series);break;case"heatmap":x=new kt(this.ctx,e).draw(r.series);break;case"treemap":x=new Ot(this.ctx,e).draw(r.series);break;case"pie":case"donut":case"polarArea":x=this.ctx.pie.draw(r.series);break;case"radialBar":x=p.draw(r.series);break;case"radar":x=g.draw(r.series);break;default:x=u.draw(r.series)}return x}},{key:"setSVGDimensions",value:function(){var t=this.w.globals,e=this.w.config;t.svgWidth=e.chart.width,t.svgHeight=e.chart.height;var i=m.getDimensions(this.el),a=e.chart.width.toString().split(/[0-9]+/g).pop();"%"===a?m.isNumber(i[0])&&(0===i[0].width&&(i=m.getDimensions(this.el.parentNode)),t.svgWidth=i[0]*parseInt(e.chart.width,10)/100):"px"!==a&&""!==a||(t.svgWidth=parseInt(e.chart.width,10));var r=e.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==t.svgHeight&&""!==t.svgHeight)if("%"===r){var n=m.getDimensions(this.el.parentNode);t.svgHeight=n[1]*parseInt(e.chart.height,10)/100}else t.svgHeight=parseInt(e.chart.height,10);else t.axisCharts?t.svgHeight=t.svgWidth/1.61:t.svgHeight=t.svgWidth/1.2;if(t.svgWidth<0&&(t.svgWidth=0),t.svgHeight<0&&(t.svgHeight=0),y.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),"%"!==r){var s=e.chart.sparkline.enabled?0:t.axisCharts?e.chart.parentHeightOffset:0;t.dom.Paper.node.parentNode.parentNode.style.minHeight=t.svgHeight+s+"px"}t.dom.elWrap.style.width=t.svgWidth+"px",t.dom.elWrap.style.height=t.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i={transform:"translate("+t.translateX+", "+e+")"};y.setAttrs(t.dom.elGraphical.node,i)}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||!t.config.legend.show||t.config.legend.floating||(i=new dt(this.ctx).legendHelpers.getLegendBBox().clwh+10);var r=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),n=2.05*t.globals.radialSize;if(r&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var s=m.getBoundingClientRect(r);n=s.bottom;var o=s.bottom-s.top;n=Math.max(2.05*t.globals.radialSize,o)}var l=n+e.translateY+i+a;e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),e.dom.elWrap.style.height=l+"px",y.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px"}},{key:"coreCalculations",value:function(){new q(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(t){return[]}))},i=new X,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var t=null,e=this.w;if(e.globals.axisCharts){if("back"===e.config.xaxis.crosshairs.position&&new et(this.ctx).drawXCrosshairs(),"back"===e.config.yaxis[0].crosshairs.position&&new et(this.ctx).drawYCrosshairs(),"datetime"===e.config.xaxis.type&&void 0===e.config.xaxis.labels.formatter){this.ctx.timeScale=new It(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}t=new w(this.ctx).getCalculatedRatios()}return t}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=e.config.chart.brush.targets||[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,r){i.forEach((function(t){var i=ApexCharts.getChartByID(t),n=m.clone(e.config.yaxis);if(e.config.chart.brush.autoScaleYaxis&&1===i.w.globals.series.length){var s=new Z(i);n=s.autoScaleY(i,n,r)}var o=i.w.config.yaxis.reduce((function(t,e,r){return[].concat(p(t),[a(a({},i.w.config.yaxis[r]),{},{min:n[0].min,max:n[0].max})])}),[]);i.ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max},yaxis:o},!1,!1,!1,!1)}))}}}}]),t}(),Nt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(o){var l=[e.ctx];n&&(l=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(l=[e.ctx],e.ctx.w.globals.isExecCalled=!1),l.forEach((function(n,h){var c=n.w;if(c.globals.shouldAnimate=a,i||(c.globals.resized=!0,c.globals.dataChanged=!0,a&&n.series.getPreviousPaths()),t&&"object"===r(t)&&(n.config=new H(t),t=w.extendArrayProps(n.config,t,c),n.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,c.config=m.extend(c.config,t),s&&(c.globals.lastXAxis=t.xaxis?m.clone(t.xaxis):[],c.globals.lastYAxis=t.yaxis?m.clone(t.yaxis):[],c.globals.initialConfig=m.extend({},c.config),c.globals.initialSeries=m.clone(c.config.series),t.series))){for(var d=0;d<c.globals.collapsedSeriesIndices.length;d++){var u=c.config.series[c.globals.collapsedSeriesIndices[d]];c.globals.collapsedSeries[d].data=c.globals.axisCharts?u.data.slice():u}for(var f=0;f<c.globals.ancillaryCollapsedSeriesIndices.length;f++){var p=c.config.series[c.globals.ancillaryCollapsedSeriesIndices[f]];c.globals.ancillaryCollapsedSeries[f].data=c.globals.axisCharts?p.data.slice():p}n.series.emptyCollapsedSeries(c.config.series)}return n.update(t).then((function(){h===l.length-1&&o(n)}))}))}))}},{key:"_updateSeries",value:function(t,e){var i=this,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(r){var n,s=i.w;return s.globals.shouldAnimate=e,s.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),s.globals.axisCharts?(0===(n=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(n=[{data:[]}]),s.config.series=n):s.config.series=t.slice(),a&&(s.globals.initialSeries=m.clone(s.config.series)),i.ctx.update().then((function(){r(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,r=i.config.series[e];return a(a({},i.config.series[e]),{},{name:t.name?t.name:r&&r.name,color:t.color?t.color:r&&r.color,type:t.type?t.type:r&&r.type,data:t.data?t.data:r&&r.data})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,r=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.select("".concat(r," path[j='").concat(e,"'], ").concat(r," circle[j='").concat(e,"'], ").concat(r," rect[j='").concat(e,"']")).members[0]:void 0===e&&(a=i.globals.dom.Paper.select("".concat(r," path[j='").concat(t,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new y(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new R(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){var e=this.w;return e.config.chart.stacked&&"100%"===e.config.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,r=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(r=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==r[a]?function(t){void 0!==r[t]&&(i.config.yaxis[t].min=r[t].min,i.config.yaxis[t].max=r[t].max)}(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();Dt="undefined"!=typeof window?window:void 0,Et=function(t,e){var i=(void 0!==this?this:t).SVG=function(t){if(i.supported)return t=new i.Doc(t),i.parser.draw||i.prepare(),t};if(i.ns="http://www.w3.org/2000/svg",i.xmlns="http://www.w3.org/2000/xmlns/",i.xlink="http://www.w3.org/1999/xlink",i.svgjs="http://svgjs.dev",i.supported=!0,!i.supported)return!1;i.did=1e3,i.eid=function(t){return"Svgjs"+d(t)+i.did++},i.create=function(t){var i=e.createElementNS(this.ns,t);return i.setAttribute("id",this.eid(t)),i},i.extend=function(){var t,e;e=(t=[].slice.call(arguments)).pop();for(var a=t.length-1;a>=0;a--)if(t[a])for(var r in e)t[a].prototype[r]=e[r];i.Set&&i.Set.inherit&&i.Set.inherit()},i.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,i.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&i.extend(e,t.extend),t.construct&&i.extend(t.parent||i.Container,t.construct),e},i.adopt=function(e){return e?e.instance?e.instance:((a="svg"==e.nodeName?e.parentNode instanceof t.SVGElement?new i.Nested:new i.Doc:"linearGradient"==e.nodeName?new i.Gradient("linear"):"radialGradient"==e.nodeName?new i.Gradient("radial"):i[d(e.nodeName)]?new(i[d(e.nodeName)]):new i.Element(e)).type=e.nodeName,a.node=e,e.instance=a,a instanceof i.Doc&&a.namespace().defs(),a.setData(JSON.parse(e.getAttribute("svgjs:data"))||{}),a):null;var a},i.prepare=function(){var t=e.getElementsByTagName("body")[0],a=(t?new i.Doc(t):i.adopt(e.documentElement).nested()).size(2,0);i.parser={body:t||e.documentElement,draw:a.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:a.polyline().node,path:a.path().node,native:i.create("svg")}},i.parser={native:i.create("svg")},e.addEventListener("DOMContentLoaded",(function(){i.parser.draw||i.prepare()}),!1),i.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},i.utils={map:function(t,e){for(var i=t.length,a=[],r=0;r<i;r++)a.push(e(t[r]));return a},filter:function(t,e){for(var i=t.length,a=[],r=0;r<i;r++)e(t[r])&&a.push(t[r]);return a},filterSVGElements:function(e){return this.filter(e,(function(e){return e instanceof t.SVGElement}))}},i.defaults={attrs:{"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}},i.Color=function(t){var e,a;this.r=0,this.g=0,this.b=0,t&&("string"==typeof t?i.regex.isRgb.test(t)?(e=i.regex.rgb.exec(t.replace(i.regex.whitespace,"")),this.r=parseInt(e[1]),this.g=parseInt(e[2]),this.b=parseInt(e[3])):i.regex.isHex.test(t)&&(e=i.regex.hex.exec(4==(a=t).length?["#",a.substring(1,2),a.substring(1,2),a.substring(2,3),a.substring(2,3),a.substring(3,4),a.substring(3,4)].join(""):a),this.r=parseInt(e[1],16),this.g=parseInt(e[2],16),this.b=parseInt(e[3],16)):"object"===r(t)&&(this.r=t.r,this.g=t.g,this.b=t.b))},i.extend(i.Color,{toString:function(){return this.toHex()},toHex:function(){return"#"+u(this.r)+u(this.g)+u(this.b)},toRgb:function(){return"rgb("+[this.r,this.g,this.b].join()+")"},brightness:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11},morph:function(t){return this.destination=new i.Color(t),this},at:function(t){return this.destination?(t=t<0?0:t>1?1:t,new i.Color({r:~~(this.r+(this.destination.r-this.r)*t),g:~~(this.g+(this.destination.g-this.g)*t),b:~~(this.b+(this.destination.b-this.b)*t)})):this}}),i.Color.test=function(t){return t+="",i.regex.isHex.test(t)||i.regex.isRgb.test(t)},i.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},i.Color.isColor=function(t){return i.Color.isRgb(t)||i.Color.test(t)},i.Array=function(t,e){0==(t=(t||[]).valueOf()).length&&e&&(t=e.valueOf()),this.value=this.parse(t)},i.extend(i.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(t){return t=t.valueOf(),Array.isArray(t)?t:this.split(t)}}),i.PointArray=function(t,e){i.Array.call(this,t,e||[[0,0]])},i.PointArray.prototype=new i.Array,i.PointArray.prototype.constructor=i.PointArray;for(var a={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]}},n="mlhvqtcsaz".split(""),s=0,o=n.length;s<o;++s)a[n[s]]=function(t){return function(e,i,r){if("H"==t)e[0]=e[0]+i.x;else if("V"==t)e[0]=e[0]+i.y;else if("A"==t)e[5]=e[5]+i.x,e[6]=e[6]+i.y;else for(var n=0,s=e.length;n<s;++n)e[n]=e[n]+(n%2?i.y:i.x);if(a&&"function"==typeof a[t])return a[t](e,i,r)}}(n[s].toUpperCase());i.PathArray=function(t,e){i.Array.call(this,t,e||[["M",0,0]])},i.PathArray.prototype=new i.Array,i.PathArray.prototype.constructor=i.PathArray,i.extend(i.PathArray,{toString:function(){return function(t){for(var e=0,i=t.length,a="";e<i;e++)a+=t[e][0],null!=t[e][1]&&(a+=t[e][1],null!=t[e][2]&&(a+=" ",a+=t[e][2],null!=t[e][3]&&(a+=" ",a+=t[e][3],a+=" ",a+=t[e][4],null!=t[e][5]&&(a+=" ",a+=t[e][5],a+=" ",a+=t[e][6],null!=t[e][7]&&(a+=" ",a+=t[e][7])))));return a+" "}(this.value)},move:function(t,e){var i=this.bbox();return i.x,i.y,this},at:function(t){if(!this.destination)return this;for(var e=this.value,a=this.destination.value,r=[],n=new i.PathArray,s=0,o=e.length;s<o;s++){r[s]=[e[s][0]];for(var l=1,h=e[s].length;l<h;l++)r[s][l]=e[s][l]+(a[s][l]-e[s][l])*t;"A"===r[s][0]&&(r[s][4]=+(0!=r[s][4]),r[s][5]=+(0!=r[s][5]))}return n.value=r,n},parse:function(t){if(t instanceof i.PathArray)return t.valueOf();var e,r={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};t="string"==typeof t?t.replace(i.regex.numbersWithDots,h).replace(i.regex.pathLetters," $& ").replace(i.regex.hyphen,"$1 -").trim().split(i.regex.delimiter):t.reduce((function(t,e){return[].concat.call(t,e)}),[]);var n=[],s=new i.Point,o=new i.Point,l=0,c=t.length;do{i.regex.isPathLetter.test(t[l])?(e=t[l],++l):"M"==e?e="L":"m"==e&&(e="l"),n.push(a[e].call(null,t.slice(l,l+=r[e.toUpperCase()]).map(parseFloat),s,o))}while(c>l);return n},bbox:function(){return i.parser.draw||i.prepare(),i.parser.path.setAttribute("d",this.toString()),i.parser.path.getBBox()}}),i.Number=i.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(i.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof i.Number&&(this.value=t.valueOf(),this.unit=t.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(t){return t=new i.Number(t),new i.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new i.Number(t),new i.Number(this-t,this.unit||t.unit)},times:function(t){return t=new i.Number(t),new i.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new i.Number(t),new i.Number(this/t,this.unit||t.unit)},to:function(t){var e=new i.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new i.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new i.Number(this.destination).minus(this).times(t).plus(this):this}}}),i.Element=i.invent({create:function(t){this._stroke=i.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=t)&&(this.type=t.nodeName,this.node.instance=this,this._stroke=t.getAttribute("stroke")||this._stroke)},extend:{x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var a=f(this,t,e);return this.width(new i.Number(a.width)).height(new i.Number(a.height))},clone:function(t){this.writeDataToDom();var e=x(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(t){return this.after(t).remove(),t},addTo:function(t){return t.put(this)},putIn:function(t){return t.add(this)},id:function(t){return this.attr("id",t)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(i.regex.delimiter)},hasClass:function(t){return-1!=this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!=t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)},reference:function(t){return i.get(this.attr(t))},parent:function(e){var a=this;if(!a.node.parentNode)return null;if(a=i.adopt(a.node.parentNode),!e)return a;for(;a&&a.node instanceof t.SVGElement;){if("string"==typeof e?a.matches(e):a instanceof e)return a;if(!a.node.parentNode||"#document"==a.node.parentNode.nodeName)return null;a=i.adopt(a.node.parentNode)}},doc:function(){return this instanceof i.Doc?this:this.parent(i.Doc)},parents:function(t){var e=[],i=this;do{if(!(i=i.parent(t))||!i.node)break;e.push(i)}while(i.parent);return e},matches:function(t){return function(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,e)}(this.node,t)},native:function(){return this.node},svg:function(t){var a=e.createElement("svg");if(!(t&&this instanceof i.Parent))return a.appendChild(t=e.createElement("svg")),this.writeDataToDom(),t.appendChild(this.node.cloneNode(!0)),a.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");a.innerHTML="<svg>"+t.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";for(var r=0,n=a.firstChild.childNodes.length;r<n;r++)this.node.appendChild(a.firstChild.firstChild);return this},writeDataToDom:function(){return(this.each||this.lines)&&(this.each?this:this.lines()).each((function(){this.writeDataToDom()})),this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this},setData:function(t){return this.dom=t,this},is:function(t){return function(t,e){return t instanceof e}(this,t)}}}),i.easing={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)}},i.morph=function(t){return function(e,a){return new i.MorphObj(e,a).at(t)}},i.Situation=i.invent({create:function(t){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new i.Number(t.duration).valueOf(),this.delay=new i.Number(t.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=t.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),i.FX=i.invent({create:function(t){this._target=t,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(t,e,a){"object"===r(t)&&(e=t.ease,a=t.delay,t=t.duration);var n=new i.Situation({duration:t||1e3,delay:a||0,ease:i.easing[e||"-"]||e});return this.queue(n),this},target:function(t){return t&&t instanceof i.Element?(this._target=t,this):this._target},timeToAbsPos:function(t){return(t-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(t){return this.situation.duration/this._speed*t+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=t.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){t.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(t){return("function"==typeof t||t instanceof i.Situation)&&this.situations.push(t),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof i.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var t,e=this.situation;if(e.init)return this;for(var a in e.animations){t=this.target()[a](),Array.isArray(t)||(t=[t]),Array.isArray(e.animations[a])||(e.animations[a]=[e.animations[a]]);for(var r=t.length;r--;)e.animations[a][r]instanceof i.Number&&(t[r]=new i.Number(t[r])),e.animations[a][r]=t[r].morph(e.animations[a][r])}for(var a in e.attrs)e.attrs[a]=new i.MorphObj(this.target().attr(a),e.attrs[a]);for(var a in e.styles)e.styles[a]=new i.MorphObj(this.target().style(a),e.styles[a]);return e.initialTransformation=this.target().matrixify(),e.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(t,e){var i=this.active;return this.active=!1,e&&this.clearQueue(),t&&this.situation&&(!i&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(t){var e=this.last();return this.target().on("finished.fx",(function i(a){a.detail.situation==e&&(t.call(this,e),this.off("finished.fx",i))})),this._callStart()},during:function(t){var e=this.last(),a=function(a){a.detail.situation==e&&t.call(this,a.detail.pos,i.morph(a.detail.pos),a.detail.eased,e)};return this.target().off("during.fx",a).on("during.fx",a),this.after((function(){this.off("during.fx",a)})),this._callStart()},afterAll:function(t){var e=function e(i){t.call(this),this.off("allfinished.fx",e)};return this.target().off("allfinished.fx",e).on("allfinished.fx",e),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(t,e,i){return this.last()[i||"animations"][t]=e,this._callStart()},step:function(t){var e,i,a;t||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(e=Math.max(this.absPos,0),i=Math.floor(e),!0===this.situation.loops||i<this.situation.loops?(this.pos=e-i,a=this.situation.loop,this.situation.loop=i):(this.absPos=this.situation.loops,this.pos=1,a=this.situation.loop-1,this.situation.loop=this.situation.loops),this.situation.reversing&&(this.situation.reversed=this.situation.reversed!=Boolean((this.situation.loop-a)%2))):(this.absPos=Math.min(this.absPos,1),this.pos=this.absPos),this.pos<0&&(this.pos=0),this.situation.reversed&&(this.pos=1-this.pos);var r=this.situation.ease(this.pos);for(var n in this.situation.once)n>this.lastPos&&n<=r&&(this.situation.once[n].call(this.target(),this.pos,r),delete this.situation.once[n]);return this.active&&this.target().fire("during",{pos:this.pos,eased:r,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=r,this):this},eachAt:function(){var t,e=this,a=this.target(),r=this.situation;for(var n in r.animations)t=[].concat(r.animations[n]).map((function(t){return"string"!=typeof t&&t.at?t.at(r.ease(e.pos),e.pos):t})),a[n].apply(a,t);for(var n in r.attrs)t=[n].concat(r.attrs[n]).map((function(t){return"string"!=typeof t&&t.at?t.at(r.ease(e.pos),e.pos):t})),a.attr.apply(a,t);for(var n in r.styles)t=[n].concat(r.styles[n]).map((function(t){return"string"!=typeof t&&t.at?t.at(r.ease(e.pos),e.pos):t})),a.style.apply(a,t);if(r.transforms.length){t=r.initialTransformation,n=0;for(var s=r.transforms.length;n<s;n++){var o=r.transforms[n];o instanceof i.Matrix?t=o.relative?t.multiply((new i.Matrix).morph(o).at(r.ease(this.pos))):t.morph(o).at(r.ease(this.pos)):(o.relative||o.undo(t.extract()),t=t.multiply(o.at(r.ease(this.pos))))}a.matrix(t)}return this},once:function(t,e,i){var a=this.last();return i||(t=a.ease(t)),a.once[t]=e,this},_callStart:function(){return setTimeout(function(){this.start()}.bind(this),0),this}},parent:i.Element,construct:{animate:function(t,e,a){return(this.fx||(this.fx=new i.FX(this))).animate(t,e,a)},delay:function(t){return(this.fx||(this.fx=new i.FX(this))).delay(t)},stop:function(t,e){return this.fx&&this.fx.stop(t,e),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),i.MorphObj=i.invent({create:function(t,e){return i.Color.isColor(e)?new i.Color(t).morph(e):i.regex.delimiter.test(t)?i.regex.pathLetters.test(t)?new i.PathArray(t).morph(e):new i.Array(t).morph(e):i.regex.numberAndUnit.test(e)?new i.Number(t).morph(e):(this.value=t,void(this.destination=e))},extend:{at:function(t,e){return e<1?this.value:this.destination},valueOf:function(){return this.value}}}),i.extend(i.FX,{attr:function(t,e,i){if("object"===r(t))for(var a in t)this.attr(a,t[a]);else this.add(t,e,"attrs");return this},plot:function(t,e,i,a){return 4==arguments.length?this.plot([t,e,i,a]):this.add("plot",new(this.target().morphArray)(t))}}),i.Box=i.invent({create:function(t,e,a,n){if(!("object"!==r(t)||t instanceof i.Element))return i.Box.call(this,null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height);4==arguments.length&&(this.x=t,this.y=e,this.width=a,this.height=n),m(this)}}),i.BBox=i.invent({create:function(t){if(i.Box.apply(this,[].slice.call(arguments)),t instanceof i.Element){var a;try{if(!e.documentElement.contains){for(var r=t.node;r.parentNode;)r=r.parentNode;if(r!=e)throw new Error("Element not in the dom")}a=t.node.getBBox()}catch(e){if(t instanceof i.Shape){i.parser.draw||i.prepare();var n=t.clone(i.parser.draw.instance).show();n&&n.node&&"function"==typeof n.node.getBBox&&(a=n.node.getBBox()),n&&"function"==typeof n.remove&&n.remove()}else a={x:t.node.clientLeft,y:t.node.clientTop,width:t.node.clientWidth,height:t.node.clientHeight}}i.Box.call(this,a)}},inherit:i.Box,parent:i.Element,construct:{bbox:function(){return new i.BBox(this)}}}),i.BBox.prototype.constructor=i.BBox,i.Matrix=i.invent({create:function(t){var e=g([1,0,0,1,0,0]);t=null===t?e:t instanceof i.Element?t.matrixify():"string"==typeof t?g(t.split(i.regex.delimiter).map(parseFloat)):6==arguments.length?g([].slice.call(arguments)):Array.isArray(t)?g(t):t&&"object"===r(t)?t:e;for(var a=b.length-1;a>=0;--a)this[b[a]]=null!=t[b[a]]?t[b[a]]:e[b[a]]},extend:{extract:function(){var t=p(this,0,1);p(this,1,0);var e=180/Math.PI*Math.atan2(t.y,t.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(e*Math.PI/180)+this.f*Math.sin(e*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(e*Math.PI/180)+this.e*Math.sin(-e*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new i.Matrix(this)}},clone:function(){return new i.Matrix(this)},morph:function(t){return this.destination=new i.Matrix(t),this},multiply:function(t){return new i.Matrix(this.native().multiply(function(t){return t instanceof i.Matrix||(t=new i.Matrix(t)),t}(t).native()))},inverse:function(){return new i.Matrix(this.native().inverse())},translate:function(t,e){return new i.Matrix(this.native().translate(t||0,e||0))},native:function(){for(var t=i.parser.native.createSVGMatrix(),e=b.length-1;e>=0;e--)t[b[e]]=this[b[e]];return t},toString:function(){return"matrix("+v(this.a)+","+v(this.b)+","+v(this.c)+","+v(this.d)+","+v(this.e)+","+v(this.f)+")"}},parent:i.Element,construct:{ctm:function(){return new i.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof i.Nested){var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new i.Matrix(e)}return new i.Matrix(this.node.getScreenCTM())}}}),i.Point=i.invent({create:function(t,e){var i;i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===r(t)?{x:t.x,y:t.y}:null!=t?{x:t,y:null!=e?e:t}:{x:0,y:0},this.x=i.x,this.y=i.y},extend:{clone:function(){return new i.Point(this)},morph:function(t,e){return this.destination=new i.Point(t,e),this}}}),i.extend(i.Element,{point:function(t,e){return new i.Point(t,e).transform(this.screenCTM().inverse())}}),i.extend(i.Element,{attr:function(t,e,a){if(null==t){for(t={},a=(e=this.node.attributes).length-1;a>=0;a--)t[e[a].nodeName]=i.regex.isNumber.test(e[a].nodeValue)?parseFloat(e[a].nodeValue):e[a].nodeValue;return t}if("object"===r(t))for(var n in t)this.attr(n,t[n]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?i.defaults.attrs[t]:i.regex.isNumber.test(e)?parseFloat(e):e;"stroke-width"==t?this.attr("stroke",parseFloat(e)>0?this._stroke:null):"stroke"==t&&(this._stroke=e),"fill"!=t&&"stroke"!=t||(i.regex.isImage.test(e)&&(e=this.doc().defs().image(e,0,0)),e instanceof i.Image&&(e=this.doc().defs().pattern(0,0,(function(){this.add(e)})))),"number"==typeof e?e=new i.Number(e):i.Color.isColor(e)?e=new i.Color(e):Array.isArray(e)&&(e=new i.Array(e)),"leading"==t?this.leading&&this.leading(e):"string"==typeof a?this.node.setAttributeNS(a,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!=t&&"x"!=t||this.rebuild(t,e)}return this}}),i.extend(i.Element,{transform:function(t,e){var a;return"object"!==r(t)?(a=new i.Matrix(this).extract(),"string"==typeof t?a[t]:a):(a=new i.Matrix(this),e=!!e||!!t.relative,null!=t.a&&(a=e?a.multiply(new i.Matrix(t)):new i.Matrix(t)),this.attr("transform",a))}}),i.extend(i.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(i.regex.transforms).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(i.regex.delimiter).map((function(t){return parseFloat(t)}))]})).reduce((function(t,e){return"matrix"==e[0]?t.multiply(g(e[1])):t[e[0]].apply(t,e[1])}),new i.Matrix)},toParent:function(t){if(this==t)return this;var e=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t).untransform().transform(i.multiply(e)),this},toDoc:function(){return this.toParent(this.doc())}}),i.Transformation=i.invent({create:function(t,e){if(arguments.length>1&&"boolean"!=typeof e)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(t))for(var i=0,a=this.arguments.length;i<a;++i)this[this.arguments[i]]=t[i];else if(t&&"object"===r(t))for(i=0,a=this.arguments.length;i<a;++i)this[this.arguments[i]]=t[this.arguments[i]];this.inversed=!1,!0===e&&(this.inversed=!0)}}),i.Translate=i.invent({parent:i.Matrix,inherit:i.Transformation,create:function(t,e){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["transformedX","transformedY"],method:"translate"}}),i.extend(i.Element,{style:function(t,e){if(0==arguments.length)return this.node.style.cssText||"";if(arguments.length<2)if("object"===r(t))for(var a in t)this.style(a,t[a]);else{if(!i.regex.isCss.test(t))return this.node.style[c(t)];for(t=t.split(/\s*;\s*/).filter((function(t){return!!t})).map((function(t){return t.split(/\s*:\s*/)}));e=t.pop();)this.style(e[0],e[1])}else this.node.style[c(t)]=null===e||i.regex.isBlank.test(e)?"":e;return this}}),i.Parent=i.invent({create:function(t){this.constructor.call(this,t)},inherit:i.Element,extend:{children:function(){return i.utils.map(i.utils.filterSVGElements(this.node.childNodes),(function(t){return i.adopt(t)}))},add:function(t,e){return null==e?this.node.appendChild(t.node):t.node!=this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this},put:function(t,e){return this.add(t,e),t},has:function(t){return this.index(t)>=0},index:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)},get:function(t){return i.adopt(this.node.childNodes[t])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(t,e){for(var a=this.children(),r=0,n=a.length;r<n;r++)a[r]instanceof i.Element&&t.apply(a[r],[r,a]),e&&a[r]instanceof i.Container&&a[r].each(t,e);return this},removeElement:function(t){return this.node.removeChild(t.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this},defs:function(){return this.doc().defs()}}}),i.extend(i.Parent,{ungroup:function(t,e){return 0===e||this instanceof i.Defs||this.node==i.parser.draw||(t=t||(this instanceof i.Doc?this:this.parent(i.Parent)),e=e||1/0,this.each((function(){return this instanceof i.Defs?this:this instanceof i.Parent?this.ungroup(t,e-1):this.toParent(t)})),this.node.firstChild||this.remove()),this},flatten:function(t,e){return this.ungroup(t,e)}}),i.Container=i.invent({create:function(t){this.constructor.call(this,t)},inherit:i.Parent}),i.ViewBox=i.invent({parent:i.Container,construct:{}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach((function(t){i.Element.prototype[t]=function(e){return i.on(this.node,t,e),this}})),i.listeners=[],i.handlerMap=[],i.listenerId=0,i.on=function(t,e,a,r,n){var s=a.bind(r||t.instance||t),o=(i.handlerMap.indexOf(t)+1||i.handlerMap.push(t))-1,l=e.split(".")[0],h=e.split(".")[1]||"*";i.listeners[o]=i.listeners[o]||{},i.listeners[o][l]=i.listeners[o][l]||{},i.listeners[o][l][h]=i.listeners[o][l][h]||{},a._svgjsListenerId||(a._svgjsListenerId=++i.listenerId),i.listeners[o][l][h][a._svgjsListenerId]=s,t.addEventListener(l,s,n||{passive:!0})},i.off=function(t,e,a){var r=i.handlerMap.indexOf(t),n=e&&e.split(".")[0],s=e&&e.split(".")[1],o="";if(-1!=r)if(a){if("function"==typeof a&&(a=a._svgjsListenerId),!a)return;i.listeners[r][n]&&i.listeners[r][n][s||"*"]&&(t.removeEventListener(n,i.listeners[r][n][s||"*"][a],!1),delete i.listeners[r][n][s||"*"][a])}else if(s&&n){if(i.listeners[r][n]&&i.listeners[r][n][s]){for(var l in i.listeners[r][n][s])i.off(t,[n,s].join("."),l);delete i.listeners[r][n][s]}}else if(s)for(var h in i.listeners[r])for(var o in i.listeners[r][h])s===o&&i.off(t,[h,s].join("."));else if(n){if(i.listeners[r][n]){for(var o in i.listeners[r][n])i.off(t,[n,o].join("."));delete i.listeners[r][n]}}else{for(var h in i.listeners[r])i.off(t,h);delete i.listeners[r],delete i.handlerMap[r]}},i.extend(i.Element,{on:function(t,e,a,r){return i.on(this.node,t,e,a,r),this},off:function(t,e){return i.off(this.node,t,e),this},fire:function(e,a){return e instanceof t.Event?this.node.dispatchEvent(e):this.node.dispatchEvent(e=new i.CustomEvent(e,{detail:a,cancelable:!0})),this._event=e,this},event:function(){return this._event}}),i.Defs=i.invent({create:"defs",inherit:i.Container}),i.G=i.invent({create:"g",inherit:i.Container,extend:{x:function(t){return null==t?this.transform("x"):this.transform({x:t-this.x()},!0)}},construct:{group:function(){return this.put(new i.G)}}}),i.Doc=i.invent({create:function(t){t&&("svg"==(t="string"==typeof t?e.getElementById(t):t).nodeName?this.constructor.call(this,t):(this.constructor.call(this,i.create("svg")),t.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:i.Container,extend:{namespace:function(){return this.attr({xmlns:i.ns,version:"1.1"}).attr("xmlns:xlink",i.xlink,i.xmlns).attr("xmlns:svgjs",i.svgjs,i.xmlns)},defs:function(){var t;return this._defs||((t=this.node.getElementsByTagName("defs")[0])?this._defs=i.adopt(t):this._defs=new i.Defs,this.node.appendChild(this._defs.node)),this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName?this.node.parentNode:null},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,i.parser.draw&&!i.parser.draw.parentNode&&this.node.appendChild(i.parser.draw),this},clone:function(t){this.writeDataToDom();var e=this.node,i=x(e.cloneNode(!0));return t?(t.node||t).appendChild(i.node):e.parentNode.insertBefore(i.node,e.nextSibling),i}}}),i.extend(i.Element,{}),i.Gradient=i.invent({create:function(t){this.constructor.call(this,i.create(t+"Gradient")),this.type=t},inherit:i.Container,extend:{at:function(t,e,a){return this.put(new i.Stop).update(t,e,a)},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(t,e,a){return"transform"==t&&(t="gradientTransform"),i.Container.prototype.attr.call(this,t,e,a)}},construct:{gradient:function(t,e){return this.defs().gradient(t,e)}}}),i.extend(i.Gradient,i.FX,{from:function(t,e){return"radial"==(this._target||this).type?this.attr({fx:new i.Number(t),fy:new i.Number(e)}):this.attr({x1:new i.Number(t),y1:new i.Number(e)})},to:function(t,e){return"radial"==(this._target||this).type?this.attr({cx:new i.Number(t),cy:new i.Number(e)}):this.attr({x2:new i.Number(t),y2:new i.Number(e)})}}),i.extend(i.Defs,{gradient:function(t,e){return this.put(new i.Gradient(t)).update(e)}}),i.Stop=i.invent({create:"stop",inherit:i.Element,extend:{update:function(t){return("number"==typeof t||t instanceof i.Number)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new i.Number(t.offset)),this}}}),i.Pattern=i.invent({create:"pattern",inherit:i.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this},toString:function(){return this.fill()},attr:function(t,e,a){return"transform"==t&&(t="patternTransform"),i.Container.prototype.attr.call(this,t,e,a)}},construct:{pattern:function(t,e,i){return this.defs().pattern(t,e,i)}}}),i.extend(i.Defs,{pattern:function(t,e,a){return this.put(new i.Pattern).update(a).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}}),i.Shape=i.invent({create:function(t){this.constructor.call(this,t)},inherit:i.Element}),i.Symbol=i.invent({create:"symbol",inherit:i.Container,construct:{symbol:function(){return this.put(new i.Symbol)}}}),i.Use=i.invent({create:"use",inherit:i.Shape,extend:{element:function(t,e){return this.attr("href",(e||"")+"#"+t,i.xlink)}},construct:{use:function(t,e){return this.put(new i.Use).element(t,e)}}}),i.Rect=i.invent({create:"rect",inherit:i.Shape,construct:{rect:function(t,e){return this.put(new i.Rect).size(t,e)}}}),i.Circle=i.invent({create:"circle",inherit:i.Shape,construct:{circle:function(t){return this.put(new i.Circle).rx(new i.Number(t).divide(2)).move(0,0)}}}),i.extend(i.Circle,i.FX,{rx:function(t){return this.attr("r",t)},ry:function(t){return this.rx(t)}}),i.Ellipse=i.invent({create:"ellipse",inherit:i.Shape,construct:{ellipse:function(t,e){return this.put(new i.Ellipse).size(t,e).move(0,0)}}}),i.extend(i.Ellipse,i.Rect,i.FX,{rx:function(t){return this.attr("rx",t)},ry:function(t){return this.attr("ry",t)}}),i.extend(i.Circle,i.Ellipse,{x:function(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())},y:function(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())},cx:function(t){return null==t?this.attr("cx"):this.attr("cx",t)},cy:function(t){return null==t?this.attr("cy"):this.attr("cy",t)},width:function(t){return null==t?2*this.rx():this.rx(new i.Number(t).divide(2))},height:function(t){return null==t?2*this.ry():this.ry(new i.Number(t).divide(2))},size:function(t,e){var a=f(this,t,e);return this.rx(new i.Number(a.width).divide(2)).ry(new i.Number(a.height).divide(2))}}),i.Line=i.invent({create:"line",inherit:i.Shape,extend:{array:function(){return new i.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(t,e,a,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:a,y2:r}:new i.PointArray(t).toLine(),this.attr(t))},move:function(t,e){return this.attr(this.array().move(t,e).toLine())},size:function(t,e){var i=f(this,t,e);return this.attr(this.array().size(i.width,i.height).toLine())}},construct:{line:function(t,e,a,r){return i.Line.prototype.plot.apply(this.put(new i.Line),null!=t?[t,e,a,r]:[0,0,0,0])}}}),i.Polyline=i.invent({create:"polyline",inherit:i.Shape,construct:{polyline:function(t){return this.put(new i.Polyline).plot(t||new i.PointArray)}}}),i.Polygon=i.invent({create:"polygon",inherit:i.Shape,construct:{polygon:function(t){return this.put(new i.Polygon).plot(t||new i.PointArray)}}}),i.extend(i.Polyline,i.Polygon,{array:function(){return this._array||(this._array=new i.PointArray(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new i.PointArray(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var i=f(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}}),i.extend(i.Line,i.Polyline,i.Polygon,{morphArray:i.PointArray,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),i.Path=i.invent({create:"path",inherit:i.Shape,extend:{morphArray:i.PathArray,array:function(){return this._array||(this._array=new i.PathArray(this.attr("d")))},plot:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new i.PathArray(t))},clear:function(){return delete this._array,this}},construct:{path:function(t){return this.put(new i.Path).plot(t||new i.PathArray)}}}),i.Image=i.invent({create:"image",inherit:i.Shape,extend:{load:function(e){if(!e)return this;var a=this,r=new t.Image;return i.on(r,"load",(function(){i.off(r);var t=a.parent(i.Pattern);null!==t&&(0==a.width()&&0==a.height()&&a.size(r.width,r.height),t&&0==t.width()&&0==t.height()&&t.size(a.width(),a.height()),"function"==typeof a._loaded&&a._loaded.call(a,{width:r.width,height:r.height,ratio:r.width/r.height,url:e}))})),i.on(r,"error",(function(t){i.off(r),"function"==typeof a._error&&a._error.call(a,t)})),this.attr("href",r.src=this.src=e,i.xlink)},loaded:function(t){return this._loaded=t,this},error:function(t){return this._error=t,this}},construct:{image:function(t,e,a){return this.put(new i.Image).load(t).size(e||0,a||e||0)}}}),i.Text=i.invent({create:function(){this.constructor.call(this,i.create("text")),this.dom.leading=new i.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",i.defaults.attrs["font-family"])},inherit:i.Shape,extend:{x:function(t){return null==t?this.attr("x"):this.attr("x",t)},text:function(t){if(void 0===t){t="";for(var e=this.node.childNodes,a=0,r=e.length;a<r;++a)0!=a&&3!=e[a].nodeType&&1==i.adopt(e[a]).dom.newLined&&(t+="\n"),t+=e[a].textContent;return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else{a=0;for(var n=(t=t.split("\n")).length;a<n;a++)this.tspan(t[a]).newLine()}return this.build(!1).rebuild()},size:function(t){return this.attr("font-size",t).rebuild()},leading:function(t){return null==t?this.dom.leading:(this.dom.leading=new i.Number(t),this.rebuild())},lines:function(){var t=(this.textPath&&this.textPath()||this).node,e=i.utils.map(i.utils.filterSVGElements(t.childNodes),(function(t){return i.adopt(t)}));return new i.Set(e)},rebuild:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,a=0,r=this.dom.leading*new i.Number(this.attr("font-size"));this.lines().each((function(){this.dom.newLined&&(e.textPath()||this.attr("x",e.attr("x")),"\n"==this.text()?a+=r:(this.attr("dy",r+a),a=0))})),this.fire("rebuild")}return this},build:function(t){return this._build=!!t,this},setData:function(t){return this.dom=t,this.dom.leading=new i.Number(t.leading||1.3),this}},construct:{text:function(t){return this.put(new i.Text).text(t)},plain:function(t){return this.put(new i.Text).plain(t)}}}),i.Tspan=i.invent({create:"tspan",inherit:i.Shape,extend:{text:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?t.call(this,this):this.plain(t),this)},dx:function(t){return this.attr("dx",t)},dy:function(t){return this.attr("dy",t)},newLine:function(){var t=this.parent(i.Text);return this.dom.newLined=!0,this.dy(t.dom.leading*t.attr("font-size")).attr("x",t.x())}}}),i.extend(i.Text,i.Tspan,{plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(e.createTextNode(t)),this},tspan:function(t){var e=(this.textPath&&this.textPath()||this).node,a=new i.Tspan;return!1===this._build&&this.clear(),e.appendChild(a.node),a.text(t)},clear:function(){for(var t=(this.textPath&&this.textPath()||this).node;t.hasChildNodes();)t.removeChild(t.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),i.TextPath=i.invent({create:"textPath",inherit:i.Parent,parent:i.Text,construct:{morphArray:i.PathArray,array:function(){var t=this.track();return t?t.array():null},plot:function(t){var e=this.track(),i=null;return e&&(i=e.plot(t)),null==t?i:this},track:function(){var t=this.textPath();if(t)return t.reference("href")},textPath:function(){if(this.node.firstChild&&"textPath"==this.node.firstChild.nodeName)return i.adopt(this.node.firstChild)}}}),i.Nested=i.invent({create:function(){this.constructor.call(this,i.create("svg")),this.style("overflow","visible")},inherit:i.Container,construct:{nested:function(){return this.put(new i.Nested)}}});var l={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"==e?t:t+"-"+e}};function h(t,e,a,r){return a+r.replace(i.regex.dots," .")}function c(t){return t.toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()}))}function d(t){return t.charAt(0).toUpperCase()+t.slice(1)}function u(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function f(t,e,i){if(null==e||null==i){var a=t.bbox();null==e?e=a.width/a.height*i:null==i&&(i=a.height/a.width*e)}return{width:e,height:i}}function p(t,e,i){return{x:e*t.a+i*t.c+0,y:e*t.b+i*t.d+0}}function g(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}function x(e){for(var a=e.childNodes.length-1;a>=0;a--)e.childNodes[a]instanceof t.SVGElement&&x(e.childNodes[a]);return i.adopt(e).id(i.eid(e.nodeName))}function m(t){return null==t.x&&(t.x=0,t.y=0,t.width=0,t.height=0),t.w=t.width,t.h=t.height,t.x2=t.x+t.width,t.y2=t.y+t.height,t.cx=t.x+t.width/2,t.cy=t.y+t.height/2,t}function v(t){return Math.abs(t)>1e-37?t:0}["fill","stroke"].forEach((function(t){var e={};e[t]=function(e){if(void 0===e)return this;if("string"==typeof e||i.Color.isRgb(e)||e&&"function"==typeof e.fill)this.attr(t,e);else for(var a=l[t].length-1;a>=0;a--)null!=e[l[t][a]]&&this.attr(l.prefix(t,l[t][a]),e[l[t][a]]);return this},i.extend(i.Element,i.FX,e)})),i.extend(i.Element,i.FX,{translate:function(t,e){return this.transform({x:t,y:e})},matrix:function(t){return this.attr("transform",new i.Matrix(6==arguments.length?[].slice.call(arguments):t))},opacity:function(t){return this.attr("opacity",t)},dx:function(t){return this.x(new i.Number(t).plus(this instanceof i.FX?0:this.x()),!0)},dy:function(t){return this.y(new i.Number(t).plus(this instanceof i.FX?0:this.y()),!0)}}),i.extend(i.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(t){return this.node.getPointAtLength(t)}}),i.Set=i.invent({create:function(t){Array.isArray(t)?this.members=t:this.clear()},extend:{add:function(){for(var t=[].slice.call(arguments),e=0,i=t.length;e<i;e++)this.members.push(t[e]);return this},remove:function(t){var e=this.index(t);return e>-1&&this.members.splice(e,1),this},each:function(t){for(var e=0,i=this.members.length;e<i;e++)t.apply(this.members[e],[e,this.members]);return this},clear:function(){return this.members=[],this},length:function(){return this.members.length},has:function(t){return this.index(t)>=0},index:function(t){return this.members.indexOf(t)},get:function(t){return this.members[t]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(t){return new i.Set(t)}}}),i.FX.Set=i.invent({create:function(t){this.set=t}}),i.Set.inherit=function(){var t=[];for(var e in i.Shape.prototype)"function"==typeof i.Shape.prototype[e]&&"function"!=typeof i.Set.prototype[e]&&t.push(e);for(var e in t.forEach((function(t){i.Set.prototype[t]=function(){for(var e=0,a=this.members.length;e<a;e++)this.members[e]&&"function"==typeof this.members[e][t]&&this.members[e][t].apply(this.members[e],arguments);return"animate"==t?this.fx||(this.fx=new i.FX.Set(this)):this}})),t=[],i.FX.prototype)"function"==typeof i.FX.prototype[e]&&"function"!=typeof i.FX.Set.prototype[e]&&t.push(e);t.forEach((function(t){i.FX.Set.prototype[t]=function(){for(var e=0,i=this.set.members.length;e<i;e++)this.set.members[e].fx[t].apply(this.set.members[e].fx,arguments);return this}}))},i.extend(i.Element,{}),i.extend(i.Element,{remember:function(t,e){if("object"===r(arguments[0]))for(var i in t)this.remember(i,t[i]);else{if(1==arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0==arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory||(this._memory={})}}),i.get=function(t){var a=e.getElementById(function(t){var e=(t||"").toString().match(i.regex.reference);if(e)return e[1]}(t)||t);return i.adopt(a)},i.select=function(t,a){return new i.Set(i.utils.map((a||e).querySelectorAll(t),(function(t){return i.adopt(t)})))},i.extend(i.Parent,{select:function(t){return i.select(t,this.node)}});var b="abcdef".split("");if("function"!=typeof t.CustomEvent){var y=function(t,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var a=e.createEvent("CustomEvent");return a.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),a};y.prototype=t.Event.prototype,i.CustomEvent=y}else i.CustomEvent=t.CustomEvent;return i},"object"===r(e)?t.exports=Dt.document?Et(Dt,Dt.document):function(t){return Et(t,t.document)}:Dt.SVG=Et(Dt,Dt.document),function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(t,e){return this.add(t,e),!t.attr("in")&&this.autoSetIn&&t.attr("in",this.source),t.attr("result")||t.attr("result",t),t},blend:function(t,e,i){return this.put(new SVG.BlendEffect(t,e,i))},colorMatrix:function(t,e){return this.put(new SVG.ColorMatrixEffect(t,e))},convolveMatrix:function(t){return this.put(new SVG.ConvolveMatrixEffect(t))},componentTransfer:function(t){return this.put(new SVG.ComponentTransferEffect(t))},composite:function(t,e,i){return this.put(new SVG.CompositeEffect(t,e,i))},flood:function(t,e){return this.put(new SVG.FloodEffect(t,e))},offset:function(t,e){return this.put(new SVG.OffsetEffect(t,e))},image:function(t){return this.put(new SVG.ImageEffect(t))},merge:function(){var t=[void 0];for(var e in arguments)t.push(arguments[e]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,t)))},gaussianBlur:function(t,e){return this.put(new SVG.GaussianBlurEffect(t,e))},morphology:function(t,e){return this.put(new SVG.MorphologyEffect(t,e))},diffuseLighting:function(t,e,i){return this.put(new SVG.DiffuseLightingEffect(t,e,i))},displacementMap:function(t,e,i,a,r){return this.put(new SVG.DisplacementMapEffect(t,e,i,a,r))},specularLighting:function(t,e,i,a){return this.put(new SVG.SpecularLightingEffect(t,e,i,a))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(t,e,i,a,r){return this.put(new SVG.TurbulenceEffect(t,e,i,a,r))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(t){var e=this.put(new SVG.Filter);return"function"==typeof t&&t.call(e,e),e}}),SVG.extend(SVG.Container,{filter:function(t){return this.defs().filter(t)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(t){return this.filterer=t instanceof SVG.Element?t:this.doc().filter(t),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(t){return this.filterer&&!0===t&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",t)},result:function(t){return null==t?this.attr("result"):this.attr("result",t)},toString:function(){return this.result()}}});var t={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},diffuseLighting:function(t,e,i){return this.parent()&&this.parent().diffuseLighting(t,e,i).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},specularLighting:function(t,e,i,a){return this.parent()&&this.parent().specularLighting(t,e,i,a).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,r){return this.parent()&&this.parent().turbulence(t,e,i,a,r).in(this)}};SVG.extend(SVG.Effect,t),SVG.extend(SVG.ParentEffect,t),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(t){this.attr("in",t)}}});var e={blend:function(t,e,i){this.attr({in:t,in2:e,mode:i||"normal"})},colorMatrix:function(t,e){"matrix"==t&&(e=r(e)),this.attr({type:t,values:void 0===e?null:e})},convolveMatrix:function(t){t=r(t),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},composite:function(t,e,i){this.attr({in:t,in2:e,operator:i})},flood:function(t,e){this.attr("flood-color",t),null!=e&&this.attr("flood-opacity",e)},offset:function(t,e){this.attr({dx:t,dy:e})},image:function(t){this.attr("href",t,SVG.xlink)},displacementMap:function(t,e,i,a,r){this.attr({in:t,in2:e,scale:i,xChannelSelector:a,yChannelSelector:r})},gaussianBlur:function(t,e){null!=t||null!=e?this.attr("stdDeviation",n(Array.prototype.slice.call(arguments))):this.attr("stdDeviation","0 0")},morphology:function(t,e){this.attr({operator:t,radius:e})},tile:function(){},turbulence:function(t,e,i,a,r){this.attr({numOctaves:e,seed:i,stitchTiles:a,baseFrequency:t,type:r})}},i={merge:function(){var t;if(arguments[0]instanceof SVG.Set){var e=this;arguments[0].each((function(t){this instanceof SVG.MergeNode?e.put(this):(this instanceof SVG.Effect||this instanceof SVG.ParentEffect)&&e.put(new SVG.MergeNode(this))}))}else{t=Array.isArray(arguments[0])?arguments[0]:arguments;for(var i=0;i<t.length;i++)t[i]instanceof SVG.MergeNode?this.put(t[i]):this.put(new SVG.MergeNode(t[i]))}},componentTransfer:function(t){if(this.rgb=new SVG.Set,["r","g","b","a"].forEach(function(t){this[t]=new(SVG["Func"+t.toUpperCase()])("identity"),this.rgb.add(this[t]),this.node.appendChild(this[t].node)}.bind(this)),t)for(var e in t.rgb&&(["r","g","b"].forEach(function(e){this[e].attr(t.rgb)}.bind(this)),delete t.rgb),t)this[e].attr(t[e])},diffuseLighting:function(t,e,i){this.attr({surfaceScale:t,diffuseConstant:e,kernelUnitLength:i})},specularLighting:function(t,e,i,a){this.attr({surfaceScale:t,diffuseConstant:e,specularExponent:i,kernelUnitLength:a})}},a={distantLight:function(t,e){this.attr({azimuth:t,elevation:e})},pointLight:function(t,e,i){this.attr({x:t,y:e,z:i})},spotLight:function(t,e,i,a,r,n){this.attr({x:t,y:e,z:i,pointsAtX:a,pointsAtY:r,pointsAtZ:n})},mergeNode:function(t){this.attr("in",t)}};function r(t){return Array.isArray(t)&&(t=new SVG.Array(t)),t.toString().replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," ")}function n(t){if(!Array.isArray(t))return t;for(var e=0,i=t.length,a=[];e<i;e++)a.push(t[e]);return a.join(" ")}function s(){var t=function(){};for(var e in"function"==typeof arguments[arguments.length-1]&&(t=arguments[arguments.length-1],Array.prototype.splice.call(arguments,arguments.length-1,1)),arguments)for(var i in arguments[e])t(arguments[e][i],i,arguments[e])}["r","g","b","a"].forEach((function(t){a["Func"+t.toUpperCase()]=function(t){switch(this.attr("type",t),t){case"table":this.attr("tableValues",arguments[1]);break;case"linear":this.attr("slope",arguments[1]),this.attr("intercept",arguments[2]);break;case"gamma":this.attr("amplitude",arguments[1]),this.attr("exponent",arguments[2]),this.attr("offset",arguments[2])}}})),s(e,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.Effect,extend:{}})})),s(i,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.ParentEffect,extend:{}})})),s(a,(function(t,e){var i=e.charAt(0).toUpperCase()+e.slice(1);SVG[i]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),t.apply(this,arguments)},inherit:SVG.ChildEffect,extend:{}})})),SVG.extend(SVG.MergeEffect,{in:function(t){return t instanceof SVG.MergeNode?this.add(t,0):this.add(new SVG.MergeNode(t),0),this}}),SVG.extend(SVG.CompositeEffect,SVG.BlendEffect,SVG.DisplacementMapEffect,{in2:function(t){return null==t?this.parent()&&this.parent().select('[result="'+this.attr("in2")+'"]').get(0)||this.attr("in2"):this.attr("in2",t)}}),SVG.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]}}.call(void 0),function(){function t(t,r,n,s,o,l,h){for(var c=t.slice(r,n||h),d=s.slice(o,l||h),u=0,f={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};c[u]=e.call(f,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(f,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(f,c[u]),d[u]=i.call(p,d[u])),++u!=c.length||u!=d.length;)u==c.length&&c.push(["C",f.pos[0],f.pos[1],f.pos[0],f.pos[1],f.pos[0],f.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]);return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":t=(e=function(t,e){var i,a,r,n,s,o,l,h,c,d,u,f,p,g,x,m,v,b,y,w,S,_,k,A,C,M,T=Math.abs(e[1]),P=Math.abs(e[2]),L=e[3]%360,D=e[4],E=e[5],O=e[6],I=e[7],z=new SVG.Point(t),N=new SVG.Point(O,I),Y=[];if(0===T||0===P||z.x===N.x&&z.y===N.y)return[["C",z.x,z.y,N.x,N.y,N.x,N.y]];for((a=(i=new SVG.Point((z.x-N.x)/2,(z.y-N.y)/2).transform((new SVG.Matrix).rotate(L))).x*i.x/(T*T)+i.y*i.y/(P*P))>1&&(T*=a=Math.sqrt(a),P*=a),r=(new SVG.Matrix).rotate(L).scale(1/T,1/P).rotate(-L),z=z.transform(r),o=(n=[(N=N.transform(r)).x-z.x,N.y-z.y])[0]*n[0]+n[1]*n[1],s=Math.sqrt(o),n[0]/=s,n[1]/=s,l=o<4?Math.sqrt(1-o/4):0,D===E&&(l*=-1),h=new SVG.Point((N.x+z.x)/2+l*-n[1],(N.y+z.y)/2+l*n[0]),c=new SVG.Point(z.x-h.x,z.y-h.y),d=new SVG.Point(N.x-h.x,N.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1),f=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(f*=-1),E&&u>f&&(f+=2*Math.PI),!E&&u<f&&(f-=2*Math.PI),m=[],v=u,p=(f-u)/(g=Math.ceil(2*Math.abs(u-f)/Math.PI)),x=4*Math.tan(p/4)/3,S=0;S<=g;S++)y=Math.cos(v),b=Math.sin(v),w=new SVG.Point(h.x+y,h.y+b),m[S]=[new SVG.Point(w.x+x*b,w.y-x*y),w,new SVG.Point(w.x-x*b,w.y+x*y)],v+=p;for(m[0][0]=m[0][1].clone(),m[m.length-1][2]=m[m.length-1][1].clone(),r=(new SVG.Matrix).rotate(L).scale(T,P).rotate(-L),S=0,_=m.length;S<_;S++)m[S][0]=m[S][0].transform(r),m[S][1]=m[S][1].transform(r),m[S][2]=m[S][2].transform(r);for(S=1,_=m.length;S<_;S++)k=(w=m[S-1][2]).x,A=w.y,C=(w=m[S][0]).x,M=w.y,O=(w=m[S][1]).x,I=w.y,Y.push(["C",k,A,C,M,O,I]);return Y}(this.pos,t))[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],e}function r(t,e){if(!1===e)return!1;for(var i=e,a=t.length;i<a;++i)if("M"==t[i][0])return i;return!1}SVG.extend(SVG.PathArray,{morph:function(e){for(var i=this.value,a=this.parse(e),n=0,s=0,o=!1,l=!1;!1!==n||!1!==s;){var h;o=r(i,!1!==n&&n+1),l=r(a,!1!==s&&s+1),!1===n&&(n=0==(h=new SVG.PathArray(c.start).bbox()).height||0==h.width?i.push(i[0])-1:i.push(["M",h.x+h.width/2,h.y+h.height/2])-1),!1===s&&(s=0==(h=new SVG.PathArray(c.dest).bbox()).height||0==h.width?a.push(a[0])-1:a.push(["M",h.x+h.width/2,h.y+h.height/2])-1);var c=t(i,n,o,a,s,l);i=i.slice(0,n).concat(c.start,!1===o?[]:i.slice(o)),a=a.slice(0,s).concat(c.dest,!1===l?[]:a.slice(l)),n=!1!==o&&n+c.start.length,s=!1!==l&&s+c.dest.length}return this.value=i,this.destination=new SVG.PathArray,this.destination.value=a,this}})}(),function(){function t(t){t.remember("_draggable",this),this.el=t}t.prototype.init=function(t,e){var i=this;this.constraint=t,this.value=e,this.el.on("mousedown.drag",(function(t){i.start(t)})),this.el.on("touchstart.drag",(function(t){i.start(t)}))},t.prototype.transformPoint=function(t,e){var i=(t=t||window.event).changedTouches&&t.changedTouches[0]||t;return this.p.x=i.clientX-(e||0),this.p.y=i.clientY,this.p.matrixTransform(this.m)},t.prototype.getBBox=function(){var t=this.el.bbox();return this.el instanceof SVG.Nested&&(t=this.el.rbox()),(this.el instanceof SVG.G||this.el instanceof SVG.Use||this.el instanceof SVG.Nested)&&(t.x=this.el.x(),t.y=this.el.y()),t},t.prototype.start=function(t){if("click"!=t.type&&"mousedown"!=t.type&&"mousemove"!=t.type||1==(t.which||t.buttons)){var e=this;if(this.el.fire("beforedrag",{event:t,handler:this}),!this.el.event().defaultPrevented){t.preventDefault(),t.stopPropagation(),this.parent=this.parent||this.el.parent(SVG.Nested)||this.el.parent(SVG.Doc),this.p=this.parent.node.createSVGPoint(),this.m=this.el.node.getScreenCTM().inverse();var i,a=this.getBBox();if(this.el instanceof SVG.Text)switch(i=this.el.node.getComputedTextLength(),this.el.attr("text-anchor")){case"middle":i/=2;break;case"start":i=0}this.startPoints={point:this.transformPoint(t,i),box:a,transform:this.el.transform()},SVG.on(window,"mousemove.drag",(function(t){e.drag(t)})),SVG.on(window,"touchmove.drag",(function(t){e.drag(t)})),SVG.on(window,"mouseup.drag",(function(t){e.end(t)})),SVG.on(window,"touchend.drag",(function(t){e.end(t)})),this.el.fire("dragstart",{event:t,p:this.startPoints.point,m:this.m,handler:this})}}},t.prototype.drag=function(t){var e=this.getBBox(),i=this.transformPoint(t),a=this.startPoints.box.x+i.x-this.startPoints.point.x,r=this.startPoints.box.y+i.y-this.startPoints.point.y,n=this.constraint,s=i.x-this.startPoints.point.x,o=i.y-this.startPoints.point.y;if(this.el.fire("dragmove",{event:t,p:i,m:this.m,handler:this}),this.el.event().defaultPrevented)return i;if("function"==typeof n){var l=n.call(this.el,a,r,this.m);"boolean"==typeof l&&(l={x:l,y:l}),!0===l.x?this.el.x(a):!1!==l.x&&this.el.x(l.x),!0===l.y?this.el.y(r):!1!==l.y&&this.el.y(l.y)}else"object"==typeof n&&(null!=n.minX&&a<n.minX?s=(a=n.minX)-this.startPoints.box.x:null!=n.maxX&&a>n.maxX-e.width&&(s=(a=n.maxX-e.width)-this.startPoints.box.x),null!=n.minY&&r<n.minY?o=(r=n.minY)-this.startPoints.box.y:null!=n.maxY&&r>n.maxY-e.height&&(o=(r=n.maxY-e.height)-this.startPoints.box.y),null!=n.snapToGrid&&(a-=a%n.snapToGrid,r-=r%n.snapToGrid,s-=s%n.snapToGrid,o-=o%n.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:s,y:o},!0):this.el.move(a,r));return i},t.prototype.end=function(t){var e=this.drag(t);this.el.fire("dragend",{event:t,p:e,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(e,i){"function"!=typeof e&&"object"!=typeof e||(i=e,e=!0);var a=this.remember("_draggable")||new t(this);return(e=void 0===e||e)?a.init(i||{},e):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function t(t){this.el=t,t.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(t,e,i){var a="string"!=typeof t?t:e[t];return i?a/2:a},this.pointCoords=function(t,e){var i=this.pointsList[t];return{x:this.pointCoord(i[0],e,"t"===t||"b"===t),y:this.pointCoord(i[1],e,"r"===t||"l"===t)}}}t.prototype.init=function(t,e){var i=this.el.bbox();this.options={};var a=this.el.selectize.defaults.points;for(var r in this.el.selectize.defaults)this.options[r]=this.el.selectize.defaults[r],void 0!==e[r]&&(this.options[r]=e[r]);var n=["points","pointsExclude"];for(var r in n){var s=this.options[n[r]];"string"==typeof s?s=s.length>0?s.split(/\s*,\s*/i):[]:"boolean"==typeof s&&"points"===n[r]&&(s=s?a:[]),this.options[n[r]]=s}this.options.points=[a,this.options.points].reduce((function(t,e){return t.filter((function(t){return e.indexOf(t)>-1}))})),this.options.points=[this.options.points,this.options.pointsExclude].reduce((function(t,e){return t.filter((function(t){return e.indexOf(t)<0}))})),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(t):this.selectRect(t),this.observe(),this.cleanup()},t.prototype.selectPoints=function(t){return this.pointSelection.isSelected=t,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},t.prototype.getPointArray=function(){var t=this.el.bbox();return this.el.array().valueOf().map((function(e){return[e[0]-t.x,e[1]-t.y]}))},t.prototype.drawPoints=function(){for(var t=this,e=this.getPointArray(),i=0,a=e.length;i<a;++i){var r=function(e){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var a=i.pageX||i.touches[0].pageX,r=i.pageY||i.touches[0].pageY;t.el.fire("point",{x:a,y:r,i:e,event:i})}}(i),n=this.drawPoint(e[i][0],e[i][1]).addClass(this.options.classPoints).addClass(this.options.classPoints+"_point").on("touchstart",r).on("mousedown",r);this.pointSelection.set.add(n)}},t.prototype.drawPoint=function(t,e){var i=this.options.pointType;switch(i){case"circle":return this.drawCircle(t,e);case"rect":return this.drawRect(t,e);default:if("function"==typeof i)return i.call(this,t,e);throw new Error("Unknown "+i+" point type!")}},t.prototype.drawCircle=function(t,e){return this.nested.circle(this.options.pointSize).center(t,e)},t.prototype.drawRect=function(t,e){return this.nested.rect(this.options.pointSize,this.options.pointSize).center(t,e)},t.prototype.updatePointSelection=function(){var t=this.getPointArray();this.pointSelection.set.each((function(e){this.cx()===t[e][0]&&this.cy()===t[e][1]||this.center(t[e][0],t[e][1])}))},t.prototype.updateRectSelection=function(){var t=this,e=this.el.bbox();if(this.rectSelection.set.get(0).attr({width:e.width,height:e.height}),this.options.points.length&&this.options.points.map((function(i,a){var r=t.pointCoords(i,e);t.rectSelection.set.get(a+1).center(r.x,r.y)})),this.options.rotationPoint){var i=this.rectSelection.set.length();this.rectSelection.set.get(i-1).center(e.width/2,20)}},t.prototype.selectRect=function(t){var e=this,i=this.el.bbox();function a(t){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var a=i.pageX||i.touches[0].pageX,r=i.pageY||i.touches[0].pageY;e.el.fire(t,{x:a,y:r,event:i})}}if(this.rectSelection.isSelected=t,this.rectSelection.set=this.rectSelection.set||this.parent.set(),this.rectSelection.set.get(0)||this.rectSelection.set.add(this.nested.rect(i.width,i.height).addClass(this.options.classRect)),this.options.points.length&&this.rectSelection.set.length()<2&&(this.options.points.map((function(t,r){var n=e.pointCoords(t,i),s=e.drawPoint(n.x,n.y).attr("class",e.options.classPoints+"_"+t).on("mousedown",a(t)).on("touchstart",a(t));e.rectSelection.set.add(s)})),this.rectSelection.set.each((function(){this.addClass(e.options.classPoints)}))),this.options.rotationPoint&&(this.options.points&&!this.rectSelection.set.get(9)||!this.options.points&&!this.rectSelection.set.get(1))){var r=function(t){(t=t||window.event).preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation();var i=t.pageX||t.touches[0].pageX,a=t.pageY||t.touches[0].pageY;e.el.fire("rot",{x:i,y:a,event:t})},n=this.drawPoint(i.width/2,20).attr("class",this.options.classPoints+"_rot").on("touchstart",r).on("mousedown",r);this.rectSelection.set.add(n)}},t.prototype.handler=function(){var t=this.el.bbox();this.nested.matrix(new SVG.Matrix(this.el).translate(t.x,t.y)),this.rectSelection.isSelected&&this.updateRectSelection(),this.pointSelection.isSelected&&this.updatePointSelection()},t.prototype.observe=function(){var t=this;if(MutationObserver)if(this.rectSelection.isSelected||this.pointSelection.isSelected)this.observerInst=this.observerInst||new MutationObserver((function(){t.handler()})),this.observerInst.observe(this.el.node,{attributes:!0});else try{this.observerInst.disconnect(),delete this.observerInst}catch(t){}else this.el.off("DOMAttrModified.select"),(this.rectSelection.isSelected||this.pointSelection.isSelected)&&this.el.on("DOMAttrModified.select",(function(){t.handler()}))},t.prototype.cleanup=function(){!this.rectSelection.isSelected&&this.rectSelection.set&&(this.rectSelection.set.each((function(){this.remove()})),this.rectSelection.set.clear(),delete this.rectSelection.set),!this.pointSelection.isSelected&&this.pointSelection.set&&(this.pointSelection.set.each((function(){this.remove()})),this.pointSelection.set.clear(),delete this.pointSelection.set),this.pointSelection.isSelected||this.rectSelection.isSelected||(this.nested.remove(),delete this.nested)},SVG.extend(SVG.Element,{selectize:function(e,i){return"object"==typeof e&&(i=e,e=!0),(this.remember("_selectHandler")||new t(this)).init(void 0===e||e,i||{}),this}}),SVG.Element.prototype.selectize.defaults={points:["lt","rt","rb","lb","t","r","b","l"],pointsExclude:[],classRect:"svg_select_boundingRect",classPoints:"svg_select_points",pointSize:7,rotationPoint:!0,deepSelect:!1,pointType:"circle"}}(),function(){(function(){function t(t){t.remember("_resizeHandler",this),this.el=t,this.parameters={},this.lastUpdateCall=null,this.p=t.doc().node.createSVGPoint()}t.prototype.transformPoint=function(t,e,i){return this.p.x=t-(this.offset.x-window.pageXOffset),this.p.y=e-(this.offset.y-window.pageYOffset),this.p.matrixTransform(i||this.m)},t.prototype._extractPosition=function(t){return{x:null!=t.clientX?t.clientX:t.touches[0].clientX,y:null!=t.clientY?t.clientY:t.touches[0].clientY}},t.prototype.init=function(t){var e=this;if(this.stop(),"stop"!==t){for(var i in this.options={},this.el.resize.defaults)this.options[i]=this.el.resize.defaults[i],void 0!==t[i]&&(this.options[i]=t[i]);this.el.on("lt.resize",(function(t){e.resize(t||window.event)})),this.el.on("rt.resize",(function(t){e.resize(t||window.event)})),this.el.on("rb.resize",(function(t){e.resize(t||window.event)})),this.el.on("lb.resize",(function(t){e.resize(t||window.event)})),this.el.on("t.resize",(function(t){e.resize(t||window.event)})),this.el.on("r.resize",(function(t){e.resize(t||window.event)})),this.el.on("b.resize",(function(t){e.resize(t||window.event)})),this.el.on("l.resize",(function(t){e.resize(t||window.event)})),this.el.on("rot.resize",(function(t){e.resize(t||window.event)})),this.el.on("point.resize",(function(t){e.resize(t||window.event)})),this.update()}},t.prototype.stop=function(){return this.el.off("lt.resize"),this.el.off("rt.resize"),this.el.off("rb.resize"),this.el.off("lb.resize"),this.el.off("t.resize"),this.el.off("r.resize"),this.el.off("b.resize"),this.el.off("l.resize"),this.el.off("rot.resize"),this.el.off("point.resize"),this},t.prototype.resize=function(t){var e=this;this.m=this.el.node.getScreenCTM().inverse(),this.offset={x:window.pageXOffset,y:window.pageYOffset};var i=this._extractPosition(t.detail.event);if(this.parameters={type:this.el.type,p:this.transformPoint(i.x,i.y),x:t.detail.x,y:t.detail.y,box:this.el.bbox(),rotation:this.el.transform().rotation},"text"===this.el.type&&(this.parameters.fontSize=this.el.attr()["font-size"]),void 0!==t.detail.i){var a=this.el.array().valueOf();this.parameters.i=t.detail.i,this.parameters.pointCoords=[a[t.detail.i][0],a[t.detail.i][1]]}switch(t.type){case"lt":this.calc=function(t,e){var i=this.snapToGrid(t,e);if(this.parameters.box.width-i[0]>0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y+i[1]).size(this.parameters.box.width-i[0],this.parameters.box.height-i[1])}};break;case"rt":this.calc=function(t,e){var i=this.snapToGrid(t,e,2);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).size(this.parameters.box.width+i[0],this.parameters.box.height-i[1])}};break;case"rb":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+i[0],this.parameters.box.height+i[1])}};break;case"lb":this.calc=function(t,e){var i=this.snapToGrid(t,e,1);if(this.parameters.box.width-i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i,!0),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).size(this.parameters.box.width-i[0],this.parameters.box.height+i[1])}};break;case"t":this.calc=function(t,e){var i=this.snapToGrid(t,e,2);if(this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).height(this.parameters.box.height-i[1])}};break;case"r":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.width+i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+i[0])}};break;case"b":this.calc=function(t,e){var i=this.snapToGrid(t,e,0);if(this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+i[1])}};break;case"l":this.calc=function(t,e){var i=this.snapToGrid(t,e,1);if(this.parameters.box.width-i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).width(this.parameters.box.width-i[0])}};break;case"rot":this.calc=function(t,e){var i=t+this.parameters.p.x,a=e+this.parameters.p.y,r=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),n=Math.atan2(a-this.parameters.box.y-this.parameters.box.height/2,i-this.parameters.box.x-this.parameters.box.width/2),s=this.parameters.rotation+180*(n-r)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(s-s%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(t,e){var i=this.snapToGrid(t,e,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),a=this.el.array().valueOf();a[this.parameters.i][0]=this.parameters.pointCoords[0]+i[0],a[this.parameters.i][1]=this.parameters.pointCoords[1]+i[1],this.el.plot(a)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:t}),SVG.on(window,"touchmove.resize",(function(t){e.update(t||window.event)})),SVG.on(window,"touchend.resize",(function(){e.done()})),SVG.on(window,"mousemove.resize",(function(t){e.update(t||window.event)})),SVG.on(window,"mouseup.resize",(function(){e.done()}))},t.prototype.update=function(t){if(t){var e=this._extractPosition(t),i=this.transformPoint(e.x,e.y),a=i.x-this.parameters.p.x,r=i.y-this.parameters.p.y;this.lastUpdateCall=[a,r],this.calc(a,r),this.el.fire("resizing",{dx:a,dy:r,event:t})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},t.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},t.prototype.snapToGrid=function(t,e,i,a){var r;return void 0!==a?r=[(i+t)%this.options.snapToGrid,(a+e)%this.options.snapToGrid]:(i=null==i?3:i,r=[(this.parameters.box.x+t+(1&i?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+e+(2&i?0:this.parameters.box.height))%this.options.snapToGrid]),t<0&&(r[0]-=this.options.snapToGrid),e<0&&(r[1]-=this.options.snapToGrid),t-=Math.abs(r[0])<this.options.snapToGrid/2?r[0]:r[0]-(t<0?-this.options.snapToGrid:this.options.snapToGrid),e-=Math.abs(r[1])<this.options.snapToGrid/2?r[1]:r[1]-(e<0?-this.options.snapToGrid:this.options.snapToGrid),this.constraintToBox(t,e,i,a)},t.prototype.constraintToBox=function(t,e,i,a){var r,n,s=this.options.constraint||{};return void 0!==a?(r=i,n=a):(r=this.parameters.box.x+(1&i?0:this.parameters.box.width),n=this.parameters.box.y+(2&i?0:this.parameters.box.height)),void 0!==s.minX&&r+t<s.minX&&(t=s.minX-r),void 0!==s.maxX&&r+t>s.maxX&&(t=s.maxX-r),void 0!==s.minY&&n+e<s.minY&&(e=s.minY-n),void 0!==s.maxY&&n+e>s.maxY&&(e=s.maxY-n),[t,e]},t.prototype.checkAspectRatio=function(t,e){if(!this.options.saveAspectRatio)return t;var i=t.slice(),a=this.parameters.box.width/this.parameters.box.height,r=this.parameters.box.width+t[0],n=this.parameters.box.height-t[1],s=r/n;return s<a?(i[1]=r/a-this.parameters.box.height,e&&(i[1]=-i[1])):s>a&&(i[0]=this.parameters.box.width-n*a,e&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(e){return(this.remember("_resizeHandler")||new t(this)).init(e||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var Yt=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new v(this.ctx),this.ctx.axes=new tt(this.ctx),this.ctx.core=new zt(this.ctx.el,this.ctx),this.ctx.config=new H({}),this.ctx.data=new V(this.ctx),this.ctx.grid=new $(this.ctx),this.ctx.graphics=new y(this.ctx),this.ctx.coreUtils=new w(this.ctx),this.ctx.crosshairs=new et(this.ctx),this.ctx.events=new K(this.ctx),this.ctx.exports=new G(this.ctx),this.ctx.localization=new Q(this.ctx),this.ctx.options=new M,this.ctx.responsive=new it(this.ctx),this.ctx.series=new I(this.ctx),this.ctx.theme=new at(this.ctx),this.ctx.formatters=new B(this.ctx),this.ctx.titleSubtitle=new rt(this.ctx),this.ctx.legend=new dt(this.ctx),this.ctx.toolbar=new ut(this.ctx),this.ctx.dimensions=new ht(this.ctx),this.ctx.updateHelpers=new Nt(this.ctx),this.ctx.zoomPanSelection=new ft(this.ctx),this.ctx.w.globals.tooltip=new yt(this.ctx)}}]),t}(),Ft=function(){function t(e){n(this,t),this.ctx=e,this.w=e.w}return o(t,[{key:"clear",value:function(t){var e=t.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:e})}},{key:"killSVG",value:function(t){t.each((function(t,e){this.removeClass("*"),this.off(),this.stop()}),!0),t.ungroup(),t.clear()}},{key:"clearDomElements",value:function(t){var e=this,i=t.isUpdating,a=this.w.globals.dom.Paper.node;a.parentNode&&a.parentNode.parentNode&&!i&&(a.parentNode.parentNode.style.minHeight="unset");var r=this.w.globals.dom.baseEl;r&&this.ctx.eventList.forEach((function(t){r.removeEventListener(t,e.ctx.events.documentEvent)}));var n=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(n.Paper),n.Paper.remove(),n.elWrap=null,n.elGraphical=null,n.elAnnotations=null,n.elLegendWrap=null,n.baseEl=null,n.elGridRect=null,n.elGridRectMask=null,n.elGridRectMarkerMask=null,n.elForecastMask=null,n.elNonForecastMask=null,n.elDefs=null}}]),t}(),Rt=new WeakMap,Ht=function(){function t(e,i){n(this,t),this.opts=i,this.ctx=this,this.w=new W(i).init(),this.el=e,this.w.globals.cuid=m.randomId(),this.w.globals.chartID=this.w.config.chart.id?m.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Yt(this).initModules(),this.create=m.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return o(t,[{key:"render",value:function(){var t=this;return new Promise((function(e,i){if(null!==t.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),t.w.config.chart.id&&Apex._chartInstances.push({id:t.w.globals.chartID,group:t.w.config.chart.group,chart:t}),t.setLocale(t.w.config.chart.defaultLocale);var a=t.w.config.chart.events.beforeMount;if("function"==typeof a&&a(t,t.w),t.events.fireEvent("beforeMount",[t,t.w]),window.addEventListener("resize",t.windowResizeHandler),function(t,e){var i=!1,a=t.getBoundingClientRect();"none"!==t.style.display&&0!==a.width||(i=!0);var r=new ResizeObserver((function(a){i&&e.call(t,a),i=!0}));t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach((function(t){return r.observe(t)})):r.observe(t),Rt.set(e,r)}(t.el.parentNode,t.parentResizeHandler),!t.css){var r=t.el.getRootNode&&t.el.getRootNode(),n=m.is("ShadowRoot",r),s=t.el.ownerDocument,o=s.getElementById("apexcharts-css");!n&&o||(t.css=document.createElement("style"),t.css.id="apexcharts-css",t.css.textContent='.apexcharts-canvas {\n position: relative;\n user-select: none;\n /* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */\n}\n\n\n/* scrollbar is not visible by default for legend, hence forcing the visibility */\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px;\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n}\n\n\n.apexcharts-inner {\n position: relative;\n}\n\n.apexcharts-text tspan {\n font-family: inherit;\n}\n\n.legend-mouseover-inactive {\n transition: 0.15s ease all;\n opacity: 0.20;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0;\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, 0.96);\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, 0.8);\n}\n\n.apexcharts-tooltip * {\n font-family: inherit;\n}\n\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #ECEFF1;\n border-bottom: 1px solid #ddd;\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, 0.7);\n border-bottom: 1px solid #333;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n font-weight: 600;\n margin-left: 5px;\n}\n\n.apexcharts-tooltip-title:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-z-value:empty {\n display: none;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n font-weight: 600;\n}\n\n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-goals-group, \n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n display: flex;\n}\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px;\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0px;\n margin-right: 10px;\n border-radius: 50%;\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px;\n}\n\n.apexcharts-tooltip-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0 !important;\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-box, .apexcharts-custom-tooltip {\n padding: 4px 8px;\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse;\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0;\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: bold;\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px;\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777;\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: bold;\n display: block;\n margin-bottom: 5px;\n}\n\n.apexcharts-xaxistooltip {\n opacity: 0;\n padding: 9px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-left: -6px;\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-left: -7px;\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%;\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%;\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #ECEFF1;\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #ECEFF1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-yaxistooltip {\n opacity: 0;\n padding: 4px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-top: -6px;\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-top: -7px;\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%;\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%;\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1;\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none;\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0;\n}\n\n.apexcharts-selection-rect {\n cursor: move;\n}\n\n.svg_select_boundingRect, .svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n}\n.apexcharts-selection-rect + g .svg_select_boundingRect,\n.apexcharts-selection-rect + g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden;\n}\n\n.apexcharts-selection-rect + g .svg_select_points_l,\n.apexcharts-selection-rect + g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible;\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon,\n.apexcharts-reset-icon,\n.apexcharts-pan-icon,\n.apexcharts-selection-icon,\n.apexcharts-menu-icon,\n.apexcharts-toolbar-custom-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6E8192;\n text-align: center;\n}\n\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-menu-icon svg {\n fill: #6E8192;\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(0.76)\n}\n\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg {\n fill: #f3f4f5;\n}\n\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg {\n fill: #008FFB;\n}\n\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg {\n fill: #333;\n}\n\n.apexcharts-selection-icon,\n.apexcharts-menu-icon {\n position: relative;\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px;\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-reset-icon,\n.apexcharts-menu-icon {\n transform: scale(0.85);\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(0.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px;\n}\n\n.apexcharts-pan-icon {\n transform: scale(0.62);\n position: relative;\n left: 1px;\n top: 0px;\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6E8192;\n stroke-width: 2;\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008FFB;\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333;\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0px 6px 2px 6px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: 0.15s ease all;\n pointer-events: none;\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: 0.15s ease all;\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer;\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee;\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n}\n\n@media screen and (min-width: 768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1;\n }\n}\n\n.apexcharts-datalabel.apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-pie-label,\n.apexcharts-datalabels,\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value {\n cursor: default;\n pointer-events: none;\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: 0.3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease;\n}\n\n.apexcharts-canvas .apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-gridline,\n.apexcharts-annotation-rect,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-line,\n.apexcharts-zoom-rect,\n.apexcharts-toolbar svg,\n.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-radar-series path,\n.apexcharts-radar-series polygon {\n pointer-events: none;\n}\n\n\n/* markers */\n\n.apexcharts-marker {\n transition: 0.15s ease all;\n}\n\n@keyframes opaque {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n\n/* Resize generated styles */\n\n@keyframes resizeanim {\n from {\n opacity: 0;\n }\n to {\n opacity: 0;\n }\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n}\n\n.resize-triggers,\n.resize-triggers>div,\n.contract-trigger:before {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.resize-triggers>div {\n background: #eee;\n overflow: auto;\n}\n\n.contract-trigger:before {\n width: 200%;\n height: 200%;\n}',n?r.prepend(t.css):s.head.appendChild(t.css))}var l=t.create(t.w.config.series,{});if(!l)return e(t);t.mount(l).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(l)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this.w;new Yt(this).initModules();var a=this.w.globals;if(a.noData=!1,a.animationEnded=!1,this.responsive.checkResponsiveConfig(e),i.config.xaxis.convertedCatToNumeric&&new R(i.config).convertCatToNumericXaxis(i.config,this.ctx),null===this.el)return a.animationEnded=!0,null;if(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===a.svgWidth)return a.animationEnded=!0,null;var r=w.checkComboSeries(t);a.comboCharts=r.comboCharts,a.comboBarCount=r.comboBarCount;var n=t.every((function(t){return t.data&&0===t.data.length}));(0===t.length||n)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(t),this.theme.init(),new L(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),a.noData&&a.collapsedSeries.length!==a.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new w(this).getLargestMarkerSize(),this.dimensions.plotCoords();var s=this.core.xySettings();this.grid.createGridMask();var o=this.core.plotChartType(t,s),l=new E(this);l.bringForward(),i.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition();var h={plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}};return{elGraph:o,xyRatios:s,elInner:i.globals.dom.elGraphical,dimensions:h}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(r,n){if(null===i.el)return n(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),"treemap"!==a.config.chart.type&&i.axes.drawAxis(a.config.chart.type,e.xyRatios),i.grid=new $(i);var s=i.grid.drawGrid();i.annotations=new T(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position&&s&&a.globals.dom.elGraphical.add(s.el);var o=new U(t.ctx),l=new J(t.ctx);if(null!==s&&(o.xAxisLabelCorrections(s.xAxisTickWidth),l.setYAxisTextAlignments(),a.config.yaxis.map((function(t,e){-1===a.globals.ignoreYAxisIndexes.indexOf(e)&&l.yAxisTitleRotate(e,t.opposite)}))),"back"===a.config.annotations.position&&(a.globals.dom.Paper.add(a.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),Array.isArray(e.elGraph))for(var h=0;h<e.elGraph.length;h++)a.globals.dom.elGraphical.add(e.elGraph[h]);else a.globals.dom.elGraphical.add(e.elGraph);if("front"===a.config.grid.position&&s&&a.globals.dom.elGraphical.add(s.el),"front"===a.config.xaxis.crosshairs.position&&i.crosshairs.drawXCrosshairs(),"front"===a.config.yaxis[0].crosshairs.position&&i.crosshairs.drawYCrosshairs(),"front"===a.config.annotations.position&&(a.globals.dom.Paper.add(a.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),!a.globals.noData){if(a.config.tooltip.enabled&&!a.globals.noData&&i.w.globals.tooltip.drawTooltip(e.xyRatios),a.globals.axisCharts&&(a.globals.isXNumeric||a.config.xaxis.convertedCatToNumeric||a.globals.isRangeBar))(a.config.chart.zoom.enabled||a.config.chart.selection&&a.config.chart.selection.enabled||a.config.chart.pan&&a.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:e.xyRatios});else{var c=a.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach((function(t){c[t]=!1}))}a.config.chart.toolbar.show&&!a.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}a.globals.memory.methodsToExec.length>0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),r(i)}))}},{key:"destroy",value:function(){var t,e;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,t=this.parentResizeHandler,(e=Rt.get(t))&&(e.disconnect(),Rt.delete(t));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach((function(t,e){t.id===m.escapeString(i)&&Apex._chartInstances.splice(e,1)})),new Ft(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=this.w;return s.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),s.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,r,n)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),r=0;r<a.length;r++)if(null!==t[r]&&void 0!==t[r])for(var n=0;n<t[r].data.length;n++)a[r].data.push(t[r].data[n]);return i.w.config.series=a,e&&(i.w.globals.initialSeries=m.clone(i.w.config.series)),this.update()}},{key:"update",value:function(t){var e=this;return new Promise((function(i,a){new Ft(e.ctx).clear({isUpdating:!0});var r=e.create(e.w.config.series,t);if(!r)return i(e);e.mount(r).then((function(){"function"==typeof e.w.config.chart.events.updated&&e.w.config.chart.events.updated(e,e.w),e.events.fireEvent("updated",[e,e.w]),e.w.globals.isDirty=!0,i(e)})).catch((function(t){a(t)}))}))}},{key:"getSyncedCharts",value:function(){var t=this.getGroupedCharts(),e=[this];return t.length&&(e=[],t.forEach((function(t){e.push(t)}))),e}},{key:"getGroupedCharts",value:function(){var t=this;return Apex._chartInstances.filter((function(t){if(t.group)return!0})).map((function(e){return t.w.config.chart.group===e.group?e.chart:t}))}},{key:"toggleSeries",value:function(t){return this.series.toggleSeries(t)}},{key:"highlightSeriesOnLegendHover",value:function(t,e){return this.series.toggleSeriesOnHover(t,e)}},{key:"showSeries",value:function(t){this.series.showSeries(t)}},{key:"hideSeries",value:function(t){this.series.hideSeries(t)}},{key:"resetSeries",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=new q(this.ctx);return e.getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=new q(this.ctx);return e.getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new G(this.ctx).dataURI(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=m.escapeString(t),i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i<e.length;i++)new t(e[i],JSON.parse(e[i].getAttribute("data-options"))).render()}},{key:"exec",value:function(t,e){var i=this.getChartByID(t);if(i){i.w.globals.isExecCalled=!0;var a=null;if(-1!==i.publicMethods.indexOf(e)){for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];a=i[e].apply(i,n)}return a}}},{key:"merge",value:function(t,e){return m.extend(t,e)}}]),t}();t.exports=Ht}(we,we.exports);var Se=we.exports;const _e=((t,...e)=>{const a=1===t.length?t[0]:e.reduce(((e,i,a)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[a+1]),t[0]);return new r(a,i)})`
:host {
display: block;
}
ha-card {
overflow: hidden;
position: relative;
}
.wrapper {
display: grid;
grid-template-areas: 'header' 'graph';
grid-template-columns: 1fr;
grid-template-rows: min-content 1fr;
}
#graph-wrapper {
height: 100%;
grid-area: graph;
}
#brush {
margin-top: -30px;
}
/* Needed for minimal layout */
svg:not(:root) {
overflow: visible !important;
}
#header {
padding: 8px 16px 0px;
grid-area: header;
}
#header.floating {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
}
#header__title {
color: var(--secondary-text-color);
font-size: 16px;
font-weight: 500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-bottom: 5px;
}
#header__states {
display: flex;
justify-content: space-between;
flex-flow: row wrap;
margin: -5px;
}
#header__states > * {
margin: 5px;
}
#states__state {
flex: 0 0 10%;
position: relative;
}
#header__title {
position: relative;
}
#header__title.actions,
#states__state.actions {
cursor: pointer;
}
#header__title.disabled,
#states__state.disabled {
pointer-events: none;
}
#state__value {
display: table;
white-space: nowrap;
}
#state__value > #state {
font-size: 1.8em;
font-weight: 500;
white-space: nowrap;
}
#state__value > #uom {
font-size: 1em;
font-weight: 400;
opacity: 0.8;
white-space: nowrap;
}
#state__name {
font-size: 0.8em;
font-weight: 300;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
#last_updated {
font-size: 0.63em;
font-weight: 300;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
position: absolute;
bottom: 0px;
right: 4px;
opacity: 0.5;
}
/* Apex Charts Default CSS */
.apexcharts-canvas {
position: relative;
user-select: none;
/* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */
}
/* scrollbar is not visible by default for legend, hence forcing the visibility */
.apexcharts-canvas ::-webkit-scrollbar {
-webkit-appearance: none;
width: 6px;
}
.apexcharts-canvas ::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: rgba(0, 0, 0, 0.5);
box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}
.apexcharts-inner {
position: relative;
}
.apexcharts-text tspan {
font-family: inherit;
}
.legend-mouseover-inactive {
transition: 0.15s ease all;
opacity: 0.2;
}
.apexcharts-series-collapsed {
opacity: 0;
}
.apexcharts-tooltip {
border-radius: 5px;
box-shadow: 2px 2px 6px -4px #999;
cursor: default;
font-size: 14px;
left: 62px;
opacity: 0;
pointer-events: none;
position: absolute;
top: 20px;
display: flex;
flex-direction: column;
overflow: hidden;
white-space: nowrap;
z-index: 12;
transition: 0.15s ease all;
}
.apexcharts-tooltip.apexcharts-active {
opacity: 0.96;
transition: 0.15s ease all;
}
.apexcharts-tooltip.apexcharts-theme-light {
border: 1px solid #e3e3e3;
background: var(--card-background-color);
}
.apexcharts-tooltip.apexcharts-theme-dark {
color: #fff;
background: rgba(30, 30, 30, 0.8);
}
.apexcharts-tooltip * {
font-family: inherit;
}
.apexcharts-tooltip-title {
padding: 6px;
font-size: 15px;
margin-bottom: 4px;
}
.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
background: var(--primary-background-color);
border-bottom: 1px solid #ddd;
}
.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
background: rgba(0, 0, 0, 0.7);
border-bottom: 1px solid #333;
}
.apexcharts-tooltip-text-value,
.apexcharts-tooltip-text-z-value {
display: inline-block;
font-weight: 600;
margin-left: 5px;
}
.apexcharts-tooltip-text-z-label:empty,
.apexcharts-tooltip-text-z-value:empty {
display: none;
}
.apexcharts-tooltip-text-value,
.apexcharts-tooltip-text-z-value {
font-weight: 600;
}
.apexcharts-tooltip-marker {
width: 12px;
height: 12px;
position: relative;
top: 0px;
margin-right: 10px;
border-radius: 50%;
}
.apexcharts-tooltip-series-group {
padding: 0 10px;
display: none;
text-align: left;
justify-content: left;
align-items: center;
}
.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
opacity: 1;
}
.apexcharts-tooltip-series-group.apexcharts-active,
.apexcharts-tooltip-series-group:last-child {
padding-bottom: 4px;
}
.apexcharts-tooltip-series-group-hidden {
opacity: 0;
height: 0;
line-height: 0;
padding: 0 !important;
}
.apexcharts-tooltip-y-group {
padding: 6px 0 5px;
}
.apexcharts-tooltip-candlestick {
padding: 4px 8px;
}
.apexcharts-tooltip-candlestick > div {
margin: 4px 0;
}
.apexcharts-tooltip-candlestick span.value {
font-weight: bold;
}
.apexcharts-tooltip-rangebar {
padding: 5px 8px;
}
.apexcharts-tooltip-rangebar .category {
font-weight: 600;
color: #777;
}
.apexcharts-tooltip-rangebar .series-name {
font-weight: bold;
display: block;
margin-bottom: 5px;
}
.apexcharts-xaxistooltip {
opacity: 0;
padding: 9px 10px;
pointer-events: none;
color: var(--primary-text-color);
font-size: 13px;
text-align: center;
border-radius: 2px;
position: absolute;
z-index: 10;
background: var(--card-background-color);
border: 1px solid #90a4ae;
transition: 0.15s ease all;
}
.apexcharts-xaxistooltip.apexcharts-theme-dark {
background: rgba(0, 0, 0, 0.7);
border: 1px solid rgba(0, 0, 0, 0.5);
color: #fff;
}
.apexcharts-xaxistooltip:after,
.apexcharts-xaxistooltip:before {
left: 50%;
border: solid transparent;
content: ' ';
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.apexcharts-xaxistooltip:after {
border-color: rgba(236, 239, 241, 0);
border-width: 6px;
margin-left: -6px;
}
.apexcharts-xaxistooltip:before {
border-color: rgba(144, 164, 174, 0);
border-width: 7px;
margin-left: -7px;
}
.apexcharts-xaxistooltip-bottom:after,
.apexcharts-xaxistooltip-bottom:before {
bottom: 100%;
}
.apexcharts-xaxistooltip-top:after,
.apexcharts-xaxistooltip-top:before {
top: 100%;
}
.apexcharts-xaxistooltip-bottom:after {
border-bottom-color: #eceff1;
}
.apexcharts-xaxistooltip-bottom:before {
border-bottom-color: #90a4ae;
}
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after {
border-bottom-color: rgba(0, 0, 0, 0.5);
}
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
border-bottom-color: rgba(0, 0, 0, 0.5);
}
.apexcharts-xaxistooltip-top:after {
border-top-color: #eceff1;
}
.apexcharts-xaxistooltip-top:before {
border-top-color: #90a4ae;
}
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after {
border-top-color: rgba(0, 0, 0, 0.5);
}
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
border-top-color: rgba(0, 0, 0, 0.5);
}
.apexcharts-xaxistooltip.apexcharts-active {
opacity: 1;
transition: 0.15s ease all;
}
.apexcharts-yaxistooltip {
opacity: 0;
padding: 4px 10px;
pointer-events: none;
color: var(--primary-text-color);
font-size: 13px;
text-align: center;
border-radius: 2px;
position: absolute;
z-index: 10;
background: var(--card-background-color);
border: 1px solid #90a4ae;
}
.apexcharts-yaxistooltip.apexcharts-theme-dark {
background: rgba(0, 0, 0, 0.7);
border: 1px solid rgba(0, 0, 0, 0.5);
color: #fff;
}
.apexcharts-yaxistooltip:after,
.apexcharts-yaxistooltip:before {
top: 50%;
border: solid transparent;
content: ' ';
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.apexcharts-yaxistooltip:after {
border-color: rgba(236, 239, 241, 0);
border-width: 6px;
margin-top: -6px;
}
.apexcharts-yaxistooltip:before {
border-color: rgba(144, 164, 174, 0);
border-width: 7px;
margin-top: -7px;
}
.apexcharts-yaxistooltip-left:after,
.apexcharts-yaxistooltip-left:before {
left: 100%;
}
.apexcharts-yaxistooltip-right:after,
.apexcharts-yaxistooltip-right:before {
right: 100%;
}
.apexcharts-yaxistooltip-left:after {
border-left-color: #eceff1;
}
.apexcharts-yaxistooltip-left:before {
border-left-color: #90a4ae;
}
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after {
border-left-color: rgba(0, 0, 0, 0.5);
}
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
border-left-color: rgba(0, 0, 0, 0.5);
}
.apexcharts-yaxistooltip-right:after {
border-right-color: #eceff1;
}
.apexcharts-yaxistooltip-right:before {
border-right-color: #90a4ae;
}
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after {
border-right-color: rgba(0, 0, 0, 0.5);
}
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
border-right-color: rgba(0, 0, 0, 0.5);
}
.apexcharts-yaxistooltip.apexcharts-active {
opacity: 1;
}
.apexcharts-yaxistooltip-hidden {
display: none;
}
.apexcharts-xcrosshairs,
.apexcharts-ycrosshairs {
pointer-events: none;
opacity: 0;
transition: 0.15s ease all;
}
.apexcharts-xcrosshairs.apexcharts-active,
.apexcharts-ycrosshairs.apexcharts-active {
opacity: 1;
transition: 0.15s ease all;
}
.apexcharts-ycrosshairs-hidden {
opacity: 0;
}
.apexcharts-selection-rect {
cursor: move;
}
.svg_select_boundingRect,
.svg_select_points_rot {
pointer-events: none;
opacity: 0;
visibility: hidden;
}
.apexcharts-selection-rect + g .svg_select_boundingRect,
.apexcharts-selection-rect + g .svg_select_points_rot {
opacity: 0;
visibility: hidden;
}
.apexcharts-selection-rect + g .svg_select_points_l,
.apexcharts-selection-rect + g .svg_select_points_r {
cursor: ew-resize;
opacity: 1;
visibility: visible;
}
.svg_select_points {
fill: #efefef;
stroke: #333;
rx: 2;
}
.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
cursor: crosshair;
}
.apexcharts-svg.apexcharts-zoomable.hovering-pan {
cursor: move;
}
.apexcharts-zoom-icon,
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon,
.apexcharts-reset-icon,
.apexcharts-pan-icon,
.apexcharts-selection-icon,
.apexcharts-menu-icon,
.apexcharts-toolbar-custom-icon {
cursor: pointer;
width: 20px;
height: 20px;
line-height: 24px;
color: var(--primary-text-color);
text-align: center;
}
.apexcharts-zoom-icon svg,
.apexcharts-zoomin-icon svg,
.apexcharts-zoomout-icon svg,
.apexcharts-reset-icon svg,
.apexcharts-menu-icon svg {
fill: var(--primary-text-color);
}
.apexcharts-selection-icon svg {
fill: #444;
transform: scale(0.76);
}
.apexcharts-theme-dark .apexcharts-zoom-icon svg,
.apexcharts-theme-dark .apexcharts-zoomin-icon svg,
.apexcharts-theme-dark .apexcharts-zoomout-icon svg,
.apexcharts-theme-dark .apexcharts-reset-icon svg,
.apexcharts-theme-dark .apexcharts-pan-icon svg,
.apexcharts-theme-dark .apexcharts-selection-icon svg,
.apexcharts-theme-dark .apexcharts-menu-icon svg,
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg {
fill: #f3f4f5;
}
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg {
fill: var(--primary-color);
}
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg,
.apexcharts-theme-light .apexcharts-reset-icon:hover svg,
.apexcharts-theme-light .apexcharts-menu-icon:hover svg {
fill: var(--primary-color);
}
.apexcharts-selection-icon,
.apexcharts-menu-icon {
position: relative;
}
.apexcharts-reset-icon {
margin-left: 5px;
}
.apexcharts-zoom-icon,
.apexcharts-reset-icon,
.apexcharts-menu-icon {
transform: scale(0.85);
}
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
transform: scale(0.7);
}
.apexcharts-zoomout-icon {
margin-right: 3px;
}
.apexcharts-pan-icon {
transform: scale(0.62);
position: relative;
left: 1px;
top: 0px;
}
.apexcharts-pan-icon svg {
fill: var(--primary-text-color);
stroke: rgba(0, 0, 0, 0);
stroke-width: 2;
}
.apexcharts-pan-icon.apexcharts-selected svg {
fill: var(--primary-color);
}
.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
stroke: var(--primary-color);
}
.apexcharts-toolbar {
position: absolute;
z-index: 11;
max-width: 176px;
text-align: right;
border-radius: 3px;
padding: 0px 6px 2px 6px;
display: flex;
justify-content: space-between;
align-items: center;
opacity: 0.5;
}
.apexcharts-menu {
background: var(--primary-background-color);
position: absolute;
top: 100%;
border: 1px solid #ddd;
border-radius: 3px;
padding: 3px;
right: 10px;
opacity: 0;
min-width: 110px;
transition: 0.15s ease all;
pointer-events: none;
}
.apexcharts-menu.apexcharts-menu-open {
opacity: 1;
pointer-events: all;
transition: 0.15s ease all;
}
.apexcharts-menu-item {
padding: 6px 7px;
font-size: 12px;
cursor: pointer;
}
.apexcharts-theme-light .apexcharts-menu-item:hover {
background: var(--primary-color);
}
.apexcharts-theme-dark .apexcharts-menu {
background: rgba(0, 0, 0, 0.7);
color: #fff;
}
@media screen and (min-width: 768px) {
.apexcharts-canvas:hover .apexcharts-toolbar {
opacity: 1;
}
}
.apexcharts-datalabel.apexcharts-element-hidden {
opacity: 0;
}
.apexcharts-pie-label,
.apexcharts-datalabels,
.apexcharts-datalabel,
.apexcharts-datalabel-label,
.apexcharts-datalabel-value {
cursor: default;
pointer-events: none;
}
.apexcharts-pie-label-delay {
opacity: 0;
animation-name: opaque;
animation-duration: 0.3s;
animation-fill-mode: forwards;
animation-timing-function: ease;
}
.apexcharts-canvas .apexcharts-element-hidden {
opacity: 0;
}
.apexcharts-hide .apexcharts-series-points {
opacity: 0;
}
.apexcharts-gridline,
.apexcharts-annotation-rect,
.apexcharts-tooltip .apexcharts-marker,
.apexcharts-area-series .apexcharts-area,
.apexcharts-line,
.apexcharts-zoom-rect,
.apexcharts-toolbar svg,
.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,
.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,
.apexcharts-radar-series path,
.apexcharts-radar-series polygon {
pointer-events: none;
}
/* markers */
.apexcharts-marker {
transition: 0.15s ease all;
}
@keyframes opaque {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
/* Resize generated styles */
@keyframes resizeanim {
from {
opacity: 0;
}
to {
opacity: 0;
}
}
.resize-triggers {
animation: 1ms resizeanim;
visibility: hidden;
opacity: 0;
}
.resize-triggers,
.resize-triggers > div,
.contract-trigger:before {
content: ' ';
display: block;
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
overflow: hidden;
}
.resize-triggers > div {
background: #eee;
overflow: auto;
}
.contract-trigger:before {
width: 200%;
height: 200%;
}
/* spinner */
#spinner-wrapper {
position: absolute;
top: 5px;
right: 5px;
height: 20px;
width: 20px;
opacity: 0.5;
}
#spinner {
position: relative;
}
.lds-ring,
.lds-ring div {
box-sizing: border-box;
}
.lds-ring {
display: inline-block;
position: relative;
width: 20px;
height: 20px;
}
.lds-ring div {
box-sizing: border-box;
display: block;
position: absolute;
width: 16px;
height: 16px;
margin: 2px;
border: 2px solid var(--primary-text-color);
border-radius: 50%;
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: var(--primary-text-color) transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
animation-delay: -0.15s;
}
@keyframes lds-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
`,ke={chart:{offsetY:15,parentHeightOffset:0},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},axisBorder:{show:!1},axisTicks:{show:!1},crosshairs:{show:!0},tooltip:{enabled:!1}},yaxis:{show:!1,showAlways:!0,tooltip:{enabled:!0}},legend:{position:"top"}};var Ae={months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],shortMonths:["Gen.","Febr.","Març","Abr.","Maig","Juny","Jul.","Ag.","Set.","Oct.","Nov.","Des."],days:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"],shortDays:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],toolbar:{exportToSVG:"Descarregar SVG",exportToPNG:"Descarregar PNG",exportToCSV:"Descarregar CSV",menu:"Menú",selection:"Seleccionar",selectionZoom:"Seleccionar Zoom",zoomIn:"Augmentar",zoomOut:"Disminuir",pan:"Navegació",reset:"Reiniciar Zoom"}},Ce={name:"ca",options:Ae},Me=Object.freeze({__proto__:null,name:"ca",options:Ae,default:Ce}),Te={months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],shortMonths:["Led","Úno","Bře","Dub","Kvě","Čvn","Čvc","Srp","Zář","Říj","Lis","Pro"],days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota"],shortDays:["Ne","Po","Út","St","Čt","Pá","So"],toolbar:{exportToSVG:"Stáhnout SVG",exportToPNG:"Stáhnout PNG",exportToCSV:"Stáhnout CSV",menu:"Menu",selection:"Vybrat",selectionZoom:"Zoom: Vybrat",zoomIn:"Zoom: Přiblížit",zoomOut:"Zoom: Oddálit",pan:"Přesouvat",reset:"Resetovat"}},Pe={name:"cs",options:Te},Le=Object.freeze({__proto__:null,name:"cs",options:Te,default:Pe}),De={months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],toolbar:{exportToSVG:"SVG speichern",exportToPNG:"PNG speichern",exportToCSV:"CSV speichern",menu:"Menü",selection:"Auswahl",selectionZoom:"Auswahl vergrößern",zoomIn:"Vergrößern",zoomOut:"Verkleinern",pan:"Verschieben",reset:"Zoom zurücksetzen"}},Ee={name:"de",options:De},Oe=Object.freeze({__proto__:null,name:"de",options:De,default:Ee}),Ie={months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],shortMonths:["Ιαν","Φευ","Μαρ","Απρ","Μάι","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],days:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],shortDays:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],toolbar:{exportToSVG:"Λήψη SVG",exportToPNG:"Λήψη PNG",exportToCSV:"Λήψη CSV",menu:"Menu",selection:"Επιλογή",selectionZoom:"Μεγένθυση βάση επιλογής",zoomIn:"Μεγένθυνση",zoomOut:"Σμίκρυνση",pan:"Μετατόπιση",reset:"Επαναφορά μεγένθυνσης"}},ze={name:"el",options:Ie},Ne=Object.freeze({__proto__:null,name:"el",options:Ie,default:ze}),Ye={months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}},Fe={name:"en",options:Ye},Re=Object.freeze({__proto__:null,name:"en",options:Ye,default:Fe}),He={months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],shortMonths:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],shortDays:["Dom","Lun","Mar","Mie","Jue","Vie","Sab"],toolbar:{exportToSVG:"Descargar SVG",exportToPNG:"Descargar PNG",exportToCSV:"Descargar CSV",menu:"Menu",selection:"Seleccionar",selectionZoom:"Seleccionar Zoom",zoomIn:"Aumentar",zoomOut:"Disminuir",pan:"Navegación",reset:"Reiniciar Zoom"}},Xe={name:"es",options:He},We=Object.freeze({__proto__:null,name:"es",options:He,default:Xe}),Ve={months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],shortMonths:["Tammi","Helmi","Maalis","Huhti","Touko","Kesä","Heinä","Elo","Syys","Loka","Marras","Joulu"],days:["Sunnuntai","Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai"],shortDays:["Su","Ma","Ti","Ke","To","Pe","La"],toolbar:{exportToSVG:"Lataa SVG",exportToPNG:"Lataa PNG",exportToCSV:"Lataa CSV",menu:"Valikko",selection:"Valinta",selectionZoom:"Valinnan zoomaus",zoomIn:"Lähennä",zoomOut:"Loitonna",pan:"Panoroi",reset:"Nollaa zoomaus"}},Be={name:"fi",options:Ve},je=Object.freeze({__proto__:null,name:"fi",options:Ve,default:Be}),Ge={months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juill.","août","sept.","oct.","nov.","déc."],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],toolbar:{exportToSVG:"Télécharger au format SVG",exportToPNG:"Télécharger au format PNG",exportToCSV:"Télécharger au format CSV",menu:"Menu",selection:"Sélection",selectionZoom:"Sélection et zoom",zoomIn:"Zoomer",zoomOut:"Dézoomer",pan:"Navigation",reset:"Réinitialiser le zoom"}},Ue={name:"fr",options:Ge},$e=Object.freeze({__proto__:null,name:"fr",options:Ge,default:Ue}),Ze={months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],shortMonths:["ינו׳","פבר׳","מרץ","אפר׳","מאי","יוני","יולי","אוג׳","ספט׳","אוק׳","נוב׳","דצמ׳"],days:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],shortDays:["א׳","ב׳","ג׳","ד׳","ה׳","ו׳","ש׳"],toolbar:{exportToSVG:"הורד SVG",exportToPNG:"הורד PNG",exportToCSV:"הורד CSV",menu:"תפריט",selection:"בחירה",selectionZoom:"זום בחירה",zoomIn:"הגדלה",zoomOut:"הקטנה",pan:"הזזה",reset:"איפוס תצוגה"}},qe={name:"he",options:Ze},Je=Object.freeze({__proto__:null,name:"he",options:Ze,default:qe}),Ke={months:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितंबर","अक्टूबर","नवंबर","दिसंबर"],shortMonths:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितंबर","अक्टूबर","नवंबर","दिसंबर"],days:["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],shortDays:["रवि","सोम","मंगल","बुध","गुरु","शुक्र","शनि"],toolbar:{exportToSVG:"निर्यात SVG",exportToPNG:"निर्यात PNG",exportToCSV:"निर्यात CSV",menu:"सूची",selection:"चयन",selectionZoom:"ज़ूम करना",zoomIn:"ज़ूम इन",zoomOut:"ज़ूम आउट",pan:"पैनिंग",reset:"फिर से कायम करना"}},Qe={name:"hi",options:Ke},ti=Object.freeze({__proto__:null,name:"hi",options:Ke,default:Qe}),ei={months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],shortMonths:["Sij","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],days:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"],shortDays:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],toolbar:{exportToSVG:"Preuzmi SVG",exportToPNG:"Preuzmi PNG",exportToCSV:"Preuzmi CSV",menu:"Izbornik",selection:"Odabir",selectionZoom:"Odabirno povećanje",zoomIn:"Uvećajte prikaz",zoomOut:"Umanjite prikaz",pan:"Pomicanje",reset:"Povratak na zadani prikaz"}},ii={name:"hr",options:ei},ai=Object.freeze({__proto__:null,name:"hr",options:ei,default:ii}),ri={months:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"],shortMonths:["Հնվ","Փտվ","Մրտ","Ապր","Մյս","Հնս","Հլիս","Օգս","Սեպ","Հոկ","Նոյ","Դեկ"],days:["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","Ուրբաթ","Շաբաթ"],shortDays:["Կիր","Երկ","Երք","Չրք","Հնգ","Ուրբ","Շբթ"],toolbar:{exportToSVG:"Բեռնել SVG",exportToPNG:"Բեռնել PNG",exportToCSV:"Բեռնել CSV",menu:"Մենյու",selection:"Ընտրված",selectionZoom:"Ընտրված հատվածի խոշորացում",zoomIn:"Խոշորացնել",zoomOut:"Մանրացնել",pan:"Տեղափոխում",reset:"Բերել սկզբնական վիճակի"}},ni={name:"hy",options:ri},si=Object.freeze({__proto__:null,name:"hy",options:ri,default:ni}),oi={months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],shortMonths:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],days:["Minggu","Senin","Selasa","Rabu","kamis","Jumat","Sabtu"],shortDays:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],toolbar:{exportToSVG:"Unduh SVG",exportToPNG:"Unduh PNG",exportToCSV:"Unduh CSV",menu:"Menu",selection:"Pilihan",selectionZoom:"Perbesar Pilihan",zoomIn:"Perbesar",zoomOut:"Perkecil",pan:"Geser",reset:"Atur Ulang Zoom"}},li={name:"id",options:oi},hi=Object.freeze({__proto__:null,name:"id",options:oi,default:li}),ci={months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],shortMonths:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],shortDays:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],toolbar:{exportToSVG:"Scarica SVG",exportToPNG:"Scarica PNG",exportToCSV:"Scarica CSV",menu:"Menu",selection:"Selezione",selectionZoom:"Seleziona Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Sposta",reset:"Reimposta Zoom"}},di={name:"it",options:ci},ui=Object.freeze({__proto__:null,name:"it",options:ci,default:di}),fi={months:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"],shortMonths:["იან","თებ","მარ","აპრ","მაი","ივნ","ივლ","აგვ","სექ","ოქტ","ნოე","დეკ"],days:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],shortDays:["კვი","ორშ","სამ","ოთხ","ხუთ","პარ","შაბ"],toolbar:{exportToSVG:"გადმოქაჩე SVG",exportToPNG:"გადმოქაჩე PNG",exportToCSV:"გადმოქაჩე CSV",menu:"მენიუ",selection:"არჩევა",selectionZoom:"არჩეულის გადიდება",zoomIn:"გადიდება",zoomOut:"დაპატარაება",pan:"გადაჩოჩება",reset:"გადიდების გაუქმება"}},pi={name:"ka",options:fi},gi=Object.freeze({__proto__:null,name:"ka",options:fi,default:pi}),xi={months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],shortDays:["일","월","화","수","목","금","토"],toolbar:{exportToSVG:"SVG 다운로드",exportToPNG:"PNG 다운로드",exportToCSV:"CSV 다운로드",menu:"메뉴",selection:"선택",selectionZoom:"선택영역 확대",zoomIn:"확대",zoomOut:"축소",pan:"패닝",reset:"원래대로"}},mi={name:"ko",options:xi},vi=Object.freeze({__proto__:null,name:"ko",options:xi,default:mi}),bi={months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],shortMonths:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd"],days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis"],shortDays:["Sk","Per","An","Tr","Kt","Pn","Št"],toolbar:{exportToSVG:"Atsisiųsti SVG",exportToPNG:"Atsisiųsti PNG",exportToCSV:"Atsisiųsti CSV",menu:"Menu",selection:"Pasirinkimas",selectionZoom:"Zoom: Pasirinkimas",zoomIn:"Zoom: Priartinti",zoomOut:"Zoom: Atitolinti",pan:"Perkėlimas",reset:"Atstatyti"}},yi={name:"lt",options:bi},wi=Object.freeze({__proto__:null,name:"lt",options:bi,default:yi}),Si={months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],shortMonths:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],shortDays:["Sø","Ma","Ti","On","To","Fr","Lø"],toolbar:{exportToSVG:"Last ned SVG",exportToPNG:"Last ned PNG",exportToCSV:"Last ned CSV",menu:"Menu",selection:"Velg",selectionZoom:"Zoom: Velg",zoomIn:"Zoome inn",zoomOut:"Zoome ut",pan:"Skyving",reset:"Start på nytt"}},_i={name:"nb",options:Si},ki=Object.freeze({__proto__:null,name:"nb",options:Si,default:_i}),Ai={months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],shortMonths:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"],shortDays:["Zo","Ma","Di","Wo","Do","Vr","Za"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selectie",selectionZoom:"Zoom selectie",zoomIn:"Zoom in",zoomOut:"Zoom out",pan:"Verplaatsen",reset:"Standaardwaarden"}},Ci={name:"nl",options:Ai},Mi=Object.freeze({__proto__:null,name:"nl",options:Ai,default:Ci}),Ti={months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],shortMonths:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],shortDays:["Nd","Pn","Wt","Śr","Cz","Pt","Sb"],toolbar:{exportToSVG:"Pobierz SVG",exportToPNG:"Pobierz PNG",exportToCSV:"Pobierz CSV",menu:"Menu",selection:"Wybieranie",selectionZoom:"Zoom: Wybieranie",zoomIn:"Zoom: Przybliż",zoomOut:"Zoom: Oddal",pan:"Przesuwanie",reset:"Resetuj"}},Pi={name:"pl",options:Ti},Li=Object.freeze({__proto__:null,name:"pl",options:Ti,default:Pi}),Di={months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],toolbar:{exportToSVG:"Baixar SVG",exportToPNG:"Baixar PNG",exportToCSV:"Baixar CSV",menu:"Menu",selection:"Selecionar",selectionZoom:"Selecionar Zoom",zoomIn:"Aumentar",zoomOut:"Diminuir",pan:"Navegação",reset:"Reiniciar Zoom"}},Ei={name:"pt-br",options:Di},Oi=Object.freeze({__proto__:null,name:"pt-br",options:Di,default:Ei}),Ii={months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ag","Set","Out","Nov","Dez"],days:["Domingo","Segunda-feira","Terça-feira","Quarta-feira","Quinta-feira","Sexta-feira","Sábado"],shortDays:["Do","Se","Te","Qa","Qi","Sx","Sa"],toolbar:{exportToSVG:"Baixar SVG",exportToPNG:"Baixar PNG",exportToCSV:"Baixar CSV",menu:"Menu",selection:"Selecionar",selectionZoom:"Zoom: Selecionar",zoomIn:"Zoom: Aumentar",zoomOut:"Zoom: Diminuir",pan:"Deslocamento",reset:"Redefinir"}},zi={name:"pt",options:Ii},Ni=Object.freeze({__proto__:null,name:"pt",options:Ii,default:zi}),Yi={months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],shortMonths:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],days:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"],shortDays:["Ned","Pon","Uto","Sre","Čet","Pet","Sub"],toolbar:{exportToSVG:"Preuzmi SVG",exportToPNG:"Preuzmi PNG",exportToCSV:"Preuzmi CSV",menu:"Meni",selection:"Odabir",selectionZoom:"Odabirno povećanje",zoomIn:"Uvećajte prikaz",zoomOut:"Umanjite prikaz",pan:"Pomeranje",reset:"Resetuj prikaz"}},Fi={name:"rs",options:Yi},Ri=Object.freeze({__proto__:null,name:"rs",options:Yi,default:Fi}),Hi={months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],shortMonths:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],shortDays:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],toolbar:{exportToSVG:"Сохранить SVG",exportToPNG:"Сохранить PNG",exportToCSV:"Сохранить CSV",menu:"Меню",selection:"Выбор",selectionZoom:"Выбор с увеличением",zoomIn:"Увеличить",zoomOut:"Уменьшить",pan:"Перемещение",reset:"Сбросить увеличение"}},Xi={name:"ru",options:Hi},Wi=Object.freeze({__proto__:null,name:"ru",options:Hi,default:Xi}),Vi={months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],shortMonths:["Jan","Feb","Mar","Apr","Maj","Juni","Juli","Aug","Sep","Okt","Nov","Dec"],days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],shortDays:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],toolbar:{exportToSVG:"Ladda SVG",exportToPNG:"Ladda PNG",exportToCSV:"Ladda CSV",menu:"Meny",selection:"Selektion",selectionZoom:"Val av zoom",zoomIn:"Zooma in",zoomOut:"Zooma ut",pan:"Panorering",reset:"Återställ zoomning"}},Bi={name:"se",options:Vi},ji=Object.freeze({__proto__:null,name:"se",options:Vi,default:Bi}),Gi={months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],shortMonths:["Jan","Feb","Mar","Apr","Máj","Jún","Júl","Aug","Sep","Okt","Nov","Dec"],days:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"],shortDays:["Ne","Po","Ut","St","Št","Pi","So"],toolbar:{exportToSVG:"Stiahnuť SVG",exportToPNG:"Stiahnuť PNG",exportToCSV:"Stiahnuť CSV",menu:"Menu",selection:"Vyberanie",selectionZoom:"Zoom: Vyberanie",zoomIn:"Zoom: Priblížiť",zoomOut:"Zoom: Vzdialiť",pan:"Presúvanie",reset:"Resetovať"}},Ui={name:"sk",options:Gi},$i=Object.freeze({__proto__:null,name:"sk",options:Gi,default:Ui}),Zi={months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","Septemer","Oktober","November","December"],shortMonths:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"],shortDays:["Ne","Po","To","Sr","Če","Pe","So"],toolbar:{exportToSVG:"Prenesi SVG",exportToPNG:"Prenesi PNG",exportToCSV:"Prenesi CSV",menu:"Menu",selection:"Izbiranje",selectionZoom:"Zoom: Izbira",zoomIn:"Zoom: Približaj",zoomOut:"Zoom: Oddalji",pan:"Pomikanje",reset:"Resetiraj"}},qi={name:"sl",options:Zi},Ji=Object.freeze({__proto__:null,name:"sl",options:Zi,default:qi}),Ki={months:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],shortMonths:["Jan","Shk","Mar","Pr","Maj","Qer","Korr","Gush","Sht","Tet","Nën","Dhj"],days:["e Dielë","e Hënë","e Martë","e Mërkurë","e Enjte","e Premte","e Shtunë"],shortDays:["Die","Hën","Mar","Mër","Enj","Pre","Sht"],toolbar:{exportToSVG:"Shkarko SVG",exportToPNG:"Shkarko PNG",exportToCSV:"Shkarko CSV",menu:"Menu",selection:"Seleksiono",selectionZoom:"Seleksiono Zmadhim",zoomIn:"Zmadho",zoomOut:"Zvogëlo",pan:"Spostoje",reset:"Rikthe dimensionin"}},Qi={name:"sq",options:Ki},ta=Object.freeze({__proto__:null,name:"sq",options:Ki,default:Qi}),ea={months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],shortMonths:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],shortDays:["อา","จ","อ","พ","พฤ","ศ","ส"],toolbar:{exportToSVG:"ดาวน์โหลด SVG",exportToPNG:"ดาวน์โหลด PNG",exportToCSV:"ดาวน์โหลด CSV",menu:"เมนู",selection:"เลือก",selectionZoom:"เลือกจุดที่จะซูม",zoomIn:"ซูมเข้า",zoomOut:"ซูมออก",pan:"ปรากฎว่า",reset:"รีเซ็ตการซูม"}},ia={name:"th",options:ea},aa=Object.freeze({__proto__:null,name:"th",options:ea,default:ia}),ra={months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],shortMonths:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],shortDays:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],toolbar:{exportToSVG:"SVG İndir",exportToPNG:"PNG İndir",exportToCSV:"CSV İndir",menu:"Menü",selection:"Seçim",selectionZoom:"Seçim Yakınlaştır",zoomIn:"Yakınlaştır",zoomOut:"Uzaklaştır",pan:"Kaydır",reset:"Yakınlaştırmayı Sıfırla"}},na={name:"tr",options:ra},sa=Object.freeze({__proto__:null,name:"tr",options:ra,default:na}),oa={months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],shortMonths:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],days:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"],shortDays:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],toolbar:{exportToSVG:"Зберегти SVG",exportToPNG:"Зберегти PNG",exportToCSV:"Зберегти CSV",menu:"Меню",selection:"Вибір",selectionZoom:"Вибір із збільшенням",zoomIn:"Збільшити",zoomOut:"Зменшити",pan:"Переміщення",reset:"Скинути збільшення"}},la={name:"ua",options:oa},ha=Object.freeze({__proto__:null,name:"ua",options:oa,default:la}),ca={months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortMonths:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],days:["星期天","星期一","星期二","星期三","星期四","星期五","星期六"],shortDays:["周日","周一","周二","周三","周四","周五","周六"],toolbar:{exportToSVG:"下载 SVG",exportToPNG:"下载 PNG",exportToCSV:"下载 CSV",menu:"菜单",selection:"选择",selectionZoom:"选择缩放",zoomIn:"放大",zoomOut:"缩小",pan:"平移",reset:"重置缩放"}},da={name:"zh-cn",options:ca},ua=Object.freeze({__proto__:null,name:"zh-cn",options:ca,default:da});function fa(){return{ca:Me,cs:Le,de:Oe,el:Ne,en:Re,es:We,fi:je,fr:$e,he:Je,hi:ti,hr:ai,hy:si,id:hi,it:ui,ka:gi,ko:vi,lt:wi,nb:ki,nl:Mi,pl:Li,"pt-br":Oi,pt:Ni,rs:Ri,ru:Wi,se:ji,sk:$i,sl:Ji,sq:ta,th:aa,tr:sa,ua:ha,"zh-cn":ua}}function pa(){return Re}function ga(t,e){return(e?t.series_in_brush:t.series_in_graph).map((t=>void 0!==t.opacity?t.opacity:"area"===t.type?.7:1))}function xa(t,e,i){const a=i?t.series_in_brush:t.series_in_graph;return te.includes(t.chart_type)?a.map(((t,i)=>({name:ne(i,a,void 0,null==e?void 0:e.states[t.entity]),type:t.type,data:[]}))):[]}function ma(t,e){return te.includes(t.chart_type)?[]:t.series_in_graph.map(((i,a)=>ne(a,t.series_in_graph,void 0,null==e?void 0:e.states[i.entity])))}function va(t,e){if(te.includes(t.chart_type)){return{type:"datetime",labels:{datetimeUTC:!1,datetimeFormatter:ya(ve(t,e))}}}return{}}function ba(t){var e;return Array.isArray(null===(e=t.apex_config)||void 0===e?void 0:e.yaxis)||t.yaxis?void 0:{decimalsInFloat:1}}function ya(t){return t?{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"hh:mm tt",minute:"hh:mm:ss tt"}:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss"}}function wa(t,e){var i,a,r,n;if(null===(r=null===(a=null===(i=t.apex_config)||void 0===i?void 0:i.tooltip)||void 0===a?void 0:a.x)||void 0===r?void 0:r.format)return;let s;const o=t.locale||(null==e?void 0:e.language)||"en";return s=ve(t,e)?{hour12:!0}:{hourCycle:"h23"},Gt(t.graph_span)<864e5&&!(null===(n=t.span)||void 0===n?void 0:n.offset)?function(t,e,i,a=s){return new Intl.DateTimeFormat(o,Object.assign({hour:"numeric",minute:"numeric",second:"numeric"},a)).format(t)}:function(t,e,i,a=s){return new Intl.DateTimeFormat(o,Object.assign({year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},a)).format(t)}}function Sa(t,e){return function(i,a,r=t,n=e){var s,o,l;let h=i;(null===(s=r.series_in_graph[a.seriesIndex])||void 0===s?void 0:s.invert)&&h&&(h=-h),(null===(o=r.series_in_graph[a.seriesIndex])||void 0===o?void 0:o.show.as_duration)||(h=ye(h,null==e?void 0:e.locale,r.series_in_graph[a.seriesIndex].float_precision));const c=se(a.seriesIndex,r.series_in_graph,void 0,null==n?void 0:n.states[r.series_in_graph[a.seriesIndex].entity]);return(null===(l=r.series_in_graph[a.seriesIndex])||void 0===l?void 0:l.show.as_duration)?[`<strong>${ue(h,r.series_in_graph[a.seriesIndex].show.as_duration)}</strong>`]:[`<strong>${h} ${c}</strong>`]}}function _a(t){return!te.includes(t.chart_type)||t.series_in_graph.some((t=>t.show.datalabels))}function ka(t,e,i){return"pie"===t.chart_type||"donut"===t.chart_type?function(a,r,n=e,s=t,o=i){var l;return!1!==s.series_in_graph[r.seriesIndex].show.datalabels?"percent"===s.series_in_graph[r.seriesIndex].show.datalabels?ye(a,null==o?void 0:o.locale,s.series_in_graph[r.seriesIndex].float_precision):ye(null===(l=null==n?void 0:n[s.series_in_graph[r.seriesIndex].index])||void 0===l?void 0:l.lastState,null==o?void 0:o.locale,s.series_in_graph[r.seriesIndex].float_precision):""}:function(e,a,r=t,n=i){var s;if("total"===r.series_in_graph[a.seriesIndex].show.datalabels)return ye(a.w.globals.stackedSeriesTotals[a.dataPointIndex],null==n?void 0:n.locale,r.series_in_graph[a.seriesIndex].float_precision);if(null===e)return;let o=e;return(null===(s=r.series_in_graph[a.seriesIndex])||void 0===s?void 0:s.invert)&&o&&(o=-o),ye(o,null==n?void 0:n.locale,r.series_in_graph[a.seriesIndex].float_precision)}}function Aa(t,e){return"radialBar"===t.chart_type?{track:{background:"rgba(128, 128, 128, 0.2)"},dataLabels:{value:{formatter:function(i,a,r=t,n=e){var s,o;const l=null===(o=null===(s=null==a?void 0:a.config)||void 0===s?void 0:s.series)||void 0===o?void 0:o.findIndex((t=>parseFloat(i)===t));return-1!=l?ye(i,null==n?void 0:n.locale,r.series_in_graph[l].float_precision)+"%":i}}}}:{}}function Ca(t,e){return function(i,a,r=t,n=e){var s,o,l;const h=ne(a.seriesIndex,r.series_in_graph,void 0,null==n?void 0:n.states[r.series_in_graph[a.seriesIndex].entity]);if(r.series_in_graph[a.seriesIndex].show.legend_value){let e=te.includes(t.chart_type)?a.w.globals.series[a.seriesIndex].slice(-1)[0]:a.w.globals.series[a.seriesIndex];(null===(s=r.series_in_graph[a.seriesIndex])||void 0===s?void 0:s.invert)&&e&&(e=-e),(null===(o=r.series_in_graph[a.seriesIndex])||void 0===o?void 0:o.show.as_duration)||(e=ye(e,null==n?void 0:n.locale,r.series_in_graph[a.seriesIndex].float_precision));const i="radialBar"===t.chart_type?"%":se(a.seriesIndex,r.series_in_graph,void 0,null==n?void 0:n.states[r.series_in_graph[a.seriesIndex].entity]);let c="";return c=null==e?`<strong>N/A ${i}</strong>`:(null===(l=r.series_in_graph[a.seriesIndex])||void 0===l?void 0:l.show.as_duration)?`<strong>${ue(e,r.series_in_graph[a.seriesIndex].show.as_duration)}</strong>`:`<strong>${e} ${i}</strong>`,[h+":",c]}return[h]}}function Ma(t,e){return(e?t.series_in_brush:t.series_in_graph).map((t=>t.curve||"smooth"))}function Ta(t){return t.series_in_graph.flatMap(((t,e)=>t.show.datalabels?[e]:[]))}function Pa(t,e){var i,a,r,n;if(void 0!==t.chart_type&&"line"!==t.chart_type)return void 0===(null===(a=null===(i=t.apex_config)||void 0===i?void 0:i.stroke)||void 0===a?void 0:a.width)?3:null===(n=null===(r=t.apex_config)||void 0===r?void 0:r.stroke)||void 0===n?void 0:n.width;return(e?t.series_in_brush:t.series_in_graph).map((t=>void 0!==t.stroke_width?t.stroke_width:[void 0,"line","area"].includes(t.type)?5:0))}function La(t,e){var i,a,r,n,s,o;if(null===(i=t.experimental)||void 0===i?void 0:i.color_threshold){return(e?t.series_in_brush:t.series_in_graph).map((e=>!ee.includes(t.chart_type)&&"column"!==e.type&&e.color_threshold&&e.color_threshold.length>0?"gradient":"solid"))}return e?(null===(n=null===(r=null===(a=t.brush)||void 0===a?void 0:a.apex_config)||void 0===r?void 0:r.fill)||void 0===n?void 0:n.type)||"solid":(null===(o=null===(s=t.apex_config)||void 0===s?void 0:s.fill)||void 0===o?void 0:o.type)||"solid"}function Da(t){const e=eval;return Object.keys(t).forEach((i=>{"string"==typeof t[i]&&t[i].trim().startsWith("EVAL:")&&(t[i]=e(`(${t[i].trim().slice(5)})`)),"object"==typeof t[i]&&(t[i]=Da(t[i]))})),t}var Ea={exports:{}},Oa=Ea.exports=function(t){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function i(t,e){var i=t[0],a=t[1],r=t[2],n=t[3];a=((a+=((r=((r+=((n=((n+=((i=((i+=(a&r|~a&n)+e[0]-680876936|0)<<7|i>>>25)+a|0)&a|~i&r)+e[1]-389564586|0)<<12|n>>>20)+i|0)&i|~n&a)+e[2]+606105819|0)<<17|r>>>15)+n|0)&n|~r&i)+e[3]-1044525330|0)<<22|a>>>10)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a&r|~a&n)+e[4]-176418897|0)<<7|i>>>25)+a|0)&a|~i&r)+e[5]+1200080426|0)<<12|n>>>20)+i|0)&i|~n&a)+e[6]-1473231341|0)<<17|r>>>15)+n|0)&n|~r&i)+e[7]-45705983|0)<<22|a>>>10)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a&r|~a&n)+e[8]+1770035416|0)<<7|i>>>25)+a|0)&a|~i&r)+e[9]-1958414417|0)<<12|n>>>20)+i|0)&i|~n&a)+e[10]-42063|0)<<17|r>>>15)+n|0)&n|~r&i)+e[11]-1990404162|0)<<22|a>>>10)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a&r|~a&n)+e[12]+1804603682|0)<<7|i>>>25)+a|0)&a|~i&r)+e[13]-40341101|0)<<12|n>>>20)+i|0)&i|~n&a)+e[14]-1502002290|0)<<17|r>>>15)+n|0)&n|~r&i)+e[15]+1236535329|0)<<22|a>>>10)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a&n|r&~n)+e[1]-165796510|0)<<5|i>>>27)+a|0)&r|a&~r)+e[6]-1069501632|0)<<9|n>>>23)+i|0)&a|i&~a)+e[11]+643717713|0)<<14|r>>>18)+n|0)&i|n&~i)+e[0]-373897302|0)<<20|a>>>12)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a&n|r&~n)+e[5]-701558691|0)<<5|i>>>27)+a|0)&r|a&~r)+e[10]+38016083|0)<<9|n>>>23)+i|0)&a|i&~a)+e[15]-660478335|0)<<14|r>>>18)+n|0)&i|n&~i)+e[4]-405537848|0)<<20|a>>>12)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a&n|r&~n)+e[9]+568446438|0)<<5|i>>>27)+a|0)&r|a&~r)+e[14]-1019803690|0)<<9|n>>>23)+i|0)&a|i&~a)+e[3]-187363961|0)<<14|r>>>18)+n|0)&i|n&~i)+e[8]+1163531501|0)<<20|a>>>12)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a&n|r&~n)+e[13]-1444681467|0)<<5|i>>>27)+a|0)&r|a&~r)+e[2]-51403784|0)<<9|n>>>23)+i|0)&a|i&~a)+e[7]+1735328473|0)<<14|r>>>18)+n|0)&i|n&~i)+e[12]-1926607734|0)<<20|a>>>12)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a^r^n)+e[5]-378558|0)<<4|i>>>28)+a|0)^a^r)+e[8]-2022574463|0)<<11|n>>>21)+i|0)^i^a)+e[11]+1839030562|0)<<16|r>>>16)+n|0)^n^i)+e[14]-35309556|0)<<23|a>>>9)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a^r^n)+e[1]-1530992060|0)<<4|i>>>28)+a|0)^a^r)+e[4]+1272893353|0)<<11|n>>>21)+i|0)^i^a)+e[7]-155497632|0)<<16|r>>>16)+n|0)^n^i)+e[10]-1094730640|0)<<23|a>>>9)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a^r^n)+e[13]+681279174|0)<<4|i>>>28)+a|0)^a^r)+e[0]-358537222|0)<<11|n>>>21)+i|0)^i^a)+e[3]-722521979|0)<<16|r>>>16)+n|0)^n^i)+e[6]+76029189|0)<<23|a>>>9)+r|0,a=((a+=((r=((r+=((n=((n+=((i=((i+=(a^r^n)+e[9]-640364487|0)<<4|i>>>28)+a|0)^a^r)+e[12]-421815835|0)<<11|n>>>21)+i|0)^i^a)+e[15]+530742520|0)<<16|r>>>16)+n|0)^n^i)+e[2]-995338651|0)<<23|a>>>9)+r|0,a=((a+=((n=((n+=(a^((i=((i+=(r^(a|~n))+e[0]-198630844|0)<<6|i>>>26)+a|0)|~r))+e[7]+1126891415|0)<<10|n>>>22)+i|0)^((r=((r+=(i^(n|~a))+e[14]-1416354905|0)<<15|r>>>17)+n|0)|~i))+e[5]-57434055|0)<<21|a>>>11)+r|0,a=((a+=((n=((n+=(a^((i=((i+=(r^(a|~n))+e[12]+1700485571|0)<<6|i>>>26)+a|0)|~r))+e[3]-1894986606|0)<<10|n>>>22)+i|0)^((r=((r+=(i^(n|~a))+e[10]-1051523|0)<<15|r>>>17)+n|0)|~i))+e[1]-2054922799|0)<<21|a>>>11)+r|0,a=((a+=((n=((n+=(a^((i=((i+=(r^(a|~n))+e[8]+1873313359|0)<<6|i>>>26)+a|0)|~r))+e[15]-30611744|0)<<10|n>>>22)+i|0)^((r=((r+=(i^(n|~a))+e[6]-1560198380|0)<<15|r>>>17)+n|0)|~i))+e[13]+1309151649|0)<<21|a>>>11)+r|0,a=((a+=((n=((n+=(a^((i=((i+=(r^(a|~n))+e[4]-145523070|0)<<6|i>>>26)+a|0)|~r))+e[11]-1120210379|0)<<10|n>>>22)+i|0)^((r=((r+=(i^(n|~a))+e[2]+718787259|0)<<15|r>>>17)+n|0)|~i))+e[9]-343485551|0)<<21|a>>>11)+r|0,t[0]=i+t[0]|0,t[1]=a+t[1]|0,t[2]=r+t[2]|0,t[3]=n+t[3]|0}function a(t){var e,i=[];for(e=0;e<64;e+=4)i[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return i}function r(t){var e,i=[];for(e=0;e<64;e+=4)i[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return i}function n(t){var e,r,n,s,o,l,h=t.length,c=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=h;e+=64)i(c,a(t.substring(e-64,e)));for(r=(t=t.substring(e-64)).length,n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<r;e+=1)n[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(n[e>>2]|=128<<(e%4<<3),e>55)for(i(c,n),e=0;e<16;e+=1)n[e]=0;return s=(s=8*h).toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(s[2],16),l=parseInt(s[1],16)||0,n[14]=o,n[15]=l,i(c,n),c}function s(t){var e,a,n,s,o,l,h=t.length,c=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=h;e+=64)i(c,r(t.subarray(e-64,e)));for(a=(t=e-64<h?t.subarray(e-64):new Uint8Array(0)).length,n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<a;e+=1)n[e>>2]|=t[e]<<(e%4<<3);if(n[e>>2]|=128<<(e%4<<3),e>55)for(i(c,n),e=0;e<16;e+=1)n[e]=0;return s=(s=8*h).toString(16).match(/(.*?)(.{0,8})$/),o=parseInt(s[2],16),l=parseInt(s[1],16)||0,n[14]=o,n[15]=l,i(c,n),c}function o(t){var i,a="";for(i=0;i<4;i+=1)a+=e[t>>8*i+4&15]+e[t>>8*i&15];return a}function l(t){var e;for(e=0;e<t.length;e+=1)t[e]=o(t[e]);return t.join("")}function h(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function c(t,e){var i,a=t.length,r=new ArrayBuffer(a),n=new Uint8Array(r);for(i=0;i<a;i+=1)n[i]=t.charCodeAt(i);return e?n:r}function d(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function u(t,e,i){var a=new Uint8Array(t.byteLength+e.byteLength);return a.set(new Uint8Array(t)),a.set(new Uint8Array(e),t.byteLength),i?a:a.buffer}function f(t){var e,i=[],a=t.length;for(e=0;e<a-1;e+=2)i.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,i)}function p(){this.reset()}return l(n("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return(t=0|t||0)<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(i,a){var r,n,s,o,l=this.byteLength,h=e(i,l),c=l;return a!==t&&(c=e(a,l)),h>c?new ArrayBuffer(0):(r=c-h,n=new ArrayBuffer(r),s=new Uint8Array(n),o=new Uint8Array(this,h,r),s.set(o),n)}}(),p.prototype.append=function(t){return this.appendBinary(h(t)),this},p.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,r=this._buff.length;for(e=64;e<=r;e+=64)i(this._hash,a(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},p.prototype.end=function(t){var e,i,a=this._buff,r=a.length,n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r;e+=1)n[e>>2]|=a.charCodeAt(e)<<(e%4<<3);return this._finish(n,r),i=l(this._hash),t&&(i=f(i)),this.reset(),i},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(t,e){var a,r,n,s=e;if(t[s>>2]|=128<<(s%4<<3),s>55)for(i(this._hash,t),s=0;s<16;s+=1)t[s]=0;a=(a=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(a[2],16),n=parseInt(a[1],16)||0,t[14]=r,t[15]=n,i(this._hash,t)},p.hash=function(t,e){return p.hashBinary(h(t),e)},p.hashBinary=function(t,e){var i=l(n(t));return e?f(i):i},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(t){var e,a=u(this._buff.buffer,t,!0),n=a.length;for(this._length+=t.byteLength,e=64;e<=n;e+=64)i(this._hash,r(a.subarray(e-64,e)));return this._buff=e-64<n?new Uint8Array(a.buffer.slice(e-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(t){var e,i,a=this._buff,r=a.length,n=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r;e+=1)n[e>>2]|=a[e]<<(e%4<<3);return this._finish(n,r),i=l(this._hash),t&&(i=f(i)),this.reset(),i},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var t=p.prototype.getState.call(this);return t.buff=d(t.buff),t},p.ArrayBuffer.prototype.setState=function(t){return t.buff=c(t.buff,!0),p.prototype.setState.call(this,t)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(t,e){var i=l(s(new Uint8Array(t)));return e?f(i):i},p}();class Ia{constructor(t,e,i,a,r){this._updating=!1,this._useCompress=!1;const n={avg:this._average,max:this._maximum,min:this._minimum,first:this._first,last:this._last,sum:this._sum,median:this._median,delta:this._delta,diff:this._diff};this._index=t,this._cache=!a.statistics&&i,this._entityID=a.entity,this._graphSpan=e,this._config=a,this._func=n[a.group_by.func],this._realEnd=new Date,this._realStart=new Date,this._groupByDurationMs=Gt(this._config.group_by.duration),this._md5Config=Oa.hash(`${this._graphSpan}${JSON.stringify(this._config)}${JSON.stringify(r)}`)}set hass(t){this._hass=t,this._entityState=this._hass.states[this._entityID]}get history(){return this._computedHistory||[]}get index(){return this._index}get start(){return this._realStart}get end(){return this._realEnd}set cache(t){this._cache=!this._config.statistics&&t}get lastState(){return this.history.length>0?this.history[this.history.length-1][1]:null}nowValue(t,e){if(0===this.history.length)return null;const i=this.history.findIndex(((i,a,r)=>!e&&i[0]>t||!!(e&&i[0]<t&&r[a+1]&&r[a+1][0]>t)));return-1===i?null:this.history[i][1]}get min(){if(this._computedHistory&&0!==this._computedHistory.length)return Math.min(...this._computedHistory.flatMap((t=>null===t[1]?[]:[t[1]])))}get max(){if(this._computedHistory&&0!==this._computedHistory.length)return Math.max(...this._computedHistory.flatMap((t=>null===t[1]?[]:[t[1]])))}minMaxWithTimestamp(t,e){if(this._computedHistory&&0!==this._computedHistory.length)return 1===this._computedHistory.length?{min:[t,this._computedHistory[0][1]],max:[e,this._computedHistory[0][1]]}:this._computedHistory.reduce(((i,a)=>(null===a[1]||a[0]>e||a[0]<t||((null===i.max[1]||i.max[1]<a[1])&&(i.max=[...a]),(null===i.min[1]||null!==a[1]&&i.min[1]>a[1])&&(i.min=[...a])),i)),{min:[0,null],max:[0,null]})}minMaxWithTimestampForYAxis(t,e){if(!this._computedHistory||0===this._computedHistory.length)return;let i=t;const a=this._computedHistory.findIndex((e=>e[0]>=t))-1;return a>=0&&(i=this._computedHistory[a][0]),this.minMaxWithTimestamp(i,e)}async _getCache(t,e){const i=await St.getItem(`${t}_${this._md5Config}${e?"":"-raw"}`);return i?e?ie(i):i:void 0}async _setCache(t,e,i){return i?St.setItem(`${t}_${this._md5Config}`,function(t){return _t.exports.compress(JSON.stringify(t))}(e)):St.setItem(`${t}_${this._md5Config}-raw`,e)}async _updateHistory(t,e){var i;let a,r=new Date(t);if("raw"!==this._config.group_by.func){const i=e.getTime()-t.getTime(),a=Math.floor(i/this._groupByDurationMs)+(i%this._groupByDurationMs>0?1:0);r=new Date(e.getTime()-(a+1)*this._groupByDurationMs)}if(!this._entityState||this._updating)return!1;if(this._updating=!0,this._config.ignore_history){let t=null;t=this._config.attribute?null===(i=this._entityState.attributes)||void 0===i?void 0:i[this._config.attribute]:this._entityState.state,this._config.transform&&(t=this._applyTransform(t,this._entityState));let e=parseFloat(t);return e=Number.isNaN(e)?null:e,this._computedHistory=[[new Date(this._entityState.last_updated).getTime(),e]],this._updating=!1,!0}if(this._config.data_generator)a=await this._generateData(t,e);else{this._realStart=new Date(t),this._realEnd=new Date(e);let i=!1;if(a=this._cache?await this._getCache(this._entityID,this._useCompress):void 0,a&&a.span===this._graphSpan){const t=a.data.findIndex((t=>t&&new Date(t[0]).getTime()>r.getTime()));-1!==t&&(i=!0),t>4?a.data=a.data.slice(0===t?0:t-4):-1===t&&(a.data=[])}else a=void 0;const n=!!(a&&a.data&&0!==a.data.length&&a.data[a.data.length-1])?new Date(a.data[a.data.length-1][0]+1):new Date(r.getTime()+("raw"!==this._config.group_by.func?0:-1)),s=e;let o=[],l=!1;if(this._config.statistics){const t=await this._fetchStatistics(n,s,this._config.statistics.period);if(t&&t.length>0){l=!0;let e=null;a&&a.data&&a.data.length>0&&(e=a.data[a.data.length-1][1]),o=t.map((t=>{var i,a,r,n,s;let o=null;[e,o]=this._transformAndFill(t[(null===(i=this._config.statistics)||void 0===i?void 0:i.type)||"mean"],t,e);let l=null;const h=new Date(t.start);return l=(null===(a=this._config.statistics)||void 0===a?void 0:a.align)&&"middle"!==(null===(r=this._config.statistics)||void 0===r?void 0:r.align)?"start"===this._config.statistics.align?new Date(t.start):new Date(t.end):"5minute"===(null===(n=this._config.statistics)||void 0===n?void 0:n.period)?new Date(h.getTime()+15e4):(null===(s=this._config.statistics)||void 0===s?void 0:s.period)&&"hour"!==this._config.statistics.period?"day"===this._config.statistics.period?new Date(h.getTime()+432e5):new Date(h.getTime()+1296e6):new Date(h.getTime()+18e5),[l.getTime(),Number.isNaN(o)?null:o]}))}}else{const t=await this._fetchRecent(n,s,!this._config.attribute&&!this._config.transform&&i);if(t&&t[0]&&t[0].length>0){l=!0,(this._config.attribute||this._config.transform)&&i&&t[0].shift();let e=null;a&&a.data&&a.data.length>0&&(e=a.data[a.data.length-1][1]),o=t[0].map((t=>{let i=null;this._config.attribute?t.attributes&&void 0!==t.attributes[this._config.attribute]&&(i=t.attributes[this._config.attribute]):i=t.state;let a=null;return[e,a]=this._transformAndFill(i,t,e),this._config.attribute?[new Date(t.last_updated).getTime(),Number.isNaN(a)?null:a]:[new Date(t.last_changed).getTime(),Number.isNaN(a)?null:a]}))}}l&&((null==a?void 0:a.data.length)?(a.span=this._graphSpan,a.last_fetched=new Date,a.card_version="2.0.2",0!==a.data.length&&a.data.push(...o)):a={span:this._graphSpan,card_version:"2.0.2",last_fetched:new Date,data:o},this._cache&&await this._setCache(this._entityID,a,this._useCompress).catch((t=>{ae(t),St.clear()})))}if(!a||0===a.data.length)return this._updating=!1,this._computedHistory=void 0,!1;if("raw"!==this._config.group_by.func){const t=this._dataBucketer(a,Kt.range(r,e)).map((t=>[t.timestamp,this._func(t.data)]));if([void 0,"line","area"].includes(this._config.type))for(;t.length>0&&null===t[0][1];)t.shift();this._computedHistory=t}else this._computedHistory=a.data;return this._updating=!1,!0}_transformAndFill(t,e,i){this._config.transform&&(t=this._applyTransform(t,e));let a=parseFloat(t);return a=Number.isNaN(a)?null:a,null===a?"zero"===this._config.fill_raw?a=0:"last"===this._config.fill_raw&&(a=i):i=a,[i,a]}_applyTransform(t,e){return new Function("x","hass","entity",`'use strict'; ${this._config.transform}`).call(this,t,this._hass,e)}async _fetchRecent(t,e,i){var a;let r="history/period";return t&&(r+=`/${t.toISOString()}`),r+=`?filter_entity_id=${this._entityID}`,e&&(r+=`&end_time=${e.toISOString()}`),i&&(r+="&skip_initial_state"),r+="&significant_changes_only=0",null===(a=this._hass)||void 0===a?void 0:a.callApi("GET",r)}async _generateData(t,e){const i=Object.getPrototypeOf((async function(){})).constructor;let a;try{const r=new i("entity","start","end","hass","moment",`'use strict'; ${this._config.data_generator}`);a=await r(this._entityState,t,e,this._hass,Kt)}catch(it){const e=this._config.data_generator.length<=100?this._config.data_generator.trim():`${this._config.data_generator.trim().substring(0,98)}...`;throw it.message=`${it.name}: ${it.message} in '${e}'`,it.name="Error",it}return{span:0,card_version:"2.0.2",last_fetched:new Date,data:a}}async _fetchStatistics(t,e,i="hour"){var a;const r=await(null===(a=this._hass)||void 0===a?void 0:a.callWS({type:"recorder/statistics_during_period",start_time:null==t?void 0:t.toISOString(),end_time:null==e?void 0:e.toISOString(),statistic_ids:[this._entityID],period:i}));if(r&&this._entityID in r)return r[this._entityID]}_dataBucketer(t,e){const i=Array.from(e.reverseBy("milliseconds",{step:this._groupByDurationMs})).reverse(),a=[];i.forEach(((t,e)=>{a[e]={timestamp:t.valueOf(),data:[]}})),null==t||t.data.forEach((t=>{a.some(((e,i)=>e.timestamp>t[0]&&i>0&&t[0]>=a[i-1].timestamp&&(a[i-1].data.push(t),!0)))}));let r=null;const n=(new Date).getTime();for(a.forEach(((e,i)=>{if(0===e.data.length?"last"===this._config.group_by.fill&&(e.timestamp<=n||this._config.data_generator)?e.data[0]=[e.timestamp,r]:"zero"===this._config.group_by.fill&&(e.timestamp<=n||this._config.data_generator)?e.data[0]=[e.timestamp,0]:"null"===this._config.group_by.fill&&(e.data[0]=[e.timestamp,null]):r=e.data.slice(-1)[0][1],this._config.group_by.start_with_last)if(i>0){if(0===e.data.length||e.data[0][0]!==e.timestamp){const t=a[i-1].data;e.data.unshift([e.timestamp,t[t.length-1][1]])}}else{const i=t.data.findIndex((t=>t[0]>e.timestamp));i>0&&e.data.unshift([e.timestamp,t.data[i-1][1]])}})),a.shift(),a.pop();a.length>0&&(0===a[a.length-1].data.length||1===a[a.length-1].data.length&&null===a[a.length-1].data[0][1]);)a.pop();return a}_sum(t){if(0===t.length)return 0;let e=0;return t.reduce(((i,a,r)=>{let n=0;return a&&null===a[1]?n=t[e][1]:(n=a[1],e=r),i+n}),0)}_average(t){const e=this._filterNulls(t);return 0===e.length?null:this._sum(e)/e.length}_minimum(t){let e=null;return t.forEach((t=>{null!==t[1]&&(e=null===e?t[1]:Math.min(t[1],e))})),e}_maximum(t){let e=null;return t.forEach((t=>{null!==t[1]&&(e=null===e?t[1]:Math.max(t[1],e))})),e}_last(t){return 0===t.length?null:t.slice(-1)[0][1]}_first(t){return 0===t.length?null:t[0][1]}_median(t){const e=this._filterNulls([...t]).sort(((t,e)=>t[1]-e[1]));if(0===e.length)return null;if(1===e.length)return e[0][1];const i=Math.floor((e.length-1)/2);return e.length%2==1?e[i][1]:(e[i][1]+e[i+1][1])/2}_delta(t){const e=this._maximum(t),i=this._minimum(t);return null===e||null===i?null:e-i}_diff(t){const e=this._filterNulls(t),i=this._first(e),a=this._last(e);return null===i||null===a?null:a-i}_filterNulls(t){return t.filter((t=>null!==t[1]))}}var za,Na={},Ya={},Fa={},Ra=mt&&mt.__extends||(za=function(t,e){return za=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},za(t,e)},function(t,e){function i(){this.constructor=t}za(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),Ha=mt&&mt.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var a=Array(t),r=0;for(e=0;e<i;e++)for(var n=arguments[e],s=0,o=n.length;s<o;s++,r++)a[r]=n[s];return a};Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.DetailContext=Fa.NoopContext=Fa.VError=void 0;var Xa=function(t){function e(i,a){var r=t.call(this,a)||this;return r.path=i,Object.setPrototypeOf(r,e.prototype),r}return Ra(e,t),e}(Error);Fa.VError=Xa;var Wa=function(){function t(){this._failed=!1}return t.prototype.fail=function(t,e,i){return this._failed=!0,!1},t.prototype.fork=function(){return this},t.prototype.completeFork=function(){return!this._failed},t.prototype.failed=function(){return this._failed},t.prototype.unionResolver=function(){return this},t.prototype.createContext=function(){return this._failed=!1,this},t.prototype.resolveUnion=function(t){},t}();Fa.NoopContext=Wa;var Va=function(){function t(){this._propNames=[],this._messages=[],this._failedForks=[],this._currentFork=null,this._score=0}return t.prototype.fail=function(t,e,i){return this._propNames.push(t),this._messages.push(e),this._score+=i,!1},t.prototype.unionResolver=function(){return new Ba},t.prototype.resolveUnion=function(t){for(var e,i,a,r=null,n=0,s=t.contexts;n<s.length;n++){var o=s[n];(!r||o._score>=r._score)&&(r=o)}r&&r._score>0&&((e=this._propNames).push.apply(e,r._propNames),(i=this._messages).push.apply(i,r._messages),(a=this._failedForks).push.apply(a,r._failedForks))},t.prototype.getError=function(t){var e=Ga(this.getErrorDetails(t).map(ja)).join("\n");return new Xa(t,e)},t.prototype.getErrorDetails=function(t){for(var e,i=null,a=[],r=this._propNames.length-1;r>=0;r--){var n=this._propNames[r];t+="number"==typeof n?"["+n+"]":n?"."+n:"";var s=this._messages[r];s&&(e={path:t,message:s},i?i.nested=[e]:a.push(e),i=e)}var o=Ga(this._failedForks.map((function(e){return e.getErrorDetails(t)})));return i?o.length&&(i.nested=o):a=o,a},t.prototype.fork=function(){return null==this._currentFork&&(this._currentFork=new t),this._currentFork},t.prototype.completeFork=function(){var e=this._currentFork;return e._failed()&&(this._failedForks.push(e),this._currentFork=null,1===this._failedForks.length&&(this._score=e._score)),this._failedForks.length<t.maxForks},t.prototype.failed=function(){return this._failed()},t.prototype._failed=function(){return this._propNames.length+this._failedForks.length>0},t.maxForks=3,t}();Fa.DetailContext=Va;var Ba=function(){function t(){this.contexts=[]}return t.prototype.createContext=function(){var t=new Va;return this.contexts.push(t),t},t}(),ja=function(t){var e=t.path+" "+t.message,i=t.nested||[],a=Ga(i.map(ja));if(1==i.length){var r=a[0],n=a.slice(1);return Ha([e+"; "+r],n)}return Ha([e],a.map((function(t){return" "+t})))};function Ga(t){var e;return(e=[]).concat.apply(e,t)}!function(t){var e=mt&&mt.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},t(e,i)};return function(e,i){function a(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}();Object.defineProperty(t,"__esModule",{value:!0}),t.basicTypes=t.BasicType=t.TParamList=t.TParam=t.param=t.TFunc=t.func=t.TProp=t.TOptional=t.opt=t.TIface=t.iface=t.indexKey=t.TEnumLiteral=t.enumlit=t.TEnumType=t.enumtype=t.TIntersection=t.intersection=t.TUnion=t.union=t.TTuple=t.tuple=t.RestType=t.rest=t.TArray=t.array=t.TLiteral=t.lit=t.TName=t.name=t.TType=void 0;var i=Fa,a=function(){};function r(t){return"string"==typeof t?s(t):t}function n(t,e){var i=t[e];if(!i)throw new Error("Unknown type "+e);return i}function s(t){return new o(t)}t.TType=a,t.name=s;var o=function(t){function i(e){var i=t.call(this)||this;return i.name=e,i._failMsg="is not a "+e,i}return e(i,t),i.prototype.getChecker=function(t,e,i){var a=this._checkerBeingBuilt;if(!a){this._checkerBeingBuilt=function(t,e){return a(t,e)};try{a=this._getChecker(t,e,i)}finally{this._checkerBeingBuilt=void 0}}return a},i.prototype._getChecker=function(t,e,a){var r=this,s=n(t,this.name),o=s.getChecker(t,e,a);return s instanceof _||s instanceof i?o:function(t,e){return!!o(t,e)||e.fail(null,r._failMsg,0)}},i}(a);t.TName=o,t.lit=function(t){return new l(t)};var l=function(t){function i(e){var i=t.call(this)||this;return i.value=e,i.name=JSON.stringify(e),i._failMsg="is not "+i.name,i}return e(i,t),i.prototype.getChecker=function(t,e){var i=this;return function(t,e){return t===i.value||e.fail(null,i._failMsg,-1)}},i}(a);t.TLiteral=l,t.array=function(t){return new h(r(t))};var h=function(t){function i(e){var i=t.call(this)||this;i.ttype=e;var a=P(e);return a&&(i.name=a+"[]"),i}return e(i,t),i.prototype.getChecker=function(t,e){var i=this.ttype.getChecker(t,e);return function(t,e){if(!Array.isArray(t))return e.fail(null,"is not an array",0);for(var a=0;a<t.length;a++){if(!i(t[a],e))return e.fail(a,null,1)}return!0}},i}(a);t.TArray=h,t.rest=function(t){return new c(t)};var c=function(t){function i(e){var i=t.call(this)||this;return i.typeSpec=e,i}return e(i,t),i.prototype.setStart=function(t){this._start=t},i.prototype.getChecker=function(t,e){var i="string"==typeof this.typeSpec?n(t,this.typeSpec):this.typeSpec;if(!(i instanceof h))throw new Error("Rest type must be an array");var a=i.ttype.getChecker(t,e),r=this._start;return function(t,e){for(var i=r;i<t.length;i++)if(!a(t[i],e))return e.fail(i,null,1);return!0}},i}(a);t.RestType=c,t.tuple=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new d(t.map((function(t){return r(t)})))};var d=function(t){function i(e){var i=t.call(this)||this;i.ttypes=e;var a=e[e.length-1];return a instanceof c&&(e.pop(),i._restType=a,i._restType.setStart(e.length)),i}return e(i,t),i.prototype.getChecker=function(t,e){var i=this.ttypes.map((function(i){return i.getChecker(t,e)})),a=function(t,e){if(!Array.isArray(t))return e.fail(null,"is not an array",0);for(var a=0;a<i.length;a++){if(!i[a](t[a],e))return e.fail(a,null,1)}return!0};if(this._restType){var r=this._restType.getChecker(t,e);return function(t,e){return a(t,e)&&r(t,e)}}return e?function(t,e){return!!a(t,e)&&(t.length<=i.length||e.fail(i.length,"is extraneous",2))}:a},i}(a);t.TTuple=d,t.union=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new u(t.map((function(t){return r(t)})))};var u=function(t){function i(e){var i=t.call(this)||this;i.ttypes=e;var a=e.map(P).filter((function(t){return t})),r=e.length-a.length;return a.length?(r>0&&a.push(r+" more"),i._failMsg="is none of "+a.join(", ")):i._failMsg="is none of "+r+" types",i}return e(i,t),i.prototype.getChecker=function(t,e,i){var a=this,r=this.ttypes.map((function(a){return a.getChecker(t,e,i)}));return function(t,e){for(var i=e.unionResolver(),n=0;n<r.length;n++){if(r[n](t,i.createContext()))return!0}return e.resolveUnion(i),e.fail(null,a._failMsg,0)}},i}(a);t.TUnion=u,t.intersection=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new f(t.map((function(t){return r(t)})))};var f=function(t){function i(e){var i=t.call(this)||this;return i.ttypes=e,i}return e(i,t),i.prototype.getChecker=function(t,e,i){void 0===i&&(i=new Set);var a=this.ttypes.map((function(a){return a.getChecker(t,e,i)}));return function(t,e){return a.every((function(i){return i(t,e.fork()),e.completeFork()}))&&!e.failed()}},i}(a);t.TIntersection=f,t.enumtype=function(t){return new p(t)};var p=function(t){function i(e){var i=t.call(this)||this;return i.members=e,i.validValues=new Set,i._failMsg="is not a valid enum value",i.validValues=new Set(Object.keys(e).map((function(t){return e[t]}))),i}return e(i,t),i.prototype.getChecker=function(t,e){var i=this;return function(t,e){return!!i.validValues.has(t)||e.fail(null,i._failMsg,0)}},i}(a);t.TEnumType=p,t.enumlit=function(t,e){return new g(t,e)};var g=function(t){function i(e,i){var a=t.call(this)||this;return a.enumName=e,a.prop=i,a._failMsg="is not "+e+"."+i,a}return e(i,t),i.prototype.getChecker=function(t,e){var i=this,a=n(t,this.enumName);if(!(a instanceof p))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var r=a.members[this.prop];if(!a.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(t,e){return t===r||e.fail(null,i._failMsg,-1)}},i}(a);function x(e){return Object.keys(e).filter((function(e){return e!==t.indexKey})).map((function(t){return function(t,e){return e instanceof v?new b(t,e.ttype,!0):new b(t,r(e),!1)}(t,e[t])}))}t.TEnumLiteral=g,t.indexKey=Symbol(),t.iface=function(e,i){return new m(e,x(i),i[t.indexKey])};var m=function(t){function a(e,i,a){var n=t.call(this)||this;return n.bases=e,n.props=i,n.indexType=a?r(a):void 0,n.propSet=new Set(i.map((function(t){return t.name}))),n}return e(a,t),a.prototype.getChecker=function(t,e,a){var r,s=this;void 0===a&&(a=new Set),this.propSet.forEach((function(t){return a.add(t)}));var o=this.bases.map((function(i){return n(t,i).getChecker(t,e,a)})),l=this.props.map((function(i){return i.ttype.getChecker(t,e)})),h=null===(r=this.indexType)||void 0===r?void 0:r.getChecker(t,e),c=new i.NoopContext,d=this.props.map((function(t,e){return!t.isOpt&&!l[e](void 0,c)}));return function(t,i){if("object"!=typeof t||null===t)return i.fail(null,"is not an object",0);for(var r=0;r<o.length;r++)if(o[r](t,i.fork()),!i.completeFork())return!1;for(r=0;r<l.length;r++){var n=s.props[r].name,c=t[n];if(void 0===c){if(d[r]&&(i.fork().fail(n,"is missing",1),!i.completeFork()))return!1}else{var u=i.fork();if(l[r](c,u)||u.fail(n,null,1),!i.completeFork())return!1}}if(h)for(var f in t){u=i.fork();if(h(t[f],u)||u.fail(f,null,1),!i.completeFork())return!1}else if(e)for(var f in t)if(!a.has(f)&&(i.fork().fail(f,"is extraneous",2),!i.completeFork()))return!1;return!i.failed()}},a}(a);t.TIface=m,t.opt=function(t){return new v(r(t))};var v=function(t){function i(e){var i=t.call(this)||this;return i.ttype=e,i}return e(i,t),i.prototype.getChecker=function(t,e){var i=this.ttype.getChecker(t,e);return function(t,e){return void 0===t||i(t,e)}},i}(a);t.TOptional=v;var b=function(t,e,i){this.name=t,this.ttype=e,this.isOpt=i};t.TProp=b,t.func=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return new y(new S(e),r(t))};var y=function(t){function i(e,i){var a=t.call(this)||this;return a.paramList=e,a.result=i,a}return e(i,t),i.prototype.getChecker=function(t,e){return function(t,e){return"function"==typeof t||e.fail(null,"is not a function",0)}},i}(a);t.TFunc=y,t.param=function(t,e,i){return new w(t,r(e),Boolean(i))};var w=function(t,e,i){this.name=t,this.ttype=e,this.isOpt=i};t.TParam=w;var S=function(t){function a(e){var i=t.call(this)||this;return i.params=e,i}return e(a,t),a.prototype.getChecker=function(t,e){var a=this,r=this.params.map((function(i){return i.ttype.getChecker(t,e)})),n=new i.NoopContext,s=this.params.map((function(t,e){return!t.isOpt&&!r[e](void 0,n)})),o=function(t,e){if(!Array.isArray(t))return e.fail(null,"is not an array",0);for(var i=0;i<r.length;i++){var n=a.params[i];if(void 0===t[i]){if(s[i])return e.fail(n.name,"is missing",1)}else if(!r[i](t[i],e))return e.fail(n.name,null,1)}return!0};return e?function(t,e){return!!o(t,e)&&(t.length<=r.length||e.fail(r.length,"is extraneous",2))}:o},a}(a);t.TParamList=S;var _=function(t){function i(e,i){var a=t.call(this)||this;return a.validator=e,a.message=i,a}return e(i,t),i.prototype.getChecker=function(t,e){var i=this;return function(t,e){return!!i.validator(t)||e.fail(null,i.message,0)}},i}(a);t.BasicType=_,t.basicTypes={any:new _((function(t){return!0}),"is invalid"),unknown:new _((function(t){return!0}),"is invalid"),number:new _((function(t){return"number"==typeof t}),"is not a number"),object:new _((function(t){return"object"==typeof t&&t}),"is not an object"),boolean:new _((function(t){return"boolean"==typeof t}),"is not a boolean"),string:new _((function(t){return"string"==typeof t}),"is not a string"),symbol:new _((function(t){return"symbol"==typeof t}),"is not a symbol"),void:new _((function(t){return null==t}),"is not void"),undefined:new _((function(t){return void 0===t}),"is not undefined"),null:new _((function(t){return null===t}),"is not null"),never:new _((function(t){return!1}),"is unexpected"),Date:new _(A("[object Date]"),"is not a Date"),RegExp:new _(A("[object RegExp]"),"is not a RegExp")};var k=Object.prototype.toString;function A(t){return function(e){return"object"==typeof e&&e&&k.call(e)===t}}"undefined"!=typeof Buffer&&(t.basicTypes.Buffer=new _((function(t){return Buffer.isBuffer(t)}),"is not a Buffer"));for(var C=function(e){t.basicTypes[e.name]=new _((function(t){return t instanceof e}),"is not a "+e.name)},M=0,T=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];M<T.length;M++){C(T[M])}function P(t){if(t instanceof o||t instanceof l||t instanceof h)return t.name}}(Ya),function(t){var e=mt&&mt.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var a=Array(t),r=0;for(e=0;e<i;e++)for(var n=arguments[e],s=0,o=n.length;s<o;s++,r++)a[r]=n[s];return a};Object.defineProperty(t,"__esModule",{value:!0}),t.Checker=t.createCheckers=void 0;var i=Ya,a=Fa,r=Ya;Object.defineProperty(t,"TArray",{enumerable:!0,get:function(){return r.TArray}}),Object.defineProperty(t,"TEnumType",{enumerable:!0,get:function(){return r.TEnumType}}),Object.defineProperty(t,"TEnumLiteral",{enumerable:!0,get:function(){return r.TEnumLiteral}}),Object.defineProperty(t,"TFunc",{enumerable:!0,get:function(){return r.TFunc}}),Object.defineProperty(t,"TIface",{enumerable:!0,get:function(){return r.TIface}}),Object.defineProperty(t,"TLiteral",{enumerable:!0,get:function(){return r.TLiteral}}),Object.defineProperty(t,"TName",{enumerable:!0,get:function(){return r.TName}}),Object.defineProperty(t,"TOptional",{enumerable:!0,get:function(){return r.TOptional}}),Object.defineProperty(t,"TParam",{enumerable:!0,get:function(){return r.TParam}}),Object.defineProperty(t,"TParamList",{enumerable:!0,get:function(){return r.TParamList}}),Object.defineProperty(t,"TProp",{enumerable:!0,get:function(){return r.TProp}}),Object.defineProperty(t,"TTuple",{enumerable:!0,get:function(){return r.TTuple}}),Object.defineProperty(t,"TType",{enumerable:!0,get:function(){return r.TType}}),Object.defineProperty(t,"TUnion",{enumerable:!0,get:function(){return r.TUnion}}),Object.defineProperty(t,"TIntersection",{enumerable:!0,get:function(){return r.TIntersection}}),Object.defineProperty(t,"array",{enumerable:!0,get:function(){return r.array}}),Object.defineProperty(t,"enumlit",{enumerable:!0,get:function(){return r.enumlit}}),Object.defineProperty(t,"enumtype",{enumerable:!0,get:function(){return r.enumtype}}),Object.defineProperty(t,"func",{enumerable:!0,get:function(){return r.func}}),Object.defineProperty(t,"iface",{enumerable:!0,get:function(){return r.iface}}),Object.defineProperty(t,"lit",{enumerable:!0,get:function(){return r.lit}}),Object.defineProperty(t,"name",{enumerable:!0,get:function(){return r.name}}),Object.defineProperty(t,"opt",{enumerable:!0,get:function(){return r.opt}}),Object.defineProperty(t,"param",{enumerable:!0,get:function(){return r.param}}),Object.defineProperty(t,"tuple",{enumerable:!0,get:function(){return r.tuple}}),Object.defineProperty(t,"union",{enumerable:!0,get:function(){return r.union}}),Object.defineProperty(t,"intersection",{enumerable:!0,get:function(){return r.intersection}}),Object.defineProperty(t,"rest",{enumerable:!0,get:function(){return r.rest}}),Object.defineProperty(t,"indexKey",{enumerable:!0,get:function(){return r.indexKey}}),Object.defineProperty(t,"BasicType",{enumerable:!0,get:function(){return r.BasicType}});var n=Fa;Object.defineProperty(t,"VError",{enumerable:!0,get:function(){return n.VError}}),t.createCheckers=function(){for(var t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];for(var r=Object.assign.apply(Object,e([{},i.basicTypes],t)),n={},o=0,l=t;o<l.length;o++)for(var h=l[o],c=0,d=Object.keys(h);c<d.length;c++){var u=d[c];n[u]=new s(r,h[u])}return n};var s=function(){function t(t,e,a){if(void 0===a&&(a="value"),this.suite=t,this.ttype=e,this._path=a,this.props=new Map,e instanceof i.TIface)for(var r=0,n=e.props;r<n.length;r++){var s=n[r];this.props.set(s.name,s.ttype)}this.checkerPlain=this.ttype.getChecker(t,!1),this.checkerStrict=this.ttype.getChecker(t,!0)}return t.prototype.setReportedPath=function(t){this._path=t},t.prototype.check=function(t){return this._doCheck(this.checkerPlain,t)},t.prototype.test=function(t){return this.checkerPlain(t,new a.NoopContext)},t.prototype.validate=function(t){return this._doValidate(this.checkerPlain,t)},t.prototype.strictCheck=function(t){return this._doCheck(this.checkerStrict,t)},t.prototype.strictTest=function(t){return this.checkerStrict(t,new a.NoopContext)},t.prototype.strictValidate=function(t){return this._doValidate(this.checkerStrict,t)},t.prototype.getProp=function(e){var i=this.props.get(e);if(!i)throw new Error("Type has no property "+e);return new t(this.suite,i,this._path+"."+e)},t.prototype.methodArgs=function(e){var i=this._getMethod(e);return new t(this.suite,i.paramList)},t.prototype.methodResult=function(e){var i=this._getMethod(e);return new t(this.suite,i.result)},t.prototype.getArgs=function(){if(!(this.ttype instanceof i.TFunc))throw new Error("getArgs() applied to non-function");return new t(this.suite,this.ttype.paramList)},t.prototype.getResult=function(){if(!(this.ttype instanceof i.TFunc))throw new Error("getResult() applied to non-function");return new t(this.suite,this.ttype.result)},t.prototype.getType=function(){return this.ttype},t.prototype._doCheck=function(t,e){if(!t(e,new a.NoopContext)){var i=new a.DetailContext;throw t(e,i),i.getError(this._path)}},t.prototype._doValidate=function(t,e){if(t(e,new a.NoopContext))return null;var i=new a.DetailContext;return t(e,i),i.getErrorDetails(this._path)},t.prototype._getMethod=function(t){var e=this.props.get(t);if(!e)throw new Error("Type has no property "+t);if(!(e instanceof i.TFunc))throw new Error("Property "+t+" is not a method");return e},t}();t.Checker=s}(Na);const Ua={ChartCardExternalConfig:Na.iface([],{type:Na.lit("custom:apexcharts-card"),config_templates:Na.opt(Na.union(Na.array("string"),"string")),color_list:Na.opt(Na.array("string")),locale:Na.opt("string"),experimental:Na.opt(Na.iface([],{color_threshold:Na.opt("boolean"),disable_config_validation:Na.opt("boolean"),hidden_by_default:Na.opt("boolean"),brush:Na.opt("boolean")})),hours_12:Na.opt("boolean"),chart_type:Na.opt("ChartCardChartType"),update_interval:Na.opt("string"),update_delay:Na.opt("string"),all_series_config:Na.opt("ChartCardAllSeriesExternalConfig"),series:Na.array("ChartCardSeriesExternalConfig"),graph_span:Na.opt("string"),span:Na.opt("ChartCardSpanExtConfig"),now:Na.opt(Na.iface([],{show:Na.opt("boolean"),color:Na.opt("string"),label:Na.opt("string")})),show:Na.opt(Na.iface([],{loading:Na.opt("boolean"),last_updated:Na.opt("boolean")})),cache:Na.opt("boolean"),stacked:Na.opt("boolean"),layout:Na.opt("string"),apex_config:Na.opt("any"),header:Na.opt("ChartCardHeaderExternalConfig"),style:Na.opt("any"),card_mod:Na.opt("any"),view_layout:Na.opt("any"),index:Na.opt("number"),view_index:Na.opt("number"),brush:Na.opt("ChartCardBrushExtConfig"),yaxis:Na.opt(Na.array("ChartCardYAxisExternal"))}),ChartCardChartType:Na.union(Na.lit("line"),Na.lit("scatter"),Na.lit("pie"),Na.lit("donut"),Na.lit("radialBar")),ChartCardBrushExtConfig:Na.iface([],{selection_span:Na.opt("string"),apex_config:Na.opt("any")}),ChartCardSpanExtConfig:Na.iface([],{start:Na.opt("ChartCardStartEnd"),end:Na.opt("ChartCardStartEnd"),offset:Na.opt("string")}),ChartCardStartEnd:Na.union(Na.lit("minute"),Na.lit("hour"),Na.lit("day"),Na.lit("week"),Na.lit("month"),Na.lit("year"),Na.lit("isoWeek")),StatisticsPeriod:Na.union(Na.lit("5minute"),Na.lit("hour"),Na.lit("day"),Na.lit("month")),ChartCardAllSeriesExternalConfig:Na.iface([],{entity:Na.opt("string"),attribute:Na.opt("string"),name:Na.opt("string"),type:Na.opt(Na.union(Na.lit("line"),Na.lit("column"),Na.lit("area"))),color:Na.opt("string"),opacity:Na.opt("number"),curve:Na.opt(Na.union(Na.lit("smooth"),Na.lit("straight"),Na.lit("stepline"))),stroke_width:Na.opt("number"),extend_to:Na.opt(Na.union(Na.lit(!1),Na.lit("end"),Na.lit("now"))),unit:Na.opt("string"),invert:Na.opt("boolean"),data_generator:Na.opt("string"),statistics:Na.opt(Na.iface([],{type:Na.opt(Na.union(Na.lit("mean"),Na.lit("max"),Na.lit("min"),Na.lit("sum"),Na.lit("state"))),period:Na.opt("StatisticsPeriod"),align:Na.opt(Na.union(Na.lit("start"),Na.lit("end"),Na.lit("middle")))})),float_precision:Na.opt("number"),min:Na.opt("number"),max:Na.opt("number"),offset:Na.opt("string"),time_delta:Na.opt("string"),fill_raw:Na.opt("GroupByFill"),show:Na.opt("ChartCardSeriesShowConfigExt"),group_by:Na.opt(Na.iface([],{duration:Na.opt("string"),func:Na.opt("GroupByFunc"),fill:Na.opt("GroupByFill"),start_with_last:Na.opt("boolean")})),transform:Na.opt("string"),color_threshold:Na.opt(Na.array("ChartCardColorThreshold")),yaxis_id:Na.opt("string"),header_actions:Na.opt("ActionsConfig")}),ActionsConfig:Na.iface([],{tap_action:Na.opt("ActionConfig"),hold_action:Na.opt("ActionConfig"),double_tap_action:Na.opt("ActionConfig"),entity:Na.opt("string")}),ChartCardSeriesShowConfigExt:Na.iface([],{as_duration:Na.opt("ChartCardPrettyTime"),legend_value:Na.opt("boolean"),in_header:Na.opt(Na.union("boolean",Na.lit("raw"),Na.lit("before_now"),Na.lit("after_now"))),name_in_header:Na.opt("boolean"),header_color_threshold:Na.opt("boolean"),in_chart:Na.opt("boolean"),datalabels:Na.opt(Na.union("boolean",Na.lit("total"),Na.lit("percent"))),hidden_by_default:Na.opt("boolean"),extremas:Na.opt(Na.union("boolean",Na.lit("time"),Na.lit("min"),Na.lit("max"),Na.lit("min+time"),Na.lit("max+time"))),in_brush:Na.opt("boolean"),offset_in_name:Na.opt("boolean")}),ChartCardSeriesExternalConfig:Na.iface(["ChartCardAllSeriesExternalConfig"],{entity:"string"}),ChartCardPrettyTime:Na.union(Na.lit("millisecond"),Na.lit("second"),Na.lit("minute"),Na.lit("hour"),Na.lit("day"),Na.lit("week"),Na.lit("month"),Na.lit("year")),GroupByFill:Na.union(Na.lit("null"),Na.lit("last"),Na.lit("zero")),GroupByFunc:Na.union(Na.lit("raw"),Na.lit("avg"),Na.lit("min"),Na.lit("max"),Na.lit("last"),Na.lit("first"),Na.lit("sum"),Na.lit("median"),Na.lit("delta"),Na.lit("diff")),ChartCardHeaderExternalConfig:Na.iface([],{show:Na.opt("boolean"),floating:Na.opt("boolean"),title:Na.opt("string"),show_states:Na.opt("boolean"),colorize_states:Na.opt("boolean"),standard_format:Na.opt("boolean"),disable_actions:Na.opt("boolean"),title_actions:Na.opt("ActionsConfig")}),ChartCardColorThreshold:Na.iface([],{value:"number",color:Na.opt("string"),opacity:Na.opt("number")}),ChartCardYAxisExternal:Na.iface([],{id:Na.opt("string"),show:Na.opt("boolean"),opposite:Na.opt("boolean"),min:Na.opt(Na.union(Na.lit("auto"),"number","string")),max:Na.opt(Na.union(Na.lit("auto"),"number","string")),align_to:Na.opt("number"),decimals:Na.opt("number"),apex_config:Na.opt("any")}),ToggleMenuActionConfig:Na.iface(["BaseActionConfig"],{action:Na.lit("toggle-menu"),haptic:Na.opt("HapticType")}),ToggleActionConfig:Na.iface(["BaseActionConfig"],{action:Na.lit("toggle"),haptic:Na.opt("HapticType")}),CallServiceActionConfig:Na.iface(["BaseActionConfig"],{action:Na.lit("call-service"),service:"string",service_data:Na.opt("any"),haptic:Na.opt("HapticType")}),NavigateActionConfig:Na.iface(["BaseActionConfig"],{action:Na.lit("navigate"),navigation_path:"string",haptic:Na.opt("HapticType")}),UrlActionConfig:Na.iface(["BaseActionConfig"],{action:Na.lit("url"),url_path:"string",haptic:Na.opt("HapticType")}),MoreInfoActionConfig:Na.iface(["BaseActionConfig"],{action:Na.lit("more-info"),entity:Na.opt("string"),haptic:Na.opt("HapticType")}),NoActionConfig:Na.iface(["BaseActionConfig"],{action:Na.lit("none"),haptic:Na.opt("HapticType")}),CustomActionConfig:Na.iface(["BaseActionConfig"],{action:Na.lit("fire-dom-event"),haptic:Na.opt("HapticType"),browser_mod:Na.opt("any")}),BaseActionConfig:Na.iface([],{confirmation:Na.opt("ConfirmationRestrictionConfig")}),ConfirmationRestrictionConfig:Na.iface([],{text:Na.opt("string"),exemptions:Na.opt(Na.array("RestrictionConfig"))}),RestrictionConfig:Na.iface([],{user:"string"}),HapticType:Na.union(Na.lit("success"),Na.lit("warning"),Na.lit("failure"),Na.lit("light"),Na.lit("medium"),Na.lit("heavy"),Na.lit("selection")),ActionConfig:Na.union("ToggleActionConfig","CallServiceActionConfig","NavigateActionConfig","UrlActionConfig","MoreInfoActionConfig","NoActionConfig","CustomActionConfig","ToggleMenuActionConfig")},$a=(t,e,i,a)=>{a=a||{},i=null==i?{}:i;const r=new Event(e,{bubbles:void 0===a.bubbles||a.bubbles,cancelable:Boolean(a.cancelable),composed:void 0===a.composed||a.composed});return r.detail=i,t.dispatchEvent(r),r},Za=(t,e)=>{if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){if(t.constructor!==e.constructor)return!1;let i,a;if(Array.isArray(t)){if(a=t.length,a!==e.length)return!1;for(i=a;0!=i--;)if(!Za(t[i],e[i]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;for(i of t.entries())if(!Za(i[1],e.get(i[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(i of t.entries())if(!e.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(a=t.length,a!==e.length)return!1;for(i=a;0!=i--;)if(t[i]!==e[i])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const r=Object.keys(t);if(a=r.length,a!==Object.keys(e).length)return!1;for(i=a;0!=i--;)if(!Object.prototype.hasOwnProperty.call(e,r[i]))return!1;for(i=a;0!=i--;){const a=r[i];if(!Za(t[a],e[a]))return!1}return!0}return t!=t&&e!=e},qa="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;class Ja extends HTMLElement{constructor(){super(),this.holdTime=500,this.held=!1,this.cancelled=!1,this.ripple=document.createElement("mwc-ripple")}connectedCallback(){Object.assign(this.style,{position:"absolute",width:qa?"100px":"50px",height:qa?"100px":"50px",transform:"translate(-50%, -50%)",pointerEvents:"none",zIndex:"999"}),this.appendChild(this.ripple),this.ripple.primary=!0,["touchcancel","mouseout","mouseup","touchmove","mousewheel","wheel","scroll"].forEach((t=>{document.addEventListener(t,(()=>{this.cancelled=!0,this.timer&&(this.stopAnimation(),clearTimeout(this.timer),this.timer=void 0)}),{passive:!0})}))}bind(t,e={}){t.actionHandler&&Za(e,t.actionHandler.options)||(t.actionHandler?(t.removeEventListener("touchstart",t.actionHandler.start),t.removeEventListener("touchend",t.actionHandler.end),t.removeEventListener("touchcancel",t.actionHandler.end),t.removeEventListener("mousedown",t.actionHandler.start),t.removeEventListener("click",t.actionHandler.end),t.removeEventListener("keyup",t.actionHandler.handleEnter)):t.addEventListener("contextmenu",(t=>{const e=t||window.event;return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0,e.returnValue=!1,!1})),t.actionHandler={options:e},e.disabled||(t.actionHandler.start=t=>{let i,a;this.cancelled=!1,t.touches?(i=t.touches[0].pageX,a=t.touches[0].pageY):(i=t.pageX,a=t.pageY),e.hasHold&&(this.held=!1,this.timer=window.setTimeout((()=>{this.startAnimation(i,a),this.held=!0}),this.holdTime))},t.actionHandler.end=t=>{if(["touchend","touchcancel"].includes(t.type)&&this.cancelled)return;const i=t.target;t.cancelable&&t.preventDefault(),e.hasHold&&(clearTimeout(this.timer),this.stopAnimation(),this.timer=void 0),e.hasHold&&this.held?$a(i,"action",{action:"hold"}):e.hasDoubleClick?"click"===t.type&&t.detail<2||!this.dblClickTimeout?this.dblClickTimeout=window.setTimeout((()=>{this.dblClickTimeout=void 0,$a(i,"action",{action:"tap"})}),250):(clearTimeout(this.dblClickTimeout),this.dblClickTimeout=void 0,$a(i,"action",{action:"double_tap"})):$a(i,"action",{action:"tap"})},t.actionHandler.handleEnter=t=>{13===t.keyCode&&t.currentTarget.actionHandler.end(t)},t.addEventListener("touchstart",t.actionHandler.start,{passive:!0}),t.addEventListener("touchend",t.actionHandler.end),t.addEventListener("touchcancel",t.actionHandler.end),t.addEventListener("mousedown",t.actionHandler.start,{passive:!0}),t.addEventListener("click",t.actionHandler.end),t.addEventListener("keyup",t.actionHandler.handleEnter)))}startAnimation(t,e){Object.assign(this.style,{left:`${t}px`,top:`${e}px`,display:null}),this.ripple.disabled=!1,this.ripple.startPress(),this.ripple.unbounded=!0}stopAnimation(){this.ripple.endPress(),this.ripple.disabled=!0,this.style.display="none"}}customElements.define("apexcharts-card-action-handler",Ja);const Ka=(t,e)=>{const i=(()=>{const t=document.body;if(t.querySelector("apexcharts-card-action-handler"))return t.querySelector("apexcharts-card-action-handler");const e=document.createElement("apexcharts-card-action-handler");return t.appendChild(e),e})();i&&i.bind(t,e)},Qa=it(class extends at{update(t,[e]){return Ka(t.element,e),E}render(t){}});console.info("%c APEXCHARTS-CARD %c v2.0.2 ","color: orange; font-weight: bold; background: black","color: white; font-weight: bold; background: dimgray"),globalThis.ApexCharts=Se,St.config({name:"apexchart-card",version:1,storeName:"entity_history_cache",description:"ApexCharts-card uses caching for the entity history"}),St.iterate(((t,e)=>{const i=e.endsWith("-raw")?t:ie(t);"2.0.2"!==i.card_version&&St.removeItem(e);const a=new Date;a.setTime(a.getTime()-i.span),new Date(i.last_fetched)<a&&St.removeItem(e)})).catch((t=>{console.warn("Purging has errored: ",t)}));let tr=class extends q{constructor(){super(...arguments),this._loaded=!1,this._updating=!1,this._entities=[],this._colors=[],this._brushColors=[],this._headerColors=[],this._graphSpan=864e5,this._offset=0,this._headerState=[],this._dataLoaded=!1,this._seriesOffset=[],this._seriesTimeDelta=[],this._updateDelay=1500,this._brushInit=!1,this._brushSelectionSpan=0,this._lastUpdated=new Date,this._warning=!1}connectedCallback(){var t;super.connectedCallback(),this._config&&this._hass&&!this._loaded?this._initialLoad():this._config&&this._hass&&this._apexChart&&!this._config.update_interval&&window.requestAnimationFrame((()=>{this._updateOnInterval()})),(null===(t=this._config)||void 0===t?void 0:t.update_interval)&&(window.requestAnimationFrame((()=>{this._updateOnInterval()})),this._intervalTimeout=setInterval((()=>this._updateOnInterval()),this._interval))}disconnectedCallback(){this._intervalTimeout&&clearInterval(this._intervalTimeout),this._updating=!1,super.disconnectedCallback()}_updateOnInterval(){!this._updating&&this._hass&&(this._updating=!0,this._updateData())}updated(t){super.updated(t),this._config&&this._hass&&this.isConnected&&!this._loaded&&this._initialLoad()}_firstDataLoad(){!this._updating&&!this._dataLoaded&&this._apexChart&&this._config&&this._hass&&(this._dataLoaded=!0,this._updating=!0,this._updateData().then((()=>{var t,e;(null===(e=null===(t=this._config)||void 0===t?void 0:t.experimental)||void 0===e?void 0:e.hidden_by_default)&&this._config.series_in_graph.forEach(((t,e)=>{var i,a;if(t.show.hidden_by_default){const t=ne(e,null===(i=this._config)||void 0===i?void 0:i.series_in_graph,this._entities);null===(a=this._apexChart)||void 0===a||a.hideSeries(t)}}))})))}set hass(t){if(this._hass=t,!this._config||!this._graphs||!t)return;this._graphs.map((e=>{e&&(e.hass=t)}));let e=!1,i=!1;this._config.series.forEach(((a,r)=>{const n=t&&t.states[a.entity]||void 0;n?n&&this._entities[r]!==n&&(this._entities[r]=n,e=!0,this._graphs&&this._graphs[r]&&(this._graphs[r].hass=this._hass),"raw"===a.show.in_header&&(this._headerState[r]=function(t,e){let i=t;return void 0===i?null:("string"==typeof i&&(i=parseFloat(i),Number.isNaN(i))||null===i||"number"!=typeof i||Number.isInteger(i)||(i=i.toFixed(void 0===e?1:e)),i)}(a.attribute?n.attributes[a.attribute]:n.state,a.float_precision),i=!0)):this._entities[r]=n})),i&&(this._headerState=[...this._headerState]),this._config.series.some(((t,e)=>void 0===this._entities[e]))?this._warning=!0:(this._warning&&(this._warning=!1,this._reset()),e&&(this._entities=[...this._entities],this._updating||this._config.update_interval||(this._dataLoaded?(this._updating=!0,setTimeout((()=>{this._updateData()}),this._updateDelay)):this._firstDataLoad())))}_reset(){this._apexChart&&(this._apexChart.destroy(),this._apexChart=void 0,this._loaded=!1,this._dataLoaded=!1,this._updating=!1,this._apexBrush&&(this._apexBrush.destroy(),this._apexBrush=void 0,this._brushInit=!1)),this._config&&this._hass&&!this._loaded&&this._initialLoad()}setConfig(t){var e,i,a,r,n,s,o,l;let h=JSON.parse(JSON.stringify(t));h.entities&&(h.series=h.entities,delete h.entities),h=h,h.config_templates&&(h.config_templates=h.config_templates&&Array.isArray(h.config_templates)?h.config_templates:[h.config_templates],h=ge(xt(),h));try{const{ChartCardExternalConfig:t}=Na.createCheckers(Ua);if((null===(e=h.experimental)||void 0===e?void 0:e.disable_config_validation)||t.strictCheck(h),h.all_series_config&&h.series.forEach(((t,e)=>{const i=JSON.parse(JSON.stringify(h.all_series_config));h.series[e]=xe(i,t)})),h.update_interval&&(this._interval=ce(h.update_interval,"update_interval")),h.graph_span&&(this._graphSpan=ce(h.graph_span,"graph_span")),(null===(i=h.span)||void 0===i?void 0:i.offset)&&(this._offset=de(h.span.offset,"span.offset")),(null===(a=h.span)||void 0===a?void 0:a.end)&&(null===(r=h.span)||void 0===r?void 0:r.start))throw new Error("span: Only one of 'start' or 'end' is allowed.");(null===(n=h.brush)||void 0===n?void 0:n.selection_span)&&(this._brushSelectionSpan=ce(h.brush.selection_span,"brush.selection_span")),h.series.forEach(((t,e)=>{t.offset&&(this._seriesOffset[e]=de(t.offset,`series[${e}].offset`)),t.time_delta&&(this._seriesTimeDelta[e]=de(t.time_delta,`series[${e}].time_delta`))})),h.update_delay&&(this._updateDelay=ce(h.update_delay,"update_delay")),this._config=re({graph_span:"24h",cache:!0,useCompress:!1,show:{loading:!0}},h);const c=(null===(s=this._config)||void 0===s?void 0:s.color_list)||Qt;if(this._config){if(this._config.yaxis&&this._config.yaxis.length>1){if(this._config.series.some((t=>!t.yaxis_id)))throw new Error("Multiple yaxis detected: Some series are missing the 'yaxis_id' configuration.");if(this._config.yaxis.some((t=>!t.id)))throw new Error("Multiple yaxis detected: Some yaxis are missing an 'id'.")}if(this._config.yaxis){const t=this._generateYAxisConfig(this._config);this._config.apex_config?this._config.apex_config.yaxis=t:this._config.apex_config={yaxis:t},null===(o=this._yAxisConfig)||void 0===o||o.forEach((t=>{[t.min,t.min_type]=this._getTypeOfMinMax(t.min),[t.max,t.max_type]=this._getTypeOfMinMax(t.max)}))}this._graphs=this._config.series.map(((t,e)=>{var i,a,r,n,s,o;if(t.index=e,t.ignore_history=!(!(null===(i=this._config)||void 0===i?void 0:i.chart_type)||!["donut","pie","radialBar"].includes(null===(a=this._config)||void 0===a?void 0:a.chart_type)||t.group_by&&"raw"!==(null===(r=t.group_by)||void 0===r?void 0:r.func)||t.data_generator||t.statistics||t.offset),this._headerColors[e]||(this._headerColors[e]=c[e%c.length]),t.color&&(this._headerColors[e]=t.color),t.fill_raw=t.fill_raw||"null",t.extend_to=void 0!==t.extend_to?t.extend_to:"end",t.type=(null===(n=this._config)||void 0===n?void 0:n.chart_type)?void 0:t.type||"line",t.group_by?(t.group_by.duration=t.group_by.duration||"1h",t.group_by.func=t.group_by.func||"raw",t.group_by.fill=t.group_by.fill||"last"):t.group_by={duration:"1h",func:"raw",fill:"last"},t.show?(t.show.legend_value=void 0===t.show.legend_value||t.show.legend_value,t.show.in_chart=void 0===t.show.in_chart||t.show.in_chart,t.show.in_header=void 0===t.show.in_header?!(!t.show.in_chart&&t.show.in_brush):t.show.in_header,t.show.name_in_header=void 0===t.show.name_in_header||t.show.name_in_header,t.show.offset_in_name=void 0===t.show.offset_in_name||t.show.offset_in_name):t.show={legend_value:true,in_header:true,in_chart:true,name_in_header:true,offset_in_name:true},ce(t.group_by.duration,`series[${e}].group_by.duration`),t.color_threshold&&t.color_threshold.length>0){const e=JSON.parse(JSON.stringify(t.color_threshold));e.sort(((t,e)=>t.value<e.value?-1:1)),t.color_threshold=e}if(t.entity){const i=!0!==(null===(s=xt())||void 0===s?void 0:s.editMode)&&this._config.cache,a=new Ia(e,this._graphSpan,i,t,null===(o=this._config)||void 0===o?void 0:o.span);return this._hass&&(a.hass=this._hass),a}})),this._config.series_in_graph=[],this._config.series_in_brush=[],this._config.series.forEach(((t,e)=>{var i,a;t.show.in_chart&&(this._colors.push(this._headerColors[e]),this._config.series_in_graph.push(t)),(null===(a=null===(i=this._config)||void 0===i?void 0:i.experimental)||void 0===a?void 0:a.brush)&&t.show.in_brush&&(this._brushColors.push(this._headerColors[e]),this._config.series_in_brush.push(t))})),this._headerColors=this._headerColors.slice(0,null===(l=this._config)||void 0===l?void 0:l.series.length)}}catch(it){throw new Error(`/// apexcharts-card version 2.0.2 /// ${it.message}`)}this._reset()}_generateYAxisConfig(t){if(!t.yaxis)return;const e=[];this._yAxisConfig=JSON.parse(JSON.stringify(t.yaxis));return t.series.map(((i,a)=>{var r,n,s,o;let l=-1;if(l=1!==(null===(r=t.yaxis)||void 0===r?void 0:r.length)?t.yaxis.findIndex((t=>t.id===i.yaxis_id)):0,l<0)throw new Error(`yaxis_id: ${i.yaxis_id} doesn't exist.`);let h=JSON.parse(JSON.stringify(t.yaxis[l]));return delete h.apex_config,delete h.decimals,h.decimalsInFloat=void 0===t.yaxis[l].decimals?1:t.yaxis[l].decimals,(null===(n=this._yAxisConfig)||void 0===n?void 0:n[l].series_id)?null===(o=null===(s=this._yAxisConfig)||void 0===s?void 0:s[l].series_id)||void 0===o||o.push(a):this._yAxisConfig[l].series_id=[a],t.yaxis[l].apex_config&&(h=re(h,t.yaxis[l].apex_config),delete h.apex_config),"number"!=typeof h.min&&delete h.min,"number"!=typeof h.max&&delete h.max,e[l]?h.show=!1:(h.show=void 0===t.yaxis[l].show||t.yaxis[l].show,e[l]=!0),h}))}static get styles(){return _e}render(){var t,e,i,a,r;if(!this._config||!this._hass)return D``;if(this._warning||this._config.series.some(((t,e)=>void 0===this._entities[e])))return this._renderWarnings();const n={"lds-ring":!(!(null===(t=this._config.show)||void 0===t?void 0:t.loading)||!this._updating)},s={wrapper:!0,"with-header":(null===(e=this._config.header)||void 0===e?void 0:e.show)||!0},o=(null===(i=this._config.header)||void 0===i?void 0:i.standard_format)?null===(a=this._config.header)||void 0===a?void 0:a.title:void 0;return D`
<ha-card header=${(t=>null!=t?t:O)(o)}>
<div id="spinner-wrapper">
<div id="spinner" class=${rt(n)}>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class=${rt(s)}>
${!(null===(r=this._config.header)||void 0===r?void 0:r.show)||!this._config.header.show_states&&this._config.header.standard_format?D``:this._renderHeader()}
<div id="graph-wrapper">
<div id="graph"></div>
${this._config.series_in_brush.length?D`<div id="brush"></div>`:""}
</div>
</div>
${this._renderLastUpdated()}
</ha-card>
`}_renderWarnings(){var t;return D`
<ha-card class="warning">
<hui-warning>
<div style="font-weight: bold;">apexcharts-card</div>
${null===(t=this._config)||void 0===t?void 0:t.series.map(((t,e)=>{var i;return this._entities[e]?D``:D` <div>Entity not available: ${null===(i=this._config)||void 0===i?void 0:i.series[e].entity}</div> `}))}
</hui-warning>
</ha-card>
`}_renderHeader(){var t,e,i,a,r,n,s,o;const l={floating:(null===(e=null===(t=this._config)||void 0===t?void 0:t.header)||void 0===e?void 0:e.floating)||!1};return D`
<div id="header" class=${rt(l)}>
${!(null===(a=null===(i=this._config)||void 0===i?void 0:i.header)||void 0===a?void 0:a.standard_format)&&(null===(n=null===(r=this._config)||void 0===r?void 0:r.header)||void 0===n?void 0:n.title)?this._renderTitle():D``}
${(null===(o=null===(s=this._config)||void 0===s?void 0:s.header)||void 0===o?void 0:o.show_states)?this._renderStates():D``}
</div>
`}_renderTitle(){var t,e,i,a,r,n,s,o,l,h,c,d,u,f,p,g,x,m,v,b,y,w,S,_,k,A,C,M,T,P,L,E,O,I,z,N,Y,F,R;const H=!(null===(e=null===(t=this._config)||void 0===t?void 0:t.header)||void 0===e?void 0:e.disable_actions)&&(null===(a=null===(i=this._config)||void 0===i?void 0:i.header)||void 0===a?void 0:a.title_actions)&&("none"!==(null===(o=null===(s=null===(n=null===(r=this._config)||void 0===r?void 0:r.header)||void 0===n?void 0:n.title_actions)||void 0===s?void 0:s.tap_action)||void 0===o?void 0:o.action)||(null===(d=null===(c=null===(h=null===(l=this._config)||void 0===l?void 0:l.header)||void 0===h?void 0:h.title_actions)||void 0===c?void 0:c.hold_action)||void 0===d?void 0:d.action)&&"none"!==(null===(g=null===(p=null===(f=null===(u=this._config)||void 0===u?void 0:u.header)||void 0===f?void 0:f.title_actions)||void 0===p?void 0:p.hold_action)||void 0===g?void 0:g.action)||(null===(b=null===(v=null===(m=null===(x=this._config)||void 0===x?void 0:x.header)||void 0===m?void 0:m.title_actions)||void 0===v?void 0:v.double_tap_action)||void 0===b?void 0:b.action)&&"none"!==(null===(_=null===(S=null===(w=null===(y=this._config)||void 0===y?void 0:y.header)||void 0===w?void 0:w.title_actions)||void 0===S?void 0:S.double_tap_action)||void 0===_?void 0:_.action))?"actions":"disabled";return D`<div
id="header__title"
class="${H}"
@action=${t=>{this._handleTitleAction(t)}}
.actionHandler=${Qa({hasDoubleClick:(null===(M=null===(C=null===(A=null===(k=this._config)||void 0===k?void 0:k.header)||void 0===A?void 0:A.title_actions)||void 0===C?void 0:C.double_tap_action)||void 0===M?void 0:M.action)&&"none"!==(null===(P=null===(T=this._config)||void 0===T?void 0:T.header)||void 0===P?void 0:P.title_actions.double_tap_action.action),hasHold:(null===(I=null===(O=null===(E=null===(L=this._config)||void 0===L?void 0:L.header)||void 0===E?void 0:E.title_actions)||void 0===O?void 0:O.hold_action)||void 0===I?void 0:I.action)&&"none"!==(null===(Y=null===(N=null===(z=this._config)||void 0===z?void 0:z.header)||void 0===N?void 0:N.title_actions)||void 0===Y?void 0:Y.hold_action.action)})}
@focus="${t=>{this.handleRippleFocus(t,"title")}}"
@blur="${t=>{this.handleRippleBlur(t,"title")}}"
@mousedown="${t=>{this.handleRippleActivate(t,"title")}}"
@mouseup="${t=>{this.handleRippleDeactivate(t,"title")}}"
@touchstart="${t=>{this.handleRippleActivate(t,"title")}}"
@touchend="${t=>{this.handleRippleDeactivate(t,"title")}}"
@touchcancel="${t=>{this.handleRippleDeactivate(t,"title")}}"
>
<span>${null===(R=null===(F=this._config)||void 0===F?void 0:F.header)||void 0===R?void 0:R.title}</span>
<mwc-ripple unbounded id="ripple-title"></mwc-ripple>
</div>`}_renderStates(){var t;return D`
<div id="header__states">
${null===(t=this._config)||void 0===t?void 0:t.series.map(((t,e)=>{var i,a,r,n,s,o,l,h,c,d,u,f,p,g,x,m,v,b,y,w,S,_,k;return t.show.in_header?D`
<div
id="states__state"
class="${!(null===(a=null===(i=this._config)||void 0===i?void 0:i.header)||void 0===a?void 0:a.disable_actions)&&("none"!==(null===(n=null===(r=t.header_actions)||void 0===r?void 0:r.tap_action)||void 0===n?void 0:n.action)||(null===(o=null===(s=t.header_actions)||void 0===s?void 0:s.hold_action)||void 0===o?void 0:o.action)&&"none"!==(null===(h=null===(l=t.header_actions)||void 0===l?void 0:l.hold_action)||void 0===h?void 0:h.action)||(null===(d=null===(c=t.header_actions)||void 0===c?void 0:c.double_tap_action)||void 0===d?void 0:d.action)&&"none"!==(null===(f=null===(u=t.header_actions)||void 0===u?void 0:u.double_tap_action)||void 0===f?void 0:f.action))?"actions":"disabled"}"
@action=${e=>{this._handleAction(e,t)}}
.actionHandler=${Qa({hasDoubleClick:(null===(g=null===(p=t.header_actions)||void 0===p?void 0:p.double_tap_action)||void 0===g?void 0:g.action)&&"none"!==t.header_actions.double_tap_action.action,hasHold:(null===(m=null===(x=t.header_actions)||void 0===x?void 0:x.hold_action)||void 0===m?void 0:m.action)&&"none"!==(null===(v=t.header_actions)||void 0===v?void 0:v.hold_action.action)})}
@focus="${t=>{this.handleRippleFocus(t,e)}}"
@blur="${t=>{this.handleRippleBlur(t,e)}}"
@mousedown="${t=>{this.handleRippleActivate(t,e)}}"
@mouseup="${t=>{this.handleRippleDeactivate(t,e)}}"
@touchstart="${t=>{this.handleRippleActivate(t,e)}}"
@touchend="${t=>{this.handleRippleDeactivate(t,e)}}"
@touchcancel="${t=>{this.handleRippleDeactivate(t,e)}}"
>
<div id="state__value">
<span id="state" style="${this._computeHeaderStateColor(t,null===(b=this._headerState)||void 0===b?void 0:b[e])}"
>${0===(null===(y=this._headerState)||void 0===y?void 0:y[e])?0:t.show.as_duration?ue(null===(w=this._headerState)||void 0===w?void 0:w[e],t.show.as_duration):this._computeLastState(null===(S=this._headerState)||void 0===S?void 0:S[e],e)||"N/A"}</span
>
${t.show.as_duration?"":D`<span id="uom">${se(e,null===(_=this._config)||void 0===_?void 0:_.series,this._entities)}</span>`}
</div>
${t.show.name_in_header?D`<div id="state__name">${ne(e,null===(k=this._config)||void 0===k?void 0:k.series,this._entities)}</div>`:""}
<mwc-ripple unbounded id="ripple-${e}"></mwc-ripple>
</div>
`:D``}))}
</div>
`}_renderLastUpdated(){var t,e;return(null===(e=null===(t=this._config)||void 0===t?void 0:t.show)||void 0===e?void 0:e.last_updated)?D` <div id="last_updated">${function(t,e,i,a=!0){const r=ve(t,e)?{hour12:!0}:{hourCycle:"h23"},n=be(t,e);return a?new Intl.DateTimeFormat(n,Object.assign({year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},r)).format(i):new Intl.DateTimeFormat(n,Object.assign({hour:"numeric",minute:"numeric",second:"numeric"},r)).format(i)}(this._config,this._hass,this._lastUpdated,!0)}</div> `:D``}async _initialLoad(){if(await this.updateComplete,!this._apexChart&&this.shadowRoot&&this._config&&this.shadowRoot.querySelector("#graph")){this._loaded=!0;const t=this.shadowRoot.querySelector("#graph"),e=function(t,e,i){const a=fa(),r={chart:{locales:[t.locale&&a[t.locale]||(null==e?void 0:e.language)&&a[e.language]||pa()],defaultLocale:t.locale&&a[t.locale]&&t.locale||(null==e?void 0:e.language)&&a[e.language]&&e.language||"en",type:t.chart_type||"line",stacked:null==t?void 0:t.stacked,foreColor:"var(--primary-text-color)",width:"100%",zoom:{enabled:!1},toolbar:{show:!1}},grid:{strokeDashArray:3},fill:{opacity:ga(t,!1),type:La(t,!1)},series:xa(t,e,!1),labels:ma(t,e),xaxis:va(t,e),yaxis:ba(t),tooltip:{x:{formatter:wa(t,e)},y:{formatter:Sa(t,e)}},dataLabels:{enabled:_a(t),enabledOnSeries:Ta(t),formatter:ka(t,i,e)},plotOptions:{radialBar:Aa(t,e)},legend:{position:"bottom",show:!0,formatter:Ca(t,e)},stroke:{curve:Ma(t,!1),lineCap:"radialBar"===t.chart_type?"round":"butt",colors:"pie"===t.chart_type||"donut"===t.chart_type?["var(--card-background-color)"]:void 0,width:Pa(t,!1)},markers:{showNullDataPoints:!1},noData:{text:"Loading..."}};let n={};"minimal"===t.layout&&(n=ke);return t.apex_config?re(re(r,n),Da(t.apex_config)):re(r,n)}(this._config,this._hass,this._graphs);if(this._config.series_in_brush.length&&(e.chart.id=Math.random().toString(36).substring(7)),this._apexChart=new Se(t,e),this._apexChart.render(),this._config.series_in_brush.length){const t=this.shadowRoot.querySelector("#brush");this._apexBrush=new Se(t,function(t,e,i){var a;const r=fa(),n={chart:{locales:[t.locale&&r[t.locale]||(null==e?void 0:e.language)&&r[e.language]||pa()],defaultLocale:t.locale&&r[t.locale]&&t.locale||(null==e?void 0:e.language)&&r[e.language]&&e.language||"en",type:t.chart_type||"line",stacked:null==t?void 0:t.stacked,foreColor:"var(--primary-text-color)",width:"100%",height:"120px",zoom:{enabled:!1},toolbar:{show:!1},id:Math.random().toString(36).substring(7),brush:{target:i,enabled:!0}},grid:{strokeDashArray:3},fill:{opacity:ga(t,!0),type:La(t,!0)},series:xa(t,e,!0),xaxis:va(t,e),yaxis:{tickAmount:2,decimalsInFloat:1},tooltip:{enabled:!1},dataLabels:{enabled:!1},legend:{show:!1},stroke:{curve:Ma(t,!0),lineCap:"radialBar"===t.chart_type?"round":"butt",colors:"pie"===t.chart_type||"donut"===t.chart_type?["var(--card-background-color)"]:void 0,width:Pa(t,!0)},markers:{showNullDataPoints:!1},noData:{text:"Loading..."}};return(null===(a=t.brush)||void 0===a?void 0:a.apex_config)?re(n,Da(t.brush.apex_config)):n}(this._config,this._hass,e.chart.id)),this._apexBrush.render()}this._firstDataLoad()}}async _updateData(){var t,e,i,a,r,n,s,o,l,h,c,d,u,f,p,g;if(!this._config||!this._apexChart||!this._graphs)return;const{start:x,end:m}=this._getSpanDates(),v=new Date;this._lastUpdated=v;const b=!0!==(null===(t=xt())||void 0===t?void 0:t.editMode)&&this._config.cache;try{const t=this._graphs.map(((t,e)=>(t&&(t.cache=b),null==t?void 0:t._updateHistory(this._seriesOffset[e]?new Date(x.getTime()+this._seriesOffset[e]):x,this._seriesOffset[e]?new Date(m.getTime()+this._seriesOffset[e]):m))));await Promise.all(t);let y={series:[]};const w={series:[]};te.includes(this._config.chart_type)?(this._graphs.forEach(((t,e)=>{var i,a,r,n,s,o,l,h,c,d,u,f;if(!t)return[];const p=null===(i=this._config)||void 0===i?void 0:i.series[e].show.in_header;if(p&&"raw"!==p&&(this._headerState[e]="after_now"===p||"before_now"===p?t.nowValue(v.getTime()+(this._seriesOffset[e]?this._seriesOffset[e]:0),"before_now"===p):t.lastState),!(null===(a=this._config)||void 0===a?void 0:a.series[e].show.in_chart)&&!(null===(r=this._config)||void 0===r?void 0:r.series[e].show.in_brush))return;if(0===t.history.length)return(null===(n=this._config)||void 0===n?void 0:n.series[e].show.in_chart)&&y.series.push({data:[]}),void((null===(s=this._config)||void 0===s?void 0:s.series[e].show.in_brush)&&w.series.push({data:[]}));let g=[];const x=(this._seriesOffset[e]||0)-(this._seriesTimeDelta[e]||0);if(g=x?function(t,e){return e?t.map((t=>[t[0]-e,t[1]])):t}(t.history,x):[...t.history],"column"!==(null===(o=this._config)||void 0===o?void 0:o.series[e].type)&&(null===(l=this._config)||void 0===l?void 0:l.series[e].extend_to)){const t=g.slice(-1)[0];"end"===(null===(h=this._config)||void 0===h?void 0:h.series[e].extend_to)&&t[0]<m.getTime()?g.push([m.getTime(),t[1]]):"now"===(null===(c=this._config)||void 0===c?void 0:c.series[e].extend_to)&&t[0]<v.getTime()&&g.push([v.getTime(),t[1]])}const b=(null===(d=this._config)||void 0===d?void 0:d.series[e].invert)?{data:this._invertData(g)}:{data:g};(null===(u=this._config)||void 0===u?void 0:u.series[e].show.in_chart)&&y.series.push(b),(null===(f=this._config)||void 0===f?void 0:f.series[e].show.in_brush)&&w.series.push(b)})),y.annotations=this._computeAnnotations(x,m,v),this._yAxisConfig&&(y.yaxis=this._computeYAxisAutoMinMax(x,m)),this._apexBrush||(y.xaxis={min:x.getTime(),max:this._findEndOfChart(m,!1)})):y={series:this._graphs.flatMap(((t,e)=>{var i,a,r,n;if(!t)return[];let s=0;if(0===t.history.length)"raw"!==(null===(i=this._config)||void 0===i?void 0:i.series[e].show.in_header)&&(this._headerState[e]=null),s=0;else{const i=t.lastState;s=i||0,"raw"!==(null===(a=this._config)||void 0===a?void 0:a.series[e].show.in_header)&&(this._headerState[e]=i)}return(null===(r=this._config)||void 0===r?void 0:r.series[e].show.in_chart)?"radialBar"===(null===(n=this._config)||void 0===n?void 0:n.chart_type)?[fe(s,this._config.series[e].min,this._config.series[e].max)]:[s]:[]}))},y.colors=this._computeChartColors(!1),this._apexBrush&&(w.colors=this._computeChartColors(!0)),(null===(e=this._config.experimental)||void 0===e?void 0:e.color_threshold)&&this._config.series.some((t=>t.color_threshold))&&(y.markers={colors:oe(this._config.series_in_graph.flatMap(((t,e)=>"column"===t.type?[]:[this._colors[e]])))},y.legend={markers:{fillColors:oe(this._colors)}},y.tooltip={marker:{fillColors:y.legend.markers.fillColors}},y.fill={gradient:{type:"vertical",colorStops:this._config.series_in_graph.map(((t,e)=>{var i,a,r,n;if(!t.color_threshold||![void 0,"area","line"].includes(t.type))return[];const s=null===(a=null===(i=this._graphs)||void 0===i?void 0:i[t.index])||void 0===a?void 0:a.min,o=null===(n=null===(r=this._graphs)||void 0===r?void 0:r[t.index])||void 0===n?void 0:n.max;return void 0===s||void 0===o?[]:this._computeFillColorStops(t,s,o,le(this._colors[e]),t.invert)||[]}))}},this._apexBrush&&(w.fill={gradient:{type:"vertical",colorStops:this._config.series_in_brush.map(((t,e)=>{var i,a,r,n;if(!t.color_threshold||![void 0,"area","line"].includes(t.type))return[];const s=null===(a=null===(i=this._graphs)||void 0===i?void 0:i[t.index])||void 0===a?void 0:a.min,o=null===(n=null===(r=this._graphs)||void 0===r?void 0:r[t.index])||void 0===n?void 0:n.max;return void 0===s||void 0===o?[]:this._computeFillColorStops(t,s,o,le(this._colors[e]),t.invert)||[]}))}}));const S=this._apexBrush&&this._brushInit&&(null===(r=null===(a=null===(i=this._apexChart.axes)||void 0===i?void 0:i.w)||void 0===a?void 0:a.globals)||void 0===r?void 0:r.maxX)===(null===(o=null===(s=null===(n=this._apexBrush.axes)||void 0===n?void 0:n.w)||void 0===s?void 0:s.globals)||void 0===o?void 0:o.maxX),_=null===(c=null===(h=null===(l=this._apexChart.axes)||void 0===l?void 0:l.w)||void 0===h?void 0:h.globals)||void 0===c?void 0:c.minX,k=null===(f=null===(u=null===(d=this._apexChart.axes)||void 0===d?void 0:d.w)||void 0===u?void 0:u.globals)||void 0===f?void 0:f.maxX;if(this._headerState=[...this._headerState],null===(p=this._apexChart)||void 0===p||p.updateOptions(y,!1,!te.includes(this._config.chart_type)),this._apexBrush){const t=x.getTime(),e=this._findEndOfChart(m,!1);w.xaxis={min:t,max:e},S||!this._brushInit?w.chart={selection:{enabled:!0,xaxis:{min:w.xaxis.max-(this._brushSelectionSpan?this._brushSelectionSpan:this._graphSpan/4),max:w.xaxis.max}}}:w.chart={selection:{enabled:!0,xaxis:{min:_<t?t:_,max:_<t?t+(k-_):k}}};const i=le("var(--primary-text-color)");w.chart.selection.stroke={color:i},w.chart.selection.fill={color:i,opacity:.1},this._brushInit=!0,null===(g=this._apexBrush)||void 0===g||g.updateOptions(w,!1,!1)}}catch(y){ae(y)}this._updating=!1}_computeAnnotations(t,e,i){return Object.assign(Object.assign({},this._computeMinMaxPointsAnnotations(t,e)),this._computeNowAnnotation(i))}_computeMinMaxPointsAnnotations(t,e){var i;const a=t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate();return{points:null===(i=this._config)||void 0===i?void 0:i.series_in_graph.flatMap(((i,r)=>{var n,s;if(i.show.extremas){const{min:o,max:l}=(null===(s=null===(n=this._graphs)||void 0===n?void 0:n[i.index])||void 0===s?void 0:s.minMaxWithTimestamp(this._seriesOffset[r]?new Date(t.getTime()+this._seriesOffset[r]).getTime():t.getTime(),this._seriesOffset[r]?new Date(e.getTime()+this._seriesOffset[r]).getTime():e.getTime()))||{min:[0,null],max:[0,null]},h=le(this._colors[r]),c=he(h),d=[];if(o[0]&&["min","min+time",!0,"time"].includes(i.show.extremas)){const t="time"===i.show.extremas||"min+time"===i.show.extremas;d.push(...this._getPointAnnotationStyle(o,this._seriesOffset[r],h,c,i,r,i.invert,a,t))}if(l[0]&&["max","max+time",!0,"time"].includes(i.show.extremas)){const t="time"===i.show.extremas||"max+time"===i.show.extremas;d.push(...this._getPointAnnotationStyle(l,this._seriesOffset[r],h,c,i,r,i.invert,a,t))}return d}return[]}))}}_getPointAnnotationStyle(t,e,i,a,r,n,s=!1,o,l){var h,c,d;const u=[],f=(null===(c=null===(h=this._config)||void 0===h?void 0:h.apex_config)||void 0===c?void 0:c.yaxis)&&Array.isArray(this._config.apex_config.yaxis)&&this._config.apex_config.yaxis.length>1;if(u.push({x:e?t[0]-e:t[0],y:s&&t[1]?-t[1]:t[1],seriesIndex:n,yAxisIndex:f?n:0,marker:{strokeColor:i,fillColor:"var(--card-background-color)"},label:{text:ye(t[1],null===(d=this._hass)||void 0===d?void 0:d.locale,r.float_precision),borderColor:"var(--card-background-color)",borderWidth:2,style:{background:i,color:a}}}),l){let i=Bt(le("var(--card-background-color)"));i=i.isValid&&i.getLuminance()>.5?i.darken(20):i.lighten(20);const a=he(i.toHexString());let r={timeStyle:"medium"};o||(r.dateStyle="medium"),r=Object.assign(Object.assign({},r),ve(this._config,this._hass)?{hour12:!0}:{hourCycle:"h23"});const l=be(this._config,this._hass);u.push({x:e?t[0]-e:t[0],y:s&&t[1]?-t[1]:t[1],seriesIndex:n,yAxisIndex:f?n:0,marker:{size:0},label:{text:`${Intl.DateTimeFormat(l,r).format(t[0])}`,borderColor:"var(--card-background-color)",offsetY:-22,borderWidth:0,style:{background:i.toHexString(),color:a,fontSize:"8px",fontWeight:200}}})}return u}_computeNowAnnotation(t){var e,i;if(null===(i=null===(e=this._config)||void 0===e?void 0:e.now)||void 0===i?void 0:i.show){const e=le(this._config.now.color||"var(--primary-color)"),i=he(e);return{xaxis:[{x:t.getTime(),strokeDashArray:3,label:{text:this._config.now.label,borderColor:e,style:{color:i,background:e}},borderColor:e}]}}return{}}_computeYAxisAutoMinMax(t,e){var i,a,r;if(this._config)return null===(i=this._yAxisConfig)||void 0===i||i.map((i=>{var a,r;if(i.min_type!==nt.FIXED||i.max_type!==nt.FIXED){const n=null===(a=i.series_id)||void 0===a?void 0:a.map((i=>{var a,r;const n=null===(a=this._graphs[i])||void 0===a?void 0:a.minMaxWithTimestampForYAxis(this._seriesOffset[i]?new Date(t.getTime()+this._seriesOffset[i]).getTime():t.getTime(),this._seriesOffset[i]?new Date(e.getTime()+this._seriesOffset[i]).getTime():e.getTime());if(n){if(null===(r=this._config)||void 0===r?void 0:r.series[i].invert){const t=n.min[1],e=n.max[1];null!==t&&(n.max[1]=-t),null!==e&&(n.min[1]=-e)}return n}}));let s=null,o=null;null==n||n.forEach((t=>{t&&((null==s||null!==t.min[1]&&s>t.min[1])&&(s=t.min[1]),(null==o||null!==t.max[1]&&o<t.max[1])&&(o=t.max[1]))})),void 0!==i.align_to&&(null!==s&&i.min_type!==nt.FIXED&&s%i.align_to!=0&&(s=s>=0?s-s%i.align_to:-(i.align_to+s%i.align_to-s)),null!==o&&i.max_type!==nt.FIXED&&o%i.align_to!=0&&(o=o>=0?i.align_to-o%i.align_to+o:o%i.align_to-o)),null===(r=i.series_id)||void 0===r||r.forEach((t=>{null!==s&&i.min_type!==nt.FIXED&&(this._config.apex_config.yaxis[t].min=this._getMinMaxBasedOnType(!0,s,i.min,i.min_type)),null!==o&&i.max_type!==nt.FIXED&&(this._config.apex_config.yaxis[t].max=this._getMinMaxBasedOnType(!1,o,i.max,i.max_type))}))}})),null===(r=null===(a=this._config)||void 0===a?void 0:a.apex_config)||void 0===r?void 0:r.yaxis}_getMinMaxBasedOnType(t,e,i,a){switch(a){case nt.AUTO:return e;case nt.SOFT:return t&&e>i||!t&&e<i?i:e;case nt.ABSOLUTE:return e+i;default:return e}}_getTypeOfMinMax(t){const e=/[+-]?\d+(\.\d+)?/g;if("number"==typeof t)return[t,nt.FIXED];if(void 0===t||"auto"===t)return[void 0,nt.AUTO];if("string"==typeof t&&"auto"!==t){const i=t.match(e);if(!i||1!==i.length)throw new Error(`Bad yaxis min/max format: ${t}`);const a=parseFloat(i[0]);if(t.startsWith("~"))return[a,nt.SOFT];if(t.startsWith("|")&&t.endsWith("|"))return[a,nt.ABSOLUTE]}throw new Error(`Bad yaxis min/max format: ${t}`)}_computeChartColors(t){var e,i,a;const r=oe(t?this._brushColors:this._colors),n=t?null===(e=this._config)||void 0===e?void 0:e.series_in_brush:null===(i=this._config)||void 0===i?void 0:i.series_in_graph;return null==n||n.forEach(((t,e)=>{var i,a;if((null===(a=null===(i=this._config)||void 0===i?void 0:i.experimental)||void 0===a?void 0:a.color_threshold)&&(ee.includes(this._config.chart_type)||"column"===t.type)&&t.color_threshold&&t.color_threshold.length>0){const i=this._colors;r[e]=function({value:a},r=t.color_threshold,n=i[e]){let s=r[0].color||n;return r.forEach((t=>{a>t.value&&(s=t.color||n)})),le(s)}}})),r.slice(0,null===(a=this._config)||void 0===a?void 0:a.series_in_graph.length)}_computeFillColorStops(t,e,i,a,r=!1){if(!t.color_threshold)return;const n=i-e,s=t.color_threshold.flatMap(((s,o,l)=>{if(s.value>i&&l[o-1]&&l[o-1].value>i||s.value<e&&l[o+1]&&l[o+1].value<e)return[];let h;const c=void 0!==t.opacity?t.opacity:"area"===t.type?.7:1;let d=void 0===s.opacity?c:s.opacity;if(s.value>i&&l[o-1]){const t=(i-l[o-1].value)/(s.value-l[o-1].value);h=pe(Bt(l[o-1].color||a).toHexString(),Bt(s.color||a).toHexString(),t);const e=void 0===l[o-1].opacity?c:l[o-1].opacity,r=void 0===s.opacity?c:s.opacity;d=e>r?(e-r)*(1-t)+r:(r-e)*t+e,d=d<0?-d:d}else if(s.value<e&&l[o+1]){const t=(l[o+1].value-e)/(l[o+1].value-s.value);h=pe(Bt(l[o+1].color||a).toHexString(),Bt(s.color||a).toHexString(),t);const i=void 0===l[o+1].opacity?c:l[o+1].opacity,r=void 0===s.opacity?c:s.opacity;d=i>r?(i-r)*(1-t)+r:(r-i)*t+i,d=d<0?-d:d}return h=h||Bt(s.color||a).toHexString(),[void 0,"line"].includes(t.type)&&(h=Bt(h).setAlpha(d).toHex8String()),[{color:h||Bt(s.color||a).toHexString(),offset:n<=0?0:r?100-(i-s.value)*(100/n):(i-s.value)*(100/n),opacity:d}]}));return r?s:s.reverse()}_computeHeaderStateColor(t,e){var i,a,r;let n="";if(null===(a=null===(i=this._config)||void 0===i?void 0:i.header)||void 0===a?void 0:a.colorize_states){if(!((null===(r=this._config.experimental)||void 0===r?void 0:r.color_threshold)&&t.show.header_color_threshold&&t.color_threshold&&t.color_threshold.length>0&&null!==e))return this._headerColors&&this._headerColors.length>0?`color: ${this._headerColors[t.index]};`:"";{const i=t.color_threshold.findIndex((t=>t.value>e));if(i<0)n=le(t.color_threshold[t.color_threshold.length-1].color||this._headerColors[t.index]);else if(0===i)n=le(t.color_threshold[0].color||this._headerColors[t.index]);else{const a=t.color_threshold[i-1],r=t.color_threshold[i];if("column"===t.type)n=le(a.color||this._headerColors[t.index]);else{const i=(e-a.value)/(r.value-a.value);n=pe(le(a.color||this._headerColors[t.index]),le(r.color||this._headerColors[t.index]),i)}}}}return n?`color: ${n};`:""}_computeLastState(t,e){var i,a;return null===t?t:ye(t,null===(i=this._hass)||void 0===i?void 0:i.locale,null===(a=this._config)||void 0===a?void 0:a.series[e].float_precision)}_findEndOfChart(t,e){var i,a;const r=new Date(t);let n=0;const s=e?null===(i=this._config)||void 0===i?void 0:i.series_in_brush:null===(a=this._config)||void 0===a?void 0:a.series_in_graph;return(null==s?void 0:s.reduce(((t,e)=>t&&"raw"!==e.group_by.func),(null==s?void 0:s.length)>0))&&(n=null==s?void 0:s.reduce(((t,e)=>{const i=Gt(e.group_by.duration);return-1===t||i<t?i:t}),-1)),new Date(r.getTime()-(n||0)).getTime()}_invertData(t){return t.map((t=>null===t[1]?t:[t[0],-t[1]]))}_getSpanDates(){var t,e,i,a;let r=new Date,n=new Date(r.getTime()-this._graphSpan+1);if(null===(e=null===(t=this._config)||void 0===t?void 0:t.span)||void 0===e?void 0:e.start){n=Kt().startOf(this._config.span.start).toDate(),r=new Date(n.getTime()+this._graphSpan)}else if(null===(a=null===(i=this._config)||void 0===i?void 0:i.span)||void 0===a?void 0:a.end){const t=Kt().endOf(this._config.span.end);r=new Date(t.toDate().getTime()+1),n=new Date(r.getTime()-this._graphSpan+1)}return this._offset&&(r.setTime(r.getTime()+this._offset),n.setTime(n.getTime()+this._offset)),{start:n,end:r}}_handleAction(t,e){var i,a;if(null===(i=t.detail)||void 0===i?void 0:i.action){const i=e.header_actions?JSON.parse(JSON.stringify(e.header_actions)):{};switch(t.detail.action){case"tap":case"hold":case"double_tap":i.entity=(null===(a=i[`${t.detail.action}_action`])||void 0===a?void 0:a.entity)||e.entity,gt(this,this._hass,i,t.detail.action)}}}_handleTitleAction(t){var e,i,a,r,n,s;if(null===(e=t.detail)||void 0===e?void 0:e.action){const e=(null===(a=null===(i=this._config)||void 0===i?void 0:i.header)||void 0===a?void 0:a.title_actions)?JSON.parse(JSON.stringify(null===(n=null===(r=this._config)||void 0===r?void 0:r.header)||void 0===n?void 0:n.title_actions)):{};switch(t.detail.action){case"tap":case"hold":case"double_tap":e.entity=null===(s=e[`${t.detail.action}_action`])||void 0===s?void 0:s.entity,gt(this,this._hass,e,t.detail.action)}}}handleRippleActivate(t,e){var i;const a=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById(`ripple-${e}`);a&&"function"==typeof a.startFocus&&a.startPress(t)}handleRippleDeactivate(t,e){var i;const a=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById(`ripple-${e}`);a&&"function"==typeof a.startFocus&&a.endPress()}handleRippleFocus(t,e){var i;const a=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById(`ripple-${e}`);a&&"function"==typeof a.startFocus&&a.startFocus()}handleRippleBlur(t,e){var i;const a=null===(i=this.shadowRoot)||void 0===i?void 0:i.getElementById(`ripple-${e}`);a&&"function"==typeof a.startFocus&&a.endFocus()}getCardSize(){return 3}static getStubConfig(t,e,i){const a=(t,e,i,r,n,s)=>{const o=[];(null==n?void 0:n.length)&&o.push((t=>n.includes(t.split(".")[0]))),s&&o.push((e=>t.states[e]&&s(t.states[e])));const l=((t,e,i)=>{(!i||i>t.length)&&(i=t.length);const a=[];for(let r=0;r<t.length&&a.length<i;r++){let i=!0;for(const a of e)if(!a(t[r])){i=!1;break}i&&a.push(t[r])}return a})(i,o,e);if(l.length<e&&r.length){const i=a(t,e-l.length,r,[],n,s);l.push(...i)}return l},r=a(t,2,e,i,["sensor"],(t=>!isNaN(Number(t.state)))),n={header:{show:!0,title:"ApexCharts-Card",show_states:!0,colorize_states:!0},series:[]};return r[0]&&(n.series[0]={entity:r[0],data_generator:"// REMOVE ME\nconst now = new Date();\nconst data = [];\nfor(let i = 0; i <= 24; i++) {\n data.push([now.getTime() - i * 1000 * 60 * 60, Math.floor((Math.random() * 10) + 1)])\n}\nreturn data.reverse();\n"}),r[1]&&(n.series[1]={entity:r[1],type:"column",data_generator:"// REMOVE ME\nconst now = new Date();\nconst data = [];\nfor(let i = 0; i <= 24; i++) {\n data.push([now.getTime() - i * 1000 * 60 * 60, Math.floor((Math.random() * 10) + 1)])\n}\nreturn data.reverse();\n"}),n}};t([Q({type:Boolean})],tr.prototype,"_updating",void 0),t([Q({attribute:!1})],tr.prototype,"_config",void 0),t([Q({attribute:!1})],tr.prototype,"_headerState",void 0),t([Q({attribute:!1})],tr.prototype,"_lastUpdated",void 0),t([Q({type:Boolean})],tr.prototype,"_warning",void 0),t([function(t){return(({finisher:t,descriptor:e})=>(i,a)=>{var r;if(void 0===a){const a=null!==(r=i.originalKey)&&void 0!==r?r:i.key,n=null!=e?{kind:"method",placement:"prototype",key:a,descriptor:e(i.key)}:{...i,key:a};return null!=t&&(n.finisher=function(e){t(e,a)}),n}{const r=i.constructor;void 0!==e&&Object.defineProperty(i,a,e(a)),null==t||t(r,a)}})({finisher:(e,i)=>{Object.assign(e.prototype[i],t)}})}({passive:!0})],tr.prototype,"handleRippleActivate",null),tr=t([(t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:a}=e;return{kind:i,elements:a,finisher(e){window.customElements.define(t,e)}}})(t,e))("apexcharts-card")],tr),window.customCards=window.customCards||[],window.customCards.push({type:"apexcharts-card",name:"ApexCharts Card",preview:!0,description:"A graph card based on ApexCharts"});