-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.js
23 lines (23 loc) · 865 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import*as e from"vue";import{defineComponent as t,ref as i,watch as r,nextTick as n,onMounted as s,onUnmounted as a,resolveComponent as o,openBlock as l,createElementBlock as c,createVNode as h,withCtx as d,createElementVNode as u,createCommentVNode as g,normalizeStyle as f,createTextVNode as p}from"vue";var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function m(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})})),t}var b={exports:{}};self;var y=x(b.exports=function(e){return(()=>{var t,i,r={993:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=993,e.exports=t},504:(e,t,i)=>{i.r(t),i.d(t,{VGrid:()=>Eo,VGridPlugin:()=>Po,VGridVueEditor:()=>To,VGridVueTemplate:()=>_o,VGridVueTemplateConstructor:()=>Ro,default:()=>Mo});var r={};i.r(r),i.d(r,{RevoGrid:()=>no,RevogrClipboard:()=>so,RevogrData:()=>ao,RevogrEdit:()=>oo,RevogrFilterPanel:()=>lo,RevogrFocus:()=>co,RevogrHeader:()=>ho,RevogrOrderEditor:()=>uo,RevogrOverlaySelection:()=>go,RevogrRowHeaders:()=>fo,RevogrScrollVirtual:()=>po,RevogrTempRange:()=>vo,RevogrViewportScroll:()=>xo,defineCustomElements:()=>mo,setAssetPath:()=>ve,setPlatformOptions:()=>xe});var n=i(103);let s,a,o,l=!1,c=!1,h=!1,d=!1,u=null,g=!1;const f="undefined"!=typeof window?window:{},p=f.document||{head:{}},v=(f.HTMLElement,{$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,i,r)=>e.addEventListener(t,i,r),rel:(e,t,i,r)=>e.removeEventListener(t,i,r),ce:(e,t)=>new CustomEvent(e,t)}),x=(()=>{let e=!1;try{p.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch(e){}return e})(),m=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),b=(e,t,i,r)=>{i&&i.map((([i,r,n])=>{const s=w(e,i),a=y(t,n),o=C(i);v.ael(s,r,a,o),(t.$rmListeners$=t.$rmListeners$||[]).push((()=>v.rel(s,r,a,o)))}))},y=(e,t)=>i=>{try{e.$hostElement$[t](i)}catch(e){Ce(e)}},w=(e,t)=>4&t?p:8&t?f:16&t?p.body:e,C=e=>x?{passive:0!=(1&e),capture:0!=(2&e)}:0!=(2&e),S="http://www.w3.org/1999/xlink",k=new WeakMap,L=(e,t,i,r)=>{let n=A(t,i),s=Se.get(n);if(e=11===e.nodeType?e:p,s)if("string"==typeof s){e=e.head||e;let t,i=k.get(e);i||k.set(e,i=new Set),i.has(n)||(t=p.createElement("style"),t.innerHTML=s,e.insertBefore(t,e.querySelector("link")),i&&i.add(n))}else!e.adoptedStyleSheets.includes(s)&&(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return n},A=(e,t)=>"sc-"+(t&&32&e.$flags$?e.$tagName$+"-"+t:e.$tagName$),E={},z=e=>"object"==(e=typeof e)||"function"===e,P=(e,t,...i)=>{let r=null,n=null,s=null,a=!1,o=!1,l=[];const c=t=>{for(let i=0;i<t.length;i++)r=t[i],Array.isArray(r)?c(r):null!=r&&"boolean"!=typeof r&&((a="function"!=typeof e&&!z(r))&&(r=String(r)),a&&o?l[l.length-1].$text$+=r:l.push(a?_(null,r):r),o=a)};if(c(i),t&&(t.key&&(n=t.key),t.name&&(s=t.name),1)){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}if("function"==typeof e)return e(null===t?{}:t,l,M);const h=_(e,null);return h.$attrs$=t,l.length>0&&(h.$children$=l),h.$key$=n,h.$name$=s,h},_=(e,t)=>({$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null,$name$:null}),R={},T=e=>e&&e.$tag$===R,M={forEach:(e,t)=>e.map(F).forEach(t),map:(e,t)=>e.map(F).map(t).map(I)},F=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),I=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),P(e.vtag,t,...e.vchildren||[])}const t=_(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},O=(e,t,i,r,n,s)=>{if(i!==r){let a=we(e,t),o=t.toLowerCase();if("class"===t){const t=e.classList,n=H(i),s=H(r);t.remove(...n.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!n.includes(e))))}else if("style"===t){for(const t in i)r&&null!=r[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in r)i&&r[t]===i[t]||(t.includes("-")?e.style.setProperty(t,r[t]):e.style[t]=r[t])}else if("key"===t);else if("ref"===t)r&&r(e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){const l=z(r);if((a||l&&null!==r)&&!n)try{if(e.tagName.includes("-"))e[t]=r;else{let n=null==r?"":r;"list"===t?a=!1:null!=i&&e[t]==n||(e[t]=n)}}catch(e){}let c=!1;o!==(o=o.replace(/^xlink\:?/,""))&&(t=o,c=!0),null==r||!1===r?!1===r&&""!==e.getAttribute(t)||(c?e.removeAttributeNS(S,t):e.removeAttribute(t)):(!a||4&s||n)&&!l&&(r=!0===r?"":r,c?e.setAttributeNS(S,t,r):e.setAttribute(t,r))}else t="-"===t[2]?t.slice(3):we(f,o)?o.slice(2):o[2]+t.slice(3),i&&v.rel(e,t,i,!1),r&&v.ael(e,t,r,!1)}},D=/\s/,H=e=>e?e.split(D):[],N=(e,t,i,r)=>{const n=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,s=e&&e.$attrs$||E,a=t.$attrs$||E;for(r in s)r in a||O(n,r,s[r],void 0,i,t.$flags$);for(r in a)O(n,r,s[r],a[r],i,t.$flags$)},X=(e,t,i,r)=>{let n,c,u,g=t.$children$[i],f=0;if(!l&&(h=!0,"slot"===g.$tag$&&(s&&r.classList.add(s+"-s"),g.$flags$|=g.$children$?2:1)),null!==g.$text$)n=g.$elm$=p.createTextNode(g.$text$);else if(1&g.$flags$)n=g.$elm$=p.createTextNode("");else{if(!d&&(d="svg"===g.$tag$),n=g.$elm$=p.createElementNS(d?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&g.$flags$?"slot-fb":g.$tag$),d&&"foreignObject"===g.$tag$&&(d=!1),N(null,g,d),null!=s&&n["s-si"]!==s&&n.classList.add(n["s-si"]=s),g.$children$)for(f=0;f<g.$children$.length;++f)c=X(e,g,f,n),c&&n.appendChild(c);"svg"===g.$tag$?d=!1:"foreignObject"===n.tagName&&(d=!0)}return n["s-hn"]=o,3&g.$flags$&&(n["s-sr"]=!0,n["s-cr"]=a,n["s-sn"]=g.$name$||"",u=e&&e.$children$&&e.$children$[i],u&&u.$tag$===g.$tag$&&e.$elm$&&Y(e.$elm$,!1)),n},Y=(e,t)=>{v.$flags$|=1;const i=e.childNodes;for(let e=i.length-1;e>=0;e--){const r=i[e];r["s-hn"]!==o&&r["s-ol"]&&(V(r).insertBefore(r,$(r)),r["s-ol"].remove(),r["s-ol"]=void 0,h=!0),t&&Y(r,t)}v.$flags$&=-2},B=(e,t,i,r,n,s)=>{let a,l=e["s-cr"]&&e["s-cr"].parentNode||e;for(l.shadowRoot&&l.tagName===o&&(l=l.shadowRoot);n<=s;++n)r[n]&&(a=X(null,i,n,e),a&&(r[n].$elm$=a,l.insertBefore(a,$(t))))},W=(e,t,i,r,n)=>{for(;t<=i;++t)(r=e[t])&&(n=r.$elm$,J(r),c=!0,n["s-ol"]?n["s-ol"].remove():Y(n,!0),n.remove())},j=(e,t)=>e.$tag$===t.$tag$&&("slot"===e.$tag$?e.$name$===t.$name$:e.$key$===t.$key$),$=e=>e&&e["s-ol"]||e,V=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,G=(e,t)=>{const i=t.$elm$=e.$elm$,r=e.$children$,n=t.$children$,s=t.$tag$,a=t.$text$;let o;null!==a?(o=i["s-cr"])?o.parentNode.textContent=a:e.$text$!==a&&(i.data=a):(d="svg"===s||"foreignObject"!==s&&d,"slot"===s||N(e,t,d),null!==r&&null!==n?((e,t,i,r)=>{let n,s,a=0,o=0,l=0,c=0,h=t.length-1,d=t[0],u=t[h],g=r.length-1,f=r[0],p=r[g];for(;a<=h&&o<=g;)if(null==d)d=t[++a];else if(null==u)u=t[--h];else if(null==f)f=r[++o];else if(null==p)p=r[--g];else if(j(d,f))G(d,f),d=t[++a],f=r[++o];else if(j(u,p))G(u,p),u=t[--h],p=r[--g];else if(j(d,p))"slot"!==d.$tag$&&"slot"!==p.$tag$||Y(d.$elm$.parentNode,!1),G(d,p),e.insertBefore(d.$elm$,u.$elm$.nextSibling),d=t[++a],p=r[--g];else if(j(u,f))"slot"!==d.$tag$&&"slot"!==p.$tag$||Y(u.$elm$.parentNode,!1),G(u,f),e.insertBefore(u.$elm$,d.$elm$),u=t[--h],f=r[++o];else{for(l=-1,c=a;c<=h;++c)if(t[c]&&null!==t[c].$key$&&t[c].$key$===f.$key$){l=c;break}l>=0?(s=t[l],s.$tag$!==f.$tag$?n=X(t&&t[o],i,l,e):(G(s,f),t[l]=void 0,n=s.$elm$),f=r[++o]):(n=X(t&&t[o],i,o,e),f=r[++o]),n&&V(d.$elm$).insertBefore(n,$(d.$elm$))}a>h?B(e,null==r[g+1]?null:r[g+1].$elm$,i,r,o,g):o>g&&W(t,a,h)})(i,r,t,n):null!==n?(null!==e.$text$&&(i.textContent=""),B(i,null,t,n,0,n.length-1)):null!==r&&W(r,0,r.length-1),d&&"svg"===s&&(d=!1))},U=e=>{let t,i,r,n,s,a,o=e.childNodes;for(i=0,r=o.length;i<r;i++)if(t=o[i],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,n=0;n<r;n++)if(a=o[n].nodeType,o[n]["s-hn"]!==t["s-hn"]||""!==s){if(1===a&&s===o[n].getAttribute("slot")){t.hidden=!0;break}}else if(1===a||3===a&&""!==o[n].textContent.trim()){t.hidden=!0;break}U(t)}},Z=[],q=e=>{let t,i,r,n,s,a,o=0,l=e.childNodes,h=l.length;for(;o<h;o++){if(t=l[o],t["s-sr"]&&(i=t["s-cr"])&&i.parentNode)for(r=i.parentNode.childNodes,n=t["s-sn"],a=r.length-1;a>=0;a--)i=r[a],i["s-cn"]||i["s-nr"]||i["s-hn"]===t["s-hn"]||(K(i,n)?(s=Z.find((e=>e.$nodeToRelocate$===i)),c=!0,i["s-sn"]=i["s-sn"]||n,s?s.$slotRefNode$=t:Z.push({$slotRefNode$:t,$nodeToRelocate$:i}),i["s-sr"]&&Z.map((e=>{K(e.$nodeToRelocate$,i["s-sn"])&&(s=Z.find((e=>e.$nodeToRelocate$===i)),s&&!e.$slotRefNode$&&(e.$slotRefNode$=s.$slotRefNode$))}))):Z.some((e=>e.$nodeToRelocate$===i))||Z.push({$nodeToRelocate$:i}));1===t.nodeType&&q(t)}},K=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,J=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(J)},Q=(e,t)=>{const i=e.$hostElement$,r=e.$cmpMeta$,n=e.$vnode$||_(null,null),d=T(t)?t:P(null,null,t);if(o=i.tagName,r.$attrsToReflect$&&(d.$attrs$=d.$attrs$||{},r.$attrsToReflect$.map((([e,t])=>d.$attrs$[t]=i[e]))),d.$tag$=null,d.$flags$|=4,e.$vnode$=d,d.$elm$=n.$elm$=i.shadowRoot||i,s=i["s-sc"],a=i["s-cr"],l=0!=(1&r.$flags$),c=!1,G(n,d),v.$flags$|=1,h){let e,t,i,r,n,s;q(d.$elm$);let a=0;for(;a<Z.length;a++)e=Z[a],t=e.$nodeToRelocate$,t["s-ol"]||(i=p.createTextNode(""),i["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=i,t));for(a=0;a<Z.length;a++)if(e=Z[a],t=e.$nodeToRelocate$,e.$slotRefNode$){for(r=e.$slotRefNode$.parentNode,n=e.$slotRefNode$.nextSibling,i=t["s-ol"];i=i.previousSibling;)if(s=i["s-nr"],s&&s["s-sn"]===t["s-sn"]&&r===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){n=s;break}(!n&&r!==t.parentNode||t.nextSibling!==n)&&t!==n&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),r.insertBefore(t,n))}else 1===t.nodeType&&(t.hidden=!0)}c&&U(d.$elm$),v.$flags$&=-2,Z.length=0},ee=(e,t,i)=>{const r=e;return{emit:e=>te(r,t,{bubbles:!!(4&i),composed:!!(2&i),cancelable:!!(1&i),detail:e})}},te=(e,t,i)=>{const r=v.ce(t,i);return e.dispatchEvent(r),r},ie=(e,t)=>(e.$flags$|=16,e.$ancestorComponent$,Re((()=>re(e,t)))),re=(e,t)=>{const i=e.$hostElement$,r=(e.$cmpMeta$.$tagName$,()=>{}),n=i;let s;return t?(he(i),s=le(n,"componentWillLoad")):(he(i),s=le(n,"componentWillUpdate")),he(i),s=ce(s,(()=>le(n,"componentWillRender"))),r(),ce(s,(()=>ne(e,n,t)))},ne=async(e,t,i)=>{const r=e.$hostElement$;e.$cmpMeta$.$tagName$,r["s-rc"],i&&(e=>{const t=e.$cmpMeta$,i=e.$hostElement$,r=t.$flags$;t.$tagName$;const n=L(i.shadowRoot?i.shadowRoot:i.getRootNode(),t,e.$modeName$);10&r&&(i["s-sc"]=n,i.classList.add(n+"-h"),2&r&&i.classList.add(n+"-s"))})(e),e.$cmpMeta$.$tagName$,se(e,t),ae(e)},se=(e,t,i)=>{try{u=t,t=t.render&&t.render(),e.$flags$&=-17,e.$flags$|=2,Q(e,t)}catch(t){Ce(t,e.$hostElement$)}return u=null,null},ae=e=>{e.$cmpMeta$.$tagName$;const t=()=>{},i=e.$hostElement$;e.$ancestorComponent$,le(i,"componentDidRender"),64&e.$flags$?(le(i,"componentDidUpdate"),t()):(e.$flags$|=64,le(i,"componentDidLoad"),t())},oe=e=>{{const t=be(e),i=t.$hostElement$.isConnected;return i&&2==(18&t.$flags$)&&ie(t,!1),i}},le=(e,t,i)=>{if(e&&e[t])try{return e[t](i)}catch(e){Ce(e)}},ce=(e,t)=>e&&e.then?e.then(t):t(),he=(e,t)=>{},de=(e,t,i)=>{if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const i=Object.entries(t.$members$),r=e.prototype;i.map((([e,[i]])=>{(31&i||32&i)&&Object.defineProperty(r,e,{get(){return t=e,be(this).$instanceValues$.get(t);var t},set(i){((e,t,i,r)=>{const n=be(e),s=e,a=n.$instanceValues$.get(t),o=n.$flags$,l=s;var c,h;if(c=i,h=r.$members$[t][0],(i=null==c||z(c)?c:4&h?"false"!==c&&(""===c||!!c):2&h?parseFloat(c):1&h?String(c):c)!==a&&(n.$instanceValues$.set(t,i),1)){if(r.$watchers$&&128&o){const e=r.$watchers$[t];e&&e.map((e=>{try{l[e](i,a,t)}catch(e){Ce(e,s)}}))}if(2==(18&o)){if(l.componentShouldUpdate&&!1===l.componentShouldUpdate(i,a,t))return;ie(n,!1)}}})(this,e,i,t)},configurable:!0,enumerable:!0})}));{const n=new Map;r.attributeChangedCallback=function(e,t,i){v.jmp((()=>{const t=n.get(e);this[t]=(null!==i||"boolean"!=typeof this[t])&&i}))},e.observedAttributes=i.filter((([e,t])=>15&t[0])).map((([e,i])=>{const r=i[1]||e;return n.set(r,e),512&i[0]&&t.$attrsToReflect$.push([e,r]),r}))}}return e},ue=async(e,t,i,r,n)=>{if(0==(32&t.$flags$)&&(n=e.constructor,t.$flags$|=160,n.style)){let r=n.style;"string"!=typeof r&&(r=r[t.$modeName$=(e=>ke.map((t=>t(e))).find((e=>!!e)))(e)]);const s=A(i,t.$modeName$);Se.has(s)||(i.$tagName$,((e,t,i)=>{let r=Se.get(e);m&&i?(r=r||new CSSStyleSheet,r.replace(t)):r=t,Se.set(e,r)})(s,r,!!(1&i.$flags$)))}t.$ancestorComponent$,ie(t,!0)},ge=e=>{},fe=e=>{const t=e["s-cr"]=p.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},pe=(e,t)=>{const i={$flags$:t[0],$tagName$:t[1]};i.$members$=t[2],i.$listeners$=t[3],i.$watchers$=e.$watchers$,i.$attrsToReflect$=[];const r=e.prototype.connectedCallback,n=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){ye(this,i)},connectedCallback(){(e=>{if(0==(1&v.$flags$)){const t=be(e),i=t.$cmpMeta$;i.$tagName$,1&t.$flags$?(b(e,t,i.$listeners$),ge(t.$lazyInstance$)):(t.$flags$|=1,12&i.$flags$&&fe(e),ue(e,t,i))}})(this),r&&r.call(this)},disconnectedCallback(){(e=>{if(0==(1&v.$flags$)){const t=be(e);t.$rmListeners$&&(t.$rmListeners$.map((e=>e())),t.$rmListeners$=void 0)}})(this),n&&n.call(this)}}),e.is=i.$tagName$,de(e,i)},ve=e=>v.$resourcesUrl$=e,xe=e=>Object.assign(v,e),me=new WeakMap,be=e=>me.get(e),ye=(e,t)=>{const i={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return b(e,i,t.$listeners$),me.set(e,i)},we=(e,t)=>t in e,Ce=(e,t)=>(0,console.error)(e,t),Se=new Map,ke=[],Le=[],Ae=[],Ee=(e,t)=>i=>{e.push(i),g||(g=!0,t&&4&v.$flags$?_e(Pe):v.raf(Pe))},ze=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){Ce(e)}e.length=0},Pe=()=>{ze(Le),ze(Ae),(g=Le.length>0)&&v.raf(Pe)},_e=e=>Promise.resolve(void 0).then(e),Re=Ee(Ae,!0);class Te{constructor(){this.defaultRowSize=32}}class Me{constructor(){this.defaultRowSize=27}}class Fe{constructor(){this.defaultRowSize=42}}const Ie="default",Oe=[Ie,"material","compact","darkMaterial","darkCompact"];class De{constructor(e){this.customRowSize=0,this.customRowSize=e.rowSize,this.register("default")}get theme(){return this.currentTheme}get rowSize(){return this.customRowSize||this.currentTheme.defaultRowSize}set rowSize(e){this.customRowSize=e}register(e){switch(De.getTheme(e)){case"material":case"darkMaterial":this.currentTheme=new Fe;break;case"compact":case"darkCompact":this.currentTheme=new Te;break;default:this.currentTheme=new Me}}static getTheme(e){return Oe.indexOf(e)>-1?e:Ie}}var He;He=e=>{let t=e.theme||e.getAttribute("theme");"string"==typeof t&&(t=t.trim());const i=De.getTheme(t);return i!==t&&e.setAttribute("theme",i),i},ke.push(He);var Ne=function(e,t,i,r){var n=-1,s=null==e?0:e.length;for(r&&s&&(i=e[++n]);++n<s;)i=t(i,e[n],n,e);return i},Xe=function(e,t,i){for(var r=-1,n=Object(e),s=i(e),a=s.length;a--;){var o=s[++r];if(!1===t(n[o],o,n))break}return e},Ye="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{};function Be(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},i.exports),i.exports}var We="object"==typeof Ye&&Ye&&Ye.Object===Object&&Ye,je="object"==typeof self&&self&&self.Object===Object&&self,$e=We||je||Function("return this")(),Ve=$e.Symbol,Ge=Object.prototype,Ue=Ge.hasOwnProperty,Ze=Ge.toString,qe=Ve?Ve.toStringTag:void 0,Ke=Object.prototype.toString,Je=Ve?Ve.toStringTag:void 0,Qe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Je&&Je in Object(e)?function(e){var t=Ue.call(e,qe),i=e[qe];try{e[qe]=void 0;var r=!0}catch(e){}var n=Ze.call(e);return r&&(t?e[qe]=i:delete e[qe]),n}(e):function(e){return Ke.call(e)}(e)},et=function(e){return null!=e&&"object"==typeof e},tt=function(e){return et(e)&&"[object Arguments]"==Qe(e)},it=Object.prototype,rt=it.hasOwnProperty,nt=it.propertyIsEnumerable,st=tt(function(){return arguments}())?tt:function(e){return et(e)&&rt.call(e,"callee")&&!nt.call(e,"callee")},at=Array.isArray,ot=function(){return!1},lt=Be((function(e,t){var i=t&&!t.nodeType&&t,r=i&&e&&!e.nodeType&&e,n=r&&r.exports===i?$e.Buffer:void 0,s=(n?n.isBuffer:void 0)||ot;e.exports=s})),ct=/^(?:0|[1-9]\d*)$/,ht=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&ct.test(e))&&e>-1&&e%1==0&&e<t},dt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ut={};ut["[object Float32Array]"]=ut["[object Float64Array]"]=ut["[object Int8Array]"]=ut["[object Int16Array]"]=ut["[object Int32Array]"]=ut["[object Uint8Array]"]=ut["[object Uint8ClampedArray]"]=ut["[object Uint16Array]"]=ut["[object Uint32Array]"]=!0,ut["[object Arguments]"]=ut["[object Array]"]=ut["[object ArrayBuffer]"]=ut["[object Boolean]"]=ut["[object DataView]"]=ut["[object Date]"]=ut["[object Error]"]=ut["[object Function]"]=ut["[object Map]"]=ut["[object Number]"]=ut["[object Object]"]=ut["[object RegExp]"]=ut["[object Set]"]=ut["[object String]"]=ut["[object WeakMap]"]=!1;var gt,ft=Be((function(e,t){var i=t&&!t.nodeType&&t,r=i&&e&&!e.nodeType&&e,n=r&&r.exports===i&&We.process,s=function(){try{return r&&r.require&&r.require("util").types||n&&n.binding&&n.binding("util")}catch(e){}}();e.exports=s})),pt=ft&&ft.isTypedArray,vt=pt?(gt=pt,function(e){return gt(e)}):function(e){return et(e)&&dt(e.length)&&!!ut[Qe(e)]},xt=Object.prototype.hasOwnProperty,mt=function(e,t){var i=at(e),r=!i&&st(e),n=!i&&!r&<(e),s=!i&&!r&&!n&&vt(e),a=i||r||n||s,o=a?function(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}(e.length,String):[],l=o.length;for(var c in e)!t&&!xt.call(e,c)||a&&("length"==c||n&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ht(c,l))||o.push(c);return o},bt=Object.prototype,yt=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object),wt=Object.prototype.hasOwnProperty,Ct=function(e){if(i=(t=e)&&t.constructor,t!==("function"==typeof i&&i.prototype||bt))return yt(e);var t,i,r=[];for(var n in Object(e))wt.call(e,n)&&"constructor"!=n&&r.push(n);return r},St=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},kt=function(e){if(!St(e))return!1;var t=Qe(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Lt=function(e){return null!=e&&dt(e.length)&&!kt(e)},At=function(e){return Lt(e)?mt(e):Ct(e)},Et=function(e,t){if(null==e)return e;if(!Lt(e))return function(e,t){return e&&Xe(e,t,At)}(e,t);for(var i=e.length,r=-1,n=Object(e);++r<i&&!1!==t(n[r],r,n););return e},zt=function(e,t){return e===t||e!=e&&t!=t},Pt=function(e,t){for(var i=e.length;i--;)if(zt(e[i][0],t))return i;return-1},_t=Array.prototype.splice;function Rt(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}Rt.prototype.clear=function(){this.__data__=[],this.size=0},Rt.prototype.delete=function(e){var t=this.__data__,i=Pt(t,e);return!(i<0||(i==t.length-1?t.pop():_t.call(t,i,1),--this.size,0))},Rt.prototype.get=function(e){var t=this.__data__,i=Pt(t,e);return i<0?void 0:t[i][1]},Rt.prototype.has=function(e){return Pt(this.__data__,e)>-1},Rt.prototype.set=function(e,t){var i=this.__data__,r=Pt(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this};var Tt,Mt=Rt,Ft=$e["__core-js_shared__"],It=(Tt=/[^.]+$/.exec(Ft&&Ft.keys&&Ft.keys.IE_PROTO||""))?"Symbol(src)_1."+Tt:"",Ot=Function.prototype.toString,Dt=function(e){if(null!=e){try{return Ot.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Ht=/^\[object .+?Constructor\]$/,Nt=Function.prototype,Xt=Object.prototype,Yt=Nt.toString,Bt=Xt.hasOwnProperty,Wt=RegExp("^"+Yt.call(Bt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jt=function(e){return!(!St(e)||function(e){return!!It&&It in e}(e))&&(kt(e)?Wt:Ht).test(Dt(e))},$t=function(e,t){var i=function(e,t){return null==e?void 0:e[t]}(e,t);return jt(i)?i:void 0},Vt=$t($e,"Map"),Gt=$t(Object,"create"),Ut=Object.prototype.hasOwnProperty,Zt=Object.prototype.hasOwnProperty;function qt(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}qt.prototype.clear=function(){this.__data__=Gt?Gt(null):{},this.size=0},qt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},qt.prototype.get=function(e){var t=this.__data__;if(Gt){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return Ut.call(t,e)?t[e]:void 0},qt.prototype.has=function(e){var t=this.__data__;return Gt?void 0!==t[e]:Zt.call(t,e)},qt.prototype.set=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Gt&&void 0===t?"__lodash_hash_undefined__":t,this};var Kt=qt,Jt=function(e,t){var i,r,n=e.__data__;return("string"==(r=typeof(i=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?n["string"==typeof t?"string":"hash"]:n.map};function Qt(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}Qt.prototype.clear=function(){this.size=0,this.__data__={hash:new Kt,map:new(Vt||Mt),string:new Kt}},Qt.prototype.delete=function(e){var t=Jt(this,e).delete(e);return this.size-=t?1:0,t},Qt.prototype.get=function(e){return Jt(this,e).get(e)},Qt.prototype.has=function(e){return Jt(this,e).has(e)},Qt.prototype.set=function(e,t){var i=Jt(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this};var ei=Qt;function ti(e){var t=this.__data__=new Mt(e);this.size=t.size}ti.prototype.clear=function(){this.__data__=new Mt,this.size=0},ti.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},ti.prototype.get=function(e){return this.__data__.get(e)},ti.prototype.has=function(e){return this.__data__.has(e)},ti.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Mt){var r=i.__data__;if(!Vt||r.length<199)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new ei(r)}return i.set(e,t),this.size=i.size,this};var ii=ti;function ri(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new ei;++t<i;)this.add(e[t])}ri.prototype.add=ri.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ri.prototype.has=function(e){return this.__data__.has(e)};var ni=ri,si=function(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(t(e[i],i,e))return!0;return!1},ai=function(e,t,i,r,n,s){var a=1&i,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),h=s.get(t);if(c&&h)return c==t&&h==e;var d=-1,u=!0,g=2&i?new ni:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var f=e[d],p=t[d];if(r)var v=a?r(p,f,d,t,e,s):r(f,p,d,e,t,s);if(void 0!==v){if(v)continue;u=!1;break}if(g){if(!si(t,(function(e,t){if(a=t,!g.has(a)&&(f===e||n(f,e,i,r,s)))return g.push(t);var a}))){u=!1;break}}else if(f!==p&&!n(f,p,i,r,s)){u=!1;break}}return s.delete(e),s.delete(t),u},oi=$e.Uint8Array,li=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e,r){i[++t]=[r,e]})),i},ci=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i},hi=Ve?Ve.prototype:void 0,di=hi?hi.valueOf:void 0,ui=Object.prototype.propertyIsEnumerable,gi=Object.getOwnPropertySymbols,fi=gi?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var i=-1,r=null==e?0:e.length,n=0,s=[];++i<r;){var a=e[i];t(a,i,e)&&(s[n++]=a)}return s}(gi(e),(function(t){return ui.call(e,t)})))}:function(){return[]},pi=function(e){return function(e,t,i){var r=t(e);return at(e)?r:function(e,t){for(var i=-1,r=t.length,n=e.length;++i<r;)e[n+i]=t[i];return e}(r,i(e))}(e,At,fi)},vi=Object.prototype.hasOwnProperty,xi=$t($e,"DataView"),mi=$t($e,"Promise"),bi=$t($e,"Set"),yi=$t($e,"WeakMap"),wi="[object Map]",Ci="[object Promise]",Si="[object Set]",ki="[object WeakMap]",Li="[object DataView]",Ai=Dt(xi),Ei=Dt(Vt),zi=Dt(mi),Pi=Dt(bi),_i=Dt(yi),Ri=Qe;(xi&&Ri(new xi(new ArrayBuffer(1)))!=Li||Vt&&Ri(new Vt)!=wi||mi&&Ri(mi.resolve())!=Ci||bi&&Ri(new bi)!=Si||yi&&Ri(new yi)!=ki)&&(Ri=function(e){var t=Qe(e),i="[object Object]"==t?e.constructor:void 0,r=i?Dt(i):"";if(r)switch(r){case Ai:return Li;case Ei:return wi;case zi:return Ci;case Pi:return Si;case _i:return ki}return t});var Ti=Ri,Mi="[object Arguments]",Fi="[object Array]",Ii="[object Object]",Oi=Object.prototype.hasOwnProperty,Di=function(e,t,i,r,n,s){var a=at(e),o=at(t),l=a?Fi:Ti(e),c=o?Fi:Ti(t),h=(l=l==Mi?Ii:l)==Ii,d=(c=c==Mi?Ii:c)==Ii,u=l==c;if(u&<(e)){if(!lt(t))return!1;a=!0,h=!1}if(u&&!h)return s||(s=new ii),a||vt(e)?ai(e,t,i,r,n,s):function(e,t,i,r,n,s,a){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new oi(e),new oi(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return zt(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=li;case"[object Set]":var l=1&r;if(o||(o=ci),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var h=ai(o(e),o(t),r,n,s,a);return a.delete(e),h;case"[object Symbol]":if(di)return di.call(e)==di.call(t)}return!1}(e,t,l,i,r,n,s);if(!(1&i)){var g=h&&Oi.call(e,"__wrapped__"),f=d&&Oi.call(t,"__wrapped__");if(g||f){var p=g?e.value():e,v=f?t.value():t;return s||(s=new ii),n(p,v,i,r,s)}}return!!u&&(s||(s=new ii),function(e,t,i,r,n,s){var a=1&i,o=pi(e),l=o.length;if(l!=pi(t).length&&!a)return!1;for(var c=l;c--;){var h=o[c];if(!(a?h in t:vi.call(t,h)))return!1}var d=s.get(e),u=s.get(t);if(d&&u)return d==t&&u==e;var g=!0;s.set(e,t),s.set(t,e);for(var f=a;++c<l;){var p=e[h=o[c]],v=t[h];if(r)var x=a?r(v,p,h,t,e,s):r(p,v,h,e,t,s);if(!(void 0===x?p===v||n(p,v,i,r,s):x)){g=!1;break}f||(f="constructor"==h)}if(g&&!f){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,i,r,n,s))},Hi=function e(t,i,r,n,s){return t===i||(null==t||null==i||!et(t)&&!et(i)?t!=t&&i!=i:Di(t,i,r,n,e,s))},Ni=function(e){return e==e&&!St(e)},Xi=function(e,t){return function(i){return null!=i&&i[e]===t&&(void 0!==t||e in Object(i))}},Yi=function(e){var t=function(e){for(var t=At(e),i=t.length;i--;){var r=t[i],n=e[r];t[i]=[r,n,Ni(n)]}return t}(e);return 1==t.length&&t[0][2]?Xi(t[0][0],t[0][1]):function(i){return i===e||function(e,t,i,r){var n=i.length,s=n,a=!r;if(null==e)return!s;for(e=Object(e);n--;){var o=i[n];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n<s;){var l=(o=i[n])[0],c=e[l],h=o[1];if(a&&o[2]){if(void 0===c&&!(l in e))return!1}else{var d=new ii;if(r)var u=r(c,h,l,e,t,d);if(!(void 0===u?Hi(h,c,3,r,d):u))return!1}}return!0}(i,e,t)}},Bi=function(e){return"symbol"==typeof e||et(e)&&"[object Symbol]"==Qe(e)},Wi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ji=/^\w*$/,$i=function(e,t){if(at(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!Bi(e))||ji.test(e)||!Wi.test(e)||null!=t&&e in Object(t)};function Vi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var r=arguments,n=t?t.apply(this,r):r[0],s=i.cache;if(s.has(n))return s.get(n);var a=e.apply(this,r);return i.cache=s.set(n,a)||s,a};return i.cache=new(Vi.Cache||ei),i}Vi.Cache=ei;var Gi,Ui,Zi,qi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ki=/\\(\\)?/g,Ji=(Gi=Vi((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(qi,(function(e,i,r,n){t.push(r?n.replace(Ki,"$1"):i||e)})),t}),(function(e){return 500===Ui.size&&Ui.clear(),e})),Ui=Gi.cache,Gi),Qi=function(e,t){for(var i=-1,r=null==e?0:e.length,n=Array(r);++i<r;)n[i]=t(e[i],i,e);return n},er=Ve?Ve.prototype:void 0,tr=er?er.toString:void 0,ir=function e(t){if("string"==typeof t)return t;if(at(t))return Qi(t,e)+"";if(Bi(t))return tr?tr.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i},rr=function(e){return null==e?"":ir(e)},nr=function(e,t){return at(e)?e:$i(e,t)?[e]:Ji(rr(e))},sr=function(e){if("string"==typeof e||Bi(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},ar=function(e,t){for(var i=0,r=(t=nr(t,e)).length;null!=e&&i<r;)e=e[sr(t[i++])];return i&&i==r?e:void 0},or=function(e,t){return null!=e&&t in Object(e)},lr=function(e,t){return null!=e&&function(e,t,i){for(var r=-1,n=(t=nr(t,e)).length,s=!1;++r<n;){var a=sr(t[r]);if(!(s=null!=e&&i(e,a)))break;e=e[a]}return s||++r!=n?s:!!(n=null==e?0:e.length)&&dt(n)&&ht(a,n)&&(at(e)||st(e))}(e,t,or)},cr=function(e,t){return $i(e)&&Ni(t)?Xi(sr(e),t):function(i){var r=function(e,t,i){var r=null==e?void 0:ar(e,t);return void 0===r?i:r}(i,e);return void 0===r&&r===t?lr(i,e):Hi(t,r,3)}},hr=function(e){return e},dr=function(e){return function(t){return null==t?void 0:t[e]}},ur=function(e){return $i(e)?dr(sr(e)):function(e){return function(t){return ar(t,e)}}(e)},gr=function(e){return"function"==typeof e?e:null==e?hr:"object"==typeof e?at(e)?cr(e[0],e[1]):Yi(e):ur(e)},fr=function(e,t,i,r,n){return n(e,(function(e,n,s){i=r?(r=!1,e):t(i,e,n,s)})),i},pr=function(e,t,i){var r=at(e)?Ne:fr,n=arguments.length<3;return r(e,gr(t),i,n,Et)},vr=function(e,t){for(var i=-1,r=null==e?0:e.length;++i<r&&!1!==t(e[i],i,e););return e},xr=function(e,t){return(at(e)?vr:Et)(e,"function"==typeof(i=t)?i:hr);var i},mr=function(e,t,i,r){for(var n=e.length,s=i+(r?1:-1);r?s--:++s<n;)if(t(e[s],s,e))return s;return-1},br=/\s/,yr=/^\s+/,wr=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&br.test(e.charAt(t)););return t}(e)+1).replace(yr,""):e},Cr=/^[-+]0x[0-9a-f]+$/i,Sr=/^0b[01]+$/i,kr=/^0o[0-7]+$/i,Lr=parseInt,Ar=function(e){if("number"==typeof e)return e;if(Bi(e))return NaN;if(St(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=St(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=wr(e);var i=Sr.test(e);return i||kr.test(e)?Lr(e.slice(2),i?2:8):Cr.test(e)?NaN:+e},Er=function(e){return e?1/0===(e=Ar(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},zr=function(e){var t=Er(e),i=t%1;return t==t?i?t-i:t:0},Pr=Math.max,_r=function(e,t,i){var r=null==e?0:e.length;if(!r)return-1;var n=null==i?0:zr(i);return n<0&&(n=Pr(r+n,0)),mr(e,gr(t),n)},Rr=(Zi=_r,function(e,t,i){var r=Object(e);if(!Lt(e)){var n=gr(t);e=At(e),t=function(e){return n(r[e],e,r)}}var s=Zi(e,t,i);return s>-1?r[n?e[s]:s]:void 0});const Tr=e=>!("isConnected"in e)||e.isConnected,Mr=((e,t)=>{let i;return(...e)=>{i&&clearTimeout(i),i=setTimeout((()=>{i=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(Tr))})(...e)}),2e3)}})(),Fr=(e,t)=>{const i=((e,t=((e,t)=>e!==t))=>{let i=new Map(Object.entries(null!=e?e:{}));const r={dispose:[],get:[],set:[],reset:[]},n=()=>{i=new Map(Object.entries(null!=e?e:{})),r.reset.forEach((e=>e()))},s=e=>(r.get.forEach((t=>t(e))),i.get(e)),a=(e,n)=>{const s=i.get(e);t(n,s,e)&&(i.set(e,n),r.set.forEach((t=>t(e,n,s))))},o="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>s(t),ownKeys:e=>Array.from(i.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>i.has(t),set:(e,t,i)=>(a(t,i),!0)}),l=(e,t)=>(r[e].push(t),()=>{((e,t)=>{const i=e.indexOf(t);i>=0&&(e[i]=e[e.length-1],e.length--)})(r[e],t)});return{state:o,get:s,set:a,on:l,onChange:(t,i)=>{const r=l("set",((e,r)=>{e===t&&i(r)})),n=l("reset",(()=>i(e[t])));return()=>{r(),n()}},use:(...e)=>e.forEach((e=>{e.set&&l("set",e.set),e.get&&l("get",e.get),e.reset&&l("reset",e.reset)})),dispose:()=>{r.dispose.forEach((e=>e())),n()},reset:n}})(e,t);return(({on:e})=>{const t=new Map;e("dispose",(()=>{t.clear()})),e("get",(e=>{u&&((e,t,i)=>{const r=e.get(t);r?r.includes(i)||r.push(i):e.set(t,[i])})(t,e,u)})),e("set",(e=>{const i=t.get(e);i&&t.set(e,i.filter(oe)),Mr(t)})),e("reset",(()=>{t.forEach((e=>e.forEach(oe))),Mr(t)}))})(i),i};var Ir=Math.ceil,Or=Math.max,Dr=function(e,t,i){if(!St(i))return!1;var r=typeof t;return!!("number"==r?Lt(i)&&ht(t,i.length):"string"==r&&t in i)&&zt(i[t],e)},Hr=function(e,t,i){return i&&"number"!=typeof i&&Dr(e,t,i)&&(t=i=void 0),e=Er(e),void 0===t?(t=e,e=0):t=Er(t),function(e,t,i,r){for(var n=-1,s=Or(Ir((t-e)/(i||1)),0),a=Array(s);s--;)a[r?s:++n]=e,e+=i;return a}(e,t,i=void 0===i?e<t?1:-1:Er(i),void 0)};function Nr(e,t){for(let i in t)e.set(i,t[i])}class Xr{constructor(e){const t=this.dataStore=Fr({items:[],proxyItems:[],source:[],groupingDepth:0,groups:{},type:e,trimmed:{}});t.use((e=>({set(t,i){if(!function(e){return"proxyItems"===e}(t))return;const r=e.get("items").reduce(((e,t)=>(e[t]=!0,e)),{}),n=i.reduce(((e,t)=>(r[t]&&e.push(t),e)),[]);e.set("items",n)}}))(t)),t.use((e=>({set(t,i){if("trimmed"===t){const t=e.get("proxyItems"),r=function(e){const t={};for(let i in e)for(let r in e[i])t[r]=t[r]||e[i][r];return t}(i),n=t.reduce(((e,t)=>(r[t]||e.push(t),e)),[]);e.set("items",n)}}}))(t))}get store(){return this.dataStore}updateData(e,t,i=!1){i||this.store.set("trimmed",{}),this.store.set("items",[]);const r=Hr(0,(null==e?void 0:e.length)||0);Nr(this.store,{source:e,proxyItems:[...r]}),this.store.set("items",r),t&&Nr(this.store,{groupingDepth:t.depth,groups:t.groups})}addTrimmed(e){let t=this.store.get("trimmed");t=Object.assign(Object.assign({},t),e),Nr(this.store,{trimmed:t})}setData(e){const t=Object.assign({},e);Nr(this.store,t)}refresh(){const e=this.store.get("source");this.store.set("source",[...e])}}function Yr(e){const t=e.get("source");return e.get("items").map((e=>t[e]))}function Br(e,t){const i=e.get("items");return e.get("source")[i[t]]}function Wr(e,t){const i=e.get("items"),r=e.get("source");for(let e in t)r[i[e]]=t[e];e.set("source",[...r])}function jr(e,t){e.set("items",t)}const $r=["rowPinStart","rgRow","rowPinEnd"],Vr=["colPinStart","rgCol","colPinEnd"];var Gr=function(e,t){var i=-1,r=Lt(e)?Array(e.length):[];return Et(e,(function(e,n,s){r[++i]=t(e,n,s)})),r},Ur=function(e,t){return(at(e)?Qi:Gr)(e,gr(t))};class Zr{constructor(e){this.revogrid=e,this.subscriptions={}}addEventListener(e,t){this.revogrid.addEventListener(e,t),this.subscriptions[e]=t}removeEventListener(e){this.revogrid.removeEventListener(e,this.subscriptions[e]),delete this.subscriptions[e]}emit(e,t){const i=new CustomEvent(e,{detail:t,cancelable:!0});return this.revogrid.dispatchEvent(i),i}clearSubscriptions(){for(let e in this.subscriptions)this.removeEventListener(e)}destroy(){this.clearSubscriptions()}}class qr extends Zr{static gatherGroup(e,t,i,r=0){const n=Object.assign(Object.assign({},t),{level:r,ids:[]});for(let t in i.columns){const r=t,s=e.columns[r],a=i.columns[r];at(s)&&at(a)&&(s.push(...a),a.length&&e.columnGrouping[r].push(Object.assign(Object.assign({},n),{ids:Ur(a,"prop")})))}for(let t in i.columnGrouping){const r=t,n=i.columnGrouping[r];e.columnGrouping[r].push(...n)}return e.maxLevel=Math.max(e.maxLevel,i.maxLevel),e}static isColGrouping(e){return!!e.children}}class Kr{constructor(){this.sorting=null,this.dataSources=pr(Vr,((e,t)=>(e[t]=new Xr(t),e)),{})}get order(){return pr(this.sorting,((e,t,i)=>(e[i]=t.order,e)),{})}get stores(){return this.dataSources}column(e,t){return this.getColumn(e,t||"rgCol")}getColumn(e,t){return Br(this.dataSources[t].store,e)}getRawColumns(){return pr(this.dataSources,((e,t,i)=>(e[i]=t.store.get("source"),e)),{rgCol:[],colPinStart:[],colPinEnd:[]})}getColumns(e="all"){return"all"!==e?this.dataSources[e].store.get("source"):Vr.reduce(((e,t)=>(e.push(...this.dataSources[t].store.get("source")),e)),[])}getColumnIndexByProp(e,t){return function(e,t){const i=e.get("items"),r=e.get("source"),n=_r(r,{prop:t});return i.indexOf(n)}(this.dataSources[t].store,e)}getColumnByProp(e,t){const i=this.dataSources[t].store.get("source");return Rr(i,{prop:e})}refreshByType(e){this.dataSources[e].refresh()}setColumns(e){return xr(Vr,(t=>{this.dataSources[t].updateData(e.columns[t],{depth:e.maxLevel,groups:pr(e.columnGrouping[t],((e,t)=>(e[t.level]||(e[t.level]=[]),e[t.level].push(t),e)),{})})})),this.sorting=e.sort,e}updateColumns(e){const t=e.reduce(((e,t)=>{const i=Kr.getColumnType(t);return e[i]||(e[i]={}),e[i][t.prop]=t,e}),{}),i={};xr(t,((e,t)=>{const r=this.dataSources[t].store.get("source");i[t]=r.reduce(((t,i,r)=>{const n=e[i.prop];return n&&(t[r]=n),t}),{})})),xr(i,((e,t)=>Wr(this.dataSources[t].store,e)))}updateColumn(e,t){const i=Kr.getColumnType(e);Wr(this.dataSources[i].store,{[t]:e})}updateColumnSorting(e,t,i,r){return r||this.clearSorting(),e.order=i,this.sorting[e.prop]=e,this.updateColumn(e,t),e}clearSorting(){const e=pr(this.sorting,((e,t)=>(e[Kr.getColumnType(t)]=!0,e)),{});xr(e,((e,t)=>{const i=this.dataSources[t].store.get("source");xr(i,(e=>e.order=void 0)),this.dataSources[t].setData({source:[...i]})})),this.sorting={}}static getSizes(e){return pr(e,((e,t,i)=>(t.size&&(e[i]=t.size),e)),{})}static getColumnByProp(e,t){return Rr(e,(e=>qr.isColGrouping(e)?Kr.getColumnByProp(e.children,t):e.prop===t))}static getColumns(e,t=0,i){return pr(e,((e,r)=>{if(qr.isColGrouping(r))return qr.gatherGroup(e,r,Kr.getColumns(r.children,t+1,i),t);const n=Object.assign(Object.assign({},r.columnType&&i&&i[r.columnType]),r);return n.pin?e.columns[n.pin].push(n):e.columns.rgCol.push(n),n.order&&(e.sort[n.prop]=n),n.beforeSetup&&n.beforeSetup(n),e}),{columns:{rgCol:[],colPinStart:[],colPinEnd:[]},columnGrouping:{rgCol:[],colPinStart:[],colPinEnd:[]},maxLevel:t,sort:{}})}static getColumnType(e){return e.pin?e.pin:"rgCol"}}class Jr{constructor(e){this.dimensionProvider=e,this.stores=pr($r,((e,t)=>(e[t]=new Xr(t),e)),{})}setData(e,t="rgRow",i,r=!1){return this.stores[t].updateData([...e],i,r),this.dimensionProvider.setData(e,t,"rgRow"!==t),e}getModel(e,t="rgRow"){return Br(this.stores[t].store,e)}setCellData({type:e,rowIndex:t,prop:i,val:r}){const n=this.getModel(t,e);n[i]=r,Wr(this.stores[e].store,{[t]:n})}refresh(e="all"){(function(e){return $r.indexOf(e)>-1})(e)&&this.refreshItems(e),$r.forEach((e=>this.refreshItems(e)))}refreshItems(e="rgRow"){const t=this.stores[e].store.get("items");this.stores[e].setData({items:[...t]})}setGrouping({depth:e},t="rgRow"){this.stores[t].setData({groupingDepth:e})}setTrimmed(e,t="rgRow"){const i=this.stores[t];i.addTrimmed(e),"rgRow"===t&&this.dimensionProvider.setData(Yr(i.store),t)}}var Qr,en=Math.floor,tn=Math.min,rn=function(e,t,i){var r=0,n=null==e?r:e.length;if("number"==typeof t&&t==t&&n<=2147483647){for(;r<n;){var s=r+n>>>1,a=e[s];null!==a&&!Bi(a)&&(i?a<=t:a<t)?r=s+1:n=s}return n}return function(e,t,i,r){var n=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=i(t))!=t,o=null===t,l=Bi(t),c=void 0===t;n<s;){var h=en((n+s)/2),d=i(e[h]),u=void 0!==d,g=null===d,f=d==d,p=Bi(d);if(a)var v=r||f;else v=c?f&&(r||u):o?f&&u&&(r||!g):l?f&&u&&!g&&(r||!p):!g&&!p&&(r?d<=t:d<t);v?n=h+1:s=h}return tn(s,4294967294)}(e,t,hr,i)},nn=function(e,t){return rn(e,t)};function sn(e,t){return e<t}function an(e){const t=e.createElement("div"),i=t.style;i.visibility="hidden",i.overflow="scroll",i.msOverflowStyle="scrollbar",e.body.appendChild(t);const r=e.createElement("div");t.appendChild(r);const n=t.offsetWidth-r.offsetWidth;return t.parentNode.removeChild(t),n}function on(e,t,i){return(i[1]-i[0])*(e-t[0])/(t[1]-t[0])+i[0]}async function ln(e=0){await new Promise((t=>{setTimeout((()=>t()),e)}))}function cn({indexes:e,positionIndexes:t,originItemSize:i,positionIndexToItem:r},n){const s={itemIndex:0,start:0,end:0},a=e.length?nn(t,n):0;if(!a)return s.itemIndex=Math.floor(n/i),s.start=s.itemIndex*i,s.end=s.start+i,s;const o=r[a-1];if(o.end>n)return o;const l=n-o.end,c=Math.floor(l/i);return s.itemIndex=o.itemIndex+1+c,s.start=o.end+c*i,s.end=s.start+i,s}function hn(e,t){let i={itemIndex:t,start:0,end:0};if(e.indexToItem[t])return e.indexToItem[t];const r=e.indexes.length?nn(e.indexes,t):0;if(!r)return i.start=i.itemIndex*e.originItemSize,i.end=i.start+e.originItemSize,i;const n=e.indexToItem[e.indexes[r-1]];return i.start=n.end+(t-n.itemIndex-1)*e.originItemSize,i.end=i.start+e.originItemSize,i}function dn(){return Object.assign(Object.assign({},{indexes:[],sizes:{},positionIndexToItem:{},indexToItem:{},positionIndexes:[]}),{realSize:0,originItemSize:0,frameOffset:0})}class un{constructor(){this.store=Fr(dn())}getCurrentState(){const e=dn(),t=Object.keys(e);return pr(t,((e,t)=>{const i=this.store.get(t);return e[t]=i,e}),e)}setRealSize(e){let t=0;for(let i=0;i<e;i++)t+=this.store.get("sizes")[i]||this.store.get("originItemSize");Nr(this.store,{realSize:t})}setStore(e){Nr(this.store,e)}drop(){Nr(this.store,{indexes:[],sizes:{},positionIndexToItem:{},indexToItem:{},positionIndexes:[]})}setDimensionSize(e){const t=function(e,t){let i=[];const r={},n={};let s=0;const a=Object.assign(Object.assign({},e.sizes),t);let o=[];xr(t,((t,i)=>{e.sizes[i]?s+=t-e.sizes[i]:(s+=t-(e.realSize?e.originItemSize:0),o.splice(nn(o,parseInt(i,10)),0,parseInt(i,10)))}));const l=function(e,t,i=sn){const r=[];let n=0,s=0,a=0;for(;a<e.length+t.length;){let o=n>=e.length,l=s>=t.length;o||!l&&!i(e[n],t[s])?(r[a]=t[s],s++):(r[a]=e[n],n++),a++}return r}(e.indexes,o);return pr(l,((t,s,o)=>{const l={itemIndex:s,start:0,end:0};return l.start=t?(s-t.itemIndex-1)*e.originItemSize+t.end:s*e.originItemSize,l.end=l.start+a[s],i.push(l.start),n[s]=r[o]=l,l}),void 0),{indexes:l,positionIndexes:[...i],positionIndexToItem:Object.assign({},r),indexToItem:n,realSize:e.realSize+s,sizes:a}}(this.getCurrentState(),e);return Nr(this.store,t),t}}class gn{constructor(e){this.viewports=e,this.stores=pr([...$r,...Vr],((e,t)=>(e[t]=new un,e)),{})}setDimensionSize(e,t){this.stores[e].setDimensionSize(t),this.viewports.stores[e].setViewPortDimension(t)}setRealSize(e,t){this.viewports.stores[t].setViewport({realCount:e}),this.stores[t].setRealSize(e)}setData(e,t,i=!1){this.setRealSize(e.length,t),i&&this.setNoVirtual(t),this.setViewPortCoordinate({coordinate:this.viewports.stores[t].store.get("lastCoordinate"),type:t})}setNoVirtual(e){const t=this.stores[e].getCurrentState();this.viewports.stores[e].setViewport({virtualSize:t.realSize})}drop(){for(let e of Vr)this.stores[e].drop()}setColumns(e,t,i=!1){this.stores[e].setDimensionSize(t),i&&this.setNoVirtual(e),this.setViewPortCoordinate({coordinate:this.viewports.stores[e].store.get("lastCoordinate"),type:e})}setViewPortCoordinate({coordinate:e,type:t}){const i=this.stores[t].getCurrentState();this.viewports.stores[t].setViewPortCoordinate(e,i)}getViewPortPos(e){return hn(this.stores[e.dimension].getCurrentState(),e.coordinate).start}setSettings(e,t){let i=[];switch(t){case"rgCol":i=Vr;break;case"rgRow":i=$r}for(let t of i)this.stores[t].setStore(e)}}function fn(e,t,i){e.splice(i.end+1,0,...t),i.start>=i.end&&(i.start!==i.end||0!==i.start)&&(i.start+=t.length),i.end+=t.length}function pn(e,t,i,r,n){const s=bn(r);return vn({sizes:n.sizes,start:s.end,startIndex:s.itemIndex+1,origSize:n.originItemSize,maxSize:i-(s.end-e.start),maxCount:t})}function vn(e,t=0){const i=[];let r=e.startIndex,n=t;for(;n<=e.maxSize&&r<e.maxCount;){const t=xn(r,e.sizes,e.origSize);i.push({start:e.start+n,end:e.start+n+t,itemIndex:r,size:t}),n+=t,r++}return i}function xn(e,t,i=0){return t&&t[e]?t[e]:i}function mn(e){return e.items[e.start]}function bn(e){return e.items[e.end]}class yn{constructor(){this.store=Fr({items:[],start:0,end:0,virtualSize:0,realCount:0,lastCoordinate:0}),this.store.onChange("realCount",(()=>this.clear()))}setViewPortCoordinate(e,t){let i=this.store.get("virtualSize");if(!i)return;const r=t.frameOffset;i+=2*r*t.originItemSize;let n=i;t.realSize>i&&(n=t.realSize-i);let s={lastCoordinate:e},a=e;a-=r*t.originItemSize,a=a<0?0:a<n?a:n;const o=mn(this.getItems()),l=bn(this.getItems());if(function(e,t){return t&&e>=t.start&&e<=t.end}(a,o)){if(o&&this.store.get("virtualSize")+a>(null==l?void 0:l.end)){const e=pn(o,this.store.get("realCount"),i+a-o.start,this.getItems(),t);if(e.length){const t=[...this.store.get("items")],i={start:this.store.get("start"),end:this.store.get("end")};fn(t,e,i),s=Object.assign(Object.assign(Object.assign({},s),{items:[...t]}),i),Nr(this.store,Object.assign({},s))}}}else s=Object.assign(Object.assign({},s),function(e,t,i,r,n){const s=cn(n,e),a=mn(t);let o;if(a){let e=s.itemIndex-(a.itemIndex||0);if(e){const a=function(e,t){const i=[...t.items],r=i.length;let n={start:t.start,end:t.end};if(e>r)return null;if(t.positiveDirection){let s=bn(t),a=n.start;const o=a+e;for(;a<o;a++){const e=s.itemIndex+1,o=xn(e,t.sizes,t.originItemSize);if(s.end+o>t.realSize)break;let l=a%r;if(!i[l])throw new Error("incorrect index");i[l]=s={start:s.end,end:s.end+o,itemIndex:e,size:o},n.start++,n.end=l}}else{let s=mn(t);const a=n.end;for(let o=0;o<e;o++){const e=s.itemIndex-1,l=xn(e,t.sizes,t.originItemSize);let c=a-o;if(c=(c<0?r+c:c)%r,!i[c])throw new Error("incorrect index");i[c]=s={start:s.start-l,end:s.start,itemIndex:e,size:l},n.start=c,n.end--}}const s={start:(n.start<0?r+n.start:n.start)%r,end:(n.end<0?r+n.end:n.end)%r};return Object.assign({items:i},s)}(Math.abs(e),Object.assign(Object.assign({positiveDirection:e>-1},n),t));if(a&&(o=a),o){const e=pn(s,i,r,o,n);e.length&&fn(o.items,e,o)}}}if(!o){const e=vn({start:s.start,startIndex:s.itemIndex,origSize:n.originItemSize,maxSize:r,maxCount:i,sizes:n.sizes});o={items:e,start:0,end:e.length-1}}return o}(a,this.getItems(),this.store.get("realCount"),i,t)),Nr(this.store,Object.assign({},s))}setViewPortDimension(e){const t=this.store.get("items"),i=t.length;if(!i)return;let r=0,n=0,s=this.store.get("start");for(;n<i;){const a=t[s];r&&(a.start+=r,a.end+=r);const o=e[a.itemIndex];o&&(r+=o-a.size,a.size=o,a.end=a.start+o),s++,n++,s===i&&(s=0)}Nr(this.store,{items:[...t]})}getItems(){return{items:this.store.get("items"),start:this.store.get("start"),end:this.store.get("end")}}setViewport(e){Nr(this.store,e)}clear(){this.store.set("items",[])}}class wn{constructor(){this.stores=pr([...$r,...Vr],((e,t)=>(e[t]=new yn,e)),{})}setViewport(e,t){this.stores[e].setViewport(t)}}!function(e){e.headerClickAutosize="headerClickAutoSize",e.autoSizeOnTextOverlap="autoSizeOnTextOverlap",e.autoSizeAll="autoSizeAll"}(Qr||(Qr={}));class Cn extends Zr{constructor(e,t,i){super(e),this.providers=t,this.config=i,this.autoSizeColumns=null,this.dataResolve=null,this.dataReject=null,this.letterBlockSize=(null==i?void 0:i.letterBlockSize)||7,(null==i?void 0:i.preciseSize)&&(this.precsizeCalculationArea=this.initiatePresizeElement(),e.appendChild(this.precsizeCalculationArea));const r=({detail:{source:e}})=>{this.setSource(e)},n=({detail:e})=>{this.afteredit(e)},s=({detail:e})=>{this.afterEditAll(e)},a=({detail:e})=>{const t=Kr.getColumnType(e),i=this.getColumnSize(e.index,t);i&&this.providers.dimensionProvider.setDimensionSize(t,{[e.index]:i})};switch(this.addEventListener("beforecolumnsset",(({detail:{columns:e}})=>{this.columnSet(e)})),null==i?void 0:i.mode){case Qr.autoSizeOnTextOverlap:this.addEventListener("aftersourceset",r),this.addEventListener("afteredit",n);break;case Qr.autoSizeAll:this.addEventListener("aftersourceset",r),this.addEventListener("afteredit",s);break;default:this.addEventListener("headerdblClick",a)}}async setSource(e){let t=this.autoSizeColumns;if(this.dataReject&&(this.dataReject(),this.clearPromise()),!t){const i=new Promise(((e,t)=>{this.dataResolve=e,this.dataReject=t}));try{t=await i}catch(e){return}}xr(t,((i,r)=>{const n={};xr(t[r],(t=>{t.size=n[t.index]=e.reduce(((e,i)=>Math.max(e,this.getLength(i[t.prop]))),0)})),this.providers.dimensionProvider.setDimensionSize(r,n)}))}getLength(e){var t;if(!e)return 0;try{const i=e.toString();return(null===(t=this.config)||void 0===t?void 0:t.preciseSize)?(this.precsizeCalculationArea.innerText=i,this.precsizeCalculationArea.scrollWidth+30):i.length*this.letterBlockSize+30}catch(e){return 0}}afteredit(e){let t;t=this.isRangeEdit(e)?e.data:{0:{[e.prop]:e.val}},xr(this.autoSizeColumns,((e,i)=>{const r={};xr(e,(e=>{const i=pr(t,((t,i)=>void 0===i[e.prop]?t:Math.max(t||0,this.getLength(i[e.prop]))),void 0);i&&e.size<i&&(e.size=r[e.index]=i)})),this.providers.dimensionProvider.setDimensionSize(i,r)}))}afterEditAll(e){const t={};this.isRangeEdit(e)?xr(e.data,(e=>xr(e,((e,i)=>t[i]=!0)))):t[e.prop]=!0,xr(this.autoSizeColumns,((e,i)=>{const r={};xr(e,(e=>{if(t[e.prop]){const t=this.getColumnSize(e.index,i);t&&(r[e.index]=t)}})),this.providers.dimensionProvider.setDimensionSize(i,r)}))}getColumnSize(e,t){const i=this.autoSizeColumns[t][e];return i?pr(this.providers.dataProvider.stores,((e,t)=>{const r=pr(t.store.get("items"),((e,r,n)=>{const s=Br(t.store,n);return Math.max(e||0,this.getLength(s[i.prop]))}),0);return Math.max(e,r)}),i.size||0):0}columnSet(e){var t;for(let i of Vr){const r=i,n=e[r];for(let e in n)(n[e].autoSize||(null===(t=this.config)||void 0===t?void 0:t.allColumns))&&(this.autoSizeColumns||(this.autoSizeColumns={}),this.autoSizeColumns[r]||(this.autoSizeColumns[r]={}),this.autoSizeColumns[r][e]=Object.assign(Object.assign({},n[e]),{index:parseInt(e,10)}))}this.dataResolve&&(this.dataResolve(this.autoSizeColumns),this.clearPromise())}clearPromise(){this.dataResolve=null,this.dataReject=null}isRangeEdit(e){return!!e.data}initiatePresizeElement(){const e={position:"absolute",fontSize:"14px",height:"0",width:"0",whiteSpace:"nowrap",top:"0",overflowX:"scroll"},t=document.createElement("div");for(let i in e)t.style[i]=e[i];return t.classList.add("revo-test-container"),t}destroy(){var e;super.destroy(),null===(e=this.precsizeCalculationArea)||void 0===e||e.remove()}}const Sn="rv-filter",kn=({column:e})=>P("span",null,P("button",{class:{[Sn]:!0,active:e&&!!e.hasFilter}},P("svg",{class:"filter-img",viewBox:"0 0 64 64"},P("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},P("path",{d:"M43,48 L43,56 L21,56 L21,48 L43,48 Z M53,28 L53,36 L12,36 L12,28 L53,28 Z M64,8 L64,16 L0,16 L0,8 L64,8 Z",fill:"currentColor"})))));function Ln(e){return!!e.classList.contains(Sn)||(null==e?void 0:e.closest(".rv-filter"))}const An=(e,t)=>void 0===e||null===e&&!t||("string"!=typeof e&&(e=JSON.stringify(e)),e.toLocaleLowerCase()===t),En=(e,t)=>!An(e,t);En.extra="input",An.extra="input";const zn=function(e,t){let i;return"number"==typeof e&&(i=parseFloat(null==t?void 0:t.toString()),e>i)};zn.extra="input";const Pn=function(e,t){return An(e,t)||zn(e,t)};Pn.extra="input";const _n=function(e,t){let i;return"number"==typeof e&&(i=parseFloat(null==t?void 0:t.toString()),e<i)};_n.extra="input";const Rn=function(e,t){return An(e,t)||_n(e,t)};Rn.extra="input";const Tn=e=>!(""===e||null==e),Mn=(e,t)=>!(!e||t&&("string"!=typeof e&&(e=JSON.stringify(e)),"string"!=typeof t&&(t=JSON.stringify(t)),0!==e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase())));Mn.extra="input";const Fn=(e,t)=>!!e&&(!t||("string"!=typeof e&&(e=JSON.stringify(e)),e.toLocaleLowerCase().indexOf(t.toString().toLowerCase())>-1)),In=(e,t)=>!Fn(e,t);In.extra="input",Fn.extra="input";const On={none:"None",empty:"Not set",notEmpty:"Set",eq:"Equal",notEq:"Not equal",begins:"Begins with",contains:"Contains",notContains:"Does not contain",eqN:"=",neqN:"!=",gt:">",gte:">=",lt:"<",lte:"<="},Dn={none:()=>!0,empty:e=>!Tn(e),notEmpty:Tn,eq:An,notEq:En,begins:Mn,contains:Fn,notContains:In,eqN:An,neqN:En,gt:zn,gte:Pn,lt:_n,lte:Rn},Hn={string:["notEmpty","empty","eq","notEq","begins","contains","notContains"],number:["notEmpty","empty","eqN","neqN","gt","gte","lt","lte"]},Nn="filter";class Xn extends Zr{constructor(e,t,i){super(e),this.revogrid=e,this.filterCollection={},this.possibleFilters=Object.assign({},Hn),this.possibleFilterNames=Object.assign({},On),this.possibleFilterEntities=Object.assign({},Dn),i&&this.initConfig(i),this.addEventListener("headerclick",(e=>this.headerclick(e))),this.addEventListener("aftersourceset",(()=>{Object.keys(this.filterCollection).length&&this.filterByProps(this.filterCollection)})),this.revogrid.registerVNode([P("revogr-filter-panel",{uuid:`filter-${t}`,filterNames:this.possibleFilterNames,filterEntities:this.possibleFilterEntities,onFilterChange:e=>this.onFilterChange(e.detail),ref:e=>this.pop=e})])}initConfig(e){if(e.collection&&(this.filterCollection=Object.assign({},e.collection)),e.customFilters)for(let t in e.customFilters){const i=e.customFilters[t];this.possibleFilters[i.columnFilterType]||(this.possibleFilters[i.columnFilterType]=[]),this.possibleFilters[i.columnFilterType].push(t),this.possibleFilterEntities[t]=i.func,this.possibleFilterNames[t]=i.name}if(e.include){const t={};for(let i in this.possibleFilters){const r=this.possibleFilters[i].filter((t=>e.include.indexOf(t)>-1));r.length&&(t[i]=r)}Object.keys(t).length>0&&(this.possibleFilters=t)}}async headerclick(e){var t;const i=null===(t=e.detail.originalEvent)||void 0===t?void 0:t.target;if(!Ln(i))return;e.preventDefault();const r=await this.pop.getChanges();if(r&&(null==r?void 0:r.prop)===e.detail.prop)return void this.pop.show();const n=this.revogrid.getBoundingClientRect(),s=i.getBoundingClientRect(),a=e.detail.prop;this.pop.filterTypes=this.getColumnFilter(e.detail.filter),this.pop.show(Object.assign(Object.assign({},this.filterCollection[a]),{x:s.x-n.x,y:s.y-n.y+s.height,prop:a}))}getColumnFilter(e){let t="string";if(!e)return{[t]:this.possibleFilters[t]};if(this.isValidType(e))t=e;else if("object"==typeof e&&e.length)return e.reduce(((e,t)=>(this.isValidType(t)&&(e[t]=this.possibleFilters[t]),e)),{});return{[t]:this.possibleFilters[t]}}isValidType(e){return!("string"!=typeof e||!this.possibleFilters[e])}async onFilterChange(e){this.filterByProps({[e.prop]:e})}async filterByProps(e,t=!1){t&&(this.filterCollection={});for(const t in e){const{type:i,value:r}=e[t];if("none"===i)delete this.filterCollection[t];else{const e=this.possibleFilterEntities[i];this.filterCollection[t]={filter:e,value:r,type:i}}}await this.runFiltering()}async doFiltering(e,t,i){const r=[];i.forEach((t=>{const i=Object.assign({},t),n=e[i.prop];i.hasFilter&&!n&&(delete i.hasFilter,r.push(i)),!i.hasFilter&&n&&(r.push(i),i.hasFilter=!0)}));const n=this.getRowFilter(t,e),{defaultPrevented:s,detail:a}=this.emit("beforefiltertrimmed",{collection:e,itemsToFilter:n,source:t});s||(await this.revogrid.addTrimmed(a.itemsToFilter,Nn)).defaultPrevented||(await this.revogrid.updateColumns(r),this.emit("afterFilterApply"))}async clearFiltering(){this.filterCollection={},await this.runFiltering()}async runFiltering(){const{source:e,columns:t}=await this.getData(),{defaultPrevented:i,detail:r}=this.emit("beforefilterapply",{collection:this.filterCollection,source:e,columns:t});i||this.doFiltering(r.collection,r.source,r.columns)}async getData(){return{source:await this.revogrid.getSource(),columns:await this.revogrid.getColumns()}}getRowFilter(e,t){const i={};return e.forEach(((e,r)=>{for(const n in t){const s=t[n];(0,s.filter)(e[n],s.value)||(i[r]=!0)}})),i}}var Yn=function(e){return"string"==typeof e||!at(e)&&et(e)&&"[object String]"==Qe(e)},Bn=dr("length"),Wn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),jn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",$n="\\ud83c[\\udffb-\\udfff]",Vn="[^\\ud800-\\udfff]",Gn="(?:\\ud83c[\\udde6-\\uddff]){2}",Un="[\\ud800-\\udbff][\\udc00-\\udfff]",Zn="(?:"+jn+"|"+$n+")?",qn="[\\ufe0e\\ufe0f]?",Kn=qn+Zn+"(?:\\u200d(?:"+[Vn,Gn,Un].join("|")+")"+qn+Zn+")*",Jn="(?:"+[Vn+jn+"?",jn,Gn,Un,"[\\ud800-\\udfff]"].join("|")+")",Qn=RegExp($n+"(?="+$n+")|"+Jn+Kn,"g"),es=function(e){return function(e){return Wn.test(e)}(e)?function(e){for(var t=Qn.lastIndex=0;Qn.test(e);)++t;return t}(e):Bn(e)},ts=function(e){if(null==e)return 0;if(Lt(e))return Yn(e)?es(e):e.length;var t=Ti(e);return"[object Map]"==t||"[object Set]"==t?e.size:Ct(e).length};class is extends Zr{constructor(e){super(e),this.revogrid=e,this.sorting=null,this.sortingFunc=null,this.addEventListener("beforesourceset",(({detail:e})=>{if(this.hasSorting&&this.emit("beforesourcesortingapply").defaultPrevented)return;const t=this.setData(e.source,e.type);t&&(e.source=t)})),this.addEventListener("aftercolumnsset",(async({detail:{order:e}})=>{const t=await this.revogrid.getColumns(),i={};for(let r in e){const n=Kr.getColumnByProp(t,r),s=(null==n?void 0:n.cellCompare)||this.defaultCellCompare;i[r]="desc"==e[r]?this.descCellCompare(s):s}this.sort(e,i)})),this.addEventListener("initialHeaderClick",(async e=>{var t,i;e.defaultPrevented||e.detail.column.sortable&&this.headerclick(e.detail.column,e.detail.index,null===(i=null===(t=e.detail)||void 0===t?void 0:t.originalEvent)||void 0===i?void 0:i.shiftKey)}))}get hasSorting(){return!!this.sorting}async headerclick(e,t,i){let r=this.getNextOrder(e.order);const n=this.emit("beforesorting",{column:e,order:r,additive:i});if(n.defaultPrevented)return;r=n.detail.order;const s=await this.revogrid.updateColumnSorting(n.detail.column,t,r,i),a=this.emit("beforesortingapply",{column:s,order:r,additive:i});if(a.defaultPrevented)return;r=a.detail.order;const o=(null==e?void 0:e.cellCompare)||this.defaultCellCompare,l="asc"==r?o:"desc"==r?this.descCellCompare(o):void 0;if(i&&this.sorting){const t={},i={};Object.assign(t,this.sorting),Object.assign(i,this.sortingFunc),e.prop in t&&ts(t)>1&&void 0===r?(delete t[e.prop],delete i[e.prop]):(t[e.prop]=r,i[e.prop]=l),this.sort(t,i)}else this.sort({[e.prop]:r},{[e.prop]:l})}setData(e,t){if("rgRow"===t&&this.sortingFunc)return this.sortItems(e,this.sortingFunc)}async sort(e,t){if(!ts(e))return this.sorting=null,void(this.sortingFunc=null);this.sorting=e,this.sortingFunc=t;const i=await this.revogrid.getSourceStore(),r=i.get("source"),n=this.sortIndexByItems([...i.get("proxyItems")],r,this.sortingFunc);Nr(i,{proxyItems:n,source:[...r]}),this.emit("afterSortingApply")}defaultCellCompare(e,t,i){var r,n;const s=null===(r=t[e])||void 0===r?void 0:r.toString().toLowerCase(),a=null===(n=i[e])||void 0===n?void 0:n.toString().toLowerCase();return s==a?0:s>a?1:-1}descCellCompare(e){return(t,i,r)=>-1*e(t,i,r)}sortIndexByItems(e,t,i){for(let t in i)if(void 0===i[t])return[...Array(e.length).keys()];return e.sort(((e,r)=>{let n=0;for(let s in i)if(n=(0,i[s])(s,t[e],t[r]),n)break;return n}))}sortItems(e,t){return e.sort(((e,i)=>{let r=0;for(let n in t)if(r=(0,t[n])(n,e,i),r)break;return r}))}getNextOrder(e){switch(e){case void 0:return"asc";case"asc":return"desc";case"desc":return}}}var rs=function(e,t,i,r){var n=e.length;for((i=zr(i))<0&&(i=-i>n?0:n+i),(r=void 0===r||r>n?n:zr(r))<0&&(r+=n),r=i>r?0:function(e){return e?(i=0,r=4294967295,(t=zr(e))==t&&(void 0!==r&&(t=t<=r?t:r),void 0!==i&&(t=t>=i?t:i)),t):0;var t,i,r}(r);i<r;)e[i++]=t;return e};const ns="data-rgCol",ss="grid-uuid",as="rgHeaderCell",os="revo-draggable",ls="focused-cell",cs="edit-input-wrapper",hs="__rvgr-depth",ds="__rvgr-expanded",us="groupExpandClick",gs="rgRow";function fs(e,t,{prevExpanded:i,expandedAll:r}){const n=function(e,t){const i=[],r={};return e.forEach(((e,n)=>{const s=JSON.stringify(t(e));r[s]||(r[s]=new Map,i.push({children:r[s],id:s})),r[s].set(n,e)})),i}(e,t),s=[],a={};let o=0,l=0;const c={},h={};return n.forEach((e=>{const t=xs(e.id);if(!t)return;let n=0,d=!!r,u=d;const g=[];t.reduce(((t,h)=>{t.push(h);const f=t.join(",");if(!a[f]){if(u=r||i&&i[f],s.push(function(e,t,i,r,n=!1){return{"__rvgr-name":e,[hs]:i,"__rvgr-id":r,"__rvgr-value":t,[ds]:n}}(h,f,n,e.id,u)),n&&!u&&!d){const e=t.slice(0,t.length-1);i&&e.length&&i[e.join(",")]||(c[o]=!0)}o++,a[f]=g}return n++,l=n,t}),[]),e.children.forEach(((e,t)=>{u||d||(c[o]=!0),s.push(e),h[t]=o,g.push(o),o++}))})),{sourceWithGroups:s,depth:l,trimmed:c,oldNewIndexMap:h,childrenByGroup:a}}function ps(e){return e&&void 0!==e["__rvgr-name"]}function vs(e){return e&&void 0!==e["__rvgr-column"]}function xs(e){const t=JSON.parse(e);return void 0===t.push?null:t}function ms(e,t,i){const r=xs(i["__rvgr-id"]);if(!r)return!1;const n=function(e,t){const i=e.length;let r=0;for(;r<i;r++)if(e[r]!==t[r])return r;return r}(e,r);return t[hs]<n}const bs={mime:"text/csv",fileKind:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n",encoding:""},ys=String.fromCharCode(13),ws=String.fromCharCode(10),Cs=String.fromCharCode(34),Ss=String.fromCharCode(65279),ks=new RegExp('"',"g");class Ls{constructor(e={}){this.options=Object.assign(Object.assign({},bs),e)}doExport({data:e,headers:t,props:i}){let r=this.options.bom?Ss:"";return(null==t?void 0:t.length)>0&&t.forEach((e=>{e.length&&(r+=this.prepareHeader(e,this.options.columnDelimiter),r+=this.options.rowDelimiter)})),e.forEach(((e,t)=>{t>0&&(r+=this.options.rowDelimiter),ps(e)?r+=this.parseCell(function(e){return e&&e["__rvgr-name"]}(e),this.options.columnDelimiter):r+=i.map((t=>this.parseCell(e[t],this.options.columnDelimiter))).join(this.options.columnDelimiter)})),r}prepareHeader(e,t){let i="";return i+=e.map((e=>this.parseCell(e,t,!0))).join(t),i}parseCell(e,t,i=!1){let r=e;return"string"!=typeof e&&(r=JSON.stringify(e)),void 0===r?"":""!==r&&(i||[ys,Cs,ws,t].some((e=>r.indexOf(e)>=0)))?`"${r.replace(ks,'""')}"`:r}}var As;!function(e){e.csv="csv"}(As||(As={}));class Es extends Zr{async exportString(e={},t=As.csv){const i=await this.beforeexport();return i?this.formatter(t,e).doExport(i):null}async exportBlob(e={},t=As.csv){return await this.getBlob(this.formatter(t,e))}async exportFile(e={},t=As.csv){const i=this.formatter(t,e),r=await this.getBlob(i),n=window.URL||window.webkitURL,s=document.createElement("a"),{filename:a,fileKind:o}=i.options,l=`${a}.${o}`,c=n.createObjectURL(r);s.style.display="none",s.setAttribute("href",c),s.setAttribute("download",l),this.revogrid.appendChild(s),s.dispatchEvent(new MouseEvent("click")),this.revogrid.removeChild(s),await ln(120),n.revokeObjectURL(c)}async getBlob(e){const t=`${e.options.mime};charset=${e.options.encoding}`;if("undefined"!=typeof Blob){const i=await this.beforeexport();return i?new Blob([e.doExport(i)],{type:t}):null}return null}async beforeexport(){let e=await this.getData();const t=this.emit("beforeexport",{data:e});return t.defaultPrevented?null:t.detail.data}async getData(){const e=await this.getSource(),t=[],i=[];Vr.forEach(((e,r)=>{i.push(this.getColPerSource(e).then((e=>t[r]=e)))})),await Promise.all(i);const r={headers:[],props:[]};for(let e of t)e.headers.forEach(((e,t)=>{r.headers[t]||(r.headers[t]=[]),r.headers[t].push(...e)})),r.props.push(...e.props);return Object.assign({data:e},r)}async getColPerSource(e){const t=await this.revogrid.getColumnStore(e),i=t.get("source"),r=t.get("items"),n=t.get("groupingDepth"),s=t.get("groups"),a=[],o=[],l=r.reduce(((e,t,r)=>{const n=i[t].prop;return a.push(i[t].name||""),o.push(n),e[n]=r,e}),{}),c=this.getGroupHeaders(n,s,r,l);return c.push(a),{headers:c,props:o}}getGroupHeaders(e,t,i,r){const n=[],s=(o="",(h=null==(a=new Array(i.length))?0:a.length)?(l&&"number"!=typeof l&&Dr(a,o,l)&&(l=0,c=h),rs(a,o,l,c)):[]);var a,o,l,c,h;for(let i=0;i<e;i++){const e=[...s];n.push(e),t[i]&&t[i].forEach((t=>{const i=this.findGroupStartIndex(t.ids,r);"number"==typeof i&&(e[i]=t.name)}))}return n}findGroupStartIndex(e,t){let i;return e.forEach((e=>{const r=t[e];"number"==typeof r&&("number"!=typeof i||i>r)&&(i=r)})),i}async getSource(){const e=[],t=[];return $r.forEach((i=>{const r=[];e.push(r);const n=this.revogrid.getVisibleSource(i).then((e=>r.push(...e)));t.push(n)})),await Promise.all(t),e.reduce(((e,t)=>(e.push(...t),e)),[])}formatter(e,t={}){if(e===As.csv)return new Ls(t);throw new Error("Unknown format")}}const zs="grouping";class Ps extends Zr{constructor(e,t){super(e),this.revogrid=e,this.providers=t}get hasProps(){var e,t,i;return(null===(e=this.options)||void 0===e?void 0:e.props)&&(null===(i=null===(t=this.options)||void 0===t?void 0:t.props)||void 0===i?void 0:i.length)}get store(){return this.providers.dataProvider.stores.rgRow.store}get rowItems(){return this.store.get("items")}get trimmed(){return this.store.get("trimmed")}onFocus(e){ps(e.detail.model)&&e.preventDefault()}onExpand({virtualIndex:e}){const{source:t}=this.getSource();let i=this.trimmed.grouping,r=function(e,t){return e.get("items")[t]}(this.store,e);if(t[r][ds]){const{trimmed:e}=function(e,t){const i=t[e],r=i["__rvgr-id"],n={};let s=e+1;const a=t.length;for(;s<a;){const e=t[s];if(ps(e)){if(r!==e["__rvgr-id"])break;e[ds]=!1}n[s++]=!0}return i[ds]=!1,{trimmed:n}}(r,t);i=Object.assign(Object.assign({},i),e),this.revogrid.clearFocus()}else{const{trimmed:r,items:n}=function(e,t,i){const r=i[e],n=t[r],s=xs(n["__rvgr-id"]),a={};if(!s)return{trimmed:a};const o=[];n[ds]=!0;let l=r+1;const c=t.length;let h=0;for(;l<c;){const e=t[l],i=ps(e);if(i){if(!ms(s,n,e))break;h||(h=e[hs])}(!h||i&&h===e[hs])&&(a[l]=!1,o.push(l)),l++}const d={trimmed:a};if(o.length){const t=[...i];t.splice(e+1,0,...o),d.items=t}return d}(e,t,this.rowItems);i=Object.assign(Object.assign({},i),r),n&&jr(this.store,n)}this.store.set("source",t),this.revogrid.addTrimmed(i,zs)}getSource(e=!1){const t=this.store.get("source"),i=this.store.get("proxyItems");let r=0;return i.reduce(((i,n)=>{const s=t[n];return e?(ps(s)?s[ds]&&(i.prevExpanded[s["__rvgr-value"]]=!0):(i.source.push(s),i.oldNewIndexes[n]=r,r++),i):(i.source.push(s),i)}),{source:[],prevExpanded:{},oldNewIndexes:{}})}setColumnGrouping(e){return!!(null==e?void 0:e.length)&&(e[0]["__rvgr-column"]=!0,!0)}setColumns({columns:e}){for(let t of Vr)if(this.setColumnGrouping(e[t]))break}onDrag(e){const{from:t,to:i}=e.detail,r=i-t>=0,{source:n}=this.getSource(),s=this.rowItems;let a=r?t:i;const o=r?i:t;for(;a<o;a++)if(ps(n[s[a]]))return void e.preventDefault()}beforeTrimmedApply(e,t){if(t===Nn){const t=this.store.get("source");for(let i in e)e[i]&&ps(t[i])&&(e[i]=!1)}}subscribe(){this.addEventListener("beforesourceset",(({detail:e})=>this.onDataSet(e))),this.addEventListener("beforecolumnsset",(({detail:e})=>this.setColumns(e))),this.addEventListener("beforetrimmed",(({detail:{trimmed:e,trimmedType:t}})=>this.beforeTrimmedApply(e,t))),this.addEventListener("afterSortingApply",(()=>this.doSourceUpdate())),this.addEventListener("beforecellfocus",(e=>this.onFocus(e))),this.addEventListener("roworderchanged",(e=>this.onDrag(e))),this.addEventListener(us,(({detail:e})=>this.onExpand(e)))}doSourceUpdate(e){if(!this.hasProps)return;const{source:t,prevExpanded:i,oldNewIndexes:r}=this.getSource(!0),{sourceWithGroups:n,depth:s,trimmed:a,oldNewIndexMap:o,childrenByGroup:l}=fs(t,(e=>{var t;return null===(t=this.options)||void 0===t?void 0:t.props.map((t=>e[t]))}),Object.assign({prevExpanded:i},e));this.providers.dataProvider.setData(n,gs,{depth:s},!0),this.updateTrimmed(a,l,r,o)}onDataSet(e){if(!this.hasProps||!(null==e?void 0:e.source)||!e.source.length)return;const t=e.source.filter((e=>!ps(e))),i=this.revogrid.grouping||{},{sourceWithGroups:r,depth:n,trimmed:s,oldNewIndexMap:a,childrenByGroup:o}=fs(t,(e=>{var t;return null===(t=this.options)||void 0===t?void 0:t.props.map((t=>e[t]))}),Object.assign({},i||{}));e.source=r,this.providers.dataProvider.setGrouping({depth:n}),this.updateTrimmed(s,o,a)}setGrouping(e){if(this.clearSubscriptions(),this.options=e,!e.props||!Object.keys(e.props).length)return void this.clearGrouping();const{source:t}=this.getSource();t.length&&this.doSourceUpdate(Object.assign({},e));for(let e of Vr)if(this.setColumnGrouping(this.providers.columnProvider.getColumns(e))){this.providers.columnProvider.refreshByType(e);break}this.subscribe()}clearGrouping(){Vr.forEach((e=>{const t=this.providers.columnProvider.getColumns(e);let i=!1;t.forEach((e=>{vs(e)&&(delete e["__rvgr-column"],i=!0)})),i&&this.providers.columnProvider.refreshByType(e)}));const{source:e,oldNewIndexes:t}=this.getSource(!0);this.providers.dataProvider.setData(e,gs,void 0,!0),this.updateTrimmed(void 0,void 0,t)}updateTrimmed(e={},t={},i,r){const n=function(e,t,i){const r={};for(let n in e){if(n===zs)continue;const s=e[n],a={};for(let e in s){let o=t[e];i&&(o=i[o]),s[e]&&(a[o]=!0,o!==parseInt(e,10)&&(r[n]=a))}}return r}(this.trimmed,i,r);for(let e in n)this.revogrid.addTrimmed(n[e],e);this.revogrid.addTrimmed(Object.assign({},e),zs)}}class _s{constructor(){this.parentY=0}start(e,{pos:t,text:i,event:r}){var n;const{top:s}=e.getBoundingClientRect();this.parentY=s,this.text&&(this.text.innerText=i),this.move(t),this.moveTip({x:r.x,y:r.y}),null===(n=this.el)||void 0===n||n.classList.remove("hidden")}end(){var e;null===(e=this.el)||void 0===e||e.classList.add("hidden")}move(e){this.moveElement(e.end-this.parentY)}moveTip({x:e,y:t}){this.draggable&&(this.draggable.style.left=`${e}px`,this.draggable.style.top=`${t}px`)}moveElement(e){this.rgRow&&(this.rgRow.style.transform=`translateY(${e}px)`)}}const Rs=({ref:e})=>{const t=new _s;return e(t),P("div",{class:"draggable-wrapper hidden",ref:e=>t.el=e},P("div",{class:"draggable",ref:e=>t.draggable=e},P("span",{class:"revo-alt-icon"}),P("span",{ref:e=>t.text=e})),P("div",{class:"drag-position",ref:e=>t.rgRow=e}))},Ts=({viewports:e,dimensions:t,orderRef:i,nakedClick:r,registerElement:n,onScroll:s},a)=>{let o;return[P("div",{class:"main-viewport",ref:e=>o=e,onClick:e=>((e,t)=>{t===e.target&&r(e)})(e,o)},P("div",{class:"viewports"},a,P("revogr-scroll-virtual",{class:"vertical",dimension:"rgRow",viewportStore:e.rgRow.store,dimensionStore:t.rgRow.store,ref:e=>n(e,"rowScroll"),onScrollVirtual:e=>s(e.detail)}),P(Rs,{ref:i}))),P("revogr-scroll-virtual",{class:"horizontal",dimension:"rgCol",viewportStore:e.rgCol.store,dimensionStore:t.rgCol.store,ref:e=>n(e,"colScroll"),onScrollVirtual:e=>s(e.detail)})]};function Ms(e){return e===Ds}function Fs(e,t){const i=Object.assign({},e);let r=["x","y"];for(let t of r)e[t]<0&&(i[t]=0);for(let n of r)e[n]>=t[n]&&(i[n]=t[n]-1);return i}function Is(e,t){return e&&t?{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x1:Math.max(e.x,t.x),y1:Math.max(e.y,t.y)}:null}class Os{constructor(){this.unsubscribe=[],this.store=Fr({range:null,tempRange:null,tempRangeType:null,focus:null,edit:null,lastCell:null}),this.store.on("set",((e,t)=>{"tempRange"!==e||t||this.store.set("tempRangeType",null)}))}onChange(e,t){this.unsubscribe.push(this.store.onChange(e,t))}clearFocus(){Nr(this.store,{focus:null,range:null,edit:null,tempRange:null})}setFocus(e,t){Nr(this.store,{focus:e,range:Is(e,t),edit:null,tempRange:null})}setTempArea(e){Nr(this.store,{tempRange:null==e?void 0:e.area,tempRangeType:null==e?void 0:e.type,edit:null})}clearTemp(){Nr(this.store,{tempRange:null})}setRangeArea(e){Nr(this.store,{range:e,edit:null,tempRange:null})}setRange(e,t){this.setRangeArea(Is(e,t))}setLastCell(e){Nr(this.store,{lastCell:e})}setEdit(e){const t=this.store.get("focus");Nr(this.store,t&&"string"==typeof e?{edit:{x:t.x,y:t.y,val:e}}:{edit:null})}dispose(){this.unsubscribe.forEach((e=>e())),this.store.dispose()}}const Ds=-1;class Hs{constructor(){this.dirty=!1,this.stores={},this.columnStores={},this.rowStores={},this.sections=[]}get focusedStore(){var e;for(let t in this.stores)for(let i in this.stores[t]){const r=null===(e=this.stores[t][i])||void 0===e?void 0:e.store.get("focus");if(r)return{entity:this.stores[t][i],cell:r,position:{x:parseInt(i,10),y:parseInt(t,10)}}}return null}get edit(){var e;return null===(e=this.focusedStore)||void 0===e?void 0:e.entity.store.get("edit")}get focused(){var e;return null===(e=this.focusedStore)||void 0===e?void 0:e.entity.store.get("focus")}registerSection(e){if(!e)return this.sections.length=0,void(this.dirty=!0);-1===this.sections.indexOf(e)&&this.sections.push(e)}beforeUpdate(){if(this.dirty){for(let e in this.stores)for(let t in this.stores[e])this.stores[e][t].dispose();this.dirty=!1}}registerColumn(e){return Ms(e)?new Os:(this.columnStores[e]||(this.columnStores[e]=new Os),this.columnStores[e])}registerRow(e){return Ms(e)?new Os:(this.rowStores[e]||(this.rowStores[e]=new Os),this.rowStores[e])}register({x:e,y:t}){var i,r;return Ms(e)||Ms(t)?new Os:(this.stores[t]||(this.stores[t]={}),this.stores[t][e]||(this.stores[t][e]=new Os,null===(i=this.stores[t][e])||void 0===i||i.onChange("range",(i=>{this.columnStores[e].setRangeArea(i),this.rowStores[t].setRangeArea(i)})),null===(r=this.stores[t][e])||void 0===r||r.store.on("dispose",(()=>{var i,r;null===(i=this.columnStores[e])||void 0===i||i.dispose(),null===(r=this.rowStores[t])||void 0===r||r.dispose(),delete this.rowStores[t],delete this.columnStores[e],this.stores[t]&&delete this.stores[t][e],Object.keys(this.stores[t]||{}).length||delete this.stores[t]}))),this.stores[t][e])}setEditByCell({x:e,y:t},i){const r=this.stores[t][e];this.focus(r,{focus:i,end:i}),this.setEdit("")}focus(e,{focus:t,end:i}){let r;for(let t in this.stores)for(let i in this.stores[t]){const n=this.stores[t][i];n!==e?n.clearFocus():r={x:parseInt(i,10),y:parseInt(t,10)}}if(!r)return;const n=e.store.get("lastCell"),s=function(e,t){const i={};let r=["x","y"];for(let t of r)if(e[t]<0)return i[t]=e[t],i;for(let n of r)if(e[n]>=t[n])return i[n]=e[n]-t[n],i;return null}(t,n);let a;if(s)for(let e in s){let t,i=e;switch(i){case"x":t=this.getXStores(r.y);break;case"y":t=this.getYStores(r.x)}if(s[i]>=0)a=t[++r[i]];else{a=t[--r[i]];const e=null==a?void 0:a.store.get("lastCell");e&&(s[i]=e[i]+s[i])}}if(a){let e=Object.assign(Object.assign({},t),s);this.focus(a,{focus:e,end:e})}else t=Fs(t,n),i=Fs(t,n),e.setFocus(t,i)}clearAll(){var e;for(let t in this.stores)for(let i in this.stores[t])null===(e=this.stores[t][i])||void 0===e||e.clearFocus()}setEdit(e){this.focusedStore&&this.focusedStore.entity.setEdit(e)}getXStores(e){return this.stores[e]}getYStores(e){const t={};for(let i in this.stores)t[i]=this.stores[i][e];return t}}const Ns="header",Xs="footer",Ys="content";function Bs(e,t){return{x:e.viewports[e.colType].store.get("realCount"),y:e.viewports[t].store.get("realCount")}}var Ws=Be((function(e,t){(function(){var i,r="Expected a function",n="__lodash_hash_undefined__",s="__lodash_placeholder__",a=32,o=128,l=1/0,c=9007199254740991,h=NaN,d=4294967295,u=[["ary",o],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",256]],g="[object Arguments]",f="[object Array]",p="[object Boolean]",v="[object Date]",x="[object Error]",m="[object Function]",b="[object GeneratorFunction]",y="[object Map]",w="[object Number]",C="[object Object]",S="[object Promise]",k="[object RegExp]",L="[object Set]",A="[object String]",E="[object Symbol]",z="[object WeakMap]",P="[object ArrayBuffer]",_="[object DataView]",R="[object Float32Array]",T="[object Float64Array]",M="[object Int8Array]",F="[object Int16Array]",I="[object Int32Array]",O="[object Uint8Array]",D="[object Uint8ClampedArray]",H="[object Uint16Array]",N="[object Uint32Array]",X=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,B=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,j=/[&<>"']/g,$=RegExp(W.source),V=RegExp(j.source),G=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,J=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Q=/[\\^$.*+?()[\]{}|]/g,ee=RegExp(Q.source),te=/^\s+/,ie=/\s/,re=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ne=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ae=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,oe=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,ue=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,fe=/^0o[0-7]+$/i,pe=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,me=/['\n\r\u2028\u2029\\]/g,be="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ye="a-z\\xdf-\\xf6\\xf8-\\xff",we="A-Z\\xc0-\\xd6\\xd8-\\xde",Ce="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Se="["+Ce+"]",ke="["+be+"]",Le="\\d+",Ae="["+ye+"]",Ee="[^\\ud800-\\udfff"+Ce+Le+"\\u2700-\\u27bf"+ye+we+"]",ze="\\ud83c[\\udffb-\\udfff]",Pe="[^\\ud800-\\udfff]",_e="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Te="["+we+"]",Me="(?:"+Ae+"|"+Ee+")",Fe="(?:"+Te+"|"+Ee+")",Ie="(?:['’](?:d|ll|m|re|s|t|ve))?",Oe="(?:['’](?:D|LL|M|RE|S|T|VE))?",De="(?:"+ke+"|"+ze+")?",He="[\\ufe0e\\ufe0f]?",Ne=He+De+"(?:\\u200d(?:"+[Pe,_e,Re].join("|")+")"+He+De+")*",Xe="(?:"+["[\\u2700-\\u27bf]",_e,Re].join("|")+")"+Ne,Be="(?:"+[Pe+ke+"?",ke,_e,Re,"[\\ud800-\\udfff]"].join("|")+")",We=RegExp("['’]","g"),je=RegExp(ke,"g"),$e=RegExp(ze+"(?="+ze+")|"+Be+Ne,"g"),Ve=RegExp([Te+"?"+Ae+"+"+Ie+"(?="+[Se,Te,"$"].join("|")+")",Fe+"+"+Oe+"(?="+[Se,Te+Me,"$"].join("|")+")",Te+"?"+Me+"+"+Ie,Te+"+"+Oe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Xe].join("|"),"g"),Ge=RegExp("[\\u200d\\ud800-\\udfff"+be+"\\ufe0e\\ufe0f]"),Ue=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ze=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],qe=-1,Ke={};Ke[R]=Ke[T]=Ke[M]=Ke[F]=Ke[I]=Ke[O]=Ke[D]=Ke[H]=Ke[N]=!0,Ke[g]=Ke[f]=Ke[P]=Ke[p]=Ke[_]=Ke[v]=Ke[x]=Ke[m]=Ke[y]=Ke[w]=Ke[C]=Ke[k]=Ke[L]=Ke[A]=Ke[z]=!1;var Je={};Je[g]=Je[f]=Je[P]=Je[_]=Je[p]=Je[v]=Je[R]=Je[T]=Je[M]=Je[F]=Je[I]=Je[y]=Je[w]=Je[C]=Je[k]=Je[L]=Je[A]=Je[E]=Je[O]=Je[D]=Je[H]=Je[N]=!0,Je[x]=Je[m]=Je[z]=!1;var Qe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},et=parseFloat,tt=parseInt,it="object"==typeof Ye&&Ye&&Ye.Object===Object&&Ye,rt="object"==typeof self&&self&&self.Object===Object&&self,nt=it||rt||Function("return this")(),st=t&&!t.nodeType&&t,at=st&&e&&!e.nodeType&&e,ot=at&&at.exports===st,lt=ot&&it.process,ct=function(){try{return at&&at.require&&at.require("util").types||lt&<.binding&<.binding("util")}catch(e){}}(),ht=ct&&ct.isArrayBuffer,dt=ct&&ct.isDate,ut=ct&&ct.isMap,gt=ct&&ct.isRegExp,ft=ct&&ct.isSet,pt=ct&&ct.isTypedArray;function vt(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function xt(e,t,i,r){for(var n=-1,s=null==e?0:e.length;++n<s;){var a=e[n];t(r,a,i(a),e)}return r}function mt(e,t){for(var i=-1,r=null==e?0:e.length;++i<r&&!1!==t(e[i],i,e););return e}function bt(e,t){for(var i=null==e?0:e.length;i--&&!1!==t(e[i],i,e););return e}function yt(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(!t(e[i],i,e))return!1;return!0}function wt(e,t){for(var i=-1,r=null==e?0:e.length,n=0,s=[];++i<r;){var a=e[i];t(a,i,e)&&(s[n++]=a)}return s}function Ct(e,t){return!(null==e||!e.length)&&Tt(e,t,0)>-1}function St(e,t,i){for(var r=-1,n=null==e?0:e.length;++r<n;)if(i(t,e[r]))return!0;return!1}function kt(e,t){for(var i=-1,r=null==e?0:e.length,n=Array(r);++i<r;)n[i]=t(e[i],i,e);return n}function Lt(e,t){for(var i=-1,r=t.length,n=e.length;++i<r;)e[n+i]=t[i];return e}function At(e,t,i,r){var n=-1,s=null==e?0:e.length;for(r&&s&&(i=e[++n]);++n<s;)i=t(i,e[n],n,e);return i}function Et(e,t,i,r){var n=null==e?0:e.length;for(r&&n&&(i=e[--n]);n--;)i=t(i,e[n],n,e);return i}function zt(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(t(e[i],i,e))return!0;return!1}var Pt=Ot("length");function _t(e,t,i){var r;return i(e,(function(e,i,n){if(t(e,i,n))return r=i,!1})),r}function Rt(e,t,i,r){for(var n=e.length,s=i+(r?1:-1);r?s--:++s<n;)if(t(e[s],s,e))return s;return-1}function Tt(e,t,i){return t==t?function(e,t,i){for(var r=i-1,n=e.length;++r<n;)if(e[r]===t)return r;return-1}(e,t,i):Rt(e,Ft,i)}function Mt(e,t,i,r){for(var n=i-1,s=e.length;++n<s;)if(r(e[n],t))return n;return-1}function Ft(e){return e!=e}function It(e,t){var i=null==e?0:e.length;return i?Nt(e,t)/i:h}function Ot(e){return function(t){return null==t?i:t[e]}}function Dt(e){return function(t){return null==e?i:e[t]}}function Ht(e,t,i,r,n){return n(e,(function(e,n,s){i=r?(r=!1,e):t(i,e,n,s)})),i}function Nt(e,t){for(var r,n=-1,s=e.length;++n<s;){var a=t(e[n]);a!==i&&(r=r===i?a:r+a)}return r}function Xt(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r}function Yt(e){return e?e.slice(0,si(e)+1).replace(te,""):e}function Bt(e){return function(t){return e(t)}}function Wt(e,t){return kt(t,(function(t){return e[t]}))}function jt(e,t){return e.has(t)}function $t(e,t){for(var i=-1,r=e.length;++i<r&&Tt(t,e[i],0)>-1;);return i}function Vt(e,t){for(var i=e.length;i--&&Tt(t,e[i],0)>-1;);return i}function Gt(e,t){for(var i=e.length,r=0;i--;)e[i]===t&&++r;return r}var Ut=Dt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Zt=Dt({"&":"&","<":"<",">":">",'"':""","'":"'"});function qt(e){return"\\"+Qe[e]}function Kt(e){return Ge.test(e)}function Jt(e){var t=-1,i=Array(e.size);return e.forEach((function(e,r){i[++t]=[r,e]})),i}function Qt(e,t){return function(i){return e(t(i))}}function ei(e,t){for(var i=-1,r=e.length,n=0,a=[];++i<r;){var o=e[i];o!==t&&o!==s||(e[i]=s,a[n++]=i)}return a}function ti(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i}function ii(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=[e,e]})),i}function ri(e){return Kt(e)?function(e){for(var t=$e.lastIndex=0;$e.test(e);)++t;return t}(e):Pt(e)}function ni(e){return Kt(e)?function(e){return e.match($e)||[]}(e):function(e){return e.split("")}(e)}function si(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var ai=Dt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),oi=function e(t){var ie=(t=null==t?nt:oi.defaults(nt.Object(),t,oi.pick(nt,Ze))).Array,be=t.Date,ye=t.Error,we=t.Function,Ce=t.Math,Se=t.Object,ke=t.RegExp,Le=t.String,Ae=t.TypeError,Ee=ie.prototype,ze=we.prototype,Pe=Se.prototype,_e=t["__core-js_shared__"],Re=ze.toString,Te=Pe.hasOwnProperty,Me=0,Fe=function(){var e=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ie=Pe.toString,Oe=Re.call(Se),De=nt._,He=ke("^"+Re.call(Te).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ne=ot?t.Buffer:i,Xe=t.Symbol,Ye=t.Uint8Array,Be=Ne?Ne.allocUnsafe:i,$e=Qt(Se.getPrototypeOf,Se),Ge=Se.create,Qe=Pe.propertyIsEnumerable,it=Ee.splice,rt=Xe?Xe.isConcatSpreadable:i,st=Xe?Xe.iterator:i,at=Xe?Xe.toStringTag:i,lt=function(){try{var e=ls(Se,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==nt.clearTimeout&&t.clearTimeout,Pt=be&&be.now!==nt.Date.now&&be.now,Dt=t.setTimeout!==nt.setTimeout&&t.setTimeout,li=Ce.ceil,ci=Ce.floor,hi=Se.getOwnPropertySymbols,di=Ne?Ne.isBuffer:i,ui=t.isFinite,gi=Ee.join,fi=Qt(Se.keys,Se),pi=Ce.max,vi=Ce.min,xi=be.now,mi=t.parseInt,bi=Ce.random,yi=Ee.reverse,wi=ls(t,"DataView"),Ci=ls(t,"Map"),Si=ls(t,"Promise"),ki=ls(t,"Set"),Li=ls(t,"WeakMap"),Ai=ls(Se,"create"),Ei=Li&&new Li,zi={},Pi=Is(wi),_i=Is(Ci),Ri=Is(Si),Ti=Is(ki),Mi=Is(Li),Fi=Xe?Xe.prototype:i,Ii=Fi?Fi.valueOf:i,Oi=Fi?Fi.toString:i;function Di(e){if(Ja(e)&&!Ya(e)&&!(e instanceof Yi)){if(e instanceof Xi)return e;if(Te.call(e,"__wrapped__"))return Os(e)}return new Xi(e)}var Hi=function(){function e(){}return function(t){if(!Ka(t))return{};if(Ge)return Ge(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Ni(){}function Xi(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Yi(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Bi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function Wi(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function ji(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}function $i(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new ji;++t<i;)this.add(e[t])}function Vi(e){var t=this.__data__=new Wi(e);this.size=t.size}function Gi(e,t){var i=Ya(e),r=!i&&Xa(e),n=!i&&!r&&$a(e),s=!i&&!r&&!n&&ao(e),a=i||r||n||s,o=a?Xt(e.length,Le):[],l=o.length;for(var c in e)!t&&!Te.call(e,c)||a&&("length"==c||n&&("offset"==c||"parent"==c)||s&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ps(c,l))||o.push(c);return o}function Ui(e){var t=e.length;return t?e[jr(0,t-1)]:i}function Zi(e,t){return Ts(An(e),nr(t,0,e.length))}function qi(e){return Ts(An(e))}function Ki(e,t,r){(r!==i&&!Da(e[t],r)||r===i&&!(t in e))&&ir(e,t,r)}function Ji(e,t,r){var n=e[t];Te.call(e,t)&&Da(n,r)&&(r!==i||t in e)||ir(e,t,r)}function Qi(e,t){for(var i=e.length;i--;)if(Da(e[i][0],t))return i;return-1}function er(e,t,i,r){return cr(e,(function(e,n,s){t(r,e,i(e),s)})),r}function tr(e,t){return e&&En(t,Po(t),e)}function ir(e,t,i){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}function rr(e,t){for(var r=-1,n=t.length,s=ie(n),a=null==e;++r<n;)s[r]=a?i:ko(e,t[r]);return s}function nr(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function sr(e,t,r,n,s,a){var o,l=1&t,c=2&t,h=4&t;if(r&&(o=s?r(e,n,s,a):r(e)),o!==i)return o;if(!Ka(e))return e;var d=Ya(e);if(d){if(o=function(e){var t=e.length,i=new e.constructor(t);return t&&"string"==typeof e[0]&&Te.call(e,"index")&&(i.index=e.index,i.input=e.input),i}(e),!l)return An(e,o)}else{var u=ds(e),f=u==m||u==b;if($a(e))return yn(e,l);if(u==C||u==g||f&&!s){if(o=c||f?{}:gs(e),!l)return c?function(e,t){return En(e,hs(e),t)}(e,function(e,t){return e&&En(t,_o(t),e)}(o,e)):function(e,t){return En(e,cs(e),t)}(e,tr(o,e))}else{if(!Je[u])return s?e:{};o=function(e,t,i){var r,n=e.constructor;switch(t){case P:return wn(e);case p:case v:return new n(+e);case _:return function(e,t){var i=t?wn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}(e,i);case R:case T:case M:case F:case I:case O:case D:case H:case N:return Cn(e,i);case y:return new n;case w:case A:return new n(e);case k:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case L:return new n;case E:return r=e,Ii?Se(Ii.call(r)):{}}}(e,u,l)}}a||(a=new Vi);var x=a.get(e);if(x)return x;a.set(e,o),ro(e)?e.forEach((function(i){o.add(sr(i,t,r,i,e,a))})):Qa(e)&&e.forEach((function(i,n){o.set(n,sr(i,t,r,n,e,a))}));var S=d?i:(h?c?ts:es:c?_o:Po)(e);return mt(S||e,(function(i,n){S&&(i=e[n=i]),Ji(o,n,sr(i,t,r,n,e,a))})),o}function ar(e,t,r){var n=r.length;if(null==e)return!n;for(e=Se(e);n--;){var s=r[n],a=t[s],o=e[s];if(o===i&&!(s in e)||!a(o))return!1}return!0}function or(e,t,n){if("function"!=typeof e)throw new Ae(r);return zs((function(){e.apply(i,n)}),t)}function lr(e,t,i,r){var n=-1,s=Ct,a=!0,o=e.length,l=[],c=t.length;if(!o)return l;i&&(t=kt(t,Bt(i))),r?(s=St,a=!1):t.length>=200&&(s=jt,a=!1,t=new $i(t));e:for(;++n<o;){var h=e[n],d=null==i?h:i(h);if(h=r||0!==h?h:0,a&&d==d){for(var u=c;u--;)if(t[u]===d)continue e;l.push(h)}else s(t,d,r)||l.push(h)}return l}Di.templateSettings={escape:G,evaluate:U,interpolate:Z,variable:"",imports:{_:Di}},Di.prototype=Ni.prototype,Di.prototype.constructor=Di,Xi.prototype=Hi(Ni.prototype),Xi.prototype.constructor=Xi,Yi.prototype=Hi(Ni.prototype),Yi.prototype.constructor=Yi,Bi.prototype.clear=function(){this.__data__=Ai?Ai(null):{},this.size=0},Bi.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Bi.prototype.get=function(e){var t=this.__data__;if(Ai){var r=t[e];return r===n?i:r}return Te.call(t,e)?t[e]:i},Bi.prototype.has=function(e){var t=this.__data__;return Ai?t[e]!==i:Te.call(t,e)},Bi.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ai&&t===i?n:t,this},Wi.prototype.clear=function(){this.__data__=[],this.size=0},Wi.prototype.delete=function(e){var t=this.__data__,i=Qi(t,e);return!(i<0||(i==t.length-1?t.pop():it.call(t,i,1),--this.size,0))},Wi.prototype.get=function(e){var t=this.__data__,r=Qi(t,e);return r<0?i:t[r][1]},Wi.prototype.has=function(e){return Qi(this.__data__,e)>-1},Wi.prototype.set=function(e,t){var i=this.__data__,r=Qi(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this},ji.prototype.clear=function(){this.size=0,this.__data__={hash:new Bi,map:new(Ci||Wi),string:new Bi}},ji.prototype.delete=function(e){var t=as(this,e).delete(e);return this.size-=t?1:0,t},ji.prototype.get=function(e){return as(this,e).get(e)},ji.prototype.has=function(e){return as(this,e).has(e)},ji.prototype.set=function(e,t){var i=as(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this},$i.prototype.add=$i.prototype.push=function(e){return this.__data__.set(e,n),this},$i.prototype.has=function(e){return this.__data__.has(e)},Vi.prototype.clear=function(){this.__data__=new Wi,this.size=0},Vi.prototype.delete=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i},Vi.prototype.get=function(e){return this.__data__.get(e)},Vi.prototype.has=function(e){return this.__data__.has(e)},Vi.prototype.set=function(e,t){var i=this.__data__;if(i instanceof Wi){var r=i.__data__;if(!Ci||r.length<199)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new ji(r)}return i.set(e,t),this.size=i.size,this};var cr=_n(xr),hr=_n(mr,!0);function dr(e,t){var i=!0;return cr(e,(function(e,r,n){return i=!!t(e,r,n)})),i}function ur(e,t,r){for(var n=-1,s=e.length;++n<s;){var a=e[n],o=t(a);if(null!=o&&(l===i?o==o&&!so(o):r(o,l)))var l=o,c=a}return c}function gr(e,t){var i=[];return cr(e,(function(e,r,n){t(e,r,n)&&i.push(e)})),i}function fr(e,t,i,r,n){var s=-1,a=e.length;for(i||(i=fs),n||(n=[]);++s<a;){var o=e[s];t>0&&i(o)?t>1?fr(o,t-1,i,r,n):Lt(n,o):r||(n[n.length]=o)}return n}var pr=Rn(),vr=Rn(!0);function xr(e,t){return e&&pr(e,t,Po)}function mr(e,t){return e&&vr(e,t,Po)}function br(e,t){return wt(t,(function(t){return Ua(e[t])}))}function yr(e,t){for(var r=0,n=(t=vn(t,e)).length;null!=e&&r<n;)e=e[Fs(t[r++])];return r&&r==n?e:i}function wr(e,t,i){var r=t(e);return Ya(e)?r:Lt(r,i(e))}function Cr(e){return null==e?e===i?"[object Undefined]":"[object Null]":at&&at in Se(e)?function(e){var t=Te.call(e,at),r=e[at];try{e[at]=i;var n=!0}catch(e){}var s=Ie.call(e);return n&&(t?e[at]=r:delete e[at]),s}(e):function(e){return Ie.call(e)}(e)}function Sr(e,t){return e>t}function kr(e,t){return null!=e&&Te.call(e,t)}function Lr(e,t){return null!=e&&t in Se(e)}function Ar(e,t,r){for(var n=r?St:Ct,s=e[0].length,a=e.length,o=a,l=ie(a),c=1/0,h=[];o--;){var d=e[o];o&&t&&(d=kt(d,Bt(t))),c=vi(d.length,c),l[o]=!r&&(t||s>=120&&d.length>=120)?new $i(o&&d):i}d=e[0];var u=-1,g=l[0];e:for(;++u<s&&h.length<c;){var f=d[u],p=t?t(f):f;if(f=r||0!==f?f:0,!(g?jt(g,p):n(h,p,r))){for(o=a;--o;){var v=l[o];if(!(v?jt(v,p):n(e[o],p,r)))continue e}g&&g.push(p),h.push(f)}}return h}function Er(e,t,r){var n=null==(e=ks(e,t=vn(t,e)))?e:e[Fs(Gs(t))];return null==n?i:vt(n,e,r)}function zr(e){return Ja(e)&&Cr(e)==g}function Pr(e,t,r,n,s){return e===t||(null==e||null==t||!Ja(e)&&!Ja(t)?e!=e&&t!=t:function(e,t,r,n,s,a){var o=Ya(e),l=Ya(t),c=o?f:ds(e),h=l?f:ds(t),d=(c=c==g?C:c)==C,u=(h=h==g?C:h)==C,m=c==h;if(m&&$a(e)){if(!$a(t))return!1;o=!0,d=!1}if(m&&!d)return a||(a=new Vi),o||ao(e)?Jn(e,t,r,n,s,a):function(e,t,i,r,n,s,a){switch(i){case _:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case P:return!(e.byteLength!=t.byteLength||!s(new Ye(e),new Ye(t)));case p:case v:case w:return Da(+e,+t);case x:return e.name==t.name&&e.message==t.message;case k:case A:return e==t+"";case y:var o=Jt;case L:var l=1&r;if(o||(o=ti),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var h=Jn(o(e),o(t),r,n,s,a);return a.delete(e),h;case E:if(Ii)return Ii.call(e)==Ii.call(t)}return!1}(e,t,c,r,n,s,a);if(!(1&r)){var b=d&&Te.call(e,"__wrapped__"),S=u&&Te.call(t,"__wrapped__");if(b||S){var z=b?e.value():e,R=S?t.value():t;return a||(a=new Vi),s(z,R,r,n,a)}}return!!m&&(a||(a=new Vi),function(e,t,r,n,s,a){var o=1&r,l=es(e),c=l.length;if(c!=es(t).length&&!o)return!1;for(var h=c;h--;){var d=l[h];if(!(o?d in t:Te.call(t,d)))return!1}var u=a.get(e),g=a.get(t);if(u&&g)return u==t&&g==e;var f=!0;a.set(e,t),a.set(t,e);for(var p=o;++h<c;){var v=e[d=l[h]],x=t[d];if(n)var m=o?n(x,v,d,t,e,a):n(v,x,d,e,t,a);if(!(m===i?v===x||s(v,x,r,n,a):m)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return a.delete(e),a.delete(t),f}(e,t,r,n,s,a))}(e,t,r,n,Pr,s))}function _r(e,t,r,n){var s=r.length,a=s,o=!n;if(null==e)return!a;for(e=Se(e);s--;){var l=r[s];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<a;){var c=(l=r[s])[0],h=e[c],d=l[1];if(o&&l[2]){if(h===i&&!(c in e))return!1}else{var u=new Vi;if(n)var g=n(h,d,c,e,t,u);if(!(g===i?Pr(d,h,3,n,u):g))return!1}}return!0}function Rr(e){return!(!Ka(e)||(t=e,Fe&&Fe in t))&&(Ua(e)?He:ge).test(Is(e));var t}function Tr(e){return"function"==typeof e?e:null==e?tl:"object"==typeof e?Ya(e)?Dr(e[0],e[1]):Or(e):hl(e)}function Mr(e){if(!ys(e))return fi(e);var t=[];for(var i in Se(e))Te.call(e,i)&&"constructor"!=i&&t.push(i);return t}function Fr(e,t){return e<t}function Ir(e,t){var i=-1,r=Wa(e)?ie(e.length):[];return cr(e,(function(e,n,s){r[++i]=t(e,n,s)})),r}function Or(e){var t=os(e);return 1==t.length&&t[0][2]?Cs(t[0][0],t[0][1]):function(i){return i===e||_r(i,e,t)}}function Dr(e,t){return xs(e)&&ws(t)?Cs(Fs(e),t):function(r){var n=ko(r,e);return n===i&&n===t?Lo(r,e):Pr(t,n,3)}}function Hr(e,t,r,n,s){e!==t&&pr(t,(function(a,o){if(s||(s=new Vi),Ka(a))!function(e,t,r,n,s,a,o){var l=As(e,r),c=As(t,r),h=o.get(c);if(h)Ki(e,r,h);else{var d=a?a(l,c,r+"",e,t,o):i,u=d===i;if(u){var g=Ya(c),f=!g&&$a(c),p=!g&&!f&&ao(c);d=c,g||f||p?Ya(l)?d=l:ja(l)?d=An(l):f?(u=!1,d=yn(c,!0)):p?(u=!1,d=Cn(c,!0)):d=[]:to(c)||Xa(c)?(d=l,Xa(l)?d=po(l):Ka(l)&&!Ua(l)||(d=gs(c))):u=!1}u&&(o.set(c,d),s(d,c,n,a,o),o.delete(c)),Ki(e,r,d)}}(e,t,o,r,Hr,n,s);else{var l=n?n(As(e,o),a,o+"",e,t,s):i;l===i&&(l=a),Ki(e,o,l)}}),_o)}function Nr(e,t){var r=e.length;if(r)return ps(t+=t<0?r:0,r)?e[t]:i}function Xr(e,t,i){t=t.length?kt(t,(function(e){return Ya(e)?function(t){return yr(t,1===e.length?e[0]:e)}:e})):[tl];var r=-1;return t=kt(t,Bt(ss())),function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,i){for(var r=-1,n=e.criteria,s=t.criteria,a=n.length,o=i.length;++r<a;){var l=Sn(n[r],s[r]);if(l)return r>=o?l:l*("desc"==i[r]?-1:1)}return e.index-t.index}(e,t,i)}));r--;)e[r]=e[r].value;return e}(Ir(e,(function(e,i,n){return{criteria:kt(t,(function(t){return t(e)})),index:++r,value:e}})))}function Yr(e,t,i){for(var r=-1,n=t.length,s={};++r<n;){var a=t[r],o=yr(e,a);i(o,a)&&Zr(s,vn(a,e),o)}return s}function Br(e,t,i,r){var n=r?Mt:Tt,s=-1,a=t.length,o=e;for(e===t&&(t=An(t)),i&&(o=kt(e,Bt(i)));++s<a;)for(var l=0,c=t[s],h=i?i(c):c;(l=n(o,h,l,r))>-1;)o!==e&&it.call(o,l,1),it.call(e,l,1);return e}function Wr(e,t){for(var i=e?t.length:0,r=i-1;i--;){var n=t[i];if(i==r||n!==s){var s=n;ps(n)?it.call(e,n,1):ln(e,n)}}return e}function jr(e,t){return e+ci(bi()*(t-e+1))}function $r(e,t){var i="";if(!e||t<1||t>c)return i;do{t%2&&(i+=e),(t=ci(t/2))&&(e+=e)}while(t);return i}function Vr(e,t){return Ps(Ss(e,t,tl),e+"")}function Gr(e){return Ui(Ho(e))}function Ur(e,t){var i=Ho(e);return Ts(i,nr(t,0,i.length))}function Zr(e,t,r,n){if(!Ka(e))return e;for(var s=-1,a=(t=vn(t,e)).length,o=a-1,l=e;null!=l&&++s<a;){var c=Fs(t[s]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(s!=o){var d=l[c];(h=n?n(d,c,l):i)===i&&(h=Ka(d)?d:ps(t[s+1])?[]:{})}Ji(l,c,h),l=l[c]}return e}var qr=Ei?function(e,t){return Ei.set(e,t),e}:tl,Kr=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:Jo(t),writable:!0})}:tl;function Jr(e){return Ts(Ho(e))}function Qr(e,t,i){var r=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(i=i>n?n:i)<0&&(i+=n),n=t>i?0:i-t>>>0,t>>>=0;for(var s=ie(n);++r<n;)s[r]=e[r+t];return s}function en(e,t){var i;return cr(e,(function(e,r,n){return!(i=t(e,r,n))})),!!i}function tn(e,t,i){var r=0,n=null==e?r:e.length;if("number"==typeof t&&t==t&&n<=2147483647){for(;r<n;){var s=r+n>>>1,a=e[s];null!==a&&!so(a)&&(i?a<=t:a<t)?r=s+1:n=s}return n}return rn(e,t,tl,i)}function rn(e,t,r,n){var s=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=r(t))!=t,l=null===t,c=so(t),h=t===i;s<a;){var d=ci((s+a)/2),u=r(e[d]),g=u!==i,f=null===u,p=u==u,v=so(u);if(o)var x=n||p;else x=h?p&&(n||g):l?p&&g&&(n||!f):c?p&&g&&!f&&(n||!v):!f&&!v&&(n?u<=t:u<t);x?s=d+1:a=d}return vi(a,4294967294)}function nn(e,t){for(var i=-1,r=e.length,n=0,s=[];++i<r;){var a=e[i],o=t?t(a):a;if(!i||!Da(o,l)){var l=o;s[n++]=0===a?0:a}}return s}function sn(e){return"number"==typeof e?e:so(e)?h:+e}function an(e){if("string"==typeof e)return e;if(Ya(e))return kt(e,an)+"";if(so(e))return Oi?Oi.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function on(e,t,i){var r=-1,n=Ct,s=e.length,a=!0,o=[],l=o;if(i)a=!1,n=St;else if(s>=200){var c=t?null:Vn(e);if(c)return ti(c);a=!1,n=jt,l=new $i}else l=t?[]:o;e:for(;++r<s;){var h=e[r],d=t?t(h):h;if(h=i||0!==h?h:0,a&&d==d){for(var u=l.length;u--;)if(l[u]===d)continue e;t&&l.push(d),o.push(h)}else n(l,d,i)||(l!==o&&l.push(d),o.push(h))}return o}function ln(e,t){return null==(e=ks(e,t=vn(t,e)))||delete e[Fs(Gs(t))]}function cn(e,t,i,r){return Zr(e,t,i(yr(e,t)),r)}function hn(e,t,i,r){for(var n=e.length,s=r?n:-1;(r?s--:++s<n)&&t(e[s],s,e););return i?Qr(e,r?0:s,r?s+1:n):Qr(e,r?s+1:0,r?n:s)}function dn(e,t){var i=e;return i instanceof Yi&&(i=i.value()),At(t,(function(e,t){return t.func.apply(t.thisArg,Lt([e],t.args))}),i)}function un(e,t,i){var r=e.length;if(r<2)return r?on(e[0]):[];for(var n=-1,s=ie(r);++n<r;)for(var a=e[n],o=-1;++o<r;)o!=n&&(s[n]=lr(s[n]||a,e[o],t,i));return on(fr(s,1),t,i)}function gn(e,t,r){for(var n=-1,s=e.length,a=t.length,o={};++n<s;){var l=n<a?t[n]:i;r(o,e[n],l)}return o}function fn(e){return ja(e)?e:[]}function pn(e){return"function"==typeof e?e:tl}function vn(e,t){return Ya(e)?e:xs(e,t)?[e]:Ms(vo(e))}var xn=Vr;function mn(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:Qr(e,t,r)}var bn=ct||function(e){return nt.clearTimeout(e)};function yn(e,t){if(t)return e.slice();var i=e.length,r=Be?Be(i):new e.constructor(i);return e.copy(r),r}function wn(e){var t=new e.constructor(e.byteLength);return new Ye(t).set(new Ye(e)),t}function Cn(e,t){var i=t?wn(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function Sn(e,t){if(e!==t){var r=e!==i,n=null===e,s=e==e,a=so(e),o=t!==i,l=null===t,c=t==t,h=so(t);if(!l&&!h&&!a&&e>t||a&&o&&c&&!l&&!h||n&&o&&c||!r&&c||!s)return 1;if(!n&&!a&&!h&&e<t||h&&r&&s&&!n&&!a||l&&r&&s||!o&&s||!c)return-1}return 0}function kn(e,t,i,r){for(var n=-1,s=e.length,a=i.length,o=-1,l=t.length,c=pi(s-a,0),h=ie(l+c),d=!r;++o<l;)h[o]=t[o];for(;++n<a;)(d||n<s)&&(h[i[n]]=e[n]);for(;c--;)h[o++]=e[n++];return h}function Ln(e,t,i,r){for(var n=-1,s=e.length,a=-1,o=i.length,l=-1,c=t.length,h=pi(s-o,0),d=ie(h+c),u=!r;++n<h;)d[n]=e[n];for(var g=n;++l<c;)d[g+l]=t[l];for(;++a<o;)(u||n<s)&&(d[g+i[a]]=e[n++]);return d}function An(e,t){var i=-1,r=e.length;for(t||(t=ie(r));++i<r;)t[i]=e[i];return t}function En(e,t,r,n){var s=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var l=t[a],c=n?n(r[l],e[l],l,r,e):i;c===i&&(c=e[l]),s?ir(r,l,c):Ji(r,l,c)}return r}function zn(e,t){return function(i,r){var n=Ya(i)?xt:er,s=t?t():{};return n(i,e,ss(r,2),s)}}function Pn(e){return Vr((function(t,r){var n=-1,s=r.length,a=s>1?r[s-1]:i,o=s>2?r[2]:i;for(a=e.length>3&&"function"==typeof a?(s--,a):i,o&&vs(r[0],r[1],o)&&(a=s<3?i:a,s=1),t=Se(t);++n<s;){var l=r[n];l&&e(t,l,n,a)}return t}))}function _n(e,t){return function(i,r){if(null==i)return i;if(!Wa(i))return e(i,r);for(var n=i.length,s=t?n:-1,a=Se(i);(t?s--:++s<n)&&!1!==r(a[s],s,a););return i}}function Rn(e){return function(t,i,r){for(var n=-1,s=Se(t),a=r(t),o=a.length;o--;){var l=a[e?o:++n];if(!1===i(s[l],l,s))break}return t}}function Tn(e){return function(t){var r=Kt(t=vo(t))?ni(t):i,n=r?r[0]:t.charAt(0),s=r?mn(r,1).join(""):t.slice(1);return n[e]()+s}}function Mn(e){return function(t){return At(Zo(Yo(t).replace(We,"")),e,"")}}function Fn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var i=Hi(e.prototype),r=e.apply(i,t);return Ka(r)?r:i}}function In(e){return function(t,r,n){var s=Se(t);if(!Wa(t)){var a=ss(r,3);t=Po(t),r=function(e){return a(s[e],e,s)}}var o=e(t,r,n);return o>-1?s[a?t[o]:o]:i}}function On(e){return Qn((function(t){var n=t.length,s=n,a=Xi.prototype.thru;for(e&&t.reverse();s--;){var o=t[s];if("function"!=typeof o)throw new Ae(r);if(a&&!l&&"wrapper"==rs(o))var l=new Xi([],!0)}for(s=l?s:n;++s<n;){var c=rs(o=t[s]),h="wrapper"==c?is(o):i;l=h&&ms(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?l[rs(h[0])].apply(l,h[3]):1==o.length&&ms(o)?l[c]():l.thru(o)}return function(){var e=arguments,i=e[0];if(l&&1==e.length&&Ya(i))return l.plant(i).value();for(var r=0,s=n?t[r].apply(this,e):i;++r<n;)s=t[r].call(this,s);return s}}))}function Dn(e,t,r,n,s,a,l,c,h,d){var u=t&o,g=1&t,f=2&t,p=24&t,v=512&t,x=f?i:Fn(e);return function i(){for(var o=arguments.length,m=ie(o),b=o;b--;)m[b]=arguments[b];if(p)var y=ns(i),w=Gt(m,y);if(n&&(m=kn(m,n,s,p)),a&&(m=Ln(m,a,l,p)),o-=w,p&&o<d){var C=ei(m,y);return jn(e,t,Dn,i.placeholder,r,m,C,c,h,d-o)}var S=g?r:this,k=f?S[e]:e;return o=m.length,c?m=Ls(m,c):v&&o>1&&m.reverse(),u&&h<o&&(m.length=h),this&&this!==nt&&this instanceof i&&(k=x||Fn(k)),k.apply(S,m)}}function Hn(e,t){return function(i,r){return function(e,t,i,r){return xr(e,(function(e,n,s){t(r,i(e),n,s)})),r}(i,e,t(r),{})}}function Nn(e,t){return function(r,n){var s;if(r===i&&n===i)return t;if(r!==i&&(s=r),n!==i){if(s===i)return n;"string"==typeof r||"string"==typeof n?(r=an(r),n=an(n)):(r=sn(r),n=sn(n)),s=e(r,n)}return s}}function Xn(e){return Qn((function(t){return t=kt(t,Bt(ss())),Vr((function(i){var r=this;return e(t,(function(e){return vt(e,r,i)}))}))}))}function Yn(e,t){var r=(t=t===i?" ":an(t)).length;if(r<2)return r?$r(t,e):t;var n=$r(t,li(e/ri(t)));return Kt(t)?mn(ni(n),0,e).join(""):n.slice(0,e)}function Bn(e){return function(t,r,n){return n&&"number"!=typeof n&&vs(t,r,n)&&(r=n=i),t=ho(t),r===i?(r=t,t=0):r=ho(r),function(e,t,i,r){for(var n=-1,s=pi(li((t-e)/(i||1)),0),a=ie(s);s--;)a[r?s:++n]=e,e+=i;return a}(t,r,n=n===i?t<r?1:-1:ho(n),e)}}function Wn(e){return function(t,i){return"string"==typeof t&&"string"==typeof i||(t=fo(t),i=fo(i)),e(t,i)}}function jn(e,t,r,n,s,o,l,c,h,d){var u=8&t;t|=u?a:64,4&(t&=~(u?64:a))||(t&=-4);var g=[e,t,s,u?o:i,u?l:i,u?i:o,u?i:l,c,h,d],f=r.apply(i,g);return ms(e)&&Es(f,g),f.placeholder=n,_s(f,e,t)}function $n(e){var t=Ce[e];return function(e,i){if(e=fo(e),(i=null==i?0:vi(uo(i),292))&&ui(e)){var r=(vo(e)+"e").split("e");return+((r=(vo(t(r[0]+"e"+(+r[1]+i)))+"e").split("e"))[0]+"e"+(+r[1]-i))}return t(e)}}var Vn=ki&&1/ti(new ki([,-0]))[1]==l?function(e){return new ki(e)}:al;function Gn(e){return function(t){var i=ds(t);return i==y?Jt(t):i==L?ii(t):function(e,t){return kt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Un(e,t,n,l,c,h,d,u){var g=2&t;if(!g&&"function"!=typeof e)throw new Ae(r);var f=l?l.length:0;if(f||(t&=-97,l=c=i),d=d===i?d:pi(uo(d),0),u=u===i?u:uo(u),f-=c?c.length:0,64&t){var p=l,v=c;l=c=i}var x=g?i:is(e),m=[e,t,n,l,c,p,v,h,d,u];if(x&&function(e,t){var i=e[1],r=t[1],n=i|r,a=n<131,l=r==o&&8==i||r==o&&256==i&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==i;if(!a&&!l)return e;1&r&&(e[2]=t[2],n|=1&i?0:4);var c=t[3];if(c){var h=e[3];e[3]=h?kn(h,c,t[4]):c,e[4]=h?ei(e[3],s):t[4]}(c=t[5])&&(h=e[5],e[5]=h?Ln(h,c,t[6]):c,e[6]=h?ei(e[5],s):t[6]),(c=t[7])&&(e[7]=c),r&o&&(e[8]=null==e[8]?t[8]:vi(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=n}(m,x),e=m[0],t=m[1],n=m[2],l=m[3],c=m[4],!(u=m[9]=m[9]===i?g?0:e.length:pi(m[9]-f,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,r){var n=Fn(e);return function s(){for(var a=arguments.length,o=ie(a),l=a,c=ns(s);l--;)o[l]=arguments[l];var h=a<3&&o[0]!==c&&o[a-1]!==c?[]:ei(o,c);return(a-=h.length)<r?jn(e,t,Dn,s.placeholder,i,o,h,i,i,r-a):vt(this&&this!==nt&&this instanceof s?n:e,this,o)}}(e,t,u):t!=a&&33!=t||c.length?Dn.apply(i,m):function(e,t,i,r){var n=1&t,s=Fn(e);return function t(){for(var a=-1,o=arguments.length,l=-1,c=r.length,h=ie(c+o),d=this&&this!==nt&&this instanceof t?s:e;++l<c;)h[l]=r[l];for(;o--;)h[l++]=arguments[++a];return vt(d,n?i:this,h)}}(e,t,n,l);else var b=function(e,t,i){var r=1&t,n=Fn(e);return function t(){return(this&&this!==nt&&this instanceof t?n:e).apply(r?i:this,arguments)}}(e,t,n);return _s((x?qr:Es)(b,m),e,t)}function Zn(e,t,r,n){return e===i||Da(e,Pe[r])&&!Te.call(n,r)?t:e}function qn(e,t,r,n,s,a){return Ka(e)&&Ka(t)&&(a.set(t,e),Hr(e,t,i,qn,a),a.delete(t)),e}function Kn(e){return to(e)?i:e}function Jn(e,t,r,n,s,a){var o=1&r,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var u=-1,g=!0,f=2&r?new $i:i;for(a.set(e,t),a.set(t,e);++u<l;){var p=e[u],v=t[u];if(n)var x=o?n(v,p,u,t,e,a):n(p,v,u,e,t,a);if(x!==i){if(x)continue;g=!1;break}if(f){if(!zt(t,(function(e,t){if(!jt(f,t)&&(p===e||s(p,e,r,n,a)))return f.push(t)}))){g=!1;break}}else if(p!==v&&!s(p,v,r,n,a)){g=!1;break}}return a.delete(e),a.delete(t),g}function Qn(e){return Ps(Ss(e,i,Bs),e+"")}function es(e){return wr(e,Po,cs)}function ts(e){return wr(e,_o,hs)}var is=Ei?function(e){return Ei.get(e)}:al;function rs(e){for(var t=e.name+"",i=zi[t],r=Te.call(zi,t)?i.length:0;r--;){var n=i[r],s=n.func;if(null==s||s==e)return n.name}return t}function ns(e){return(Te.call(Di,"placeholder")?Di:e).placeholder}function ss(){var e=Di.iteratee||il;return e=e===il?Tr:e,arguments.length?e(arguments[0],arguments[1]):e}function as(e,t){var i,r,n=e.__data__;return("string"==(r=typeof(i=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?n["string"==typeof t?"string":"hash"]:n.map}function os(e){for(var t=Po(e),i=t.length;i--;){var r=t[i],n=e[r];t[i]=[r,n,ws(n)]}return t}function ls(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Rr(r)?r:i}var cs=hi?function(e){return null==e?[]:(e=Se(e),wt(hi(e),(function(t){return Qe.call(e,t)})))}:gl,hs=hi?function(e){for(var t=[];e;)Lt(t,cs(e)),e=$e(e);return t}:gl,ds=Cr;function us(e,t,i){for(var r=-1,n=(t=vn(t,e)).length,s=!1;++r<n;){var a=Fs(t[r]);if(!(s=null!=e&&i(e,a)))break;e=e[a]}return s||++r!=n?s:!!(n=null==e?0:e.length)&&qa(n)&&ps(a,n)&&(Ya(e)||Xa(e))}function gs(e){return"function"!=typeof e.constructor||ys(e)?{}:Hi($e(e))}function fs(e){return Ya(e)||Xa(e)||!!(rt&&e&&e[rt])}function ps(e,t){var i=typeof e;return!!(t=null==t?c:t)&&("number"==i||"symbol"!=i&&pe.test(e))&&e>-1&&e%1==0&&e<t}function vs(e,t,i){if(!Ka(i))return!1;var r=typeof t;return!!("number"==r?Wa(i)&&ps(t,i.length):"string"==r&&t in i)&&Da(i[t],e)}function xs(e,t){if(Ya(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!so(e))||K.test(e)||!q.test(e)||null!=t&&e in Se(t)}function ms(e){var t=rs(e),i=Di[t];if("function"!=typeof i||!(t in Yi.prototype))return!1;if(e===i)return!0;var r=is(i);return!!r&&e===r[0]}(wi&&ds(new wi(new ArrayBuffer(1)))!=_||Ci&&ds(new Ci)!=y||Si&&ds(Si.resolve())!=S||ki&&ds(new ki)!=L||Li&&ds(new Li)!=z)&&(ds=function(e){var t=Cr(e),r=t==C?e.constructor:i,n=r?Is(r):"";if(n)switch(n){case Pi:return _;case _i:return y;case Ri:return S;case Ti:return L;case Mi:return z}return t});var bs=_e?Ua:fl;function ys(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function ws(e){return e==e&&!Ka(e)}function Cs(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Se(r))}}function Ss(e,t,r){return t=pi(t===i?e.length-1:t,0),function(){for(var i=arguments,n=-1,s=pi(i.length-t,0),a=ie(s);++n<s;)a[n]=i[t+n];n=-1;for(var o=ie(t+1);++n<t;)o[n]=i[n];return o[t]=r(a),vt(e,this,o)}}function ks(e,t){return t.length<2?e:yr(e,Qr(t,0,-1))}function Ls(e,t){for(var r=e.length,n=vi(t.length,r),s=An(e);n--;){var a=t[n];e[n]=ps(a,r)?s[a]:i}return e}function As(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Es=Rs(qr),zs=Dt||function(e,t){return nt.setTimeout(e,t)},Ps=Rs(Kr);function _s(e,t,i){var r=t+"";return Ps(e,function(e,t){var i=t.length;if(!i)return e;var r=i-1;return t[r]=(i>1?"& ":"")+t[r],t=t.join(i>2?", ":" "),e.replace(re,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return mt(u,(function(i){var r="_."+i[0];t&i[1]&&!Ct(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ne);return t?t[1].split(se):[]}(r),i)))}function Rs(e){var t=0,r=0;return function(){var n=xi(),s=16-(n-r);if(r=n,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Ts(e,t){var r=-1,n=e.length,s=n-1;for(t=t===i?n:t;++r<t;){var a=jr(r,s),o=e[a];e[a]=e[r],e[r]=o}return e.length=t,e}var Ms=function(e){var t=Ra((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(J,(function(e,i,r,n){t.push(r?n.replace(le,"$1"):i||e)})),t}),(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}();function Fs(e){if("string"==typeof e||so(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Is(e){if(null!=e){try{return Re.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Os(e){if(e instanceof Yi)return e.clone();var t=new Xi(e.__wrapped__,e.__chain__);return t.__actions__=An(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ds=Vr((function(e,t){return ja(e)?lr(e,fr(t,1,ja,!0)):[]})),Hs=Vr((function(e,t){var r=Gs(t);return ja(r)&&(r=i),ja(e)?lr(e,fr(t,1,ja,!0),ss(r,2)):[]})),Ns=Vr((function(e,t){var r=Gs(t);return ja(r)&&(r=i),ja(e)?lr(e,fr(t,1,ja,!0),i,r):[]}));function Xs(e,t,i){var r=null==e?0:e.length;if(!r)return-1;var n=null==i?0:uo(i);return n<0&&(n=pi(r+n,0)),Rt(e,ss(t,3),n)}function Ys(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=n-1;return r!==i&&(s=uo(r),s=r<0?pi(n+s,0):vi(s,n-1)),Rt(e,ss(t,3),s,!0)}function Bs(e){return null!=e&&e.length?fr(e,1):[]}function Ws(e){return e&&e.length?e[0]:i}var js=Vr((function(e){var t=kt(e,fn);return t.length&&t[0]===e[0]?Ar(t):[]})),$s=Vr((function(e){var t=Gs(e),r=kt(e,fn);return t===Gs(r)?t=i:r.pop(),r.length&&r[0]===e[0]?Ar(r,ss(t,2)):[]})),Vs=Vr((function(e){var t=Gs(e),r=kt(e,fn);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?Ar(r,i,t):[]}));function Gs(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Us=Vr(Zs);function Zs(e,t){return e&&e.length&&t&&t.length?Br(e,t):e}var qs=Qn((function(e,t){var i=null==e?0:e.length,r=rr(e,t);return Wr(e,kt(t,(function(e){return ps(e,i)?+e:e})).sort(Sn)),r}));function Ks(e){return null==e?e:yi.call(e)}var Js=Vr((function(e){return on(fr(e,1,ja,!0))})),Qs=Vr((function(e){var t=Gs(e);return ja(t)&&(t=i),on(fr(e,1,ja,!0),ss(t,2))})),ea=Vr((function(e){var t=Gs(e);return t="function"==typeof t?t:i,on(fr(e,1,ja,!0),i,t)}));function ta(e){if(!e||!e.length)return[];var t=0;return e=wt(e,(function(e){if(ja(e))return t=pi(e.length,t),!0})),Xt(t,(function(t){return kt(e,Ot(t))}))}function ia(e,t){if(!e||!e.length)return[];var r=ta(e);return null==t?r:kt(r,(function(e){return vt(t,i,e)}))}var ra=Vr((function(e,t){return ja(e)?lr(e,t):[]})),na=Vr((function(e){return un(wt(e,ja))})),sa=Vr((function(e){var t=Gs(e);return ja(t)&&(t=i),un(wt(e,ja),ss(t,2))})),aa=Vr((function(e){var t=Gs(e);return t="function"==typeof t?t:i,un(wt(e,ja),i,t)})),oa=Vr(ta),la=Vr((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,ia(e,r)}));function ca(e){var t=Di(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var da=Qn((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,s=function(t){return rr(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Yi&&ps(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[s],thisArg:i}),new Xi(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(s)})),ua=zn((function(e,t,i){Te.call(e,i)?++e[i]:ir(e,i,1)})),ga=In(Xs),fa=In(Ys);function pa(e,t){return(Ya(e)?mt:cr)(e,ss(t,3))}function va(e,t){return(Ya(e)?bt:hr)(e,ss(t,3))}var xa=zn((function(e,t,i){Te.call(e,i)?e[i].push(t):ir(e,i,[t])})),ma=Vr((function(e,t,i){var r=-1,n="function"==typeof t,s=Wa(e)?ie(e.length):[];return cr(e,(function(e){s[++r]=n?vt(t,e,i):Er(e,t,i)})),s})),ba=zn((function(e,t,i){ir(e,i,t)}));function ya(e,t){return(Ya(e)?kt:Ir)(e,ss(t,3))}var wa=zn((function(e,t,i){e[i?0:1].push(t)}),(function(){return[[],[]]})),Ca=Vr((function(e,t){if(null==e)return[];var i=t.length;return i>1&&vs(e,t[0],t[1])?t=[]:i>2&&vs(t[0],t[1],t[2])&&(t=[t[0]]),Xr(e,fr(t,1),[])})),Sa=Pt||function(){return nt.Date.now()};function ka(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Un(e,o,i,i,i,i,t)}function La(e,t){var n;if("function"!=typeof t)throw new Ae(r);return e=uo(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Aa=Vr((function(e,t,i){var r=1;if(i.length){var n=ei(i,ns(Aa));r|=a}return Un(e,r,t,i,n)})),Ea=Vr((function(e,t,i){var r=3;if(i.length){var n=ei(i,ns(Ea));r|=a}return Un(t,r,e,i,n)}));function za(e,t,n){var s,a,o,l,c,h,d=0,u=!1,g=!1,f=!0;if("function"!=typeof e)throw new Ae(r);function p(t){var r=s,n=a;return s=a=i,d=t,l=e.apply(n,r)}function v(e){return d=e,c=zs(m,t),u?p(e):l}function x(e){var r=e-h;return h===i||r>=t||r<0||g&&e-d>=o}function m(){var e=Sa();if(x(e))return b(e);c=zs(m,function(e){var i=t-(e-h);return g?vi(i,o-(e-d)):i}(e))}function b(e){return c=i,f&&s?p(e):(s=a=i,l)}function y(){var e=Sa(),r=x(e);if(s=arguments,a=this,h=e,r){if(c===i)return v(h);if(g)return bn(c),c=zs(m,t),p(h)}return c===i&&(c=zs(m,t)),l}return t=fo(t)||0,Ka(n)&&(u=!!n.leading,o=(g="maxWait"in n)?pi(fo(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),y.cancel=function(){c!==i&&bn(c),d=0,s=h=a=c=i},y.flush=function(){return c===i?l:b(Sa())},y}var Pa=Vr((function(e,t){return or(e,1,t)})),_a=Vr((function(e,t,i){return or(e,fo(t)||0,i)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(r);var i=function(){var r=arguments,n=t?t.apply(this,r):r[0],s=i.cache;if(s.has(n))return s.get(n);var a=e.apply(this,r);return i.cache=s.set(n,a)||s,a};return i.cache=new(Ra.Cache||ji),i}function Ta(e){if("function"!=typeof e)throw new Ae(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=ji;var Ma=xn((function(e,t){var i=(t=1==t.length&&Ya(t[0])?kt(t[0],Bt(ss())):kt(fr(t,1),Bt(ss()))).length;return Vr((function(r){for(var n=-1,s=vi(r.length,i);++n<s;)r[n]=t[n].call(this,r[n]);return vt(e,this,r)}))})),Fa=Vr((function(e,t){var r=ei(t,ns(Fa));return Un(e,a,i,t,r)})),Ia=Vr((function(e,t){var r=ei(t,ns(Ia));return Un(e,64,i,t,r)})),Oa=Qn((function(e,t){return Un(e,256,i,i,i,t)}));function Da(e,t){return e===t||e!=e&&t!=t}var Ha=Wn(Sr),Na=Wn((function(e,t){return e>=t})),Xa=zr(function(){return arguments}())?zr:function(e){return Ja(e)&&Te.call(e,"callee")&&!Qe.call(e,"callee")},Ya=ie.isArray,Ba=ht?Bt(ht):function(e){return Ja(e)&&Cr(e)==P};function Wa(e){return null!=e&&qa(e.length)&&!Ua(e)}function ja(e){return Ja(e)&&Wa(e)}var $a=di||fl,Va=dt?Bt(dt):function(e){return Ja(e)&&Cr(e)==v};function Ga(e){if(!Ja(e))return!1;var t=Cr(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!to(e)}function Ua(e){if(!Ka(e))return!1;var t=Cr(e);return t==m||t==b||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==uo(e)}function qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function Ka(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ja(e){return null!=e&&"object"==typeof e}var Qa=ut?Bt(ut):function(e){return Ja(e)&&ds(e)==y};function eo(e){return"number"==typeof e||Ja(e)&&Cr(e)==w}function to(e){if(!Ja(e)||Cr(e)!=C)return!1;var t=$e(e);if(null===t)return!0;var i=Te.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Re.call(i)==Oe}var io=gt?Bt(gt):function(e){return Ja(e)&&Cr(e)==k},ro=ft?Bt(ft):function(e){return Ja(e)&&ds(e)==L};function no(e){return"string"==typeof e||!Ya(e)&&Ja(e)&&Cr(e)==A}function so(e){return"symbol"==typeof e||Ja(e)&&Cr(e)==E}var ao=pt?Bt(pt):function(e){return Ja(e)&&qa(e.length)&&!!Ke[Cr(e)]},oo=Wn(Fr),lo=Wn((function(e,t){return e<=t}));function co(e){if(!e)return[];if(Wa(e))return no(e)?ni(e):An(e);if(st&&e[st])return function(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}(e[st]());var t=ds(e);return(t==y?Jt:t==L?ti:Ho)(e)}function ho(e){return e?(e=fo(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function uo(e){var t=ho(e),i=t%1;return t==t?i?t-i:t:0}function go(e){return e?nr(uo(e),0,d):0}function fo(e){if("number"==typeof e)return e;if(so(e))return h;if(Ka(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ka(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Yt(e);var i=ue.test(e);return i||fe.test(e)?tt(e.slice(2),i?2:8):de.test(e)?h:+e}function po(e){return En(e,_o(e))}function vo(e){return null==e?"":an(e)}var xo=Pn((function(e,t){if(ys(t)||Wa(t))En(t,Po(t),e);else for(var i in t)Te.call(t,i)&&Ji(e,i,t[i])})),mo=Pn((function(e,t){En(t,_o(t),e)})),bo=Pn((function(e,t,i,r){En(t,_o(t),e,r)})),yo=Pn((function(e,t,i,r){En(t,Po(t),e,r)})),wo=Qn(rr),Co=Vr((function(e,t){e=Se(e);var r=-1,n=t.length,s=n>2?t[2]:i;for(s&&vs(t[0],t[1],s)&&(n=1);++r<n;)for(var a=t[r],o=_o(a),l=-1,c=o.length;++l<c;){var h=o[l],d=e[h];(d===i||Da(d,Pe[h])&&!Te.call(e,h))&&(e[h]=a[h])}return e})),So=Vr((function(e){return e.push(i,qn),vt(To,i,e)}));function ko(e,t,r){var n=null==e?i:yr(e,t);return n===i?r:n}function Lo(e,t){return null!=e&&us(e,t,Lr)}var Ao=Hn((function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Ie.call(t)),e[t]=i}),Jo(tl)),Eo=Hn((function(e,t,i){null!=t&&"function"!=typeof t.toString&&(t=Ie.call(t)),Te.call(e,t)?e[t].push(i):e[t]=[i]}),ss),zo=Vr(Er);function Po(e){return Wa(e)?Gi(e):Mr(e)}function _o(e){return Wa(e)?Gi(e,!0):function(e){if(!Ka(e))return function(e){var t=[];if(null!=e)for(var i in Se(e))t.push(i);return t}(e);var t=ys(e),i=[];for(var r in e)("constructor"!=r||!t&&Te.call(e,r))&&i.push(r);return i}(e)}var Ro=Pn((function(e,t,i){Hr(e,t,i)})),To=Pn((function(e,t,i,r){Hr(e,t,i,r)})),Mo=Qn((function(e,t){var i={};if(null==e)return i;var r=!1;t=kt(t,(function(t){return t=vn(t,e),r||(r=t.length>1),t})),En(e,ts(e),i),r&&(i=sr(i,7,Kn));for(var n=t.length;n--;)ln(i,t[n]);return i})),Fo=Qn((function(e,t){return null==e?{}:function(e,t){return Yr(e,t,(function(t,i){return Lo(e,i)}))}(e,t)}));function Io(e,t){if(null==e)return{};var i=kt(ts(e),(function(e){return[e]}));return t=ss(t),Yr(e,i,(function(e,i){return t(e,i[0])}))}var Oo=Gn(Po),Do=Gn(_o);function Ho(e){return null==e?[]:Wt(e,Po(e))}var No=Mn((function(e,t,i){return t=t.toLowerCase(),e+(i?Xo(t):t)}));function Xo(e){return Uo(vo(e).toLowerCase())}function Yo(e){return(e=vo(e))&&e.replace(ve,Ut).replace(je,"")}var Bo=Mn((function(e,t,i){return e+(i?"-":"")+t.toLowerCase()})),Wo=Mn((function(e,t,i){return e+(i?" ":"")+t.toLowerCase()})),jo=Tn("toLowerCase"),$o=Mn((function(e,t,i){return e+(i?"_":"")+t.toLowerCase()})),Vo=Mn((function(e,t,i){return e+(i?" ":"")+Uo(t)})),Go=Mn((function(e,t,i){return e+(i?" ":"")+t.toUpperCase()})),Uo=Tn("toUpperCase");function Zo(e,t,r){return e=vo(e),(t=r?i:t)===i?function(e){return Ue.test(e)}(e)?function(e){return e.match(Ve)||[]}(e):function(e){return e.match(ae)||[]}(e):e.match(t)||[]}var qo=Vr((function(e,t){try{return vt(e,i,t)}catch(e){return Ga(e)?e:new ye(e)}})),Ko=Qn((function(e,t){return mt(t,(function(t){t=Fs(t),ir(e,t,Aa(e[t],e))})),e}));function Jo(e){return function(){return e}}var Qo=On(),el=On(!0);function tl(e){return e}function il(e){return Tr("function"==typeof e?e:sr(e,1))}var rl=Vr((function(e,t){return function(i){return Er(i,e,t)}})),nl=Vr((function(e,t){return function(i){return Er(e,i,t)}}));function sl(e,t,i){var r=Po(t),n=br(t,r);null!=i||Ka(t)&&(n.length||!r.length)||(i=t,t=e,e=this,n=br(t,Po(t)));var s=!(Ka(i)&&"chain"in i&&!i.chain),a=Ua(e);return mt(n,(function(i){var r=t[i];e[i]=r,a&&(e.prototype[i]=function(){var t=this.__chain__;if(s||t){var i=e(this.__wrapped__);return(i.__actions__=An(this.__actions__)).push({func:r,args:arguments,thisArg:e}),i.__chain__=t,i}return r.apply(e,Lt([this.value()],arguments))})})),e}function al(){}var ol=Xn(kt),ll=Xn(yt),cl=Xn(zt);function hl(e){return xs(e)?Ot(Fs(e)):function(e){return function(t){return yr(t,e)}}(e)}var dl=Bn(),ul=Bn(!0);function gl(){return[]}function fl(){return!1}var pl,vl=Nn((function(e,t){return e+t}),0),xl=$n("ceil"),ml=Nn((function(e,t){return e/t}),1),bl=$n("floor"),yl=Nn((function(e,t){return e*t}),1),wl=$n("round"),Cl=Nn((function(e,t){return e-t}),0);return Di.after=function(e,t){if("function"!=typeof t)throw new Ae(r);return e=uo(e),function(){if(--e<1)return t.apply(this,arguments)}},Di.ary=ka,Di.assign=xo,Di.assignIn=mo,Di.assignInWith=bo,Di.assignWith=yo,Di.at=wo,Di.before=La,Di.bind=Aa,Di.bindAll=Ko,Di.bindKey=Ea,Di.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ya(e)?e:[e]},Di.chain=ca,Di.chunk=function(e,t,r){t=(r?vs(e,t,r):t===i)?1:pi(uo(t),0);var n=null==e?0:e.length;if(!n||t<1)return[];for(var s=0,a=0,o=ie(li(n/t));s<n;)o[a++]=Qr(e,s,s+=t);return o},Di.compact=function(e){for(var t=-1,i=null==e?0:e.length,r=0,n=[];++t<i;){var s=e[t];s&&(n[r++]=s)}return n},Di.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ie(e-1),i=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Lt(Ya(i)?An(i):[i],fr(t,1))},Di.cond=function(e){var t=null==e?0:e.length,i=ss();return e=t?kt(e,(function(e){if("function"!=typeof e[1])throw new Ae(r);return[i(e[0]),e[1]]})):[],Vr((function(i){for(var r=-1;++r<t;){var n=e[r];if(vt(n[0],this,i))return vt(n[1],this,i)}}))},Di.conforms=function(e){return function(e){var t=Po(e);return function(i){return ar(i,e,t)}}(sr(e,1))},Di.constant=Jo,Di.countBy=ua,Di.create=function(e,t){var i=Hi(e);return null==t?i:tr(i,t)},Di.curry=function e(t,r,n){var s=Un(t,8,i,i,i,i,i,r=n?i:r);return s.placeholder=e.placeholder,s},Di.curryRight=function e(t,r,n){var s=Un(t,16,i,i,i,i,i,r=n?i:r);return s.placeholder=e.placeholder,s},Di.debounce=za,Di.defaults=Co,Di.defaultsDeep=So,Di.defer=Pa,Di.delay=_a,Di.difference=Ds,Di.differenceBy=Hs,Di.differenceWith=Ns,Di.drop=function(e,t,r){var n=null==e?0:e.length;return n?Qr(e,(t=r||t===i?1:uo(t))<0?0:t,n):[]},Di.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?Qr(e,0,(t=n-(t=r||t===i?1:uo(t)))<0?0:t):[]},Di.dropRightWhile=function(e,t){return e&&e.length?hn(e,ss(t,3),!0,!0):[]},Di.dropWhile=function(e,t){return e&&e.length?hn(e,ss(t,3),!0):[]},Di.fill=function(e,t,r,n){var s=null==e?0:e.length;return s?(r&&"number"!=typeof r&&vs(e,t,r)&&(r=0,n=s),function(e,t,r,n){var s=e.length;for((r=uo(r))<0&&(r=-r>s?0:s+r),(n=n===i||n>s?s:uo(n))<0&&(n+=s),n=r>n?0:go(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Di.filter=function(e,t){return(Ya(e)?wt:gr)(e,ss(t,3))},Di.flatMap=function(e,t){return fr(ya(e,t),1)},Di.flatMapDeep=function(e,t){return fr(ya(e,t),l)},Di.flatMapDepth=function(e,t,r){return r=r===i?1:uo(r),fr(ya(e,t),r)},Di.flatten=Bs,Di.flattenDeep=function(e){return null!=e&&e.length?fr(e,l):[]},Di.flattenDepth=function(e,t){return null!=e&&e.length?fr(e,t=t===i?1:uo(t)):[]},Di.flip=function(e){return Un(e,512)},Di.flow=Qo,Di.flowRight=el,Di.fromPairs=function(e){for(var t=-1,i=null==e?0:e.length,r={};++t<i;){var n=e[t];r[n[0]]=n[1]}return r},Di.functions=function(e){return null==e?[]:br(e,Po(e))},Di.functionsIn=function(e){return null==e?[]:br(e,_o(e))},Di.groupBy=xa,Di.initial=function(e){return null!=e&&e.length?Qr(e,0,-1):[]},Di.intersection=js,Di.intersectionBy=$s,Di.intersectionWith=Vs,Di.invert=Ao,Di.invertBy=Eo,Di.invokeMap=ma,Di.iteratee=il,Di.keyBy=ba,Di.keys=Po,Di.keysIn=_o,Di.map=ya,Di.mapKeys=function(e,t){var i={};return t=ss(t,3),xr(e,(function(e,r,n){ir(i,t(e,r,n),e)})),i},Di.mapValues=function(e,t){var i={};return t=ss(t,3),xr(e,(function(e,r,n){ir(i,r,t(e,r,n))})),i},Di.matches=function(e){return Or(sr(e,1))},Di.matchesProperty=function(e,t){return Dr(e,sr(t,1))},Di.memoize=Ra,Di.merge=Ro,Di.mergeWith=To,Di.method=rl,Di.methodOf=nl,Di.mixin=sl,Di.negate=Ta,Di.nthArg=function(e){return e=uo(e),Vr((function(t){return Nr(t,e)}))},Di.omit=Mo,Di.omitBy=function(e,t){return Io(e,Ta(ss(t)))},Di.once=function(e){return La(2,e)},Di.orderBy=function(e,t,r,n){return null==e?[]:(Ya(t)||(t=null==t?[]:[t]),Ya(r=n?i:r)||(r=null==r?[]:[r]),Xr(e,t,r))},Di.over=ol,Di.overArgs=Ma,Di.overEvery=ll,Di.overSome=cl,Di.partial=Fa,Di.partialRight=Ia,Di.partition=wa,Di.pick=Fo,Di.pickBy=Io,Di.property=hl,Di.propertyOf=function(e){return function(t){return null==e?i:yr(e,t)}},Di.pull=Us,Di.pullAll=Zs,Di.pullAllBy=function(e,t,i){return e&&e.length&&t&&t.length?Br(e,t,ss(i,2)):e},Di.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Br(e,t,i,r):e},Di.pullAt=qs,Di.range=dl,Di.rangeRight=ul,Di.rearg=Oa,Di.reject=function(e,t){return(Ya(e)?wt:gr)(e,Ta(ss(t,3)))},Di.remove=function(e,t){var i=[];if(!e||!e.length)return i;var r=-1,n=[],s=e.length;for(t=ss(t,3);++r<s;){var a=e[r];t(a,r,e)&&(i.push(a),n.push(r))}return Wr(e,n),i},Di.rest=function(e,t){if("function"!=typeof e)throw new Ae(r);return Vr(e,t=t===i?t:uo(t))},Di.reverse=Ks,Di.sampleSize=function(e,t,r){return t=(r?vs(e,t,r):t===i)?1:uo(t),(Ya(e)?Zi:Ur)(e,t)},Di.set=function(e,t,i){return null==e?e:Zr(e,t,i)},Di.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Zr(e,t,r,n)},Di.shuffle=function(e){return(Ya(e)?qi:Jr)(e)},Di.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&vs(e,t,r)?(t=0,r=n):(t=null==t?0:uo(t),r=r===i?n:uo(r)),Qr(e,t,r)):[]},Di.sortBy=Ca,Di.sortedUniq=function(e){return e&&e.length?nn(e):[]},Di.sortedUniqBy=function(e,t){return e&&e.length?nn(e,ss(t,2)):[]},Di.split=function(e,t,r){return r&&"number"!=typeof r&&vs(e,t,r)&&(t=r=i),(r=r===i?d:r>>>0)?(e=vo(e))&&("string"==typeof t||null!=t&&!io(t))&&!(t=an(t))&&Kt(e)?mn(ni(e),0,r):e.split(t,r):[]},Di.spread=function(e,t){if("function"!=typeof e)throw new Ae(r);return t=null==t?0:pi(uo(t),0),Vr((function(i){var r=i[t],n=mn(i,0,t);return r&&Lt(n,r),vt(e,this,n)}))},Di.tail=function(e){var t=null==e?0:e.length;return t?Qr(e,1,t):[]},Di.take=function(e,t,r){return e&&e.length?Qr(e,0,(t=r||t===i?1:uo(t))<0?0:t):[]},Di.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?Qr(e,(t=n-(t=r||t===i?1:uo(t)))<0?0:t,n):[]},Di.takeRightWhile=function(e,t){return e&&e.length?hn(e,ss(t,3),!1,!0):[]},Di.takeWhile=function(e,t){return e&&e.length?hn(e,ss(t,3)):[]},Di.tap=function(e,t){return t(e),e},Di.throttle=function(e,t,i){var n=!0,s=!0;if("function"!=typeof e)throw new Ae(r);return Ka(i)&&(n="leading"in i?!!i.leading:n,s="trailing"in i?!!i.trailing:s),za(e,t,{leading:n,maxWait:t,trailing:s})},Di.thru=ha,Di.toArray=co,Di.toPairs=Oo,Di.toPairsIn=Do,Di.toPath=function(e){return Ya(e)?kt(e,Fs):so(e)?[e]:An(Ms(vo(e)))},Di.toPlainObject=po,Di.transform=function(e,t,i){var r=Ya(e),n=r||$a(e)||ao(e);if(t=ss(t,4),null==i){var s=e&&e.constructor;i=n?r?new s:[]:Ka(e)&&Ua(s)?Hi($e(e)):{}}return(n?mt:xr)(e,(function(e,r,n){return t(i,e,r,n)})),i},Di.unary=function(e){return ka(e,1)},Di.union=Js,Di.unionBy=Qs,Di.unionWith=ea,Di.uniq=function(e){return e&&e.length?on(e):[]},Di.uniqBy=function(e,t){return e&&e.length?on(e,ss(t,2)):[]},Di.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?on(e,i,t):[]},Di.unset=function(e,t){return null==e||ln(e,t)},Di.unzip=ta,Di.unzipWith=ia,Di.update=function(e,t,i){return null==e?e:cn(e,t,pn(i))},Di.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:cn(e,t,pn(r),n)},Di.values=Ho,Di.valuesIn=function(e){return null==e?[]:Wt(e,_o(e))},Di.without=ra,Di.words=Zo,Di.wrap=function(e,t){return Fa(pn(t),e)},Di.xor=na,Di.xorBy=sa,Di.xorWith=aa,Di.zip=oa,Di.zipObject=function(e,t){return gn(e||[],t||[],Ji)},Di.zipObjectDeep=function(e,t){return gn(e||[],t||[],Zr)},Di.zipWith=la,Di.entries=Oo,Di.entriesIn=Do,Di.extend=mo,Di.extendWith=bo,sl(Di,Di),Di.add=vl,Di.attempt=qo,Di.camelCase=No,Di.capitalize=Xo,Di.ceil=xl,Di.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=fo(r))==r?r:0),t!==i&&(t=(t=fo(t))==t?t:0),nr(fo(e),t,r)},Di.clone=function(e){return sr(e,4)},Di.cloneDeep=function(e){return sr(e,5)},Di.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:i)},Di.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:i)},Di.conformsTo=function(e,t){return null==t||ar(e,t,Po(t))},Di.deburr=Yo,Di.defaultTo=function(e,t){return null==e||e!=e?t:e},Di.divide=ml,Di.endsWith=function(e,t,r){e=vo(e),t=an(t);var n=e.length,s=r=r===i?n:nr(uo(r),0,n);return(r-=t.length)>=0&&e.slice(r,s)==t},Di.eq=Da,Di.escape=function(e){return(e=vo(e))&&V.test(e)?e.replace(j,Zt):e},Di.escapeRegExp=function(e){return(e=vo(e))&&ee.test(e)?e.replace(Q,"\\$&"):e},Di.every=function(e,t,r){var n=Ya(e)?yt:dr;return r&&vs(e,t,r)&&(t=i),n(e,ss(t,3))},Di.find=ga,Di.findIndex=Xs,Di.findKey=function(e,t){return _t(e,ss(t,3),xr)},Di.findLast=fa,Di.findLastIndex=Ys,Di.findLastKey=function(e,t){return _t(e,ss(t,3),mr)},Di.floor=bl,Di.forEach=pa,Di.forEachRight=va,Di.forIn=function(e,t){return null==e?e:pr(e,ss(t,3),_o)},Di.forInRight=function(e,t){return null==e?e:vr(e,ss(t,3),_o)},Di.forOwn=function(e,t){return e&&xr(e,ss(t,3))},Di.forOwnRight=function(e,t){return e&&mr(e,ss(t,3))},Di.get=ko,Di.gt=Ha,Di.gte=Na,Di.has=function(e,t){return null!=e&&us(e,t,kr)},Di.hasIn=Lo,Di.head=Ws,Di.identity=tl,Di.includes=function(e,t,i,r){e=Wa(e)?e:Ho(e),i=i&&!r?uo(i):0;var n=e.length;return i<0&&(i=pi(n+i,0)),no(e)?i<=n&&e.indexOf(t,i)>-1:!!n&&Tt(e,t,i)>-1},Di.indexOf=function(e,t,i){var r=null==e?0:e.length;if(!r)return-1;var n=null==i?0:uo(i);return n<0&&(n=pi(r+n,0)),Tt(e,t,n)},Di.inRange=function(e,t,r){return t=ho(t),r===i?(r=t,t=0):r=ho(r),function(e,t,i){return e>=vi(t,i)&&e<pi(t,i)}(e=fo(e),t,r)},Di.invoke=zo,Di.isArguments=Xa,Di.isArray=Ya,Di.isArrayBuffer=Ba,Di.isArrayLike=Wa,Di.isArrayLikeObject=ja,Di.isBoolean=function(e){return!0===e||!1===e||Ja(e)&&Cr(e)==p},Di.isBuffer=$a,Di.isDate=Va,Di.isElement=function(e){return Ja(e)&&1===e.nodeType&&!to(e)},Di.isEmpty=function(e){if(null==e)return!0;if(Wa(e)&&(Ya(e)||"string"==typeof e||"function"==typeof e.splice||$a(e)||ao(e)||Xa(e)))return!e.length;var t=ds(e);if(t==y||t==L)return!e.size;if(ys(e))return!Mr(e).length;for(var i in e)if(Te.call(e,i))return!1;return!0},Di.isEqual=function(e,t){return Pr(e,t)},Di.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?Pr(e,t,i,r):!!n},Di.isError=Ga,Di.isFinite=function(e){return"number"==typeof e&&ui(e)},Di.isFunction=Ua,Di.isInteger=Za,Di.isLength=qa,Di.isMap=Qa,Di.isMatch=function(e,t){return e===t||_r(e,t,os(t))},Di.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,_r(e,t,os(t),r)},Di.isNaN=function(e){return eo(e)&&e!=+e},Di.isNative=function(e){if(bs(e))throw new ye("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(e)},Di.isNil=function(e){return null==e},Di.isNull=function(e){return null===e},Di.isNumber=eo,Di.isObject=Ka,Di.isObjectLike=Ja,Di.isPlainObject=to,Di.isRegExp=io,Di.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=c},Di.isSet=ro,Di.isString=no,Di.isSymbol=so,Di.isTypedArray=ao,Di.isUndefined=function(e){return e===i},Di.isWeakMap=function(e){return Ja(e)&&ds(e)==z},Di.isWeakSet=function(e){return Ja(e)&&"[object WeakSet]"==Cr(e)},Di.join=function(e,t){return null==e?"":gi.call(e,t)},Di.kebabCase=Bo,Di.last=Gs,Di.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=n;return r!==i&&(s=(s=uo(r))<0?pi(n+s,0):vi(s,n-1)),t==t?function(e,t,i){for(var r=i+1;r--;)if(e[r]===t)return r;return r}(e,t,s):Rt(e,Ft,s,!0)},Di.lowerCase=Wo,Di.lowerFirst=jo,Di.lt=oo,Di.lte=lo,Di.max=function(e){return e&&e.length?ur(e,tl,Sr):i},Di.maxBy=function(e,t){return e&&e.length?ur(e,ss(t,2),Sr):i},Di.mean=function(e){return It(e,tl)},Di.meanBy=function(e,t){return It(e,ss(t,2))},Di.min=function(e){return e&&e.length?ur(e,tl,Fr):i},Di.minBy=function(e,t){return e&&e.length?ur(e,ss(t,2),Fr):i},Di.stubArray=gl,Di.stubFalse=fl,Di.stubObject=function(){return{}},Di.stubString=function(){return""},Di.stubTrue=function(){return!0},Di.multiply=yl,Di.nth=function(e,t){return e&&e.length?Nr(e,uo(t)):i},Di.noConflict=function(){return nt._===this&&(nt._=De),this},Di.noop=al,Di.now=Sa,Di.pad=function(e,t,i){e=vo(e);var r=(t=uo(t))?ri(e):0;if(!t||r>=t)return e;var n=(t-r)/2;return Yn(ci(n),i)+e+Yn(li(n),i)},Di.padEnd=function(e,t,i){e=vo(e);var r=(t=uo(t))?ri(e):0;return t&&r<t?e+Yn(t-r,i):e},Di.padStart=function(e,t,i){e=vo(e);var r=(t=uo(t))?ri(e):0;return t&&r<t?Yn(t-r,i)+e:e},Di.parseInt=function(e,t,i){return i||null==t?t=0:t&&(t=+t),mi(vo(e).replace(te,""),t||0)},Di.random=function(e,t,r){if(r&&"boolean"!=typeof r&&vs(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ho(e),t===i?(t=e,e=0):t=ho(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var s=bi();return vi(e+s*(t-e+et("1e-"+((s+"").length-1))),t)}return jr(e,t)},Di.reduce=function(e,t,i){var r=Ya(e)?At:Ht,n=arguments.length<3;return r(e,ss(t,4),i,n,cr)},Di.reduceRight=function(e,t,i){var r=Ya(e)?Et:Ht,n=arguments.length<3;return r(e,ss(t,4),i,n,hr)},Di.repeat=function(e,t,r){return t=(r?vs(e,t,r):t===i)?1:uo(t),$r(vo(e),t)},Di.replace=function(){var e=arguments,t=vo(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Di.result=function(e,t,r){var n=-1,s=(t=vn(t,e)).length;for(s||(s=1,e=i);++n<s;){var a=null==e?i:e[Fs(t[n])];a===i&&(n=s,a=r),e=Ua(a)?a.call(e):a}return e},Di.round=wl,Di.runInContext=e,Di.sample=function(e){return(Ya(e)?Ui:Gr)(e)},Di.size=function(e){if(null==e)return 0;if(Wa(e))return no(e)?ri(e):e.length;var t=ds(e);return t==y||t==L?e.size:Mr(e).length},Di.snakeCase=$o,Di.some=function(e,t,r){var n=Ya(e)?zt:en;return r&&vs(e,t,r)&&(t=i),n(e,ss(t,3))},Di.sortedIndex=function(e,t){return tn(e,t)},Di.sortedIndexBy=function(e,t,i){return rn(e,t,ss(i,2))},Di.sortedIndexOf=function(e,t){var i=null==e?0:e.length;if(i){var r=tn(e,t);if(r<i&&Da(e[r],t))return r}return-1},Di.sortedLastIndex=function(e,t){return tn(e,t,!0)},Di.sortedLastIndexBy=function(e,t,i){return rn(e,t,ss(i,2),!0)},Di.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var i=tn(e,t,!0)-1;if(Da(e[i],t))return i}return-1},Di.startCase=Vo,Di.startsWith=function(e,t,i){return e=vo(e),i=null==i?0:nr(uo(i),0,e.length),t=an(t),e.slice(i,i+t.length)==t},Di.subtract=Cl,Di.sum=function(e){return e&&e.length?Nt(e,tl):0},Di.sumBy=function(e,t){return e&&e.length?Nt(e,ss(t,2)):0},Di.template=function(e,t,r){var n=Di.templateSettings;r&&vs(e,t,r)&&(t=i),e=vo(e),t=bo({},t,n,Zn);var s,a,o=bo({},t.imports,n.imports,Zn),l=Po(o),c=Wt(o,l),h=0,d=t.interpolate||xe,u="__p += '",g=ke((t.escape||xe).source+"|"+d.source+"|"+(d===Z?ce:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),f="//# sourceURL="+(Te.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++qe+"]")+"\n";e.replace(g,(function(t,i,r,n,o,l){return r||(r=n),u+=e.slice(h,l).replace(me,qt),i&&(s=!0,u+="' +\n__e("+i+") +\n'"),o&&(a=!0,u+="';\n"+o+";\n__p += '"),r&&(u+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=l+t.length,t})),u+="';\n";var p=Te.call(t,"variable")&&t.variable;if(p){if(oe.test(p))throw new ye("Invalid `variable` option passed into `_.template`")}else u="with (obj) {\n"+u+"\n}\n";u=(a?u.replace(X,""):u).replace(Y,"$1").replace(B,"$1;"),u="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var v=qo((function(){return we(l,f+"return "+u).apply(i,c)}));if(v.source=u,Ga(v))throw v;return v},Di.times=function(e,t){if((e=uo(e))<1||e>c)return[];var i=d,r=vi(e,d);t=ss(t),e-=d;for(var n=Xt(r,t);++i<e;)t(i);return n},Di.toFinite=ho,Di.toInteger=uo,Di.toLength=go,Di.toLower=function(e){return vo(e).toLowerCase()},Di.toNumber=fo,Di.toSafeInteger=function(e){return e?nr(uo(e),-9007199254740991,c):0===e?e:0},Di.toString=vo,Di.toUpper=function(e){return vo(e).toUpperCase()},Di.trim=function(e,t,r){if((e=vo(e))&&(r||t===i))return Yt(e);if(!e||!(t=an(t)))return e;var n=ni(e),s=ni(t);return mn(n,$t(n,s),Vt(n,s)+1).join("")},Di.trimEnd=function(e,t,r){if((e=vo(e))&&(r||t===i))return e.slice(0,si(e)+1);if(!e||!(t=an(t)))return e;var n=ni(e);return mn(n,0,Vt(n,ni(t))+1).join("")},Di.trimStart=function(e,t,r){if((e=vo(e))&&(r||t===i))return e.replace(te,"");if(!e||!(t=an(t)))return e;var n=ni(e);return mn(n,$t(n,ni(t))).join("")},Di.truncate=function(e,t){var r=30,n="...";if(Ka(t)){var s="separator"in t?t.separator:s;r="length"in t?uo(t.length):r,n="omission"in t?an(t.omission):n}var a=(e=vo(e)).length;if(Kt(e)){var o=ni(e);a=o.length}if(r>=a)return e;var l=r-ri(n);if(l<1)return n;var c=o?mn(o,0,l).join(""):e.slice(0,l);if(s===i)return c+n;if(o&&(l+=c.length-l),io(s)){if(e.slice(l).search(s)){var h,d=c;for(s.global||(s=ke(s.source,vo(he.exec(s))+"g")),s.lastIndex=0;h=s.exec(d);)var u=h.index;c=c.slice(0,u===i?l:u)}}else if(e.indexOf(an(s),l)!=l){var g=c.lastIndexOf(s);g>-1&&(c=c.slice(0,g))}return c+n},Di.unescape=function(e){return(e=vo(e))&&$.test(e)?e.replace(W,ai):e},Di.uniqueId=function(e){var t=++Me;return vo(e)+t},Di.upperCase=Go,Di.upperFirst=Uo,Di.each=pa,Di.eachRight=va,Di.first=Ws,sl(Di,(pl={},xr(Di,(function(e,t){Te.call(Di.prototype,t)||(pl[t]=e)})),pl),{chain:!1}),Di.VERSION="4.17.21",mt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Di[e].placeholder=Di})),mt(["drop","take"],(function(e,t){Yi.prototype[e]=function(r){r=r===i?1:pi(uo(r),0);var n=this.__filtered__&&!t?new Yi(this):this.clone();return n.__filtered__?n.__takeCount__=vi(r,n.__takeCount__):n.__views__.push({size:vi(r,d),type:e+(n.__dir__<0?"Right":"")}),n},Yi.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),mt(["filter","map","takeWhile"],(function(e,t){var i=t+1,r=1==i||3==i;Yi.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ss(e,3),type:i}),t.__filtered__=t.__filtered__||r,t}})),mt(["head","last"],(function(e,t){var i="take"+(t?"Right":"");Yi.prototype[e]=function(){return this[i](1).value()[0]}})),mt(["initial","tail"],(function(e,t){var i="drop"+(t?"":"Right");Yi.prototype[e]=function(){return this.__filtered__?new Yi(this):this[i](1)}})),Yi.prototype.compact=function(){return this.filter(tl)},Yi.prototype.find=function(e){return this.filter(e).head()},Yi.prototype.findLast=function(e){return this.reverse().find(e)},Yi.prototype.invokeMap=Vr((function(e,t){return"function"==typeof e?new Yi(this):this.map((function(i){return Er(i,e,t)}))})),Yi.prototype.reject=function(e){return this.filter(Ta(ss(e)))},Yi.prototype.slice=function(e,t){e=uo(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Yi(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=uo(t))<0?r.dropRight(-t):r.take(t-e)),r)},Yi.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Yi.prototype.toArray=function(){return this.take(d)},xr(Yi.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),s=Di[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);s&&(Di.prototype[t]=function(){var t=this.__wrapped__,o=n?[1]:arguments,l=t instanceof Yi,c=o[0],h=l||Ya(t),d=function(e){var t=s.apply(Di,Lt([e],o));return n&&u?t[0]:t};h&&r&&"function"==typeof c&&1!=c.length&&(l=h=!1);var u=this.__chain__,g=!!this.__actions__.length,f=a&&!u,p=l&&!g;if(!a&&h){t=p?t:new Yi(this);var v=e.apply(t,o);return v.__actions__.push({func:ha,args:[d],thisArg:i}),new Xi(v,u)}return f&&p?e.apply(this,o):(v=this.thru(d),f?n?v.value()[0]:v.value():v)})})),mt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ee[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Di.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var n=this.value();return t.apply(Ya(n)?n:[],e)}return this[i]((function(i){return t.apply(Ya(i)?i:[],e)}))}})),xr(Yi.prototype,(function(e,t){var i=Di[t];if(i){var r=i.name+"";Te.call(zi,r)||(zi[r]=[]),zi[r].push({name:t,func:i})}})),zi[Dn(i,2).name]=[{name:"wrapper",func:i}],Yi.prototype.clone=function(){var e=new Yi(this.__wrapped__);return e.__actions__=An(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=An(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=An(this.__views__),e},Yi.prototype.reverse=function(){if(this.__filtered__){var e=new Yi(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Yi.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,i=Ya(e),r=t<0,n=i?e.length:0,s=function(e,t,i){for(var r=-1,n=i.length;++r<n;){var s=i[r],a=s.size;switch(s.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=vi(t,e+a);break;case"takeRight":e=pi(e,t-a)}}return{start:e,end:t}}(0,n,this.__views__),a=s.start,o=s.end,l=o-a,c=r?o:a-1,h=this.__iteratees__,d=h.length,u=0,g=vi(l,this.__takeCount__);if(!i||!r&&n==l&&g==l)return dn(e,this.__actions__);var f=[];e:for(;l--&&u<g;){for(var p=-1,v=e[c+=t];++p<d;){var x=h[p],m=x.iteratee,b=x.type,y=m(v);if(2==b)v=y;else if(!y){if(1==b)continue e;break e}}f[u++]=v}return f},Di.prototype.at=da,Di.prototype.chain=function(){return ca(this)},Di.prototype.commit=function(){return new Xi(this.value(),this.__chain__)},Di.prototype.next=function(){this.__values__===i&&(this.__values__=co(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Di.prototype.plant=function(e){for(var t,r=this;r instanceof Ni;){var n=Os(r);n.__index__=0,n.__values__=i,t?s.__wrapped__=n:t=n;var s=n;r=r.__wrapped__}return s.__wrapped__=e,t},Di.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Yi){var t=e;return this.__actions__.length&&(t=new Yi(this)),(t=t.reverse()).__actions__.push({func:ha,args:[Ks],thisArg:i}),new Xi(t,this.__chain__)}return this.thru(Ks)},Di.prototype.toJSON=Di.prototype.valueOf=Di.prototype.value=function(){return dn(this.__wrapped__,this.__actions__)},Di.prototype.first=Di.prototype.head,st&&(Di.prototype[st]=function(){return this}),Di}();at?((at.exports=oi)._=oi,st._=oi):nt._=oi}).call(Ye)}));class js{constructor(e,t){var i,r;this.sv=e,this.storesByType={},this.storesXToType={},this.storesYToType={},null===(i=this.sv.selectionStoreConnector)||void 0===i||i.beforeUpdate(),this.columns=this.getViewportColumnData(t),null===(r=this.sv.scrollingService)||void 0===r||r.unregister()}onColumnResize(e,t,i){var r;null===(r=this.sv.dimensionProvider)||void 0===r||r.setDimensionSize(e,t.detail);const n=Ws.reduce(t.detail||{},((e,t,r)=>{const n=Br(i,parseInt(r,10));return n&&(e[n.prop]=Object.assign(Object.assign({},n),{size:t})),e}),{});this.sv.resize(n)}getViewportColumnData(e){const t=[];let i=0;return Vr.forEach((r=>{const n=this.sv.columnProvider.stores[r].store;if(!n.get("items").length)return;const s={colType:r,position:{x:i,y:1},contentHeight:e,fixWidth:"rgCol"!==r,uuid:`${this.sv.uuid}-${i}`,viewports:this.sv.viewportProvider.stores,dimensions:this.sv.dimensionProvider.stores,rowStores:this.sv.dataProvider.stores,colStore:n,onHeaderresize:e=>this.onColumnResize(r,e,n)};"rgCol"===r&&(s.onResizeViewport=e=>{var t;return null===(t=this.sv.viewportProvider)||void 0===t?void 0:t.setViewport(e.detail.dimension,{virtualSize:e.detail.size})});const a=this.gatherColumnData(s),o=this.registerCol(a.position.x,r),l=this.dataViewPort(s).reduce(((e,t)=>{const i=this.registerSegment(t.position);i.setLastCell(t.lastCell);const r=this.registerRow(t.position.y,t.type),n=Object.assign(Object.assign({},t),{rowSelectionStore:r,segmentSelectionStore:i.store,ref:e=>this.sv.selectionStoreConnector.registerSection(e),onSetRange:e=>i.setRangeArea(e.detail),onSetTempRange:e=>i.setTempArea(e.detail),onFocusCell:e=>{i.clearFocus(),this.sv.selectionStoreConnector.focus(i,e.detail)}});return e.push(n),e}),[]);t.push(Object.assign(Object.assign({},a),{columnSelectionStore:o,dataPorts:l})),i++})),t}registerSegment(e){return this.sv.selectionStoreConnector.register(e)}registerRow(e,t){return this.storesByType[t]=e,this.storesYToType[e]=t,this.sv.selectionStoreConnector.registerRow(e).store}registerCol(e,t){return this.storesByType[t]=e,this.storesXToType[e]=t,this.sv.selectionStoreConnector.registerColumn(e).store}gatherColumnData(e){const t=e.uuid,i=e.dimensions[e.colType].store.get("realSize"),r={contentWidth:i,class:e.colType,[`${ss}`]:e.uuid,contentHeight:e.contentHeight,key:e.colType,onResizeViewport:e.onResizeViewport};e.fixWidth&&(r.style={minWidth:`${i}px`});const n={parent:t,colData:Yr(e.colStore),dimensionCol:e.dimensions[e.colType].store,groups:e.colStore.get("groups"),groupingDepth:e.colStore.get("groupingDepth"),onHeaderresize:e.onHeaderresize};return{prop:r,position:e.position,headerProp:n,parent:t,viewportCol:e.viewports[e.colType].store}}dataViewPort(e){const t={rowPinStart:Ns,rgRow:Ys,rowPinEnd:Xs};let i=0;return $r.reduce(((r,n)=>{const s=e.viewports[n].store.get("realCount")||"rgRow"===n,a=Object.assign(Object.assign({},e),{position:Object.assign(Object.assign({},e.position),{y:s?i:Ds})});return r.push(this.dataPartition(a,n,t[n],"rgRow"!==n)),s&&i++,r}),[])}dataPartition(e,t,i,r){return{colData:e.colStore,viewportCol:e.viewports[e.colType].store,viewportRow:e.viewports[t].store,lastCell:Bs(e,t),slot:i,type:t,canDrag:!r,position:e.position,uuid:`${e.uuid}-${e.position.x}-${e.position.y}`,dataStore:e.rowStores[t].store,dimensionCol:e.dimensions[e.colType].store,dimensionRow:e.dimensions[t].store,style:r?{height:`${e.dimensions[t].store.get("realSize")}px`}:void 0}}scrollToCell(e){for(let t in e){const i=e[t];this.sv.scrollingService.onScroll({dimension:"x"===t?"rgCol":"rgRow",coordinate:i})}}clearFocused(){this.sv.selectionStoreConnector.clearAll()}clearEdit(){this.sv.selectionStoreConnector.setEdit(!1)}getFocused(){const e=this.sv.selectionStoreConnector.focusedStore;if(!e)return null;const t=this.storesXToType[e.position.x],i=this.sv.columnProvider.getColumn(e.cell.x,t),r=this.storesYToType[e.position.x];return{column:i,model:this.sv.dataProvider.getModel(e.cell.x,r),cell:e.cell,colType:t,rowType:r}}setEdit(e,t,i,r){var n;const s=this.storesByType,a={x:s[i],y:s[r]};null===(n=this.sv.selectionStoreConnector)||void 0===n||n.setEditByCell(a,{x:t,y:e})}}const $s=({resize:e,editors:t,rowClass:i,readonly:r,range:n,columns:s,useClipboard:a,columnFilter:o,registerElement:l,onEdit:c,onScroll:h})=>{const d=[];for(let u of s){const s=[P("revogr-header",Object.assign({viewportCol:u.viewportCol},u.headerProp,{selectionStore:u.columnSelectionStore,slot:Ns,columnFilter:o,canResize:e}))];u.dataPorts.forEach(((e,o)=>{const l=u.prop.key+(o+1),h=P("revogr-overlay-selection",Object.assign({},e,{slot:e.slot,selectionStore:e.segmentSelectionStore,editors:t,readonly:r,range:n,useClipboard:a,onSetEdit:({detail:e})=>c(e)}),P("revogr-data",Object.assign({},e,{[ss]:e.uuid},{key:l,readonly:r,range:n,rowClass:i,rowSelectionStore:e.rowSelectionStore,slot:"data"})),P("revogr-temp-range",{selectionStore:e.segmentSelectionStore,dimensionRow:e.dimensionRow,dimensionCol:e.dimensionCol}),P("revogr-focus",{selectionStore:e.segmentSelectionStore,dimensionRow:e.dimensionRow,dimensionCol:e.dimensionCol}));s.push(h)})),d.push(P("revogr-viewport-scroll",Object.assign({},u.prop,{ref:e=>l(e,u.prop.key),onScrollViewport:e=>h(e.detail,u.prop.key)}),s))}return d};class Vs{constructor(e){this.setViewport=e,this.elements={}}async onScroll(e,t){let i;for(let r in this.elements)if(this.isPinnedColumn(t)&&"rgCol"===e.dimension){if(r===t||!e.delta)continue;for(let t of this.elements[r])t.changeScroll&&(i=t.changeScroll(e))}else{if("rgCol"===e.dimension&&"headerRow"===r)continue;for(let t of this.elements[r])t.setScroll(e)}let r=e;i&&(r=await i),this.setViewport(r)}isPinnedColumn(e){return["colPinStart","colPinEnd"].indexOf(e)>-1}registerElements(e){this.elements=e}registerElement(e,t){this.elements[t]||(this.elements[t]=[]),e?this.elements[t].push(e):this.elements[t]&&delete this.elements[t]}unregister(){delete this.elements,this.elements={}}}class Gs extends Zr{constructor(e,t){super(e),this.dimensionProvider=t,this.stretchedColumn=null,this.scrollSize=an(document),this.addEventListener("beforecolumnapplied",(({detail:{columns:e}})=>this.applyStretch(e)))}setScroll({type:e,hasScroll:t}){var i;"rgRow"===e&&this.stretchedColumn&&(null===(i=this.stretchedColumn)||void 0===i?void 0:i.initialSize)===this.stretchedColumn.size&&t&&(this.stretchedColumn.size-=this.scrollSize,this.apply(),this.dropChanges())}activateChanges(){this.addEventListener("scrollchange",(({detail:e})=>this.setScroll(e)))}dropChanges(){this.stretchedColumn=null,this.removeEventListener("scrollchange")}apply(){this.stretchedColumn&&this.dimensionProvider.setDimensionSize("rgCol",{[this.stretchedColumn.index]:this.stretchedColumn.size})}applyStretch(e){this.dropChanges();let t=this.revogrid.clientWidth-1;if(Ws.each(e,((e,i)=>{const r=this.dimensionProvider.stores[i].store.get("realSize");t-=r})),t>0){const i=e.rgCol.length-1,r=e.rgCol[i],n=(null==r?void 0:r.size)||this.revogrid.colSize||0,s=t+n-1;r&&!r.autoSize&&n<s&&(this.stretchedColumn={initialSize:s,index:i,size:s},this.apply(),this.activateChanges())}}}const Us=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.beforeedit=ee(this,"beforeedit",7),this.beforerangeedit=ee(this,"beforerangeedit",7),this.afteredit=ee(this,"afteredit",7),this.beforeautofill=ee(this,"beforeautofill",7),this.beforeaange=ee(this,"beforeaange",7),this.roworderchanged=ee(this,"roworderchanged",7),this.beforesourcesortingapply=ee(this,"beforesourcesortingapply",7),this.beforesortingapply=ee(this,"beforesortingapply",7),this.beforesorting=ee(this,"beforesorting",7),this.rowdragstart=ee(this,"rowdragstart",7),this.headerclick=ee(this,"headerclick",7),this.beforecellfocus=ee(this,"beforecellfocus",7),this.beforefocuslost=ee(this,"beforefocuslost",7),this.beforesourceset=ee(this,"beforesourceset",7),this.aftersourceset=ee(this,"aftersourceset",7),this.beforecolumnsset=ee(this,"beforecolumnsset",7),this.beforecolumnapplied=ee(this,"beforecolumnapplied",7),this.aftercolumnsset=ee(this,"aftercolumnsset",7),this.beforefilterapply=ee(this,"beforefilterapply",7),this.beforefiltertrimmed=ee(this,"beforefiltertrimmed",7),this.beforetrimmed=ee(this,"beforetrimmed",7),this.aftertrimmed=ee(this,"aftertrimmed",7),this.viewportscroll=ee(this,"viewportscroll",7),this.beforeexport=ee(this,"beforeexport",7),this.beforeeditstart=ee(this,"beforeeditstart",7),this.aftercolumnresize=ee(this,"aftercolumnresize",7),this.frameSize=1,this.rowSize=0,this.colSize=100,this.range=!1,this.readonly=!1,this.resize=!1,this.canFocus=!0,this.useClipboard=!0,this.columns=[],this.source=[],this.pinnedTopSource=[],this.pinnedBottomSource=[],this.rowDefinitions=[],this.editors={},this.columnTypes={},this.theme="default",this.rowClass="",this.autoSizeColumn=!1,this.filter=!1,this.trimmedRows={},this.exporting=!1,this.stretch=!0,this.extraElements=[],this.uuid=null,this.viewport=null,this.internalPlugins=[],this.subscribers={}}async refresh(e="all"){this.dataProvider.refresh(e)}async scrollToRow(e=0){const t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgRow"});await this.scrollToCoordinate({y:t})}async scrollToColumnIndex(e=0){const t=this.dimensionProvider.getViewPortPos({coordinate:e,dimension:"rgCol"});await this.scrollToCoordinate({x:t})}async scrollToColumnProp(e){const t=this.columnProvider.getColumnIndexByProp(e,"rgCol");if(t<0)return;const i=this.dimensionProvider.getViewPortPos({coordinate:t,dimension:"rgCol"});await this.scrollToCoordinate({x:i})}async updateColumns(e){this.columnProvider.updateColumns(e)}async addTrimmed(e,t="external",i="rgRow"){const r=this.beforetrimmed.emit({trimmed:e,trimmedType:t,type:i});return r.defaultPrevented||(this.dataProvider.setTrimmed({[t]:r.detail.trimmed},i),this.aftertrimmed.emit()),r}async scrollToCoordinate(e){var t;null===(t=this.viewport)||void 0===t||t.scrollToCell(e)}async setCellEdit(e,t,i="rgRow"){var r;const n=Kr.getColumnByProp(this.columns,t);n&&(await ln(),null===(r=this.viewport)||void 0===r||r.setEdit(e,this.columnProvider.getColumnIndexByProp(t,"rgCol"),n.pin||"rgCol",i))}async registerVNode(e){this.extraElements.push(...e),this.extraElements=[...this.extraElements]}async getSource(e="rgRow"){return this.dataProvider.stores[e].store.get("source")}async getVisibleSource(e="rgRow"){return Yr(this.dataProvider.stores[e].store)}async getSourceStore(e="rgRow"){return this.dataProvider.stores[e].store}async getColumnStore(e="rgCol"){return this.columnProvider.stores[e].store}async updateColumnSorting(e,t,i,r){return this.columnProvider.updateColumnSorting(e,t,i,r)}async clearSorting(){this.columnProvider.clearSorting()}async getColumns(){return this.columnProvider.getColumns()}async clearFocus(){var e;const t=await this.getFocused();this.beforefocuslost.emit(t).defaultPrevented||(this.selectionStoreConnector.clearAll(),null===(e=this.viewport)||void 0===e||e.clearFocused())}async getPlugins(){return[...this.internalPlugins]}async getFocused(){var e;return null===(e=this.viewport)||void 0===e?void 0:e.getFocused()}handleOutsideClick({target:e}){(null==e?void 0:e.closest(`[${ss}="${this.uuid}"]`))||this.clearFocus()}onRowDragStarted(e){var t;e.cancelBubble=!0;const i=this.rowdragstart.emit(e.detail);i.defaultPrevented?e.preventDefault():null===(t=this.orderService)||void 0===t||t.start(this.element,Object.assign(Object.assign({},e.detail),i.detail))}onRowDragEnd(){var e;null===(e=this.orderService)||void 0===e||e.end()}onRowDrag({detail:e}){var t;null===(t=this.orderService)||void 0===t||t.move(e)}onRowMouseMove(e){var t;e.cancelBubble=!0,null===(t=this.orderService)||void 0===t||t.moveTip(e.detail)}async onBeforeEdit(e){e.cancelBubble=!0;const{defaultPrevented:t,detail:i}=this.beforeedit.emit(e.detail);await ln(),t||(this.dataProvider.setCellData(i),this.afteredit.emit(i))}onBeforeRangeEdit(e){e.cancelBubble=!0;const{defaultPrevented:t}=this.beforerangeedit.emit(e.detail);t?e.preventDefault():this.afteredit.emit(e.detail)}onRangeChanged(e){e.cancelBubble=!0,this.beforeaange.emit(e.detail).defaultPrevented&&e.preventDefault(),this.beforeautofill.emit(e.detail).defaultPrevented}onRowDropped(e){e.cancelBubble=!0;const{defaultPrevented:t}=this.roworderchanged.emit(e.detail);t&&e.preventDefault()}onHeaderClick(e){const{defaultPrevented:t}=this.headerclick.emit(Object.assign(Object.assign({},e.detail.column),{originalEvent:e.detail.originalEvent}));t&&e.preventDefault()}onCellFocus(e){e.cancelBubble=!0;const{defaultPrevented:t}=this.beforecellfocus.emit(e.detail);this.canFocus&&!t||e.preventDefault()}columnChanged(e=[]){this.dimensionProvider.drop();const t=Kr.getColumns(e,0,this.columnTypes);this.beforecolumnsset.emit(t);for(let e of Vr){const i=t.columns[e];this.dimensionProvider.setRealSize(i.length,e),this.dimensionProvider.setColumns(e,Kr.getSizes(i),"rgCol"!==e)}this.beforecolumnapplied.emit(t);const i=this.columnProvider.setColumns(t);this.aftercolumnsset.emit({columns:i,order:this.columnProvider.order})}themeChanged(e){this.themeService.register(e),this.dimensionProvider.setSettings({originItemSize:this.themeService.rowSize,frameOffset:this.frameSize||0},"rgRow"),this.dimensionProvider.setSettings({originItemSize:this.colSize,frameOffset:this.frameSize||0},"rgCol")}dataChanged(e=[]){let t=[...e];t=this.beforesourceset.emit({type:"rgRow",source:t}).detail.source,t=this.dataProvider.setData(t,"rgRow"),this.aftersourceset.emit({type:"rgRow",source:t})}dataBottomChanged(e=[]){this.dataProvider.setData(e,"rowPinEnd")}dataTopChanged(e=[]){this.dataProvider.setData(e,"rowPinStart")}rowDefChanged(e=[]){if(!e.length)return;const t=pr(e,((e,t)=>(e[t.type]||(e[t.type]={}),t.size&&(e[t.type].sizes||(e[t.type].sizes={}),e[t.type].sizes[t.index]=t.size),e)),{});xr(t,((e,t)=>{e.sizes&&this.dimensionProvider.setDimensionSize(t,e.sizes)}))}trimmedRowsChanged(e={}){this.addTrimmed(e)}groupingChanged(e={}){let t;for(let e of this.internalPlugins){const i=e;if(i.setGrouping){t=i;break}}t&&t.setGrouping(e||{})}applyStretch(e){let t=this.internalPlugins.filter((e=>!!e.applyStretch))[0];if(e)t?t.applyStretch(this.columnProvider.getRawColumns()):this.internalPlugins.push(new Gs(this.element,this.dimensionProvider));else if(t){const e=this.internalPlugins.indexOf(t);this.internalPlugins.splice(e,1)}}connectedCallback(){this.viewportProvider=new wn,this.themeService=new De({rowSize:this.rowSize}),this.dimensionProvider=new gn(this.viewportProvider),this.columnProvider=new Kr,this.dataProvider=new Jr(this.dimensionProvider),this.uuid=`${(new Date).getTime()}-rvgrid`,this.autoSizeColumn&&this.internalPlugins.push(new Cn(this.element,{dataProvider:this.dataProvider,columnProvider:this.columnProvider,dimensionProvider:this.dimensionProvider},"object"==typeof this.autoSizeColumn?this.autoSizeColumn:void 0)),this.filter&&this.internalPlugins.push(new Xn(this.element,this.uuid,"object"==typeof this.filter?this.filter:void 0)),this.exporting&&this.internalPlugins.push(new Es(this.element)),this.internalPlugins.push(new is(this.element)),this.plugins&&this.plugins.forEach((e=>{this.internalPlugins.push(new e(this.element))})),this.internalPlugins.push(new Ps(this.element,{dataProvider:this.dataProvider,columnProvider:this.columnProvider})),this.applyStretch(this.stretch),this.themeChanged(this.theme),this.columnChanged(this.columns),this.dataChanged(this.source),this.dataTopChanged(this.pinnedTopSource),this.dataBottomChanged(this.pinnedBottomSource),this.trimmedRowsChanged(this.trimmedRows),this.rowDefChanged(this.rowDefinitions),this.groupingChanged(this.grouping),this.selectionStoreConnector=new Hs,this.scrollingService=new Vs((e=>{this.dimensionProvider.setViewPortCoordinate({coordinate:e.coordinate,type:e.dimension}),this.viewportscroll.emit(e)})),this.subscribers={click:this.handleOutsideClick.bind(this)};for(let e in this.subscribers)document.addEventListener(e,this.subscribers[e])}disconnectedCallback(){xr(this.internalPlugins,(e=>e.destroy())),this.internalPlugins=[];for(let e in this.subscribers)document.removeEventListener(e,this.subscribers[e]),delete this.subscribers[e]}render(){const e=this.dimensionProvider.stores.rgRow.store.get("realSize");this.viewport=new js({columnProvider:this.columnProvider,dataProvider:this.dataProvider,dimensionProvider:this.dimensionProvider,viewportProvider:this.viewportProvider,uuid:this.uuid,scrollingService:this.scrollingService,orderService:this.orderService,selectionStoreConnector:this.selectionStoreConnector,resize:e=>this.aftercolumnresize.emit(e)},e);const t=[];if(this.rowHeaders){const i=this.viewport.columns[0];t.push(P("revogr-row-headers",{height:e,resize:this.resize,dataPorts:i.dataPorts,headerProp:i.headerProp,uiid:i.prop[ss],rowHeaderColumn:"object"==typeof this.rowHeaders?this.rowHeaders:void 0,onScrollViewport:({detail:e})=>this.scrollingService.onScroll(e,"headerRow"),onElementToScroll:({detail:e})=>this.scrollingService.registerElement(e,"headerRow")}))}return t.push(P($s,{columnFilter:!!this.filter,resize:this.resize,readonly:this.readonly,range:this.range,rowClass:this.rowClass,editors:this.editors,useClipboard:this.useClipboard,columns:this.viewport.columns,onEdit:e=>{this.beforeeditstart.emit(e).defaultPrevented||this.selectionStoreConnector.setEdit(!e.isCancel&&e.val)},registerElement:(e,t)=>this.scrollingService.registerElement(e,t),onScroll:e=>this.scrollingService.onScroll(e)})),P(R,Object.assign({},{[`${ss}`]:this.uuid}),P(Ts,{viewports:this.viewportProvider.stores,dimensions:this.dimensionProvider.stores,orderRef:e=>this.orderService=e,registerElement:(e,t)=>this.scrollingService.registerElement(e,t),nakedClick:()=>this.viewport.clearEdit(),onScroll:e=>this.scrollingService.onScroll(e)},t),this.extraElements)}get element(){return this}static get watchers(){return{columns:["columnChanged"],theme:["themeChanged"],source:["dataChanged"],pinnedBottomSource:["dataBottomChanged"],pinnedTopSource:["dataTopChanged"],rowDefinitions:["rowDefChanged"],trimmedRows:["trimmedRowsChanged"],grouping:["groupingChanged"],stretch:["applyStretch"]}}static get style(){return".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revo-grid[theme=default]{font-size:12px}revo-grid[theme=default] revogr-header{text-align:center;line-height:30px;background-color:#f8f9fa}revo-grid[theme=default] revogr-header .group-rgRow{box-shadow:none}revo-grid[theme=default] revogr-header .header-rgRow,revo-grid[theme=default] revogr-header .group-rgRow{text-transform:uppercase;font-size:12px;color:#61656a}revo-grid[theme=default] revogr-header .header-rgRow{height:30px;box-shadow:0 -1px 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-header .rgHeaderCell{box-shadow:-1px 0 0 0 #c0c0c0, -1px 0 0 0 #c0c0c0 inset, 0 -1px 0 0 #c0c0c0, 0 -1px 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] .rowHeaders{background-color:#f8f9fa}revo-grid[theme=default] .rowHeaders revogr-data .rgCell{color:#61656a;box-shadow:0 -1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] .rowHeaders revogr-header{box-shadow:0 -1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart revogr-data .rgRow .rgCell:last-child{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinStart .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #c0c0c0 inset, -1px 0 0 0 #c0c0c0 inset}revo-grid[theme=default] revogr-viewport-scroll.colPinEnd,revo-grid[theme=default] revogr-viewport-scroll.colPinEnd revogr-header{box-shadow:1px 0 0 #c0c0c0 inset}revo-grid[theme=default] .footer-wrapper revogr-data .rgRow:first-child .rgCell{box-shadow:0 1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset, 0 -1px 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data{text-align:center}revo-grid[theme=default] revogr-data .rgRow{line-height:27px;box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=default] revogr-data .rgCell{box-shadow:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=default] revogr-data .rgCell.disabled{background-color:0 -1px 0 0 #e2e3e3 inset, -1px 0 0 0 #e2e3e3 inset}revo-grid[theme=material]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=material] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=material] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=material] revogr-header .header-rgRow{height:50px}revo-grid[theme=material] revogr-data{text-align:left}revo-grid[theme=material] revogr-data .rgRow{line-height:42px}revo-grid[theme=material] revogr-data .rgCell{padding:0 15px}revo-grid[theme=material] .viewports{width:100%}revo-grid[theme=material] .rowHeaders{background-color:#f7faff}revo-grid[theme=material] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=material] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=material] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=material] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=material] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=material] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=material] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=material] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=material] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=material] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=darkMaterial]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkMaterial] revogr-header{line-height:50px;font-weight:600;text-align:left}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkMaterial] revogr-header .header-rgRow{height:50px}revo-grid[theme=darkMaterial] revogr-data{text-align:left}revo-grid[theme=darkMaterial] revogr-data .rgRow{line-height:42px}revo-grid[theme=darkMaterial] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkMaterial] .viewports{width:100%}revo-grid[theme=darkMaterial] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkMaterial] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkMaterial] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkMaterial] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkMaterial] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkMaterial] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkMaterial] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkMaterial] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=darkCompact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#d8d8d8}revo-grid[theme=darkCompact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=darkCompact] revogr-header .header-rgRow{height:45px}revo-grid[theme=darkCompact] revogr-data{text-align:left}revo-grid[theme=darkCompact] revogr-data .rgRow{line-height:32px}revo-grid[theme=darkCompact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=darkCompact] .viewports{width:100%}revo-grid[theme=darkCompact] .rowHeaders{background-color:rgba(40, 39, 43, 0.8)}revo-grid[theme=darkCompact] .rowHeaders revogr-data .rgCell{color:rgba(216, 216, 216, 0.8)}revo-grid[theme=darkCompact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #404040, 0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.sortable:hover{background-color:rgba(64, 64, 64, 0.5)}revo-grid[theme=darkCompact] revogr-header .rgHeaderCell.focused-cell{background:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #404040}revo-grid[theme=darkCompact] revogr-data .rgCell{color:rgba(216, 216, 216, 0.9)}revo-grid[theme=darkCompact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-data .rgRow.focused-rgRow{background-color:rgba(115, 148, 160, 0.15)}revo-grid[theme=darkCompact] revogr-data .revo-draggable>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.5)}revo-grid[theme=darkCompact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:rgba(216, 216, 216, 0.7)}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #404040 inset}revo-grid[theme=darkCompact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #404040}revo-grid[theme=compact]{font-family:Nunito, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"}revo-grid[theme=compact] revogr-header{line-height:45px;font-weight:600;text-align:left}revo-grid[theme=compact] revogr-header .rgHeaderCell{padding:0 15px;text-overflow:ellipsis}revo-grid[theme=compact] revogr-header .header-rgRow{height:45px}revo-grid[theme=compact] revogr-data{text-align:left}revo-grid[theme=compact] revogr-data .rgRow{line-height:32px}revo-grid[theme=compact] revogr-data .rgCell{padding:0 15px}revo-grid[theme=compact] .viewports{width:100%}revo-grid[theme=compact] .rowHeaders{background-color:#f7faff}revo-grid[theme=compact] .rowHeaders revogr-data .rgCell{color:#757a82}revo-grid[theme=compact] revogr-header .header-rgRow.group{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .header-rgRow:not(.group){box-shadow:0 -1px 0 0 #f1f1f1, 0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-header .rgHeaderCell.sortable:hover{background-color:#f1f1f1}revo-grid[theme=compact] revogr-header .rgHeaderCell.focused-cell{background:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] .footer-wrapper revogr-data{box-shadow:0 -1px 0 #f1f1f1}revo-grid[theme=compact] revogr-viewport-scroll.colPinStart{box-shadow:-1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-viewport-scroll.colPinEnd{box-shadow:-1px 0 0 #f1f1f1}revo-grid[theme=compact] revogr-data .rgRow{box-shadow:0 -1px 0 0 #f1f1f1 inset}revo-grid[theme=compact] revogr-data .rgRow.focused-rgRow{background-color:rgba(233, 234, 237, 0.5)}revo-grid[theme=compact] revogr-data .rgCell{color:rgba(0, 0, 0, 0.87)}revo-grid[theme=compact] revogr-data .rgCell.disabled{background-color:#f7f7f7}revo-grid[theme=compact] revogr-data .revo-draggable>.revo-drag-icon{background-color:#d4d4d4}revo-grid[theme=compact] revogr-data .revo-draggable:hover>.revo-drag-icon{background-color:black}revo-grid[theme=compact] revo-dropdown .rv-dr-root{padding:0px 9px}revo-grid{display:block;height:100%;font-family:Helvetica, Arial, Sans-Serif, serif;font-size:14px;position:relative;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column;width:100%;height:100%}revo-grid .footer-wrapper,revo-grid .header-wrapper{width:100%}revo-grid .footer-wrapper revogr-data,revo-grid .header-wrapper revogr-data{z-index:3}revo-grid revo-dropdown{width:100%}revo-grid revo-dropdown .rv-dr-root{max-height:100%}revo-grid revo-dropdown.shrink label{opacity:0}revo-grid .viewports{max-height:100%;display:flex;flex-direction:row;align-items:flex-start;max-width:100%}revo-grid .main-viewport{flex-grow:1;height:0;display:flex;flex-direction:row}revo-grid .draggable{position:fixed;height:30px;line-height:30px;background:#fff;border-radius:3px;display:block;z-index:100;margin-top:5px;margin-right:-20px;box-shadow:0 4px 20px 0 rgba(0, 0, 0, 0.15);padding-left:20px;padding-right:5px}revo-grid .draggable.hidden{display:none}revo-grid .draggable .revo-alt-icon{background-color:black;position:absolute;left:5px;top:10px}revo-grid .draggable-wrapper.hidden{display:none}revo-grid .drag-position{position:absolute;left:0;right:0;height:1px;z-index:2;background:red}revo-grid .clipboard{position:absolute;left:0;top:0}revo-grid revogr-scroll-virtual{position:relative}revo-grid revogr-scroll-virtual.vertical,revo-grid revogr-scroll-virtual.horizontal{z-index:3}"}},Zs=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.copyRegion=ee(this,"copyRegion",3),this.pasteRegion=ee(this,"pasteRegion",3)}onPaste(e){const t=this.getData(e),i=t.types.indexOf("text/html")>-1,r=i?t.getData("text/html"):t.getData("text"),n=i?this.htmlParse(r):this.textParse(r);this.pasteRegion.emit(n),e.preventDefault()}copyStarted(e){this.copyRegion.emit(this.getData(e)),e.preventDefault()}async doCopy(e,t){e.setData("text/plain",t?this.parserCopy(t):"")}parserCopy(e){return e.map((e=>e.join("\t"))).join("\n")}textParse(e){const t=[],i=e.split(/\r\n|\n|\r/);for(let e in i)t.push(i[e].split("\t"));return t}htmlParse(e){const t=[],i=document.createRange().createContextualFragment(e).querySelector("table");for(const e of Array.from(i.rows))t.push(Array.from(e.cells).map((e=>e.innerText)));return t}getData(e){var t;return e.clipboardData||(null===(t=window)||void 0===t?void 0:t.clipboardData)}};class qs{constructor(e,t){this.dataStore=e,this.source=t,this.unsubscribe=[],this.hasGrouping=!1,this.unsubscribe.push(t.onChange("source",(e=>this.checkGrouping(e)))),this.checkGrouping(t.get("source"))}get columns(){return Yr(this.source)}checkGrouping(e){for(let t of e){if(vs(t))return void(this.hasGrouping=!0);this.hasGrouping=!1}}isReadOnly(e,t){var i;const r=null===(i=this.columns[t])||void 0===i?void 0:i.readonly;return"function"==typeof r?r(this.rowDataModel(e,t)):r}static doMerge(e,t){let i=Object.assign(Object.assign({},t),e);return t.class&&("object"==typeof t.class&&"object"==typeof i.class?i.class=Object.assign(Object.assign({},t.class),i.class):"string"==typeof t.class&&"object"==typeof i.class?i.class[t.class]=!0:"string"==typeof i.class&&(i.class+=" "+t.class)),t.style&&(i.style=Object.assign(Object.assign({},t.style),i.style)),i}mergeProperties(e,t,i){var r;const n={rgCell:!0,disabled:this.isReadOnly(e,t)};let s=Object.assign(Object.assign({},i),{class:n});const a=null===(r=this.columns[t])||void 0===r?void 0:r.cellProperties;if(a){const i=a(this.rowDataModel(e,t));return i?qs.doMerge(s,i):s}return s}customRenderer(e,t,i){var r;const n=null===(r=this.columns[t])||void 0===r?void 0:r.cellTemplate;if(n)return n(P,i)}getRowClass(e,t){return(Br(this.dataStore,e)||{})[t]||""}getCellData(e,t){const i=this.rowDataModel(e,t);return qs.getData(i.model[i.prop])}getSaveData(e,t,i){void 0===i&&(i=this.getCellData(e,t));const r=this.rowDataModel(e,t);return{prop:r.prop,rowIndex:e,val:i,model:r.model,type:this.dataStore.get("type")}}getCellEditor(e,t,i){var r;const n=null===(r=this.columns[t])||void 0===r?void 0:r.editor;if(n)return"string"==typeof n?i[n]:n}rowDataModel(e,t){const i=this.columns[t];return{prop:null==i?void 0:i.prop,model:Br(this.dataStore,e)||{},data:this.dataStore.get("source"),column:i,rowIndex:e}}getRangeData(e){const t={},i=e.oldProps.length,r=this.copyRangeArray(e.oldRange,e.oldProps,this.dataStore),n=r.length;for(let s=e.newRange.y,a=0;s<e.newRange.y1+1;s++,a++){const o=r[a%n];for(let r=e.newRange.x,n=0;r<e.newRange.x1+1;r++,n++){if(s>=e.oldRange.y&&s<=e.oldRange.y1&&r>=e.oldRange.x&&r<=e.oldRange.x1)continue;const a=this.columns[r].prop,l=n%i;this.isReadOnly(s,r)||(t[s]||(t[s]={}),t[s][a]=o[l])}}return t}getTransformedDataToApply(e,t){const i={},r=t.length,n=this.columns.length,s=this.dataStore.get("items").length;let a=e.y,o=0;for(let l=0;a<s&&l<r;a++,l++){const s=t[l%r],c=(null==s?void 0:s.length)||0;let h=e.x;for(let e=0;h<n&&e<c;h++,e++){const t=this.columns[h].prop,r=e%n;this.isReadOnly(a,h)||(i[a]||(i[a]={}),i[a][t]=s[r])}o=Math.max(o,h-1)}return{changed:i,range:Is(e,{y:a-1,x:o})}}applyRangeData(e){const t={};for(let i in e){const r=t[i]=Br(this.dataStore,parseInt(i,10));for(let t in e[i])r[t]=e[i][t]}Wr(this.dataStore,t)}getRangeStaticData(e,t){const i={};for(let r=e.y,n=0;r<e.y1+1;r++,n++)for(let n=e.x,s=0;n<e.x1+1;n++,s++){const e=this.columns[n].prop;this.isReadOnly(r,n)||(i[r]||(i[r]={}),i[r][e]=t)}return i}copyRangeArray(e,t,i){const r=[];for(let n=e.y;n<e.y1+1;n++){const e=[];for(let r of t){const t=Br(i,n);e.push(t[r])}r.push(e)}return r}static getData(e){return null==e?"":e.toString()}destroy(){this.unsubscribe.forEach((e=>e()))}}const Ks=({model:e,canDrag:t,onDragStart:i})=>{const r=[];return e.column.rowDrag&&function(e,t){return"function"==typeof e?e(t):!!e}(e.column.rowDrag,e)&&(t?r.push(P("span",{class:os,onMouseDown:e=>i(e)},P("span",{class:"revo-drag-icon"}))):r.push(P("span",{class:os}))),r.push(`${qs.getData(e.model[e.prop])}`),r},Js=({rowClass:e,size:t,start:i,style:r,depth:n},s)=>P("div",{class:`rgRow ${e||""}`,style:Object.assign(Object.assign({},r),{height:`${t}px`,transform:`translateY(${i}px)`,paddingLeft:n?10*n+"px":void 0})},s),Qs=e=>{const{model:t,itemIndex:i,hasExpand:r}=e,n=t["__rvgr-name"],s=t[ds],a=parseInt(t[hs],10)||0;return r?P(Js,Object.assign({},e,{rowClass:"groupingRow",depth:a}),P("button",{class:{"group-expand":!0},onClick:e=>function(e,t,i){const r=new CustomEvent(us,{detail:{model:t,virtualIndex:i},cancelable:!0,bubbles:!0});e.target.dispatchEvent(r)}(e,t,i)},P("svg",{"aria-hidden":"true",style:{transform:`rotate(${s?0:-90}deg)`},focusable:"false",viewBox:"0 0 448 512"},P("path",{fill:"currentColor",d:"M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"}))),n):P(Js,Object.assign({},e,{rowClass:"groupingRow",depth:a}))},ea=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.dragStartCell=ee(this,"dragStartCell",7)}onStoreChange(){var e;null===(e=this.columnService)||void 0===e||e.destroy(),this.columnService=new qs(this.dataStore,this.colData)}connectedCallback(){this.onStoreChange()}disconnectedCallback(){var e;null===(e=this.columnService)||void 0===e||e.destroy()}render(){var e;const t=this.viewportRow.get("items"),i=this.viewportCol.get("items");if(!this.columnService.columns.length||!t.length||!i.length)return"";const r=null===(e=this.rowSelectionStore)||void 0===e?void 0:e.get("range"),n=[],s=this.dataStore.get("groupingDepth");for(let e of t){const t=Br(this.dataStore,e.itemIndex);if(ps(t)){n.push(P(Qs,Object.assign({},e,{model:t,hasExpand:this.columnService.hasGrouping})));continue}const a=[];let o=this.rowClass?this.columnService.getRowClass(e.itemIndex,this.rowClass):"";r&&e.itemIndex>=r.y&&e.itemIndex<=r.y1&&(o+=" focused-rgRow");for(let t of i)a.push(this.getCellRenderer(e,t,this.canDrag,this.columnService.hasGrouping?s:0));n.push(P(Js,{rowClass:o,size:e.size,start:e.start},a))}return n}getCellRenderer(e,t,i=!1,r=0){const n=this.columnService.rowDataModel(e.itemIndex,t.itemIndex),s={[ns]:t.itemIndex,"data-rgRow":e.itemIndex,style:{width:`${t.size}px`,transform:`translateX(${t.start}px)`}};r&&!t.itemIndex&&(s.style.paddingLeft=10*r+"px");const a=this.columnService.mergeProperties(e.itemIndex,t.itemIndex,s),o=this.columnService.customRenderer(e.itemIndex,t.itemIndex,n);return void 0!==o?P("div",Object.assign({},a),o):n.column?P("div",Object.assign({},a),P(Ks,{model:n,canDrag:i,onDragStart:e=>this.dragStartCell.emit(e)})):void console.error("Investigate column problem")}get element(){return this}static get watchers(){return{dataStore:["onStoreChange"],colData:["onStoreChange"]}}static get style(){return".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-data{display:block;width:100%;position:relative}revogr-data .rgRow{position:absolute;width:100%;left:0}revogr-data .rgRow.groupingRow{font-weight:600}revogr-data .rgRow.groupingRow .group-expand{width:25px;height:100%;max-height:25px;margin-right:2px;background-color:transparent;border-color:transparent}revogr-data .rgRow.groupingRow .group-expand svg{width:7px}revogr-data .revo-draggable{border:none;height:32px;display:inline-flex;outline:0;padding:0;font-size:0.8125rem;box-sizing:border-box;align-items:center;white-space:nowrap;vertical-align:middle;justify-content:center;text-decoration:none;width:24px;height:100%;cursor:pointer}revogr-data .revo-draggable>.revo-drag-icon{vertical-align:middle;display:inline-block;pointer-events:none;transition:background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}revogr-data .rgCell{top:0;position:absolute;box-sizing:border-box;height:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}revogr-data .rgCell.align-center{text-align:center}revogr-data .rgCell.align-left{text-align:left}revogr-data .rgCell.align-right{text-align:right}"}};var ta,ia;!function(e){e[e.MOUSE_LEFT=1]="MOUSE_LEFT",e[e.MOUSE_RIGHT=3]="MOUSE_RIGHT",e[e.MOUSE_MIDDLE=2]="MOUSE_MIDDLE",e[e.BACKSPACE=8]="BACKSPACE",e[e.COMMA=188]="COMMA",e[e.INSERT=45]="INSERT",e[e.DELETE=46]="DELETE",e[e.END=35]="END",e[e.ENTER=13]="ENTER",e[e.ESCAPE=27]="ESCAPE",e[e.CONTROL=17]="CONTROL",e[e.COMMAND_LEFT=91]="COMMAND_LEFT",e[e.COMMAND_RIGHT=93]="COMMAND_RIGHT",e[e.COMMAND_FIREFOX=224]="COMMAND_FIREFOX",e[e.ALT=18]="ALT",e[e.HOME=36]="HOME",e[e.PAGE_DOWN=34]="PAGE_DOWN",e[e.PAGE_UP=33]="PAGE_UP",e[e.PERIOD=190]="PERIOD",e[e.SPACE=32]="SPACE",e[e.SHIFT=16]="SHIFT",e[e.CAPS_LOCK=20]="CAPS_LOCK",e[e.TAB=9]="TAB",e[e.ARROW_RIGHT=39]="ARROW_RIGHT",e[e.ARROW_LEFT=37]="ARROW_LEFT",e[e.ARROW_UP=38]="ARROW_UP",e[e.ARROW_DOWN=40]="ARROW_DOWN",e[e.F1=112]="F1",e[e.F2=113]="F2",e[e.F3=114]="F3",e[e.F4=115]="F4",e[e.F5=116]="F5",e[e.F6=117]="F6",e[e.F7=118]="F7",e[e.F8=119]="F8",e[e.F9=120]="F9",e[e.F10=121]="F10",e[e.F11=122]="F11",e[e.F12=123]="F12",e[e.A=65]="A",e[e.C=67]="C",e[e.D=68]="D",e[e.F=70]="F",e[e.L=76]="L",e[e.O=79]="O",e[e.P=80]="P",e[e.S=83]="S",e[e.V=86]="V",e[e.X=88]="X"}(ta||(ta={})),function(e){e.ENTER="Enter",e.ENTER_NUM="NumpadEnter",e.V="KeyV",e.C="KeyC",e.ESCAPE="Escape",e.TAB="Tab",e.BACKSPACE="Backspace",e.DELETE="Delete",e.ARROW_RIGHT="ArrowRight",e.ARROW_LEFT="ArrowLeft",e.ARROW_UP="ArrowUp",e.ARROW_DOWN="ArrowDown",e.SHIFT="Shift"}(ia||(ia={}));const ra=ta;var na;!function(e){e.mac="Mac"}(na||(na={}));const sa=na;var aa=function(e){return e!=e},oa=function(e){return null==e?[]:function(e,t){return Qi(t,(function(t){return e[t]}))}(e,At(e))},la=Math.max,ca=function(e,t,i,r){e=Lt(e)?e:oa(e),i=i&&!r?zr(i):0;var n=e.length;return i<0&&(i=la(n+i,0)),Yn(e)?i<=n&&e.indexOf(t,i)>-1:!!n&&function(e,t,i){return t==t?function(e,t,i){for(var r=i-1,n=e.length;++r<n;)if(e[r]===t)return r;return-1}(e,t,i):mr(e,aa,i)}(e,t,i)>-1};function ha(e,t){return t.includes(sa.mac)?ca([ra.COMMAND_LEFT,ra.COMMAND_RIGHT,ra.COMMAND_FIREFOX],e):ra.CONTROL===e}function da(e){return e===ia.ENTER||e===ia.ENTER_NUM}class ua{constructor(e,t){this.column=e,this.saveCallback=t,this.element=null,this.editCell=null}async componentDidRender(){var e;this.editInput&&(await ln(),null===(e=this.editInput)||void 0===e||e.focus())}onKeyDown(e){const t=da(e.code),i=(r=e.code,ia.TAB===r);var r;(i||t)&&e.target&&this.saveCallback&&(this.editInput.blur(),this.saveCallback(e.target.value,i))}render(){var e;return P("input",{type:"text",value:(null===(e=this.editCell)||void 0===e?void 0:e.val)||"",ref:e=>{this.editInput=e},onKeyDown:e=>this.onKeyDown(e)})}}const ga=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.cellEdit=ee(this,"cellEdit",3),this.closeEdit=ee(this,"closeEdit",3),this.currentEditor=null}onSave(e,t){this.editCell&&this.cellEdit.emit({rgCol:this.editCell.x,rgRow:this.editCell.y,val:e,preventFocus:t})}componentWillRender(){this.currentEditor||(this.editor?this.currentEditor=new this.editor(this.column,((e,t)=>this.onSave(e,t)),(e=>this.closeEdit.emit(e))):this.currentEditor=new ua(this.column,((e,t)=>this.onSave(e,t))))}componentDidRender(){this.currentEditor&&(this.currentEditor.element=this.element.firstElementChild,this.currentEditor.componentDidRender&&this.currentEditor.componentDidRender())}disconnectedCallback(){this.currentEditor&&(this.currentEditor.disconnectedCallback&&this.currentEditor.disconnectedCallback(),this.currentEditor.element&&(this.currentEditor.element=null),this.currentEditor=null)}render(){return this.currentEditor?(this.currentEditor.editCell=this.editCell,P(R,{class:cs},this.currentEditor.render(P))):""}get element(){return this}static get style(){return".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-edit{display:block;position:absolute;background-color:#fff}revogr-edit input{height:100%;width:100%;box-sizing:border-box}revogr-edit revo-dropdown{height:100%}revogr-edit revo-dropdown.shrink fieldset legend>span{display:none}"}},fa=(e,t)=>P("button",Object.assign({},e,{class:Object.assign(Object.assign({},"object"==typeof e.class?e.class:e.class?{[e.class]:!0}:""),{"revo-button":!0})}),t);Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});const pa="none",va=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.filterChange=ee(this,"filterChange",7),this.filterTypes={},this.filterNames={},this.filterEntities={}}onMouseDown(e){if(this.changes&&!e.defaultPrevented){const t=e.target;this.isOutside(t)&&!Ln(t)&&(this.changes=void 0)}}async show(e){this.changes=e,this.changes&&(this.changes.type=this.changes.type||pa)}async getChanges(){return this.changes}renderConditions(e){const t=[];for(let i in this.filterTypes)t.push(P("option",{value:pa},this.filterNames.none)),t.push(...this.filterTypes[i].map((t=>P("option",{value:t,selected:e===t},this.filterNames[t])))),t.push(P("option",{disabled:!0}));return t}renderExtra(e,t){return"input"===(this.extraElement=void 0,e)?P("input",{type:"text",value:t,onInput:e=>this.onInput(e),onKeyDown:e=>this.onKeyDown(e),ref:e=>this.extraElement=e}):""}render(){if(!this.changes||!this.changes)return P(R,{style:{display:"none"}});const e={display:"block",left:`${this.changes.x}px`,top:`${this.changes.y}px`};return P(R,{style:e},P("label",null,"Filter by condition"),P("select",{class:"select-css",onChange:e=>this.onFilterChange(e)},this.renderConditions(this.changes.type)),P("div",null,this.renderExtra(this.filterEntities[this.changes.type].extra,this.changes.value)),P(fa,{class:{green:!0},onClick:()=>this.onSave()},"Save"),P(fa,{class:{light:!0},onClick:()=>this.onCancel()},"Cancel"))}onFilterChange(e){if(!this.changes)throw new Error("Changes required per edit");const t=e.target.value;this.changes=Object.assign(Object.assign({},this.changes),{type:t})}onInput(e){this.changes.value=e.target.value,e.preventDefault()}onKeyDown(e){"enter"===e.key.toLowerCase()&&this.onSave()}onCancel(){this.changes=void 0}onSave(){var e,t;if(!this.changes)throw new Error("Changes required per edit");this.filterChange.emit({prop:this.changes.prop,type:this.changes.type,value:null===(t=null===(e=this.extraElement)||void 0===e?void 0:e.value)||void 0===t?void 0:t.trim()}),this.changes=void 0}isOutside(e){return!e.classList.contains(`[uuid="${this.uuid}"]`)&&!(null==e?void 0:e.closest(`[uuid="${this.uuid}"]`))}static get style(){return".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-filter-panel{position:absolute;display:block;top:0;left:0;z-index:100;opacity:1;transform:none;background-color:#fff;transform-origin:62px 0px;box-shadow:0 5px 18px -2px rgba(0, 0, 0, 0.2);padding:10px;border-radius:4px;min-width:150px;text-align:left}revogr-filter-panel label{color:gray;font-size:13px;font-weight:600;display:block;padding:8px 0}revogr-filter-panel select{width:100%}revogr-filter-panel input[type=text]{border:0;min-height:34px;margin:5px 0;background:#f3f3f3;border-radius:5px;padding:0 10px;box-sizing:border-box}revogr-filter-panel button{margin-top:10px;margin-right:5px}.rgHeaderCell:hover .rv-filter{transition:opacity 267ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, transform 178ms cubic-bezier(0.4, 0, 0.2, 1) 0ms}.rgHeaderCell:hover .rv-filter,.rgHeaderCell .rv-filter.active{opacity:1}.rgHeaderCell .rv-filter{height:24px;width:24px;background:none;border:0;opacity:0;visibility:visible;cursor:pointer;border-radius:4px}.rgHeaderCell .rv-filter.active{color:#10224a}.rgHeaderCell .rv-filter .filter-img{color:gray;width:11px}.select-css{display:block;font-family:sans-serif;font-weight:600;color:#444;line-height:1.3;padding:0.6em 1.4em 0.5em 0.8em;width:100%;max-width:100%;box-sizing:border-box;margin:0;border:1px solid #f1f1f1;box-shadow:transparent;border-radius:0.5em;appearance:none;background-color:#fff;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%);background-repeat:no-repeat, repeat;background-position:right 0.7em top 50%, 0 0;background-size:0.65em auto, 100%;}.select-css::-ms-expand{display:none}.select-css:hover{border-color:#c5c5c5}.select-css:focus{border-color:#f1f1f1;box-shadow:0 0 1px 3px rgba(59, 153, 252, 0.7);box-shadow:0 0 0 3px -moz-mac-focusring;color:#222;outline:none}.select-css option{font-weight:normal}.select-css:disabled,.select-css[aria-disabled=true]{color:gray;background-image:url(\"data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22graytext%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E\"), linear-gradient(to bottom, #ffffff 0%, #ffffff 100%)}.select-css:disabled:hover,.select-css[aria-disabled=true]{border-color:#f1f1f1}"}};function xa({x:e,y:t},{el:i,rows:r,cols:n}){const{top:s,left:a,height:o,width:l}=i.getBoundingClientRect();let c=t-s;c>=o&&(c=o-1);let h=e-a;h>=l&&(h=l-1);const d=cn(r,c),u=cn(n,h);return u.itemIndex<0&&(u.itemIndex=0),d.itemIndex<0&&(d.itemIndex=0),{x:u.itemIndex,y:d.itemIndex}}function ma({x:e,y:t},{lastCell:i}){return e>=i.x||t>=i.y}function ba({x:e,y:t,x1:i,y1:r},n,s){const a=hn(n,t).start,o=hn(s,e).start,l=hn(n,r).end,c=hn(s,i).end;return{left:o,right:c,top:a,bottom:l,width:c-o,height:l-a}}function ya(e,t,i){return function(e){return{left:`${e.left}px`,top:`${e.top}px`,width:`${e.width}px`,height:`${e.height}px`}}(ba(e,t,i))}const wa=class extends HTMLElement{constructor(){super(),this.__registerHost()}changed(e){null==e||e.scrollIntoView({block:"nearest",inline:"nearest"})}componentDidRender(){this.el&&this.changed(this.el)}render(){const e=this.selectionStore.get("focus");if(e){const t=ya(Object.assign(Object.assign({},e),{x1:e.x,y1:e.y}),this.dimensionRow.state,this.dimensionCol.state);return P(R,{class:ls,style:t})}}get el(){return this}static get style(){return".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-focus.focused-cell{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset;position:absolute;pointer-events:none;z-index:9;display:block}"}};var Ca,Sa=function(){try{var e=$t(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),ka=function(e,t,i,r){for(var n=-1,s=null==e?0:e.length;++n<s;){var a=e[n];t(r,a,i(a),e)}return r},La=function(e,t,i,r){return Et(e,(function(e,n,s){t(r,e,i(e),s)})),r},Aa=(Ca=function(e,t,i){!function(e,t,i){"__proto__"==t&&Sa?Sa(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i}(e,i,t)},function(e,t){var i={};return(at(e)?ka:La)(e,Ca,gr(t),i)});const Ea=({column:e})=>P("i",{class:e.order});var za;!function(e){e.start="resize:start",e.move="resize:move",e.end="resize:end"}(za||(za={}));const Pa={"resizable-r":{bit:1,cursor:"ew-resize"},"resizable-rb":{bit:3,cursor:"se-resize"},"resizable-b":{bit:2,cursor:"s-resize"},"resizable-lb":{bit:6,cursor:"sw-resize"},"resizable-l":{bit:4,cursor:"w-resize"},"resizable-lt":{bit:12,cursor:"nw-resize"},"resizable-t":{bit:8,cursor:"n-resize"},"resizable-rt":{bit:9,cursor:"ne-resize"}};class _a{constructor(e,t){var i;this.initialProps=e,this.$event=t,this.mouseX=0,this.mouseY=0,this.width=0,this.height=0,this.changeX=0,this.changeY=0,this.disableCalcMap=15,this.props=(i=e,Object.assign(Object.assign({},i),{fitParent:i.fitParent||!1,active:i.active||[],disableAttributes:i.disableAttributes||[],minWidth:i.minWidth||0,minHeight:i.minHeight||0})),this.mouseMoveFunc=this.handleMove.bind(this),this.mouseUpFunc=this.handleUp.bind(this),this.minW=this.props.minWidth,this.minH=this.props.minHeight,this.maxW=this.props.maxWidth,this.maxH=this.props.maxHeight,this.parent={width:0,height:0},this.resizeState=0}set(e){this.$el=e,this.props.disableAttributes.forEach((e=>{switch(e){case"l":this.disableCalcMap&=-2;break;case"t":this.disableCalcMap&=-3;break;case"w":this.disableCalcMap&=-5;break;case"h":this.disableCalcMap&=-9}}))}emitEvent(e,t){this.$event&&this.$event(Object.assign({eventName:e,width:this.width+this.changeX,height:this.height+this.changeY,changedX:this.changeX,changedY:this.changeY},t))}static isTouchEvent(e){var t;return(null===(t=e.touches)||void 0===t?void 0:t.length)>=0}handleMove(e){if(!this.resizeState)return;let t,i;_a.isTouchEvent(e)?(t=e.touches[0].clientY,i=e.touches[0].clientX):(t=e.clientY,i=e.clientX);let r=this.resizeState&Pa["resizable-r"].bit||this.resizeState&Pa["resizable-l"].bit;if((this.resizeState&Pa["resizable-t"].bit||this.resizeState&Pa["resizable-b"].bit)&&8&this.disableCalcMap){let e=t-this.mouseY,i=this.changeY+e;const r=this.height+i;r<this.minH&&(i=-(this.height-this.minH)),this.maxH&&r>this.maxH&&(i=this.maxH-this.height),this.changeY=i,this.mouseY=t,this.activeResizer&&(this.activeResizer.style.bottom=-this.changeY+"px")}if(r&&4&this.disableCalcMap){let e=i-this.mouseX,t=this.changeX+e;const r=this.width+t;r<this.minW&&(t=-(this.width-this.minW)),this.maxW&&r>this.maxW&&(t=this.maxW-this.width),this.changeX=t,this.mouseX=i,this.activeResizer&&(this.activeResizer.style.right=-this.changeX+"px")}this.emitEvent(za.move)}handleDown(e){if(!e.defaultPrevented){this.dropInitial();for(let t in Pa){const i=e.target;if(this.$el.contains(i)&&(null==i?void 0:i.classList.contains(t))){document.body.style.cursor=Pa[t].cursor,_a.isTouchEvent(e)?this.setInitials(e.touches[0],i):(e.preventDefault&&e.preventDefault(),this.setInitials(e,i)),this.resizeState=Pa[t].bit;const r=za.start;this.emitEvent(r);break}}this.bindMove()}}handleUp(e){if(e.preventDefault(),0!==this.resizeState){this.resizeState=0,document.body.style.cursor="";const e=za.end;this.emitEvent(e)}this.dropInitial(),this.unbindMove()}setInitials({clientX:e,clientY:t},i){const r=getComputedStyle(this.$el);if(this.$el.classList.add("active"),this.activeResizer=i,4&this.disableCalcMap){this.mouseX=e,this.width=this.$el.clientWidth,this.parent.width=this.$el.parentElement.clientWidth;const t=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight);this.minW=Math.max(t,this.initialProps.minWidth||0),this.initialProps.maxWidth&&(this.maxW=Math.max(this.width,this.initialProps.maxWidth))}if(8&this.disableCalcMap){this.mouseY=t,this.height=this.$el.clientHeight,this.parent.height=this.$el.parentElement.clientHeight;const e=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom);this.minH=Math.max(e,this.initialProps.minHeight||0),this.initialProps.maxHeight&&(this.maxH=Math.max(this.height,this.initialProps.maxHeight))}}dropInitial(){this.changeX=this.changeY=this.minW=this.minH,this.width=this.height=0,this.activeResizer&&this.activeResizer.removeAttribute("style"),this.$el.classList.remove("active"),this.activeResizer=null}bindMove(){document.documentElement.addEventListener("mouseup",this.mouseUpFunc,!0),document.documentElement.addEventListener("touchend",this.mouseUpFunc,!0),document.documentElement.addEventListener("mousemove",this.mouseMoveFunc,!0),document.documentElement.addEventListener("touchmove",this.mouseMoveFunc,!0),document.documentElement.addEventListener("mouseleave",this.mouseUpFunc)}unbindMove(){document.documentElement.removeEventListener("mouseup",this.mouseUpFunc,!0),document.documentElement.removeEventListener("touchend",this.mouseUpFunc,!0),document.documentElement.removeEventListener("mousemove",this.mouseMoveFunc,!0),document.documentElement.removeEventListener("touchmove",this.mouseMoveFunc,!0),document.documentElement.removeEventListener("mouseleave",this.mouseUpFunc)}}const Ra=(e,t)=>{const i=[],r=e.canResize&&new _a(e,(t=>{t.eventName===za.end&&e.onResize&&e.onResize(t)}))||null;if(e.canResize){if(e.active)for(let t in e.active)i.push(P("div",{onClick:e=>e.preventDefault(),onDblClick:t=>{t.preventDefault(),e.onDoubleClick&&e.onDoubleClick()},onMouseDown:e=>null==r?void 0:r.handleDown(e),onTouchStart:e=>null==r?void 0:r.handleDown(e),class:`resizable resizable-${e.active[t]}`}))}else if(e.active)for(let t in e.active)i.push(P("div",{onClick:e=>e.preventDefault(),onDblClick:t=>{t.preventDefault(),e.onDoubleClick&&e.onDoubleClick()},class:`no-resize resizable resizable-${e.active[t]}`}));return P("div",Object.assign({},e,{ref:e=>null==r?void 0:r.set(e)}),t,i)},Ta=({data:e,props:t},i)=>{let r=(null==e?void 0:e.name)||"",n=t;if((null==e?void 0:e.columnTemplate)&&(r=e.columnTemplate(P,e)),null==e?void 0:e.columnProperties){const i=e.columnProperties(e);i&&"object"==typeof i&&(n=qs.doMerge(t,i))}return P(Ra,Object.assign({},n),P("div",{class:"header-content"},r),i)},Ma=e=>{var t,i,r,n,s,a;const o={[as]:!0,sortable:!!(null===(t=e.data)||void 0===t?void 0:t.sortable)};(null===(i=e.data)||void 0===i?void 0:i.order)&&(o[e.data.order]=!0);const l={[ns]:e.column.itemIndex,canResize:e.canResize,minWidth:(null===(r=e.data)||void 0===r?void 0:r.minSize)||30,maxWidth:null===(n=e.data)||void 0===n?void 0:n.maxSize,active:["r"],class:o,style:{width:`${e.column.size}px`,transform:`translateX(${e.column.start}px)`},onResize:e.onResize,onDoubleClick(t){e.onDoubleClick({column:e.data,index:e.column.itemIndex,originalEvent:t})},onClick(t){!t.defaultPrevented&&e.onClick&&e.onClick({column:e.data,index:e.column.itemIndex,originalEvent:t})}};return e.range&&e.column.itemIndex>=e.range.x&&e.column.itemIndex<=e.range.x1&&"object"==typeof l.class&&(l.class[ls]=!0),P(Ta,{data:e.data,props:l},(null===(s=e.data)||void 0===s?void 0:s.order)?P(Ea,{column:e.data}):"",e.canFilter&&!1!==(null===(a=e.data)||void 0===a?void 0:a.filter)?P(kn,{column:e.data}):"")},Fa=e=>{const t={canResize:e.canResize,minWidth:30*e.group.ids.length,maxWidth:0,active:["r"],class:{[as]:!0},style:{transform:`translateX(${e.start}px)`,width:e.end-e.start+"px"},onResize:e.onResize};return P(Ta,{data:e.group,props:t})},Ia=({depth:e,groups:t,visibleProps:i,dimensionCol:r,canResize:n,onResize:s})=>{const a=[];for(let o=0;o<e;o++){if(t[o])for(let e of t[o]){const t=_r(e.ids,(e=>"number"==typeof i[e]));if(t>-1){const o=i[e.ids[t]]-t,l=o+e.ids.length-1,c=hn(r,o).start,h=hn(r,l).end;a.push(P(Fa,{start:c,end:h,group:e,canResize:n,onResize:e=>s(e.changedX,o,l)}))}}a.push(P("div",{class:"header-rgRow group"}))}return a},Oa=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.initialHeaderClick=ee(this,"initialHeaderClick",7),this.headerresize=ee(this,"headerresize",7),this.headerdblClick=ee(this,"headerdblClick",7),this.parent="",this.groupingDepth=0}onResize({width:e},t){this.headerresize.emit({[t]:e||0})}onResizeGroup(e,t,i){const r={},n=Aa(this.viewportCol.get("items"),"itemIndex"),s=e/(i-t+1);for(let e=t;e<=i;e++){const t=n[e];t&&(r[e]=t.size+s)}this.headerresize.emit(r)}render(){var e;const t=this.viewportCol.get("items"),i=null===(e=this.selectionStore)||void 0===e?void 0:e.get("range"),r=[],n={};for(let e of t){const t=this.colData[e.itemIndex];r.push(P(Ma,{range:i,column:e,data:t,canFilter:!!this.columnFilter,canResize:this.canResize,onResize:t=>this.onResize(t,e.itemIndex),onDoubleClick:e=>this.headerdblClick.emit(e),onClick:e=>this.initialHeaderClick.emit(e)})),n[null==t?void 0:t.prop]=e.itemIndex}return[P("div",{class:"group-rgRow"},P(Ia,{canResize:this.canResize,visibleProps:n,groups:this.groups,dimensionCol:this.dimensionCol.state,depth:this.groupingDepth,onResize:(e,t,i)=>this.onResizeGroup(e,t,i)})),P("div",{class:"header-rgRow actual-rgRow"},r)]}get element(){return this}static get style(){return"@charset \"UTF-8\";.revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-header{position:relative;z-index:5;display:block}revogr-header .rgHeaderCell{display:flex}revogr-header .rgHeaderCell.align-center{text-align:center}revogr-header .rgHeaderCell.align-left{text-align:left}revogr-header .rgHeaderCell.align-right{text-align:right}revogr-header .rgHeaderCell.sortable{cursor:pointer}revogr-header .rgHeaderCell i.asc:after,revogr-header .rgHeaderCell i.desc:after{font-size:13px}revogr-header .rgHeaderCell i.asc:after{content:\"↑\"}revogr-header .rgHeaderCell i.desc:after{content:\"↓\"}revogr-header .rgHeaderCell,revogr-header .grouped-cell{position:absolute;box-sizing:border-box;height:100%;z-index:1}revogr-header .header-rgRow{display:block;position:relative}revogr-header .header-rgRow.group{z-index:0}revogr-header .group-rgRow{position:relative}revogr-header .rgHeaderCell.active{z-index:10}revogr-header .rgHeaderCell.active .resizable{background-color:deepskyblue}revogr-header .rgHeaderCell .header-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}revogr-header .rgHeaderCell .resizable{display:block;position:absolute;z-index:90;touch-action:none;user-select:none}revogr-header .rgHeaderCell .resizable:hover{background-color:deepskyblue}revogr-header .rgHeaderCell>.resizable-r{cursor:ew-resize;width:6px;right:0;top:0;height:100%}revogr-header .rgHeaderCell>.resizable-rb{cursor:se-resize;width:6px;height:6px;right:0;bottom:0}revogr-header .rgHeaderCell>.resizable-b{cursor:s-resize;height:6px;bottom:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-lb{cursor:sw-resize;width:6px;height:6px;left:0;bottom:0}revogr-header .rgHeaderCell>.resizable-l{cursor:w-resize;width:6px;left:0;height:100%;top:0}revogr-header .rgHeaderCell>.resizable-lt{cursor:nw-resize;width:6px;height:6px;left:0;top:0}revogr-header .rgHeaderCell>.resizable-t{cursor:n-resize;height:6px;top:0;width:100%;left:0}revogr-header .rgHeaderCell>.resizable-rt{cursor:ne-resize;width:6px;height:6px;right:0;top:0}revogr-header .rv-filter{visibility:hidden}"}};var Da=function(){return $e.Date.now()},Ha=Math.max,Na=Math.min,Xa=function(e,t,i){var r,n,s,a,o,l,c=0,h=!1,d=!1,u=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var i=r,s=n;return r=n=void 0,c=t,a=e.apply(s,i)}function f(e){return c=e,o=setTimeout(v,t),h?g(e):a}function p(e){var i=e-l;return void 0===l||i>=t||i<0||d&&e-c>=s}function v(){var e=Da();if(p(e))return x(e);o=setTimeout(v,function(e){var i=t-(e-l);return d?Na(i,s-(e-c)):i}(e))}function x(e){return o=void 0,u&&r?g(e):(r=n=void 0,a)}function m(){var e=Da(),i=p(e);if(r=arguments,n=this,l=e,i){if(void 0===o)return f(l);if(d)return clearTimeout(o),o=setTimeout(v,t),g(l)}return void 0===o&&(o=setTimeout(v,t)),a}return t=Ar(t)||0,St(i)&&(h=!!i.leading,s=(d="maxWait"in i)?Ha(Ar(i.maxWait)||0,t):s,u="trailing"in i?!!i.trailing:u),m.cancel=function(){void 0!==o&&clearTimeout(o),c=0,r=l=n=o=void 0},m.flush=function(){return void 0===o?a:x(Da())},m};class Ya{constructor(e){this.config=e,this.currentCell=null,this.previousRow=null}endOrder(e,t){if(null===this.currentCell)return;const i=this.getCell(e,t);i.y!==this.currentCell.y&&(i.y<0?i.y=0:i.y<this.currentCell.y&&i.y++,this.config.positionChanged(this.currentCell.y,i.y)),this.clear()}startOrder(e,t){return this.currentCell=this.getCell(e,t),this.currentCell}move(e,t){const i=this.getRow(e,t);return this.previousRow===i.itemIndex||i.itemIndex<-1?null:(this.previousRow=i.itemIndex,i)}clear(){this.currentCell=null,this.previousRow=null}getRow(e,{el:t,rows:i}){const{top:r}=t.getBoundingClientRect(),n=cn(i,e-r);return{itemIndex:n.itemIndex,start:n.start+r,end:n.end+r}}getCell({x:e,y:t},{el:i,rows:r,cols:n}){const{top:s,left:a}=i.getBoundingClientRect(),o=e-a,l=cn(r,t-s);return{x:cn(n,o).itemIndex,y:l.itemIndex}}}const Ba=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.internalRowDragStart=ee(this,"internalRowDragStart",7),this.internalRowDragEnd=ee(this,"internalRowDragEnd",7),this.internalRowDrag=ee(this,"internalRowDrag",7),this.internalRowMouseMove=ee(this,"internalRowMouseMove",7),this.initialRowDropped=ee(this,"initialRowDropped",7),this.rowMoveFunc=Xa((e=>{const t=this.rowOrderService.move(e,this.getData());null!==t&&this.internalRowDrag.emit(t)}),5)}onMouseOut(){this.clearOrder()}onMouseUp(e){this.endOrder(e)}async dragStart(e){e.preventDefault(),this.moveFunc&&this.clearOrder();const t=this.getData(),i=this.rowOrderService.startOrder(e,t),r=this.rowOrderService.getRow(e.y,t);this.internalRowDragStart.emit({cell:i,text:"Draggable item",pos:r,event:e}).defaultPrevented||(this.moveFunc=e=>this.move(e),document.addEventListener("mousemove",this.moveFunc))}async endOrder(e){this.rowOrderService.endOrder(e,this.getData()),this.clearOrder()}async clearOrder(){this.rowOrderService.clear(),document.removeEventListener("mousemove",this.moveFunc),this.moveFunc=null,this.internalRowDragEnd.emit()}move({x:e,y:t}){this.internalRowMouseMove.emit({x:e,y:t}),this.rowMoveFunc(t)}connectedCallback(){this.rowOrderService=new Ya({positionChanged:(e,t)=>this.onPositionChanged(e,t)})}onPositionChanged(e,t){if(this.initialRowDropped.emit({from:e,to:t}).defaultPrevented)return;const i=[...this.dataStore.get("items")],r=i.splice(e,1);i.splice(t,0,...r),jr(this.dataStore,i)}getData(){return{el:this.parent,rows:this.dimensionRow.state,cols:this.dimensionCol.state}}};class Wa{constructor(e,t){this.store=e,this.config=t,this.store=e}get edited(){return this.store.get("edit")}get focused(){return this.store.get("focus")}get ranged(){return this.store.get("range")}changeRange(e){return this.config.changeRange(e)}focus(e,t=!1){if(!e)return!1;let i=e;if(t){let e=this.store.get("focus");if(e)return this.config.changeRange(Is(e,i))}return this.config.focus(e,i)}}class ja{constructor(e){this.sv=e,this.ctrlDown=!1}async keyDown(e,t){var i;this.sv.selectionStoreService.focused&&(ha(e.keyCode,navigator.platform)&&(this.ctrlDown=!0),ia.TAB!==e.code?this.sv.selectionStoreService.edited?e.code===ia.ESCAPE&&this.sv.doEdit(void 0,!0):(i=e.code,ia.BACKSPACE!==i&&ia.DELETE!==i?da(e.code)?this.sv.doEdit():this.isCopy(e)||(this.isPaste(e)?this.sv.internalPaste():function(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}(e.keyCode)?this.sv.doEdit(e.key):await this.keyChangeSelection(e,t)):this.sv.clearCell()):this.keyChangeSelection(e,t))}async keyChangeSelection(e,t){const i=this.changeDirectionKey(e,t);if(!i)return!1;await ln();const r=this.sv.selectionStore.get("range"),n=this.sv.selectionStore.get("focus");return this.keyPositionChange(i.changes,this.sv.getData(),r,n,i.isMulti)}keyPositionChange(e,t,i,r,n=!1){if(!i||!r)return!1;const s=function(e,t,i,r=!1){const n=n=>{const s={x:e.x,y:e.y},a=r?{x:e.x1,y:e.y1}:s;return(a[n]>t[n]?a:s)[n]+=i[n],{start:s,end:a}};return i.x?n("x"):i.y?n("y"):null}(i,r,e,n);if(!s)return!1;if(n){if(ma(s.end,t)||function({x:e,y:t}){return e<0||t<0}(s.start))return!1;const e=Is(s.start,s.end);return this.sv.selectionStoreService.changeRange(e)}return this.sv.selectionStoreService.focus(s.start)}keyUp(e){ha(e.keyCode,navigator.platform)&&(this.ctrlDown=!1)}isCopy(e){return this.ctrlDown&&e.code==ia.C}isPaste(e){return this.ctrlDown&&e.code==ia.V}changeDirectionKey(e,t){const i=t&&e.shiftKey;switch(e.code){case ia.TAB:case ia.ARROW_UP:case ia.ARROW_DOWN:case ia.ARROW_LEFT:case ia.ARROW_RIGHT:e.preventDefault()}switch(e.code){case ia.ARROW_UP:return{changes:{y:-1},isMulti:i};case ia.ARROW_DOWN:return{changes:{y:1},isMulti:i};case ia.ARROW_LEFT:return{changes:{x:-1},isMulti:i};case ia.TAB:case ia.ARROW_RIGHT:return{changes:{x:1},isMulti:i}}}}var $a,Va=function(e,t,i){var r=null==e?0:e.length;return r?(i&&"number"!=typeof i&&Dr(e,t,i)?(t=0,i=r):(t=null==t?0:zr(t),i=void 0===i?r:zr(i)),function(e,t,i){var r=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(i=i>n?n:i)<0&&(i+=n),n=t>i?0:i-t>>>0,t>>>=0;for(var s=Array(n);++r<n;)s[r]=e[r+t];return s}(e,t,i)):[]};!function(e){e.selection="Selection",e.autoFill="AutoFill"}($a||($a={}));class Ga{constructor(e){this.sv=e,this.autoFillType=null,this.autoFillInitial=null,this.autoFillStart=null,this.autoFillLast=null}renderAutofill(e,t){let i;return i=ba(e||Object.assign(Object.assign({},t),{x1:t.x,y1:t.y}),this.sv.dimensionRow.state,this.sv.dimensionCol.state),P("div",{class:"autofill-handle",style:{left:`${i.right}px`,top:`${i.bottom}px`},onMouseDown:e=>this.selectionStart(e,this.sv.getData(),$a.autoFill)})}get isAutoFill(){return!!this.autoFillType}selectionMouseMove(e){this.onMouseMoveAutofill||(this.onMouseMoveAutofill=Xa(((e,t)=>this.doAutofillMouseMove(e,t)),5)),this.isAutoFill&&this.onMouseMoveAutofill(e,this.sv.getData())}getFocus(){let e=this.sv.selectionStoreService.focused;const t=this.sv.selectionStoreService.ranged;return t&&(e={x:t.x,y:t.y}),e||t?e:null}doAutofillMouseMove({x:e,y:t},i){if(!this.autoFillInitial)return;let r,n=xa({x:e,y:t},i);this.autoFillLast&&(r=function(e,t){const i=["x","y"];for(let r of i)if(e[r]!==t[r])return{[r]:1};return null}(this.autoFillStart,this.autoFillLast)),this.autoFillLast&&r||(r=function(e,t){const i={},r=["x","y"];for(let n of r)i[n]=Math.abs(e[n]-t[n]);return i.x>i.y?{x:1}:i.y>i.x?{y:1}:null}(this.autoFillStart,n),this.autoFillLast||(this.autoFillLast=this.autoFillStart)),r&&(xr(r,((e,t)=>{e&&(n=Object.assign(Object.assign({},this.autoFillLast),{[t]:n[t]}))})),ma(n,i)||(this.autoFillLast=n,this.sv.setTempRange({area:Is(this.autoFillInitial,this.autoFillLast),type:this.autoFillType})))}selectionStart(e,t,i=$a.selection){const{top:r,left:n}=e.target.getBoundingClientRect();this.autoFillInitial=this.getFocus(),this.autoFillType=i,this.autoFillStart=xa({x:n,y:r},t),e.preventDefault()}clearAutoFillSelection(){this.autoFillInitial&&(this.autoFillInitial=this.getFocus(),this.autoFillType===$a.autoFill?this.applyRangeWithData(this.autoFillInitial,this.autoFillLast):this.applyRangeOnly(this.autoFillInitial,this.autoFillLast)),this.autoFillType=null,this.autoFillInitial=null,this.autoFillLast=null,this.autoFillStart=null}onRangeApply(e,t){const i={};for(let t in e)i[t]=Br(this.sv.dataStore,parseInt(t,10));this.sv.internalRangeDataApply({data:e,models:i,type:this.sv.dataStore.get("type")}).defaultPrevented||this.sv.columnService.applyRangeData(e),this.sv.setRange(t)}applyRangeWithData(e,t){if(!e||!t)return;const i=this.sv.selectionStoreService.ranged,r=Is(e,t),n=[...this.sv.columnService.columns],s={type:this.sv.dataStore.get("type"),newData:{},newRange:r,oldRange:i,newProps:Va(n,r.x,r.x1+1).map((e=>e.prop)),oldProps:Va(n,i.x,i.x1+1).map((e=>e.prop))};s.newData=this.sv.columnService.getRangeData(s),this.sv.internalSelectionChanged(s).defaultPrevented?this.sv.setTempRange(null):this.onRangeApply(s.newData,r)}applyRangeOnly(e,t){if(!e||!t)return;const i=Is(e,t);this.sv.setRange(i)}}class Ua{constructor(e){this.sv=e}onCopy(e){if(this.sv.internalCopy().defaultPrevented)return!1;let t,i=this.sv.selectionStoreService.focused,r=this.sv.selectionStoreService.ranged;if(r||(r=Is(i,i)),r){const e=[...this.sv.columnService.columns],i=Va(e,r.x,r.x1+1).map((e=>e.prop));t=this.sv.columnService.copyRangeArray(r,i,this.sv.dataStore)}return this.clipboard.doCopy(e,t),!0}renderClipboard(){return P("revogr-clipboard",{onCopyRegion:e=>this.onCopy(e.detail),ref:e=>this.clipboard=e,onPasteRegion:e=>this.onPaste(e.detail)})}onPaste(e){const t=this.sv.selectionStoreService.focused,i=null!==this.sv.selectionStoreService.edited;if(!t||i)return;const{changed:r,range:n}=this.sv.columnService.getTransformedDataToApply(t,e);this.sv.onRangeApply(r,n)}}const Za=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.internalCopy=ee(this,"internalCopy",7),this.internalPaste=ee(this,"internalPaste",7),this.internalCellEdit=ee(this,"internalCellEdit",7),this.internalFocusCell=ee(this,"internalFocusCell",7),this.setEdit=ee(this,"setEdit",3),this.setRange=ee(this,"setRange",7),this.setTempRange=ee(this,"setTempRange",7),this.focusCell=ee(this,"focusCell",3),this.internalSelectionChanged=ee(this,"internalSelectionChanged",7),this.internalRangeDataApply=ee(this,"internalRangeDataApply",7),this.keyboardService=null,this.autoFillService=null,this.clipboardService=null}onMouseMove(e){this.selectionStoreService.focused&&this.autoFillService.selectionMouseMove(e)}onMouseOut(){this.autoFillService.clearAutoFillSelection()}onMouseUp(){this.autoFillService.clearAutoFillSelection()}onCellDrag(e){var t;null===(t=this.orderEditor)||void 0===t||t.dragStart(e.detail)}onKeyUp(e){var t;null===(t=this.keyboardService)||void 0===t||t.keyUp(e)}onKeyDown(e){var t;null===(t=this.keyboardService)||void 0===t||t.keyDown(e,this.range)}selectionServiceSet(e){this.selectionStoreService=new Wa(e,{changeRange:e=>{var t;return!(null===(t=this.setRange.emit(e))||void 0===t?void 0:t.defaultPrevented)},focus:(e,t)=>{var i;const r={focus:e,end:t},{defaultPrevented:n}=this.internalFocusCell.emit(this.columnService.getSaveData(e.y,e.x));return!n&&!(null===(i=this.focusCell.emit(r))||void 0===i?void 0:i.defaultPrevented)}}),this.keyboardService=new ja({selectionStoreService:this.selectionStoreService,selectionStore:e,doEdit:(e,t)=>this.doEdit(e,t),clearCell:()=>this.clearCell(),getData:()=>this.getData(),internalPaste:()=>this.internalPaste.emit()}),this.createAutoFillService(),this.createClipboardService()}createAutoFillService(){this.autoFillService=new Ga({selectionStoreService:this.selectionStoreService,dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,columnService:this.columnService,dataStore:this.dataStore,setTempRange:e=>this.setTempRange.emit(e),internalSelectionChanged:e=>this.internalSelectionChanged.emit(e),internalRangeDataApply:e=>this.internalRangeDataApply.emit(e),setRange:e=>this.setRange.emit(e),getData:()=>this.getData()})}columnServiceSet(){var e;null===(e=this.columnService)||void 0===e||e.destroy(),this.columnService=new qs(this.dataStore,this.colData),this.createAutoFillService(),this.createClipboardService()}createClipboardService(){this.clipboardService=new Ua({selectionStoreService:this.selectionStoreService,columnService:this.columnService,dataStore:this.dataStore,onRangeApply:(e,t)=>this.autoFillService.onRangeApply(e,t),internalCopy:()=>this.internalCopy.emit()})}connectedCallback(){this.columnServiceSet(),this.selectionServiceSet(this.selectionStore)}disconnectedCallback(){var e;null===(e=this.columnService)||void 0===e||e.destroy()}renderRange(e){const t=ya(e,this.dimensionRow.state,this.dimensionCol.state);return[P("div",{class:"selection-border-range",style:t})]}renderEditCell(){const e=this.selectionStore.get("edit");if(this.readonly||!e)return;const t=e.val||this.columnService.getCellData(e.y,e.x),i=Object.assign(Object.assign({},e),this.columnService.getSaveData(e.y,e.x,t)),r=ya(Object.assign(Object.assign({},e),{x1:e.x,y1:e.y}),this.dimensionRow.state,this.dimensionCol.state);return P("revogr-edit",{onCellEdit:e=>this.onCellEdit(e.detail),onCloseEdit:e=>this.closeEdit(e),editCell:i,column:this.columnService.columns[e.x],editor:this.columnService.getCellEditor(e.y,e.x,this.editors),style:r})}render(){const e=this.selectionStoreService.ranged,t=this.selectionStoreService.focused,i=[];(e||t)&&this.useClipboard&&i.push(this.clipboardService.renderClipboard()),e&&i.push(...this.renderRange(e));const r=this.renderEditCell();return r&&i.push(r),t&&!this.readonly&&!r&&this.range&&i.push(this.autoFillService.renderAutofill(e,t)),this.canDrag&&i.push(P("revogr-order-editor",{ref:e=>this.orderEditor=e,dataStore:this.dataStore,dimensionRow:this.dimensionRow,dimensionCol:this.dimensionCol,parent:this.element,onInternalRowDragStart:e=>this.onRowDragStart(e)})),P(R,{onDblClick:()=>this.doEdit(),onMouseDown:e=>this.onElementMouseDown(e)},i,P("slot",{name:"data"}))}onElementMouseDown(e){if(null==(t=e.target)?void 0:t.closest(`.${cs}`))return;var t;const i=this.getData();if(e.defaultPrevented)return;const r=xa({x:e.x,y:e.y},i);this.selectionStoreService.focus(r,this.range&&e.shiftKey),this.range&&this.autoFillService.selectionStart(e,i)}doEdit(e="",t=!1){var i;if(this.canEdit()){const r=this.selectionStore.get("focus"),n=this.columnService.getSaveData(r.y,r.x);null===(i=this.setEdit)||void 0===i||i.emit(Object.assign(Object.assign({},n),{isCancel:t,val:e}))}}closeEdit(e){this.doEdit(void 0,!0),(null==e?void 0:e.detail)&&this.focusNext()}async focusNext(){await this.keyboardService.keyChangeSelection(new KeyboardEvent("keydown",{code:ia.ARROW_DOWN}),this.range)||this.closeEdit()}clearCell(){if(!this.selectionStoreService.ranged||(e=this.selectionStoreService.ranged).x===e.x1&&e.y===e.y1){if(this.canEdit()){const e=this.selectionStoreService.focused;this.onCellEdit({rgRow:e.y,rgCol:e.x,val:""},!0)}}else{const e=this.columnService.getRangeStaticData(this.selectionStoreService.ranged,"");this.autoFillService.onRangeApply(e,this.selectionStoreService.ranged)}var e}onCellEdit(e,t=!1){const i=this.columnService.getSaveData(e.rgRow,e.rgCol,e.val);this.internalCellEdit.emit(i),t||e.preventFocus||this.focusNext()}onRowDragStart({detail:e}){e.text=this.columnService.getCellData(e.cell.y,e.cell.x)}canEdit(){var e;if(this.readonly)return!1;const t=this.selectionStoreService.focused;return t&&!(null===(e=this.columnService)||void 0===e?void 0:e.isReadOnly(t.y,t.x))}getData(){return{el:this.element,rows:this.dimensionRow.state,cols:this.dimensionCol.state,lastCell:this.lastCell}}get element(){return this}static get watchers(){return{selectionStore:["selectionServiceSet"],dimensionRow:["createAutoFillService"],dimensionCol:["createAutoFillService"],dataStore:["columnServiceSet"],colData:["columnServiceSet"]}}static get style(){return".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-overlay-selection{display:block;position:relative;width:100%}revogr-overlay-selection .autofill-handle{position:absolute;width:10px;height:10px;background:#0d63e8;margin-left:-9px;margin-top:-9px;border:1px solid white;box-sizing:border-box;z-index:10;cursor:crosshair}revogr-overlay-selection .selection-border-range{position:absolute;pointer-events:none;z-index:9}revogr-overlay-selection .selection-border-range{box-shadow:-1px 0 0 #0d63e8 inset, 1px 0 0 #0d63e8 inset, 0 -1px 0 #0d63e8 inset, 0 1px 0 #0d63e8 inset}revogr-overlay-selection revogr-edit{z-index:10}"}},qa=e=>(t,{rowIndex:i})=>e+i,Ka=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.scrollViewport=ee(this,"scrollViewport",3),this.elementToScroll=ee(this,"elementToScroll",3)}render(){var e;const t=[],i=new yn;let r=1;for(let e of this.dataPorts){const n=e.dataStore.get("items").length,s=new Xr(e.type);s.updateData(e.dataStore.get("source"));const a=new Xr("colPinStart"),o=Object.assign({cellTemplate:qa(r)},this.rowHeaderColumn);a.updateData([o]);const l=Object.assign(Object.assign({},e),{dataStore:s.store,colData:a.store,viewportCol:i.store,readonly:!0,range:!1});t.push(P("revogr-data",Object.assign({},l))),r+=n}const n=(null===(e=this.rowHeaderColumn)||void 0===e?void 0:e.size)||10*(r.toString().length+1);i.setViewport({realCount:1,virtualSize:0,items:[{size:n,start:0,end:n,itemIndex:0}]});const s=`${this.uiid}-rowHeaders`,a={[ss]:s,contentHeight:this.height,contentWidth:0,style:{minWidth:`${n}px`},ref:e=>this.elementToScroll.emit(e),onScrollViewport:e=>this.scrollViewport.emit(e.detail)},o=Object.assign(Object.assign({},this.headerProp),{colData:"object"==typeof this.rowHeaderColumn?[this.rowHeaderColumn]:[],viewportCol:i.store,canResize:!1,parent:s,slot:"header"});return P(R,{class:"rowHeaders",key:"rowHeaders"},P("revogr-viewport-scroll",Object.assign({},a),P("revogr-header",Object.assign({},o)),t))}},Ja={contentSize:0,clientSize:0,virtualSize:0,maxSize:0};class Qa{constructor(e){this.cfg=e,this.preventArtificialScroll={rgRow:null,rgCol:null},this.previousScroll={rgRow:0,rgCol:0},this.params={rgRow:Object.assign({},Ja),rgCol:Object.assign({},Ja)}}static getVirtualContentSize(e,t,i=0){return e+(i?t-i:0)}setParams(e,t){const i=Qa.getVirtualContentSize(e.contentSize,e.clientSize,e.virtualSize);this.params[t]=Object.assign(Object.assign({},e),{maxSize:i-e.clientSize,virtualContentSize:i})}setScroll(e){this.cancelScroll(e.dimension),this.preventArtificialScroll[e.dimension]=window.requestAnimationFrame((()=>{const t=this.getParams(e.dimension);e.coordinate=Math.ceil(e.coordinate),this.previousScroll[e.dimension]=this.wrapCoordinate(e.coordinate,t),this.preventArtificialScroll[e.dimension]=null,this.cfg.afterScroll(Object.assign(Object.assign({},e),{coordinate:t.virtualSize?this.convert(e.coordinate,t,!1):e.coordinate}))}))}scroll(e,t,i=!1,r){if(this.cancelScroll(t),!i&&this.previousScroll[t]===e)return void(this.previousScroll[t]=0);const n=this.getParams(t);this.cfg.beforeScroll({dimension:t,coordinate:n.virtualSize?this.convert(e,n):e,delta:r})}getParams(e){return this.params[e]}wrapCoordinate(e,t){return e<0?0:e>t.maxSize?t.maxSize:e}cancelScroll(e){return"number"==typeof this.preventArtificialScroll[e]&&(window.cancelAnimationFrame(this.preventArtificialScroll[e]),this.preventArtificialScroll[e]=null,!0)}convert(e,t,i=!0){const r=t.clientSize,n=[0,t.virtualContentSize-r],s=[0,t.contentSize-t.virtualSize];return i?on(e,n,s):on(e,s,n)}}const eo=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.scrollVirtual=ee(this,"scrollVirtual",7),this.scrollSize=0,this.isAutoHide=!1,this.autoHideTimeout=0,this.dimension="rgRow"}async setScroll(e){var t;this.dimension===e.dimension&&(null===(t=this.scrollService)||void 0===t||t.setScroll(e))}async changeScroll(e){if(e.delta){switch(e.dimension){case"rgCol":e.coordinate=this.element.scrollLeft+e.delta;break;case"rgRow":e.coordinate=this.element.scrollTop+e.delta}this.setScroll(e)}return e}set size(e){"rgRow"!==this.dimension?this.element.style.minHeight=`${e}px`:this.element.style.minWidth=`${e}px`}get size(){return"rgRow"===this.dimension?this.element.clientHeight:this.element.clientWidth}connectedCallback(){this.scrollService=new Qa({beforeScroll:e=>this.scrollVirtual.emit(e),afterScroll:e=>{const t="rgRow"===e.dimension?"scrollTop":"scrollLeft";this.element[t]=e.coordinate}})}disconnectedCallback(){clearTimeout(this.autoHideTimeout)}componentWillLoad(){this.scrollSize=an(document),this.isAutoHide=!this.scrollSize}componentDidRender(){const e="rgRow"===this.dimension?"scrollHeight":"scrollWidth";this.element[e]>this.size?this.size=this.scrollSize:this.size=0,this.scrollService.setParams({contentSize:this.dimensionStore.get("realSize"),clientSize:this.size,virtualSize:this.viewportStore.get("virtualSize")},this.dimension)}onScroll(e){var t;let i="scrollLeft";"rgRow"===this.dimension&&(i="scrollTop"),this.isAutoHide&&(this.size=20,this.autoHideTimeout=this.autoHide(this.autoHideTimeout));const r=e.target;null===(t=this.scrollService)||void 0===t||t.scroll(r[i]||0,this.dimension)}autoHide(e){return clearTimeout(e),setTimeout((()=>{this.size=0}),6e3)}render(){const e="rgRow"===this.dimension?"height":"width";return P(R,Object.assign({},{"auto-hide":this.isAutoHide},{onScroll:e=>this.onScroll(e)}),P("div",{style:{[e]:`${this.extContentSize(this.viewportStore.get("virtualSize"),this.dimensionStore.get("realSize"))}px`}}))}extContentSize(e,t){return Qa.getVirtualContentSize(t,this.size,e)}get element(){return this}static get style(){return".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}revogr-scroll-virtual[auto-hide]{position:absolute;z-index:100}revogr-scroll-virtual[auto-hide].vertical{right:0;top:0}revogr-scroll-virtual[auto-hide].vertical:hover{min-width:20px}revogr-scroll-virtual[auto-hide].horizontal{bottom:0;left:0}revogr-scroll-virtual[auto-hide].horizontal:hover{min-height:20px}revogr-scroll-virtual.vertical{overflow-y:auto;overflow-x:hidden;height:100%}revogr-scroll-virtual.vertical>div{width:1px}revogr-scroll-virtual.horizontal{overflow-x:auto;overflow-y:hidden;width:100%}revogr-scroll-virtual.horizontal>div{height:1px}"}},to=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.onChange=Ws.throttle((e=>this.doChange(e)),300)}doChange(e){null==e||e.scrollIntoView({block:"nearest",inline:"nearest"})}componentDidRender(){this.el&&this.onChange(this.el)}render(){const e=this.selectionStore.get("tempRange"),t=this.selectionStore.get("tempRangeType");if(!e)return;let i="bottom",r="right";const n=this.getRange();if(!n)return;e.y<n.y&&(i="top"),e.x<n.x&&(r="left");const s=`${r} ${i}`,a=ya(e,this.dimensionRow.state,this.dimensionCol.state);return P(R,{class:{"temp-bg-range":!0,[t||""]:!0},style:a},P("div",{class:s,ref:e=>this.el=e}))}getRange(){const e=this.selectionStore.get("range");if(e)return e;const t=this.selectionStore.get("focus");return t?Object.assign(Object.assign({},t),{x1:t.x,y1:t.y}):null}static get style(){return".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}.temp-bg-range{display:block;position:absolute;pointer-events:none;z-index:9;border:1px solid #ff5e00;box-sizing:border-box}.temp-bg-range.Selection{border:1px dashed gray}.temp-bg-range>div{width:1px;height:1px;position:absolute}.temp-bg-range>div.top{top:-1px}.temp-bg-range>div.bottom{bottom:-1px}.temp-bg-range>div.left{left:-1px}.temp-bg-range>div.right{right:-1px}"}};class io{constructor(e,t){this.events=t,this.resizeObserver=null,this.resize=function(e,t,i){var r=!0,n=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return St(i)&&(r="leading"in i?!!i.leading:r,n="trailing"in i?!!i.trailing:n),Xa(e,t,{leading:r,maxWait:t,trailing:n})}(((e,t)=>{var i;return null===(i=this.events)||void 0===i?void 0:i.resize(e,t)}),10),this.init(e)}async init(e){var t;await async function(){if(!("ResizeObserver"in window)){const e=await i.e(497).then(i.bind(i,497));window.ResizeObserver=e.ResizeObserver}}(),this.resizeObserver=new ResizeObserver(this.resize),null===(t=this.resizeObserver)||void 0===t||t.observe(e)}destroy(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.resizeObserver=null}}const ro=class extends HTMLElement{constructor(){super(),this.__registerHost(),this.scrollViewport=ee(this,"scrollViewport",3),this.resizeViewport=ee(this,"resizeViewport",7),this.scrollchange=ee(this,"scrollchange",7),this.scrollThrottling=30,this.contentWidth=0,this.contentHeight=0,this.oldValY=this.contentHeight,this.oldValX=this.contentWidth,this.mouseWheelScroll={rgCol:0,rgRow:0}}async setScroll(e){var t;this.latestScrollUpdate(e.dimension),null===(t=this.scrollService)||void 0===t||t.setScroll(e)}async changeScroll(e){if(e.delta){switch(e.dimension){case"rgCol":e.coordinate=this.horizontalScroll.scrollLeft+e.delta;break;case"rgRow":e.coordinate=this.verticalScroll.scrollTop+e.delta}this.setScroll(e)}return e}connectedCallback(){"ontouchstart"in document.documentElement?this.scrollThrottling=0:(this.verticalMouseWheel=this.onVerticalMouseWheel.bind(this,"rgRow","deltaY"),this.horizontalMouseWheel=this.onHorizontalMouseWheel.bind(this,"rgCol","deltaX")),this.scrollService=new Qa({beforeScroll:e=>this.scrollViewport.emit(e),afterScroll:e=>{switch(e.dimension){case"rgCol":this.horizontalScroll.scrollLeft=e.coordinate;break;case"rgRow":this.verticalScroll.scrollTop=e.coordinate}}})}componentDidLoad(){this.horisontalResize=new io(this.horizontalScroll,{resize:e=>{var t,i;let r=(null===(t=e[0])||void 0===t?void 0:t.contentRect.height)||0;r&&(r-=this.header.clientHeight+this.footer.clientHeight);const n={rgRow:{size:r,contentSize:this.contentHeight,scroll:this.verticalScroll.scrollTop},rgCol:{size:(null===(i=e[0])||void 0===i?void 0:i.contentRect.width)||0,contentSize:this.contentWidth,scroll:this.horizontalScroll.scrollLeft}};xr(n,((e,t)=>{var i;this.resizeViewport.emit({dimension:t,size:e.size}),null===(i=this.scrollService)||void 0===i||i.scroll(e.scroll,t,!0),this.setScrollVisibility(t,e.size,e.contentSize)}))}})}setScrollVisibility(e,t,i){const r=t<i;let n,s;switch(e){case"rgCol":n=this.horizontalScroll,s=this.horizontalMouseWheel;break;case"rgRow":n=this.verticalScroll,s=this.verticalMouseWheel}r?(n.classList.add(`scroll-${e}`),n.addEventListener("mousewheel",s)):(n.classList.remove(`scroll-${e}`),n.removeEventListener("mousewheel",s)),this.scrollchange.emit({type:e,hasScroll:r})}disconnectedCallback(){this.verticalScroll.removeEventListener("mousewheel",this.verticalMouseWheel),this.horizontalScroll.removeEventListener("mousewheel",this.horizontalMouseWheel),this.horisontalResize.destroy()}async componentDidRender(){this.contentHeight<this.oldValY&&this.verticalScroll&&(this.verticalScroll.scrollTop+=this.contentHeight-this.oldValY),this.oldValY=this.contentHeight,this.contentWidth<this.oldValX&&(this.horizontalScroll.scrollLeft+=this.contentWidth-this.oldValX),this.oldValX=this.contentWidth,this.scrollService.setParams({contentSize:this.contentHeight,clientSize:this.verticalScroll.clientHeight,virtualSize:0},"rgRow"),this.scrollService.setParams({contentSize:this.contentWidth,clientSize:this.horizontalScroll.clientWidth,virtualSize:0},"rgCol"),this.setScrollVisibility("rgRow",this.verticalScroll.clientHeight,this.contentHeight),this.setScrollVisibility("rgCol",this.horizontalScroll.clientWidth,this.contentWidth)}render(){return P(R,{onScroll:e=>this.onScroll("rgCol",e)},P("div",{class:"inner-content-table",style:{width:`${this.contentWidth}px`}},P("div",{class:"header-wrapper",ref:e=>this.header=e},P("slot",{name:Ns})),P("div",{class:"vertical-inner",ref:e=>this.verticalScroll=e,onScroll:e=>this.onScroll("rgRow",e)},P("div",{class:"content-wrapper",style:{height:`${this.contentHeight}px`}},P("slot",{name:Ys}))),P("div",{class:"footer-wrapper",ref:e=>this.footer=e},P("slot",{name:Xs}))))}onScroll(e,t){var i;const r=t.target;let n=0;switch(e){case"rgCol":n=null==r?void 0:r.scrollLeft;break;case"rgRow":n=null==r?void 0:r.scrollTop}(new Date).getTime()-this.mouseWheelScroll[e]>this.scrollThrottling&&(null===(i=this.scrollService)||void 0===i||i.scroll(n,e))}latestScrollUpdate(e){this.mouseWheelScroll[e]=(new Date).getTime()}onVerticalMouseWheel(e,t,i){var r;i.preventDefault();const n=this.verticalScroll.scrollTop+i[t];null===(r=this.scrollService)||void 0===r||r.scroll(n,e,void 0,i[t]),this.latestScrollUpdate(e)}onHorizontalMouseWheel(e,t,i){var r;i.preventDefault();const n=this.horizontalScroll.scrollLeft+i[t];null===(r=this.scrollService)||void 0===r||r.scroll(n,e,void 0,i[t]),this.latestScrollUpdate(e)}get horizontalScroll(){return this}static get style(){return".revo-drag-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 438 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M421.875,70.40625 C426.432292,70.40625 430.175781,68.9414062 433.105469,66.0117188 C436.035156,63.0820312 437.5,59.3385417 437.5,54.78125 L437.5,54.78125 L437.5,15.71875 C437.5,11.1614583 436.035156,7.41796875 433.105469,4.48828125 C430.175781,1.55859375 426.432292,0.09375 421.875,0.09375 L421.875,0.09375 L15.625,0.09375 C11.0677083,0.09375 7.32421875,1.55859375 4.39453125,4.48828125 C1.46484375,7.41796875 0,11.1614583 0,15.71875 L0,15.71875 L0,54.78125 C0,59.3385417 1.46484375,63.0820312 4.39453125,66.0117188 C7.32421875,68.9414062 11.0677083,70.40625 15.625,70.40625 L15.625,70.40625 L421.875,70.40625 Z M421.875,226.65625 C426.432292,226.65625 430.175781,225.191406 433.105469,222.261719 C436.035156,219.332031 437.5,215.588542 437.5,211.03125 L437.5,211.03125 L437.5,171.96875 C437.5,167.411458 436.035156,163.667969 433.105469,160.738281 C430.175781,157.808594 426.432292,156.34375 421.875,156.34375 L421.875,156.34375 L15.625,156.34375 C11.0677083,156.34375 7.32421875,157.808594 4.39453125,160.738281 C1.46484375,163.667969 0,167.411458 0,171.96875 L0,171.96875 L0,211.03125 C0,215.588542 1.46484375,219.332031 4.39453125,222.261719 C7.32421875,225.191406 11.0677083,226.65625 15.625,226.65625 L15.625,226.65625 L421.875,226.65625 Z M421.875,382.90625 C426.432292,382.90625 430.175781,381.441406 433.105469,378.511719 C436.035156,375.582031 437.5,371.838542 437.5,367.28125 L437.5,367.28125 L437.5,328.21875 C437.5,323.661458 436.035156,319.917969 433.105469,316.988281 C430.175781,314.058594 426.432292,312.59375 421.875,312.59375 L421.875,312.59375 L15.625,312.59375 C11.0677083,312.59375 7.32421875,314.058594 4.39453125,316.988281 C1.46484375,319.917969 0,323.661458 0,328.21875 L0,328.21875 L0,367.28125 C0,371.838542 1.46484375,375.582031 4.39453125,378.511719 C7.32421875,381.441406 11.0677083,382.90625 15.625,382.90625 L15.625,382.90625 L421.875,382.90625 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:7px;background-size:cover;background-repeat:no-repeat}.revo-alt-icon{-webkit-mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg viewBox='0 0 384 383' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg%3E%3Cpath d='M192.4375,383 C197.424479,383 201.663411,381.254557 205.154297,377.763672 L205.154297,377.763672 L264.25,318.667969 C270.234375,312.683594 271.605794,306.075846 268.364258,298.844727 C265.122721,291.613607 259.51237,287.998047 251.533203,287.998047 L251.533203,287.998047 L213.382812,287.998047 L213.382812,212.445312 L288.935547,212.445312 L288.935547,250.595703 C288.935547,258.57487 292.551107,264.185221 299.782227,267.426758 C307.013346,270.668294 313.621094,269.296875 319.605469,263.3125 L319.605469,263.3125 L378.701172,204.216797 C382.192057,200.725911 383.9375,196.486979 383.9375,191.5 C383.9375,186.513021 382.192057,182.274089 378.701172,178.783203 L378.701172,178.783203 L319.605469,119.6875 C313.621094,114.201823 307.013346,112.955078 299.782227,115.947266 C292.551107,118.939453 288.935547,124.42513 288.935547,132.404297 L288.935547,132.404297 L288.935547,170.554688 L213.382812,170.554688 L213.382812,95.0019531 L251.533203,95.0019531 C259.51237,95.0019531 264.998047,91.3863932 267.990234,84.1552734 C270.982422,76.9241536 269.735677,70.3164062 264.25,64.3320312 L264.25,64.3320312 L205.154297,5.23632812 C201.663411,1.74544271 197.424479,0 192.4375,0 C187.450521,0 183.211589,1.74544271 179.720703,5.23632812 L179.720703,5.23632812 L120.625,64.3320312 C114.640625,70.3164062 113.269206,76.9241536 116.510742,84.1552734 C119.752279,91.3863932 125.36263,95.0019531 133.341797,95.0019531 L133.341797,95.0019531 L171.492188,95.0019531 L171.492188,170.554688 L95.9394531,170.554688 L95.9394531,132.404297 C95.9394531,124.42513 92.3238932,118.814779 85.0927734,115.573242 C77.8616536,112.331706 71.2539062,113.703125 65.2695312,119.6875 L65.2695312,119.6875 L6.17382812,178.783203 C2.68294271,182.274089 0.9375,186.513021 0.9375,191.5 C0.9375,196.486979 2.68294271,200.725911 6.17382812,204.216797 L6.17382812,204.216797 L65.2695312,263.3125 C71.2539062,268.798177 77.8616536,270.044922 85.0927734,267.052734 C92.3238932,264.060547 95.9394531,258.57487 95.9394531,250.595703 L95.9394531,250.595703 L95.9394531,212.445312 L171.492188,212.445312 L171.492188,287.998047 L133.341797,287.998047 C125.36263,287.998047 119.876953,291.613607 116.884766,298.844727 C113.892578,306.075846 115.139323,312.683594 120.625,318.667969 L120.625,318.667969 L179.720703,377.763672 C183.211589,381.254557 187.450521,383 192.4375,383 Z'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");width:11px;height:11px;background-size:cover;background-repeat:no-repeat}.arrow-down{position:absolute;right:5px;top:0}.arrow-down svg{width:8px;margin-top:5px;margin-left:5px;opacity:0.4}.cell-value-wrapper{margin-right:10px;overflow:hidden;text-overflow:ellipsis}.revo-button{position:relative;overflow:hidden;color:#fff;background-color:#6200ee;height:34px;line-height:34px;padding:0 15px;outline:0;border:0;border-radius:7px;box-sizing:border-box;cursor:pointer}.revo-button.green{background-color:#2ee072;border:1px solid #20d565}.revo-button.light{border:2px solid #cedefa;line-height:32px;background:none;color:#4876ca;box-shadow:none}.rowHeaders{z-index:2;font-size:10px;display:flex;height:100%}.rowHeaders revogr-data .rgCell{text-align:center}.rowHeaders .rgCell{padding:0 1em !important;min-width:100%}revogr-viewport-scroll{-ms-overflow-style:none;scrollbar-width:none;overflow-x:auto;overflow-y:hidden;position:relative;z-index:1;height:100%}revogr-viewport-scroll::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll.colPinStart,revogr-viewport-scroll.colPinEnd{z-index:2}revogr-viewport-scroll.rgCol{flex-grow:1}revogr-viewport-scroll .content-wrapper{overflow:hidden}revogr-viewport-scroll .inner-content-table{display:flex;flex-direction:column;max-height:100%;width:100%;min-width:100%;position:relative;z-index:0}revogr-viewport-scroll .vertical-inner{overflow-y:auto;position:relative;width:100%;flex-grow:1;-ms-overflow-style:none;scrollbar-width:none;}revogr-viewport-scroll .vertical-inner::-webkit-scrollbar{display:none;-webkit-appearance:none}revogr-viewport-scroll .vertical-inner revogr-data,revogr-viewport-scroll .vertical-inner revogr-overlay-selection{height:100%}"}},no=pe(Us,[0,"revo-grid",{rowHeaders:[4,"row-headers"],frameSize:[2,"frame-size"],rowSize:[2,"row-size"],colSize:[2,"col-size"],range:[4],readonly:[4],resize:[4],canFocus:[4,"can-focus"],useClipboard:[4,"use-clipboard"],columns:[16],source:[16],pinnedTopSource:[16],pinnedBottomSource:[16],rowDefinitions:[16],editors:[16],plugins:[16],columnTypes:[16],theme:[1537],rowClass:[513,"row-class"],autoSizeColumn:[4,"auto-size-column"],filter:[4],trimmedRows:[16],exporting:[4],grouping:[16],stretch:[8],extraElements:[32]},[[0,"internalRowDragStart","onRowDragStarted"],[0,"internalRowDragEnd","onRowDragEnd"],[0,"internalRowDrag","onRowDrag"],[0,"internalRowMouseMove","onRowMouseMove"],[0,"internalCellEdit","onBeforeEdit"],[0,"internalRangeDataApply","onBeforeRangeEdit"],[0,"internalSelectionChanged","onRangeChanged"],[0,"initialRowDropped","onRowDropped"],[0,"initialHeaderClick","onHeaderClick"],[0,"internalFocusCell","onCellFocus"]]]),so=pe(Zs,[0,"revogr-clipboard",null,[[4,"paste","onPaste"],[4,"copy","copyStarted"]]]),ao=pe(ea,[0,"revogr-data",{readonly:[4],range:[4],canDrag:[4,"can-drag"],rowClass:[1,"row-class"],rowSelectionStore:[16],viewportRow:[16],viewportCol:[16],dimensionRow:[16],colData:[16],dataStore:[16]}]),oo=pe(ga,[0,"revogr-edit",{editCell:[16],column:[16],editor:[16]}]),lo=pe(va,[0,"revogr-filter-panel",{uuid:[1537],filterTypes:[16],filterNames:[16],filterEntities:[16],changes:[32]},[[5,"mousedown","onMouseDown"]]]),co=pe(wa,[0,"revogr-focus",{selectionStore:[16],dimensionRow:[16],dimensionCol:[16]}]),ho=pe(Oa,[0,"revogr-header",{viewportCol:[16],dimensionCol:[16],selectionStore:[16],parent:[1],groups:[16],groupingDepth:[2,"grouping-depth"],canResize:[4,"can-resize"],colData:[16],columnFilter:[4,"column-filter"]}]),uo=pe(Ba,[0,"revogr-order-editor",{parent:[16],dimensionRow:[16],dimensionCol:[16],dataStore:[16]},[[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"]]]),go=pe(Za,[4,"revogr-overlay-selection",{readonly:[4],range:[4],canDrag:[4,"can-drag"],useClipboard:[4,"use-clipboard"],selectionStore:[16],dimensionRow:[16],dimensionCol:[16],dataStore:[16],colData:[16],lastCell:[16],editors:[16]},[[5,"mousemove","onMouseMove"],[5,"mouseleave","onMouseOut"],[5,"mouseup","onMouseUp"],[0,"dragStartCell","onCellDrag"],[4,"keyup","onKeyUp"],[4,"keydown","onKeyDown"]]]),fo=pe(Ka,[0,"revogr-row-headers",{height:[2],dataPorts:[16],headerProp:[16],uiid:[1],resize:[4],rowHeaderColumn:[16]}]),po=pe(eo,[0,"revogr-scroll-virtual",{dimension:[1],viewportStore:[16],dimensionStore:[16]}]),vo=pe(to,[0,"revogr-temp-range",{selectionStore:[16],dimensionRow:[16],dimensionCol:[16]}]),xo=pe(ro,[4,"revogr-viewport-scroll",{contentWidth:[2,"content-width"],contentHeight:[2,"content-height"]}]),mo=e=>{"undefined"!=typeof customElements&&[no,so,ao,oo,lo,co,ho,uo,go,fo,po,vo,xo].forEach((t=>{customElements.get(t.is)||customElements.define(t.is,t,e)}))},bo=Symbol(),yo="update:modelValue",wo=e=>{var t;return(null===(t=e)||void 0===t?void 0:t.split(" "))||[]},Co=(e,t,i=[])=>{var r;return[...Array.from((null===(r=e.value)||void 0===r?void 0:r.classList)||[]),...i].filter(((e,i,r)=>!t.has(e)&&r.indexOf(e)===i))},So=((e,[...t]=[],i={})=>{const{modelProp:r,modelUpdateEvent:s}=i,a=(0,n.defineComponent)(((t,{attrs:i,slots:a,emit:o})=>{var l;let c=t[r];const h=(0,n.ref)(),d=new Set(wo(i.class)),u=e=>{e.el&&e.el.addEventListener(s.toLowerCase(),(e=>{c=(null==e?void 0:e.target)[r],o(yo,c),o(s,e),e.stopImmediatePropagation()}))},g=(0,n.getCurrentInstance)(),f=(null===(l=null==g?void 0:g.appContext)||void 0===l?void 0:l.provides.navManager)?(0,n.inject)("navManager"):void 0;return()=>{wo(i.class).forEach((e=>{d.add(e)}));const o=t.onClick;let l={ref:h,class:Co(h,d),onClick:e=>{void 0!==o&&o(e),e.defaultPrevented||(e=>{const{routerLink:i}=t;if(!i)return;const r=Object.keys(t).filter((e=>e.startsWith("router")));if(void 0!==f){let i={event:e};r.forEach((e=>{i[e]=t[e]})),f.navigate(i)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")})(e)},onVnodeBeforeMount:s?u:void 0};for(const[e,i]of Object.entries(t))i!==bo&&(l[e]=i);return r&&(l=Object.assign(Object.assign({},l),{[r]:t.modelValue!==bo?t.modelValue:c})),(0,n.h)(e,l,a.default&&a.default())}}));a.displayName=e,t.push("routerLink"),r&&(t.push("modelValue"),a.emits=[yo,s]),a.props={};for(const e of t)a.props[e]={default:bo};return a})("revo-grid",["rowHeaders","frameSize","rowSize","colSize","range","readonly","resize","canFocus","useClipboard","columns","source","pinnedTopSource","pinnedBottomSource","rowDefinitions","editors","plugins","columnTypes","theme","rowClass","autoSizeColumn","filter","trimmedRows","exporting","grouping","stretch","beforeedit","beforerangeedit","afteredit","beforeautofill","beforeaange","roworderchanged","beforesourcesortingapply","beforesortingapply","beforesorting","rowdragstart","headerclick","beforecellfocus","beforefocuslost","beforesourceset","aftersourceset","beforecolumnsset","beforecolumnapplied","aftercolumnsset","beforefilterapply","beforefiltertrimmed","beforetrimmed","aftertrimmed","viewportscroll","beforeexport","beforeeditstart"]),ko=(e,t,i)=>{if(!t)return null;let r;(null==t?void 0:t.childNodes.length)&&(r=t.childNodes[0]),r||(r=document.createElement("span"),t.appendChild(r));let s=r._vnode;if(s)for(const e in i)s.component.props[e]=i[e];else{const t=(0,n.createVNode)(e,i);(0,n.render)(t,r)}return s};class Lo{constructor(e,t,i,r){this.VueEditorConstructor=e,this.column=t,this.save=i,this.close=r,this.element=null,this.editCell=null}componentDidRender(){}disconnectedCallback(){var e;null===(e=this.vueEl)||void 0===e||e.$destroy(),this.vueEl=void 0}render(e){return e("span",{ref:e=>{this.vueEl=ko(this.VueEditorConstructor,e,Object.assign(Object.assign({},this.editCell),{column:this.column,save:this.save,close:this.close}))}})}}let Ao=!1;const Eo=(0,n.defineAsyncComponent)((()=>new Promise((e=>(!Ao&&r&&(mo(),Ao=!0),e(So))))));let zo=!1;const Po={install(e){zo||(zo=!0,e.component("vue-data-grid",Eo))}},_o=e=>(t,i)=>t("span",{ref:t=>ko(e,t,i)}),Ro=ko,To=e=>function(t,i,r){return new Lo(e,t,i,r)},Mo=Eo},103:t=>{t.exports=e}},n={};function s(e){if(n[e])return n[e].exports;var t=n[e]={exports:{}};return r[e](t,t.exports,s),t.exports}return s.m=r,s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,i)=>(s.f[i](e,t),t)),[])),s.u=e=>e+".js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},i="VGrid:",s.l=(e,r,n,a)=>{if(t[e])t[e].push(r);else{var o,l;if(void 0!==n)for(var c=document.getElementsByTagName("script"),h=0;h<c.length;h++){var d=c[h];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==i+n){o=d;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack",i+n),o.src=e),t[e]=[r];var u=(i,r)=>{o.onerror=o.onload=null,clearTimeout(g);var n=t[e];if(delete t[e],o.parentNode&&o.parentNode.removeChild(o),n&&n.forEach((e=>e(r))),i)return i(r)},g=setTimeout(u.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),l&&document.head.appendChild(o)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");i.length&&(e=i[i.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{var e={850:0};s.f.j=(t,i)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var n=new Promise(((i,n)=>{r=e[t]=[i,n]}));i.push(r[2]=n);var a=s.p+s.u(t),o=new Error;s.l(a,(i=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var n=i&&("load"===i.type?"missing":i.type),a=i&&i.target&&i.target.src;o.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",o.name="ChunkLoadError",o.type=n,o.request=a,r[1](o)}}),"chunk-"+t,t)}};var t=(t,i)=>{for(var r,n,[a,o,l]=i,c=0,h=[];c<a.length;c++)n=a[c],s.o(e,n)&&e[n]&&h.push(e[n][0]),e[n]=0;for(r in o)s.o(o,r)&&(s.m[r]=o[r]);for(l&&l(s),t&&t(i);h.length;)h.shift()()},i=self.webpackChunkVGrid=self.webpackChunkVGrid||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})(),s(504)})()}(m(e))),w={exports:{}};
/*!
* ApexCharts v3.35.0
* (c) 2018-2022 ApexCharts
* Released under the MIT License.
*/
!function(e,t){function i(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,i){return t&&a(e.prototype,t),i&&a(e,i),e}function l(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,r=h(e);if(t){var n=h(this).constructor;i=Reflect.construct(r,arguments,n)}else i=r.apply(this,arguments);return u(this,i)}}function f(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||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 p(e,t){if(e){if("string"==typeof e)return v(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}var x=function(){function e(){s(this,e)}return o(e,[{key:"shadeRGBColor",value:function(e,t){var i=t.split(","),r=e<0?0:255,n=e<0?-1*e:e,s=parseInt(i[0].slice(4),10),a=parseInt(i[1],10),o=parseInt(i[2],10);return"rgb("+(Math.round((r-s)*n)+s)+","+(Math.round((r-a)*n)+a)+","+(Math.round((r-o)*n)+o)+")"}},{key:"shadeHexColor",value:function(e,t){var i=parseInt(t.slice(1),16),r=e<0?0:255,n=e<0?-1*e:e,s=i>>16,a=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((r-s)*n)+s)+256*(Math.round((r-a)*n)+a)+(Math.round((r-o)*n)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(t,i){return e.isColorHex(i)?this.shadeHexColor(t,i):this.shadeRGBColor(t,i)}}],[{key:"bind",value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:"isObject",value:function(e){return e&&"object"===n(e)&&!Array.isArray(e)&&null!=e}},{key:"is",value:function(e,t){return Object.prototype.toString.call(t)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var t,i=[];for(t=0;t<e.length;t++)i[t]=e[t];return i}},{key:"extend",value:function(e,t){var i=this;"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var r=arguments[i];if(null!=r)for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])}return t});var r=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach((function(n){i.isObject(t[n])&&n in e?r[n]=i.extend(e[n],t[n]):Object.assign(r,l({},n,t[n]))})),r}},{key:"extendArray",value:function(t,i){var r=[];return t.map((function(t){r.push(e.extend(i,t))})),r}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(t){if(e.is("Array",t)){for(var i=[],r=0;r<t.length;r++)i[r]=this.clone(t[r]);return i}if(e.is("Null",t))return null;if(e.is("Date",t))return t;if("object"===n(t)){var s={};for(var a in t)t.hasOwnProperty(a)&&(s[a]=this.clone(t[a]));return s}return t}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,t){return Math.pow(t,Math.floor(Math.log(e)/Math.log(t)))}},{key:"parseNumber",value:function(e){return null===e?e:parseFloat(e)}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){var t=String(e).split(/[eE]/);if(1===t.length)return t[0];var i="",r=e<0?"-":"",n=t[0].replace(".",""),s=Number(t[1])+1;if(s<0){for(i=r+"0.";s++;)i+="0";return i+n.replace(/^-/,"")}for(s-=n.length;s--;)i+="0";return n+i}},{key:"getDimensions",value:function(e){var t=getComputedStyle(e,null),i=e.clientHeight,r=e.clientWidth;return i-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),[r-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),i]}},{key:"getBoundingClientRect",value:function(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce((function(e,t){return Array.isArray(t)&&(t=t.reduce((function(e,t){return e.length>t.length?e:t}))),e.length>t.length?e:t}),0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==e.substring(0,1)&&(e="#999999");var i=e.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var r=0;r<i.length;r++)i[r]=parseInt(1===i[r].length?i[r]+i[r]:i[r],16);return void 0!==t&&i.push(t),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,t){for(var i=[],r=2*Math.PI/t,n=0;n<t;n++){var s={};s.x=e*Math.sin(n*r),s.y=-e*Math.cos(n*r),i.push(s)}return i}},{key:"polarToCartesian",value:function(e,t,i,r){var n=(r-90)*Math.PI/180;return{x:e+i*Math.cos(n),y:t+i*Math.sin(n)}}},{key:"escapeString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",i=e.toString().slice();return i.replace(/[` ~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,t)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,t,i){if(i>=e.length)for(var r=i-e.length+1;r--;)e.push(void 0);return e.splice(i,0,e.splice(t,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:"setELstyles",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e.style.key=t[i])}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%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 e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var r=e.indexOf("Edge/");return r>0&&parseInt(e.substring(r+5,e.indexOf(".",r)),10)}}]),e}(),m=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.setEasingFunctions()}return o(e,[{key:"setEasingFunctions",value:function(){var e;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":e="-";break;case"easein":e="<";break;case"easeout":e=">";break;case"easeinout":default:e="<>";break;case"swing":e=function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1};break;case"bounce":e=function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375};break;case"elastic":e=function(e){return e===!!e?e:Math.pow(2,-10*e)*Math.sin((e-.075)*(2*Math.PI)/.3)+1}}this.w.globals.easing=e}}},{key:"animateLine",value:function(e,t,i,r){e.attr(t).animate(r).attr(i)}},{key:"animateMarker",value:function(e,t,i,r,n,s){t||(t=0),e.attr({r:t,width:t,height:t}).animate(r,n).attr({r:i,width:i.width,height:i.height}).afterAll((function(){s()}))}},{key:"animateCircle",value:function(e,t,i,r,n){e.attr({r:t.r,cx:t.cx,cy:t.cy}).animate(r,n).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(e,t,i,r,n){e.attr(t).animate(r).attr(i).afterAll((function(){return n()}))}},{key:"animatePathsGradually",value:function(e){var t=e.el,i=e.realIndex,r=e.j,n=e.fill,s=e.pathFrom,a=e.pathTo,o=e.speed,l=e.delay,c=this.w,h=0;c.config.chart.animations.animateGradually.enabled&&(h=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(h=0),this.morphSVG(t,i,r,"line"!==c.config.chart.type||c.globals.comboCharts?n:"stroke",s,a,o,l*h)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(e){e.el.classList.remove("apexcharts-element-hidden")}))}},{key:"animationCompleted",value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof t.config.chart.events.animationEnd&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,i,r,n,s,a,o){var l=this,c=this.w;n||(n=e.attr("pathFrom")),s||(s=e.attr("pathTo"));var h=function(e){return"radar"===c.config.chart.type&&(a=1),"M 0 ".concat(c.globals.gridHeight)};(!n||n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n=h()),(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=h()),c.globals.shouldAnimate||(a=1),e.plot(n).animate(1,c.globals.easing,o).plot(n).animate(a,c.globals.easing,o).plot(s).afterAll((function(){x.isNumber(i)?i===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(e):"none"!==r&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(e),l.showDelayedElements()}))}}]),e}(),b=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"getDefaultFilter",value:function(e,t){var i=this.w;e.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(e,t,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addNormalFilter",value:function(e,t){var i=this.w;i.config.chart.dropShadow.enabled&&!e.node.classList.contains("apexcharts-marker")&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addLightenFilter",value:function(e,t,i){var r=this,n=this.w,s=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter((function(e){var i=n.config.chart.dropShadow;(i.enabled?r.addShadow(e,t,i):e).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:s}})})),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"addDarkenFilter",value:function(e,t,i){var r=this,n=this.w,s=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter((function(e){var i=n.config.chart.dropShadow;(i.enabled?r.addShadow(e,t,i):e).componentTransfer({rgb:{type:"linear",slope:s}})})),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"applyFilter",value:function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(e,t);break;case"lighten":this.addLightenFilter(e,t,{intensity:r});break;case"darken":this.addDarkenFilter(e,t,{intensity:r})}}},{key:"addShadow",value:function(e,t,i){var r=i.blur,n=i.top,s=i.left,a=i.color,o=i.opacity,l=e.flood(Array.isArray(a)?a[t]:a,o).composite(e.sourceAlpha,"in").offset(s,n).gaussianBlur(r).merge(e.source);return e.blend(e.source,l)}},{key:"dropShadow",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.top,n=t.left,s=t.blur,a=t.color,o=t.opacity,l=t.noUserSpaceOnUse,c=this.w;return e.unfilter(!0),x.isIE()&&"radialBar"===c.config.chart.type||(a=Array.isArray(a)?a[i]:a,e.filter((function(e){var t;t=x.isSafari()||x.isFirefox()||x.isIE()?e.flood(a,o).composite(e.sourceAlpha,"in").offset(n,r).gaussianBlur(s):e.flood(a,o).composite(e.sourceAlpha,"in").offset(n,r).gaussianBlur(s).merge(e.source),e.blend(e.source,t)})),l||e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)),e}},{key:"setSelectionFilter",value:function(e,t,i){var r=this.w;if(void 0!==r.globals.selectedDataPoints[t]&&r.globals.selectedDataPoints[t].indexOf(i)>-1){e.node.setAttribute("selected",!0);var n=r.config.states.active.filter;"none"!==n&&this.applyFilter(e,t,n.type,n.value)}}},{key:"_scaleFilterSize",value:function(e){!function(t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),e}(),y=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"drawLine",value:function(e,t,i,r){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt",l=this.w,c=l.globals.dom.Paper.line().attr({x1:e,y1:t,x2:i,y2:r,stroke:n,"stroke-dasharray":s,"stroke-width":a,"stroke-linecap":o});return c}},{key:"drawRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",a=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,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,h=this.w,d=h.globals.dom.Paper.rect();return d.attr({x:e,y:t,width:i>0?i:0,height:r>0?r:0,rx:n,ry:n,opacity:a,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":c}),d.node.setAttribute("fill",s),d}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",n=this.w,s=n.globals.dom.Paper.polygon(e).attr({fill:r,stroke:t,"stroke-width":i});return s}},{key:"drawCircle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;e<0&&(e=0);var r=i.globals.dom.Paper.circle(2*e);return null!==t&&r.attr(t),r}},{key:"drawPath",value:function(e){var t=e.d,i=void 0===t?"":t,r=e.stroke,n=void 0===r?"#a8a8a8":r,s=e.strokeWidth,a=void 0===s?1:s,o=e.fill,l=e.fillOpacity,c=void 0===l?1:l,h=e.strokeOpacity,d=void 0===h?1:h,u=e.classes,g=e.strokeLinecap,f=void 0===g?null:g,p=e.strokeDashArray,v=void 0===p?0:p,x=this.w;return null===f&&(f=x.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(x.globals.gridHeight)),x.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":c,stroke:n,"stroke-opacity":d,"stroke-linecap":f,"stroke-width":a,"stroke-dasharray":v,class:u})}},{key:"group",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=t.globals.dom.Paper.group();return null!==e&&i.attr(e),i}},{key:"move",value:function(e,t){return["M",e,t].join(" ")}},{key:"line",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null;return null===i?r=["L",e,t].join(" "):"H"===i?r=["H",e].join(" "):"V"===i&&(r=["V",t].join(" ")),r}},{key:"curve",value:function(e,t,i,r,n,s){return["C",e,t,i,r,n,s].join(" ")}},{key:"quadraticCurve",value:function(e,t,i,r){return["Q",e,t,i,r].join(" ")}},{key:"arc",value:function(e,t,i,r,n,s,a){var o=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l="A";o&&(l="a");var c=[l,e,t,i,r,n,s,a].join(" ");return c}},{key:"renderPaths",value:function(e){var t,i=e.j,n=e.realIndex,s=e.pathFrom,a=e.pathTo,o=e.stroke,l=e.strokeWidth,c=e.strokeLinecap,h=e.fill,d=e.animationDelay,u=e.initialSpeed,g=e.dataChangeSpeed,f=e.className,p=e.shouldClipToGrid,v=void 0===p||p,x=e.bindEventsOnPaths,y=void 0===x||x,w=e.drawShadow,C=void 0===w||w,S=this.w,k=new b(this.ctx),L=new m(this.ctx),A=this.w.config.chart.animations.enabled,E=A&&this.w.config.chart.animations.dynamicAnimation.enabled,z=!!(A&&!S.globals.resized||E&&S.globals.dataChanged&&S.globals.shouldAnimate);z?t=s:(t=a,S.globals.animationEnded=!0);var P,_=S.config.stroke.dashArray;P=Array.isArray(_)?_[n]:S.config.stroke.dashArray;var R=this.drawPath({d:t,stroke:o,strokeWidth:l,fill:h,fillOpacity:1,classes:f,strokeLinecap:c,strokeDashArray:P});if(R.attr("index",n),v&&R.attr({"clip-path":"url(#gridRectMask".concat(S.globals.cuid,")")}),"none"!==S.config.states.normal.filter.type)k.getDefaultFilter(R,n);else if(S.config.chart.dropShadow.enabled&&C&&(!S.config.chart.dropShadow.enabledOnSeries||S.config.chart.dropShadow.enabledOnSeries&&-1!==S.config.chart.dropShadow.enabledOnSeries.indexOf(n))){var T=S.config.chart.dropShadow;k.dropShadow(R,T,n)}y&&(R.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,R)),R.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,R)),R.node.addEventListener("mousedown",this.pathMouseDown.bind(this,R))),R.attr({pathTo:a,pathFrom:s});var M={el:R,j:i,realIndex:n,pathFrom:s,pathTo:a,fill:h,strokeWidth:l,delay:d};return!A||S.globals.resized||S.globals.dataChanged?!S.globals.resized&&S.globals.dataChanged||L.showDelayedElements():L.animatePathsGradually(r(r({},M),{},{speed:u})),S.globals.dataChanged&&E&&z&&L.animatePathsGradually(r(r({},M),{},{speed:g})),R}},{key:"drawPattern",value:function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=this.w,a=s.globals.dom.Paper.pattern(t,i,(function(s){"horizontalLines"===e?s.line(0,0,i,0).stroke({color:r,width:n+1}):"verticalLines"===e?s.line(0,0,0,t).stroke({color:r,width:n+1}):"slantedLines"===e?s.line(0,0,t,i).stroke({color:r,width:n}):"squares"===e?s.rect(t,i).fill("none").stroke({color:r,width:n}):"circles"===e&&s.circle(t).fill("none").stroke({color:r,width:n})}));return a}},{key:"drawGradient",value:function(e,t,i,r,n){var s,a=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,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,h=this.w;t.length<9&&0===t.indexOf("#")&&(t=x.hexToRgba(t,r)),i.length<9&&0===i.indexOf("#")&&(i=x.hexToRgba(i,n));var d=0,u=1,g=1,f=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,f=void 0!==o[3]?o[3]/100:null);var p=!("donut"!==h.config.chart.type&&"pie"!==h.config.chart.type&&"polarArea"!==h.config.chart.type&&"bubble"!==h.config.chart.type);if(s=null===l||0===l.length?h.globals.dom.Paper.gradient(p?"radial":"linear",(function(e){e.at(d,t,r),e.at(u,i,n),e.at(g,i,n),null!==f&&e.at(f,t,r)})):h.globals.dom.Paper.gradient(p?"radial":"linear",(function(e){(Array.isArray(l[c])?l[c]:l).forEach((function(t){e.at(t.offset/100,t.color,t.opacity)}))})),p){var v=h.globals.gridWidth/2,m=h.globals.gridHeight/2;"bubble"!==h.config.chart.type?s.attr({gradientUnits:"userSpaceOnUse",cx:v,cy:m,r:a}):s.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===e?s.from(0,0).to(0,1):"diagonal"===e?s.from(0,0).to(1,1):"horizontal"===e?s.from(0,1).to(1,1):"diagonal2"===e&&s.from(1,0).to(0,1);return s}},{key:"drawText",value:function(e){var t,i=e.x,r=e.y,n=e.text,s=e.textAnchor,a=e.fontSize,o=e.fontFamily,l=e.fontWeight,c=e.foreColor,h=e.opacity,d=e.cssClass,u=void 0===d?"":d,g=e.isPlainText,f=void 0===g||g,p=this.w;return void 0===n&&(n=""),s||(s="start"),c&&c.length||(c=p.config.chart.foreColor),o=o||p.config.chart.fontFamily,l=l||"regular",(t=Array.isArray(n)?p.globals.dom.Paper.text((function(e){for(var t=0;t<n.length;t++)0===t?e.tspan(n[t]):e.tspan(n[t]).newLine()})):f?p.globals.dom.Paper.plain(n):p.globals.dom.Paper.text((function(e){return e.tspan(n)}))).attr({x:i,y:r,"text-anchor":s,"dominant-baseline":"auto","font-size":a,"font-family":o,"font-weight":l,fill:c,class:"apexcharts-text "+u}),t.node.style.fontFamily=o,t.node.style.opacity=h,t}},{key:"drawMarker",value:function(e,t,i){e=e||0;var r=i.pSize||0,n=null;if("square"===i.shape||"rect"===i.shape){var s=void 0===i.pRadius?r/2:i.pRadius;null!==t&&r||(r=0,s=0);var a=1.2*r+s,o=this.drawRect(a,a,a,a,s);o.attr({x:e-a/2,y:t-a/2,cx:e,cy:t,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}),n=o}else"circle"!==i.shape&&i.shape||(x.isNumber(t)||(r=0,t=0),n=this.drawCircle(r,{cx:e,cy:t,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 n}},{key:"pathMouseEnter",value:function(e,t){var i=this.w,r=new b(this.ctx),n=parseInt(e.node.getAttribute("index"),10),s=parseInt(e.node.getAttribute("j"),10);if("function"==typeof i.config.chart.events.dataPointMouseEnter&&i.config.chart.events.dataPointMouseEnter(t,this.ctx,{seriesIndex:n,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("dataPointMouseEnter",[t,this.ctx,{seriesIndex:n,dataPointIndex:s,w:i}]),("none"===i.config.states.active.filter.type||"true"!==e.node.getAttribute("selected"))&&"none"!==i.config.states.hover.filter.type&&!i.globals.isTouchDevice){var a=i.config.states.hover.filter;r.applyFilter(e,n,a.type,a.value)}}},{key:"pathMouseLeave",value:function(e,t){var i=this.w,r=new b(this.ctx),n=parseInt(e.node.getAttribute("index"),10),s=parseInt(e.node.getAttribute("j"),10);"function"==typeof i.config.chart.events.dataPointMouseLeave&&i.config.chart.events.dataPointMouseLeave(t,this.ctx,{seriesIndex:n,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("dataPointMouseLeave",[t,this.ctx,{seriesIndex:n,dataPointIndex:s,w:i}]),"none"!==i.config.states.active.filter.type&&"true"===e.node.getAttribute("selected")||"none"!==i.config.states.hover.filter.type&&r.getDefaultFilter(e,n)}},{key:"pathMouseDown",value:function(e,t){var i=this.w,r=new b(this.ctx),n=parseInt(e.node.getAttribute("index"),10),s=parseInt(e.node.getAttribute("j"),10),a="false";if("true"===e.node.getAttribute("selected")){if(e.node.setAttribute("selected","false"),i.globals.selectedDataPoints[n].indexOf(s)>-1){var o=i.globals.selectedDataPoints[n].indexOf(s);i.globals.selectedDataPoints[n].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,c=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,h=function(e){Array.prototype.forEach.call(e,(function(e){e.node.setAttribute("selected","false"),r.getDefaultFilter(e,n)}))};h(l),h(c)}e.node.setAttribute("selected","true"),a="true",void 0===i.globals.selectedDataPoints[n]&&(i.globals.selectedDataPoints[n]=[]),i.globals.selectedDataPoints[n].push(s)}if("true"===a){var d=i.config.states.active.filter;"none"!==d&&r.applyFilter(e,n,d.type,d.value)}else"none"!==i.config.states.active.filter.type&&r.getDefaultFilter(e,n);"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:s,w:i}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:s,w:i}])}},{key:"rotateAroundCenter",value:function(e){var t={};return e&&"function"==typeof e.getBBox&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,i,r){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=this.w,a=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:i,foreColor:"#fff",opacity:0});r&&a.attr("transform",r),s.globals.dom.Paper.add(a);var o=a.bbox();return n||(o=a.node.getBoundingClientRect()),a.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(e,t,i){if("function"==typeof e.getComputedTextLength&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=i/1.1)){for(var r=t.length-3;r>0;r-=3)if(e.getSubStringLength(0,r)<=i/1.1)return void(e.textContent=t.substring(0,r)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}}]),e}(),w=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"getStackedSeriesTotals",value:function(){var e=this.w,t=[];if(0===e.globals.series.length)return t;for(var i=0;i<e.globals.series[e.globals.maxValsInArrayIndex].length;i++){for(var r=0,n=0;n<e.globals.series.length;n++)void 0!==e.globals.series[n][i]&&(r+=e.globals.series[n][i]);t.push(r)}return e.globals.stackedSeriesTotals=t,t}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===e?this.w.config.series.reduce((function(e,t){return e+t}),0):this.w.globals.series[e].reduce((function(e,t){return e+t}),0)}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===e?this.w.config.series.filter((function(e){return null!==e})):this.w.config.series[e].data.filter((function(e){return null!==e}))).length}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every((function(e,t,i){return e===i[0]}))}},{key:"getCategoryLabels",value:function(e){var t=this.w,i=e.slice();return t.config.xaxis.convertedCatToNumeric&&(i=e.map((function(e,i){return t.config.xaxis.labels.formatter(e-t.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map((function(e){return e.length})).indexOf(Math.max.apply(Math,e.globals.series.map((function(e){return e.length}))))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,t=0;return e.globals.markers.size.forEach((function(e){t=Math.max(t,e)})),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach((function(e){t=Math.max(t,e.size)})),t>0&&(t+=e.config.markers.hover.sizeOffset+1),e.globals.markers.largestSize=t,t}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map((function(e,t){var i=0;if(Array.isArray(e))for(var r=0;r<e.length;r++)i+=e[r];else i+=e;return i}))}},{key:"getSeriesTotalsXRange",value:function(e,t){var i=this.w;return i.globals.series.map((function(r,n){for(var s=0,a=0;a<r.length;a++)i.globals.seriesX[n][a]>e&&i.globals.seriesX[n][a]<t&&(s+=r[a]);return s}))}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map((function(t,i){var r=[];if(Array.isArray(t))for(var n=0;n<t.length;n++){var s=e.globals.stackedSeriesTotals[n],a=0;s&&(a=100*t[n]/s),r.push(a)}else{var o=100*t/e.globals.seriesTotals.reduce((function(e,t){return e+t}),0);r.push(o)}return r}))}},{key:"getCalculatedRatios",value:function(){var e,t,i,r,n=this.w.globals,s=[],a=0,o=[],l=.1,c=0;if(n.yRange=[],n.isMultipleYAxis)for(var h=0;h<n.minYArr.length;h++)n.yRange.push(Math.abs(n.minYArr[h]-n.maxYArr[h])),o.push(0);else n.yRange.push(Math.abs(n.minY-n.maxY));n.xRange=Math.abs(n.maxX-n.minX),n.zRange=Math.abs(n.maxZ-n.minZ);for(var d=0;d<n.yRange.length;d++)s.push(n.yRange[d]/n.gridHeight);if(t=n.xRange/n.gridWidth,i=Math.abs(n.initialMaxX-n.initialMinX)/n.gridWidth,e=n.yRange/n.gridWidth,r=n.xRange/n.gridHeight,(a=n.zRange/n.gridHeight*16)||(a=1),n.minY!==Number.MIN_VALUE&&0!==Math.abs(n.minY)&&(n.hasNegs=!0),n.isMultipleYAxis){o=[];for(var u=0;u<s.length;u++)o.push(-n.minYArr[u]/s[u])}else o.push(-n.minY/s[0]),n.minY!==Number.MIN_VALUE&&0!==Math.abs(n.minY)&&(l=-n.minY/e,c=n.minX/t);return{yRatio:s,invertedYRatio:e,zRatio:a,xRatio:t,initialXRatio:i,invertedXRatio:r,baseLineInvertedY:l,baseLineY:o,baseLineX:c}}},{key:"getLogSeries",value:function(e){var t=this,i=this.w;return i.globals.seriesLog=e.map((function(e,r){return i.config.yaxis[r]&&i.config.yaxis[r].logarithmic?e.map((function(e){return null===e?null:t.getLogVal(i.config.yaxis[r].logBase,e,r)})):e})),i.globals.invalidLogScale?e:i.globals.seriesLog}},{key:"getBaseLog",value:function(e,t){return Math.log(t)/Math.log(e)}},{key:"getLogVal",value:function(e,t,i){if(0===t)return 0;var r=this.w,n=0===r.globals.minYArr[i]?-1:this.getBaseLog(e,r.globals.minYArr[i]),s=(0===r.globals.maxYArr[i]?0:this.getBaseLog(e,r.globals.maxYArr[i]))-n;return t<1?t/s:(this.getBaseLog(e,t)-n)/s}},{key:"getLogYRatios",value:function(e){var t=this,i=this.w,r=this.w.globals;return r.yLogRatio=e.slice(),r.logYRange=r.yRange.map((function(e,n){if(i.config.yaxis[n]&&t.w.config.yaxis[n].logarithmic){var s,a=-Number.MAX_VALUE,o=Number.MIN_VALUE;return r.seriesLog.forEach((function(e,t){e.forEach((function(e){i.config.yaxis[t]&&i.config.yaxis[t].logarithmic&&(a=Math.max(e,a),o=Math.min(e,o))}))})),s=Math.pow(r.yRange[n],Math.abs(o-a)/r.yRange[n]),r.yLogRatio[n]=s/r.gridHeight,s}})),r.invalidLogScale?e.slice():r.yLogRatio}}],[{key:"checkComboSeries",value:function(e){var t=!1,i=0,r=0;return e.length&&void 0!==e[0].type&&e.forEach((function(e){"bar"!==e.type&&"column"!==e.type&&"candlestick"!==e.type&&"boxPlot"!==e.type||i++,void 0!==e.type&&r++})),r>0&&(t=!0),{comboBarCount:i,comboCharts:t}}},{key:"extendArrayProps",value:function(e,t,i){return t.yaxis&&(t=e.extendYAxis(t,i)),t.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),t.annotations.xaxis&&(t=e.extendXAxisAnnotations(t)),t.annotations.points&&(t=e.extendPointAnnotations(t))),t}}]),e}(),C=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t}return o(e,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===e.label.orientation){var r=null!==t?t:0,n=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(r,"']"));if(null!==n){var s=n.getBoundingClientRect();n.setAttribute("x",parseFloat(n.getAttribute("x"))-s.height+4),"top"===e.label.position?n.setAttribute("y",parseFloat(n.getAttribute("y"))+s.width):n.setAttribute("y",parseFloat(n.getAttribute("y"))-s.width);var a=this.annoCtx.graphics.rotateAroundCenter(n),o=a.x,l=a.y;n.setAttribute("transform","rotate(-90 ".concat(o," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var i=this.w;if(!e||void 0===t.label.text||void 0!==t.label.text&&!String(t.label.text).trim())return null;var r=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.label.style.padding.left,a=t.label.style.padding.right,o=t.label.style.padding.top,l=t.label.style.padding.bottom;"vertical"===t.label.orientation&&(o=t.label.style.padding.left,l=t.label.style.padding.right,s=t.label.style.padding.top,a=t.label.style.padding.bottom);var c=n.left-r.left-s,h=n.top-r.top-o,d=this.annoCtx.graphics.drawRect(c-i.globals.barPadForNumericAxis,h,n.width+s+a,n.height+o+l,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&d.node.classList.add(t.id),d}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,i=function(i,r,n){var s=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(r,"']"));if(s){var a=s.parentNode,o=e.addBackgroundToAnno(s,i);o&&(a.insertBefore(o.node,s),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(e,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(e,i)))}};t.config.annotations.xaxis.map((function(e,t){i(e,t,"xaxis")})),t.config.annotations.yaxis.map((function(e,t){i(e,t,"yaxis")})),t.config.annotations.points.map((function(e,t){i(e,t,"point")}))}},{key:"getY1Y2",value:function(e,t){var i,r="y1"===e?t.y:t.y2,n=this.w;if(this.annoCtx.invertAxis){var s=n.globals.labels.indexOf(r);n.config.xaxis.convertedCatToNumeric&&(s=n.globals.categoryLabels.indexOf(r));var a=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(s+1)+")");a&&(i=parseFloat(a.getAttribute("y")))}else{var o;o=n.config.yaxis[t.yAxisIndex].logarithmic?(r=new w(this.annoCtx.ctx).getLogVal(r,t.yAxisIndex))/n.globals.yLogRatio[t.yAxisIndex]:(r-n.globals.minYArr[t.yAxisIndex])/(n.globals.yRange[t.yAxisIndex]/n.globals.gridHeight),i=n.globals.gridHeight-o,n.config.yaxis[t.yAxisIndex]&&n.config.yaxis[t.yAxisIndex].reversed&&(i=o)}return i}},{key:"getX1X2",value:function(e,t){var i=this.w,r=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,n=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,s=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,a=(t.x-r)/(s/i.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(a=(n-t.x)/(s/i.globals.gridWidth)),"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||(a=this.getStringX(t.x));var o=(t.x2-r)/(s/i.globals.gridWidth);return this.annoCtx.inversedReversedAxis&&(o=(n-t.x2)/(s/i.globals.gridWidth)),"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||(o=this.getStringX(t.x2)),"x1"===e?a:o}},{key:"getStringX",value:function(e){var t=this.w,i=e;t.config.xaxis.convertedCatToNumeric&&t.globals.categoryLabels.length&&(e=t.globals.categoryLabels.indexOf(e)+1);var r=t.globals.labels.indexOf(e),n=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(r+1)+")");return n&&(i=parseFloat(n.getAttribute("x"))),i}}]),e}(),S=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new C(this.annoCtx)}return o(e,[{key:"addXaxisAnnotation",value:function(e,t,i){var r,n=this.w,s=this.helpers.getX1X2("x1",e),a=e.label.text,o=e.strokeDashArray;if(x.isNumber(s)){if(null===e.x2||void 0===e.x2){var l=this.annoCtx.graphics.drawLine(s+e.offsetX,0+e.offsetY,s+e.offsetX,n.globals.gridHeight+e.offsetY,e.borderColor,o,e.borderWidth);t.appendChild(l.node),e.id&&l.node.classList.add(e.id)}else{if((r=this.helpers.getX1X2("x2",e))<s){var c=s;s=r,r=c}var h=this.annoCtx.graphics.drawRect(s+e.offsetX,0+e.offsetY,r-s,n.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,o);h.node.classList.add("apexcharts-annotation-rect"),h.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),t.appendChild(h.node),e.id&&h.node.classList.add(e.id)}var d="top"===e.label.position?4:n.globals.gridHeight,u=this.annoCtx.graphics.getTextRects(a,parseFloat(e.label.style.fontSize)),g=this.annoCtx.graphics.drawText({x:s+e.label.offsetX,y:d+e.label.offsetY-("vertical"===e.label.orientation?"top"===e.label.position?u.width/2-12:-u.width/2:0),text:a,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});g.attr({rel:i}),t.appendChild(g.node),this.annoCtx.helpers.setOrientations(e,i)}}},{key:"drawXAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map((function(t,r){e.addXaxisAnnotation(t,i.node,r)})),i}}]),e}(),k=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t,this.helpers=new C(this.annoCtx)}return o(e,[{key:"addYaxisAnnotation",value:function(e,t,i){var r,n=this.w,s=e.strokeDashArray,a=this.helpers.getY1Y2("y1",e),o=e.label.text;if(null===e.y2||void 0===e.y2){var l=this.annoCtx.graphics.drawLine(0+e.offsetX,a+e.offsetY,this._getYAxisAnnotationWidth(e),a+e.offsetY,e.borderColor,s,e.borderWidth);t.appendChild(l.node),e.id&&l.node.classList.add(e.id)}else{if((r=this.helpers.getY1Y2("y2",e))>a){var c=a;a=r,r=c}var h=this.annoCtx.graphics.drawRect(0+e.offsetX,r+e.offsetY,this._getYAxisAnnotationWidth(e),a-r,0,e.fillColor,e.opacity,1,e.borderColor,s);h.node.classList.add("apexcharts-annotation-rect"),h.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),t.appendChild(h.node),e.id&&h.node.classList.add(e.id)}var d="right"===e.label.position?n.globals.gridWidth:0,u=this.annoCtx.graphics.drawText({x:d+e.label.offsetX,y:(null!=r?r:a)+e.label.offsetY-3,text:o,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});u.attr({rel:i}),t.appendChild(u.node)}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return t.globals.gridWidth,(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.map((function(t,r){e.addYaxisAnnotation(t,i.node,r)})),i}}]),e}(),L=function(){function e(t){s(this,e),this.w=t.w,this.annoCtx=t,this.helpers=new C(this.annoCtx)}return o(e,[{key:"addPointAnnotation",value:function(e,t,i){this.w;var r=this.helpers.getX1X2("x1",e),n=this.helpers.getY1Y2("y1",e);if(x.isNumber(r)){var s={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},a=this.annoCtx.graphics.drawMarker(r+e.marker.offsetX,n+e.marker.offsetY,s);t.appendChild(a.node);var o=e.label.text?e.label.text:"",l=this.annoCtx.graphics.drawText({x:r+e.label.offsetX,y:n+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:o,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(l.attr({rel:i}),t.appendChild(l.node),e.customSVG.SVG){var c=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});c.attr({transform:"translate(".concat(r+e.customSVG.offsetX,", ").concat(n+e.customSVG.offsetY,")")}),c.node.innerHTML=e.customSVG.SVG,t.appendChild(c.node)}if(e.image.path){var h=e.image.width?e.image.width:20,d=e.image.height?e.image.height:20;a=this.annoCtx.addImage({x:r+e.image.offsetX-h/2,y:n+e.image.offsetY-d/2,width:h,height:d,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&a.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&a.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e))}}},{key:"drawPointAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map((function(t,r){e.addPointAnnotation(t,i.node,r)})),i}}]),e}(),A={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"}}},E=function(){function e(){s(this,e),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(e,[{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:[A],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(e){return new Date(e).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(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce((function(e,t){return e+t}),0)/e.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(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce((function(e,t){return e+t}),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(e){return null!==e?e:""},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(e){return e?e+": ":""}}},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}}}}}]),e}(),z=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.graphics=new y(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new C(this),this.xAxisAnnotations=new S(this),this.yAxisAnnotations=new k(this),this.pointsAnnotations=new L(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(e,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),r=this.pointsAnnotations.drawPointAnnotations(),n=e.config.chart.animations.enabled,s=[t,i,r],a=[i.node,t.node,r.node],o=0;o<3;o++)e.globals.dom.elGraphical.add(s[o]),!n||e.globals.resized||e.globals.dataChanged||"scatter"!==e.config.chart.type&&"bubble"!==e.config.chart.type&&e.globals.dataPoints>1&&a[o].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:a[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map((function(t,i){e.addImage(t,i)}))}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map((function(t,i){e.addText(t,i)}))}},{key:"addXaxisAnnotation",value:function(e,t,i){this.xAxisAnnotations.addXaxisAnnotation(e,t,i)}},{key:"addYaxisAnnotation",value:function(e,t,i){this.yAxisAnnotations.addYaxisAnnotation(e,t,i)}},{key:"addPointAnnotation",value:function(e,t,i){this.pointsAnnotations.addPointAnnotation(e,t,i)}},{key:"addText",value:function(e,t){var i=e.x,r=e.y,n=e.text,s=e.textAnchor,a=e.foreColor,o=e.fontSize,l=e.fontFamily,c=e.fontWeight,h=e.cssClass,d=e.backgroundColor,u=e.borderWidth,g=e.strokeDashArray,f=e.borderRadius,p=e.borderColor,v=e.appendTo,x=void 0===v?".apexcharts-annotations":v,m=e.paddingLeft,b=void 0===m?4:m,y=e.paddingRight,w=void 0===y?4:y,C=e.paddingBottom,S=void 0===C?2:C,k=e.paddingTop,L=void 0===k?2:k,A=this.w,E=this.graphics.drawText({x:i,y:r,text:n,textAnchor:s||"start",fontSize:o||"12px",fontWeight:c||"regular",fontFamily:l||A.config.chart.fontFamily,foreColor:a||A.config.chart.foreColor,cssClass:h}),z=A.globals.dom.baseEl.querySelector(x);z&&z.appendChild(E.node);var P=E.bbox();if(n){var _=this.graphics.drawRect(P.x-b,P.y-L,P.width+b+w,P.height+S+L,f,d||"transparent",1,u,p,g);z.insertBefore(_.node,E.node)}}},{key:"addImage",value:function(e,t){var i=this.w,r=e.path,n=e.x,s=void 0===n?0:n,a=e.y,o=void 0===a?0:a,l=e.width,c=void 0===l?20:l,h=e.height,d=void 0===h?20:h,u=e.appendTo,g=void 0===u?".apexcharts-annotations":u,f=i.globals.dom.Paper.image(r);f.size(c,d).move(s,o);var p=i.globals.dom.baseEl.querySelector(g);return p&&p.appendChild(f.node),f}},{key:"addXaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(e,t,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(e){var t=e.params,i=e.pushToMemory,r=e.context,n=e.type,s=e.contextMethod,a=r,o=a.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations")),c=l.childNodes.length+1,h=new E,d=Object.assign({},"xaxis"===n?h.xAxisAnnotation:"yaxis"===n?h.yAxisAnnotation:h.pointAnnotation),u=x.extend(d,t);switch(n){case"xaxis":this.addXaxisAnnotation(u,l,c);break;case"yaxis":this.addYaxisAnnotation(u,l,c);break;case"point":this.addPointAnnotation(u,l,c)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(c,"']")),f=this.helpers.addBackgroundToAnno(g,u);return f&&l.insertBefore(f.node,g),i&&o.globals.memory.methodsToExec.push({context:a,id:u.id?u.id:x.randomId(),method:s,label:"addAnnotation",params:t}),r}},{key:"clearAnnotations",value:function(e){var t=e.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");t.globals.memory.methodsToExec.map((function(e,i){"addText"!==e.label&&"addAnnotation"!==e.label||t.globals.memory.methodsToExec.splice(i,1)})),i=x.listToArray(i),Array.prototype.forEach.call(i,(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}))}},{key:"removeAnnotation",value:function(e,t){var i=e.w,r=i.globals.dom.baseEl.querySelectorAll(".".concat(t));r&&(i.globals.memory.methodsToExec.map((function(e,r){e.id===t&&i.globals.memory.methodsToExec.splice(r,1)})),Array.prototype.forEach.call(r,(function(e){e.parentElement.removeChild(e)})))}}]),e}(),P=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.opts=null,this.seriesIndex=0}return o(e,[{key:"clippedImgArea",value:function(e){var t=this.w,i=t.config,r=parseInt(t.globals.gridWidth,10),n=parseInt(t.globals.gridHeight,10),s=r>n?r:n,a=e.image,o=0,l=0;void 0===e.width&&void 0===e.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=s+1,l=s):(o=e.width,l=e.height);var c=document.createElementNS(t.globals.SVGNS,"pattern");y.setAttrs(c,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var h=document.createElementNS(t.globals.SVGNS,"image");c.appendChild(h),h.setAttributeNS(window.SVG.xlink,"href",a),y.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),h.style.opacity=e.opacity,t.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(e){var t=this.w;return("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||"heatmap"===t.config.chart.type||"treemap"===t.config.chart.type?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var i,r,n,s=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var a=this.getFillColors()[this.seriesIndex];void 0!==t.globals.seriesColors[this.seriesIndex]&&(a=t.globals.seriesColors[this.seriesIndex]),"function"==typeof a&&(a=a({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));var o=this.getFillType(this.seriesIndex),l=Array.isArray(s.fill.opacity)?s.fill.opacity[this.seriesIndex]:s.fill.opacity;e.color&&(a=e.color);var c=a;if(-1===a.indexOf("rgb")?a.length<9&&(c=x.hexToRgba(a,l)):a.indexOf("rgba")>-1&&(l=x.getOpacityFromRGBA(a)),e.opacity&&(l=e.opacity),"pattern"===o&&(r=this.handlePatternFill(r,a,l,c)),"gradient"===o&&(n=this.handleGradientFill(a,l,this.seriesIndex)),"image"===o){var h=s.fill.image.src,d=e.patternID?e.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(h)?e.seriesNumber<h.length?h[e.seriesNumber]:h[0]:h,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:"pattern".concat(t.globals.cuid).concat(e.seriesNumber+1).concat(d)}),i="url(#pattern".concat(t.globals.cuid).concat(e.seriesNumber+1).concat(d,")")}else i="gradient"===o?n:"pattern"===o?r:c;return e.solid&&(i=c),i}},{key:"getFillType",value:function(e){var t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,t=e.config,i=this.opts,r=[];return e.globals.comboCharts?"line"===e.config.series[this.seriesIndex].type?Array.isArray(e.globals.stroke.colors)?r=e.globals.stroke.colors:r.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?r=e.globals.fill.colors:r.push(e.globals.fill.colors):"line"===t.chart.type?Array.isArray(e.globals.stroke.colors)?r=e.globals.stroke.colors:r.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?r=e.globals.fill.colors:r.push(e.globals.fill.colors),void 0!==i.fillColors&&(r=[],Array.isArray(i.fillColors)?r=i.fillColors.slice():r.push(i.fillColors)),r}},{key:"handlePatternFill",value:function(e,t,i,r){var n=this.w.config,s=this.opts,a=new y(this.ctx),o=void 0===n.fill.pattern.strokeWidth?Array.isArray(n.stroke.width)?n.stroke.width[this.seriesIndex]:n.stroke.width:Array.isArray(n.fill.pattern.strokeWidth)?n.fill.pattern.strokeWidth[this.seriesIndex]:n.fill.pattern.strokeWidth,l=t;return Array.isArray(n.fill.pattern.style)?void 0!==n.fill.pattern.style[s.seriesNumber]?a.drawPattern(n.fill.pattern.style[s.seriesNumber],n.fill.pattern.width,n.fill.pattern.height,l,o,i):r:a.drawPattern(n.fill.pattern.style,n.fill.pattern.width,n.fill.pattern.height,l,o,i)}},{key:"handleGradientFill",value:function(e,t,i){var r,n=this.w.config,s=this.opts,a=new y(this.ctx),o=new x,l=n.fill.gradient.type,c=e,h=void 0===n.fill.gradient.opacityFrom?t:Array.isArray(n.fill.gradient.opacityFrom)?n.fill.gradient.opacityFrom[i]:n.fill.gradient.opacityFrom;c.indexOf("rgba")>-1&&(h=x.getOpacityFromRGBA(c));var d=void 0===n.fill.gradient.opacityTo?t:Array.isArray(n.fill.gradient.opacityTo)?n.fill.gradient.opacityTo[i]:n.fill.gradient.opacityTo;if(void 0===n.fill.gradient.gradientToColors||0===n.fill.gradient.gradientToColors.length)r="dark"===n.fill.gradient.shade?o.shadeColor(-1*parseFloat(n.fill.gradient.shadeIntensity),e.indexOf("rgb")>-1?x.rgb2hex(e):e):o.shadeColor(parseFloat(n.fill.gradient.shadeIntensity),e.indexOf("rgb")>-1?x.rgb2hex(e):e);else if(n.fill.gradient.gradientToColors[s.seriesNumber]){var u=n.fill.gradient.gradientToColors[s.seriesNumber];r=u,u.indexOf("rgba")>-1&&(d=x.getOpacityFromRGBA(u))}else r=e;if(n.fill.gradient.inverseColors){var g=c;c=r,r=g}return c.indexOf("rgb")>-1&&(c=x.rgb2hex(c)),r.indexOf("rgb")>-1&&(r=x.rgb2hex(r)),a.drawGradient(l,c,r,h,d,s.size,n.fill.gradient.stops,n.fill.gradient.colorStops,i)}}]),e}(),_=function(){function e(t,i){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.globals.series.length+1)for(var t=0;t<=e.globals.series.length;t++)void 0===e.globals.markers.size[t]&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map((function(t){return e.config.markers.size}))}},{key:"plotChartMarkers",value:function(e,t,i,r){var n,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=this.w,o=t,l=e,c=null,h=new y(this.ctx),d=a.config.markers.discrete&&a.config.markers.discrete.length;if((a.globals.markers.size[t]>0||s||d)&&(c=h.group({class:s||d?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(l.x))for(var u=0;u<l.x.length;u++){var g=i;1===i&&0===u&&(g=0),1===i&&1===u&&(g=1);var f="apexcharts-marker";"line"!==a.config.chart.type&&"area"!==a.config.chart.type||a.globals.comboCharts||a.config.tooltip.intersect||(f+=" no-pointer-events");var p=Array.isArray(a.config.markers.size)?a.globals.markers.size[t]>0:a.config.markers.size>0;if(p||s||d){x.isNumber(l.y[u])?f+=" w".concat(x.randomId()):f="apexcharts-nullpoint";var v=this.getMarkerConfig({cssClass:f,seriesIndex:t,dataPointIndex:g});a.config.series[o].data[g]&&(a.config.series[o].data[g].fillColor&&(v.pointFillColor=a.config.series[o].data[g].fillColor),a.config.series[o].data[g].strokeColor&&(v.pointStrokeColor=a.config.series[o].data[g].strokeColor)),r&&(v.pSize=r),(n=h.drawMarker(l.x[u],l.y[u],v)).attr("rel",g),n.attr("j",g),n.attr("index",t),n.node.setAttribute("default-marker-size",v.pSize);var m=new b(this.ctx);m.setSelectionFilter(n,t,g),this.addEvents(n),c&&c.add(n)}else void 0===a.globals.pointsArray[t]&&(a.globals.pointsArray[t]=[]),a.globals.pointsArray[t].push([l.x[u],l.y[u]])}return c}},{key:"getMarkerConfig",value:function(e){var t=e.cssClass,i=e.seriesIndex,r=e.dataPointIndex,n=void 0===r?null:r,s=e.finishRadius,a=void 0===s?null:s,o=this.w,l=this.getMarkerStyle(i),c=o.globals.markers.size[i],h=o.config.markers;return null!==n&&h.discrete.length&&h.discrete.map((function(e){e.seriesIndex===i&&e.dataPointIndex===n&&(l.pointStrokeColor=e.strokeColor,l.pointFillColor=e.fillColor,c=e.size,l.pointShape=e.shape)})),{pSize:null===a?c:a,pRadius:h.radius,width:Array.isArray(h.width)?h.width[i]:h.width,height:Array.isArray(h.height)?h.height[i]:h.height,pointStrokeWidth:Array.isArray(h.strokeWidth)?h.strokeWidth[i]:h.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(h.shape)?h.shape[i]:h.shape),class:t,pointStrokeOpacity:Array.isArray(h.strokeOpacity)?h.strokeOpacity[i]:h.strokeOpacity,pointStrokeDashArray:Array.isArray(h.strokeDashArray)?h.strokeDashArray[i]:h.strokeDashArray,pointFillOpacity:Array.isArray(h.fillOpacity)?h.fillOpacity[i]:h.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(e){var t=this.w,i=new y(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var t=this.w,i=t.globals.markers.colors,r=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(r)?r[e]:r,pointFillColor:Array.isArray(i)?i[e]:i}}}]),e}(),R=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return o(e,[{key:"draw",value:function(e,t,i){var r=this.w,n=new y(this.ctx),s=i.realIndex,a=i.pointsPos,o=i.zRatio,l=i.elParent,c=n.group({class:"apexcharts-series-markers apexcharts-series-".concat(r.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),Array.isArray(a.x))for(var h=0;h<a.x.length;h++){var d=t+1,u=!0;0===t&&0===h&&(d=0),0===t&&1===h&&(d=1);var g=0,f=r.globals.markers.size[s];if(o!==1/0){f=r.globals.seriesZ[s][d]/o;var p=r.config.plotOptions.bubble;p.minBubbleRadius&&f<p.minBubbleRadius&&(f=p.minBubbleRadius),p.maxBubbleRadius&&f>p.maxBubbleRadius&&(f=p.maxBubbleRadius)}r.config.chart.animations.enabled||(g=f);var v=a.x[h],x=a.y[h];if(g=g||0,null!==x&&void 0!==r.globals.series[s][d]||(u=!1),u){var m=this.drawPoint(v,x,g,f,s,d,t);c.add(m)}l.add(c)}}},{key:"drawPoint",value:function(e,t,i,r,n,s,a){var o=this.w,l=n,c=new m(this.ctx),h=new b(this.ctx),d=new P(this.ctx),u=new _(this.ctx),g=new y(this.ctx),f=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:s,finishRadius:"bubble"===o.config.chart.type||o.globals.comboCharts&&o.config.series[n]&&"bubble"===o.config.series[n].type?r:null});r=f.pSize;var p,v=d.fillPath({seriesNumber:n,dataPointIndex:s,color:f.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[n][a]});if("circle"===f.shape?p=g.drawCircle(i):"square"!==f.shape&&"rect"!==f.shape||(p=g.drawRect(0,0,f.width-f.pointStrokeWidth/2,f.height-f.pointStrokeWidth/2,f.pRadius)),o.config.series[l].data[s]&&o.config.series[l].data[s].fillColor&&(v=o.config.series[l].data[s].fillColor),p.attr({x:e-f.width/2-f.pointStrokeWidth/2,y:t-f.height/2-f.pointStrokeWidth/2,cx:e,cy:t,fill:v,"fill-opacity":f.pointFillOpacity,stroke:f.pointStrokeColor,r:r,"stroke-width":f.pointStrokeWidth,"stroke-dasharray":f.pointStrokeDashArray,"stroke-opacity":f.pointStrokeOpacity}),o.config.chart.dropShadow.enabled){var x=o.config.chart.dropShadow;h.dropShadow(p,x,n)}if(!this.initialAnim||o.globals.dataChanged||o.globals.resized)o.globals.animationEnded=!0;else{var w=o.config.chart.animations.speed;c.animateMarker(p,0,"circle"===f.shape?r:{width:f.width,height:f.height},w,o.globals.easing,(function(){window.setTimeout((function(){c.animationCompleted(p)}),100)}))}if(o.globals.dataChanged&&"circle"===f.shape)if(this.dynamicAnim){var C,S,k,L,A=o.config.chart.animations.dynamicAnimation.speed;null!=(L=o.globals.previousPaths[n]&&o.globals.previousPaths[n][a])&&(C=L.x,S=L.y,k=void 0!==L.r?L.r:r);for(var E=0;E<o.globals.collapsedSeries.length;E++)o.globals.collapsedSeries[E].index===n&&(A=1,r=0);0===e&&0===t&&(r=0),c.animateCircle(p,{cx:C,cy:S,r:k},{cx:e,cy:t,r:r},A,o.globals.easing)}else p.attr({r:r});return p.attr({rel:s,j:s,index:n,"default-marker-size":r}),h.setSelectionFilter(p,n,s),u.addEvents(p),p.node.classList.add("apexcharts-marker"),p}},{key:"centerTextInBubble",value:function(e){var t=this.w;return{y:e+=parseInt(t.config.dataLabels.style.fontSize,10)/4}}}]),e}(),T=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"dataLabelsCorrection",value:function(e,t,i,r,n,s,a){var o=this.w,l=!1,c=new y(this.ctx).getTextRects(i,a),h=c.width,d=c.height;t<0&&(t=0),t>o.globals.gridHeight+d&&(t=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[r]&&(o.globals.dataLabelsRects[r]=[]),o.globals.dataLabelsRects[r].push({x:e,y:t,width:h,height:d});var u=o.globals.dataLabelsRects[r].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[r]?o.globals.lastDrawnDataLabelsIndexes[r][o.globals.lastDrawnDataLabelsIndexes[r].length-1]:0;if(void 0!==o.globals.dataLabelsRects[r][u]){var f=o.globals.dataLabelsRects[r][g];(e>f.x+f.width+2||t>f.y+f.height+2||e+h<f.x)&&(l=!0)}return(0===n||s)&&(l=!0),{x:e,y:t,textRects:c,drawnextLabel:l}}},{key:"drawDataLabel",value:function(e,t,i){var r=this,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,s=this.w,a=new y(this.ctx),o=s.config.dataLabels,l=0,c=0,h=i,d=null;if(!o.enabled||!Array.isArray(e.x))return d;d=a.group({class:"apexcharts-data-labels"});for(var u=0;u<e.x.length;u++)if(l=e.x[u]+o.offsetX,c=e.y[u]+o.offsetY+n,!isNaN(l)){1===i&&0===u&&(h=0),1===i&&1===u&&(h=1);var g=s.globals.series[t][h],f="",p=function(e){return s.config.dataLabels.formatter(e,{ctx:r.ctx,seriesIndex:t,dataPointIndex:h,w:s})};if("bubble"===s.config.chart.type){f=p(g=s.globals.seriesZ[t][h]),c=e.y[u];var v=new R(this.ctx),x=v.centerTextInBubble(c,t,h);c=x.y}else void 0!==g&&(f=p(g));this.plotDataLabelsText({x:l,y:c,text:f,i:t,j:h,parent:d,offsetCorrection:!0,dataLabelsConfig:s.config.dataLabels})}return d}},{key:"plotDataLabelsText",value:function(e){var t=this.w,i=new y(this.ctx),r=e.x,n=e.y,s=e.i,a=e.j,o=e.text,l=e.textAnchor,c=e.fontSize,h=e.parent,d=e.dataLabelsConfig,u=e.color,g=e.alwaysDrawDataLabel,f=e.offsetCorrection;if(!(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(s)<0)){var p={x:r,y:n,drawnextLabel:!0,textRects:null};f&&(p=this.dataLabelsCorrection(r,n,o,s,a,g,parseInt(d.style.fontSize,10))),t.globals.zoomed||(r=p.x,n=p.y),p.textRects&&(r<-10-p.textRects.width||r>t.globals.gridWidth+p.textRects.width+10)&&(o="");var v=t.globals.dataLabels.style.colors[s];(("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(v=t.globals.dataLabels.style.colors[a]),"function"==typeof v&&(v=v({series:t.globals.series,seriesIndex:s,dataPointIndex:a,w:t})),u&&(v=u);var x=d.offsetX,m=d.offsetY;if("bar"!==t.config.chart.type&&"rangeBar"!==t.config.chart.type||(x=0,m=0),p.drawnextLabel){var w=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:r+x,y:n+m,foreColor:v,textAnchor:l||d.textAnchor,text:o,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"});if(w.attr({class:"apexcharts-datalabel",cx:r,cy:n}),d.dropShadow.enabled){var C=d.dropShadow;new b(this.ctx).dropShadow(w,C)}h.add(w),void 0===t.globals.lastDrawnDataLabelsIndexes[s]&&(t.globals.lastDrawnDataLabelsIndexes[s]=[]),t.globals.lastDrawnDataLabelsIndexes[s].push(a)}}}},{key:"addBackgroundToDataLabel",value:function(e,t){var i=this.w,r=i.config.dataLabels.background,n=r.padding,s=r.padding/2,a=t.width,o=t.height,l=new y(this.ctx).drawRect(t.x-n,t.y-s/2,a+2*n,o+s,r.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,r.opacity,r.borderWidth,r.borderColor);return r.dropShadow.enabled&&new b(this.ctx).dropShadow(l,r.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var e=this.w;if("bubble"!==e.config.chart.type)for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i<t.length;i++){var r=t[i],n=r.getBBox(),s=null;if(n.width&&n.height&&(s=this.addBackgroundToDataLabel(r,n)),s){r.parentNode.insertBefore(s.node,r);var a=r.getAttribute("fill");!e.config.chart.animations.enabled||e.globals.resized||e.globals.dataChanged?s.attr({fill:a}):s.animate().attr({fill:a}),r.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),r=0;r<t.length;r++)i&&i.insertBefore(t[r],i.nextSibling)}}]),e}(),M=function(){function e(t){s(this,e),this.w=t.w,this.barCtx=t}return o(e,[{key:"handleBarDataLabels",value:function(e){var t=e.x,i=e.y,r=e.y1,n=e.y2,s=e.i,a=e.j,o=e.realIndex,l=e.series,c=e.barHeight,h=e.barWidth,d=e.barYPosition,u=e.visibleSeries,g=e.renderedPath,f=this.w,p=new y(this.barCtx.ctx),v=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[o]:this.barCtx.strokeWidth,x=t+parseFloat(h*u),m=i+parseFloat(c*u);f.globals.isXNumeric&&!f.globals.isBarHorizontal&&(x=t+parseFloat(h*(u+1)),m=i+parseFloat(c*(u+1))-v);var b,w=t,C=i,S=f.config.dataLabels,k=this.barCtx.barOptions.dataLabels;void 0!==d&&this.barCtx.isRangeBar&&(m=d,C=d);var L=S.offsetX,A=S.offsetY,E={width:0,height:0};if(f.config.dataLabels.enabled){var z=this.barCtx.series[s][a];E=p.getTextRects(f.globals.yLabelFormatters[0](z),parseFloat(S.style.fontSize))}var P={x:t,y:i,i:s,j:a,renderedPath:g,bcx:x,bcy:m,barHeight:c,barWidth:h,textRects:E,strokeWidth:v,dataLabelsX:w,dataLabelsY:C,barDataLabelsConfig:k,offX:L,offY:A};return b=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(P):this.calculateColumnsDataLabelsPosition(P),g.attr({cy:b.bcy,cx:b.bcx,j:a,val:l[s][a],barHeight:c,barWidth:h}),this.drawCalculatedDataLabels({x:b.dataLabelsX,y:b.dataLabelsY,val:this.barCtx.isRangeBar?[r,n]:l[s][a],i:o,j:a,barWidth:h,barHeight:c,textRects:E,dataLabelsConfig:S})}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var t,i=this.w,r=e.i,n=e.j,s=e.y,a=e.bcx,o=e.barWidth,l=e.barHeight,c=e.textRects,h=e.dataLabelsY,d=e.barDataLabelsConfig,u=e.strokeWidth,g=e.offX,f=e.offY;l=Math.abs(l);var p="vertical"===i.config.plotOptions.bar.dataLabels.orientation;a-=u/2;var v=i.globals.gridWidth/i.globals.dataPoints;t=i.globals.isXNumeric?a-o/2+g:a-v+o/2+g,p&&(t=t+c.height/2-u/2-2);var x=this.barCtx.series[r][n]<0,m=s;switch(this.barCtx.isReversed&&(m=s-l+(x?2*l:0),s-=l),d.position){case"center":h=p?x?m+l/2+f:m+l/2-f:x?m-l/2+c.height/2+f:m+l/2+c.height/2-f;break;case"bottom":h=p?x?m+l+f:m+l-f:x?m-l+c.height+u+f:m+l-c.height/2+u-f;break;case"top":h=p?x?m+f:m-f:x?m-c.height/2-f:m+c.height+f}return i.config.chart.stacked||(h<0?h=0+u:h+c.height/3>i.globals.gridHeight&&(h=i.globals.gridHeight-u)),{bcx:a,bcy:s,dataLabelsX:t,dataLabelsY:h}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,r=e.i,n=e.j,s=e.bcy,a=e.barHeight,o=e.barWidth,l=e.textRects,c=e.dataLabelsX,h=e.strokeWidth,d=e.barDataLabelsConfig,u=e.offX,g=e.offY,f=t.globals.gridHeight/t.globals.dataPoints;o=Math.abs(o);var p=s-(this.barCtx.isRangeBar?0:f)+a/2+l.height/2+g-3,v=this.barCtx.series[r][n]<0,x=i;switch(this.barCtx.isReversed&&(x=i+o-(v?2*o:0),i=t.globals.gridWidth-o),d.position){case"center":c=v?x+o/2-u:Math.max(l.width/2,x-o/2)+u;break;case"bottom":c=v?x+o-h-Math.round(l.width/2)-u:x-o+h+Math.round(l.width/2)+u;break;case"top":c=v?x-h+Math.round(l.width/2)-u:x-h-Math.round(l.width/2)+u}return t.config.chart.stacked||(c<0?c=c+l.width+h:c+l.width/2>t.globals.gridWidth&&(c=t.globals.gridWidth-l.width-h)),{bcx:i,bcy:s,dataLabelsX:c,dataLabelsY:p}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,n=e.val,s=e.i,a=e.j,o=e.textRects,l=e.barHeight,c=e.barWidth,h=e.dataLabelsConfig,d=this.w,u="rotate(0)";"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&(u="rotate(-90, ".concat(t,", ").concat(i,")"));var g=new T(this.barCtx.ctx),f=new y(this.barCtx.ctx),p=h.formatter,v=null,x=d.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!x){v=f.group({class:"apexcharts-data-labels",transform:u});var m="";void 0!==n&&(m=p(n,{seriesIndex:s,dataPointIndex:a,w:d}));var b=d.globals.series[s][a]<0,w=d.config.plotOptions.bar.dataLabels.position;"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&("top"===w&&(h.textAnchor=b?"end":"start"),"center"===w&&(h.textAnchor="middle"),"bottom"===w&&(h.textAnchor=b?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&c<f.getTextRects(m,parseFloat(h.style.fontSize)).width&&(m=""),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?o.width/1.6>Math.abs(c)&&(m=""):o.height/1.6>Math.abs(l)&&(m=""));var C=r({},h);this.barCtx.isHorizontal&&n<0&&("start"===h.textAnchor?C.textAnchor="end":"end"===h.textAnchor&&(C.textAnchor="start")),g.plotDataLabelsText({x:t,y:i,text:m,i:s,j:a,parent:v,dataLabelsConfig:C,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return v}}]),e}(),F=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.legendInactiveClass="legend-mouseover-inactive"}return o(e,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(x.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var t=this.getSeriesByName(e),i=parseInt(t.getAttribute("data:realIndex"),10);return{isHidden:t.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(e,t){var i=this.w;function r(i){for(var r=0;r<i.length;r++)i[r].index===t&&e.node.classList.add("apexcharts-series-collapsed")}r(i.globals.collapsedSeries),r(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var t=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,t.isHidden),t.isHidden}},{key:"showSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!0)}},{key:"hideSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!1)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.w,n=x.clone(r.globals.initialSeries);r.globals.previousPaths=[],i?(r.globals.collapsedSeries=[],r.globals.ancillaryCollapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeriesIndices=[]):n=this.emptyCollapsedSeries(n),r.config.series=n,e&&(t&&(r.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(n,r.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,i=0;i<e.length;i++)t.globals.collapsedSeriesIndices.indexOf(i)>-1&&(e[i].data=[]);return e}},{key:"toggleSeriesOnHover",value:function(e,t){var i=this.w;t||(t=e.target);var r=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===e.type){var n=parseInt(t.getAttribute("rel"),10)-1,s=null,a=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(s=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(n,"']")),a=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(n,"']"))):s=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(n+1,"']")):s=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(n+1,"'] path"));for(var o=0;o<r.length;o++)r[o].classList.add(this.legendInactiveClass);null!==s&&(i.globals.axisCharts||s.parentNode.classList.remove(this.legendInactiveClass),s.classList.remove(this.legendInactiveClass),null!==a&&a.classList.remove(this.legendInactiveClass))}else if("mouseout"===e.type)for(var l=0;l<r.length;l++)r[l].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,t){var i=this,r=this.w,n=r.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),s=function(e){for(var t=0;t<n.length;t++)n[t].classList[e](i.legendInactiveClass)};if("mousemove"===e.type){var a=parseInt(t.getAttribute("rel"),10)-1;s("add"),function(e){for(var t=0;t<n.length;t++){var r=parseInt(n[t].getAttribute("val"),10);r>=e.from&&r<=e.to&&n[t].classList.remove(i.legendInactiveClass)}}(r.config.plotOptions.heatmap.colorScale.ranges[a])}else"mouseout"===e.type&&s("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",i=this.w,r=0;if(i.config.series.length>1)for(var n=i.config.series.map((function(t,r){var n=!1;return e&&(n="bar"===i.config.series[r].type||"column"===i.config.series[r].type),t.data&&t.data.length>0&&!n?r:-1})),s="asc"===t?0:n.length-1;"asc"===t?s<n.length:s>=0;"asc"===t?s++:s--)if(-1!==n[s]){r=n[s];break}return r}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(t,i,r){for(var n=t[i].childNodes,s={type:r,paths:[],realIndex:t[i].getAttribute("data:realIndex")},a=0;a<n.length;a++)if(n[a].hasAttribute("pathTo")){var o=n[a].getAttribute("pathTo");s.paths.push({d:o})}e.globals.previousPaths.push(s)}e.globals.previousPaths=[],["line","area","bar","rangebar","candlestick","radar"].forEach((function(i){for(var r,n=(r=i,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(r,"-series .apexcharts-series"))),s=0;s<n.length;s++)t(n,s,i)})),this.handlePrevBubbleScatterPaths("bubble"),this.handlePrevBubbleScatterPaths("scatter");var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(i.length>0)for(var r=function(t){for(var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(t,"'] rect")),r=[],n=function(e){var t=function(t){return i[e].getAttribute(t)},n={x:parseFloat(t("x")),y:parseFloat(t("y")),width:parseFloat(t("width")),height:parseFloat(t("height"))};r.push({rect:n,color:i[e].getAttribute("color")})},s=0;s<i.length;s++)n(s);e.globals.previousPaths.push(r)},n=0;n<i.length;n++)r(n);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"handlePrevBubbleScatterPaths",value:function(e){var t=this.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e,"-series .apexcharts-series"));if(i.length>0)for(var r=0;r<i.length;r++){for(var n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e,"-series .apexcharts-series[data\\:realIndex='").concat(r,"'] circle")),s=[],a=0;a<n.length;a++)s.push({x:n[a].getAttribute("cx"),y:n[a].getAttribute("cy"),r:n[a].getAttribute("r")});t.globals.previousPaths.push(s)}}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,t=e.config.noData,i=new y(this.ctx),r=e.globals.svgWidth/2,n=e.globals.svgHeight/2,s="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,"left"===t.align?(r=10,s="start"):"right"===t.align&&(r=e.globals.svgWidth-10,s="end"),"top"===t.verticalAlign?n=50:"bottom"===t.verticalAlign&&(n=e.globals.svgHeight-50),r+=t.offsetX,n=n+parseInt(t.style.fontSize,10)+2+t.offsetY,void 0!==t.text&&""!==t.text){var a=i.drawText({x:r,y:n,text:t.text,textAnchor:s,fontSize:t.style.fontSize,fontFamily:t.style.fontFamily,foreColor:t.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(a)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var t=this.w,i=0;i<e.length;i++)if(0===e[i].length)for(var r=0;r<e[t.globals.maxValsInArrayIndex].length;r++)e[i].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,t=this.w,i=this.filteredSeriesX(),r=0;r<i.length-1;r++)if(i[r][0]!==i[r+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){return this.w.globals.seriesX.map((function(e){return e.length>0?e:[]}))}}]),e}(),I=function(){function e(t){s(this,e),this.w=t.w,this.barCtx=t}return o(e,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i<e.length;i++)if(e[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var r=0;r<e[i].length;r++)t.globals.seriesX[i][r]>t.globals.minX&&t.globals.seriesX[i][r]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],this.barCtx.radiusOnSeriesNumber=e.length-1,t.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(){var e,t,i,r,n,s,a,o,l=this.w,c=l.globals.dataPoints;this.barCtx.isRangeBar&&(c=l.globals.labels.length);var h=this.barCtx.seriesLen;if(l.config.plotOptions.bar.rangeBarGroupRows&&(h=1),this.barCtx.isHorizontal)n=(i=l.globals.gridHeight/c)/h,l.globals.isXNumeric&&(n=(i=l.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),n=n*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),t=(i-n*this.barCtx.seriesLen)/2;else{if(r=l.globals.gridWidth/this.barCtx.visibleItems,l.config.xaxis.convertedCatToNumeric&&(r=l.globals.gridWidth/l.globals.dataPoints),s=r/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&&(r=l.globals.minXDiff/d),(s=r/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(s=1)}a=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),e=l.globals.padHorizontal+(r-s*this.barCtx.seriesLen)/2}return{x:e,y:t,yDivision:i,xDivision:r,barHeight:n,barWidth:s,zeroH:a,zeroW:o}}},{key:"getPathFillColor",value:function(e,t,i,r){var n=this.w,s=new P(this.barCtx.ctx),a=null,o=this.barCtx.barOptions.distributed?i:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(r){e[t][i]>=r.from&&e[t][i]<=r.to&&(a=r.color)})),n.config.series[t].data[i]&&n.config.series[t].data[i].fillColor&&(a=n.config.series[t].data[i].fillColor),s.fillPath({seriesNumber:this.barCtx.barOptions.distributed?o:r,dataPointIndex:i,color:a,value:e[t][i]})}},{key:"getStrokeWidth",value:function(e,t,i){var r=0,n=this.w;return void 0===this.barCtx.series[e][t]||null===this.barCtx.series[e][t]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,n.config.stroke.show&&(this.barCtx.isNullValue||(r=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),r}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,r=e.x1,n=e.x2,s=e.y1,a=e.y2,o=e.elSeries,l=this.w,c=new y(this.barCtx.ctx),h=new F(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[t],u=c.drawRect(void 0!==r?r:0,void 0!==s?s:0,void 0!==n?n:l.globals.gridWidth,void 0!==a?a: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(e){var t=e.barWidth,i=e.barXPosition,r=e.yRatio,n=e.y1,s=e.y2,a=e.strokeWidth,o=e.series,l=e.realIndex,c=e.i,h=e.j,d=e.w,u=new y(this.barCtx.ctx);(a=Array.isArray(a)?a[l]:a)||(a=0);var g={barWidth:t,strokeWidth:a,yRatio:r,barXPosition:i,y1:n,y2:s},f=this.getRoundedBars(d,g,o,c,h),p=i,v=i+t,x=u.move(p,n),m=u.move(p,n),b=u.line(v-a,n);return d.globals.previousPaths.length>0&&(m=this.barCtx.getPreviousPath(l,h,!1)),x=x+u.line(p,f.y2)+f.pathWithRadius+u.line(v-a,f.y2)+b+b+"z",m=m+u.line(p,n)+b+b+b+b+b+u.line(p,n),d.config.chart.stacked&&(this.barCtx.yArrj.push(f.y2),this.barCtx.yArrjF.push(Math.abs(n-f.y2)),this.barCtx.yArrjVal.push(this.barCtx.series[c][h])),{pathTo:x,pathFrom:m}}},{key:"getBarpaths",value:function(e){var t=e.barYPosition,i=e.barHeight,r=e.x1,n=e.x2,s=e.strokeWidth,a=e.series,o=e.realIndex,l=e.i,c=e.j,h=e.w,d=new y(this.barCtx.ctx);(s=Array.isArray(s)?s[o]:s)||(s=0);var u={barHeight:i,strokeWidth:s,barYPosition:t,x2:n,x1:r},g=this.getRoundedBars(h,u,a,l,c),f=d.move(r,t),p=d.move(r,t);h.globals.previousPaths.length>0&&(p=this.barCtx.getPreviousPath(o,c,!1));var v=t,x=t+i,m=d.line(r,x-s);return f=f+d.line(g.x2,v)+g.pathWithRadius+d.line(g.x2,x-s)+m+m+"z",p=p+d.line(r,v)+m+m+m+m+m+d.line(r,v),h.config.chart.stacked&&(this.barCtx.xArrj.push(g.x2),this.barCtx.xArrjF.push(Math.abs(r-g.x2)),this.barCtx.xArrjVal.push(this.barCtx.series[l][c])),{pathTo:f,pathFrom:p}}},{key:"getRoundedBars",value:function(e,t,i,r,n){var s=new y(this.barCtx.ctx),a=0,o=e.config.plotOptions.bar.borderRadius,l=Array.isArray(o);if(a=l?o[r>o.length-1?o.length-1:r]:o,e.config.chart.stacked&&i.length>1&&r!==this.barCtx.radiusOnSeriesNumber&&!l&&(a=0),this.barCtx.isHorizontal){var c="",h=t.x2;if(Math.abs(t.x1-t.x2)<a&&(a=Math.abs(t.x1-t.x2)),void 0!==i[r][n]||null!==i[r][n]){var d=this.barCtx.isReversed?i[r][n]>0:i[r][n]<0;d&&(a*=-1),h-=a,c=s.quadraticCurve(h+a,t.barYPosition,h+a,t.barYPosition+(d?-1*a:a))+s.line(h+a,t.barYPosition+t.barHeight-t.strokeWidth-(d?-1*a:a))+s.quadraticCurve(h+a,t.barYPosition+t.barHeight-t.strokeWidth,h,t.barYPosition+t.barHeight-t.strokeWidth)}return{pathWithRadius:c,x2:h}}var u="",g=t.y2;if(Math.abs(t.y1-t.y2)<a&&(a=Math.abs(t.y1-t.y2)),void 0!==i[r][n]||null!==i[r][n]){var f=i[r][n]<0;f&&(a*=-1),g+=a,u=s.quadraticCurve(t.barXPosition,g-a,t.barXPosition+(f?-1*a:a),g-a)+s.line(t.barXPosition+t.barWidth-t.strokeWidth-(f?-1*a:a),g-a)+s.quadraticCurve(t.barXPosition+t.barWidth-t.strokeWidth,g-a,t.barXPosition+t.barWidth-t.strokeWidth,g)}return{pathWithRadius:u,y2:g}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,i=this.w,r=0;r<t.length;r++){for(var n=0,s=0;s<t[i.globals.maxValsInArrayIndex].length;s++)n+=t[r][s];0===n&&this.barCtx.zeroSerieses.push(r)}for(var a=t.length-1;a>=0;a--)this.barCtx.zeroSerieses.indexOf(a)>-1&&a===this.radiusOnSeriesNumber&&(this.barCtx.radiusOnSeriesNumber-=1);for(var o=t.length-1;o>=0;o--)i.globals.collapsedSeriesIndices.indexOf(this.barCtx.radiusOnSeriesNumber)>-1&&(this.barCtx.radiusOnSeriesNumber-=1)}},{key:"getXForValue",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=i?t:null;return null!=e&&(r=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),r}},{key:"getYForValue",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=i?t:null;return null!=e&&(r=t-e/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),r}},{key:"getGoalValues",value:function(e,t,i,r,n){var s=this,a=this.w,o=[];return a.globals.seriesGoals[r]&&a.globals.seriesGoals[r][n]&&Array.isArray(a.globals.seriesGoals[r][n])&&a.globals.seriesGoals[r][n].forEach((function(r){var n;o.push((l(n={},e,"x"===e?s.getXForValue(r.value,t,!1):s.getYForValue(r.value,i,!1)),l(n,"attrs",r),n))})),o}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,r=e.goalX,n=e.goalY,s=e.barWidth,a=e.barHeight,o=new y(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"}),c=null;return this.barCtx.isHorizontal?Array.isArray(r)&&r.forEach((function(e){var t=void 0!==e.attrs.strokeHeight?e.attrs.strokeHeight:a/2,r=i+t+a/2;c=o.drawLine(e.x,r-2*t,e.x,r,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeWidth?e.attrs.strokeWidth:2,e.attrs.strokeLineCap),l.add(c)})):Array.isArray(n)&&n.forEach((function(e){var i=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:s/2,r=t+i+s/2;c=o.drawLine(r-2*i,e.y,r,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),l.add(c)})),l}}]),e}(),O=function(){function e(t,i){s(this,e),this.ctx=t,this.w=t.w;var r=this.w;this.barOptions=r.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=r.config.stroke.width,this.isNullValue=!1,this.isRangeBar=r.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 I(this)}return o(e,[{key:"draw",value:function(e,t){var i=this.w,n=new y(this.ctx),s=new w(this.ctx,i);e=s.getLogSeries(e),this.series=e,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var a=n.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<e.length;o++,l++){var c,h,d,u,g=void 0,f=void 0,p=[],v=[],m=i.globals.comboCharts?t[o]:o,b=n.group({class:"apexcharts-series",rel:o+1,seriesName:x.escapeString(i.globals.seriesNames[m]),"data:realIndex":m});this.ctx.series.addCollapsedClassToSeries(b,m),e[o].length>0&&(this.visibleI=this.visibleI+1);var C=0,S=0;this.yRatio.length>1&&(this.yaxisIndex=m),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();f=k.y,C=k.barHeight,h=k.yDivision,u=k.zeroW,g=k.x,S=k.barWidth,c=k.xDivision,d=k.zeroH,this.horizontal||v.push(g+S/2);for(var L=n.group({class:"apexcharts-datalabels","data:realIndex":m}),A=n.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),E=0;E<i.globals.dataPoints;E++){var z=this.barHelpers.getStrokeWidth(o,E,m),P=null,_={indexes:{i:o,j:E,realIndex:m,bc:l},x:g,y:f,strokeWidth:z,elSeries:b};this.isHorizontal?(P=this.drawBarPaths(r(r({},_),{},{barHeight:C,zeroW:u,yDivision:h})),S=this.series[o][E]/this.invertedYRatio):(P=this.drawColumnPaths(r(r({},_),{},{xDivision:c,barWidth:S,zeroH:d})),C=this.series[o][E]/this.yRatio[this.yaxisIndex]);var R=this.barHelpers.drawGoalLine({barXPosition:P.barXPosition,barYPosition:P.barYPosition,goalX:P.goalX,goalY:P.goalY,barHeight:C,barWidth:S});R&&A.add(R),f=P.y,g=P.x,E>0&&v.push(g+S/2),p.push(f);var T=this.barHelpers.getPathFillColor(e,o,E,m);this.renderSeries({realIndex:m,pathFill:T,j:E,i:o,pathFrom:P.pathFrom,pathTo:P.pathTo,strokeWidth:z,elSeries:b,x:g,y:f,series:e,barHeight:C,barWidth:S,elDataLabelsWrap:L,elGoalsMarkers:A,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[m]=v,i.globals.seriesYvalues[m]=p,a.add(b)}return a}},{key:"renderSeries",value:function(e){var t=e.realIndex,i=e.pathFill,r=e.lineFill,n=e.j,s=e.i,a=e.pathFrom,o=e.pathTo,l=e.strokeWidth,c=e.elSeries,h=e.x,d=e.y,u=e.y1,g=e.y2,f=e.series,p=e.barHeight,v=e.barWidth,x=e.barYPosition,m=e.elDataLabelsWrap,w=e.elGoalsMarkers,C=e.visibleSeries,S=e.type,k=this.w,L=new y(this.ctx);r||(r=this.barOptions.distributed?k.globals.stroke.colors[n]:k.globals.stroke.colors[t]),k.config.series[s].data[n]&&k.config.series[s].data[n].strokeColor&&(r=k.config.series[s].data[n].strokeColor),this.isNullValue&&(i="none");var A=n/k.config.chart.animations.animateGradually.delay*(k.config.chart.animations.speed/k.globals.dataPoints)/2.4,E=L.renderPaths({i:s,j:n,realIndex:t,pathFrom:a,pathTo:o,stroke:r,strokeWidth:l,strokeLineCap:k.config.stroke.lineCap,fill:i,animationDelay:A,initialSpeed:k.config.chart.animations.speed,dataChangeSpeed:k.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(S,"-area")});E.attr("clip-path","url(#gridRectMask".concat(k.globals.cuid,")"));var z=k.config.forecastDataPoints;z.count>0&&n>=k.globals.dataPoints-z.count&&(E.node.setAttribute("stroke-dasharray",z.dashArray),E.node.setAttribute("stroke-width",z.strokeWidth),E.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==u&&void 0!==g&&(E.attr("data-range-y1",u),E.attr("data-range-y2",g)),new b(this.ctx).setSelectionFilter(E,t,n),c.add(E);var P=new M(this).handleBarDataLabels({x:h,y:d,y1:u,y2:g,i:s,j:n,series:f,realIndex:t,barHeight:p,barWidth:v,barYPosition:x,renderedPath:E,visibleSeries:C});return null!==P&&m.add(P),c.add(m),w&&c.add(w),c}},{key:"drawBarPaths",value:function(e){var t=e.indexes,i=e.barHeight,r=e.strokeWidth,n=e.zeroW,s=e.x,a=e.y,o=e.yDivision,l=e.elSeries,c=this.w,h=t.i,d=t.j;c.globals.isXNumeric&&(a=(c.globals.seriesX[h][d]-c.globals.minX)/this.invertedXRatio-i);var u=a+i*this.visibleI;s=this.barHelpers.getXForValue(this.series[h][d],n);var g=this.barHelpers.getBarpaths({barYPosition:u,barHeight:i,x1:n,x2:s,strokeWidth:r,series:this.series,realIndex:t.realIndex,i:h,j:d,w:c});return c.globals.isXNumeric||(a+=o),this.barHelpers.barBackground({j:d,i:h,y1:u-i*this.visibleI,y2:i*this.seriesLen,elSeries:l}),{pathTo:g.pathTo,pathFrom:g.pathFrom,x:s,y:a,goalX:this.barHelpers.getGoalValues("x",n,null,h,d),barYPosition:u}}},{key:"drawColumnPaths",value:function(e){var t=e.indexes,i=e.x,r=e.y,n=e.xDivision,s=e.barWidth,a=e.zeroH,o=e.strokeWidth,l=e.elSeries,c=this.w,h=t.realIndex,d=t.i,u=t.j,g=t.bc;if(c.globals.isXNumeric){var f=h;c.globals.seriesX[h].length||(f=c.globals.maxValsInArrayIndex),i=(c.globals.seriesX[f][u]-c.globals.minX)/this.xRatio-s*this.seriesLen/2}var p=i+s*this.visibleI;r=this.barHelpers.getYForValue(this.series[d][u],a);var v=this.barHelpers.getColumnPaths({barXPosition:p,barWidth:s,y1:a,y2:r,strokeWidth:o,series:this.series,realIndex:t.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(i+=n),this.barHelpers.barBackground({bc:g,j:u,i:d,x1:p-o/2-s*this.visibleI,x2:s*this.seriesLen+o/2,elSeries:l}),{pathTo:v.pathTo,pathFrom:v.pathFrom,x:i,y:r,goalY:this.barHelpers.getGoalValues("y",null,a,d,u),barXPosition:p}}},{key:"getPreviousPath",value:function(e,t){for(var i,r=this.w,n=0;n<r.globals.previousPaths.length;n++){var s=r.globals.previousPaths[n];s.paths&&s.paths.length>0&&parseInt(s.realIndex,10)===parseInt(e,10)&&void 0!==r.globals.previousPaths[n].paths[t]&&(i=r.globals.previousPaths[n].paths[t].d)}return i}}]),e}(),D=function(){function e(t){s(this,e),this.ctx=t,this.w=t.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(e,[{key:"isValidDate",value:function(e){return!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);var i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,t){var i=this.w.globals.locale,r=this.w.config.xaxis.labels.datetimeUTC,n=["\0"].concat(f(i.months)),s=[""].concat(f(i.shortMonths)),a=[""].concat(f(i.days)),o=[""].concat(f(i.shortDays));function l(e,t){var i=e+"";for(t=t||2;i.length<t;)i="0"+i;return i}var c=r?e.getUTCFullYear():e.getFullYear();t=(t=(t=t.replace(/(^|[^\\])yyyy+/g,"$1"+c)).replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+c);var h=(r?e.getUTCMonth():e.getMonth())+1;t=(t=(t=(t=t.replace(/(^|[^\\])MMMM+/g,"$1"+n[0])).replace(/(^|[^\\])MMM/g,"$1"+s[0])).replace(/(^|[^\\])MM/g,"$1"+l(h))).replace(/(^|[^\\])M/g,"$1"+h);var d=r?e.getUTCDate():e.getDate();t=(t=(t=(t=t.replace(/(^|[^\\])dddd+/g,"$1"+a[0])).replace(/(^|[^\\])ddd/g,"$1"+o[0])).replace(/(^|[^\\])dd/g,"$1"+l(d))).replace(/(^|[^\\])d/g,"$1"+d);var u=r?e.getUTCHours():e.getHours(),g=u>12?u-12:0===u?12:u;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=r?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var v=r?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+l(v))).replace(/(^|[^\\])s/g,"$1"+v);var x=r?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+l(x,3)),x=Math.round(x/10),t=t.replace(/(^|[^\\])ff/g,"$1"+l(x)),x=Math.round(x/10);var m=u<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+x)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var b=m.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+b)).replace(/(^|[^\\])t/g,"$1"+b.charAt(0));var y=-e.getTimezoneOffset(),w=r||!y?"Z":y>0?"+":"-";if(!r){var C=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(C)}t=t.replace(/(^|[^\\])K/g,"$1"+w);var S=(r?e.getUTCDay():e.getDay())+1;return(t=(t=(t=(t=t.replace(new RegExp(a[0],"g"),a[S])).replace(new RegExp(o[0],"g"),o[S])).replace(new RegExp(n[0],"g"),n[h])).replace(new RegExp(s[0],"g"),s[h])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,i){var r=this.w;void 0!==r.config.xaxis.min&&(e=r.config.xaxis.min),void 0!==r.config.xaxis.max&&(t=r.config.xaxis.max);var n=this.getDate(e),s=this.getDate(t),a=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,t,i){return this.determineDaysOfMonths(e,t)-i}},{key:"determineDaysOfYear",value:function(e){var t=365;return this.isLeapYear(e)&&(t=366),t}},{key:"determineRemainingDaysOfYear",value:function(e,t,i){var r=this.daysCntOfYear[t]+i;return t>1&&this.isLeapYear()&&r++,r}},{key:"determineDaysOfMonths",value:function(e,t){var i=30;switch(e=x.monthMod(e),!0){case this.months30.indexOf(e)>-1:2===e&&(i=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),e}(),H=function(e){c(i,O);var t=g(i);function i(){return s(this,i),t.apply(this,arguments)}return o(i,[{key:"draw",value:function(e,t){var i=this.w,n=new y(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=e,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(e);for(var s=n.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),a=0;a<e.length;a++){var o,l,c,h=void 0,d=void 0,u=void 0,g=i.globals.comboCharts?t[a]:a,f=n.group({class:"apexcharts-series",seriesName:x.escapeString(i.globals.seriesNames[g]),rel:a+1,"data:realIndex":g});this.ctx.series.addCollapsedClassToSeries(f,g),e[a].length>0&&(this.visibleI=this.visibleI+1);var p=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=g);var m=this.barHelpers.initialPositions();d=m.y,c=m.zeroW,h=m.x,v=m.barWidth,o=m.xDivision,l=m.zeroH;for(var b=n.group({class:"apexcharts-datalabels","data:realIndex":g}),w=n.group({class:"apexcharts-rangebar-goals-markers",style:"pointer-events: none"}),C=0;C<i.globals.dataPoints;C++){var S=this.barHelpers.getStrokeWidth(a,C,g),k=this.seriesRangeStart[a][C],L=this.seriesRangeEnd[a][C],A=null,E=null,z={x:h,y:d,strokeWidth:S,elSeries:f};if(u=m.yDivision,p=m.barHeight,this.isHorizontal){E=d+p*this.visibleI;var P=this.seriesLen;i.config.plotOptions.bar.rangeBarGroupRows&&(P=1);var _=(u-p*P)/2;if(void 0===i.config.series[a].data[C])break;if(i.config.series[a].data[C].x){var R=this.detectOverlappingBars({i:a,j:C,barYPosition:E,srty:_,barHeight:p,yDivision:u,initPositions:m});p=R.barHeight,E=R.barYPosition}v=(A=this.drawRangeBarPaths(r({indexes:{i:a,j:C,realIndex:g},barHeight:p,barYPosition:E,zeroW:c,yDivision:u,y1:k,y2:L},z))).barWidth}else p=(A=this.drawRangeColumnPaths(r({indexes:{i:a,j:C,realIndex:g},zeroH:l,barWidth:v,xDivision:o},z))).barHeight;var T=this.barHelpers.drawGoalLine({barXPosition:A.barXPosition,barYPosition:E,goalX:A.goalX,goalY:A.goalY,barHeight:p,barWidth:v});T&&w.add(T),d=A.y,h=A.x;var M=this.barHelpers.getPathFillColor(e,a,C,g),F=i.globals.stroke.colors[g];this.renderSeries({realIndex:g,pathFill:M,lineFill:F,j:C,i:a,x:h,y:d,y1:k,y2:L,pathFrom:A.pathFrom,pathTo:A.pathTo,strokeWidth:S,elSeries:f,series:e,barHeight:p,barYPosition:E,barWidth:v,elDataLabelsWrap:b,elGoalsMarkers:w,visibleSeries:this.visibleI,type:"rangebar"})}s.add(f)}return s}},{key:"detectOverlappingBars",value:function(e){var t=e.i,i=e.j,r=e.barYPosition,n=e.srty,s=e.barHeight,a=e.yDivision,o=e.initPositions,l=this.w,c=[],h=l.config.series[t].data[i].rangeName,d=l.config.series[t].data[i].x,u=l.globals.labels.indexOf(d),g=l.globals.seriesRangeBar[t].findIndex((function(e){return e.x===d&&e.overlaps.length>0}));return r=l.config.plotOptions.bar.rangeBarGroupRows?n+a*u:n+s*this.visibleI+a*u,g>-1&&!l.config.plotOptions.bar.rangeBarOverlap&&(c=l.globals.seriesRangeBar[t][g].overlaps).indexOf(h)>-1&&(r=(s=o.barHeight/c.length)*this.visibleI+a*(100-parseInt(this.barOptions.barHeight,10))/100/2+s*(this.visibleI+c.indexOf(h))+a*u),{barYPosition:r,barHeight:s}}},{key:"drawRangeColumnPaths",value:function(e){var t=e.indexes,i=e.x;e.strokeWidth;var r=e.xDivision,n=e.barWidth,s=e.zeroH,a=this.w,o=t.i,l=t.j,c=this.yRatio[this.yaxisIndex],h=t.realIndex,d=this.getRangeValue(h,l),u=Math.min(d.start,d.end),g=Math.max(d.start,d.end);a.globals.isXNumeric&&(i=(a.globals.seriesX[o][l]-a.globals.minX)/this.xRatio-n/2);var f=i+n*this.visibleI;void 0===this.series[o][l]||null===this.series[o][l]?u=s:(u=s-u/c,g=s-g/c);var p=Math.abs(g-u),v=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:n,y1:u,y2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:t.realIndex,i:h,j:l,w:a});return a.globals.isXNumeric||(i+=r),{pathTo:v.pathTo,pathFrom:v.pathFrom,barHeight:p,x:i,y:g,goalY:this.barHelpers.getGoalValues("y",null,s,o,l),barXPosition:f}}},{key:"drawRangeBarPaths",value:function(e){var t=e.indexes,i=e.y,r=e.y1,n=e.y2,s=e.yDivision,a=e.barHeight,o=e.barYPosition,l=e.zeroW,c=this.w,h=l+r/this.invertedYRatio,d=l+n/this.invertedYRatio,u=Math.abs(d-h),g=this.barHelpers.getBarpaths({barYPosition:o,barHeight:a,x1:h,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:t.realIndex,realIndex:t.realIndex,j:t.j,w:c});return c.globals.isXNumeric||(i+=s),{pathTo:g.pathTo,pathFrom:g.pathFrom,barWidth:u,x:d,goalX:this.barHelpers.getGoalValues("x",l,null,t.realIndex,t.j),y:i}}},{key:"getRangeValue",value:function(e,t){var i=this.w;return{start:i.globals.seriesRangeStart[e][t],end:i.globals.seriesRangeEnd[e][t]}}},{key:"getTooltipValues",value:function(e){var t=e.ctx,i=e.seriesIndex,r=e.dataPointIndex,n=e.y1,s=e.y2,a=e.w,o=a.globals.seriesRangeStart[i][r],l=a.globals.seriesRangeEnd[i][r],c=a.globals.labels[r],h=a.config.series[i].name?a.config.series[i].name:"",d=a.config.tooltip.y.formatter,u=a.config.tooltip.y.title.formatter,g={w:a,seriesIndex:i,dataPointIndex:r,start:o,end:l};"function"==typeof u&&(h=u(h,g)),Number.isFinite(n)&&Number.isFinite(s)&&(o=n,l=s,a.config.series[i].data[r].x&&(c=a.config.series[i].data[r].x+":"),"function"==typeof d&&(c=d(c,g)));var f="",p="",v=a.globals.colors[i];if(void 0===a.config.tooltip.x.formatter)if("datetime"===a.config.xaxis.type){var x=new D(t);f=x.formatDate(x.getDate(o),a.config.tooltip.x.format),p=x.formatDate(x.getDate(l),a.config.tooltip.x.format)}else f=o,p=l;else f=a.config.tooltip.x.formatter(o),p=a.config.tooltip.x.formatter(l);return{start:o,end:l,startVal:f,endVal:p,ylabel:c,color:v,seriesName:h}}},{key:"buildCustomTooltipHTML",value:function(e){return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e.color+'">'+(e.seriesName||"")+'</span></div><div> <span class="category">'+e.ylabel+' </span> <span class="value start-value">'+e.start+'</span> <span class="separator">-</span> <span class="value end-value">'+e.end+"</span></div></div>"}}]),i}(),N=function(){function e(t){s(this,e),this.opts=t}return o(e,[{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(e){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,x.extend(e,{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 e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var i=t.seriesIndex,r=t.dataPointIndex,n=t.w;return e._getBoxTooltip(n,i,r,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var i=t.seriesIndex,r=t.dataPointIndex,n=t.w;return e._getBoxTooltip(n,i,r,["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(e,t){t.ctx;var i=t.seriesIndex,r=t.dataPointIndex,n=t.w,s=n.globals.seriesRangeStart[i][r];return n.globals.seriesRangeEnd[i][r]-s},background:{enabled:!1},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(e){var t=new H(e.ctx,null),i=t.getTooltipValues(e),r=i.color,n=i.seriesName,s=i.ylabel,a=i.startVal,o=i.endVal;return t.buildCustomTooltipHTML({color:r,seriesName:n,ylabel:s,start:a,end:o})}(e):function(e){var t=new H(e.ctx,null),i=t.getTooltipValues(e),r=i.color,n=i.seriesName,s=i.ylabel,a=i.start,o=i.end;return t.buildCustomTooltipHTML({color:r,seriesName:n,ylabel:s,start:a,end:o})}(e)}},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(e){return x.extend(e,{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(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var t=e.dataLabels.formatter;return e.yaxis.forEach((function(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100})),"bar"===e.chart.type&&(e.dataLabels.formatter=t||function(e){return"number"==typeof e&&e?e.toFixed(0)+"%":e}),e}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,t,i){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(e){return x.isNumber(e)?Math.floor(e):e};var r=e.xaxis.labels.formatter,n=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(n=i.map((function(e){return Array.isArray(e)?e:String(e)}))),n&&n.length&&(e.xaxis.labels.formatter=function(e){return x.isNumber(e)?r(n[Math.floor(e)-1]):r(e)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{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(e){return e.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(e){return e.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(e){return e.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(e){return e},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(e,t,i,r,n){var s=e.globals.seriesCandleO[t][i],a=e.globals.seriesCandleH[t][i],o=e.globals.seriesCandleM[t][i],l=e.globals.seriesCandleL[t][i],c=e.globals.seriesCandleC[t][i];return e.config.series[t].type&&e.config.series[t].type!==n?'<div class="apexcharts-custom-tooltip">\n '.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": <strong>").concat(e.globals.series[t][i],"</strong>\n </div>"):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(r[0],': <span class="value">')+s+"</span></div>"+"<div>".concat(r[1],': <span class="value">')+a+"</span></div>"+(o?"<div>".concat(r[2],': <span class="value">')+o+"</span></div>":"")+"<div>".concat(r[3],': <span class="value">')+l+"</span></div>"+"<div>".concat(r[4],': <span class="value">')+c+"</span></div></div>"}}]),e}(),X=function(){function e(t){s(this,e),this.opts=t}return o(e,[{key:"init",value:function(e){var t=e.responsiveOverride,i=this.opts,r=new E,s=new N(i);this.chartType=i.chart.type,"histogram"===this.chartType&&(i.chart.type="bar",i=x.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},i)),i=this.extendYAxis(i),i=this.extendAnnotations(i);var a=r.init(),o={};if(i&&"object"===n(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)?s[i.chart.type]():s.line(),i.chart.brush&&i.chart.brush.enabled&&(l=s.brush(l)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},t||(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=s.sparkline(l)),o=x.extend(a,l)}var c=x.extend(o,window.Apex);return a=x.extend(c,i),this.handleUserInputErrors(a)}},{key:"checkForCatToNumericXAxis",value:function(e,t,i){var r=new N(i),n=("bar"===e||"boxPlot"===e)&&i.plotOptions&&i.plotOptions.bar&&i.plotOptions.bar.horizontal,s="pie"===e||"polarArea"===e||"donut"===e||"radar"===e||"radialBar"===e||"heatmap"===e,a="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,o=i.xaxis.tickPlacement?i.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return n||s||!a||"between"===o||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,t){var i=new E;(void 0===e.yaxis||!e.yaxis||Array.isArray(e.yaxis)&&0===e.yaxis.length)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=x.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[x.extend(i.yAxis,e.yaxis)]:e.yaxis=x.extendArray(e.yaxis,i.yAxis);var r=!1;e.yaxis.forEach((function(e){e.logarithmic&&(r=!0)}));var n=e.series;return t&&!n&&(n=t.config.series),r&&n.length!==e.yaxis.length&&n.length&&(e.yaxis=n.map((function(t,r){if(t.name||(n[r].name="series-".concat(r+1)),e.yaxis[r])return e.yaxis[r].seriesName=n[r].name,e.yaxis[r];var s=x.extend(i.yAxis,e.yaxis[0]);return s.show=!1,s}))),r&&n.length>1&&n.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),e}},{key:"extendAnnotations",value:function(e){return void 0===e.annotations&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new E;return e.annotations.yaxis=x.extendArray(void 0!==e.annotations.yaxis?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new E;return e.annotations.xaxis=x.extendArray(void 0!==e.annotations.xaxis?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new E;return e.annotations.points=x.extendArray(void 0!==e.annotations.points?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&"dark"===e.theme.mode&&(e.tooltip||(e.tooltip={}),"light"!==e.tooltip.theme&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.chart.background||(e.chart.background="#424242"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var t=e;if(t.tooltip.shared&&t.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"===t.chart.type&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),t}}]),e}(),Y=function(){function e(){s(this,e)}return o(e,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRangeBar=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasGroups=!1,e.groups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.xaxisLabelsCount=0,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0}},{key:"globalVars",value:function(e){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:e.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"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:"pan"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.pan,selectionEnabled:"selection"===e.chart.toolbar.autoSelected&&e.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(e){var t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=x.extend({},e),t.initialSeries=x.clone(e.series),t.lastXAxis=x.clone(t.initialConfig.xaxis),t.lastYAxis=x.clone(t.initialConfig.yaxis),t}}]),e}(),B=function(){function e(t){s(this,e),this.opts=t}return o(e,[{key:"init",value:function(){var e=new X(this.opts).init({responsiveOverride:!1});return{config:e,globals:(new Y).init(e)}}}]),e}(),W=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new w(this.ctx)}return o(e,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new F(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!==e[this.activeSeriesIndex].data[0]&&void 0!==e[this.activeSeriesIndex].data[0].x&&null!==e[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new F(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&void 0!==e[this.activeSeriesIndex].data[0]&&null!==e[this.activeSeriesIndex].data[0]&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,t){for(var i=this.w.config,r=this.w.globals,n="boxPlot"===i.chart.type||"boxPlot"===i.series[t].type,s=0;s<e[t].data.length;s++)if(void 0!==e[t].data[s][1]&&(Array.isArray(e[t].data[s][1])&&4===e[t].data[s][1].length&&!n?this.twoDSeries.push(x.parseNumber(e[t].data[s][1][3])):e[t].data[s].length>=5?this.twoDSeries.push(x.parseNumber(e[t].data[s][4])):this.twoDSeries.push(x.parseNumber(e[t].data[s][1])),r.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var a=new Date(e[t].data[s][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(e[t].data[s][0]);for(var o=0;o<e[t].data.length;o++)void 0!==e[t].data[o][2]&&(this.threeDSeries.push(e[t].data[o][2]),r.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,t){var i=this.w.config,r=this.w.globals,n=new D(this.ctx),s=t;r.collapsedSeriesIndices.indexOf(t)>-1&&(s=this.activeSeriesIndex);for(var a=0;a<e[t].data.length;a++)void 0!==e[t].data[a].y&&(Array.isArray(e[t].data[a].y)?this.twoDSeries.push(x.parseNumber(e[t].data[a].y[e[t].data[a].y.length-1])):this.twoDSeries.push(x.parseNumber(e[t].data[a].y))),void 0!==e[t].data[a].goals&&Array.isArray(e[t].data[a].goals)?(void 0===this.seriesGoals[t]&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(e[t].data[a].goals)):(void 0===this.seriesGoals[t]&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(null));for(var o=0;o<e[s].data.length;o++){var l="string"==typeof e[s].data[o].x,c=Array.isArray(e[s].data[o].x),h=!c&&!!n.isValidDate(e[s].data[o].x.toString());if(l||h)if(l||i.xaxis.convertedCatToNumeric){var d=r.isBarHorizontal&&r.isRangeData;"datetime"!==i.xaxis.type||d?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[s].data[o].x)):this.twoDSeriesX.push(n.parseDate(e[s].data[o].x))}else"datetime"===i.xaxis.type?this.twoDSeriesX.push(n.parseDate(e[s].data[o].x.toString())):(r.dataFormatXNumeric=!0,r.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[s].data[o].x)));else c?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[s].data[o].x)):(r.isXNumeric=!0,r.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[s].data[o].x))}if(e[t].data[0]&&void 0!==e[t].data[0].z){for(var u=0;u<e[t].data.length;u++)this.threeDSeries.push(e[t].data[u].z);r.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,t){var i=this.w.globals,r={};return this.isFormat2DArray()?r=this.handleRangeDataFormat("array",e,t):this.isFormatXY()&&(r=this.handleRangeDataFormat("xy",e,t)),i.seriesRangeStart.push(r.start),i.seriesRangeEnd.push(r.end),i.seriesRangeBar.push(r.rangeUniques),i.seriesRangeBar.forEach((function(e,t){e&&e.forEach((function(e,t){e.y.forEach((function(t,i){for(var r=0;r<e.y.length;r++)if(i!==r){var n=t.y1,s=t.y2,a=e.y[r].y1;n<=e.y[r].y2&&a<=s&&(e.overlaps.indexOf(t.rangeName)<0&&e.overlaps.push(t.rangeName),e.overlaps.indexOf(e.y[r].rangeName)<0&&e.overlaps.push(e.y[r].rangeName))}}))}))})),r}},{key:"handleCandleStickBoxData",value:function(e,t){var i=this.w.globals,r={};return this.isFormat2DArray()?r=this.handleCandleStickBoxDataFormat("array",e,t):this.isFormatXY()&&(r=this.handleCandleStickBoxDataFormat("xy",e,t)),i.seriesCandleO[t]=r.o,i.seriesCandleH[t]=r.h,i.seriesCandleM[t]=r.m,i.seriesCandleL[t]=r.l,i.seriesCandleC[t]=r.c,r}},{key:"handleRangeDataFormat",value:function(e,t,i){var r=[],n=[],s=t[i].data.filter((function(e,t,i){return t===i.findIndex((function(t){return t.x===e.x}))})).map((function(e,t){return{x:e.x,overlaps:[],y:[]}})),a="Please provide [Start, End] values in valid format. Read more https://apexcharts.com/docs/series/#rangecharts",o=new F(this.ctx).getActiveConfigSeriesIndex();if("array"===e){if(2!==t[o].data[0][1].length)throw new Error(a);for(var l=0;l<t[i].data.length;l++)r.push(t[i].data[l][1][0]),n.push(t[i].data[l][1][1])}else if("xy"===e){if(2!==t[o].data[0].y.length)throw new Error(a);for(var c=function(e){var a=x.randomId(),o=t[i].data[e].x,l={y1:t[i].data[e].y[0],y2:t[i].data[e].y[1],rangeName:a};t[i].data[e].rangeName=a;var c=s.findIndex((function(e){return e.x===o}));s[c].y.push(l),r.push(l.y1),n.push(l.y2)},h=0;h<t[i].data.length;h++)c(h)}return{start:r,end:n,rangeUniques:s}}},{key:"handleCandleStickBoxDataFormat",value:function(e,t,i){var r=this.w,n="boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[i].type,s=[],a=[],o=[],l=[],c=[];if("array"===e)if(n&&6===t[i].data[0].length||!n&&5===t[i].data[0].length)for(var h=0;h<t[i].data.length;h++)s.push(t[i].data[h][1]),a.push(t[i].data[h][2]),n?(o.push(t[i].data[h][3]),l.push(t[i].data[h][4]),c.push(t[i].data[h][5])):(l.push(t[i].data[h][3]),c.push(t[i].data[h][4]));else for(var d=0;d<t[i].data.length;d++)Array.isArray(t[i].data[d][1])&&(s.push(t[i].data[d][1][0]),a.push(t[i].data[d][1][1]),n?(o.push(t[i].data[d][1][2]),l.push(t[i].data[d][1][3]),c.push(t[i].data[d][1][4])):(l.push(t[i].data[d][1][2]),c.push(t[i].data[d][1][3])));else if("xy"===e)for(var u=0;u<t[i].data.length;u++)Array.isArray(t[i].data[u].y)&&(s.push(t[i].data[u].y[0]),a.push(t[i].data[u].y[1]),n?(o.push(t[i].data[u].y[2]),l.push(t[i].data[u].y[3]),c.push(t[i].data[u].y[4])):(l.push(t[i].data[u].y[2]),c.push(t[i].data[u].y[3])));return{o:s,h:a,m:o,l:l,c:c}}},{key:"parseDataAxisCharts",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.ctx,r=this.w.config,n=this.w.globals,s=new D(i),a=r.labels.length>0?r.labels.slice():r.xaxis.categories.slice();n.isRangeBar="rangeBar"===r.chart.type&&n.isBarHorizontal,n.hasGroups="category"===r.xaxis.type&&void 0!==r.xaxis.group&&void 0!==r.xaxis.group.groups&&r.xaxis.group.groups.length>0,n.hasGroups&&(n.groups=r.xaxis.group.groups);for(var o=function(){for(var e=0;e<a.length;e++)if("string"==typeof a[e]){if(!s.isValidDate(a[e]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");t.twoDSeriesX.push(s.parseDate(a[e]))}else t.twoDSeriesX.push(a[e])},l=0;l<e.length;l++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===e[l].data)return void console.error("It is a possibility that you may have not included 'data' property in series.");if("rangeBar"!==r.chart.type&&"rangeArea"!==r.chart.type&&"rangeBar"!==e[l].type&&"rangeArea"!==e[l].type||(n.isRangeData=!0,this.handleRangeData(e,l)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,l):this.isFormatXY()&&this.handleFormatXY(e,l),"candlestick"!==r.chart.type&&"candlestick"!==e[l].type&&"boxPlot"!==r.chart.type&&"boxPlot"!==e[l].type||this.handleCandleStickBoxData(e,l),n.series.push(this.twoDSeries),n.labels.push(this.twoDSeriesX),n.seriesX.push(this.twoDSeriesX),n.seriesGoals=this.seriesGoals,l!==this.activeSeriesIndex||this.fallbackToCategory||(n.isXNumeric=!0);else{"datetime"===r.xaxis.type?(n.isXNumeric=!0,o(),n.seriesX.push(this.twoDSeriesX)):"numeric"===r.xaxis.type&&(n.isXNumeric=!0,a.length>0&&(this.twoDSeriesX=a,n.seriesX.push(this.twoDSeriesX))),n.labels.push(this.twoDSeriesX);var c=e[l].data.map((function(e){return x.parseNumber(e)}));n.series.push(c)}n.seriesZ.push(this.threeDSeries),void 0!==e[l].name?n.seriesNames.push(e[l].name):n.seriesNames.push("series-"+parseInt(l+1,10)),void 0!==e[l].color?n.seriesColors.push(e[l].color):n.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,i=this.w.config;t.series=e.slice(),t.seriesNames=i.labels.slice();for(var r=0;r<t.series.length;r++)void 0===t.seriesNames[r]&&t.seriesNames.push("series-"+(r+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var t=this.w.config,i=this.w.globals;t.xaxis.categories.length>0?i.labels=t.xaxis.categories:t.labels.length>0?i.labels=t.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRangeBar.length&&(i.seriesRangeBar.map((function(e){e.forEach((function(e){i.labels.indexOf(e.x)<0&&e.x&&i.labels.push(e.x)}))})),i.labels=i.labels.filter((function(e,t,i){return i.indexOf(e)===t}))),t.xaxis.convertedCatToNumeric&&(new N(t).convertCatToNumericXaxis(t,this.ctx,i.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var t=this.w.globals,i=this.w.config,r=[];if(t.axisCharts){if(t.series.length>0)if(this.isFormatXY())for(var n=i.series.map((function(e,t){return e.data.filter((function(e,t,i){return i.findIndex((function(t){return t.x===e.x}))===t}))})),s=n.reduce((function(e,t,i,r){return r[e].length>t.length?e:i}),0),a=0;a<n[s].length;a++)r.push(a+1);else for(var o=0;o<t.series[t.maxValsInArrayIndex].length;o++)r.push(o+1);t.seriesX=[];for(var l=0;l<e.length;l++)t.seriesX.push(r);t.isXNumeric=!0}if(0===r.length){r=t.axisCharts?[]:t.series.map((function(e,t){return t+1}));for(var c=0;c<e.length;c++)t.seriesX.push(r)}t.labels=r,i.xaxis.convertedCatToNumeric&&(t.categoryLabels=r.map((function(e){return i.xaxis.labels.formatter(e)}))),t.noLabelsProvided=!0}},{key:"parseData",value:function(e){var t=this.w,i=t.config,r=t.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),r.axisCharts?this.parseDataAxisCharts(e):this.parseDataNonAxisCharts(e),this.coreUtils.getLargestSeries(),"bar"===i.chart.type&&i.chart.stacked){var n=new F(this.ctx);r.series=n.setNullSeriesToZeroValues(r.series)}this.coreUtils.getSeriesTotals(),r.axisCharts&&this.coreUtils.getStackedSeriesTotals(),this.coreUtils.getPercentSeries(),r.dataFormatXNumeric||r.isXNumeric&&("numeric"!==i.xaxis.type||0!==i.labels.length||0!==i.xaxis.categories.length)||this.handleExternalLabelsData(e);for(var s=this.coreUtils.getCategoryLabels(r.labels),a=0;a<s.length;a++)if(Array.isArray(s[a])){r.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this,t=this.w;t.globals.ignoreYAxisIndexes=t.globals.collapsedSeries.map((function(i,r){if(e.w.globals.isMultipleYAxis&&!t.config.chart.stacked)return i.index}))}}]),e}(),j=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.tooltipKeyFormat="dd MMM"}return o(e,[{key:"xLabelFormat",value:function(e,t,i,r){var n=this.w;if("datetime"===n.config.xaxis.type&&void 0===n.config.xaxis.labels.formatter&&void 0===n.config.tooltip.x.formatter){var s=new D(this.ctx);return s.formatDate(s.getDate(t),n.config.tooltip.x.format)}return e(t,i,r)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map((function(e){return e})):e}},{key:"defaultYFormatter",value:function(e,t,i){var r=this.w;return x.isNumber(e)&&(e=0!==r.globals.yValueDecimal?e.toFixed(void 0!==t.decimalsInFloat?t.decimalsInFloat:r.globals.yValueDecimal):r.globals.maxYArr[i]-r.globals.minYArr[i]<5?e.toFixed(1):e.toFixed(0)),e}},{key:"setLabelFormatters",value:function(){var e=this,t=this.w;return t.globals.xaxisTooltipFormatter=function(t){return e.defaultGeneralFormatter(t)},t.globals.ttKeyFormatter=function(t){return e.defaultGeneralFormatter(t)},t.globals.ttZFormatter=function(e){return e},t.globals.legendFormatter=function(t){return e.defaultGeneralFormatter(t)},void 0!==t.config.xaxis.labels.formatter?t.globals.xLabelFormatter=t.config.xaxis.labels.formatter:t.globals.xLabelFormatter=function(e){if(x.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(x.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);var i=t.globals.maxX-t.globals.minX;return i>0&&i<100?e.toFixed(1):e.toFixed(0)}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?e.toFixed(1):e.toFixed(0)}return e},"function"==typeof t.config.tooltip.x.formatter?t.globals.ttKeyFormatter=t.config.tooltip.x.formatter:t.globals.ttKeyFormatter=t.globals.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(t.globals.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach((function(i,r){void 0!==i.labels.formatter?t.globals.yLabelFormatters[r]=i.labels.formatter:t.globals.yLabelFormatters[r]=function(n){return t.globals.xyCharts?Array.isArray(n)?n.map((function(t){return e.defaultYFormatter(t,i,r)})):e.defaultYFormatter(n,i,r):n}})),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if("heatmap"===e.config.chart.type){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var t=e.globals.seriesNames.reduce((function(e,t){return e.length>t.length?e:t}),0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),e}(),$=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"getLabel",value:function(e,t,i,r){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===e[r]?"":e[r],c=l,h=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new j(this.ctx),f=l;a&&(c=g.xLabelFormat(h,l,f,{i:r,dateFormatter:new D(this.ctx).formatDate,w:o}),void 0!==d&&(c=d(l,e[r],{i:r,dateFormatter:new D(this.ctx).formatDate,w:o})));var p=function(e){var i=null;return t.forEach((function(e){"month"===e.unit?i="year":"day"===e.unit?i="month":"hour"===e.unit?i="day":"minute"===e.unit&&(i="hour")})),i===e};t.length>0?(u=p(t[r].unit),i=t[r].position,c=t[r].value):"datetime"===o.config.xaxis.type&&void 0===d&&(c=""),void 0===c&&(c=""),c=Array.isArray(c)?c:c.toString();var v=new y(this.ctx),x={};x=o.globals.rotateXLabels&&a?v.getTextRects(c,parseInt(s,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):v.getTextRects(c,parseInt(s,10));var m=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(c)&&(0===c.indexOf("NaN")||0===c.toLowerCase().indexOf("invalid")||c.toLowerCase().indexOf("infinity")>=0||n.indexOf(c)>=0&&m)&&(c=""),{x:i,text:c,textRect:x,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,i){var r=this.w,n=r.config.xaxis.tickAmount;return"dataPoints"===n&&(n=Math.round(r.globals.gridWidth/120)),n>i||e%Math.round(i/(n+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,i,r,n){var s=this.w;if(0===e&&s.globals.skipFirstTimelinelabel&&(t.text=""),e===i-1&&s.globals.skipLastTimelinelabel&&(t.text=""),s.config.xaxis.labels.hideOverlappingLabels&&r.length>0){var a=n[n.length-1];t.x<a.textRect.width/(s.globals.rotateXLabels?Math.abs(s.config.xaxis.labels.rotate)/12:1.01)+a.x&&(t.text="")}return t}},{key:"checkForReversedLabels",value:function(e,t){var i=this.w;return i.config.yaxis[e]&&i.config.yaxis[e].reversed&&t.reverse(),t}},{key:"isYAxisHidden",value:function(e){var t=this.w,i=new w(this.ctx);return!t.config.yaxis[e].show||!t.config.yaxis[e].showForNullSeries&&i.isSeriesNull(e)&&-1===t.globals.collapsedSeriesIndices.indexOf(e)}},{key:"getYAxisForeColor",value:function(e,t){var i=this.w;return Array.isArray(e)&&i.globals.yAxisScale[t]&&this.ctx.theme.pushExtraColors(e,i.globals.yAxisScale[t].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,t,i,r,n,s,a){var o=this.w,l=new y(this.ctx),c=o.globals.translateY;if(r.show&&t>0){!0===o.config.yaxis[n].opposite&&(e+=r.width);for(var h=t;h>=0;h--){var d=c+t/10+o.config.yaxis[n].labels.offsetY-1;o.globals.isBarHorizontal&&(d=s*h),"heatmap"===o.config.chart.type&&(d+=s/2);var u=l.drawLine(e+i.offsetX-r.width+r.offsetX,d+r.offsetY,e+i.offsetX+r.offsetX,d+r.offsetY,r.color);a.add(u),c+=s}}}}]),e}(),V=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"scaleSvgNode",value:function(e,t){var i=parseFloat(e.getAttributeNS(null,"width")),r=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",i*t),e.setAttributeNS(null,"height",r*t),e.setAttributeNS(null,"viewBox","0 0 "+i+" "+r)}},{key:"fixSvgStringForIe11",value:function(e){if(!x.isIE11())return e.replace(/ /g," ");var t=0,i=e.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(e){return 2==++t?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':e}));return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(e){var t=this.w.globals.dom.Paper.svg();if(1!==e){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,e),t=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(t)}},{key:"cleanup",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(r,(function(e){e.setAttribute("width",0)})),t&&t[0]&&(t[0].setAttribute("x",-500),t[0].setAttribute("x1",-500),t[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 e=this.getSvgString(),t=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(t)}},{key:"dataURI",value:function(e){var t=this;return new Promise((function(i){var r=t.w,n=e?e.scale||e.width/r.globals.svgWidth:1;t.cleanup();var s=document.createElement("canvas");s.width=r.globals.svgWidth*n,s.height=parseInt(r.globals.dom.elWrap.style.height,10)*n;var a="transparent"===r.config.chart.background?"#fff":r.config.chart.background,o=s.getContext("2d");o.fillStyle=a,o.fillRect(0,0,s.width*n,s.height*n);var l=t.getSvgString(n);if(window.canvg&&x.isIE11()){var c=window.canvg.Canvg.fromString(o,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var h=s.msToBlob();c.stop(),i({blob:h})}else{var d="data:image/svg+xml,"+encodeURIComponent(l),u=new Image;u.crossOrigin="anonymous",u.onload=function(){if(o.drawImage(u,0,0),s.msToBlob){var e=s.msToBlob();i({blob:e})}else{var t=s.toDataURL("image/png");i({imgURI:t})}},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 e=this;this.dataURI().then((function(t){var i=t.imgURI,r=t.blob;r?navigator.msSaveOrOpenBlob(r,e.w.globals.chartID+".png"):e.triggerDownload(i,e.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(e){var t=this,i=e.series,r=e.columnDelimiter,n=e.lineDelimiter,s=void 0===n?"\n":n,a=this.w,o=[],l=[],c="",h=new W(this.ctx),d=new $(this.ctx),u=function(e){var i="";if(a.globals.axisCharts){if("category"===a.config.xaxis.type||a.config.xaxis.convertedCatToNumeric)if(a.globals.isBarHorizontal){var n=a.globals.yLabelFormatters[0],s=new F(t.ctx).getActiveConfigSeriesIndex();i=n(a.globals.labels[e],{seriesIndex:s,dataPointIndex:e,w:a})}else i=d.getLabel(a.globals.labels,a.globals.timescaleLabels,0,e).text;"datetime"===a.config.xaxis.type&&(a.config.xaxis.categories.length?i=a.config.xaxis.categories[e]:a.config.labels.length&&(i=a.config.labels[e]))}else i=a.config.labels[e];return Array.isArray(i)&&(i=i.join(" ")),x.isNumber(i)?i:i.split(r).join("")};o.push(a.config.chart.toolbar.export.csv.headerCategory),i.map((function(e,t){var i=e.name?e.name:"series-".concat(t);a.globals.axisCharts&&o.push(i.split(r).join("")?i.split(r).join(""):"series-".concat(t))})),a.globals.axisCharts||(o.push(a.config.chart.toolbar.export.csv.headerValue),l.push(o.join(r))),i.map((function(e,t){a.globals.axisCharts?function(e,t){if(o.length&&0===t&&l.push(o.join(r)),e.data&&e.data.length)for(var n=0;n<e.data.length;n++){o=[];var s=u(n);if(s||(h.isFormatXY()?s=i[t].data[n].x:h.isFormat2DArray()&&(s=i[t].data[n]?i[t].data[n][0]:"")),0===t){o.push((d=s,"datetime"===a.config.xaxis.type&&String(d).length>=10?a.config.chart.toolbar.export.csv.dateFormatter(s):x.isNumber(s)?s:s.split(r).join("")));for(var c=0;c<a.globals.series.length;c++)o.push(a.globals.series[c][n])}("candlestick"===a.config.chart.type||e.type&&"candlestick"===e.type)&&(o.pop(),o.push(a.globals.seriesCandleO[t][n]),o.push(a.globals.seriesCandleH[t][n]),o.push(a.globals.seriesCandleL[t][n]),o.push(a.globals.seriesCandleC[t][n])),("boxPlot"===a.config.chart.type||e.type&&"boxPlot"===e.type)&&(o.pop(),o.push(a.globals.seriesCandleO[t][n]),o.push(a.globals.seriesCandleH[t][n]),o.push(a.globals.seriesCandleM[t][n]),o.push(a.globals.seriesCandleL[t][n]),o.push(a.globals.seriesCandleC[t][n])),"rangeBar"===a.config.chart.type&&(o.pop(),o.push(a.globals.seriesRangeStart[t][n]),o.push(a.globals.seriesRangeEnd[t][n])),o.length&&l.push(o.join(r))}var d}(e,t):((o=[]).push(a.globals.labels[t].split(r).join("")),o.push(a.globals.series[t]),l.push(o.join(r)))})),c+=l.join(s),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+c),a.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,t,i){var r=document.createElement("a");r.href=e,r.download=(t||this.w.globals.chartID)+i,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}]),e}(),G=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.axesUtils=new $(t),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(e,[{key:"drawXaxis",value:function(){var e=this.w,t=new y(this.ctx),i=t.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),r=t.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(r);for(var n=[],s=0;s<this.xaxisLabels.length;s++)n.push(this.xaxisLabels[s]);if(this.drawXAxisLabelAndGroup(!0,t,r,n,e.globals.isXNumeric,(function(e,t){return t})),e.globals.hasGroups){var a=e.globals.groups;n=[];for(var o=0;o<a.length;o++)n.push(a[o].title);var l={};e.config.xaxis.group.style&&(l.xaxisFontSize=e.config.xaxis.group.style.fontSize,l.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,l.xaxisForeColors=e.config.xaxis.group.style.colors,l.fontWeight=e.config.xaxis.group.style.fontWeight,l.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,t,r,n,!1,(function(e,t){return a[e].cols*t}),l)}if(void 0!==e.config.xaxis.title.text){var c=t.group({class:"apexcharts-xaxis-title"}),h=t.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+e.globals.xAxisLabelsHeight+e.config.xaxis.title.offsetY,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});c.add(h),i.add(c)}if(e.config.xaxis.axisBorder.show){var d=e.globals.barPadForNumericAxis,u=t.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-d,this.offY,this.xaxisBorderWidth+d,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);i.add(u)}return i}},{key:"drawXAxisLabelAndGroup",value:function(e,t,i,r,n,s){var a,o=this,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},c=[],h=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,f=l.xaxisForeColors||this.xaxisForeColors,p=l.fontWeight||d.config.xaxis.labels.style.fontWeight,v=l.cssClass||d.config.xaxis.labels.style.cssClass,x=d.globals.padHorizontal,m=r.length,b="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(n){var y=b>1?b-1:b;a=d.globals.gridWidth/y,x=x+s(0,a)/2+d.config.xaxis.labels.offsetX}else a=d.globals.gridWidth/b,x=x+s(0,a)+d.config.xaxis.labels.offsetX;for(var w=function(n){var l=x-s(n,a)/2+d.config.xaxis.labels.offsetX;0===n&&1===m&&a/2===x&&1===b&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(r,d.globals.timescaleLabels,l,n,c,u,e),w=28;if(d.globals.rotateXLabels&&e&&(w=22),e||(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(n,y,m):o.axesUtils.checkForOverflowingLabels(n,y,m,c,h),e&&y.text&&d.globals.xaxisLabelsCount++,d.config.xaxis.labels.show){var C=t.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:p,fontSize:u,fontFamily:g,foreColor:Array.isArray(f)?e&&d.config.xaxis.convertedCatToNumeric?f[d.globals.minX+n-1]:f[n]:f,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+v});if(i.add(C),e){var S=document.createElementNS(d.globals.SVGNS,"title");S.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,C.node.appendChild(S),""!==y.text&&(c.push(y.text),h.push(y))}}n<m-1&&(x+=s(n+1,a))},C=0;C<=m-1;C++)w(C)}},{key:"drawXaxisInversed",value:function(e){var t,i,r=this,n=this.w,s=new y(this.ctx),a=n.config.yaxis[0].opposite?n.globals.translateYAxisX[e]:0,o=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),l=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+a+", 0)"});o.add(l);var c=[];if(n.config.yaxis[e].show)for(var h=0;h<this.xaxisLabels.length;h++)c.push(this.xaxisLabels[h]);t=n.globals.gridHeight/c.length,i=-t/2.2;var d=n.globals.yLabelFormatters[0],u=n.config.yaxis[0].labels;if(u.show)for(var g=function(a){var o=void 0===c[a]?"":c[a];o=d(o,{seriesIndex:e,dataPointIndex:a,w:n});var h=r.axesUtils.getYAxisForeColor(u.style.colors,e),g=0;Array.isArray(o)&&(g=o.length/2*parseInt(u.style.fontSize,10));var f=s.drawText({x:u.offsetX-15,y:i+t+u.offsetY-g,text:o,textAnchor:r.yaxis.opposite?"start":"end",foreColor:Array.isArray(h)?h[a]:h,fontSize:u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+u.style.cssClass});l.add(f);var p=document.createElementNS(n.globals.SVGNS,"title");if(p.textContent=Array.isArray(o)?o.join(" "):o,f.node.appendChild(p),0!==n.config.yaxis[e].labels.rotate){var v=s.rotateAroundCenter(f.node);f.node.setAttribute("transform","rotate(".concat(n.config.yaxis[e].labels.rotate," 0 ").concat(v.y,")"))}i+=t},f=0;f<=c.length-1;f++)g(f);if(void 0!==n.config.yaxis[0].title.text){var p=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+a+", 0)"}),v=s.drawText({x:0,y:n.globals.gridHeight/2,text:n.config.yaxis[0].title.text,textAnchor:"middle",foreColor:n.config.yaxis[0].title.style.color,fontSize:n.config.yaxis[0].title.style.fontSize,fontWeight:n.config.yaxis[0].title.style.fontWeight,fontFamily:n.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+n.config.yaxis[0].title.style.cssClass});p.add(v),o.add(p)}var x=0;this.isCategoryBarHorizontal&&n.config.yaxis[0].opposite&&(x=n.globals.gridWidth);var m=n.config.xaxis.axisBorder;if(m.show){var b=s.drawLine(n.globals.padHorizontal+m.offsetX+x,1+m.offsetY,n.globals.padHorizontal+m.offsetX+x,n.globals.gridHeight+m.offsetY,m.color,0);o.add(b)}return n.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(x,c.length,n.config.yaxis[0].axisBorder,n.config.yaxis[0].axisTicks,0,t,o),o}},{key:"drawXaxisTicks",value:function(e,t,i){var r=this.w,n=e;if(!(e<0||e-2>r.globals.gridWidth)){var s=this.offY+r.config.xaxis.axisTicks.offsetY;if(t=t+s+r.config.xaxis.axisTicks.height,"top"===r.config.xaxis.position&&(t=s-r.config.xaxis.axisTicks.height),r.config.xaxis.axisTicks.show){var a=new y(this.ctx).drawLine(e+r.config.xaxis.axisTicks.offsetX,s+r.config.xaxis.offsetY,n+r.config.xaxis.axisTicks.offsetX,t+r.config.xaxis.offsetY,r.config.xaxis.axisTicks.color);i.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,t=[],i=this.xaxisLabels.length,r=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var n=0;n<i;n++)r=this.xaxisLabels[n].position,t.push(r);else for(var s=i,a=0;a<s;a++){var o=s;e.globals.isXNumeric&&"bar"!==e.config.chart.type&&(o-=1),r+=e.globals.gridWidth/o,t.push(r)}return t}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,t=new y(this.ctx),i=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var a=0;a<r.length;a++){var o=t.rotateAroundCenter(r[a]);o.y=o.y-1,o.x=o.x+1,r[a].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(o.x," ").concat(o.y,")")),r[a].setAttribute("text-anchor","end"),i.setAttribute("transform","translate(0, ".concat(-10,")"));var l=r[a].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(l,(function(i){t.placeTextWithEllipsis(i,i.textContent,e.globals.xAxisLabelsHeight-("bottom"===e.config.legend.position?20:10))}))}else!function(){for(var i=e.globals.gridWidth/(e.globals.labels.length+1),n=0;n<r.length;n++){var s=r[n].childNodes;e.config.xaxis.labels.trim&&"datetime"!==e.config.xaxis.type&&Array.prototype.forEach.call(s,(function(e){t.placeTextWithEllipsis(e,e.textContent,i)}))}}();if(n.length>0){var c=n[n.length-1].getBBox(),h=n[0].getBBox();c.x<-20&&n[n.length-1].parentNode.removeChild(n[n.length-1]),h.x+h.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&n[0].parentNode.removeChild(n[0]);for(var d=0;d<s.length;d++)t.placeTextWithEllipsis(s[d],s[d].textContent,e.config.yaxis[0].labels.maxWidth-2*parseFloat(e.config.yaxis[0].title.style.fontSize)-20)}}}]),e}(),U=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.xaxisLabels=i.globals.labels.slice(),this.axesUtils=new $(t),this.isRangeBar=i.globals.seriesRangeBar.length,i.globals.timescaleLabels.length>0&&(this.xaxisLabels=i.globals.timescaleLabels.slice())}return o(e,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=new y(this.ctx);null===e&&(e=i.group({class:"apexcharts-grid"}));var r=i.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),n=i.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(n),e.add(r),e}},{key:"drawGrid",value:function(){var e=null;return this.w.globals.axisCharts&&(e=this.renderGrid(),this.drawGridArea(e.el)),e}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,i=new y(this.ctx),r=Array.isArray(e.config.stroke.width)?0:e.config.stroke.width;if(Array.isArray(e.config.stroke.width)){var n=0;e.config.stroke.width.forEach((function(e){n=Math.max(n,e)})),r=n}t.dom.elGridRectMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(t.cuid)),t.dom.elForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elForecastMask.setAttribute("id","forecastMask".concat(t.cuid)),t.dom.elNonForecastMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(t.cuid));var s=e.config.chart.type,a=0,o=0;("bar"===s||"rangeBar"===s||"candlestick"===s||"boxPlot"===s||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(a=e.config.grid.padding.left,o=e.config.grid.padding.right,t.barPadForNumericAxis>a&&(a=t.barPadForNumericAxis,o=t.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(-r/2-a-2,-r/2,t.gridWidth+r+o+a+4,t.gridHeight+r,0,"#fff");var l=e.globals.markers.largestSize+1;t.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,t.gridWidth+4*l,t.gridHeight+4*l,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var c=t.dom.baseEl.querySelector("defs");c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask),c.appendChild(t.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,i=e.x1,r=e.y1,n=e.x2,s=e.y2,a=e.xCount,o=e.parent,l=this.w;if(!(0===t&&l.globals.skipFirstTimelinelabel||t===a-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:r,x2:n,y2:s,parent:o});var c=0;if(l.globals.hasGroups&&(void 0===l.config.xaxis.tickAmount||"dataPoints"===l.config.xaxis.tickAmount)&&"between"===l.config.xaxis.tickPlacement){var h=l.globals.groups;if(h){for(var d=0,u=0;d<t&&u<h.length;u++)d+=h[u].cols;d===t&&(c=.6*l.globals.xAxisLabelsHeight)}}new G(this.ctx).drawXaxisTicks(i,c,this.elg)}}},{key:"_drawGridLine",value:function(e){var t=e.x1,i=e.y1,r=e.x2,n=e.y2,s=e.parent,a=this.w,o=s.node.classList.contains("apexcharts-gridlines-horizontal"),l=a.config.grid.strokeDashArray,c=a.globals.barPadForNumericAxis,h=new y(this).drawLine(t-(o?c:0),i,r+(o?c:0),n,a.config.grid.borderColor,l);h.node.classList.add("apexcharts-gridline"),s.add(h)}},{key:"_drawGridBandRect",value:function(e){var t=e.c,i=e.x1,r=e.y1,n=e.x2,s=e.y2,a=e.type,o=this.w,l=new y(this.ctx),c=o.globals.barPadForNumericAxis;if("column"!==a||"datetime"!==o.config.xaxis.type){var h=o.config.grid[a].colors[t],d=l.drawRect(i-("row"===a?c:0),r,n+("row"===a?2*c:0),s,0,h,o.config.grid[a].opacity);this.elg.add(d),d.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),d.node.classList.add("apexcharts-grid-".concat(a))}}},{key:"_drawXYLines",value:function(e){var t=this,i=e.xCount,r=e.tickAmount,n=this.w;if(n.config.grid.xaxis.lines.show||n.config.xaxis.axisTicks.show){var s,a=n.globals.padHorizontal,o=n.globals.gridHeight;n.globals.timescaleLabels.length?function(e){for(var r=e.xC,n=e.x1,s=e.y1,a=e.x2,o=e.y2,l=0;l<r;l++)n=t.xaxisLabels[l].position,a=t.xaxisLabels[l].position,t._drawGridLines({i:l,x1:n,y1:s,x2:a,y2:o,xCount:i,parent:t.elgridLinesV})}({xC:i,x1:a,y1:0,x2:s,y2:o}):(n.globals.isXNumeric&&(i=n.globals.xAxisScale.result.length),n.config.xaxis.convertedCatToNumeric&&(i=n.globals.xaxisLabelsCount),function(e){var r=e.xC,s=e.x1,a=e.y1,o=e.x2,l=e.y2;if(void 0!==n.config.xaxis.tickAmount&&"dataPoints"!==n.config.xaxis.tickAmount)n.globals.dom.baseEl.querySelectorAll(".apexcharts-text.apexcharts-xaxis-label tspan:not(:empty)").forEach((function(e,r){var n=e.getBBox();t._drawGridLines({i:r,x1:n.x+n.width/2,y1:a,x2:n.x+n.width/2,y2:l,xCount:i,parent:t.elgridLinesV})}));else for(var c=0;c<r+(n.globals.isXNumeric?0:1);c++)0===c&&1===r&&1===n.globals.dataPoints&&(o=s=n.globals.gridWidth/2),t._drawGridLines({i:c,x1:s,y1:a,x2:o,y2:l,xCount:i,parent:t.elgridLinesV}),o=s+=n.globals.gridWidth/(n.globals.isXNumeric?r-1:r)}({xC:i,x1:a,y1:0,x2:s,y2:o}))}if(n.config.grid.yaxis.lines.show){var l=0,c=0,h=n.globals.gridWidth,d=r+1;this.isRangeBar&&(d=n.globals.labels.length);for(var u=0;u<d+(this.isRangeBar?1:0);u++)this._drawGridLine({x1:0,y1:l,x2:h,y2:c,parent:this.elgridLinesH}),c=l+=n.globals.gridHeight/(this.isRangeBar?d:r)}}},{key:"_drawInvertedXYLines",value:function(e){var t=e.xCount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show)for(var r,n=i.globals.padHorizontal,s=i.globals.gridHeight,a=0;a<t+1;a++)i.config.grid.xaxis.lines.show&&this._drawGridLine({x1:n,y1:0,x2:r,y2:s,parent:this.elgridLinesV}),new G(this.ctx).drawXaxisTicks(n,0,this.elg),r=n=n+i.globals.gridWidth/t+.3;if(i.config.grid.yaxis.lines.show)for(var o=0,l=0,c=i.globals.gridWidth,h=0;h<i.globals.dataPoints+1;h++)this._drawGridLine({x1:0,y1:o,x2:c,y2:l,parent:this.elgridLinesH}),l=o+=i.globals.gridHeight/i.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,t=new y(this.ctx);this.elg=t.group({class:"apexcharts-grid"}),this.elgridLinesH=t.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=t.group({class:"apexcharts-gridlines-vertical"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide());for(var i,r=e.globals.yAxisScale.length?e.globals.yAxisScale[0].result.length-1:5,n=0;n<e.globals.series.length&&(void 0!==e.globals.yAxisScale[n]&&(r=e.globals.yAxisScale[n].result.length-1),!(r>2));n++);return!e.globals.isBarHorizontal||this.isRangeBar?(i=this.xaxisLabels.length,this.isRangeBar&&(r=e.globals.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(i=e.config.xaxis.tickAmount)),this._drawXYLines({xCount:i,tickAmount:r})):(i=r,r=e.globals.xTickAmount,this._drawInvertedXYLines({xCount:i,tickAmount:r})),this.drawGridBands(i,r),{el:this.elg,xAxisTickWidth:e.globals.gridWidth/i}}},{key:"drawGridBands",value:function(e,t){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var r=0,n=i.globals.gridHeight/t,s=i.globals.gridWidth,a=0,o=0;a<t;a++,o++)o>=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:r,x2:s,y2:n,type:"row"}),r+=i.globals.gridHeight/t;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?e:e-1,c=i.globals.padHorizontal,h=i.globals.padHorizontal+i.globals.gridWidth/l,d=i.globals.gridHeight,u=0,g=0;u<e;u++,g++)g>=i.config.grid.column.colors.length&&(g=0),this._drawGridBandRect({c:g,x1:c,y1:0,x2:h,y2:d,type:"column"}),c+=i.globals.gridWidth/l}}]),e}(),Z=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"niceScale",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4?arguments[4]:void 0,s=this.w,a=Math.abs(t-e);if("dataPoints"===(i=this._adjustTicksForSmallRange(i,r,a))&&(i=s.globals.dataPoints-1),e===Number.MIN_VALUE&&0===t||!x.isNumber(e)&&!x.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE){e=0,t=i;var o=this.linearScale(e,t,i);return o}e>t?(console.warn("axis.min cannot be greater than axis.max"),t=e+.1):e===t&&(e=0===e?0:e-.5,t=0===t?2:t+.5);var l=[];a<1&&n&&("candlestick"===s.config.chart.type||"candlestick"===s.config.series[r].type||"boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[r].type||s.globals.isRangeData)&&(t*=1.01);var c=i+1;c<2?c=2:c>2&&(c-=2);var h=a/c,d=Math.floor(x.log10(h)),u=Math.pow(10,d),g=Math.round(h/u);g<1&&(g=1);var f=g*u,p=f*Math.floor(e/f),v=f*Math.ceil(t/f),m=p;if(n&&a>2){for(;l.push(m),!((m+=f)>v););return{result:l,niceMin:l[0],niceMax:l[l.length-1]}}var b=e;(l=[]).push(b);for(var y=Math.abs(t-e)/i,w=0;w<=i;w++)b+=y,l.push(b);return l[l.length-2]>=t&&l.pop(),{result:l,niceMin:l[0],niceMax:l[l.length-1]}}},{key:"linearScale",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length>3?arguments[3]:void 0,n=Math.abs(t-e);"dataPoints"===(i=this._adjustTicksForSmallRange(i,r,n))&&(i=this.w.globals.dataPoints-1);var s=n/i;i===Number.MAX_VALUE&&(i=10,s=1);for(var a=[],o=e;i>=0;)a.push(o),o+=s,i-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScale",value:function(e,t,i){for(var r=[],n=Math.ceil(Math.log(t)/Math.log(i))+1,s=0;s<n;s++)r.push(Math.pow(i,s));return 0===e&&r.unshift(e),{result:r,niceMin:r[0],niceMax:r[r.length-1]}}},{key:"_adjustTicksForSmallRange",value:function(e,t,i){var r=e;if(void 0!==t&&this.w.config.yaxis[t].labels.formatter&&void 0===this.w.config.yaxis[t].tickAmount){var n=this.w.config.yaxis[t].labels.formatter(1);x.isNumber(Number(n))&&!x.isFloat(n)&&(r=Math.ceil(i))}return r<e?r:e}},{key:"setYScaleForIndex",value:function(e,t,i){var r=this.w.globals,n=this.w.config,s=r.isBarHorizontal?n.xaxis:n.yaxis[e];void 0===r.yAxisScale[e]&&(r.yAxisScale[e]=[]);var a=Math.abs(i-t);if(s.logarithmic&&a<=5&&(r.invalidLogScale=!0),s.logarithmic&&a>5)r.allSeriesCollapsed=!1,r.yAxisScale[e]=this.logarithmicScale(t,i,s.logBase);else if(i!==-Number.MAX_VALUE&&x.isNumber(i))if(r.allSeriesCollapsed=!1,void 0===s.min&&void 0===s.max||s.forceNiceScale){var o=void 0===n.yaxis[e].max&&void 0===n.yaxis[e].min||n.yaxis[e].forceNiceScale;r.yAxisScale[e]=this.niceScale(t,i,s.tickAmount?s.tickAmount:a<5&&a>1?a+1:5,e,o)}else r.yAxisScale[e]=this.linearScale(t,i,s.tickAmount,e);else r.yAxisScale[e]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(e,t){var i=this.w,r=i.globals,n=i.config.xaxis,s=Math.abs(t-e);return t!==-Number.MAX_VALUE&&x.isNumber(t)?r.xAxisScale=this.linearScale(e,t,n.tickAmount?n.tickAmount:s<5&&s>1?s+1:5,0):r.xAxisScale=this.linearScale(0,5,5),r.xAxisScale}},{key:"setMultipleYScales",value:function(){var e=this,t=this.w.globals,i=this.w.config,r=t.minYArr.concat([]),n=t.maxYArr.concat([]),s=[];i.yaxis.forEach((function(t,a){var o=a;i.series.forEach((function(e,i){e.name===t.seriesName&&(o=i,a!==i?s.push({index:i,similarIndex:a,alreadyExists:!0}):s.push({index:i}))}));var l=r[o],c=n[o];e.setYScaleForIndex(a,l,c)})),this.sameScaleInMultipleAxes(r,n,s)}},{key:"sameScaleInMultipleAxes",value:function(e,t,i){var r=this,n=this.w.config,s=this.w.globals,a=[];i.forEach((function(e){e.alreadyExists&&(void 0===a[e.index]&&(a[e.index]=[]),a[e.index].push(e.index),a[e.index].push(e.similarIndex))})),s.yAxisSameScaleIndices=a,a.forEach((function(e,t){a.forEach((function(i,r){var n,s;t!==r&&(n=e,s=i,n.filter((function(e){return-1!==s.indexOf(e)}))).length>0&&(a[t]=a[t].concat(a[r]))}))}));var o=a.map((function(e){return e.filter((function(t,i){return e.indexOf(t)===i}))})).map((function(e){return e.sort()}));a=a.filter((function(e){return!!e}));var l=o.slice(),c=l.map((function(e){return JSON.stringify(e)}));l=l.filter((function(e,t){return c.indexOf(JSON.stringify(e))===t}));var h=[],d=[];e.forEach((function(e,i){l.forEach((function(r,n){r.indexOf(i)>-1&&(void 0===h[n]&&(h[n]=[],d[n]=[]),h[n].push({key:i,value:e}),d[n].push({key:i,value:t[i]}))}))}));var u=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),g=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);h.forEach((function(e,t){e.forEach((function(e,i){u[t]=Math.min(e.value,u[t])}))})),d.forEach((function(e,t){e.forEach((function(e,i){g[t]=Math.max(e.value,g[t])}))})),e.forEach((function(e,t){d.forEach((function(e,i){var a=u[i],o=g[i];n.chart.stacked&&(o=0,e.forEach((function(e,t){e.value!==-Number.MAX_VALUE&&(o+=e.value),a!==Number.MIN_VALUE&&(a+=h[i][t].value)}))),e.forEach((function(i,l){e[l].key===t&&(void 0!==n.yaxis[t].min&&(a="function"==typeof n.yaxis[t].min?n.yaxis[t].min(s.minY):n.yaxis[t].min),void 0!==n.yaxis[t].max&&(o="function"==typeof n.yaxis[t].max?n.yaxis[t].max(s.maxY):n.yaxis[t].max),r.setYScaleForIndex(t,a,o))}))}))}))}},{key:"autoScaleY",value:function(e,t,i){e||(e=this);var r=e.w;if(r.globals.isMultipleYAxis||r.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),t;var n=r.globals.seriesX[0],s=r.config.chart.stacked;return t.forEach((function(e,a){for(var o=0,l=0;l<n.length;l++)if(n[l]>=i.xaxis.min){o=l;break}var c,h,d=r.globals.minYArr[a],u=r.globals.maxYArr[a],g=r.globals.stackedSeriesTotals;r.globals.series.forEach((function(a,l){var f=a[o];s?(f=g[o],c=h=f,g.forEach((function(e,t){n[t]<=i.xaxis.max&&n[t]>=i.xaxis.min&&(e>h&&null!==e&&(h=e),a[t]<c&&null!==a[t]&&(c=a[t]))}))):(c=h=f,a.forEach((function(e,t){if(n[t]<=i.xaxis.max&&n[t]>=i.xaxis.min){var s=e,a=e;r.globals.series.forEach((function(i,r){null!==e&&(s=Math.min(i[t],s),a=Math.max(i[t],a))})),a>h&&null!==a&&(h=a),s<c&&null!==s&&(c=s)}}))),void 0===c&&void 0===h&&(c=d,h=u),(h*=h<0?.9:1.1)<0&&h<u&&(h=u),(c*=c<0?1.1:.9)<0&&c>d&&(c=d),t.length>1?(t[l].min=void 0===e.min?c:e.min,t[l].max=void 0===e.max?h:e.max):(t[0].min=void 0===e.min?c:e.min,t[0].max=void 0===e.max?h:e.max)}))})),t}}]),e}(),q=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.scales=new Z(t)}return o(e,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var t=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,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w.config,s=this.w.globals,a=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===r&&(r=e+1);var l=s.series,c=l,h=l;"candlestick"===n.chart.type?(c=s.seriesCandleL,h=s.seriesCandleH):"boxPlot"===n.chart.type?(c=s.seriesCandleO,h=s.seriesCandleC):s.isRangeData&&(c=s.seriesRangeStart,h=s.seriesRangeEnd);for(var d=e;d<r;d++){s.dataPoints=Math.max(s.dataPoints,l[d].length),s.categoryLabels.length&&(s.dataPoints=s.categoryLabels.filter((function(e){return void 0!==e})).length);for(var u=0;u<s.series[d].length;u++){var g=l[d][u];null!==g&&x.isNumber(g)?(void 0!==h[d][u]&&(a=Math.max(a,h[d][u]),t=Math.min(t,h[d][u])),void 0!==c[d][u]&&(t=Math.min(t,c[d][u]),i=Math.max(i,c[d][u])),"candlestick"!==this.w.config.chart.type&&"boxPlot"!==this.w.config.chart.type||(void 0!==s.seriesCandleC[d][u]&&(a=Math.max(a,s.seriesCandleO[d][u]),a=Math.max(a,s.seriesCandleH[d][u]),a=Math.max(a,s.seriesCandleL[d][u]),a=Math.max(a,s.seriesCandleC[d][u]),"boxPlot"===this.w.config.chart.type&&(a=Math.max(a,s.seriesCandleM[d][u]))),!n.series[d].type||"candlestick"===n.series[d].type&&"boxPlot"===n.series[d].type||(a=Math.max(a,s.series[d][u]),t=Math.min(t,s.series[d][u])),i=a),s.seriesGoals[d]&&s.seriesGoals[d][u]&&Array.isArray(s.seriesGoals[d][u])&&s.seriesGoals[d][u].forEach((function(e){o!==Number.MIN_VALUE&&(o=Math.min(o,e.value),t=o),a=Math.max(a,e.value),i=a})),x.isFloat(g)&&(g=x.noExponents(g),s.yValueDecimal=Math.max(s.yValueDecimal,g.toString().split(".")[1].length)),o>c[d][u]&&c[d][u]<0&&(o=c[d][u])):s.hasNullValues=!0}}return"rangeBar"===n.chart.type&&s.seriesRangeStart.length&&s.isBarHorizontal&&(o=t),"bar"===n.chart.type&&(o<0&&a<0&&(a=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:a,lowestY:t,highestY:i}}},{key:"setYRange",value:function(){var e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var i=Number.MAX_VALUE;if(e.isMultipleYAxis)for(var r=0;r<e.series.length;r++){var n=this.getMinYMaxY(r,i,null,r+1);e.minYArr.push(n.minY),e.maxYArr.push(n.maxY),i=n.lowestY}var s=this.getMinYMaxY(0,i,null,e.series.length);if(e.minY=s.minY,e.maxY=s.maxY,i=s.lowestY,t.chart.stacked&&this._setStackedMinMax(),("line"===t.chart.type||"area"===t.chart.type||"candlestick"===t.chart.type||"boxPlot"===t.chart.type||"rangeBar"===t.chart.type&&!e.isBarHorizontal)&&e.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==e.maxY){var a=e.maxY-i;(i>=0&&i<=10||void 0!==t.yaxis[0].min||void 0!==t.yaxis[0].max)&&(a=0),e.minY=i-5*a/100,i>0&&e.minY<0&&(e.minY=0),e.maxY=e.maxY+5*a/100}return t.yaxis.forEach((function(t,i){void 0!==t.max&&("number"==typeof t.max?e.maxYArr[i]=t.max:"function"==typeof t.max&&(e.maxYArr[i]=t.max(e.isMultipleYAxis?e.maxYArr[i]:e.maxY)),e.maxY=e.maxYArr[i]),void 0!==t.min&&("number"==typeof t.min?e.minYArr[i]=t.min:"function"==typeof t.min&&(e.minYArr[i]=t.min(e.isMultipleYAxis?e.minYArr[i]===Number.MIN_VALUE?0:e.minYArr[i]:e.minY)),e.minY=e.minYArr[i])})),e.isBarHorizontal&&["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&"number"==typeof t.xaxis[i]&&("min"===i?e.minY=t.xaxis[i]:e.maxY=t.xaxis[i])})),e.isMultipleYAxis?(this.scales.setMultipleYScales(),e.minY=i,e.yAxisScale.forEach((function(t,i){e.minYArr[i]=t.niceMin,e.maxYArr[i]=t.niceMax}))):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.yAxisScale[0].niceMin,e.maxYArr[0]=e.yAxisScale[0].niceMax),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,t=this.w.config,i="numeric"===t.xaxis.type||"datetime"===t.xaxis.type||"category"===t.xaxis.type&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var t=0;t<e.series.length;t++)if(e.labels[t])for(var i=0;i<e.labels[t].length;i++)null!==e.labels[t][i]&&x.isNumber(e.labels[t][i])&&(e.maxX=Math.max(e.maxX,e.labels[t][i]),e.initialMaxX=Math.max(e.maxX,e.labels[t][i]),e.minX=Math.min(e.minX,e.labels[t][i]),e.initialMinX=Math.min(e.minX,e.labels[t][i]))}(),e.noLabelsProvided&&0===t.xaxis.categories.length&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var r;if(void 0===t.xaxis.tickAmount?(r=Math.round(e.svgWidth/150),"numeric"===t.xaxis.type&&e.dataPoints<30&&(r=e.dataPoints-1),r>e.dataPoints&&0!==e.dataPoints&&(r=e.dataPoints-1)):"dataPoints"===t.xaxis.tickAmount?(e.series.length>1&&(r=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric&&(r=e.maxX-e.minX-1)):r=t.xaxis.tickAmount,e.xTickAmount=r,void 0!==t.xaxis.max&&"number"==typeof t.xaxis.max&&(e.maxX=t.xaxis.max),void 0!==t.xaxis.min&&"number"==typeof t.xaxis.min&&(e.minX=t.xaxis.min),void 0!==t.xaxis.range&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var n=[],s=e.minX-1;s<e.maxX;s++)n.push(s+1);e.xAxisScale={result:n,niceMin:n[0],niceMax:n[n.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(1,r,r),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,r-1),e.seriesX=e.labels.slice());i&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ)for(var t=0;t<e.series.length;t++)if(void 0!==e.seriesZ[t])for(var i=0;i<e.seriesZ[t].length;i++)null!==e.seriesZ[t][i]&&x.isNumber(e.seriesZ[t][i])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[t][i]),e.minZ=Math.min(e.minZ,e.seriesZ[t][i]))}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){var i=new D(this.ctx);if("datetime"===t.xaxis.type){var r=i.getDate(e.minX);t.xaxis.labels.datetimeUTC?r.setUTCDate(r.getUTCDate()-2):r.setDate(r.getDate()-2),e.minX=new Date(r).getTime();var n=i.getDate(e.maxX);t.xaxis.labels.datetimeUTC?n.setUTCDate(n.getUTCDate()+2):n.setDate(n.getDate()+2),e.maxX=new Date(n).getTime()}else("numeric"===t.xaxis.type||"category"===t.xaxis.type&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach((function(t,i){1===t.length&&t.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var r=t.slice();r.sort((function(e,t){return e-t})),r.forEach((function(t,i){if(i>0){var n=t-r[i-1];n>0&&(e.minXDiff=Math.min(n,e.minXDiff))}})),1!==e.dataPoints&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var e=this.w.globals,t=[],i=[];if(e.series.length)for(var r=0;r<e.series[e.maxValsInArrayIndex].length;r++)for(var n=0,s=0,a=0;a<e.series.length;a++)null!==e.series[a][r]&&x.isNumber(e.series[a][r])&&(e.series[a][r]>0?n=n+parseFloat(e.series[a][r])+1e-4:s+=parseFloat(e.series[a][r])),a===e.series.length-1&&(t.push(n),i.push(s));for(var o=0;o<t.length;o++)e.maxY=Math.max(e.maxY,t[o]),e.minY=Math.min(e.minY,i[o])}}]),e}(),K=function(){function e(t){s(this,e),this.ctx=t,this.w=t.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 $(t)}return o(e,[{key:"drawYaxis",value:function(e){var t=this,i=this.w,r=new y(this.ctx),n=i.config.yaxis[e].labels.style,s=n.fontSize,a=n.fontFamily,o=n.fontWeight,l=r.group({class:"apexcharts-yaxis",rel:e,transform:"translate("+i.globals.translateYAxisX[e]+", 0)"});if(this.axesUtils.isYAxisHidden(e))return l;var c=r.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var h=i.globals.yAxisScale[e].result.length-1,d=i.globals.gridHeight/h,u=i.globals.translateY,g=i.globals.yLabelFormatters[e],f=i.globals.yAxisScale[e].result.slice();f=this.axesUtils.checkForReversedLabels(e,f);var p="";if(i.config.yaxis[e].labels.show)for(var v=function(l){var v=f[l];v=g(v,l,i);var x=i.config.yaxis[e].labels.padding;i.config.yaxis[e].opposite&&0!==i.config.yaxis.length&&(x*=-1);var m=t.axesUtils.getYAxisForeColor(n.colors,e),b=r.drawText({x:x,y:u+h/10+i.config.yaxis[e].labels.offsetY+1,text:v,textAnchor:i.config.yaxis[e].opposite?"start":"end",fontSize:s,fontFamily:a,fontWeight:o,foreColor:Array.isArray(m)?m[l]:m,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+n.cssClass});l===h&&(p=b),c.add(b);var y=document.createElementNS(i.globals.SVGNS,"title");if(y.textContent=Array.isArray(v)?v.join(" "):v,b.node.appendChild(y),0!==i.config.yaxis[e].labels.rotate){var w=r.rotateAroundCenter(p.node),C=r.rotateAroundCenter(b.node);b.node.setAttribute("transform","rotate(".concat(i.config.yaxis[e].labels.rotate," ").concat(w.x," ").concat(C.y,")"))}u+=d},x=h;x>=0;x--)v(x);if(void 0!==i.config.yaxis[e].title.text){var m=r.group({class:"apexcharts-yaxis-title"}),b=0;i.config.yaxis[e].opposite&&(b=i.globals.translateYAxisX[e]);var w=r.drawText({x:b,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[e].title.offsetY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].title.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,fontWeight:i.config.yaxis[e].title.style.fontWeight,fontFamily:i.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});m.add(w),l.add(m)}var C=i.config.yaxis[e].axisBorder,S=31+C.offsetX;if(i.config.yaxis[e].opposite&&(S=-31-C.offsetX),C.show){var k=r.drawLine(S,i.globals.translateY+C.offsetY-2,S,i.globals.gridHeight+i.globals.translateY+C.offsetY+2,C.color,0,C.width);l.add(k)}return i.config.yaxis[e].axisTicks.show&&this.axesUtils.drawYAxisTicks(S,h,C,i.config.yaxis[e].axisTicks,e,d,l),l}},{key:"drawYaxisInversed",value:function(e){var t=this.w,i=new y(this.ctx),r=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),n=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});r.add(n);var s=t.globals.yAxisScale[e].result.length-1,a=t.globals.gridWidth/s+.1,o=a+t.config.xaxis.labels.offsetX,l=t.globals.xLabelFormatter,c=t.globals.yAxisScale[e].result.slice(),h=t.globals.timescaleLabels;h.length>0&&(this.xaxisLabels=h.slice(),s=(c=h.slice()).length),c=this.axesUtils.checkForReversedLabels(e,c);var d=h.length;if(t.config.xaxis.labels.show)for(var u=d?0:s;d?u<d:u>=0;d?u++:u--){var g=c[u];g=l(g,u,t);var f=t.globals.gridWidth+t.globals.padHorizontal-(o-a+t.config.xaxis.labels.offsetX);if(h.length){var p=this.axesUtils.getLabel(c,h,f,u,this.drawnLabels,this.xaxisFontSize);f=p.x,g=p.text,this.drawnLabels.push(p.text),0===u&&t.globals.skipFirstTimelinelabel&&(g=""),u===c.length-1&&t.globals.skipLastTimelinelabel&&(g="")}var v=i.drawText({x:f,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-("top"===t.config.xaxis.position?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:g,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});n.add(v),v.tspan(g);var x=document.createElementNS(t.globals.SVGNS,"title");x.textContent=g,v.node.appendChild(x),o+=a}return this.inversedYAxisTitleText(r),this.inversedYAxisBorder(r),r}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,i=new y(this.ctx),r=t.config.xaxis.axisBorder;if(r.show){var n=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(n-=15);var s=i.drawLine(t.globals.padHorizontal+n+r.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,r.color,0,r.height);e.add(s)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,i=new y(this.ctx);if(void 0!==t.config.xaxis.title.text){var r=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),n=i.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,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});r.add(n),e.add(r)}}},{key:"yAxisTitleRotate",value:function(e,t){var i=this.w,r=new y(this.ctx),n={width:0,height:0},s={width:0,height:0},a=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g"));null!==a&&(n=a.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text"));if(null!==o&&(s=o.getBoundingClientRect()),null!==o){var l=this.xPaddingForYAxisTitle(e,n,s,t);o.setAttribute("x",l.xPos-(t?10:0))}if(null!==o){var c=r.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(t?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,i,r){var n=this.w,s=0,a=0,o=10;return void 0===n.config.yaxis[e].title.text||e<0?{xPos:a,padd:0}:(r?(a=t.width+n.config.yaxis[e].title.offsetX+i.width/2+o/2,0===(s+=1)&&(a-=o/2)):(a=-1*t.width+n.config.yaxis[e].title.offsetX+o/2+i.width/2,n.globals.isBarHorizontal&&(o=25,a=-1*t.width-n.config.yaxis[e].title.offsetX-o)),{xPos:a,padd:o})}},{key:"setYAxisXPosition",value:function(e,t){var i=this.w,r=0,n=0,s=18,a=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map((function(o,l){var c=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!o.show||o.floating||0===e[l].width,h=e[l].width+t[l].width;o.opposite?i.globals.isBarHorizontal?(n=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=n-o.labels.offsetX):(n=i.globals.gridWidth+i.globals.translateX+a,c||(a=a+h+20),i.globals.translateYAxisX[l]=n-o.labels.offsetX+20):(r=i.globals.translateX-s,c||(s=s+h+20),i.globals.translateYAxisX[l]=r+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(t=x.listToArray(t)).forEach((function(t,i){var r=e.config.yaxis[i];if(r&&void 0!==r.labels.align){var n=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"));s=x.listToArray(s);var a=n.getBoundingClientRect();"left"===r.labels.align?(s.forEach((function(e,t){e.setAttribute("text-anchor","start")})),r.opposite||n.setAttribute("transform","translate(-".concat(a.width,", 0)"))):"center"===r.labels.align?(s.forEach((function(e,t){e.setAttribute("text-anchor","middle")})),n.setAttribute("transform","translate(".concat(a.width/2*(r.opposite?1:-1),", 0)"))):"right"===r.labels.align&&(s.forEach((function(e,t){e.setAttribute("text-anchor","end")})),r.opposite&&n.setAttribute("transform","translate(".concat(a.width,", 0)")))}}))}}]),e}(),J=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.documentEvent=x.bind(this.documentEvent,this)}return o(e,[{key:"addEventListener",value:function(e,t){var i=this.w;i.globals.events.hasOwnProperty(e)?i.globals.events[e].push(t):i.globals.events[e]=[t]}},{key:"removeEventListener",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){var r=i.globals.events[e].indexOf(t);-1!==r&&i.globals.events[e].splice(r,1)}}},{key:"fireEvent",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){t&&t.length||(t=[]);for(var r=i.globals.events[e],n=r.length,s=0;s<n;s++)r[s].apply(null,t)}}},{key:"setupEventHandlers",value:function(){var e=this,t=this.w,i=this.ctx,r=t.globals.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach((function(e){r.addEventListener(e,(function(e){var r=Object.assign({},t,{seriesIndex:t.globals.capturedSeriesIndex,dataPointIndex:t.globals.capturedDataPointIndex});"mousemove"===e.type||"touchmove"===e.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(e,i,r):"mouseleave"===e.type||"touchleave"===e.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(e,i,r):("mouseup"===e.type&&1===e.which||"touchend"===e.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(e,i,r),i.ctx.events.fireEvent("click",[e,i,r]))}),{capture:!1,passive:!0})})),this.ctx.eventList.forEach((function(i){t.globals.dom.baseEl.addEventListener(i,e.documentEvent,{passive:!0})})),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var t=this.w,i=e.target.className;if("click"===e.type){var r=t.globals.dom.baseEl.querySelector(".apexcharts-menu");r&&r.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==i&&r.classList.remove("apexcharts-menu-open")}t.globals.clientX="touchmove"===e.type?e.touches[0].clientX:e.clientX,t.globals.clientY="touchmove"===e.type?e.touches[0].clientY:e.clientY}}]),e}(),Q=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"setCurrentLocaleValues",value:function(e){var t=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=t.filter((function(t){return t.name===e}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var r=x.extend(A,i);this.w.globals.locale=r.options}}]),e}(),ee=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"drawAxis",value:function(e,t){var i,r,n=this.w.globals,s=this.w.config,a=new G(this.ctx),o=new K(this.ctx);n.axisCharts&&"radar"!==e&&(n.isBarHorizontal?(r=o.drawYaxisInversed(0),i=a.drawXaxisInversed(0),n.dom.elGraphical.add(i),n.dom.elGraphical.add(r)):(i=a.drawXaxis(),n.dom.elGraphical.add(i),s.yaxis.map((function(e,t){-1===n.ignoreYAxisIndexes.indexOf(t)&&(r=o.drawYaxis(t),n.dom.Paper.add(r))}))))}}]),e}(),te=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new y(this.ctx),i=new b(this.ctx),r=e.config.xaxis.crosshairs.fill.gradient,n=e.config.xaxis.crosshairs.dropShadow,s=e.config.xaxis.crosshairs.fill.type,a=r.colorFrom,o=r.colorTo,l=r.opacityFrom,c=r.opacityTo,h=r.stops,d=n.enabled,u=n.left,g=n.top,f=n.blur,p=n.color,v=n.opacity,m=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){"gradient"===s&&(m=t.drawGradient("vertical",a,o,l,c,null,h,null));var w=t.drawRect();1===e.config.xaxis.crosshairs.width&&(w=t.drawLine());var C=e.globals.gridHeight;(!x.isNumber(C)||C<0)&&(C=0);var S=e.config.xaxis.crosshairs.width;(!x.isNumber(S)||S<0)&&(S=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:C,width:S,height:C,fill:m,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),d&&(w=i.dropShadow(w,{left:u,top:g,blur:f,color:p,opacity:v})),e.globals.dom.elGraphical.add(w)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new y(this.ctx),i=e.config.yaxis[0].crosshairs,r=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var n=t.drawLine(-r,0,e.globals.gridWidth+r,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);n.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(n)}var s=t.drawLine(-r,0,e.globals.gridWidth+r,0,i.stroke.color,0,0);s.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(s)}}]),e}(),ie=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"checkResponsiveConfig",value:function(e){var t=this,i=this.w,r=i.config;if(0!==r.responsive.length){var n=r.responsive.slice();n.sort((function(e,t){return e.breakpoint>t.breakpoint?1:t.breakpoint>e.breakpoint?-1:0})).reverse();var s=new X({}),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n[0].breakpoint,a=window.innerWidth>0?window.innerWidth:screen.width;if(a>r){var o=w.extendArrayProps(s,i.globals.initialConfig,i);e=x.extend(o,e),e=x.extend(i.config,e),t.overrideResponsiveOptions(e)}else for(var l=0;l<n.length;l++)a<n[l].breakpoint&&(e=w.extendArrayProps(s,n[l].options,i),e=x.extend(i.config,e),t.overrideResponsiveOptions(e))};if(e){var o=w.extendArrayProps(s,e,i);o=x.extend(i.config,o),a(o=x.extend(o,e))}else a({})}}},{key:"overrideResponsiveOptions",value:function(e){var t=new X(e).init({responsiveOverride:!0});this.w.config=t}}]),e}(),re=function(){function e(t){s(this,e),this.ctx=t,this.colors=[],this.w=t.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(e,[{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this,t=this.w,i=new x;if(t.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(t.config.theme.mode)),void 0===t.config.colors?t.globals.colors=this.predefined():(t.globals.colors=t.config.colors,Array.isArray(t.config.colors)&&t.config.colors.length>0&&"function"==typeof t.config.colors[0]&&(t.globals.colors=t.config.series.map((function(i,r){var n=t.config.colors[r];return n||(n=t.config.colors[0]),"function"==typeof n?(e.isColorFn=!0,n({value:t.globals.axisCharts?t.globals.series[r][0]?t.globals.series[r][0]:0:t.globals.series[r],seriesIndex:r,dataPointIndex:r,w:t})):n})))),t.globals.seriesColors.map((function(e,i){e&&(t.globals.colors[i]=e)})),t.config.theme.monochrome.enabled){var r=[],n=t.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(n=t.globals.series[0].length*t.globals.series.length);for(var s=t.config.theme.monochrome.color,a=1/(n/t.config.theme.monochrome.shadeIntensity),o=t.config.theme.monochrome.shadeTo,l=0,c=0;c<n;c++){var h=void 0;"dark"===o?(h=i.shadeColor(-1*l,s),l+=a):(h=i.shadeColor(l,s),l+=a),r.push(h)}t.globals.colors=r.slice()}var d=t.globals.colors.slice();this.pushExtraColors(t.globals.colors),["fill","stroke"].forEach((function(i){void 0===t.config[i].colors?t.globals[i].colors=e.isColorFn?t.config.colors:d:t.globals[i].colors=t.config[i].colors.slice(),e.pushExtraColors(t.globals[i].colors)})),void 0===t.config.dataLabels.style.colors?t.globals.dataLabels.style.colors=d:t.globals.dataLabels.style.colors=t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50),void 0===t.config.plotOptions.radar.polygons.fill.colors?t.globals.radarPolygons.fill.colors=["dark"===t.config.theme.mode?"#424242":"none"]:t.globals.radarPolygons.fill.colors=t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20),void 0===t.config.markers.colors?t.globals.markers.colors=d:t.globals.markers.colors=t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.w,n=t||r.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===r.config.chart.type&&r.config.plotOptions.heatmap.colorScale.inverse),i&&r.globals.series.length&&(n=r.globals.series[r.globals.maxValsInArrayIndex].length*r.globals.series.length),e.length<n)for(var s=n-e.length,a=0;a<s;a++)e.push(e[a])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var t=e.theme.mode||"light",i=e.theme.palette?e.theme.palette:"dark"===t?"palette4":"palette1",r=e.chart.foreColor?e.chart.foreColor:"dark"===t?"#f6f7f8":"#373d3f";return e.tooltip.theme=t,e.chart.foreColor=r,e.theme.palette=i,e}},{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}}]),e}(),ne=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var t=this.w,i="title"===e?t.config.title:t.config.subtitle,r=t.globals.svgWidth/2,n=i.offsetY,s="middle";if("left"===i.align?(r=10,s="start"):"right"===i.align&&(r=t.globals.svgWidth-10,s="end"),r+=i.offsetX,n=n+parseInt(i.style.fontSize,10)+i.margin/2,void 0!==i.text){var a=new y(this.ctx).drawText({x:r,y:n,text:i.text,textAnchor:s,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});a.node.setAttribute("class","apexcharts-".concat(e,"-text")),t.globals.dom.Paper.add(a)}}}]),e}(),se=function(){function e(t){s(this,e),this.w=t.w,this.dCtx=t}return o(e,[{key:"getTitleSubtitleCoords",value:function(e){var t=this.w,i=0,r=0,n="title"===e?t.config.title.floating:t.config.subtitle.floating,s=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(null!==s&&!n){var a=s.getBoundingClientRect();i=a.width,r=t.globals.axisCharts?a.height+5:a.height}return{width:i,height:r}}},{key:"getLegendsRect",value:function(){var e=this.w,t=e.globals.dom.baseEl.querySelector(".apexcharts-legend");e.config.legend.height||"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||(t.style.maxHeight=e.globals.svgHeight/2+"px");var i=Object.assign({},x.getBoundingClientRect(t));return null!==t&&!e.config.legend.floating&&e.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"!==e.config.legend.position&&"right"!==e.config.legend.position||1.5*this.dCtx.lgRect.width>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(e,t){var i=e;if(this.w.globals.isMultiLineX){var r=t.map((function(e,t){return Array.isArray(e)?e.length:1})),n=Math.max.apply(Math,f(r));i=t[r.indexOf(n)]}return i}}]),e}(),ae=function(){function e(t){s(this,e),this.w=t.w,this.dCtx=t}return o(e,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,i=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=t.globals.categoryLabels),t.globals.timescaleLabels.length>0){var r=this.getxAxisTimeScaleLabelsCoords();e={width:r.width,height:r.height},t.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;var n=t.globals.xLabelFormatter,s=x.getLargestStringFromArr(i),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(s,i);t.globals.isBarHorizontal&&(a=s=t.globals.yAxisScale[0].result.reduce((function(e,t){return e.length>t.length?e:t}),0));var o=new j(this.dCtx.ctx),l=s;s=o.xLabelFormat(n,s,l,{i:void 0,dateFormatter:new D(this.dCtx.ctx).formatDate,w:t}),a=o.xLabelFormat(n,a,l,{i:void 0,dateFormatter:new D(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===s||""===String(s).trim())&&(a=s="1");var c=new y(this.dCtx.ctx),h=c.getTextRects(s,t.config.xaxis.labels.style.fontSize),d=h;if(s!==a&&(d=c.getTextRects(a,t.config.xaxis.labels.style.fontSize)),(e={width:h.width>=d.width?h.width:d.width,height:h.height>=d.height?h.height:d.height}).width*i.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.globals.rotateXLabels=!0;var u=function(e){return c.getTextRects(e,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};h=u(s),s!==a&&(d=u(a)),e.height=(h.height>d.height?h.height:d.height)/1.5,e.width=h.width>d.width?h.width:d.width}}else t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,t=this.w;if(!t.globals.hasGroups)return{width:0,height:0};var i,r=(null===(e=t.config.xaxis.group.style)||void 0===e?void 0:e.fontSize)||t.config.xaxis.labels.style.fontSize,n=t.globals.groups.map((function(e){return e.title})),s=x.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(s,n),o=new y(this.dCtx.ctx),l=o.getTextRects(s,r),c=l;return s!==a&&(c=o.getTextRects(a,r)),i={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},t.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,t=0,i=0;if(void 0!==e.config.xaxis.title.text){var r=new y(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=r.width,i=r.height}return{width:t,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,t=this.w;this.dCtx.timescaleLabels=t.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(e){return e.value})),r=i.reduce((function(e,t){return void 0===e?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):e.length>t.length?e:t}),0);return 1.05*(e=new y(this.dCtx.ctx).getTextRects(r,t.config.xaxis.labels.style.fontSize)).width*i.length>t.globals.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,i=this.w,r=i.globals,n=i.config,s=n.xaxis.type,a=e.width;r.skipLastTimelinelabel=!1,r.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(e,o){(function(e){return-1!==r.collapsedSeriesIndices.indexOf(e)})(o)||function(e){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var o=t.dCtx.timescaleLabels[0],l=t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+a/1.75-t.dCtx.yAxisWidthRight,c=o.position-a/1.75+t.dCtx.yAxisWidthLeft,h="right"===i.config.legend.position&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0;l>r.svgWidth-r.translateX-h&&(r.skipLastTimelinelabel=!0),c<-(e.show&&!e.floating||"bar"!==n.chart.type&&"candlestick"!==n.chart.type&&"rangeBar"!==n.chart.type&&"boxPlot"!==n.chart.type?10:a/1.75)&&(r.skipFirstTimelinelabel=!0)}else"datetime"===s?t.dCtx.gridPad.right<a&&!r.rotateXLabels&&(r.skipLastTimelinelabel=!0):"datetime"!==s&&t.dCtx.gridPad.right<a/2-t.dCtx.yAxisWidthRight&&!r.rotateXLabels&&!i.config.xaxis.labels.trim&&("between"!==i.config.xaxis.tickPlacement||i.globals.isBarHorizontal)&&(t.dCtx.xPadRight=a/2+1)}(e)};n.yaxis.forEach((function(e,i){o?(t.dCtx.gridPad.left<a&&(t.dCtx.xPadLeft=a/2+1),t.dCtx.xPadRight=a/2+1):l(e,i)}))}}]),e}(),oe=function(){function e(t){s(this,e),this.w=t.w,this.dCtx=t}return o(e,[{key:"getyAxisLabelsCoords",value:function(){var e=this,t=this.w,i=[],r=10,n=new $(this.dCtx.ctx);return t.config.yaxis.map((function(s,a){var o=t.globals.yAxisScale[a],l=0;if(!n.isYAxisHidden(a)&&s.labels.show&&void 0!==s.labels.minWidth&&(l=s.labels.minWidth),!n.isYAxisHidden(a)&&s.labels.show&&o.result.length){var c=t.globals.yLabelFormatters[a],h=o.niceMin===Number.MIN_VALUE?0:o.niceMin,d=String(h).length>String(o.niceMax).length?h:o.niceMax,u=c(d,{seriesIndex:a,dataPointIndex:-1,w:t}),g=u;if(void 0!==u&&0!==u.length||(u=d),t.globals.isBarHorizontal){r=0;var f=t.globals.labels.slice();u=c(u=x.getLargestStringFromArr(f),{seriesIndex:a,dataPointIndex:-1,w:t}),g=e.dCtx.dimHelpers.getLargestStringFromMultiArr(u,f)}var p=new y(e.dCtx.ctx),v="rotate(".concat(s.labels.rotate," 0 0)"),m=p.getTextRects(u,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1),b=m;u!==g&&(b=p.getTextRects(g,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1)),i.push({width:(l>b.width||l>m.width?l:b.width>m.width?b.width:m.width)+r,height:b.height>m.height?b.height:m.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,t=this.w,i=[];return t.config.yaxis.map((function(t,r){if(t.show&&void 0!==t.title.text){var n=new y(e.dCtx.ctx),s="rotate(".concat(t.title.rotate," 0 0)"),a=n.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,s,!1);i.push({width:a.width,height:a.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,i=0,r=0,n=e.globals.yAxisScale.length>1?10:0,s=new $(this.dCtx.ctx),a=function(a,o){var l=e.config.yaxis[o].floating,c=0;a.width>0&&!l?(c=a.width+n,function(t){return e.globals.ignoreYAxisIndexes.indexOf(t)>-1}(o)&&(c=c-a.width-n)):c=l||s.isYAxisHidden(o)?0:5,e.config.yaxis[o].opposite?r+=c:i+=c,t+=c};return e.globals.yLabelsCoords.map((function(e,t){a(e,t)})),e.globals.yTitleCoords.map((function(e,t){a(e,t)})),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=r,t}}]),e}(),le=function(){function e(t){s(this,e),this.w=t.w,this.dCtx=t}return o(e,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w;if(t.globals.noData||t.globals.allSeriesCollapsed)return 0;var i=function(e){return"bar"===e||"rangeBar"===e||"candlestick"===e||"boxPlot"===e},r=t.config.chart.type,n=0,s=i(r)?t.config.series.length:1;if(t.globals.comboBarCount>0&&(s=t.globals.comboBarCount),t.globals.collapsedSeries.forEach((function(e){i(e.type)&&(s-=1)})),t.config.chart.stacked&&(s=1),(i(r)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&s>0){var a,o,l=Math.abs(t.globals.initialMaxX-t.globals.initialMinX);l<=3&&(l=t.globals.dataPoints),a=l/e,t.globals.minXDiff&&t.globals.minXDiff/a>0&&(o=t.globals.minXDiff/a),o>e/2&&(o/=2),(n=o/s*parseInt(t.config.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),n=n/(s>1?1:1.5)+5,t.globals.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,i=t.globals,r=this.dCtx.isSparkline||!t.globals.axisCharts?0:10;["title","subtitle"].forEach((function(i){void 0!==t.config[i].text?r+=t.config[i].margin:r+=e.dCtx.isSparkline||!t.globals.axisCharts?0:5})),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||t.globals.axisCharts||(r+=10);var n=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),s=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-n.height-s.height-r,i.translateY=i.translateY+n.height+s.height+r}},{key:"setGridXPosForDualYAxis",value:function(e,t){var i=this.w,r=new $(this.dCtx.ctx);i.config.yaxis.map((function(n,s){-1!==i.globals.ignoreYAxisIndexes.indexOf(s)||n.floating||r.isYAxisHidden(s)||(n.opposite&&(i.globals.translateX=i.globals.translateX-(t[s].width+e[s].width)-parseInt(i.config.yaxis[s].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),e}(),ce=function(){function e(t){s(this,e),this.ctx=t,this.w=t.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 se(this),this.dimYAxis=new oe(this),this.dimXAxis=new ae(this),this.dimGrid=new le(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return o(e,[{key:"plotCoords",value:function(){var e=this,t=this.w,i=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&(t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(t){var i=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var r,n,s=[],a=!0,o=!1;try{for(i=i.call(e);!(a=(r=i.next()).done)&&(s.push(r.value),!t||s.length!==t);a=!0);}catch(e){o=!0,n=e}finally{try{a||null==i.return||i.return()}finally{if(o)throw n}}return s}}(e,t)||p(e,t)||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.")}()}(t,2),r=i[0],n=i[1];e.gridPad[r]=Math.max(n,e.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 r=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*r,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(r>0?r+4:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,t=this.w,i=t.globals,r=this.dimYAxis.getyAxisLabelsCoords(),n=this.dimYAxis.getyAxisTitleCoords();t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map((function(e,i){t.globals.yLabelsCoords.push({width:r[i].width,index:i}),t.globals.yTitleCoords.push({width:n[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var s=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(s,o,a),i.translateXAxisY=t.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=t.globals.rotateXLabels&&t.globals.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+t.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+t.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-s.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var h=10;("radar"===t.config.chart.type||this.isSparkline)&&(l=0,c=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(l=0,c=0,h=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(s);var d=function(){i.translateX=l,i.gridHeight=i.svgHeight-e.lgRect.height-c-(e.isSparkline||"treemap"===t.config.chart.type?0:t.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l};switch("top"===t.config.xaxis.position&&(h=i.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":i.translateY=h,d();break;case"top":i.translateY=this.lgRect.height+h,d();break;case"left":i.translateY=h,i.translateX=this.lgRect.width+l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l;break;case"right":i.translateY=h,i.translateX=l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(n,r),new K(this.ctx).setYAxisXPosition(r,n)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=e.config,r=0;e.config.legend.show&&!e.config.legend.floating&&(r=20);var n="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",s=i.plotOptions[n].offsetY,a=i.plotOptions[n].offsetX;if(!i.legend.show||i.legend.floating)return t.gridHeight=t.svgHeight-i.grid.padding.left+i.grid.padding.right,t.gridWidth=t.gridHeight,t.translateY=s,void(t.translateX=a+(t.svgWidth-t.gridWidth)/2);switch(i.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=s-10,t.translateX=a+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+s+10,t.translateX=a+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-r,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=s,t.translateX=a+this.lgRect.width+r;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-r-5,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=s,t.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t,i){var r=this.w,n=r.globals.hasGroups?2:1,s=i.height+e.height+t.height,a=r.globals.isMultiLineX?1.2:r.globals.LINE_HEIGHT_RATIO,o=r.globals.rotateXLabels?22:10,l=r.globals.rotateXLabels&&"bottom"===r.config.legend.position?10:0;this.xAxisHeight=s*a+n*o+l,this.xAxisWidth=e.width,this.xAxisHeight-t.height>r.config.xaxis.labels.maxHeight&&(this.xAxisHeight=r.config.xaxis.labels.maxHeight),r.config.xaxis.labels.minHeight&&this.xAxisHeight<r.config.xaxis.labels.minHeight&&(this.xAxisHeight=r.config.xaxis.labels.minHeight),r.config.xaxis.floating&&(this.xAxisHeight=0);var c=0,h=0;r.config.yaxis.forEach((function(e){c+=e.labels.minWidth,h+=e.labels.maxWidth})),this.yAxisWidth<c&&(this.yAxisWidth=c),this.yAxisWidth>h&&(this.yAxisWidth=h)}}]),e}(),he=function(){function e(t){s(this,e),this.w=t.w,this.lgCtx=t}return o(e,[{key:"getLegendStyles",value:function(){var e=document.createElement("style");e.setAttribute("type","text/css");var t=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 e.appendChild(t),e}},{key:"getLegendBBox",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),t=e.width;return{clwh:e.height,clww:t}}},{key:"appendToForeignObject",value:function(){var e=this.w.globals;e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject");var t=e.dom.elLegendForeign;t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("width",e.svgWidth),t.setAttribute("height",e.svgHeight),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.appendChild(e.dom.elLegendWrap),t.appendChild(this.getLegendStyles()),e.dom.Paper.node.insertBefore(t,e.dom.elGraphical.node)}},{key:"toggleDataSeries",value:function(e,t){var i=this,r=this.w;if(r.globals.axisCharts||"radialBar"===r.config.chart.type){r.globals.resized=!0;var n=null,s=null;r.globals.risingSeries=[],r.globals.axisCharts?(n=r.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),s=parseInt(n.getAttribute("data:realIndex"),10)):(n=r.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),s=parseInt(n.getAttribute("rel"),10)-1),t?[{cs:r.globals.collapsedSeries,csi:r.globals.collapsedSeriesIndices},{cs:r.globals.ancillaryCollapsedSeries,csi:r.globals.ancillaryCollapsedSeriesIndices}].forEach((function(e){i.riseCollapsedSeries(e.cs,e.csi,s)})):this.hideSeries({seriesEl:n,realIndex:s})}else{var a=r.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e+1,"'] path")),o=r.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=r.config.plotOptions.pie.donut.labels;new y(this.lgCtx.ctx).pathMouseDown(a.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(a.members[0].node,l)}a.fire("click")}}},{key:"hideSeries",value:function(e){var t=e.seriesEl,i=e.realIndex,r=this.w,n=x.clone(r.config.series);if(r.globals.axisCharts){var s=!1;if(r.config.yaxis[i]&&r.config.yaxis[i].show&&r.config.yaxis[i].showAlways&&(s=!0,r.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(r.globals.ancillaryCollapsedSeries.push({index:i,data:n[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),r.globals.ancillaryCollapsedSeriesIndices.push(i))),!s){r.globals.collapsedSeries.push({index:i,data:n[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),r.globals.collapsedSeriesIndices.push(i);var a=r.globals.risingSeries.indexOf(i);r.globals.risingSeries.splice(a,1)}}else r.globals.collapsedSeries.push({index:i,data:n[i]}),r.globals.collapsedSeriesIndices.push(i);for(var o=t.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"));r.globals.allSeriesCollapsed=r.globals.collapsedSeries.length===r.config.series.length,n=this._getSeriesBasedOnCollapsedState(n),this.lgCtx.ctx.updateHelpers._updateSeries(n,r.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,t,i){var r=this.w,n=x.clone(r.config.series);if(e.length>0){for(var s=0;s<e.length;s++)e[s].index===i&&(r.globals.axisCharts?(n[i].data=e[s].data.slice(),e.splice(s,1),t.splice(s,1),r.globals.risingSeries.push(i)):(n[i]=e[s].data,e.splice(s,1),t.splice(s,1),r.globals.risingSeries.push(i)));n=this._getSeriesBasedOnCollapsedState(n),this.lgCtx.ctx.updateHelpers._updateSeries(n,r.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var t=this.w;return t.globals.axisCharts?e.forEach((function(i,r){t.globals.collapsedSeriesIndices.indexOf(r)>-1&&(e[r].data=[])})):e.forEach((function(i,r){t.globals.collapsedSeriesIndices.indexOf(r)>-1&&(e[r]=0)})),e}}]),e}(),de=function(){function e(t,i){s(this,e),this.ctx=t,this.w=t.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 he(this)}return o(e,[{key:"init",value:function(){var e=this.w,t=e.globals,i=e.config;if((i.legend.showForSingleSeries&&1===t.series.length||this.isBarsDistributed||t.series.length>1||!t.axisCharts)&&i.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),x.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 e=this,t=this.w,i=t.config.legend.fontFamily,r=t.globals.seriesNames,n=t.globals.colors.slice();if("heatmap"===t.config.chart.type){var s=t.config.plotOptions.heatmap.colorScale.ranges;r=s.map((function(e){return e.name?e.name:e.from+" - "+e.to})),n=s.map((function(e){return e.color}))}else this.isBarsDistributed&&(r=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(r=t.config.legend.customLegendItems);for(var a=t.globals.legendFormatter,o=t.config.legend.inverseOrder,l=o?r.length-1:0;o?l>=0:l<=r.length-1;o?l--:l++){var c=a(r[l],{seriesIndex:l,w:t}),h=!1,d=!1;if(t.globals.collapsedSeries.length>0)for(var u=0;u<t.globals.collapsedSeries.length;u++)t.globals.collapsedSeries[u].index===l&&(h=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(var g=0;g<t.globals.ancillaryCollapsedSeriesIndices.length;g++)t.globals.ancillaryCollapsedSeriesIndices[g]===l&&(d=!0);var f=document.createElement("span");f.classList.add("apexcharts-legend-marker");var p=t.config.legend.markers.offsetX,v=t.config.legend.markers.offsetY,m=t.config.legend.markers.height,b=t.config.legend.markers.width,C=t.config.legend.markers.strokeWidth,S=t.config.legend.markers.strokeColor,k=t.config.legend.markers.radius,L=f.style;L.background=n[l],L.color=n[l],L.setProperty("background",n[l],"important"),t.config.legend.markers.fillColors&&t.config.legend.markers.fillColors[l]&&(L.background=t.config.legend.markers.fillColors[l]),void 0!==t.globals.seriesColors[l]&&(L.background=t.globals.seriesColors[l],L.color=t.globals.seriesColors[l]),L.height=Array.isArray(m)?parseFloat(m[l])+"px":parseFloat(m)+"px",L.width=Array.isArray(b)?parseFloat(b[l])+"px":parseFloat(b)+"px",L.left=(Array.isArray(p)?parseFloat(p[l]):parseFloat(p))+"px",L.top=(Array.isArray(v)?parseFloat(v[l]):parseFloat(v))+"px",L.borderWidth=Array.isArray(C)?C[l]:C,L.borderColor=Array.isArray(S)?S[l]:S,L.borderRadius=Array.isArray(k)?parseFloat(k[l])+"px":parseFloat(k)+"px",t.config.legend.markers.customHTML&&(Array.isArray(t.config.legend.markers.customHTML)?t.config.legend.markers.customHTML[l]&&(f.innerHTML=t.config.legend.markers.customHTML[l]()):f.innerHTML=t.config.legend.markers.customHTML()),y.setAttrs(f,{rel:l+1,"data:collapsed":h||d}),(h||d)&&f.classList.add("apexcharts-inactive-legend");var A=document.createElement("div"),E=document.createElement("span");E.classList.add("apexcharts-legend-text"),E.innerHTML=Array.isArray(c)?c.join(" "):c;var z=t.config.legend.labels.useSeriesColors?t.globals.colors[l]:t.config.legend.labels.colors;z||(z=t.config.chart.foreColor),E.style.color=z,E.style.fontSize=parseFloat(t.config.legend.fontSize)+"px",E.style.fontWeight=t.config.legend.fontWeight,E.style.fontFamily=i||t.config.chart.fontFamily,y.setAttrs(E,{rel:l+1,i:l,"data:default-text":encodeURIComponent(c),"data:collapsed":h||d}),A.appendChild(f),A.appendChild(E);var P=new w(this.ctx);t.config.legend.showForZeroSeries||0===P.getSeriesTotalByIndex(l)&&P.seriesHaveSameValues(l)&&!P.isSeriesNull(l)&&-1===t.globals.collapsedSeriesIndices.indexOf(l)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&A.classList.add("apexcharts-hidden-zero-series"),t.config.legend.showForNullSeries||P.isSeriesNull(l)&&-1===t.globals.collapsedSeriesIndices.indexOf(l)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&A.classList.add("apexcharts-hidden-null-series"),t.globals.dom.elLegendWrap.appendChild(A),t.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(t.config.legend.horizontalAlign)),t.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+t.config.legend.position),A.classList.add("apexcharts-legend-series"),A.style.margin="".concat(t.config.legend.itemMargin.vertical,"px ").concat(t.config.legend.itemMargin.horizontal,"px"),t.globals.dom.elLegendWrap.style.width=t.config.legend.width?t.config.legend.width+"px":"",t.globals.dom.elLegendWrap.style.height=t.config.legend.height?t.config.legend.height+"px":"",y.setAttrs(A,{rel:l+1,seriesName:x.escapeString(r[l]),"data:collapsed":h||d}),(h||d)&&A.classList.add("apexcharts-inactive-legend"),t.config.legend.onItemClick.toggleDataSeries||A.classList.add("apexcharts-no-click")}t.globals.dom.elWrap.addEventListener("click",e.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&0===t.config.legend.customLegendItems.length&&(t.globals.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),t.globals.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,t){var i=this.w,r=i.globals.dom.baseEl.querySelector(".apexcharts-legend"),n=r.getBoundingClientRect(),s=0,a=0;if("bottom"===i.config.legend.position)a+=i.globals.svgHeight-n.height/2;else if("top"===i.config.legend.position){var o=new ce(this.ctx),l=o.dimHelpers.getTitleSubtitleCoords("title").height,c=o.dimHelpers.getTitleSubtitleCoords("subtitle").height;a=a+(l>0?l-10:0)+(c>0?c-10:0)}r.style.position="absolute",s=s+e+i.config.legend.offsetX,a=a+t+i.config.legend.offsetY,r.style.left=s+"px",r.style.top=a+"px","bottom"===i.config.legend.position?(r.style.top="auto",r.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(r.style.left="auto",r.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach((function(e){r.style[e]&&(r.style[e]=parseInt(i.config.legend[e],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var t=this.legendHelpers.getLegendBBox(),i=new ce(this.ctx),r=i.dimHelpers.getTitleSubtitleCoords("title"),n=i.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"bottom"===e.config.legend.position?s=-t.clwh/1.8:"top"===e.config.legend.position&&(s=r.height+n.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var e=this.w,t=this.legendHelpers.getLegendBBox(),i=0;"left"===e.config.legend.position&&(i=20),"right"===e.config.legend.position&&(i=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(e){var t=this.w,i=e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if("heatmap"===t.config.chart.type||this.isBarsDistributed){if(i){var r=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,r,this.w]),new F(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new F(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(e.target.getAttribute("rel"),10)-1,r="true"===e.target.getAttribute("data:collapsed"),n=this.w.config.chart.events.legendClick;"function"==typeof n&&n(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var s=this.w.config.legend.markers.onClick;"function"==typeof s&&e.target.classList.contains("apexcharts-legend-marker")&&(s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==t.config.chart.type&&"heatmap"!==t.config.chart.type&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,r)}}}]),e}(),ue=function(){function e(t){s(this,e),this.ctx=t,this.w=t.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(e,[{key:"createToolbar",value:function(){var e=this,t=this.w,i=function(){return document.createElement("div")},r=i();if(r.setAttribute("class","apexcharts-toolbar"),r.style.top=t.config.chart.toolbar.offsetY+"px",r.style.right=3-t.config.chart.toolbar.offsetX+"px",t.globals.dom.elWrap.appendChild(r),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=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var n=0;n<this.t.customIcons.length;n++)this.elCustomIcons.push(i());var s=[],a=function(i,r,n){var a=i.toLowerCase();e.t[a]&&t.config.chart.zoom.enabled&&s.push({el:r,icon:"string"==typeof e.t[a]?e.t[a]:n,title:e.localeValues[i],class:"apexcharts-".concat(a,"-icon")})};a("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'),a("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){e.t[i]&&t.config.chart[i].enabled&&s.push({el:"zoom"===i?e.elZoom:e.elSelection,icon:"string"==typeof e.t[i]?e.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:e.localeValues["zoom"===i?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&t.config.chart.zoom.enabled&&s.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:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),a("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&&s.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++)s.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});s.forEach((function(e,t){e.index&&x.moveIndexInArray(s,t,e.index)}));for(var c=0;c<s.length;c++)y.setAttrs(s[c].el,{class:s[c].class,title:s[c].title}),s[c].el.innerHTML=s[c].icon,r.appendChild(s[c].el);this._createHamburgerMenu(r),t.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):t.globals.panEnabled?this.elPan.classList.add(this.selectedClass):t.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),y.setAttrs(this.elMenu,{class:"apexcharts-menu"});var t=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];this.w.globals.allSeriesHasEqualX||t.splice(2,1);for(var i=0;i<t.length;i++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[i].innerHTML=t[i].title,y.setAttrs(this.elMenuItems[i],{class:"apexcharts-menu-item ".concat(t[i].name),title:t[i].title}),this.elMenu.appendChild(this.elMenuItems[i])}},{key:"addToolbarEventListeners",value:function(){var e=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(t){t.classList.contains("exportSVG")?t.addEventListener("click",e.handleDownload.bind(e,"svg")):t.classList.contains("exportPNG")?t.addEventListener("click",e.handleDownload.bind(e,"png")):t.classList.contains("exportCSV")&&t.addEventListener("click",e.handleDownload.bind(e,"csv"))}));for(var t=0;t<this.t.customIcons.length;t++)this.elCustomIcons[t].addEventListener("click",this.t.customIcons[t].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach((function(t){t.ctx.toolbar.toggleOtherControls();var i="selection"===e?t.ctx.toolbar.elSelection:t.ctx.toolbar.elZoom,r="selection"===e?"selectionEnabled":"zoomEnabled";t.w.globals[r]=!t.w.globals[r],i.classList.contains(t.ctx.toolbar.selectedClass)?i.classList.remove(t.ctx.toolbar.selectedClass):i.classList.add(t.ctx.toolbar.selectedClass)}))}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),"pan"===e?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var t="pan"===e?this.elPan:this.elZoom,i="pan"===e?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach((function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)}))}},{key:"toggleOtherControls",value:function(){var e=this,t=this.w;t.globals.panEnabled=!1,t.globals.zoomEnabled=!1,t.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach((function(t){t&&t.classList.remove(e.selectedClass)}))}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var t=(this.minX+this.maxX)/2,i=(this.minX+t)/2,r=(this.maxX+t)/2,n=this._getNewMinXMaxX(i,r);e.globals.disableZoomIn||this.zoomUpdateOptions(n.minX,n.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!("datetime"===e.config.xaxis.type&&new Date(this.minX).getUTCFullYear()<1e3)){var t=(this.minX+this.maxX)/2,i=this.minX-(t-this.minX),r=this.maxX-(t-this.maxX),n=this._getNewMinXMaxX(i,r);e.globals.disableZoomOut||this.zoomUpdateOptions(n.minX,n.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,t){var i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(e):e,maxX:i?Math.floor(t):t}}},{key:"zoomUpdateOptions",value:function(e,t){var i=this.w;if(void 0!==e||void 0!==t){if(!(i.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=i.globals.dataPoints),t-e<2))){var r={min:e,max:t},n=this.getBeforeZoomRange(r);n&&(r=n.xaxis);var s={xaxis:r},a=x.clone(i.globals.initialConfig.yaxis);i.config.chart.zoom.autoScaleYaxis&&(a=new Z(this.ctx).autoScaleY(this.ctx,a,{xaxis:r})),i.config.chart.group||(s.yaxis=a),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(s,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(r,a)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,t){"function"==typeof this.ev.zoomed&&this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t})}},{key:"getBeforeZoomRange",value:function(e,t){var i=null;return"function"==typeof this.ev.beforeZoom&&(i=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),i}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout((function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")}),0)}},{key:"handleDownload",value:function(e){var t=this.w,i=new V(this.ctx);switch(e){case"svg":i.exportToSVG(this.ctx);break;case"png":i.exportToPng(this.ctx);break;case"csv":i.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach((function(e){var t=e.w;if(t.globals.lastXAxis.min=void 0,t.globals.lastXAxis.max=void 0,e.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof t.config.chart.events.beforeResetZoom){var i=t.config.chart.events.beforeResetZoom(e,t);i&&e.updateHelpers.revertDefaultAxisMinMax(i)}"function"==typeof t.config.chart.events.zoomed&&e.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max}),t.globals.zoomed=!1;var r=e.ctx.series.emptyCollapsedSeries(x.clone(t.globals.initialSeries));e.updateHelpers._updateSeries(r,t.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}}]),e}(),ge=function(e){c(i,ue);var t=g(i);function i(e){var r;return s(this,i),(r=t.call(this,e)).ctx=e,r.w=e.w,r.dragged=!1,r.graphics=new y(r.ctx),r.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],r.clientX=0,r.clientY=0,r.startX=0,r.endX=0,r.dragX=0,r.startY=0,r.endY=0,r.dragY=0,r.moveDirection="none",r}return o(i,[{key:"init",value:function(e){var t=this,i=e.xyRatios,r=this.w,n=this;this.xyRatios=i,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=r.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),r.globals.dom.elGraphical.add(this.zoomRect),r.globals.dom.elGraphical.add(this.selectionRect),"x"===r.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:r.globals.gridWidth,maxY:r.globals.gridHeight}).on("dragmove",this.selectionDragging.bind(this,"dragging")):"y"===r.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:r.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=r.globals.dom.baseEl.querySelector("".concat(r.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach((function(e){t.hoverArea.addEventListener(e,n.svgMouseEvents.bind(n,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(e,t){var i=this.w,r=this,n=this.ctx.toolbar,s=i.globals.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,a=i.config.chart.toolbar.autoSelected;if(t.shiftKey?(this.shiftWasPressed=!0,n.enableZoomPanFromToolbar("pan"===a?"zoom":"pan")):this.shiftWasPressed&&(n.enableZoomPanFromToolbar(a),this.shiftWasPressed=!1),t.target){var o,l=t.target.classList;if(t.target.parentNode&&null!==t.target.parentNode&&(o=t.target.parentNode.classList),!(l.contains("apexcharts-selection-rect")||l.contains("apexcharts-legend-marker")||l.contains("apexcharts-legend-text")||o&&o.contains("apexcharts-toolbar"))){if(r.clientX="touchmove"===t.type||"touchstart"===t.type?t.touches[0].clientX:"touchend"===t.type?t.changedTouches[0].clientX:t.clientX,r.clientY="touchmove"===t.type||"touchstart"===t.type?t.touches[0].clientY:"touchend"===t.type?t.changedTouches[0].clientY:t.clientY,"mousedown"===t.type&&1===t.which){var c=r.gridRect.getBoundingClientRect();r.startX=r.clientX-c.left,r.startY=r.clientY-c.top,r.dragged=!1,r.w.globals.mousedown=!0}if(("mousemove"===t.type&&1===t.which||"touchmove"===t.type)&&(r.dragged=!0,i.globals.panEnabled?(i.globals.selection=null,r.w.globals.mousedown&&r.panDragging({context:r,zoomtype:s,xyRatios:e})):(r.w.globals.mousedown&&i.globals.zoomEnabled||r.w.globals.mousedown&&i.globals.selectionEnabled)&&(r.selection=r.selectionDrawing({context:r,zoomtype:s}))),"mouseup"===t.type||"touchend"===t.type||"mouseleave"===t.type){var h=r.gridRect.getBoundingClientRect();r.w.globals.mousedown&&(r.endX=r.clientX-h.left,r.endY=r.clientY-h.top,r.dragX=Math.abs(r.endX-r.startX),r.dragY=Math.abs(r.endY-r.startY),(i.globals.zoomEnabled||i.globals.selectionEnabled)&&r.selectionDrawn({context:r,zoomtype:s}),i.globals.panEnabled&&i.config.xaxis.convertedCatToNumeric&&r.delayedPanScrolled()),i.globals.zoomEnabled&&r.hideSelectionRect(this.selectionRect),r.dragged=!1,r.w.globals.mousedown=!1}this.makeSelectionRectDraggable()}}}},{key:"makeSelectionRectDraggable",value:function(){var e=this.w;if(this.selectionRect){var t=this.selectionRect.node.getBoundingClientRect();t.width>0&&t.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:e.globals.gridWidth,maxY:e.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var e=this.w,t=this.xyRatios;if(!e.globals.zoomEnabled)if(void 0!==e.globals.selection&&null!==e.globals.selection)this.drawSelectionRect(e.globals.selection);else if(void 0!==e.config.chart.selection.xaxis.min&&void 0!==e.config.chart.selection.xaxis.max){var i=(e.config.chart.selection.xaxis.min-e.globals.minX)/t.xRatio,r={x:i,y:0,width:e.globals.gridWidth-(e.globals.maxX-e.config.chart.selection.xaxis.max)/t.xRatio-i,height:e.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(r),this.makeSelectionRectDraggable(),"function"==typeof e.config.chart.events.selection&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(e){var t=e.x,i=e.y,r=e.width,n=e.height,s=e.translateX,a=void 0===s?0:s,o=e.translateY,l=void 0===o?0:o,c=this.w,h=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==c.globals.selection){var u={transform:"translate("+a+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),h.attr({x:t,y:i,width:r,height:n,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),y.setAttrs(h.node,u)),c.globals.selectionEnabled&&(d.attr({x:t,y:i,width:r>0?r:0,height:n>0?n:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),y.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(e){e&&e.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(e){var t,i=e.context,r=e.zoomtype,n=this.w,s=i,a=this.gridRect.getBoundingClientRect(),o=s.startX-1,l=s.startY,c=!1,h=!1,d=s.clientX-a.left-o,u=s.clientY-a.top-l;return Math.abs(d+o)>n.globals.gridWidth?d=n.globals.gridWidth-o:s.clientX-a.left<0&&(d=o),o>s.clientX-a.left&&(c=!0,d=Math.abs(d)),l>s.clientY-a.top&&(h=!0,u=Math.abs(u)),t="x"===r?{x:c?o-d:o,y:0,width:d,height:n.globals.gridHeight}:"y"===r?{x:0,y:h?l-u:l,width:n.globals.gridWidth,height:u}:{x:c?o-d:o,y:h?l-u:l,width:d,height:u},s.drawSelectionRect(t),s.selectionDragging("resizing"),t}},{key:"selectionDragging",value:function(e,t){var i=this,r=this.w,n=this.xyRatios,s=this.selectionRect,a=0;"resizing"===e&&(a=30);var o=function(e){return parseFloat(s.node.getAttribute(e))},l={x:o("x"),y:o("y"),width:o("width"),height:o("height")};r.globals.selection=l,"function"==typeof r.config.chart.events.selection&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var e=i.gridRect.getBoundingClientRect(),t=s.node.getBoundingClientRect(),a={xaxis:{min:r.globals.xAxisScale.niceMin+(t.left-e.left)*n.xRatio,max:r.globals.xAxisScale.niceMin+(t.right-e.left)*n.xRatio},yaxis:{min:r.globals.yAxisScale[0].niceMin+(e.bottom-t.bottom)*n.yRatio[0],max:r.globals.yAxisScale[0].niceMax-(t.top-e.top)*n.yRatio[0]}};r.config.chart.events.selection(i.ctx,a),r.config.chart.brush.enabled&&void 0!==r.config.chart.events.brushScrolled&&r.config.chart.events.brushScrolled(i.ctx,a)}),a))}},{key:"selectionDrawn",value:function(e){var t=e.context,i=e.zoomtype,r=this.w,n=t,s=this.xyRatios,a=this.ctx.toolbar;if(n.startX>n.endX){var o=n.startX;n.startX=n.endX,n.endX=o}if(n.startY>n.endY){var l=n.startY;n.startY=n.endY,n.endY=l}var c=void 0,h=void 0;r.globals.isRangeBar?(c=r.globals.yAxisScale[0].niceMin+n.startX*s.invertedYRatio,h=r.globals.yAxisScale[0].niceMin+n.endX*s.invertedYRatio):(c=r.globals.xAxisScale.niceMin+n.startX*s.xRatio,h=r.globals.xAxisScale.niceMin+n.endX*s.xRatio);var d=[],u=[];if(r.config.yaxis.forEach((function(e,t){d.push(r.globals.yAxisScale[t].niceMax-s.yRatio[t]*n.startY),u.push(r.globals.yAxisScale[t].niceMax-s.yRatio[t]*n.endY)})),n.dragged&&(n.dragX>10||n.dragY>10)&&c!==h)if(r.globals.zoomEnabled){var g=x.clone(r.globals.initialConfig.yaxis),f=x.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),h=Math.floor(h),c<1&&(c=1,h=r.globals.dataPoints),h-c<2&&(h=c+1)),"xy"!==i&&"x"!==i||(f={min:c,max:h}),"xy"!==i&&"y"!==i||g.forEach((function(e,t){g[t].min=u[t],g[t].max=d[t]})),r.config.chart.zoom.autoScaleYaxis){var p=new Z(n.ctx);g=p.autoScaleY(n.ctx,g,{xaxis:f})}if(a){var v=a.getBeforeZoomRange(f,g);v&&(f=v.xaxis?v.xaxis:f,g=v.yaxis?v.yaxis:g)}var m={xaxis:f};r.config.chart.group||(m.yaxis=g),n.ctx.updateHelpers._updateOptions(m,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof r.config.chart.events.zoomed&&a.zoomCallback(f,g)}else if(r.globals.selectionEnabled){var b,y=null;b={min:c,max:h},"xy"!==i&&"y"!==i||(y=x.clone(r.config.yaxis)).forEach((function(e,t){y[t].min=u[t],y[t].max=d[t]})),r.globals.selection=n.selection,"function"==typeof r.config.chart.events.selection&&r.config.chart.events.selection(n.ctx,{xaxis:b,yaxis:y})}}},{key:"panDragging",value:function(e){var t=e.context,i=this.w,r=t;if(void 0!==i.globals.lastClientPosition.x){var n=i.globals.lastClientPosition.x-r.clientX,s=i.globals.lastClientPosition.y-r.clientY;Math.abs(n)>Math.abs(s)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(s)&&n<0?this.moveDirection="right":Math.abs(s)>Math.abs(n)&&s>0?this.moveDirection="up":Math.abs(s)>Math.abs(n)&&s<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:r.clientX,y:r.clientY};var a=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||r.panScrolled(a,o)}},{key:"delayedPanScrolled",value:function(){var e=this.w,t=e.globals.minX,i=e.globals.maxX,r=(e.globals.maxX-e.globals.minX)/2;"left"===this.moveDirection?(t=e.globals.minX+r,i=e.globals.maxX+r):"right"===this.moveDirection&&(t=e.globals.minX-r,i=e.globals.maxX-r),t=Math.floor(t),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:t,max:i}},t,i)}},{key:"panScrolled",value:function(e,t){var i=this.w,r=this.xyRatios,n=x.clone(i.globals.initialConfig.yaxis),s=r.xRatio,a=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(s=r.invertedYRatio,a=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(e=a+i.globals.gridWidth/15*s,t=o+i.globals.gridWidth/15*s):"right"===this.moveDirection&&(e=a-i.globals.gridWidth/15*s,t=o-i.globals.gridWidth/15*s),i.globals.isRangeBar||(e<i.globals.initialMinX||t>i.globals.initialMaxX)&&(e=a,t=o);var l={min:e,max:t};i.config.chart.zoom.autoScaleYaxis&&(n=new Z(this.ctx).autoScaleY(this.ctx,n,{xaxis:l}));var c={xaxis:{min:e,max:t}};i.config.chart.group||(c.yaxis=n),this.updateScrolledChart(c,e,t)}},{key:"updateScrolledChart",value:function(e,t,i){var r=this.w;this.ctx.updateHelpers._updateOptions(e,!1,!1),"function"==typeof r.config.chart.events.scrolled&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:t,max:i}})}}]),i}(),fe=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t,this.ctx=t.ctx}return o(e,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,i=e.elGrid,r=e.clientX,n=e.clientY,s=this.w,a=i.getBoundingClientRect(),o=a.width,l=a.height,c=o/(s.globals.dataPoints-1),h=l/s.globals.dataPoints,d=this.hasBars();!s.globals.comboCharts&&!d||s.config.xaxis.convertedCatToNumeric||(c=o/s.globals.dataPoints);var u=r-a.left-s.globals.barPadForNumericAxis,g=n-a.top;u<0||g<0||u>o||g>l?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):s.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):s.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var f=Math.round(u/c),p=Math.floor(g/h);d&&!s.config.xaxis.convertedCatToNumeric&&(f=Math.ceil(u/c),f-=1);var v=null,m=null,b=[],y=[];if(s.globals.seriesXvalues.forEach((function(e){b.push([e[0]+1e-6].concat(e))})),s.globals.seriesYvalues.forEach((function(e){y.push([e[0]+1e-6].concat(e))})),b=b.map((function(e){return e.filter((function(e){return x.isNumber(e)}))})),y=y.map((function(e){return e.filter((function(e){return x.isNumber(e)}))})),s.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),C=u*(w.width/o),S=g*(w.height/l);v=(m=this.closestInMultiArray(C,S,b,y)).index,f=m.j,null!==v&&(b=s.globals.seriesXvalues[v],f=(m=this.closestInArray(C,b)).index)}return s.globals.capturedSeriesIndex=null===v?-1:v,(!f||f<1)&&(f=0),s.globals.isBarHorizontal?s.globals.capturedDataPointIndex=p:s.globals.capturedDataPointIndex=f,{capturedSeries:v,j:s.globals.isBarHorizontal?p:f,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(e,t,i,r){var n=this.w,s=0,a=null,o=-1;n.globals.series.length>1?s=this.getFirstActiveXArray(i):a=0;var l=i[s][0],c=Math.abs(e-l);if(i.forEach((function(t){t.forEach((function(t,i){var r=Math.abs(e-t);r<c&&(c=r,o=i)}))})),-1!==o){var h=r[s][o],d=Math.abs(t-h);a=s,r.forEach((function(e,i){var r=Math.abs(t-e[o]);r<d&&(d=r,a=i)}))}return{index:a,j:o}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,r=e.map((function(e,t){return e.length>0?t:-1})),n=0;n<r.length;n++)if(-1!==r[n]&&-1===t.globals.collapsedSeriesIndices.indexOf(n)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(n)){i=r[n];break}return i}},{key:"closestInArray",value:function(e,t){for(var i=t[0],r=null,n=Math.abs(e-i),s=0;s<t.length;s++){var a=Math.abs(e-t[s]);a<n&&(n=a,r=s)}return{index:r}}},{key:"isXoverlap",value:function(e){var t=[],i=this.w.globals.seriesX.filter((function(e){return void 0!==e[0]}));if(i.length>0)for(var r=0;r<i.length-1;r++)void 0!==i[r][e]&&void 0!==i[r+1][e]&&i[r][e]!==i[r+1][e]&&t.push("unEqual");return 0===t.length}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,t=this.w.globals.initialSeries,i=0;i<t.length-1;i++)if(t[i].data.length!==t[i+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return f(e).reduce((function(e,t){return e+t.getBBox().height}),0)}},{key:"getElMarkers",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(" .apexcharts-series-markers")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=f(e)).sort((function(e,t){return Number(t.getAttribute("data:realIndex"))<Number(e.getAttribute("data:realIndex"))?0:-1}));var t=[];return e.forEach((function(e){t.push(e.querySelector(".apexcharts-marker"))})),t}},{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(e){var t=this.w,i=t.config.markers.hover.size;return void 0===i&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var r=i.allTooltipSeriesGroups,n=0;n<r.length;n++)"enable"===e?(r[n].classList.add("apexcharts-active"),r[n].style.display=t.config.tooltip.items.display):(r[n].classList.remove("apexcharts-active"),r[n].style.display="none")}}]),e}(),pe=function(){function e(t){s(this,e),this.w=t.w,this.ctx=t.ctx,this.ttCtx=t,this.tooltipUtil=new fe(t)}return o(e,[{key:"drawSeriesTexts",value:function(e){var t=e.shared,i=void 0===t||t,r=e.ttItems,n=e.i,s=void 0===n?0:n,a=e.j,o=void 0===a?null:a,l=e.y1,c=e.y2,h=e.e,d=this.w;void 0!==d.config.tooltip.custom?this.handleCustomTooltip({i:s,j:o,y1:l,y2:c,w:d}):this.toggleActiveInactiveSeries(i);var u=this.getValuesToPrint({i:s,j:o});this.printLabels({i:s,j:o,values:u,ttItems:r,shared:i,e:h});var g=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=g.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=g.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var t,i=this,n=e.i,s=e.j,a=e.values,o=e.ttItems,l=e.shared,c=e.e,h=this.w,d=[],u=function(e){return h.globals.seriesGoals[e]&&h.globals.seriesGoals[e][s]&&Array.isArray(h.globals.seriesGoals[e][s])},g=a.xVal,f=a.zVal,p=a.xAxisTTVal,v="",x=h.globals.colors[n];null!==s&&h.config.plotOptions.bar.distributed&&(x=h.globals.colors[s]);for(var m=function(e,a){var m=i.getFormatters(n);v=i.getSeriesName({fn:m.yLbTitleFormatter,index:n,seriesIndex:n,j:s}),"treemap"===h.config.chart.type&&(v=m.yLbTitleFormatter(String(h.config.series[n].data[s].x),{series:h.globals.series,seriesIndex:n,dataPointIndex:s,w:h}));var b=h.config.tooltip.inverseOrder?a:e;if(h.globals.axisCharts){var y=function(e){return m.yLbFormatter(h.globals.series[e][s],{series:h.globals.series,seriesIndex:e,dataPointIndex:s,w:h})};if(l)m=i.getFormatters(b),v=i.getSeriesName({fn:m.yLbTitleFormatter,index:b,seriesIndex:n,j:s}),x=h.globals.colors[b],t=y(b),u(b)&&(d=h.globals.seriesGoals[b][s].map((function(e){return{attrs:e,val:m.yLbFormatter(e.value,{seriesIndex:b,dataPointIndex:s,w:h})}})));else{var w,C=null==c||null===(w=c.target)||void 0===w?void 0:w.getAttribute("fill");C&&(x=-1!==C.indexOf("url")?document.querySelector(C.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke"):C),t=y(n),u(n)&&Array.isArray(h.globals.seriesGoals[n][s])&&(d=h.globals.seriesGoals[n][s].map((function(e){return{attrs:e,val:m.yLbFormatter(e.value,{seriesIndex:n,dataPointIndex:s,w:h})}})))}}null===s&&(t=m.yLbFormatter(h.globals.series[n],r(r({},h),{},{seriesIndex:n,dataPointIndex:n}))),i.DOMHandling({i:n,t:b,j:s,ttItems:o,values:{val:t,goalVals:d,xVal:g,xAxisTTVal:p,zVal:f},seriesName:v,shared:l,pColor:x})},b=0,y=h.globals.series.length-1;b<h.globals.series.length;b++,y--)m(b,y)}},{key:"getFormatters",value:function(e){var t,i=this.w,r=i.globals.yLabelFormatters[e];return void 0!==i.globals.ttVal?Array.isArray(i.globals.ttVal)?(r=i.globals.ttVal[e]&&i.globals.ttVal[e].formatter,t=i.globals.ttVal[e]&&i.globals.ttVal[e].title&&i.globals.ttVal[e].title.formatter):(r=i.globals.ttVal.formatter,"function"==typeof i.globals.ttVal.title.formatter&&(t=i.globals.ttVal.title.formatter)):t=i.config.tooltip.y.title.formatter,"function"!=typeof r&&(r=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(e){return e}),"function"!=typeof t&&(t=function(e){return e}),{yLbFormatter:r,yLbTitleFormatter:t}}},{key:"getSeriesName",value:function(e){var t=e.fn,i=e.index,r=e.seriesIndex,n=e.j,s=this.w;return t(String(s.globals.seriesNames[i]),{series:s.globals.series,seriesIndex:r,dataPointIndex:n,w:s})}},{key:"DOMHandling",value:function(e){e.i;var t=e.t,i=e.j,r=e.ttItems,n=e.values,s=e.seriesName,a=e.shared,o=e.pColor,l=this.w,c=this.ttCtx,h=n.val,d=n.goalVals,u=n.xVal,g=n.xAxisTTVal,f=n.zVal,p=null;p=r[t].children,l.config.tooltip.fillSeriesColor&&(r[t].style.backgroundColor=o,p[0].style.display="none"),c.showTooltipTitle&&(null===c.tooltipTitle&&(c.tooltipTitle=l.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle.innerHTML=u),c.isXAxisTooltipEnabled&&(c.xaxisTooltipText.innerHTML=""!==g?g:u);var v=r[t].querySelector(".apexcharts-tooltip-text-y-label");v&&(v.innerHTML=s||"");var x=r[t].querySelector(".apexcharts-tooltip-text-y-value");x&&(x.innerHTML=void 0!==h?h:""),p[0]&&p[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(o=l.config.tooltip.marker.fillColors[t]),p[0].style.backgroundColor=o),l.config.tooltip.marker.show||(p[0].style.display="none");var m=r[t].querySelector(".apexcharts-tooltip-text-goals-label"),b=r[t].querySelector(".apexcharts-tooltip-text-goals-value");if(d.length&&l.globals.seriesGoals[t]){var y=function(){var e="<div >",t="<div>";d.forEach((function(i,r){e+=' <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>"),t+="<div>".concat(i.val,"</div>")})),m.innerHTML=e+"</div>",b.innerHTML=t+"</div>"};a?l.globals.seriesGoals[t][i]&&Array.isArray(l.globals.seriesGoals[t][i])?y():(m.innerHTML="",b.innerHTML=""):y()}else m.innerHTML="",b.innerHTML="";null!==f&&(r[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,r[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==f?f:""),a&&p[0]&&(null==h||l.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||l.globals.collapsedSeriesIndices.indexOf(t)>-1?p[0].parentNode.style.display="none":p[0].parentNode.style.display=l.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(e){var t=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=t.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,r=this.w,n=this.ctx.series.filteredSeriesX(),s="",a="",o=null,l=null,c={series:r.globals.series,seriesIndex:t,dataPointIndex:i,w:r},h=r.globals.ttZFormatter;null===i?l=r.globals.series[t]:r.globals.isXNumeric&&"treemap"!==r.config.chart.type?(s=n[t][i],0===n[t].length&&(s=n[this.tooltipUtil.getFirstActiveXArray(n)][i])):s=void 0!==r.globals.labels[i]?r.globals.labels[i]:"";var d=s;return s=r.globals.isXNumeric&&"datetime"===r.config.xaxis.type?new j(this.ctx).xLabelFormat(r.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new D(this.ctx).formatDate,w:this.w}):r.globals.isBarHorizontal?r.globals.yLabelFormatters[0](d,c):r.globals.xLabelFormatter(d,c),void 0!==r.config.tooltip.x.formatter&&(s=r.globals.ttKeyFormatter(d,c)),r.globals.seriesZ.length>0&&r.globals.seriesZ[t].length>0&&(o=h(r.globals.seriesZ[t][i],r)),a="function"==typeof r.config.xaxis.tooltip.formatter?r.globals.xaxisTooltipFormatter(d,c):s,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(s)?s.join(" "):s,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:o}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,r=e.y1,n=e.y2,s=e.w,a=this.ttCtx.getElTooltip(),o=s.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]),a.innerHTML=o({ctx:this.ctx,series:s.globals.series,seriesIndex:t,dataPointIndex:i,y1:r,y2:n,w:s})}}]),e}(),ve=function(){function e(t){s(this,e),this.ttCtx=t,this.ctx=t.ctx,this.w=t.w}return o(e,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,r=this.w,n=i.getElXCrosshairs(),s=e-i.xcrosshairsWidth/2,a=r.globals.labels.slice().length;if(null!==t&&(s=r.globals.gridWidth/a*t),null===n||r.globals.isBarHorizontal||(n.setAttribute("x",s),n.setAttribute("x1",s),n.setAttribute("x2",s),n.setAttribute("y2",r.globals.gridHeight),n.classList.add("apexcharts-active")),s<0&&(s=0),s>r.globals.gridWidth&&(s=r.globals.gridWidth),i.isXAxisTooltipEnabled){var o=s;"tickWidth"!==r.config.xaxis.crosshairs.width&&"barWidth"!==r.config.xaxis.crosshairs.width||(o=s+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;null!==t.ycrosshairs&&y.setAttrs(t.ycrosshairs,{y1:e,y2:e}),null!==t.ycrosshairsHidden&&y.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var r,n=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;if(e-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e))e+=t.globals.translateX,r=new y(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=r.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=n+"px"}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var r=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),n=t.globals.translateY+r,s=i.yaxisTTEls[e].getBoundingClientRect().height,a=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(a-=26),n-=s/2,-1===t.globals.ignoreYAxisIndexes.indexOf(e)?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=n+"px",i.yaxisTTEls[e].style.left=a+t.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.w,n=this.ttCtx,s=n.getElTooltip(),a=n.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(e)+o+5,c=parseFloat(t)+o/2;if(l>r.globals.gridWidth/2&&(l=l-a.ttWidth-o-10),l>r.globals.gridWidth-a.ttWidth-10&&(l=r.globals.gridWidth-a.ttWidth),l<-20&&(l=-20),r.config.tooltip.followCursor){var h=n.getElGrid(),d=h.getBoundingClientRect();c=n.e.clientY+r.globals.translateY-d.top-a.ttHeight/2}else r.globals.isBarHorizontal||(a.ttHeight/2+c>r.globals.gridHeight&&(c=r.globals.gridHeight-a.ttHeight+r.globals.translateY),c<0&&(c=0));isNaN(l)||(l+=r.globals.translateX,s.style.left=l+"px",s.style.top=c+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,r=this.ttCtx;if(i.globals.markers.size[e]>0)for(var n=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),s=0;s<n.length;s++)parseInt(n[s].getAttribute("rel"),10)===t&&(r.marker.resetPointsSize(),r.marker.enlargeCurrentPoint(t,n[s]));else r.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}},{key:"moveDynamicPointOnHover",value:function(e,t){var i,r,n=this.w,s=this.ttCtx,a=n.globals.pointsArray,o=s.tooltipUtil.getHoverMarkerSize(t),l=n.config.series[t].type;if(!l||"column"!==l&&"candlestick"!==l&&"boxPlot"!==l){i=a[t][e][0],r=a[t][e][1]?a[t][e][1]:0;var c=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-series-markers circle"));c&&r<n.globals.gridHeight&&r>0&&(c.setAttribute("r",o),c.setAttribute("cx",i),c.setAttribute("cy",r)),this.moveXCrosshairs(i),s.fixedTooltip||this.moveTooltip(i,r,o)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,r=i.w,n=0,s=0,a=r.globals.pointsArray;t=new F(this.ctx).getActiveConfigSeriesIndex(!0);var o=i.tooltipUtil.getHoverMarkerSize(t);a[t]&&(n=a[t][e][0],s=a[t][e][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c<r.globals.series.length;c++){var h=a[c];if(r.globals.comboCharts&&void 0===h&&l.splice(c,0,null),h&&h.length){var d=a[c][e][1];l[c].setAttribute("cx",n),null!==d&&!isNaN(d)&&d<r.globals.gridHeight+o&&d+o>0?(l[c]&&l[c].setAttribute("r",o),l[c]&&l[c].setAttribute("cy",d)):l[c]&&l[c].setAttribute("r",0)}}if(this.moveXCrosshairs(n),!i.fixedTooltip){var u=s||r.globals.gridHeight;this.moveTooltip(n,u,o)}}},{key:"moveStickyTooltipOverBars",value:function(e){var t=this.w,i=this.ttCtx,r=t.globals.columnSeries?t.globals.columnSeries.length:t.globals.series.length,n=r>=2&&r%2==0?Math.floor(r/2):Math.floor(r/2)+1;t.globals.isBarHorizontal&&(n=new F(this.ctx).getActiveConfigSeriesIndex(!1,"desc")+1);var s=t.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(n,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(e,"']")),a=s?parseFloat(s.getAttribute("cx")):0,o=s?parseFloat(s.getAttribute("cy")):0,l=s?parseFloat(s.getAttribute("barWidth")):0,c=s?parseFloat(s.getAttribute("barHeight")):0,h=i.getElGrid().getBoundingClientRect(),d=s.classList.contains("apexcharts-candlestick-area")||s.classList.contains("apexcharts-boxPlot-area");if(t.globals.isXNumeric?(s&&!d&&(a-=r%2!=0?l/2:0),s&&d&&t.globals.comboCharts&&(a-=l/2)):t.globals.isBarHorizontal||(a=i.xAxisTicksPositions[e-1]+i.dataPointsDividedWidth/2,isNaN(a)&&(a=i.xAxisTicksPositions[e]-i.dataPointsDividedWidth/2)),t.globals.isBarHorizontal?(o>t.globals.gridHeight/2&&(o-=i.tooltipRect.ttHeight),(o=o+t.config.grid.padding.top+c/3)+c>t.globals.gridHeight&&(o=t.globals.gridHeight-c)):t.config.tooltip.followCursor?o=i.e.clientY-h.top-i.tooltipRect.ttHeight/2:o+i.tooltipRect.ttHeight+15>t.globals.gridHeight&&(o=t.globals.gridHeight),o<-10&&(o=-10),t.globals.isBarHorizontal||this.moveXCrosshairs(a),!i.fixedTooltip){var u=o||t.globals.gridHeight;this.moveTooltip(a,u)}}}]),e}(),xe=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new ve(t)}return o(e,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new y(this.ctx),i=new _(this.ctx),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");r=f(r),e.config.chart.stacked&&r.sort((function(e,t){return parseFloat(e.getAttribute("data:realIndex"))-parseFloat(t.getAttribute("data:realIndex"))}));for(var n=0;n<r.length;n++){var s=r[n].querySelector(".apexcharts-series-markers-wrap");if(null!==s){var a=void 0,o="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));"line"!==e.config.chart.type&&"area"!==e.config.chart.type||e.globals.comboCharts||e.config.tooltip.intersect||(o+=" no-pointer-events");var l=i.getMarkerConfig({cssClass:o,seriesIndex:Number(s.getAttribute("data:realIndex"))});(a=t.drawMarker(0,0,l)).node.setAttribute("default-marker-size",0);var c=document.createElementNS(e.globals.SVGNS,"g");c.classList.add("apexcharts-series-markers"),c.appendChild(a.node),s.appendChild(c)}}}},{key:"enlargeCurrentPoint",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w;"bubble"!==n.config.chart.type&&this.newPointSize(e,t);var s=t.getAttribute("cx"),a=t.getAttribute("cy");if(null!==i&&null!==r&&(s=i,a=r),this.tooltipPosition.moveXCrosshairs(s),!this.fixedTooltip){if("radar"===n.config.chart.type){var o=this.ttCtx.getElGrid(),l=o.getBoundingClientRect();s=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(s,a,n.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,r=this.ttCtx,n=e,s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=t.config.markers.hover.size,o=0;o<s.length;o++){var l=s[o].getAttribute("rel"),c=s[o].getAttribute("index");if(void 0===a&&(a=t.globals.markers.size[c]+t.config.markers.hover.sizeOffset),n===parseInt(l,10)){i.newPointSize(n,s[o]);var h=s[o].getAttribute("cx"),d=s[o].getAttribute("cy");i.tooltipPosition.moveXCrosshairs(h),r.fixedTooltip||i.tooltipPosition.moveTooltip(h,d,a)}else i.oldPointSize(s[o])}}},{key:"newPointSize",value:function(e,t){var i=this.w,r=i.config.markers.hover.size,n=0===e?t.parentNode.firstChild:t.parentNode.lastChild;if("0"!==n.getAttribute("default-marker-size")){var s=parseInt(n.getAttribute("index"),10);void 0===r&&(r=i.globals.markers.size[s]+i.config.markers.hover.sizeOffset),r<0&&(r=0),n.setAttribute("r",r)}}},{key:"oldPointSize",value:function(e){var t=parseFloat(e.getAttribute("default-marker-size"));e.setAttribute("r",t)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),t=0;t<e.length;t++){var i=parseFloat(e[t].getAttribute("default-marker-size"));x.isNumber(i)&&i>=0?e[t].setAttribute("r",i):e[t].setAttribute("r",0)}}}]),e}(),me=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t}return o(e,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,i=e.opt,r=e.x,n=e.y,s=e.type,a=this.ttCtx,o=this.w;if(t.target.classList.contains("apexcharts-".concat(s,"-rect"))){var l=this.getAttr(t,"i"),c=this.getAttr(t,"j"),h=this.getAttr(t,"cx"),d=this.getAttr(t,"cy"),u=this.getAttr(t,"width"),g=this.getAttr(t,"height");if(a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:c,shared:!1,e:t}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=c,r=h+a.tooltipRect.ttWidth/2+u,n=d+a.tooltipRect.ttHeight/2-g/2,a.tooltipPosition.moveXCrosshairs(h+u/2),r>o.globals.gridWidth/2&&(r=h-a.tooltipRect.ttWidth/2+u),a.w.config.tooltip.followCursor){var f=o.globals.dom.elWrap.getBoundingClientRect();r=o.globals.clientX-f.left-(r>o.globals.gridWidth/2?a.tooltipRect.ttWidth:0),n=o.globals.clientY-f.top-(n>o.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:r,y:n}}},{key:"handleMarkerTooltip",value:function(e){var t,i,r=e.e,n=e.opt,s=e.x,a=e.y,o=this.w,l=this.ttCtx;if(r.target.classList.contains("apexcharts-marker")){var c=parseInt(n.paths.getAttribute("cx"),10),h=parseInt(n.paths.getAttribute("cy"),10),d=parseFloat(n.paths.getAttribute("val"));if(i=parseInt(n.paths.getAttribute("rel"),10),t=parseInt(n.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=x.findAncestor(n.paths,"apexcharts-series");u&&(t=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:t,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:r}),"mouseup"===r.type&&l.markerClick(r,t,i),o.globals.capturedSeriesIndex=t,o.globals.capturedDataPointIndex=i,s=c,a=h+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();a=l.e.clientY+o.globals.translateY-g.top}d<0&&(a=h),l.marker.enlargeCurrentPoint(i,n.paths,s,a)}return{x:s,y:a}}},{key:"handleBarTooltip",value:function(e){var t,i,r=e.e,n=e.opt,s=this.w,a=this.ttCtx,o=a.getElTooltip(),l=0,c=0,h=0,d=this.getBarTooltipXY({e:r,opt:n});t=d.i;var u=d.barHeight,g=d.j;s.globals.capturedSeriesIndex=t,s.globals.capturedDataPointIndex=g,s.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!s.config.tooltip.shared?(c=d.x,h=d.y,i=Array.isArray(s.config.stroke.width)?s.config.stroke.width[t]:s.config.stroke.width,l=c):s.globals.comboCharts||s.config.tooltip.shared||(l/=2),isNaN(h)?h=s.globals.svgHeight-a.tooltipRect.ttHeight:h<0&&(h=0);var f=parseInt(n.paths.parentNode.getAttribute("data:realIndex"),10),p=s.globals.isMultipleYAxis?s.config.yaxis[f]&&s.config.yaxis[f].reversed:s.config.yaxis[0].reversed;if(c+a.tooltipRect.ttWidth>s.globals.gridWidth&&!p?c-=a.tooltipRect.ttWidth:c<0&&(c=0),a.w.config.tooltip.followCursor){var v=a.getElGrid().getBoundingClientRect();h=a.e.clientY-v.top}null===a.tooltip&&(a.tooltip=s.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),s.config.tooltip.shared||(s.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(l+i/2):a.tooltipPosition.moveXCrosshairs(l)),!a.fixedTooltip&&(!s.config.tooltip.shared||s.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(p&&(c-=a.tooltipRect.ttWidth)<0&&(c=0),!p||s.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||(h=h+u-2*(s.globals.series[t][g]<0?u:0)),a.tooltipRect.ttHeight+h>s.globals.gridHeight?h=s.globals.gridHeight-a.tooltipRect.ttHeight+s.globals.translateY:(h=h+s.globals.translateY-a.tooltipRect.ttHeight/2)<0&&(h=0),o.style.left=c+s.globals.translateX+"px",o.style.top=h+"px")}},{key:"getBarTooltipXY",value:function(e){var t=e.e,i=e.opt,r=this.w,n=null,s=this.ttCtx,a=0,o=0,l=0,c=0,h=0,d=t.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=t.target,g=u.getBoundingClientRect(),f=i.elGrid.getBoundingClientRect(),p=g.height;h=g.height;var v=g.width,x=parseInt(u.getAttribute("cx"),10),m=parseInt(u.getAttribute("cy"),10);c=parseFloat(u.getAttribute("barWidth"));var b="touchmove"===t.type?t.touches[0].clientX:t.clientX;n=parseInt(u.getAttribute("j"),10),a=parseInt(u.parentNode.getAttribute("rel"),10)-1;var y=u.getAttribute("data-range-y1"),w=u.getAttribute("data-range-y2");r.globals.comboCharts&&(a=parseInt(u.parentNode.getAttribute("data:realIndex"),10)),s.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:a,j:n,y1:y?parseInt(y,10):null,y2:w?parseInt(w,10):null,shared:!s.showOnIntersect&&r.config.tooltip.shared,e:t}),r.config.tooltip.followCursor?r.globals.isBarHorizontal?(o=b-f.left+15,l=m-s.dataPointsDividedHeight+p/2-s.tooltipRect.ttHeight/2):(o=r.globals.isXNumeric?x-v/2:x-s.dataPointsDividedWidth+v/2,l=t.clientY-f.top-s.tooltipRect.ttHeight/2-15):r.globals.isBarHorizontal?((o=x)<s.xyRatios.baseLineInvertedY&&(o=x-s.tooltipRect.ttWidth),l=m-s.dataPointsDividedHeight+p/2-s.tooltipRect.ttHeight/2):(o=r.globals.isXNumeric?x-v/2:x-s.dataPointsDividedWidth+v/2,l=m)}return{x:o,y:l,barHeight:h,barWidth:c,i:a,j:n}}}]),e}(),be=function(){function e(t){s(this,e),this.w=t.w,this.ttCtx=t}return o(e,[{key:"drawXaxisTooltip",value:function(){var e=this.w,t=this.ttCtx,i="bottom"===e.config.xaxis.position;t.xaxisOffY=i?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var r=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",n=e.globals.dom.elWrap;t.isXAxisTooltipEnabled&&null===e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(t.xaxisTooltip=document.createElement("div"),t.xaxisTooltip.setAttribute("class",r+" apexcharts-theme-"+e.config.tooltip.theme),n.appendChild(t.xaxisTooltip),t.xaxisTooltipText=document.createElement("div"),t.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),t.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,t.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,t.xaxisTooltip.appendChild(t.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,t=this.ttCtx,i=function(i){var r=e.config.yaxis[i].opposite||e.config.yaxis[i].crosshairs.opposite;t.yaxisOffX=r?e.globals.gridWidth+1:1;var n="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i,r?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left");e.globals.yAxisSameScaleIndices.map((function(t,r){t.map((function(t,r){r===i&&(n+=e.config.yaxis[r].show?" ":" apexcharts-yaxistooltip-hidden")}))}));var s=e.globals.dom.elWrap;null===e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i))&&(t.yaxisTooltip=document.createElement("div"),t.yaxisTooltip.setAttribute("class",n+" apexcharts-theme-"+e.config.tooltip.theme),s.appendChild(t.yaxisTooltip),0===i&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[i]=document.createElement("div"),t.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),t.yaxisTooltip.appendChild(t.yaxisTooltipText[i]))},r=0;r<e.config.yaxis.length;r++)i(r)}},{key:"setXCrosshairWidth",value:function(){var e=this.w,t=this.ttCtx,i=t.getElXCrosshairs();if(t.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var r=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==r&&"barWidth"===e.config.xaxis.crosshairs.width){var n=parseFloat(r.getAttribute("barWidth"));t.xcrosshairsWidth=n}else if("tickWidth"===e.config.xaxis.crosshairs.width){var s=e.globals.labels.length;t.xcrosshairsWidth=e.globals.gridWidth/s}}else if("tickWidth"===e.config.xaxis.crosshairs.width){var a=e.globals.labels.length;t.xcrosshairsWidth=e.globals.gridWidth/a}else if("barWidth"===e.config.xaxis.crosshairs.width){var o=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==o){var l=parseFloat(o.getAttribute("barWidth"));t.xcrosshairsWidth=l}else t.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(t.xcrosshairsWidth=0),null!==i&&t.xcrosshairsWidth>0&&i.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,i){var r=this.ttCtx,n=this.w,s=n.globals.yLabelFormatters[e];if(r.yaxisTooltips[e]){var a=r.getElGrid().getBoundingClientRect(),o=(t-a.top)*i.yRatio[e],l=n.globals.maxYArr[e]-n.globals.minYArr[e],c=n.globals.minYArr[e]+(l-o);r.tooltipPosition.moveYCrosshairs(t-a.top),r.yaxisTooltipText[e].innerHTML=s(c),r.tooltipPosition.moveYAxisTooltip(e)}}}]),e}(),ye=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.tConfig=i.config.tooltip,this.tooltipUtil=new fe(this),this.tooltipLabels=new pe(this),this.tooltipPosition=new ve(this),this.marker=new xe(this),this.intersect=new me(this),this.axesTooltip=new be(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(e,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.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(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map((function(e,i){return!!(e.show&&e.tooltip.enabled&&t.globals.axisCharts)})),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&i.classList.add(t.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var r=new G(this.ctx);this.xAxisTicksPositions=r.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==t.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==t.config.markers.size&&0!==t.globals.markers.largestSize||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var n=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(n=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(n),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,r=[],n=this.getElTooltip(),s=function(s){var a=document.createElement("div");a.classList.add("apexcharts-tooltip-series-group"),a.style.order=i.config.tooltip.inverseOrder?e-s:s+1,t.tConfig.shared&&t.tConfig.enabledOnSeries&&Array.isArray(t.tConfig.enabledOnSeries)&&t.tConfig.enabledOnSeries.indexOf(s)<0&&a.classList.add("apexcharts-tooltip-series-group-hidden");var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[s],a.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach((function(e){var t=document.createElement("div");t.classList.add("apexcharts-tooltip-".concat(e,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(e,"-label")),t.appendChild(i);var r=document.createElement("span");r.classList.add("apexcharts-tooltip-text-".concat(e,"-value")),t.appendChild(r),l.appendChild(t)})),a.appendChild(l),n.appendChild(a),r.push(a)},a=0;a<e;a++)s(a);return r}},{key:"addSVGEvents",value:function(){var e=this.w,t=e.config.chart.type,i=this.getElTooltip(),r=!("bar"!==t&&"candlestick"!==t&&"boxPlot"!==t&&"rangeBar"!==t),n="area"===t||"line"===t||"scatter"===t||"bubble"===t||"radar"===t,s=e.globals.dom.Paper.node,a=this.getElGrid();a&&(this.seriesBound=a.getBoundingClientRect());var o,l=[],c=[],h={hoverArea:s,elGrid:a,tooltipEl:i,tooltipY:l,tooltipX:c,ttItems:this.ttItems};if(e.globals.axisCharts&&(n?o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):r?o=e.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"!==t&&"treemap"!==t||(o=e.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")),c.push(o[d].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||r&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([s],h);else if(r&&!e.globals.comboCharts||n&&this.showOnIntersect)this.addDatapointEventsListeners(h);else if(!e.globals.axisCharts||"heatmap"===t||"treemap"===t){var u=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(u,h)}if(this.showOnIntersect){var g=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");g.length>0&&this.addPathsEventListeners(g,h),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(h)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),r=i.width+10,n=i.height+10,s=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(s=s+e.globals.svgWidth-r+10),o.indexOf("bottom")>-1&&(a=a+e.globals.svgHeight-n-10),t.style.left=s+"px",t.style.top=a+"px",{x:s,y:a,ttWidth:r,ttHeight:n}}},{key:"addDatapointEventsListeners",value:function(e){var t=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(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var i=this,r=function(r){var n={paths:e[r],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(t){return e[r].addEventListener(t,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})}))},n=0;n<e.length;n++)r(n)}},{key:"onSeriesHover",value:function(e,t){var i=this,r=Date.now()-this.lastHoverTime;r>=100?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(e,t)}),100-r))}},{key:"seriesHover",value:function(e,t){var i=this;this.lastHoverTime=Date.now();var r=[],n=this.w;n.config.chart.group&&(r=this.ctx.getGroupedCharts()),n.globals.axisCharts&&(n.globals.minX===-1/0&&n.globals.maxX===1/0||0===n.globals.dataPoints)||(r.length?r.forEach((function(r){var n=i.getElTooltip(r),s={paths:e.paths,tooltipEl:n,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems};r.w.globals.minX===i.w.globals.minX&&r.w.globals.maxX===i.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:s,e:t})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,i=e.ttCtx,r=e.opt,n=e.e,s=t.w,a=this.getElTooltip();a&&(i.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},i.e=n,!i.tooltipUtil.hasBars()||s.globals.comboCharts||i.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new F(t).toggleSeriesOnHover(n,n.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),s.globals.axisCharts?i.axisChartsTooltips({e:n,opt:r,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:n,opt:r,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,i,r=e.e,n=e.opt,s=this.w,a=n.elGrid.getBoundingClientRect(),o="touchmove"===r.type?r.touches[0].clientX:r.clientX,l="touchmove"===r.type?r.touches[0].clientY:r.clientY;if(this.clientY=l,this.clientX=o,s.globals.capturedSeriesIndex=-1,s.globals.capturedDataPointIndex=-1,l<a.top||l>a.top+a.height)this.handleMouseOut(n);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!s.config.tooltip.shared){var c=parseInt(n.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(n)}var h=this.getElTooltip(),d=this.getElXCrosshairs(),u=s.globals.xyCharts||"bar"===s.config.chart.type&&!s.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||s.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===r.type||"touchmove"===r.type||"mouseup"===r.type){if(s.globals.collapsedSeries.length+s.globals.ancillaryCollapsedSeries.length===s.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var g=this.yaxisTooltips.filter((function(e){return!0===e}));if(null!==this.ycrosshairs&&g.length&&this.ycrosshairs.classList.add("apexcharts-active"),u&&!this.showOnIntersect)this.handleStickyTooltip(r,o,l,n);else if("heatmap"===s.config.chart.type||"treemap"===s.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:r,opt:n,x:t,y:i,type:s.config.chart.type});t=f.x,i=f.y,h.style.left=t+"px",h.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:r,opt:n}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:r,opt:n,x:t,y:i});if(this.yaxisTooltips.length)for(var p=0;p<s.config.yaxis.length;p++)this.axesTooltip.drawYaxisTooltipText(p,l,this.xyRatios);n.tooltipEl.classList.add("apexcharts-active")}else"mouseout"!==r.type&&"touchend"!==r.type||this.handleMouseOut(n)}}},{key:"nonAxisChartsTooltips",value:function(e){var t=e.e,i=e.opt,r=e.tooltipRect,n=this.w,s=i.paths.getAttribute("rel"),a=this.getElTooltip(),o=n.globals.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){a.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(s,10)-1,shared:!1});var l=n.globals.clientX-o.left-r.ttWidth/2,c=n.globals.clientY-o.top-r.ttHeight-10;if(a.style.left=l+"px",a.style.top=c+"px",n.config.legend.tooltipHoverFormatter){var h=s-1,d=(0,n.config.legend.tooltipHoverFormatter)(this.legendLabels[h].getAttribute("data:default-text"),{seriesIndex:h,dataPointIndex:h,w:n});this.legendLabels[h].innerHTML=d}}else"mouseout"!==t.type&&"touchend"!==t.type||(a.classList.remove("apexcharts-active"),n.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)})))}},{key:"handleStickyTooltip",value:function(e,t,i,r){var n=this.w,s=this.tooltipUtil.getNearestValues({context:this,hoverArea:r.hoverArea,elGrid:r.elGrid,clientX:t,clientY:i}),a=s.j,o=s.capturedSeries,l=r.elGrid.getBoundingClientRect();s.hoverX<0||s.hoverX>l.width?this.handleMouseOut(r):null!==o?this.handleStickyCapturedSeries(e,o,r,a):(this.tooltipUtil.isXoverlap(a)||n.globals.isBarHorizontal)&&this.create(e,this,0,a,r.ttItems)}},{key:"handleStickyCapturedSeries",value:function(e,t,i,r){var n=this.w;this.tConfig.shared||null!==n.globals.series[t][r]?void 0!==n.globals.series[t][r]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(r)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,r,i.ttItems):this.create(e,this,t,r,i.ttItems,!1):this.tooltipUtil.isXoverlap(r)&&this.create(e,this,0,r,i.ttItems):this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new y(this.ctx),i=e.globals.dom.Paper.select(".apexcharts-bar-area"),r=0;r<i.length;r++)t.pathMouseLeave(i[r])}},{key:"handleMouseOut",value:function(e){var t=this.w,i=this.getElXCrosshairs();if(e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),"bubble"!==t.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=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var r=0;r<this.yaxisTTEls.length;r++)this.yaxisTTEls[r].classList.remove("apexcharts-active")}t.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)}))}},{key:"markerClick",value:function(e,t,i){var r=this.w;"function"==typeof r.config.chart.events.markerClick&&r.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:i,w:r}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:t,dataPointIndex:i,w:r}])}},{key:"create",value:function(e,t,i,r,n){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=this.w,o=t;"mouseup"===e.type&&this.markerClick(e,i,r),null===s&&(s=this.tConfig.shared);var l=this.tooltipUtil.hasMarkers(),c=this.tooltipUtil.getElBars();if(a.config.legend.tooltipHoverFormatter){var h=a.config.legend.tooltipHoverFormatter,d=Array.from(this.legendLabels);d.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)}));for(var u=0;u<d.length;u++){var g=d[u],f=parseInt(g.getAttribute("i"),10),p=decodeURIComponent(g.getAttribute("data:default-text")),v=h(p,{seriesIndex:s?f:i,dataPointIndex:r,w:a});if(s)g.innerHTML=a.globals.collapsedSeriesIndices.indexOf(f)<0?v:p;else if(g.innerHTML=f===i?v:p,i===f)break}}if(s){if(o.tooltipLabels.drawSeriesTexts({ttItems:n,i:i,j:r,shared:!this.showOnIntersect&&this.tConfig.shared}),l&&(a.globals.markers.largestSize>0?o.marker.enlargePoints(r):o.tooltipPosition.moveDynamicPointsOnHover(r)),this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(c),this.barSeriesHeight>0)){var x=new y(this.ctx),m=a.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(r,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(r);for(var b=0;b<m.length;b++)x.pathMouseEnter(m[b])}}else o.tooltipLabels.drawSeriesTexts({shared:!1,ttItems:n,i:i,j:r}),this.tooltipUtil.hasBars()&&o.tooltipPosition.moveStickyTooltipOverBars(r),l&&o.tooltipPosition.moveMarkers(i,r)}}]),e}(),we=function(e){c(i,O);var t=g(i);function i(){return s(this,i),t.apply(this,arguments)}return o(i,[{key:"draw",value:function(e,t){var i=this,n=this.w;this.graphics=new y(this.ctx),this.bar=new O(this.ctx,this.xyRatios);var s=new w(this.ctx,n);e=s.getLogSeries(e),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e),"100%"===n.config.chart.stackType&&(e=n.globals.seriesPercent.slice()),this.series=e,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 a=0;a<e.length;a++)e[a].length>0&&(this.totalItems+=e[a].length);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),l=0,c=0,h=function(s,a){var h=void 0,d=void 0,u=void 0,g=void 0,f=[],p=[],v=n.globals.comboCharts?t[s]:s;i.yRatio.length>1&&(i.yaxisIndex=v),i.isReversed=n.config.yaxis[i.yaxisIndex]&&n.config.yaxis[i.yaxisIndex].reversed;var m=i.graphics.group({class:"apexcharts-series",seriesName:x.escapeString(n.globals.seriesNames[v]),rel:s+1,"data:realIndex":v});i.ctx.series.addCollapsedClassToSeries(m,v);var b=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":v}),y=0,w=0,C=i.initialPositions(l,c,h,d,u,g);c=C.y,y=C.barHeight,d=C.yDivision,g=C.zeroW,l=C.x,w=C.barWidth,h=C.xDivision,u=C.zeroH,i.yArrj=[],i.yArrjF=[],i.yArrjVal=[],i.xArrj=[],i.xArrjF=[],i.xArrjVal=[],1===i.prevY.length&&i.prevY[0].every((function(e){return isNaN(e)}))&&(i.prevY[0]=i.prevY[0].map((function(e){return u})),i.prevYF[0]=i.prevYF[0].map((function(e){return 0})));for(var S=0;S<n.globals.dataPoints;S++){var k=i.barHelpers.getStrokeWidth(s,S,v),L={indexes:{i:s,j:S,realIndex:v,bc:a},strokeWidth:k,x:l,y:c,elSeries:m},A=null;i.isHorizontal?(A=i.drawStackedBarPaths(r(r({},L),{},{zeroW:g,barHeight:y,yDivision:d})),w=i.series[s][S]/i.invertedYRatio):(A=i.drawStackedColumnPaths(r(r({},L),{},{xDivision:h,barWidth:w,zeroH:u})),y=i.series[s][S]/i.yRatio[i.yaxisIndex]),c=A.y,l=A.x,f.push(l),p.push(c);var E=i.barHelpers.getPathFillColor(e,s,S,v);m=i.renderSeries({realIndex:v,pathFill:E,j:S,i:s,pathFrom:A.pathFrom,pathTo:A.pathTo,strokeWidth:k,elSeries:m,x:l,y:c,series:e,barHeight:y,barWidth:w,elDataLabelsWrap:b,type:"bar",visibleSeries:0})}n.globals.seriesXvalues[v]=f,n.globals.seriesYvalues[v]=p,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(m)},d=0,u=0;d<e.length;d++,u++)h(d,u);return o}},{key:"initialPositions",value:function(e,t,i,r,n,s){var a,o,l=this.w;return this.isHorizontal?(a=(a=r=l.globals.gridHeight/l.globals.dataPoints)*parseInt(l.config.plotOptions.bar.barHeight,10)/100,s=this.baseLineInvertedY+l.globals.padHorizontal+(this.isReversed?l.globals.gridWidth:0)-(this.isReversed?2*this.baseLineInvertedY:0),t=(r-a)/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,n=this.baseLineY[this.yaxisIndex]+(this.isReversed?l.globals.gridHeight:0)-(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),e=l.globals.padHorizontal+(i-o)/2),{x:e,y:t,yDivision:r,xDivision:i,barHeight:a,barWidth:o,zeroH:n,zeroW:s}}},{key:"drawStackedBarPaths",value:function(e){for(var t,i=e.indexes,r=e.barHeight,n=e.strokeWidth,s=e.zeroW,a=e.x,o=e.y,l=e.yDivision,c=e.elSeries,h=this.w,d=o,u=i.i,g=i.j,f=0,p=0;p<this.prevXF.length;p++)f+=this.prevXF[p][g];if(u>0){var v=s;this.prevXVal[u-1][g]<0?v=this.series[u][g]>=0?this.prevX[u-1][g]+f-2*(this.isReversed?f:0):this.prevX[u-1][g]:this.prevXVal[u-1][g]>=0&&(v=this.series[u][g]>=0?this.prevX[u-1][g]:this.prevX[u-1][g]-f+2*(this.isReversed?f:0)),t=v}else t=s;a=null===this.series[u][g]?t:t+this.series[u][g]/this.invertedYRatio-2*(this.isReversed?this.series[u][g]/this.invertedYRatio:0);var x=this.barHelpers.getBarpaths({barYPosition:d,barHeight:r,x1:t,x2:a,strokeWidth:n,series:this.series,realIndex:i.realIndex,i:u,j:g,w:h});return this.barHelpers.barBackground({j:g,i:u,y1:d,y2:r,elSeries:c}),o+=l,{pathTo:x.pathTo,pathFrom:x.pathFrom,x:a,y:o}}},{key:"drawStackedColumnPaths",value:function(e){var t=e.indexes,i=e.x,r=e.y,n=e.xDivision,s=e.barWidth,a=e.zeroH;e.strokeWidth;var o=e.elSeries,l=this.w,c=t.i,h=t.j,d=t.bc;if(l.globals.isXNumeric){var u=l.globals.seriesX[c][h];u||(u=0),i=(u-l.globals.minX)/this.xRatio-s/2}for(var g,f=i,p=0,v=0;v<this.prevYF.length;v++)p+=isNaN(this.prevYF[v][h])?0:this.prevYF[v][h];if(c>0&&!l.globals.isXNumeric||c>0&&l.globals.isXNumeric&&l.globals.seriesX[c-1][h]===l.globals.seriesX[c][h]){var x,m,b=Math.min(this.yRatio.length+1,c+1);if(void 0!==this.prevY[c-1])for(var y=1;y<b;y++)if(!isNaN(this.prevY[c-y][h])){m=this.prevY[c-y][h];break}for(var w=1;w<b;w++){if(this.prevYVal[c-w][h]<0){x=this.series[c][h]>=0?m-p+2*(this.isReversed?p:0):m;break}if(this.prevYVal[c-w][h]>=0){x=this.series[c][h]>=0?m:m+p-2*(this.isReversed?p:0);break}}void 0===x&&(x=l.globals.gridHeight),g=this.prevYF[0].every((function(e){return 0===e}))&&this.prevYF.slice(1,c).every((function(e){return e.every((function(e){return isNaN(e)}))}))?l.globals.gridHeight-a:x}else g=l.globals.gridHeight-a;r=g-this.series[c][h]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[c][h]/this.yRatio[this.yaxisIndex]:0);var C=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:s,y1:g,y2:r,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,realIndex:t.realIndex,i:c,j:h,w:l});return this.barHelpers.barBackground({bc:d,j:h,i:c,x1:f,x2:s,elSeries:o}),i+=n,{pathTo:C.pathTo,pathFrom:C.pathFrom,x:l.globals.isXNumeric?i-n:i,y:r}}}]),i}(),Ce=function(e){c(i,O);var t=g(i);function i(){return s(this,i),t.apply(this,arguments)}return o(i,[{key:"draw",value:function(e,t){var i=this,n=this.w,s=new y(this.ctx),a=new P(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=n.config.plotOptions.bar.horizontal;var o=new w(this.ctx,n);e=o.getLogSeries(e),this.series=e,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);for(var l=s.group({class:"apexcharts-".concat(n.config.chart.type,"-series apexcharts-plot-series")}),c=function(o){i.isBoxPlot="boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[o].type;var c,h,d,u,g,f,p=void 0,v=void 0,m=[],b=[],y=n.globals.comboCharts?t[o]:o,w=s.group({class:"apexcharts-series",seriesName:x.escapeString(n.globals.seriesNames[y]),rel:o+1,"data:realIndex":y});i.ctx.series.addCollapsedClassToSeries(w,y),e[o].length>0&&(i.visibleI=i.visibleI+1),i.yRatio.length>1&&(i.yaxisIndex=y);var C=i.barHelpers.initialPositions();v=C.y,g=C.barHeight,h=C.yDivision,u=C.zeroW,p=C.x,f=C.barWidth,c=C.xDivision,d=C.zeroH,b.push(p+f/2);for(var S=s.group({class:"apexcharts-datalabels","data:realIndex":y}),k=function(t){var s=i.barHelpers.getStrokeWidth(o,t,y),l=null,x={indexes:{i:o,j:t,realIndex:y},x:p,y:v,strokeWidth:s,elSeries:w};l=i.isHorizontal?i.drawHorizontalBoxPaths(r(r({},x),{},{yDivision:h,barHeight:g,zeroW:u})):i.drawVerticalBoxPaths(r(r({},x),{},{xDivision:c,barWidth:f,zeroH:d})),v=l.y,p=l.x,t>0&&b.push(p+f/2),m.push(v),l.pathTo.forEach((function(r,c){var h=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?l.color[c]:n.globals.stroke.colors[o],d=a.fillPath({seriesNumber:y,dataPointIndex:t,color:l.color[c],value:e[o][t]});i.renderSeries({realIndex:y,pathFill:d,lineFill:h,j:t,i:o,pathFrom:l.pathFrom,pathTo:r,strokeWidth:s,elSeries:w,x:p,y:v,series:e,barHeight:g,barWidth:f,elDataLabelsWrap:S,visibleSeries:i.visibleI,type:n.config.chart.type})}))},L=0;L<n.globals.dataPoints;L++)k(L);n.globals.seriesXvalues[y]=b,n.globals.seriesYvalues[y]=m,l.add(w)},h=0;h<e.length;h++)c(h);return l}},{key:"drawVerticalBoxPaths",value:function(e){var t=e.indexes,i=e.x;e.y;var r=e.xDivision,n=e.barWidth,s=e.zeroH,a=e.strokeWidth,o=this.w,l=new y(this.ctx),c=t.i,h=t.j,d=!0,u=o.config.plotOptions.candlestick.colors.upward,g=o.config.plotOptions.candlestick.colors.downward,f="";this.isBoxPlot&&(f=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var p=this.yRatio[this.yaxisIndex],v=t.realIndex,x=this.getOHLCValue(v,h),m=s,b=s;x.o>x.c&&(d=!1);var w=Math.min(x.o,x.c),C=Math.max(x.o,x.c),S=x.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[v][h]-o.globals.minX)/this.xRatio-n/2);var k=i+n*this.visibleI;void 0===this.series[c][h]||null===this.series[c][h]?(w=s,C=s):(w=s-w/p,C=s-C/p,m=s-x.h/p,b=s-x.l/p,S=s-x.m/p);var L=l.move(k,s),A=l.move(k+n/2,w);return o.globals.previousPaths.length>0&&(A=this.getPreviousPath(v,h,!0)),L=this.isBoxPlot?[l.move(k,w)+l.line(k+n/2,w)+l.line(k+n/2,m)+l.line(k+n/4,m)+l.line(k+n-n/4,m)+l.line(k+n/2,m)+l.line(k+n/2,w)+l.line(k+n,w)+l.line(k+n,S)+l.line(k,S)+l.line(k,w+a/2),l.move(k,S)+l.line(k+n,S)+l.line(k+n,C)+l.line(k+n/2,C)+l.line(k+n/2,b)+l.line(k+n-n/4,b)+l.line(k+n/4,b)+l.line(k+n/2,b)+l.line(k+n/2,C)+l.line(k,C)+l.line(k,S)+"z"]:[l.move(k,C)+l.line(k+n/2,C)+l.line(k+n/2,m)+l.line(k+n/2,C)+l.line(k+n,C)+l.line(k+n,w)+l.line(k+n/2,w)+l.line(k+n/2,b)+l.line(k+n/2,w)+l.line(k,w)+l.line(k,C-a/2)],A+=l.move(k,w),o.globals.isXNumeric||(i+=r),{pathTo:L,pathFrom:A,x:i,y:C,barXPosition:k,color:this.isBoxPlot?f:d?[u]:[g]}}},{key:"drawHorizontalBoxPaths",value:function(e){var t=e.indexes;e.x;var i=e.y,r=e.yDivision,n=e.barHeight,s=e.zeroW,a=e.strokeWidth,o=this.w,l=new y(this.ctx),c=t.i,h=t.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=t.realIndex,f=this.getOHLCValue(g,h),p=s,v=s,x=Math.min(f.o,f.c),m=Math.max(f.o,f.c),b=f.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][h]-o.globals.minX)/this.invertedXRatio-n/2);var w=i+n*this.visibleI;void 0===this.series[c][h]||null===this.series[c][h]?(x=s,m=s):(x=s+x/u,m=s+m/u,p=s+f.h/u,v=s+f.l/u,b=s+f.m/u);var C=l.move(s,w),S=l.move(x,w+n/2);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(g,h,!0)),C=[l.move(x,w)+l.line(x,w+n/2)+l.line(p,w+n/2)+l.line(p,w+n/2-n/4)+l.line(p,w+n/2+n/4)+l.line(p,w+n/2)+l.line(x,w+n/2)+l.line(x,w+n)+l.line(b,w+n)+l.line(b,w)+l.line(x+a/2,w),l.move(b,w)+l.line(b,w+n)+l.line(m,w+n)+l.line(m,w+n/2)+l.line(v,w+n/2)+l.line(v,w+n-n/4)+l.line(v,w+n/4)+l.line(v,w+n/2)+l.line(m,w+n/2)+l.line(m,w)+l.line(b,w)+"z"],S+=l.move(x,w),o.globals.isXNumeric||(i+=r),{pathTo:C,pathFrom:S,x:m,y:i,barYPosition:w,color:d}}},{key:"getOHLCValue",value:function(e,t){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[e][t]:i.globals.seriesCandleO[e][t],h:this.isBoxPlot?i.globals.seriesCandleO[e][t]:i.globals.seriesCandleH[e][t],m:i.globals.seriesCandleM[e][t],l:this.isBoxPlot?i.globals.seriesCandleC[e][t]:i.globals.seriesCandleL[e][t],c:this.isBoxPlot?i.globals.seriesCandleL[e][t]:i.globals.seriesCandleC[e][t]}}}]),i}(),Se=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(e,i){e.from<=0&&(t=!0)})),t}},{key:"getShadeColor",value:function(e,t,i,r){var n=this.w,s=1,a=n.config.plotOptions[e].shadeIntensity,o=this.determineColor(e,t,i);n.globals.hasNegs||r?s=n.config.plotOptions[e].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*a):(1-o.percent/100)*(1.25*a):o.percent<=0?1-(1+o.percent/100)*a:(1-o.percent/100)*a:(s=1-o.percent/100,"treemap"===e&&(s=(1-o.percent/100)*(1.25*a)));var l=o.color,c=new x;return n.config.plotOptions[e].enableShades&&(l="dark"===this.w.config.theme.mode?x.hexToRgba(c.shadeColor(-1*s,o.color),n.config.fill.opacity):x.hexToRgba(c.shadeColor(s,o.color),n.config.fill.opacity)),{color:l,colorProps:o}}},{key:"determineColor",value:function(e,t,i){var r=this.w,n=r.globals.series[t][i],s=r.config.plotOptions[e],a=s.colorScale.inverse?i:t;s.distributed&&"treemap"===r.config.chart.type&&(a=i);var o=r.globals.colors[a],l=null,c=Math.min.apply(Math,f(r.globals.series[t])),h=Math.max.apply(Math,f(r.globals.series[t]));s.distributed||"heatmap"!==e||(c=r.globals.minY,h=r.globals.maxY),void 0!==s.colorScale.min&&(c=s.colorScale.min<r.globals.minY?s.colorScale.min:r.globals.minY,h=s.colorScale.max>r.globals.maxY?s.colorScale.max:r.globals.maxY);var d=Math.abs(h)+Math.abs(c),u=100*n/(0===d?d-1e-6:d);return s.colorScale.ranges.length>0&&s.colorScale.ranges.map((function(e,t){if(n>=e.from&&n<=e.to){o=e.color,l=e.foreColor?e.foreColor:null,c=e.from,h=e.to;var i=Math.abs(h)+Math.abs(c);u=100*n/(0===i?i-1e-6:i)}})),{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,r=e.y,n=e.i,s=e.j,a=e.colorProps,o=e.fontSize,l=this.w.config.dataLabels,c=new y(this.ctx),h=new T(this.ctx),d=null;if(l.enabled){d=c.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,f=i+u,p=r+parseFloat(l.style.fontSize)/3+g;h.plotDataLabelsText({x:f,y:p,text:t,i:n,j:s,color:a.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(e){var t=new y(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),e}(),ke=function(){function e(t,i){s(this,e),this.ctx=t,this.w=t.w,this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Se(t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return o(e,[{key:"draw",value:function(e){var t=this.w,i=new y(this.ctx),r=i.group({class:"apexcharts-heatmap"});r.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var n=t.globals.gridWidth/t.globals.dataPoints,s=t.globals.gridHeight/t.globals.series.length,a=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=e.slice();t.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var c=o?0:l.length-1;o?c<l.length:c>=0;o?c++:c--){var h=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:x.escapeString(t.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(h,c),t.config.chart.dropShadow.enabled){var d=t.config.chart.dropShadow;new b(this.ctx).dropShadow(h,d,c)}for(var u=0,g=t.config.plotOptions.heatmap.shadeIntensity,f=0;f<l[c].length;f++){var p=this.helpers.getShadeColor(t.config.chart.type,c,f,this.negRange),v=p.color,m=p.colorProps;"image"===t.config.fill.type&&(v=new P(this.ctx).fillPath({seriesNumber:c,dataPointIndex:f,opacity:t.globals.hasNegs?m.percent<0?1-(1+m.percent/100):g+m.percent/100:m.percent/100,patternID:x.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:n,height:t.config.fill.image.height?t.config.fill.image.height:s}));var w=this.rectRadius,C=i.drawRect(u,a,n,s,w);if(C.attr({cx:u,cy:a}),C.node.classList.add("apexcharts-heatmap-rect"),h.add(C),C.attr({fill:v,i:c,index:c,j:f,val:l[c][f],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?v:t.globals.stroke.colors[0],color:v}),this.helpers.addListeners(C),t.config.chart.animations.enabled&&!t.globals.dataChanged){var S=1;t.globals.resized||(S=t.config.chart.animations.speed),this.animateHeatMap(C,u,a,n,s,S)}if(t.globals.dataChanged){var k=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){k=this.dynamicAnim.speed;var L=t.globals.previousPaths[c]&&t.globals.previousPaths[c][f]&&t.globals.previousPaths[c][f].color;L||(L="rgba(255, 255, 255, 0)"),this.animateHeatColor(C,x.isColorHex(L)?L:x.rgb2hex(L),x.isColorHex(v)?v:x.rgb2hex(v),k)}}var A=(0,t.config.dataLabels.formatter)(t.globals.series[c][f],{value:t.globals.series[c][f],seriesIndex:c,dataPointIndex:f,w:t}),E=this.helpers.calculateDataLabels({text:A,x:u+n/2,y:a+s/2,i:c,j:f,colorProps:m,series:l});null!==E&&h.add(E),u+=n}a+=s,r.add(h)}var z=t.globals.yAxisScale[0].result.slice();t.config.yaxis[0].reversed?z.unshift(""):z.push(""),t.globals.yAxisScale[0].result=z;var _=t.globals.gridHeight/t.globals.series.length;return t.config.yaxis[0].labels.offsetY=-_/2,r}},{key:"animateHeatMap",value:function(e,t,i,r,n,s){var a=new m(this.ctx);a.animateRect(e,{x:t+r/2,y:i+n/2,width:0,height:0},{x:t,y:i,width:r,height:n},s,(function(){a.animationCompleted(e)}))}},{key:"animateHeatColor",value:function(e,t,i,r){e.attr({fill:t}).animate(r).attr({fill:i})}}]),e}(),Le=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"drawYAxisTexts",value:function(e,t,i,r){var n=this.w,s=n.config.yaxis[0],a=n.globals.yLabelFormatters[0];return new y(this.ctx).drawText({x:e+s.labels.offsetX,y:t+s.labels.offsetY,text:a(r,i),textAnchor:"middle",fontSize:s.labels.style.fontSize,fontFamily:s.labels.style.fontFamily,foreColor:Array.isArray(s.labels.style.colors)?s.labels.style.colors[i]:s.labels.style.colors})}}]),e}(),Ae=function(){function e(t){s(this,e),this.ctx=t,this.w=t.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(e,[{key:"draw",value:function(e){var t=this,i=this.w,r=new y(this.ctx);if(this.ret=r.group({class:"apexcharts-pie"}),i.globals.noData)return this.ret;for(var n=0,s=0;s<e.length;s++)n+=x.negToZero(e[s]);var a=[],o=r.group();0===n&&(n=1e-5),e.forEach((function(e){t.maxY=Math.max(t.maxY,e)})),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<e.length;l++){var c=this.fullAngle*x.negToZero(e[l])/n;a.push(c),"polarArea"===this.chartType?(a[l]=this.fullAngle/e.length,this.sliceSizes.push(i.globals.radialSize*e[l]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}if(i.globals.dataChanged){for(var h,d=0,u=0;u<i.globals.previousPaths.length;u++)d+=x.negToZero(i.globals.previousPaths[u]);for(var g=0;g<i.globals.previousPaths.length;g++)h=this.fullAngle*x.negToZero(i.globals.previousPaths[g])/d,this.prevSectorAngleArr.push(h)}this.donutSize<0&&(this.donutSize=0);var f=i.config.plotOptions.pie.customScale,p=i.globals.gridWidth/2,v=i.globals.gridHeight/2,m=p-i.globals.gridWidth/2*f,b=v-i.globals.gridHeight/2*f;if("donut"===this.chartType){var w=r.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 C=this.drawArcs(a,e);if(this.sliceLabels.forEach((function(e){C.add(e)})),o.attr({transform:"translate(".concat(m,", ").concat(b,") scale(").concat(f,")")}),o.add(C),this.ret.add(o),this.donutDataLabels.show){var S=this.renderInnerDataLabels(this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show,translateX:m,translateY:b});this.ret.add(S)}return"front"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret),this.ret}},{key:"drawArcs",value:function(e,t){var i=this.w,r=new b(this.ctx),n=new y(this.ctx),s=new P(this.ctx),a=n.group({class:"apexcharts-slices"}),o=this.initialAngle,l=this.initialAngle,c=this.initialAngle,h=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var d=0;d<e.length;d++){var u=n.group({class:"apexcharts-series apexcharts-pie-series",seriesName:x.escapeString(i.globals.seriesNames[d]),rel:d+1,"data:realIndex":d});a.add(u),l=h,c=(o=c)+e[d],h=l+this.prevSectorAngleArr[d];var g=c<o?this.fullAngle+c-o:c-o,f=s.fillPath({seriesNumber:d,size:this.sliceSizes[d],value:t[d]}),p=this.getChangedPath(l,h),v=n.drawPath({d:p,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[d]:this.lineColorArr,strokeWidth:0,fill:f,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(d)});if(v.attr({index:0,j:d}),r.setSelectionFilter(v,0,d),i.config.chart.dropShadow.enabled){var m=i.config.chart.dropShadow;r.dropShadow(v,m,d)}this.addListeners(v,this.donutDataLabels),y.setAttrs(v.node,{"data:angle":g,"data:startAngle":o,"data:strokeWidth":this.strokeWidth,"data:value":t[d]});var w={x:0,y:0};"pie"===this.chartType||"polarArea"===this.chartType?w=x.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,(o+g/2)%this.fullAngle):"donut"===this.chartType&&(w=x.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,(o+g/2)%this.fullAngle)),u.add(v);var C=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):(0==(C=g/this.fullAngle*i.config.chart.animations.speed)&&(C=1),this.animDur=C+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(v,{size:this.sliceSizes[d],endAngle:c,startAngle:o,prevStartAngle:l,prevEndAngle:h,animateStartingPos:!0,i:d,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(v,{size:this.sliceSizes[d],endAngle:c,startAngle:o,i:d,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:C}),i.config.plotOptions.pie.expandOnClick&&"polarArea"!==this.chartType&&v.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 S=w.x,k=w.y,L=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[d]){var A=i.config.dataLabels.formatter;void 0!==A&&(L=A(i.globals.seriesPercent[d][0],{seriesIndex:d,w:i}));var E=i.globals.dataLabels.style.colors[d],z=n.group({class:"apexcharts-datalabels"}),_=n.drawText({x:S,y:k,text:L,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:E});if(z.add(_),i.config.dataLabels.dropShadow.enabled){var R=i.config.dataLabels.dropShadow;r.dropShadow(_,R)}_.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&!1===i.globals.resized&&(_.node.classList.add("apexcharts-pie-label-delay"),_.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(z)}}}return a}},{key:"addListeners",value:function(e,t){var i=new y(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,t)))}},{key:"animatePaths",value:function(e,t){var i=this.w,r=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,n=r,s=t.startAngle,a=t.startAngle;void 0!==t.prevStartAngle&&void 0!==t.prevEndAngle&&(s=t.prevEndAngle,n=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===i.config.series.length-1&&(r+a>this.fullAngle?t.endAngle=t.endAngle-(r+a):r+a<this.fullAngle&&(t.endAngle=t.endAngle+(this.fullAngle-(r+a)))),r===this.fullAngle&&(r=this.fullAngle-.01),this.animateArc(e,s,a,r,n,t)}},{key:"animateArc",value:function(e,t,i,r,n,s){var a,o=this,l=this.w,c=new m(this.ctx),h=s.size;(isNaN(t)||isNaN(n))&&(t=i,n=r,s.dur=0);var d=r,u=i,g=t<i?this.fullAngle+t-i:t-i;l.globals.dataChanged&&s.shouldSetPrevPaths&&s.prevEndAngle&&(a=o.getPiePath({me:o,startAngle:s.prevStartAngle,angle:s.prevEndAngle<s.prevStartAngle?this.fullAngle+s.prevEndAngle-s.prevStartAngle:s.prevEndAngle-s.prevStartAngle,size:h}),e.attr({d:a})),0!==s.dur?e.animate(s.dur,l.globals.easing,s.animBeginArr[s.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}),s.i===l.config.series.length-1&&c.animationCompleted(e)})).during((function(l){d=g+(r-g)*l,s.animateStartingPos&&(d=n+(r-n)*l,u=t-n+(i-(t-n))*l),a=o.getPiePath({me:o,startAngle:u,angle:d,size:h}),e.node.setAttribute("data:pathOrig",a),e.attr({d:a})})):(a=o.getPiePath({me:o,startAngle:u,angle:r,size:h}),s.isTrack||(l.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",a),e.attr({d:a,"stroke-width":o.strokeWidth}))}},{key:"pieClicked",value:function(e){var t,i=this.w,r=this,n=r.sliceSizes[e]+(i.config.plotOptions.pie.expandOnClick?4:0),s=i.globals.dom.Paper.select(".apexcharts-".concat(r.chartType.toLowerCase(),"-slice-").concat(e)).members[0];if("true"!==s.attr("data:pieClicked")){var a=i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(a,(function(e){e.setAttribute("data:pieClicked","false");var t=e.getAttribute("data:pathOrig");e.setAttribute("d",t)})),s.attr("data:pieClicked","true");var o=parseInt(s.attr("data:startAngle"),10),l=parseInt(s.attr("data:angle"),10);t=r.getPiePath({me:r,startAngle:o,angle:l,size:n}),360!==l&&s.plot(t)}else{s.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(s.node,this.donutDataLabels);var c=s.attr("data:pathOrig");s.attr({d:c})}}},{key:"getChangedPath",value:function(e,t){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:e,angle:t-e,size:this.size})),i}},{key:"getPiePath",value:function(e){var t=e.me,i=e.startAngle,r=e.angle,n=e.size,s=i,a=Math.PI*(s-90)/180,o=r+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,c=t.centerX+n*Math.cos(a),h=t.centerY+n*Math.sin(a),d=t.centerX+n*Math.cos(l),u=t.centerY+n*Math.sin(l),g=x.polarToCartesian(t.centerX,t.centerY,t.donutSize,o),f=x.polarToCartesian(t.centerX,t.centerY,t.donutSize,s),p=r>180?1:0,v=["M",c,h,"A",n,n,0,p,1,d,u];return"donut"===t.chartType?[].concat(v,["L",g.x,g.y,"A",t.donutSize,t.donutSize,0,p,0,f.x,f.y,"L",c,h,"z"]).join(" "):"pie"===t.chartType||"polarArea"===t.chartType?[].concat(v,["L",t.centerX,t.centerY,"L",c,h]).join(" "):[].concat(v).join(" ")}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new Z(this.ctx),r=new y(this.ctx),n=new Le(this.ctx),s=r.group(),a=r.group(),o=i.niceScale(0,Math.ceil(this.maxY),t.config.yaxis[0].tickAmount,0,!0),l=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;for(var h=t.globals.radialSize,d=h/(c-1),u=0;u<c-1;u++){var g=r.drawCircle(h);if(g.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){var f=n.drawYAxisTexts(this.centerX,this.centerY-h+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,u,l[u]);a.add(f)}s.add(g),h-=d}this.drawSpokes(e),e.add(s),e.add(a)}},{key:"renderInnerDataLabels",value:function(e,t){var i=this.w,r=new y(this.ctx),n=r.group({class:"apexcharts-datalabels-group",transform:"translate(".concat(t.translateX?t.translateX:0,", ").concat(t.translateY?t.translateY:0,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),s=e.total.show;n.node.style.opacity=t.opacity;var a,o,l=t.centerX,c=t.centerY;a=void 0===e.name.color?i.globals.colors[0]:e.name.color;var h=e.name.fontSize,d=e.name.fontFamily,u=e.name.fontWeight;o=void 0===e.value.color?i.config.chart.foreColor:e.value.color;var g=e.value.formatter,f="",p="";if(s?(a=e.total.color,h=e.total.fontSize,d=e.total.fontFamily,u=e.total.fontWeight,p=e.total.label,f=e.total.formatter(i)):1===i.globals.series.length&&(f=g(i.globals.series[0],i),p=i.globals.seriesNames[0]),p&&(p=e.name.formatter(p,e.total.show,i)),e.name.show){var v=r.drawText({x:l,y:c+parseFloat(e.name.offsetY),text:p,textAnchor:"middle",foreColor:a,fontSize:h,fontWeight:u,fontFamily:d});v.node.classList.add("apexcharts-datalabel-label"),n.add(v)}if(e.value.show){var x=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,m=r.drawText({x:l,y:c+x,text:f,textAnchor:"middle",foreColor:o,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});m.node.classList.add("apexcharts-datalabel-value"),n.add(m)}return n}},{key:"printInnerLabels",value:function(e,t,i,r){var n,s=this.w;r?n=void 0===e.name.color?s.globals.colors[parseInt(r.parentNode.getAttribute("rel"),10)-1]:e.name.color:s.globals.series.length>1&&e.total.show&&(n=e.total.color);var a=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,s),r||"function"!=typeof e.total.formatter||(i=e.total.formatter(s));var l=t===e.total.label;t=e.name.formatter(t,l,s),null!==a&&(a.textContent=t),null!==o&&(o.textContent=i),null!==a&&(a.style.fill=n)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,r=e.getAttribute("data:value"),n=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,n,r,e);var s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==s&&(s.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,r=new y(this.ctx),n=i.config.plotOptions.polarArea.spokes;if(0!==n.strokeWidth){for(var s=[],a=360/i.globals.series.length,o=0;o<i.globals.series.length;o++)s.push(x.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,i.config.plotOptions.pie.startAngle+a*o));s.forEach((function(i,s){var a=r.drawLine(i.x,i.y,t.centerX,t.centerY,Array.isArray(n.connectorColors)?n.connectorColors[s]:n.connectorColors);e.add(a)}))}}},{key:"revertDataLabelsInner",value:function(e,t,i){var r=this,n=this.w,s=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group"),a=!1,o=n.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area"),l=function(e){var i=e.makeSliceOut,n=e.printLabel;Array.prototype.forEach.call(o,(function(e){"true"===e.getAttribute("data:pieClicked")&&(i&&(a=!0),n&&r.printDataLabelsInner(e,t))}))};if(l({makeSliceOut:!0,printLabel:!1}),t.total.show&&n.globals.series.length>1)a&&!t.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(t,t.total.label,t.total.formatter(n));else if(l({makeSliceOut:!1,printLabel:!0}),!a)if(n.globals.selectedDataPoints.length&&n.globals.series.length>1)if(n.globals.selectedDataPoints[0].length>0){var c=n.globals.selectedDataPoints[0],h=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(h,t)}else s&&n.globals.selectedDataPoints.length&&0===n.globals.selectedDataPoints[0].length&&(s.style.opacity=0);else s&&n.globals.series.length>1&&(s.style.opacity=0)}}]),e}(),Ee=function(){function e(t){s(this,e),this.ctx=t,this.w=t.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(e,[{key:"draw",value:function(e){var t=this,i=this.w,n=new P(this.ctx),s=[],a=new T(this.ctx);e.length&&(this.dataPointsLen=e[i.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var o=i.globals.gridWidth/2,l=i.globals.gridHeight/2,c=o+i.config.plotOptions.radar.offsetX,h=l+i.config.plotOptions.radar.offsetY,d=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(c||0,", ").concat(h||0,")")}),u=[],g=null,f=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach((function(e,o){var l=e.length===i.globals.dataPoints,c=t.graphics.group().attr({class:"apexcharts-series","data:longestSeries":l,seriesName:x.escapeString(i.globals.seriesNames[o]),rel:o+1,"data:realIndex":o});t.dataRadiusOfPercent[o]=[],t.dataRadius[o]=[],t.angleArr[o]=[],e.forEach((function(e,i){var r=Math.abs(t.maxValue-t.minValue);e+=Math.abs(t.minValue),t.isLog&&(e=t.coreUtils.getLogVal(e,0)),t.dataRadiusOfPercent[o][i]=e/r,t.dataRadius[o][i]=t.dataRadiusOfPercent[o][i]*t.size,t.angleArr[o][i]=i*t.disAngle})),u=t.getDataPointsPos(t.dataRadius[o],t.angleArr[o]);var h=t.createPaths(u,{x:0,y:0});g=t.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),f=t.graphics.group({class:"apexcharts-datalabels","data:realIndex":o}),i.globals.delayedElements.push({el:g.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},p=null;i.globals.previousPaths.length>0&&(p=t.getPreviousPath(o));for(var v=0;v<h.linePathsTo.length;v++){var m=t.graphics.renderPaths(r(r({},d),{},{pathFrom:null===p?h.linePathsFrom[v]:p,pathTo:h.linePathsTo[v],strokeWidth:Array.isArray(t.strokeWidth)?t.strokeWidth[o]:t.strokeWidth,fill:"none",drawShadow:!1}));c.add(m);var y=n.fillPath({seriesNumber:o}),w=t.graphics.renderPaths(r(r({},d),{},{pathFrom:null===p?h.areaPathsFrom[v]:p,pathTo:h.areaPathsTo[v],strokeWidth:0,fill:y,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var C=new b(t.ctx),S=i.config.chart.dropShadow;C.dropShadow(w,Object.assign({},S,{noUserSpaceOnUse:!0}),o)}c.add(w)}e.forEach((function(e,n){var s=new _(t.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:n}),l=t.graphics.drawMarker(u[n].x,u[n].y,s);l.attr("rel",n),l.attr("j",n),l.attr("index",o),l.node.setAttribute("default-marker-size",s.pSize);var h=t.graphics.group({class:"apexcharts-series-markers"});h&&h.add(l),g.add(h),c.add(g);var d=i.config.dataLabels;if(d.enabled){var p=d.formatter(i.globals.series[o][n],{seriesIndex:o,dataPointIndex:n,w:i});a.plotDataLabelsText({x:u[n].x,y:u[n].y,text:p,textAnchor:"middle",i:o,j:o,parent:f,offsetCorrection:!1,dataLabelsConfig:r({},d)})}c.add(f)})),s.push(c)})),this.drawPolygons({parent:d}),i.config.xaxis.labels.show){var p=this.drawXAxisTexts();d.add(p)}return s.forEach((function(e){d.add(e)})),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(e){for(var t=this,i=this.w,r=e.parent,n=new Le(this.ctx),s=i.globals.yAxisScale[0].result.reverse(),a=s.length,o=[],l=this.size/(a-1),c=0;c<a;c++)o[c]=l*c;o.reverse();var h=[],d=[];o.forEach((function(e,i){var r=x.getPolygonPos(e,t.dataPointsLen),n="";r.forEach((function(e,r){if(0===i){var s=t.graphics.drawLine(e.x,e.y,0,0,Array.isArray(t.polygons.connectorColors)?t.polygons.connectorColors[r]:t.polygons.connectorColors);d.push(s)}0===r&&t.yaxisLabelsTextsPos.push({x:e.x,y:e.y}),n+=e.x+","+e.y+" "})),h.push(n)})),h.forEach((function(e,n){var s=t.polygons.strokeColors,a=t.polygons.strokeWidth,o=t.graphics.drawPolygon(e,Array.isArray(s)?s[n]:s,Array.isArray(a)?a[n]:a,i.globals.radarPolygons.fill.colors[n]);r.add(o)})),d.forEach((function(e){r.add(e)})),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((function(e,i){var r=n.drawYAxisTexts(e.x,e.y,i,s[i]);t.yaxisLabels.add(r)}))}},{key:"drawXAxisTexts",value:function(){var e=this,t=this.w,i=t.config.xaxis.labels,n=this.graphics.group({class:"apexcharts-xaxis"}),s=x.getPolygonPos(this.size,this.dataPointsLen);return t.globals.labels.forEach((function(a,o){var l=t.config.xaxis.labels.formatter,c=new T(e.ctx);if(s[o]){var h=e.getTextPos(s[o],e.size),d=l(a,{seriesIndex:-1,dataPointIndex:o,w:t});c.plotDataLabelsText({x:h.newX,y:h.newY,text:d,textAnchor:h.textAnchor,i:o,j:o,parent:n,color:Array.isArray(i.style.colors)&&i.style.colors[o]?i.style.colors[o]:"#a8a8a8",dataLabelsConfig:r({textAnchor:h.textAnchor,dropShadow:{enabled:!1}},i),offsetCorrection:!1})}})),n}},{key:"createPaths",value:function(e,t){var i=this,r=[],n=[],s=[],a=[];if(e.length){n=[this.graphics.move(t.x,t.y)],a=[this.graphics.move(t.x,t.y)];var o=this.graphics.move(e[0].x,e[0].y),l=this.graphics.move(e[0].x,e[0].y);e.forEach((function(t,r){o+=i.graphics.line(t.x,t.y),l+=i.graphics.line(t.x,t.y),r===e.length-1&&(o+="Z",l+="Z")})),r.push(o),s.push(l)}return{linePathsFrom:n,linePathsTo:r,areaPathsFrom:a,areaPathsTo:s}}},{key:"getTextPos",value:function(e,t){var i="middle",r=e.x,n=e.y;return Math.abs(e.x)>=10?e.x>0?(i="start",r+=10):e.x<0&&(i="end",r-=10):i="middle",Math.abs(e.y)>=t-10&&(e.y<0?n-=10:e.y>0&&(n+=10)),{textAnchor:i,newX:r,newY:n}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,r=0;r<t.globals.previousPaths.length;r++){var n=t.globals.previousPaths[r];n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(e,10)&&void 0!==t.globals.previousPaths[r].paths[0]&&(i=t.globals.previousPaths[r].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var r=[],n=0;n<i;n++){var s={};s.x=e[n]*Math.sin(t[n]),s.y=-e[n]*Math.cos(t[n]),r.push(s)}return r}}]),e}(),ze=function(e){c(i,Ae);var t=g(i);function i(e){var r;s(this,i),(r=t.call(this,e)).ctx=e,r.w=e.w,r.animBeginArr=[0],r.animDur=0;var n=r.w;return r.startAngle=n.config.plotOptions.radialBar.startAngle,r.endAngle=n.config.plotOptions.radialBar.endAngle,r.totalAngle=Math.abs(n.config.plotOptions.radialBar.endAngle-n.config.plotOptions.radialBar.startAngle),r.trackStartAngle=n.config.plotOptions.radialBar.track.startAngle,r.trackEndAngle=n.config.plotOptions.radialBar.track.endAngle,r.donutDataLabels=r.w.config.plotOptions.radialBar.dataLabels,r.radialDataLabels=r.donutDataLabels,r.trackStartAngle||(r.trackStartAngle=r.startAngle),r.trackEndAngle||(r.trackEndAngle=r.endAngle),360===r.endAngle&&(r.endAngle=359.99),r.margin=parseInt(n.config.plotOptions.radialBar.track.margin,10),r}return o(i,[{key:"draw",value:function(e){var t=this.w,i=new y(this.ctx),r=i.group({class:"apexcharts-radialbar"});if(t.globals.noData)return r;var n=i.group(),s=this.defaultSize/2,a=t.globals.gridWidth/2,o=this.defaultSize/2.05;t.config.chart.sparkline.enabled||(o=o-t.config.stroke.width-t.config.chart.dropShadow.blur);var l=t.globals.fill.colors;if(t.config.plotOptions.radialBar.track.show){var c=this.drawTracks({size:o,centerX:a,centerY:s,colorArr:l,series:e});n.add(c)}var h=this.drawArcs({size:o,centerX:a,centerY:s,colorArr:l,series:e}),d=360;t.config.plotOptions.radialBar.startAngle<0&&(d=this.totalAngle);var u=(360-d)/360;if(t.globals.radialSize=o-o*u,this.radialDataLabels.value.show){var g=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);t.globals.radialSize+=g*u}return n.add(h.g),"front"===t.config.plotOptions.radialBar.hollow.position&&(h.g.add(h.elHollow),h.dataLabels&&h.g.add(h.dataLabels)),r.add(n),r}},{key:"drawTracks",value:function(e){var t=this.w,i=new y(this.ctx),r=i.group({class:"apexcharts-tracks"}),n=new b(this.ctx),s=new P(this.ctx),a=this.getStrokeWidth(e);e.size=e.size-a/2;for(var o=0;o<e.series.length;o++){var l=i.group({class:"apexcharts-radialbar-track apexcharts-track"});r.add(l),l.attr({rel:o+1}),e.size=e.size-a-this.margin;var c=t.config.plotOptions.radialBar.track,h=s.fillPath({seriesNumber:0,size:e.size,fillColors:Array.isArray(c.background)?c.background[o]:c.background,solid:!0}),d=this.trackStartAngle,u=this.trackEndAngle;Math.abs(u)+Math.abs(d)>=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:h,strokeWidth:a*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var f=c.dropShadow;n.dropShadow(g,f)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:e.centerX,centerY:e.centerY,endAngle:u,startAngle:d,size:e.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:t.globals.easing})}return r}},{key:"drawArcs",value:function(e){var t=this.w,i=new y(this.ctx),r=new P(this.ctx),n=new b(this.ctx),s=i.group(),a=this.getStrokeWidth(e);e.size=e.size-a/2;var o=t.config.plotOptions.radialBar.hollow.background,l=e.size-a*e.series.length-this.margin*e.series.length-a*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-t.config.plotOptions.radialBar.hollow.margin;void 0!==t.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(e,s,l,o));var h=this.drawHollow({size:c,centerX:e.centerX,centerY:e.centerY,fill:o||"transparent"});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=t.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(h,d)}var u=1;!this.radialDataLabels.total.show&&t.globals.series.length>1&&(u=0);var g=null;this.radialDataLabels.show&&(g=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:e.centerX,centerY:e.centerY,opacity:u})),"back"===t.config.plotOptions.radialBar.hollow.position&&(s.add(h),g&&s.add(g));var f=!1;t.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var p=f?e.series.length-1:0;f?p>=0:p<e.series.length;f?p--:p++){var v=i.group({class:"apexcharts-series apexcharts-radial-series",seriesName:x.escapeString(t.globals.seriesNames[p])});s.add(v),v.attr({rel:p+1,"data:realIndex":p}),this.ctx.series.addCollapsedClassToSeries(v,p),e.size=e.size-a-this.margin;var m=r.fillPath({seriesNumber:p,size:e.size,value:e.series[p]}),w=this.startAngle,C=void 0,S=x.negToZero(e.series[p]>100?100:e.series[p])/100,k=Math.round(this.totalAngle*S)+this.startAngle,L=void 0;t.globals.dataChanged&&(C=this.startAngle,L=Math.round(this.totalAngle*x.negToZero(t.globals.previousPaths[p])/100)+C),Math.abs(k)+Math.abs(w)>=360&&(k-=.01),Math.abs(L)+Math.abs(C)>=360&&(L-=.01);var A=k-w,E=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[p]:t.config.stroke.dashArray,z=i.drawPath({d:"",stroke:m,strokeWidth:a,fill:"none",fillOpacity:t.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+p,strokeDashArray:E});if(y.setAttrs(z.node,{"data:angle":A,"data:value":e.series[p]}),t.config.chart.dropShadow.enabled){var _=t.config.chart.dropShadow;n.dropShadow(z,_,p)}n.setSelectionFilter(z,0,p),this.addListeners(z,this.radialDataLabels),v.add(z),z.attr({index:0,j:p});var R=0;!this.initialAnim||t.globals.resized||t.globals.dataChanged||(R=t.config.chart.animations.speed),t.globals.dataChanged&&(R=t.config.chart.animations.dynamicAnimation.speed),this.animDur=R/(1.2*e.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(z,{centerX:e.centerX,centerY:e.centerY,endAngle:k,startAngle:w,prevEndAngle:L,prevStartAngle:C,size:e.size,i:p,totalItems:2,animBeginArr:this.animBeginArr,dur:R,shouldSetPrevPaths:!0,easing:t.globals.easing})}return{g:s,elHollow:h,dataLabels:g}}},{key:"drawHollow",value:function(e){var t=new y(this.ctx).drawCircle(2*e.size);return t.attr({class:"apexcharts-radialbar-hollow",cx:e.centerX,cy:e.centerY,r:e.size,fill:e.fill}),t}},{key:"drawHollowImage",value:function(e,t,i,r){var n=this.w,s=new P(this.ctx),a=x.randomId(),o=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)s.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(n.globals.cuid).concat(a)}),r="url(#pattern".concat(n.globals.cuid).concat(a,")");else{var l=n.config.plotOptions.radialBar.hollow.imageWidth,c=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var h=n.globals.dom.Paper.image(o).loaded((function(t){this.move(e.centerX-t.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-t.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)}));t.add(h)}else{var d=n.globals.dom.Paper.image(o).loaded((function(t){this.move(e.centerX-l/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-c/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));t.add(d)}}return r}},{key:"getStrokeWidth",value:function(e){var t=this.w;return e.size*(100-parseInt(t.config.plotOptions.radialBar.hollow.size,10))/100/(e.series.length+1)-this.margin}}]),i}(),Pe=function(){function e(t){s(this,e),this.w=t.w,this.lineCtx=t}return o(e,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if("line"===i.config.chart.type&&("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[e])&&new w(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var r=t[e].slice();r[r.length-1]=r[r.length-1]+1e-6,t[e]=r}return t}},{key:"calculatePoints",value:function(e){var t=e.series,i=e.realIndex,r=e.x,n=e.y,s=e.i,a=e.j,o=e.prevY,l=this.w,c=[],h=[];if(0===a){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),c.push(d),h.push(x.isNumber(t[s][0])?o+l.config.markers.offsetY:null),c.push(r+l.config.markers.offsetX),h.push(x.isNumber(t[s][a+1])?n+l.config.markers.offsetY:null)}else c.push(r+l.config.markers.offsetX),h.push(x.isNumber(t[s][a+1])?n+l.config.markers.offsetY:null);return{x:c,y:h}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,i=e.pathFromArea,r=e.realIndex,n=this.w,s=0;s<n.globals.previousPaths.length;s++){var a=n.globals.previousPaths[s];("line"===a.type||"area"===a.type)&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(r,10)&&("line"===a.type?(this.lineCtx.appendPathFrom=!1,t=n.globals.previousPaths[s].paths[0].d):"area"===a.type&&(this.lineCtx.appendPathFrom=!1,i=n.globals.previousPaths[s].paths[0].d,n.config.stroke.show&&n.globals.previousPaths[s].paths[1]&&(t=n.globals.previousPaths[s].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t=e.i,i=e.series,r=e.prevY,n=e.lineYPosition,s=this.w;if(void 0!==i[t][0])r=(n=s.config.chart.stacked&&t>0?this.lineCtx.prevSeriesY[t-1][0]:this.lineCtx.zeroY)-i[t][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?i[t][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(s.config.chart.stacked&&t>0&&void 0===i[t][0])for(var a=t-1;a>=0;a--)if(null!==i[a][0]&&void 0!==i[a][0]){r=n=this.lineCtx.prevSeriesY[a][0];break}return{prevY:r,lineYPosition:n}}}]),e}(),_e=function(){function e(t,i,r){s(this,e),this.ctx=t,this.w=t.w,this.xyRatios=i,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||r,this.scatter=new R(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Pe(this),this.markers=new _(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return o(e,[{key:"draw",value:function(e,t,i){var r=this.w,n=new y(this.ctx),s=r.globals.comboCharts?t:r.config.chart.type,a=n.group({class:"apexcharts-".concat(s,"-series apexcharts-plot-series")}),o=new w(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=o.getLogSeries(e),this.yRatio=o.getLogYRatios(this.yRatio);for(var l=[],c=0;c<e.length;c++){e=this.lineHelpers.sameValueSeriesFix(c,e);var h=r.globals.comboCharts?i[c]:c;this._initSerieVariables(e,c,h);var d=[],u=[],g=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,h),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(g=(r.globals.seriesX[h][0]-r.globals.minX)/this.xRatio),u.push(g);var f,p=g,v=p,x=this.zeroY;x=this.lineHelpers.determineFirstPrevY({i:c,series:e,prevY:x,lineYPosition:0}).prevY,d.push(x),f=x;var m=this._calculatePathsFrom({series:e,i:c,realIndex:h,prevX:v,prevY:x}),b=this._iterateOverDataPoints({series:e,realIndex:h,i:c,x:g,y:1,pX:p,pY:f,pathsFrom:m,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:u,yArrj:d});this._handlePaths({type:s,realIndex:h,i:c,paths:b}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(r.config.chart.stacked)for(var C=l.length;C>0;C--)a.add(l[C-1]);else for(var S=0;S<l.length;S++)a.add(l[S]);return a}},{key:"_initSerieVariables",value:function(e,t,i){var r=this.w,n=new y(this.ctx);this.xDivision=r.globals.gridWidth/(r.globals.dataPoints-("on"===r.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(r.config.stroke.width)?r.config.stroke.width[i]:r.config.stroke.width,this.yRatio.length>1&&(this.yaxisIndex=i),this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.zeroY=r.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?r.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>r.globals.gridHeight||"end"===r.config.plotOptions.area.fillTo)&&(this.areaBottomY=r.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=n.group({class:"apexcharts-series",seriesName:x.escapeString(r.globals.seriesNames[i])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":i});var s=e[t].length===r.globals.dataPoints;this.elSeries.attr({"data:longestSeries":s,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,r,n,s=e.series,a=e.i,o=e.realIndex,l=e.prevX,c=e.prevY,h=this.w,d=new y(this.ctx);if(null===s[a][0]){for(var u=0;u<s[a].length;u++)if(null!==s[a][u]){l=this.xDivision*u,c=this.zeroY-s[a][u]/this.yRatio[this.yaxisIndex],t=d.move(l,c),i=d.move(l,this.areaBottomY);break}}else t=d.move(l,c),i=d.move(l,this.areaBottomY)+d.line(l,c);if(r=d.move(-1,this.zeroY)+d.line(-1,this.zeroY),n=d.move(-1,this.zeroY)+d.line(-1,this.zeroY),h.globals.previousPaths.length>0){var g=this.lineHelpers.checkPreviousPaths({pathFromLine:r,pathFromArea:n,realIndex:o});r=g.pathFromLine,n=g.pathFromArea}return{prevX:l,prevY:c,linePath:t,areaPath:i,pathFromLine:r,pathFromArea:n}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,n=e.i,s=e.paths,a=this.w,o=new y(this.ctx),l=new P(this.ctx);this.prevSeriesY.push(s.yArrj),a.globals.seriesXvalues[i]=s.xArrj,a.globals.seriesYvalues[i]=s.yArrj;var c=a.config.forecastDataPoints;if(c.count>0){var h=a.globals.seriesXvalues[i][a.globals.seriesXvalues[i].length-c.count-1],d=o.drawRect(h,0,a.globals.gridWidth,a.globals.gridHeight,0);a.globals.dom.elForecastMask.appendChild(d.node);var u=o.drawRect(0,0,h,a.globals.gridHeight,0);a.globals.dom.elNonForecastMask.appendChild(u.node)}this.pointsChart||a.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:n,realIndex:i,animationDelay:n,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if("area"===t)for(var f=l.fillPath({seriesNumber:i}),p=0;p<s.areaPaths.length;p++){var v=o.renderPaths(r(r({},g),{},{pathFrom:s.pathFromArea,pathTo:s.areaPaths[p],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:f}));this.elSeries.add(v)}if(a.config.stroke.show&&!this.pointsChart){var x;x="line"===t?l.fillPath({seriesNumber:i,i:n}):a.globals.stroke.colors[i];for(var m=0;m<s.linePaths.length;m++){var b=r(r({},g),{},{pathFrom:s.pathFromLine,pathTo:s.linePaths[m],stroke:x,strokeWidth:this.strokeWidth,strokeLineCap:a.config.stroke.lineCap,fill:"none"}),w=o.renderPaths(b);if(this.elSeries.add(w),c.count>0){var C=o.renderPaths(b);C.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&C.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(C),C.attr("clip-path","url(#forecastMask".concat(a.globals.cuid,")")),w.attr("clip-path","url(#nonForecastMask".concat(a.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){for(var t=e.series,i=e.realIndex,r=e.i,n=e.x,s=e.y,a=e.pX,o=e.pY,l=e.pathsFrom,c=e.linePaths,h=e.areaPaths,d=e.seriesIndex,u=e.lineYPosition,g=e.xArrj,f=e.yArrj,p=this.w,v=new y(this.ctx),m=this.yRatio,b=l.prevY,w=l.linePath,C=l.areaPath,S=l.pathFromLine,k=l.pathFromArea,L=x.isNumber(p.globals.minYArr[i])?p.globals.minYArr[i]:p.globals.minY,A=p.globals.dataPoints>1?p.globals.dataPoints-1:p.globals.dataPoints,E=0;E<A;E++){var z=void 0===t[r][E+1]||null===t[r][E+1];if(p.globals.isXNumeric){var P=p.globals.seriesX[i][E+1];void 0===p.globals.seriesX[i][E+1]&&(P=p.globals.seriesX[i][A-1]),n=(P-p.globals.minX)/this.xRatio}else n+=this.xDivision;u=p.config.chart.stacked&&r>0&&p.globals.collapsedSeries.length<p.config.series.length-1?this.prevSeriesY[function(e){for(var t=e,i=0;i<p.globals.series.length;i++)if(p.globals.collapsedSeriesIndices.indexOf(e)>-1){t--;break}return t>=0?t:0}(r-1)][E+1]:this.zeroY,s=z?u-L/m[this.yaxisIndex]+2*(this.isReversed?L/m[this.yaxisIndex]:0):u-t[r][E+1]/m[this.yaxisIndex]+2*(this.isReversed?t[r][E+1]/m[this.yaxisIndex]:0),g.push(n),f.push(s);var _=this.lineHelpers.calculatePoints({series:t,x:n,y:s,realIndex:i,i:r,j:E,prevY:b}),R=this._createPaths({series:t,i:r,realIndex:i,j:E,x:n,y:s,pX:a,pY:o,linePath:w,areaPath:C,linePaths:c,areaPaths:h,seriesIndex:d});h=R.areaPaths,c=R.linePaths,a=R.pX,o=R.pY,C=R.areaPath,w=R.linePath,this.appendPathFrom&&(S+=v.line(n,this.zeroY),k+=v.line(n,this.zeroY)),this.handleNullDataPoints(t,_,r,E,i),this._handleMarkersAndLabels({pointsPos:_,series:t,x:n,y:s,prevY:b,i:r,j:E,realIndex:i})}return{yArrj:f,xArrj:g,pathFromArea:k,areaPaths:h,pathFromLine:S,linePaths:c}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.pointsPos;e.series,e.x,e.y,e.prevY;var i=e.i,r=e.j,n=e.realIndex,s=this.w,a=new T(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{s.globals.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var o=this.markers.plotChartMarkers(t,n,r+1);null!==o&&this.elPointsMain.add(o)}var l=a.drawDataLabel(t,n,r+1,null);null!==l&&this.elDataLabelsWrap.add(l)}},{key:"_createPaths",value:function(e){var t=e.series,i=e.i,r=e.realIndex,n=e.j,s=e.x,a=e.y,o=e.pX,l=e.pY,c=e.linePath,h=e.areaPath,d=e.linePaths,u=e.areaPaths,g=e.seriesIndex,f=this.w,p=new y(this.ctx),v=f.config.stroke.curve,x=this.areaBottomY;if(Array.isArray(f.config.stroke.curve)&&(v=Array.isArray(g)?f.config.stroke.curve[g[i]]:f.config.stroke.curve[i]),"smooth"===v){var m=.35*(s-o);f.globals.hasNullValues?(null!==t[i][n]&&(null!==t[i][n+1]?(c=p.move(o,l)+p.curve(o+m,l,s-m,a,s+1,a),h=p.move(o+1,l)+p.curve(o+m,l,s-m,a,s+1,a)+p.line(s,x)+p.line(o,x)+"z"):(c=p.move(o,l),h=p.move(o,l)+"z")),d.push(c),u.push(h)):(c+=p.curve(o+m,l,s-m,a,s,a),h+=p.curve(o+m,l,s-m,a,s,a)),o=s,l=a,n===t[i].length-2&&(h=h+p.curve(o,l,s,a,s,x)+p.move(s,a)+"z",f.globals.hasNullValues||(d.push(c),u.push(h)))}else{if(null===t[i][n+1]){c+=p.move(s,a);var b=f.globals.isXNumeric?(f.globals.seriesX[r][n]-f.globals.minX)/this.xRatio:s-this.xDivision;h=h+p.line(b,x)+p.move(s,a)+"z"}null===t[i][n]&&(c+=p.move(s,a),h+=p.move(s,x)),"stepline"===v?(c=c+p.line(s,null,"H")+p.line(null,a,"V"),h=h+p.line(s,null,"H")+p.line(null,a,"V")):"straight"===v&&(c+=p.line(s,a),h+=p.line(s,a)),n===t[i].length-2&&(h=h+p.line(s,x)+p.move(s,a)+"z",d.push(c),u.push(h))}return{linePaths:d,areaPaths:u,pX:o,pY:l,linePath:c,areaPath:h}}},{key:"handleNullDataPoints",value:function(e,t,i,r,n){var s=this.w;if(null===e[i][r]&&s.config.markers.showNullDataPoints||1===e[i].length){var a=this.markers.plotChartMarkers(t,n,r+1,this.strokeWidth-s.config.markers.strokeWidth/2,!0);null!==a&&this.elPointsMain.add(a)}}}]),e}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function e(t,i,r,n){this.xoffset=t,this.yoffset=i,this.height=n,this.width=r,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(e){var t,i=[],r=this.xoffset,n=this.yoffset,a=s(e)/this.height,o=s(e)/this.width;if(this.width>=this.height)for(t=0;t<e.length;t++)i.push([r,n,r+a,n+e[t]/a]),n+=e[t]/a;else for(t=0;t<e.length;t++)i.push([r,n,r+e[t]/o,n+o]),r+=e[t]/o;return i},this.cutArea=function(t){var i;if(this.width>=this.height){var r=t/this.height,n=this.width-r;i=new e(this.xoffset+r,this.yoffset,n,this.height)}else{var s=t/this.width,a=this.height-s;i=new e(this.xoffset,this.yoffset+s,this.width,a)}return i}}function t(t,r,n,a,o){return a=void 0===a?0:a,o=void 0===o?0:o,function(e){var t,i,r=[];for(t=0;t<e.length;t++)for(i=0;i<e[t].length;i++)r.push(e[t][i]);return r}(i(function(e,t){var i,r=[],n=t/s(e);for(i=0;i<e.length;i++)r[i]=e[i]*n;return r}(t,r*n),[],new e(a,o,r,n),[]))}function i(e,t,n,a){var o,l,c;if(0!==e.length)return o=n.shortestEdge(),function(e,t,i){var n;return 0===e.length||((n=e.slice()).push(t),r(e,i)>=r(n,i))}(t,l=e[0],o)?(t.push(l),i(e.slice(1),t,n,a)):(c=n.cutArea(s(t),a),a.push(n.getCoordinates(t)),i(e,[],c,a)),a;a.push(n.getCoordinates(t))}function r(e,t){var i=Math.min.apply(Math,e),r=Math.max.apply(Math,e),n=s(e);return Math.max(Math.pow(t,2)*r/Math.pow(n,2),Math.pow(n,2)/(Math.pow(t,2)*i))}function n(e){return e&&e.constructor===Array}function s(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t];return i}function a(e){var t,i=0;if(n(e[0]))for(t=0;t<e.length;t++)i+=a(e[t]);else i=s(e);return i}return function e(i,r,s,o,l){o=void 0===o?0:o,l=void 0===l?0:l;var c,h,d=[],u=[];if(n(i[0])){for(h=0;h<i.length;h++)d[h]=a(i[h]);for(c=t(d,r,s,o,l),h=0;h<i.length;h++)u.push(e(i[h],c[h][2]-c[h][0],c[h][3]-c[h][1],c[h][0],c[h][1]))}else u=t(i,r,s,o,l);return u}}();var Re,Te,Me=function(){function e(t,i){s(this,e),this.ctx=t,this.w=t.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Se(t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return o(e,[{key:"draw",value:function(e){var t=this,i=this.w,r=new y(this.ctx),n=new P(this.ctx),s=r.group({class:"apexcharts-treemap"});if(i.globals.noData)return s;var a=[];return e.forEach((function(e){var t=e.map((function(e){return Math.abs(e)}));a.push(t)})),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach((function(e,i){e.data.forEach((function(e){Array.isArray(t.labels[i])||(t.labels[i]=[]),t.labels[i].push(e.x)}))})),window.TreemapSquared.generate(a,i.globals.gridWidth,i.globals.gridHeight).forEach((function(a,o){var l=r.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:x.escapeString(i.globals.seriesNames[o]),rel:o+1,"data:realIndex":o});if(i.config.chart.dropShadow.enabled){var c=i.config.chart.dropShadow;new b(t.ctx).dropShadow(s,c,o)}var h=r.group({class:"apexcharts-data-labels"});a.forEach((function(s,a){var c=s[0],h=s[1],d=s[2],u=s[3],g=r.drawRect(c,h,d-c,u-h,0,"#fff",1,t.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?p:i.globals.stroke.colors[o]);g.attr({cx:c,cy:h,index:o,i:o,j:a,width:d-c,height:u-h});var f=t.helpers.getShadeColor(i.config.chart.type,o,a,t.negRange),p=f.color;void 0!==i.config.series[o].data[a]&&i.config.series[o].data[a].fillColor&&(p=i.config.series[o].data[a].fillColor);var v=n.fillPath({color:p,seriesNumber:o,dataPointIndex:a});g.node.classList.add("apexcharts-treemap-rect"),g.attr({fill:v}),t.helpers.addListeners(g);var x={x:c+(d-c)/2,y:h+(u-h)/2,width:0,height:0},m={x:c,y:h,width:d-c,height:u-h};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var b=1;i.globals.resized||(b=i.config.chart.animations.speed),t.animateTreemap(g,x,m,b)}if(i.globals.dataChanged){var y=1;t.dynamicAnim.enabled&&i.globals.shouldAnimate&&(y=t.dynamicAnim.speed,i.globals.previousPaths[o]&&i.globals.previousPaths[o][a]&&i.globals.previousPaths[o][a].rect&&(x=i.globals.previousPaths[o][a].rect),t.animateTreemap(g,x,m,y))}var w=t.getFontSize(s),C=i.config.dataLabels.formatter(t.labels[o][a],{value:i.globals.series[o][a],seriesIndex:o,dataPointIndex:a,w:i}),S=t.helpers.calculateDataLabels({text:C,x:(c+d)/2,y:(h+u)/2+t.strokeWidth/2+w/3,i:o,j:a,colorProps:f,fontSize:w,series:e});i.config.dataLabels.enabled&&S&&t.rotateToFitLabel(S,C,c,h,d,u),l.add(g),null!==S&&l.add(S)})),l.add(h),s.add(l)})),s}},{key:"getFontSize",value:function(e){var t,i,r=this.w,n=function e(t){var i,r=0;if(Array.isArray(t[0]))for(i=0;i<t.length;i++)r+=e(t[i]);else for(i=0;i<t.length;i++)r+=t[i].length;return r}(this.labels)/function e(t){var i,r=0;if(Array.isArray(t[0]))for(i=0;i<t.length;i++)r+=e(t[i]);else for(i=0;i<t.length;i++)r+=1;return r}(this.labels);return t=(e[2]-e[0])*(e[3]-e[1]),i=Math.pow(t,.5),Math.min(i/n,parseInt(r.config.dataLabels.style.fontSize,10))}},{key:"rotateToFitLabel",value:function(e,t,i,r,n,s){var a=new y(this.ctx),o=a.getTextRects(t);if(o.width+5>n-i&&o.width<=s-r){var l=a.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(l.x," ").concat(l.y,")"))}}},{key:"animateTreemap",value:function(e,t,i,r){var n=new m(this.ctx);n.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:i.x,y:i.y,width:i.width,height:i.height},r,(function(){n.animationCompleted(e)}))}}]),e}(),Fe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return o(e,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,n=this.w;if(n.globals.allSeriesCollapsed)return n.globals.labels=[],n.globals.timescaleLabels=[],[];var s=new D(this.ctx),a=(t-e)/864e5;this.determineInterval(a),n.globals.disableZoomIn=!1,n.globals.disableZoomOut=!1,a<.00011574074074074075?n.globals.disableZoomIn=!0:a>5e4&&(n.globals.disableZoomOut=!0);var o=s.getTimeUnitsfromTimestamp(e,t,this.utc),l=n.globals.gridWidth/a,c=l/24,h=c/60,d=h/60,u=Math.floor(24*a),g=Math.floor(1440*a),f=Math.floor(86400*a),p=Math.floor(a),v=Math.floor(a/30),x=Math.floor(a/365),m={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},b={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:h,secondsWidthOnXAxis:d,numberOfSeconds:f,numberOfMinutes:g,numberOfHours:u,numberOfDays:p,numberOfMonths:v,numberOfYears:x};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(e){var t={position:e.position,unit:e.unit,year:e.year,day:e.day?e.day:1,hour:e.hour?e.hour:0,month:e.month+1};return"month"===e.unit?r(r({},t),{},{day:1,value:e.value+1}):"day"===e.unit||"hour"===e.unit?r(r({},t),{},{value:e.value}):"minute"===e.unit?r(r({},t),{},{value:e.value,minute:e.value}):"second"===e.unit?r(r({},t),{},{value:e.value,minute:e.minute,second:e.second}):e}));return y.filter((function(e){var t=1,r=Math.ceil(n.globals.gridWidth/120),s=e.value;void 0!==n.config.xaxis.tickAmount&&(r=n.config.xaxis.tickAmount),y.length>r&&(t=Math.floor(y.length/r));var a=!1,o=!1;switch(i.tickInterval){case"years":"year"===e.unit&&(a=!0);break;case"half_year":t=7,"year"===e.unit&&(a=!0);break;case"months":t=1,"year"===e.unit&&(a=!0);break;case"months_fortnight":t=15,"year"!==e.unit&&"month"!==e.unit||(a=!0),30===s&&(o=!0);break;case"months_days":t=10,"month"===e.unit&&(a=!0),30===s&&(o=!0);break;case"week_days":t=8,"month"===e.unit&&(a=!0);break;case"days":t=1,"month"===e.unit&&(a=!0);break;case"hours":"day"===e.unit&&(a=!0);break;case"minutes_fives":case"seconds_fives":s%5!=0&&(o=!0);break;case"seconds_tens":s%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((s%t==0||a)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var i=this.w,r=this.formatDates(e),n=this.removeOverlappingTS(r);i.globals.timescaleLabels=n.slice(),new ce(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,i=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>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(e){var t=e.firstVal,i=e.currentMonth,r=e.currentYear,n=e.daysWidthOnXAxis,s=e.numberOfYears,a=t.minYear,o=0,l=new D(this.ctx),c="year";if(t.minDate>1||t.minMonth>0){var h=l.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);o=(l.determineDaysOfYear(t.minYear)-h+1)*n,a=t.minYear+1,this.timeScaleArray.push({position:o,value:a,unit:c,year:a,month:x.monthMod(i+1)})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:o,value:a,unit:c,year:r,month:x.monthMod(i+1)});for(var d=a,u=o,g=0;g<s;g++)d++,u=l.determineDaysOfYear(d-1)*n+u,this.timeScaleArray.push({position:u,value:d,unit:c,year:d,month:1})}},{key:"generateMonthScale",value:function(e){var t=e.firstVal,i=e.currentMonthDate,r=e.currentMonth,n=e.currentYear,s=e.daysWidthOnXAxis,a=e.numberOfMonths,o=r,l=0,c=new D(this.ctx),h="month",d=0;if(t.minDate>1){l=(c.determineDaysOfMonths(r+1,t.minYear)-i+1)*s,o=x.monthMod(r+1);var u=n+d,g=x.monthMod(o),f=o;0===o&&(h="year",f=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:f,unit:h,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:h,year:n,month:x.monthMod(r)});for(var p=o+1,v=l,m=0,b=1;m<a;m++,b++){0===(p=x.monthMod(p))?(h="year",d+=1):h="month";var y=this._getYear(n,p,d);v=c.determineDaysOfMonths(p,y)*s+v;var w=0===p?y:p;this.timeScaleArray.push({position:v,value:w,unit:h,year:y,month:0===p?1:p}),p++}}},{key:"generateDayScale",value:function(e){var t=e.firstVal,i=e.currentMonth,r=e.currentYear,n=e.hoursWidthOnXAxis,s=e.numberOfDays,a=new D(this.ctx),o="day",l=t.minDate+1,c=l,h=function(e,t,i){return e>a.determineDaysOfMonths(t+1,i)?(c=1,o="month",u=t+=1,t):t},d=(24-t.minHour)*n,u=l,g=h(c,i,r);0===t.minHour&&1===t.minDate?(d=0,u=x.monthMod(t.minMonth),o="month",c=t.minDate,s++):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(d=0,l=t.minDate,u=l,g=h(c=l,i,r)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(r,g,0),month:x.monthMod(g),day:c});for(var f=d,p=0;p<s;p++){o="day",g=h(c+=1,g,this._getYear(r,g,0));var v=this._getYear(r,g,0);f=24*n+f;var m=1===c?x.monthMod(g):c;this.timeScaleArray.push({position:f,value:m,unit:o,year:v,month:x.monthMod(g),day:m})}}},{key:"generateHourScale",value:function(e){var t=e.firstVal,i=e.currentDate,r=e.currentMonth,n=e.currentYear,s=e.minutesWidthOnXAxis,a=e.numberOfHours,o=new D(this.ctx),l="hour",c=function(e,t){return e>o.determineDaysOfMonths(t+1,n)&&(p=1,t+=1),{month:t,date:p}},h=function(e,t){return e>o.determineDaysOfMonths(t+1,n)?t+=1:t},d=60-(t.minMinute+t.minSecond/60),u=d*s,g=t.minHour+1,f=g+1;60===d&&(u=0,f=(g=t.minHour)+1);var p=i,v=h(p,r);this.timeScaleArray.push({position:u,value:g,unit:l,day:p,hour:f,year:n,month:x.monthMod(v)});for(var m=u,b=0;b<a;b++){l="hour",f>=24&&(f=0,l="day",v=c(p+=1,v).month,v=h(p,v));var y=this._getYear(n,v,0);m=0===f&&0===b?d*s:60*s+m;var w=0===f?p:f;this.timeScaleArray.push({position:m,value:w,unit:l,hour:f,day:p,year:y,month:x.monthMod(v)}),f++}}},{key:"generateMinuteScale",value:function(e){for(var t=e.currentMillisecond,i=e.currentSecond,r=e.currentMinute,n=e.currentHour,s=e.currentDate,a=e.currentMonth,o=e.currentYear,l=e.minutesWidthOnXAxis,c=e.secondsWidthOnXAxis,h=e.numberOfMinutes,d=r+1,u=s,g=a,f=o,p=n,v=(60-i-t/1e3)*c,m=0;m<h;m++)d>=60&&(d=0,24===(p+=1)&&(p=0)),this.timeScaleArray.push({position:v,value:d,unit:"minute",hour:p,minute:d,day:u,year:this._getYear(f,g,0),month:x.monthMod(g)}),v+=l,d++}},{key:"generateSecondScale",value:function(e){for(var t=e.currentMillisecond,i=e.currentSecond,r=e.currentMinute,n=e.currentHour,s=e.currentDate,a=e.currentMonth,o=e.currentYear,l=e.secondsWidthOnXAxis,c=e.numberOfSeconds,h=i+1,d=r,u=s,g=a,f=o,p=n,v=(1e3-t)/1e3*l,m=0;m<c;m++)h>=60&&(h=0,++d>=60&&(d=0,24==++p&&(p=0))),this.timeScaleArray.push({position:v,value:h,unit:"second",hour:p,minute:d,second:h,day:u,year:this._getYear(f,g,0),month:x.monthMod(g)}),v+=l,h++}},{key:"createRawDateString",value:function(e,t){var i=e.year;return 0===e.month&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),"day"===e.unit?i+="day"===e.unit?"-"+("0"+t).slice(-2):"-01":i+="-"+("0"+(e.day?e.day:"1")).slice(-2),"hour"===e.unit?i+="hour"===e.unit?"T"+("0"+t).slice(-2):"T00":i+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),"minute"===e.unit?i+=":"+("0"+t).slice(-2):i+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),"second"===e.unit?i+=":"+("0"+t).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var t=this,i=this.w;return e.map((function(e){var r=e.value.toString(),n=new D(t.ctx),s=t.createRawDateString(e,r),a=n.getDate(n.parseDate(s));if(t.utc||(a=n.getDate(n.parseDateWithTimezone(s))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===e.unit&&(o=l.year),"month"===e.unit&&(o=l.month),"day"===e.unit&&(o=l.day),"hour"===e.unit&&(o=l.hour),"minute"===e.unit&&(o=l.minute),"second"===e.unit&&(o=l.second),r=n.formatDate(a,o)}else r=n.formatDate(a,i.config.xaxis.labels.format);return{dateString:s,position:e.position,value:r,unit:e.unit,year:e.year,month:e.month}}))}},{key:"removeOverlappingTS",value:function(e){var t,i=this,r=new y(this.ctx),n=!1;e.length>0&&e[0].value&&e.every((function(t){return t.value.length===e[0].value.length}))&&(n=!0,t=r.getTextRects(e[0].value).width);var s=0,a=e.map((function(a,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=n?t:r.getTextRects(e[s].value).width,c=e[s].position;return a.position>c+l+10?(s=o,a):null}return a}));return a.filter((function(e){return null!==e}))}},{key:"_getYear",value:function(e,t,i){return e+Math.floor(t/12)+i}}]),e}(),Ie=function(){function e(t,i){s(this,e),this.ctx=i,this.w=i.w,this.el=t}return o(e,[{key:"setupElements",value:function(){var e=this.w.globals,t=this.w.config,i=t.chart.type;e.axisCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,e.xyCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,e.isBarHorizontal=("bar"===t.chart.type||"rangeBar"===t.chart.type||"boxPlot"===t.chart.type)&&t.plotOptions.bar.horizontal,e.chartClass=".apexcharts"+e.chartID,e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),y.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas "+e.chartClass.substring(1)}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=new window.SVG.Doc(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(t.chart.offsetX,", ").concat(t.chart.offsetY,")")}),e.dom.Paper.node.style.background=t.chart.background,this.setSVGDimensions(),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elAnnotations=e.dom.Paper.group().attr({class:"apexcharts-annotations"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elWrap.appendChild(e.dom.elLegendWrap),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var i=this.w,r=i.config,n=i.globals,s={series:[],i:[]},a={series:[],i:[]},o={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]},h={series:[],i:[]},d={series:[],i:[]};n.series.map((function(t,u){var g=0;void 0!==e[u].type?("column"===e[u].type||"bar"===e[u].type?(n.series.length>1&&r.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),c.series.push(t),c.i.push(u),g++,i.globals.columnSeries=c.series):"area"===e[u].type?(a.series.push(t),a.i.push(u),g++):"line"===e[u].type?(s.series.push(t),s.i.push(u),g++):"scatter"===e[u].type?(o.series.push(t),o.i.push(u)):"bubble"===e[u].type?(l.series.push(t),l.i.push(u),g++):"candlestick"===e[u].type?(h.series.push(t),h.i.push(u),g++):"boxPlot"===e[u].type?(d.series.push(t),d.i.push(u),g++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble"),g>1&&(n.comboCharts=!0)):(s.series.push(t),s.i.push(u))}));var u=new _e(this.ctx,t),g=new Ce(this.ctx,t);this.ctx.pie=new Ae(this.ctx);var f=new ze(this.ctx);this.ctx.rangeBar=new H(this.ctx,t);var p=new Ee(this.ctx),v=[];if(n.comboCharts){if(a.series.length>0&&v.push(u.draw(a.series,"area",a.i)),c.series.length>0)if(i.config.chart.stacked){var x=new we(this.ctx,t);v.push(x.draw(c.series,c.i))}else this.ctx.bar=new O(this.ctx,t),v.push(this.ctx.bar.draw(c.series,c.i));if(s.series.length>0&&v.push(u.draw(s.series,"line",s.i)),h.series.length>0&&v.push(g.draw(h.series,h.i)),d.series.length>0&&v.push(g.draw(d.series,d.i)),o.series.length>0){var m=new _e(this.ctx,t,!0);v.push(m.draw(o.series,"scatter",o.i))}if(l.series.length>0){var b=new _e(this.ctx,t,!0);v.push(b.draw(l.series,"bubble",l.i))}}else switch(r.chart.type){case"line":v=u.draw(n.series,"line");break;case"area":v=u.draw(n.series,"area");break;case"bar":r.chart.stacked?v=new we(this.ctx,t).draw(n.series):(this.ctx.bar=new O(this.ctx,t),v=this.ctx.bar.draw(n.series));break;case"candlestick":case"boxPlot":v=new Ce(this.ctx,t).draw(n.series);break;case"rangeBar":v=this.ctx.rangeBar.draw(n.series);break;case"heatmap":v=new ke(this.ctx,t).draw(n.series);break;case"treemap":v=new Me(this.ctx,t).draw(n.series);break;case"pie":case"donut":case"polarArea":v=this.ctx.pie.draw(n.series);break;case"radialBar":v=f.draw(n.series);break;case"radar":v=p.draw(n.series);break;default:v=u.draw(n.series)}return v}},{key:"setSVGDimensions",value:function(){var e=this.w.globals,t=this.w.config;e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;var i=x.getDimensions(this.el),r=t.chart.width.toString().split(/[0-9]+/g).pop();"%"===r?x.isNumber(i[0])&&(0===i[0].width&&(i=x.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(t.chart.width,10)/100):"px"!==r&&""!==r||(e.svgWidth=parseInt(t.chart.width,10));var n=t.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===n){var s=x.getDimensions(this.el.parentNode);e.svgHeight=s[1]*parseInt(t.chart.height,10)/100}else e.svgHeight=parseInt(t.chart.height,10);else e.axisCharts?e.svgHeight=e.svgWidth/1.61:e.svgHeight=e.svgWidth/1.2;if(e.svgWidth<0&&(e.svgWidth=0),e.svgHeight<0&&(e.svgHeight=0),y.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==n){var a=t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight=e.svgHeight+a+"px"}e.dom.elWrap.style.width=e.svgWidth+"px",e.dom.elWrap.style.height=e.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,t=e.translateY,i={transform:"translate("+e.translateX+", "+t+")"};y.setAttrs(e.dom.elGraphical.node,i)}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=0,r=e.config.chart.sparkline.enabled?1:15;r+=e.config.grid.padding.bottom,"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||!e.config.legend.show||e.config.legend.floating||(i=new de(this.ctx).legendHelpers.getLegendBBox().clwh+10);var n=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),s=2.05*e.globals.radialSize;if(n&&!e.config.chart.sparkline.enabled&&0!==e.config.plotOptions.radialBar.startAngle){var a=x.getBoundingClientRect(n);s=a.bottom;var o=a.bottom-a.top;s=Math.max(2.05*e.globals.radialSize,o)}var l=s+t.translateY+i+r;t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",l),t.dom.elWrap.style.height=l+"px",y.setAttrs(t.dom.Paper.node,{height:l}),t.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px"}},{key:"coreCalculations",value:function(){new q(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map((function(e){return[]}))},i=new Y,r=this.w.globals;i.initGlobalVars(r),r.seriesXvalues=t(),r.seriesYvalues=t()}},{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 e=null,t=this.w;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new te(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new te(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Fe(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new w(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.w;if(t.config.chart.brush.enabled&&"function"!=typeof t.config.chart.events.selection){var i=t.config.chart.brush.targets||[t.config.chart.brush.target];i.forEach((function(t){var i=ApexCharts.getChartByID(t);i.w.globals.brushSource=e.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){e.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){e.updateSourceChart(i)})})),t.config.chart.events.selection=function(e,n){i.forEach((function(e){var i=ApexCharts.getChartByID(e),s=x.clone(t.config.yaxis);if(t.config.chart.brush.autoScaleYaxis&&1===i.w.globals.series.length){var a=new Z(i);s=a.autoScaleY(i,s,n)}var o=i.w.config.yaxis.reduce((function(e,t,n){return[].concat(f(e),[r(r({},i.w.config.yaxis[n]),{},{min:s[0].min,max:s[0].max})])}),[]);i.ctx.updateHelpers._updateOptions({xaxis:{min:n.xaxis.min,max:n.xaxis.max},yaxis:o},!1,!1,!1,!1)}))}}}}]),e}(),Oe=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"_updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(o){var l=[t.ctx];s&&(l=t.ctx.getSyncedCharts()),t.ctx.w.globals.isExecCalled&&(l=[t.ctx],t.ctx.w.globals.isExecCalled=!1),l.forEach((function(s,c){var h=s.w;if(h.globals.shouldAnimate=r,i||(h.globals.resized=!0,h.globals.dataChanged=!0,r&&s.series.getPreviousPaths()),e&&"object"===n(e)&&(s.config=new X(e),e=w.extendArrayProps(s.config,e,h),s.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,h.config=x.extend(h.config,e),a&&(h.globals.lastXAxis=e.xaxis?x.clone(e.xaxis):[],h.globals.lastYAxis=e.yaxis?x.clone(e.yaxis):[],h.globals.initialConfig=x.extend({},h.config),h.globals.initialSeries=x.clone(h.config.series),e.series))){for(var d=0;d<h.globals.collapsedSeriesIndices.length;d++){var u=h.config.series[h.globals.collapsedSeriesIndices[d]];h.globals.collapsedSeries[d].data=h.globals.axisCharts?u.data.slice():u}for(var g=0;g<h.globals.ancillaryCollapsedSeriesIndices.length;g++){var f=h.config.series[h.globals.ancillaryCollapsedSeriesIndices[g]];h.globals.ancillaryCollapsedSeries[g].data=h.globals.axisCharts?f.data.slice():f}s.series.emptyCollapsedSeries(h.config.series)}return s.update(e).then((function(){c===l.length-1&&o(s)}))}))}))}},{key:"_updateSeries",value:function(e,t){var i=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(n){var s,a=i.w;return a.globals.shouldAnimate=t,a.globals.dataChanged=!0,t&&i.ctx.series.getPreviousPaths(),a.globals.axisCharts?(0===(s=e.map((function(e,t){return i._extendSeries(e,t)}))).length&&(s=[{data:[]}]),a.config.series=s):a.config.series=e.slice(),r&&(a.globals.initialSeries=x.clone(a.config.series)),i.ctx.update().then((function(){n(i.ctx)}))}))}},{key:"_extendSeries",value:function(e,t){var i=this.w,n=i.config.series[t];return r(r({},i.config.series[t]),{},{name:e.name?e.name:n&&n.name,color:e.color?e.color:n&&n.color,type:e.type?e.type:n&&n.type,data:e.data?e.data:n&&n.data})}},{key:"toggleDataPointSelection",value:function(e,t){var i=this.w,r=null,n=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?r=i.globals.dom.Paper.select("".concat(n," path[j='").concat(t,"'], ").concat(n," circle[j='").concat(t,"'], ").concat(n," rect[j='").concat(t,"']")).members[0]:void 0===t&&(r=i.globals.dom.Paper.select("".concat(n," path[j='").concat(e,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(e)),r?(new y(this.ctx).pathMouseDown(r,null),r.node?r.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach((function(i){void 0!==e.xaxis[i]&&(t.config.xaxis[i]=e.xaxis[i],t.globals.lastXAxis[i]=e.xaxis[i])})),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var i=new N(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){var t=this.w;return t.config.chart.stacked&&"100%"===t.config.chart.stackType&&(Array.isArray(e.yaxis)?e.yaxis.forEach((function(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100})):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,i=this.w,r=i.globals.lastXAxis,n=i.globals.lastYAxis;e&&e.xaxis&&(r=e.xaxis),e&&e.yaxis&&(n=e.yaxis),i.config.xaxis.min=r.min,i.config.xaxis.max=r.max;i.config.yaxis.map((function(e,r){i.globals.zoomed||void 0!==n[r]?function(e){void 0!==n[e]&&(i.config.yaxis[e].min=n[e].min,i.config.yaxis[e].max=n[e].max)}(r):void 0!==t.ctx.opts.yaxis[r]&&(e.min=t.ctx.opts.yaxis[r].min,e.max=t.ctx.opts.yaxis[r].max)}))}}]),e}();Re="undefined"!=typeof window?window:void 0,Te=function(e,t){var i=(void 0!==this?this:e).SVG=function(e){if(i.supported)return e=new i.Doc(e),i.parser.draw||i.prepare(),e};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(e){return"Svgjs"+d(e)+i.did++},i.create=function(e){var i=t.createElementNS(this.ns,e);return i.setAttribute("id",this.eid(e)),i},i.extend=function(){var e,t;t=(e=[].slice.call(arguments)).pop();for(var r=e.length-1;r>=0;r--)if(e[r])for(var n in t)e[r].prototype[n]=t[n];i.Set&&i.Set.inherit&&i.Set.inherit()},i.invent=function(e){var t="function"==typeof e.create?e.create:function(){this.constructor.call(this,i.create(e.create))};return e.inherit&&(t.prototype=new e.inherit),e.extend&&i.extend(t,e.extend),e.construct&&i.extend(e.parent||i.Container,e.construct),t},i.adopt=function(t){return t?t.instance?t.instance:((r="svg"==t.nodeName?t.parentNode instanceof e.SVGElement?new i.Nested:new i.Doc:"linearGradient"==t.nodeName?new i.Gradient("linear"):"radialGradient"==t.nodeName?new i.Gradient("radial"):i[d(t.nodeName)]?new(i[d(t.nodeName)]):new i.Element(t)).type=t.nodeName,r.node=t,t.instance=r,r instanceof i.Doc&&r.namespace().defs(),r.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),r):null;var r},i.prepare=function(){var e=t.getElementsByTagName("body")[0],r=(e?new i.Doc(e):i.adopt(t.documentElement).nested()).size(2,0);i.parser={body:e||t.documentElement,draw:r.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:r.polyline().node,path:r.path().node,native:i.create("svg")}},i.parser={native:i.create("svg")},t.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(e,t){for(var i=e.length,r=[],n=0;n<i;n++)r.push(t(e[n]));return r},filter:function(e,t){for(var i=e.length,r=[],n=0;n<i;n++)t(e[n])&&r.push(e[n]);return r},filterSVGElements:function(t){return this.filter(t,(function(t){return t instanceof e.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(e){var t,r;this.r=0,this.g=0,this.b=0,e&&("string"==typeof e?i.regex.isRgb.test(e)?(t=i.regex.rgb.exec(e.replace(i.regex.whitespace,"")),this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3])):i.regex.isHex.test(e)&&(t=i.regex.hex.exec(4==(r=e).length?["#",r.substring(1,2),r.substring(1,2),r.substring(2,3),r.substring(2,3),r.substring(3,4),r.substring(3,4)].join(""):r),this.r=parseInt(t[1],16),this.g=parseInt(t[2],16),this.b=parseInt(t[3],16)):"object"===n(e)&&(this.r=e.r,this.g=e.g,this.b=e.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(e){return this.destination=new i.Color(e),this},at:function(e){return this.destination?(e=e<0?0:e>1?1:e,new i.Color({r:~~(this.r+(this.destination.r-this.r)*e),g:~~(this.g+(this.destination.g-this.g)*e),b:~~(this.b+(this.destination.b-this.b)*e)})):this}}),i.Color.test=function(e){return e+="",i.regex.isHex.test(e)||i.regex.isRgb.test(e)},i.Color.isRgb=function(e){return e&&"number"==typeof e.r&&"number"==typeof e.g&&"number"==typeof e.b},i.Color.isColor=function(e){return i.Color.isRgb(e)||i.Color.test(e)},i.Array=function(e,t){0==(e=(e||[]).valueOf()).length&&t&&(e=t.valueOf()),this.value=this.parse(e)},i.extend(i.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(e){return e=e.valueOf(),Array.isArray(e)?e:this.split(e)}}),i.PointArray=function(e,t){i.Array.call(this,e,t||[[0,0]])},i.PointArray.prototype=new i.Array,i.PointArray.prototype.constructor=i.PointArray;for(var r={M:function(e,t,i){return t.x=i.x=e[0],t.y=i.y=e[1],["M",t.x,t.y]},L:function(e,t){return t.x=e[0],t.y=e[1],["L",e[0],e[1]]},H:function(e,t){return t.x=e[0],["H",e[0]]},V:function(e,t){return t.y=e[0],["V",e[0]]},C:function(e,t){return t.x=e[4],t.y=e[5],["C",e[0],e[1],e[2],e[3],e[4],e[5]]},Q:function(e,t){return t.x=e[2],t.y=e[3],["Q",e[0],e[1],e[2],e[3]]},Z:function(e,t,i){return t.x=i.x,t.y=i.y,["Z"]}},s="mlhvqtcsaz".split(""),a=0,o=s.length;a<o;++a)r[s[a]]=function(e){return function(t,i,n){if("H"==e)t[0]=t[0]+i.x;else if("V"==e)t[0]=t[0]+i.y;else if("A"==e)t[5]=t[5]+i.x,t[6]=t[6]+i.y;else for(var s=0,a=t.length;s<a;++s)t[s]=t[s]+(s%2?i.y:i.x);if(r&&"function"==typeof r[e])return r[e](t,i,n)}}(s[a].toUpperCase());i.PathArray=function(e,t){i.Array.call(this,e,t||[["M",0,0]])},i.PathArray.prototype=new i.Array,i.PathArray.prototype.constructor=i.PathArray,i.extend(i.PathArray,{toString:function(){return function(e){for(var t=0,i=e.length,r="";t<i;t++)r+=e[t][0],null!=e[t][1]&&(r+=e[t][1],null!=e[t][2]&&(r+=" ",r+=e[t][2],null!=e[t][3]&&(r+=" ",r+=e[t][3],r+=" ",r+=e[t][4],null!=e[t][5]&&(r+=" ",r+=e[t][5],r+=" ",r+=e[t][6],null!=e[t][7]&&(r+=" ",r+=e[t][7])))));return r+" "}(this.value)},move:function(e,t){var i=this.bbox();return i.x,i.y,this},at:function(e){if(!this.destination)return this;for(var t=this.value,r=this.destination.value,n=[],s=new i.PathArray,a=0,o=t.length;a<o;a++){n[a]=[t[a][0]];for(var l=1,c=t[a].length;l<c;l++)n[a][l]=t[a][l]+(r[a][l]-t[a][l])*e;"A"===n[a][0]&&(n[a][4]=+(0!=n[a][4]),n[a][5]=+(0!=n[a][5]))}return s.value=n,s},parse:function(e){if(e instanceof i.PathArray)return e.valueOf();var t,n={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};e="string"==typeof e?e.replace(i.regex.numbersWithDots,c).replace(i.regex.pathLetters," $& ").replace(i.regex.hyphen,"$1 -").trim().split(i.regex.delimiter):e.reduce((function(e,t){return[].concat.call(e,t)}),[]);var s=[],a=new i.Point,o=new i.Point,l=0,h=e.length;do{i.regex.isPathLetter.test(e[l])?(t=e[l],++l):"M"==t?t="L":"m"==t&&(t="l"),s.push(r[t].call(null,e.slice(l,l+=n[t.toUpperCase()]).map(parseFloat),a,o))}while(h>l);return s},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(e,t){this.value=0,this.unit=t||"","number"==typeof e?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:"string"==typeof e?(t=e.match(i.regex.numberAndUnit))&&(this.value=parseFloat(t[1]),"%"==t[5]?this.value/=100:"s"==t[5]&&(this.value*=1e3),this.unit=t[5]):e instanceof i.Number&&(this.value=e.valueOf(),this.unit=e.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(e){return e=new i.Number(e),new i.Number(this+e,this.unit||e.unit)},minus:function(e){return e=new i.Number(e),new i.Number(this-e,this.unit||e.unit)},times:function(e){return e=new i.Number(e),new i.Number(this*e,this.unit||e.unit)},divide:function(e){return e=new i.Number(e),new i.Number(this/e,this.unit||e.unit)},to:function(e){var t=new i.Number(this);return"string"==typeof e&&(t.unit=e),t},morph:function(e){return this.destination=new i.Number(e),e.relative&&(this.destination.value+=this.value),this},at:function(e){return this.destination?new i.Number(this.destination).minus(this).times(e).plus(this):this}}}),i.Element=i.invent({create:function(e){this._stroke=i.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=e)&&(this.type=e.nodeName,this.node.instance=this,this._stroke=e.getAttribute("stroke")||this._stroke)},extend:{x:function(e){return this.attr("x",e)},y:function(e){return this.attr("y",e)},cx:function(e){return null==e?this.x()+this.width()/2:this.x(e-this.width()/2)},cy:function(e){return null==e?this.y()+this.height()/2:this.y(e-this.height()/2)},move:function(e,t){return this.x(e).y(t)},center:function(e,t){return this.cx(e).cy(t)},width:function(e){return this.attr("width",e)},height:function(e){return this.attr("height",e)},size:function(e,t){var r=g(this,e,t);return this.width(new i.Number(r.width)).height(new i.Number(r.height))},clone:function(e){this.writeDataToDom();var t=v(this.node.cloneNode(!0));return e?e.add(t):this.after(t),t},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(e){return this.after(e).remove(),e},addTo:function(e){return e.put(this)},putIn:function(e){return e.add(this)},id:function(e){return this.attr("id",e)},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 e=this.attr("class");return null==e?[]:e.trim().split(i.regex.delimiter)},hasClass:function(e){return-1!=this.classes().indexOf(e)},addClass:function(e){if(!this.hasClass(e)){var t=this.classes();t.push(e),this.attr("class",t.join(" "))}return this},removeClass:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter((function(t){return t!=e})).join(" ")),this},toggleClass:function(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e)},reference:function(e){return i.get(this.attr(e))},parent:function(t){var r=this;if(!r.node.parentNode)return null;if(r=i.adopt(r.node.parentNode),!t)return r;for(;r&&r.node instanceof e.SVGElement;){if("string"==typeof t?r.matches(t):r instanceof t)return r;if(!r.node.parentNode||"#document"==r.node.parentNode.nodeName)return null;r=i.adopt(r.node.parentNode)}},doc:function(){return this instanceof i.Doc?this:this.parent(i.Doc)},parents:function(e){var t=[],i=this;do{if(!(i=i.parent(e))||!i.node)break;t.push(i)}while(i.parent);return t},matches:function(e){return function(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}(this.node,e)},native:function(){return this.node},svg:function(e){var r=t.createElement("svg");if(!(e&&this instanceof i.Parent))return r.appendChild(e=t.createElement("svg")),this.writeDataToDom(),e.appendChild(this.node.cloneNode(!0)),r.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");r.innerHTML="<svg>"+e.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";for(var n=0,s=r.firstChild.childNodes.length;n<s;n++)this.node.appendChild(r.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(e){return this.dom=e,this},is:function(e){return function(e,t){return e instanceof t}(this,e)}}}),i.easing={"-":function(e){return e},"<>":function(e){return-Math.cos(e*Math.PI)/2+.5},">":function(e){return Math.sin(e*Math.PI/2)},"<":function(e){return 1-Math.cos(e*Math.PI/2)}},i.morph=function(e){return function(t,r){return new i.MorphObj(t,r).at(e)}},i.Situation=i.invent({create:function(e){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new i.Number(e.duration).valueOf(),this.delay=new i.Number(e.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=e.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),i.FX=i.invent({create:function(e){this._target=e,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(e,t,r){"object"===n(e)&&(t=e.ease,r=e.delay,e=e.duration);var s=new i.Situation({duration:e||1e3,delay:r||0,ease:i.easing[t||"-"]||t});return this.queue(s),this},target:function(e){return e&&e instanceof i.Element?(this._target=e,this):this._target},timeToAbsPos:function(e){return(e-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(e){return this.situation.duration/this._speed*e+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=e.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){e.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(e){return("function"==typeof e||e instanceof i.Situation)&&this.situations.push(e),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 e,t=this.situation;if(t.init)return this;for(var r in t.animations){e=this.target()[r](),Array.isArray(e)||(e=[e]),Array.isArray(t.animations[r])||(t.animations[r]=[t.animations[r]]);for(var n=e.length;n--;)t.animations[r][n]instanceof i.Number&&(e[n]=new i.Number(e[n])),t.animations[r][n]=e[n].morph(t.animations[r][n])}for(var r in t.attrs)t.attrs[r]=new i.MorphObj(this.target().attr(r),t.attrs[r]);for(var r in t.styles)t.styles[r]=new i.MorphObj(this.target().style(r),t.styles[r]);return t.initialTransformation=this.target().matrixify(),t.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(e,t){var i=this.active;return this.active=!1,t&&this.clearQueue(),e&&this.situation&&(!i&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(e){var t=this.last();return this.target().on("finished.fx",(function i(r){r.detail.situation==t&&(e.call(this,t),this.off("finished.fx",i))})),this._callStart()},during:function(e){var t=this.last(),r=function(r){r.detail.situation==t&&e.call(this,r.detail.pos,i.morph(r.detail.pos),r.detail.eased,t)};return this.target().off("during.fx",r).on("during.fx",r),this.after((function(){this.off("during.fx",r)})),this._callStart()},afterAll:function(e){var t=function t(i){e.call(this),this.off("allfinished.fx",t)};return this.target().off("allfinished.fx",t).on("allfinished.fx",t),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(e,t,i){return this.last()[i||"animations"][e]=t,this._callStart()},step:function(e){var t,i,r;e||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(t=Math.max(this.absPos,0),i=Math.floor(t),!0===this.situation.loops||i<this.situation.loops?(this.pos=t-i,r=this.situation.loop,this.situation.loop=i):(this.absPos=this.situation.loops,this.pos=1,r=this.situation.loop-1,this.situation.loop=this.situation.loops),this.situation.reversing&&(this.situation.reversed=this.situation.reversed!=Boolean((this.situation.loop-r)%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 n=this.situation.ease(this.pos);for(var s in this.situation.once)s>this.lastPos&&s<=n&&(this.situation.once[s].call(this.target(),this.pos,n),delete this.situation.once[s]);return this.active&&this.target().fire("during",{pos:this.pos,eased:n,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=n,this):this},eachAt:function(){var e,t=this,r=this.target(),n=this.situation;for(var s in n.animations)e=[].concat(n.animations[s]).map((function(e){return"string"!=typeof e&&e.at?e.at(n.ease(t.pos),t.pos):e})),r[s].apply(r,e);for(var s in n.attrs)e=[s].concat(n.attrs[s]).map((function(e){return"string"!=typeof e&&e.at?e.at(n.ease(t.pos),t.pos):e})),r.attr.apply(r,e);for(var s in n.styles)e=[s].concat(n.styles[s]).map((function(e){return"string"!=typeof e&&e.at?e.at(n.ease(t.pos),t.pos):e})),r.style.apply(r,e);if(n.transforms.length){e=n.initialTransformation,s=0;for(var a=n.transforms.length;s<a;s++){var o=n.transforms[s];o instanceof i.Matrix?e=o.relative?e.multiply((new i.Matrix).morph(o).at(n.ease(this.pos))):e.morph(o).at(n.ease(this.pos)):(o.relative||o.undo(e.extract()),e=e.multiply(o.at(n.ease(this.pos))))}r.matrix(e)}return this},once:function(e,t,i){var r=this.last();return i||(e=r.ease(e)),r.once[e]=t,this},_callStart:function(){return setTimeout(function(){this.start()}.bind(this),0),this}},parent:i.Element,construct:{animate:function(e,t,r){return(this.fx||(this.fx=new i.FX(this))).animate(e,t,r)},delay:function(e){return(this.fx||(this.fx=new i.FX(this))).delay(e)},stop:function(e,t){return this.fx&&this.fx.stop(e,t),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),i.MorphObj=i.invent({create:function(e,t){return i.Color.isColor(t)?new i.Color(e).morph(t):i.regex.delimiter.test(e)?i.regex.pathLetters.test(e)?new i.PathArray(e).morph(t):new i.Array(e).morph(t):i.regex.numberAndUnit.test(t)?new i.Number(e).morph(t):(this.value=e,void(this.destination=t))},extend:{at:function(e,t){return t<1?this.value:this.destination},valueOf:function(){return this.value}}}),i.extend(i.FX,{attr:function(e,t,i){if("object"===n(e))for(var r in e)this.attr(r,e[r]);else this.add(e,t,"attrs");return this},plot:function(e,t,i,r){return 4==arguments.length?this.plot([e,t,i,r]):this.add("plot",new(this.target().morphArray)(e))}}),i.Box=i.invent({create:function(e,t,r,s){if(!("object"!==n(e)||e instanceof i.Element))return i.Box.call(this,null!=e.left?e.left:e.x,null!=e.top?e.top:e.y,e.width,e.height);4==arguments.length&&(this.x=e,this.y=t,this.width=r,this.height=s),x(this)}}),i.BBox=i.invent({create:function(e){if(i.Box.apply(this,[].slice.call(arguments)),e instanceof i.Element){var r;try{if(!t.documentElement.contains){for(var n=e.node;n.parentNode;)n=n.parentNode;if(n!=t)throw new Error("Element not in the dom")}r=e.node.getBBox()}catch(t){if(e instanceof i.Shape){i.parser.draw||i.prepare();var s=e.clone(i.parser.draw.instance).show();s&&s.node&&"function"==typeof s.node.getBBox&&(r=s.node.getBBox()),s&&"function"==typeof s.remove&&s.remove()}else r={x:e.node.clientLeft,y:e.node.clientTop,width:e.node.clientWidth,height:e.node.clientHeight}}i.Box.call(this,r)}},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(e){var t=p([1,0,0,1,0,0]);e=null===e?t:e instanceof i.Element?e.matrixify():"string"==typeof e?p(e.split(i.regex.delimiter).map(parseFloat)):6==arguments.length?p([].slice.call(arguments)):Array.isArray(e)?p(e):e&&"object"===n(e)?e:t;for(var r=b.length-1;r>=0;--r)this[b[r]]=null!=e[b[r]]?e[b[r]]:t[b[r]]},extend:{extract:function(){var e=f(this,0,1);f(this,1,0);var t=180/Math.PI*Math.atan2(e.y,e.x)-90;return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(t*Math.PI/180)+this.f*Math.sin(t*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(t*Math.PI/180)+this.e*Math.sin(-t*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:t,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(e){return this.destination=new i.Matrix(e),this},multiply:function(e){return new i.Matrix(this.native().multiply(function(e){return e instanceof i.Matrix||(e=new i.Matrix(e)),e}(e).native()))},inverse:function(){return new i.Matrix(this.native().inverse())},translate:function(e,t){return new i.Matrix(this.native().translate(e||0,t||0))},native:function(){for(var e=i.parser.native.createSVGMatrix(),t=b.length-1;t>=0;t--)e[b[t]]=this[b[t]];return e},toString:function(){return"matrix("+m(this.a)+","+m(this.b)+","+m(this.c)+","+m(this.d)+","+m(this.e)+","+m(this.f)+")"}},parent:i.Element,construct:{ctm:function(){return new i.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof i.Nested){var e=this.rect(1,1),t=e.node.getScreenCTM();return e.remove(),new i.Matrix(t)}return new i.Matrix(this.node.getScreenCTM())}}}),i.Point=i.invent({create:function(e,t){var i;i=Array.isArray(e)?{x:e[0],y:e[1]}:"object"===n(e)?{x:e.x,y:e.y}:null!=e?{x:e,y:null!=t?t:e}:{x:0,y:0},this.x=i.x,this.y=i.y},extend:{clone:function(){return new i.Point(this)},morph:function(e,t){return this.destination=new i.Point(e,t),this}}}),i.extend(i.Element,{point:function(e,t){return new i.Point(e,t).transform(this.screenCTM().inverse())}}),i.extend(i.Element,{attr:function(e,t,r){if(null==e){for(e={},r=(t=this.node.attributes).length-1;r>=0;r--)e[t[r].nodeName]=i.regex.isNumber.test(t[r].nodeValue)?parseFloat(t[r].nodeValue):t[r].nodeValue;return e}if("object"===n(e))for(var s in e)this.attr(s,e[s]);else if(null===t)this.node.removeAttribute(e);else{if(null==t)return null==(t=this.node.getAttribute(e))?i.defaults.attrs[e]:i.regex.isNumber.test(t)?parseFloat(t):t;"stroke-width"==e?this.attr("stroke",parseFloat(t)>0?this._stroke:null):"stroke"==e&&(this._stroke=t),"fill"!=e&&"stroke"!=e||(i.regex.isImage.test(t)&&(t=this.doc().defs().image(t,0,0)),t instanceof i.Image&&(t=this.doc().defs().pattern(0,0,(function(){this.add(t)})))),"number"==typeof t?t=new i.Number(t):i.Color.isColor(t)?t=new i.Color(t):Array.isArray(t)&&(t=new i.Array(t)),"leading"==e?this.leading&&this.leading(t):"string"==typeof r?this.node.setAttributeNS(r,e,t.toString()):this.node.setAttribute(e,t.toString()),!this.rebuild||"font-size"!=e&&"x"!=e||this.rebuild(e,t)}return this}}),i.extend(i.Element,{transform:function(e,t){var r;return"object"!==n(e)?(r=new i.Matrix(this).extract(),"string"==typeof e?r[e]:r):(r=new i.Matrix(this),t=!!t||!!e.relative,null!=e.a&&(r=t?r.multiply(new i.Matrix(e)):new i.Matrix(e)),this.attr("transform",r))}}),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(e){var t=e.trim().split("(");return[t[0],t[1].split(i.regex.delimiter).map((function(e){return parseFloat(e)}))]})).reduce((function(e,t){return"matrix"==t[0]?e.multiply(p(t[1])):e[t[0]].apply(e,t[1])}),new i.Matrix)},toParent:function(e){if(this==e)return this;var t=this.screenCTM(),i=e.screenCTM().inverse();return this.addTo(e).untransform().transform(i.multiply(t)),this},toDoc:function(){return this.toParent(this.doc())}}),i.Transformation=i.invent({create:function(e,t){if(arguments.length>1&&"boolean"!=typeof t)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(e))for(var i=0,r=this.arguments.length;i<r;++i)this[this.arguments[i]]=e[i];else if(e&&"object"===n(e))for(i=0,r=this.arguments.length;i<r;++i)this[this.arguments[i]]=e[this.arguments[i]];this.inversed=!1,!0===t&&(this.inversed=!0)}}),i.Translate=i.invent({parent:i.Matrix,inherit:i.Transformation,create:function(e,t){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["transformedX","transformedY"],method:"translate"}}),i.extend(i.Element,{style:function(e,t){if(0==arguments.length)return this.node.style.cssText||"";if(arguments.length<2)if("object"===n(e))for(var r in e)this.style(r,e[r]);else{if(!i.regex.isCss.test(e))return this.node.style[h(e)];for(e=e.split(/\s*;\s*/).filter((function(e){return!!e})).map((function(e){return e.split(/\s*:\s*/)}));t=e.pop();)this.style(t[0],t[1])}else this.node.style[h(e)]=null===t||i.regex.isBlank.test(t)?"":t;return this}}),i.Parent=i.invent({create:function(e){this.constructor.call(this,e)},inherit:i.Element,extend:{children:function(){return i.utils.map(i.utils.filterSVGElements(this.node.childNodes),(function(e){return i.adopt(e)}))},add:function(e,t){return null==t?this.node.appendChild(e.node):e.node!=this.node.childNodes[t]&&this.node.insertBefore(e.node,this.node.childNodes[t]),this},put:function(e,t){return this.add(e,t),e},has:function(e){return this.index(e)>=0},index:function(e){return[].slice.call(this.node.childNodes).indexOf(e.node)},get:function(e){return i.adopt(this.node.childNodes[e])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(e,t){for(var r=this.children(),n=0,s=r.length;n<s;n++)r[n]instanceof i.Element&&e.apply(r[n],[n,r]),t&&r[n]instanceof i.Container&&r[n].each(e,t);return this},removeElement:function(e){return this.node.removeChild(e.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(e,t){return 0===t||this instanceof i.Defs||this.node==i.parser.draw||(e=e||(this instanceof i.Doc?this:this.parent(i.Parent)),t=t||1/0,this.each((function(){return this instanceof i.Defs?this:this instanceof i.Parent?this.ungroup(e,t-1):this.toParent(e)})),this.node.firstChild||this.remove()),this},flatten:function(e,t){return this.ungroup(e,t)}}),i.Container=i.invent({create:function(e){this.constructor.call(this,e)},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(e){i.Element.prototype[e]=function(t){return i.on(this.node,e,t),this}})),i.listeners=[],i.handlerMap=[],i.listenerId=0,i.on=function(e,t,r,n,s){var a=r.bind(n||e.instance||e),o=(i.handlerMap.indexOf(e)+1||i.handlerMap.push(e))-1,l=t.split(".")[0],c=t.split(".")[1]||"*";i.listeners[o]=i.listeners[o]||{},i.listeners[o][l]=i.listeners[o][l]||{},i.listeners[o][l][c]=i.listeners[o][l][c]||{},r._svgjsListenerId||(r._svgjsListenerId=++i.listenerId),i.listeners[o][l][c][r._svgjsListenerId]=a,e.addEventListener(l,a,s||{passive:!0})},i.off=function(e,t,r){var n=i.handlerMap.indexOf(e),s=t&&t.split(".")[0],a=t&&t.split(".")[1],o="";if(-1!=n)if(r){if("function"==typeof r&&(r=r._svgjsListenerId),!r)return;i.listeners[n][s]&&i.listeners[n][s][a||"*"]&&(e.removeEventListener(s,i.listeners[n][s][a||"*"][r],!1),delete i.listeners[n][s][a||"*"][r])}else if(a&&s){if(i.listeners[n][s]&&i.listeners[n][s][a]){for(var l in i.listeners[n][s][a])i.off(e,[s,a].join("."),l);delete i.listeners[n][s][a]}}else if(a)for(var c in i.listeners[n])for(var o in i.listeners[n][c])a===o&&i.off(e,[c,a].join("."));else if(s){if(i.listeners[n][s]){for(var o in i.listeners[n][s])i.off(e,[s,o].join("."));delete i.listeners[n][s]}}else{for(var c in i.listeners[n])i.off(e,c);delete i.listeners[n],delete i.handlerMap[n]}},i.extend(i.Element,{on:function(e,t,r,n){return i.on(this.node,e,t,r,n),this},off:function(e,t){return i.off(this.node,e,t),this},fire:function(t,r){return t instanceof e.Event?this.node.dispatchEvent(t):this.node.dispatchEvent(t=new i.CustomEvent(t,{detail:r,cancelable:!0})),this._event=t,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(e){return null==e?this.transform("x"):this.transform({x:e-this.x()},!0)}},construct:{group:function(){return this.put(new i.G)}}}),i.Doc=i.invent({create:function(e){e&&("svg"==(e="string"==typeof e?t.getElementById(e):e).nodeName?this.constructor.call(this,e):(this.constructor.call(this,i.create("svg")),e.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 e;return this._defs||((e=this.node.getElementsByTagName("defs")[0])?this._defs=i.adopt(e):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(e){this.writeDataToDom();var t=this.node,i=v(t.cloneNode(!0));return e?(e.node||e).appendChild(i.node):t.parentNode.insertBefore(i.node,t.nextSibling),i}}}),i.extend(i.Element,{}),i.Gradient=i.invent({create:function(e){this.constructor.call(this,i.create(e+"Gradient")),this.type=e},inherit:i.Container,extend:{at:function(e,t,r){return this.put(new i.Stop).update(e,t,r)},update:function(e){return this.clear(),"function"==typeof e&&e.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(e,t,r){return"transform"==e&&(e="gradientTransform"),i.Container.prototype.attr.call(this,e,t,r)}},construct:{gradient:function(e,t){return this.defs().gradient(e,t)}}}),i.extend(i.Gradient,i.FX,{from:function(e,t){return"radial"==(this._target||this).type?this.attr({fx:new i.Number(e),fy:new i.Number(t)}):this.attr({x1:new i.Number(e),y1:new i.Number(t)})},to:function(e,t){return"radial"==(this._target||this).type?this.attr({cx:new i.Number(e),cy:new i.Number(t)}):this.attr({x2:new i.Number(e),y2:new i.Number(t)})}}),i.extend(i.Defs,{gradient:function(e,t){return this.put(new i.Gradient(e)).update(t)}}),i.Stop=i.invent({create:"stop",inherit:i.Element,extend:{update:function(e){return("number"==typeof e||e instanceof i.Number)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=e.opacity&&this.attr("stop-opacity",e.opacity),null!=e.color&&this.attr("stop-color",e.color),null!=e.offset&&this.attr("offset",new i.Number(e.offset)),this}}}),i.Pattern=i.invent({create:"pattern",inherit:i.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(e){return this.clear(),"function"==typeof e&&e.call(this,this),this},toString:function(){return this.fill()},attr:function(e,t,r){return"transform"==e&&(e="patternTransform"),i.Container.prototype.attr.call(this,e,t,r)}},construct:{pattern:function(e,t,i){return this.defs().pattern(e,t,i)}}}),i.extend(i.Defs,{pattern:function(e,t,r){return this.put(new i.Pattern).update(r).attr({x:0,y:0,width:e,height:t,patternUnits:"userSpaceOnUse"})}}),i.Shape=i.invent({create:function(e){this.constructor.call(this,e)},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(e,t){return this.attr("href",(t||"")+"#"+e,i.xlink)}},construct:{use:function(e,t){return this.put(new i.Use).element(e,t)}}}),i.Rect=i.invent({create:"rect",inherit:i.Shape,construct:{rect:function(e,t){return this.put(new i.Rect).size(e,t)}}}),i.Circle=i.invent({create:"circle",inherit:i.Shape,construct:{circle:function(e){return this.put(new i.Circle).rx(new i.Number(e).divide(2)).move(0,0)}}}),i.extend(i.Circle,i.FX,{rx:function(e){return this.attr("r",e)},ry:function(e){return this.rx(e)}}),i.Ellipse=i.invent({create:"ellipse",inherit:i.Shape,construct:{ellipse:function(e,t){return this.put(new i.Ellipse).size(e,t).move(0,0)}}}),i.extend(i.Ellipse,i.Rect,i.FX,{rx:function(e){return this.attr("rx",e)},ry:function(e){return this.attr("ry",e)}}),i.extend(i.Circle,i.Ellipse,{x:function(e){return null==e?this.cx()-this.rx():this.cx(e+this.rx())},y:function(e){return null==e?this.cy()-this.ry():this.cy(e+this.ry())},cx:function(e){return null==e?this.attr("cx"):this.attr("cx",e)},cy:function(e){return null==e?this.attr("cy"):this.attr("cy",e)},width:function(e){return null==e?2*this.rx():this.rx(new i.Number(e).divide(2))},height:function(e){return null==e?2*this.ry():this.ry(new i.Number(e).divide(2))},size:function(e,t){var r=g(this,e,t);return this.rx(new i.Number(r.width).divide(2)).ry(new i.Number(r.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(e,t,r,n){return null==e?this.array():(e=void 0!==t?{x1:e,y1:t,x2:r,y2:n}:new i.PointArray(e).toLine(),this.attr(e))},move:function(e,t){return this.attr(this.array().move(e,t).toLine())},size:function(e,t){var i=g(this,e,t);return this.attr(this.array().size(i.width,i.height).toLine())}},construct:{line:function(e,t,r,n){return i.Line.prototype.plot.apply(this.put(new i.Line),null!=e?[e,t,r,n]:[0,0,0,0])}}}),i.Polyline=i.invent({create:"polyline",inherit:i.Shape,construct:{polyline:function(e){return this.put(new i.Polyline).plot(e||new i.PointArray)}}}),i.Polygon=i.invent({create:"polygon",inherit:i.Shape,construct:{polygon:function(e){return this.put(new i.Polygon).plot(e||new i.PointArray)}}}),i.extend(i.Polyline,i.Polygon,{array:function(){return this._array||(this._array=new i.PointArray(this.attr("points")))},plot:function(e){return null==e?this.array():this.clear().attr("points","string"==typeof e?e:this._array=new i.PointArray(e))},clear:function(){return delete this._array,this},move:function(e,t){return this.attr("points",this.array().move(e,t))},size:function(e,t){var i=g(this,e,t);return this.attr("points",this.array().size(i.width,i.height))}}),i.extend(i.Line,i.Polyline,i.Polygon,{morphArray:i.PointArray,x:function(e){return null==e?this.bbox().x:this.move(e,this.bbox().y)},y:function(e){return null==e?this.bbox().y:this.move(this.bbox().x,e)},width:function(e){var t=this.bbox();return null==e?t.width:this.size(e,t.height)},height:function(e){var t=this.bbox();return null==e?t.height:this.size(t.width,e)}}),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(e){return null==e?this.array():this.clear().attr("d","string"==typeof e?e:this._array=new i.PathArray(e))},clear:function(){return delete this._array,this}},construct:{path:function(e){return this.put(new i.Path).plot(e||new i.PathArray)}}}),i.Image=i.invent({create:"image",inherit:i.Shape,extend:{load:function(t){if(!t)return this;var r=this,n=new e.Image;return i.on(n,"load",(function(){i.off(n);var e=r.parent(i.Pattern);null!==e&&(0==r.width()&&0==r.height()&&r.size(n.width,n.height),e&&0==e.width()&&0==e.height()&&e.size(r.width(),r.height()),"function"==typeof r._loaded&&r._loaded.call(r,{width:n.width,height:n.height,ratio:n.width/n.height,url:t}))})),i.on(n,"error",(function(e){i.off(n),"function"==typeof r._error&&r._error.call(r,e)})),this.attr("href",n.src=this.src=t,i.xlink)},loaded:function(e){return this._loaded=e,this},error:function(e){return this._error=e,this}},construct:{image:function(e,t,r){return this.put(new i.Image).load(e).size(t||0,r||t||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(e){return null==e?this.attr("x"):this.attr("x",e)},text:function(e){if(void 0===e){e="";for(var t=this.node.childNodes,r=0,n=t.length;r<n;++r)0!=r&&3!=t[r].nodeType&&1==i.adopt(t[r]).dom.newLined&&(e+="\n"),e+=t[r].textContent;return e}if(this.clear().build(!0),"function"==typeof e)e.call(this,this);else{r=0;for(var s=(e=e.split("\n")).length;r<s;r++)this.tspan(e[r]).newLine()}return this.build(!1).rebuild()},size:function(e){return this.attr("font-size",e).rebuild()},leading:function(e){return null==e?this.dom.leading:(this.dom.leading=new i.Number(e),this.rebuild())},lines:function(){var e=(this.textPath&&this.textPath()||this).node,t=i.utils.map(i.utils.filterSVGElements(e.childNodes),(function(e){return i.adopt(e)}));return new i.Set(t)},rebuild:function(e){if("boolean"==typeof e&&(this._rebuild=e),this._rebuild){var t=this,r=0,n=this.dom.leading*new i.Number(this.attr("font-size"));this.lines().each((function(){this.dom.newLined&&(t.textPath()||this.attr("x",t.attr("x")),"\n"==this.text()?r+=n:(this.attr("dy",n+r),r=0))})),this.fire("rebuild")}return this},build:function(e){return this._build=!!e,this},setData:function(e){return this.dom=e,this.dom.leading=new i.Number(e.leading||1.3),this}},construct:{text:function(e){return this.put(new i.Text).text(e)},plain:function(e){return this.put(new i.Text).plain(e)}}}),i.Tspan=i.invent({create:"tspan",inherit:i.Shape,extend:{text:function(e){return null==e?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof e?e.call(this,this):this.plain(e),this)},dx:function(e){return this.attr("dx",e)},dy:function(e){return this.attr("dy",e)},newLine:function(){var e=this.parent(i.Text);return this.dom.newLined=!0,this.dy(e.dom.leading*e.attr("font-size")).attr("x",e.x())}}}),i.extend(i.Text,i.Tspan,{plain:function(e){return!1===this._build&&this.clear(),this.node.appendChild(t.createTextNode(e)),this},tspan:function(e){var t=(this.textPath&&this.textPath()||this).node,r=new i.Tspan;return!1===this._build&&this.clear(),t.appendChild(r.node),r.text(e)},clear:function(){for(var e=(this.textPath&&this.textPath()||this).node;e.hasChildNodes();)e.removeChild(e.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 e=this.track();return e?e.array():null},plot:function(e){var t=this.track(),i=null;return t&&(i=t.plot(e)),null==e?i:this},track:function(){var e=this.textPath();if(e)return e.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(e,t){return"color"==t?e:e+"-"+t}};function c(e,t,r,n){return r+n.replace(i.regex.dots," .")}function h(e){return e.toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function d(e){return e.charAt(0).toUpperCase()+e.slice(1)}function u(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function g(e,t,i){if(null==t||null==i){var r=e.bbox();null==t?t=r.width/r.height*i:null==i&&(i=r.height/r.width*t)}return{width:t,height:i}}function f(e,t,i){return{x:t*e.a+i*e.c+0,y:t*e.b+i*e.d+0}}function p(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}function v(t){for(var r=t.childNodes.length-1;r>=0;r--)t.childNodes[r]instanceof e.SVGElement&&v(t.childNodes[r]);return i.adopt(t).id(i.eid(t.nodeName))}function x(e){return null==e.x&&(e.x=0,e.y=0,e.width=0,e.height=0),e.w=e.width,e.h=e.height,e.x2=e.x+e.width,e.y2=e.y+e.height,e.cx=e.x+e.width/2,e.cy=e.y+e.height/2,e}function m(e){return Math.abs(e)>1e-37?e:0}["fill","stroke"].forEach((function(e){var t={};t[e]=function(t){if(void 0===t)return this;if("string"==typeof t||i.Color.isRgb(t)||t&&"function"==typeof t.fill)this.attr(e,t);else for(var r=l[e].length-1;r>=0;r--)null!=t[l[e][r]]&&this.attr(l.prefix(e,l[e][r]),t[l[e][r]]);return this},i.extend(i.Element,i.FX,t)})),i.extend(i.Element,i.FX,{translate:function(e,t){return this.transform({x:e,y:t})},matrix:function(e){return this.attr("transform",new i.Matrix(6==arguments.length?[].slice.call(arguments):e))},opacity:function(e){return this.attr("opacity",e)},dx:function(e){return this.x(new i.Number(e).plus(this instanceof i.FX?0:this.x()),!0)},dy:function(e){return this.y(new i.Number(e).plus(this instanceof i.FX?0:this.y()),!0)}}),i.extend(i.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(e){return this.node.getPointAtLength(e)}}),i.Set=i.invent({create:function(e){Array.isArray(e)?this.members=e:this.clear()},extend:{add:function(){for(var e=[].slice.call(arguments),t=0,i=e.length;t<i;t++)this.members.push(e[t]);return this},remove:function(e){var t=this.index(e);return t>-1&&this.members.splice(t,1),this},each:function(e){for(var t=0,i=this.members.length;t<i;t++)e.apply(this.members[t],[t,this.members]);return this},clear:function(){return this.members=[],this},length:function(){return this.members.length},has:function(e){return this.index(e)>=0},index:function(e){return this.members.indexOf(e)},get:function(e){return this.members[e]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(e){return new i.Set(e)}}}),i.FX.Set=i.invent({create:function(e){this.set=e}}),i.Set.inherit=function(){var e=[];for(var t in i.Shape.prototype)"function"==typeof i.Shape.prototype[t]&&"function"!=typeof i.Set.prototype[t]&&e.push(t);for(var t in e.forEach((function(e){i.Set.prototype[e]=function(){for(var t=0,r=this.members.length;t<r;t++)this.members[t]&&"function"==typeof this.members[t][e]&&this.members[t][e].apply(this.members[t],arguments);return"animate"==e?this.fx||(this.fx=new i.FX.Set(this)):this}})),e=[],i.FX.prototype)"function"==typeof i.FX.prototype[t]&&"function"!=typeof i.FX.Set.prototype[t]&&e.push(t);e.forEach((function(e){i.FX.Set.prototype[e]=function(){for(var t=0,i=this.set.members.length;t<i;t++)this.set.members[t].fx[e].apply(this.set.members[t].fx,arguments);return this}}))},i.extend(i.Element,{}),i.extend(i.Element,{remember:function(e,t){if("object"===n(arguments[0]))for(var i in e)this.remember(i,e[i]);else{if(1==arguments.length)return this.memory()[e];this.memory()[e]=t}return this},forget:function(){if(0==arguments.length)this._memory={};else for(var e=arguments.length-1;e>=0;e--)delete this.memory()[arguments[e]];return this},memory:function(){return this._memory||(this._memory={})}}),i.get=function(e){var r=t.getElementById(function(e){var t=(e||"").toString().match(i.regex.reference);if(t)return t[1]}(e)||e);return i.adopt(r)},i.select=function(e,r){return new i.Set(i.utils.map((r||t).querySelectorAll(e),(function(e){return i.adopt(e)})))},i.extend(i.Parent,{select:function(e){return i.select(e,this.node)}});var b="abcdef".split("");if("function"!=typeof e.CustomEvent){var y=function(e,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var r=t.createEvent("CustomEvent");return r.initCustomEvent(e,i.bubbles,i.cancelable,i.detail),r};y.prototype=e.Event.prototype,i.CustomEvent=y}else i.CustomEvent=e.CustomEvent;return i},"object"===n(t)?e.exports=Re.document?Te(Re,Re.document):function(e){return Te(e,e.document)}:Re.SVG=Te(Re,Re.document),
/*! svg.filter.js - v2.0.2 - 2016-02-24
* https://github.com/wout/svg.filter.js
* Copyright (c) 2016 Wout Fierens; Licensed MIT */
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(e,t){return this.add(e,t),!e.attr("in")&&this.autoSetIn&&e.attr("in",this.source),e.attr("result")||e.attr("result",e),e},blend:function(e,t,i){return this.put(new SVG.BlendEffect(e,t,i))},colorMatrix:function(e,t){return this.put(new SVG.ColorMatrixEffect(e,t))},convolveMatrix:function(e){return this.put(new SVG.ConvolveMatrixEffect(e))},componentTransfer:function(e){return this.put(new SVG.ComponentTransferEffect(e))},composite:function(e,t,i){return this.put(new SVG.CompositeEffect(e,t,i))},flood:function(e,t){return this.put(new SVG.FloodEffect(e,t))},offset:function(e,t){return this.put(new SVG.OffsetEffect(e,t))},image:function(e){return this.put(new SVG.ImageEffect(e))},merge:function(){var e=[void 0];for(var t in arguments)e.push(arguments[t]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,e)))},gaussianBlur:function(e,t){return this.put(new SVG.GaussianBlurEffect(e,t))},morphology:function(e,t){return this.put(new SVG.MorphologyEffect(e,t))},diffuseLighting:function(e,t,i){return this.put(new SVG.DiffuseLightingEffect(e,t,i))},displacementMap:function(e,t,i,r,n){return this.put(new SVG.DisplacementMapEffect(e,t,i,r,n))},specularLighting:function(e,t,i,r){return this.put(new SVG.SpecularLightingEffect(e,t,i,r))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(e,t,i,r,n){return this.put(new SVG.TurbulenceEffect(e,t,i,r,n))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(e){var t=this.put(new SVG.Filter);return"function"==typeof e&&e.call(t,t),t}}),SVG.extend(SVG.Container,{filter:function(e){return this.defs().filter(e)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(e){return this.filterer=e instanceof SVG.Element?e:this.doc().filter(e),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(e){return this.filterer&&!0===e&&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(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",e)},result:function(e){return null==e?this.attr("result"):this.attr("result",e)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",e)},result:function(e){return null==e?this.attr("result"):this.attr("result",e)},toString:function(){return this.result()}}});var e={blend:function(e,t){return this.parent()&&this.parent().blend(this,e,t)},colorMatrix:function(e,t){return this.parent()&&this.parent().colorMatrix(e,t).in(this)},convolveMatrix:function(e){return this.parent()&&this.parent().convolveMatrix(e).in(this)},componentTransfer:function(e){return this.parent()&&this.parent().componentTransfer(e).in(this)},composite:function(e,t){return this.parent()&&this.parent().composite(this,e,t)},flood:function(e,t){return this.parent()&&this.parent().flood(e,t)},offset:function(e,t){return this.parent()&&this.parent().offset(e,t).in(this)},image:function(e){return this.parent()&&this.parent().image(e)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(e,t){return this.parent()&&this.parent().gaussianBlur(e,t).in(this)},morphology:function(e,t){return this.parent()&&this.parent().morphology(e,t).in(this)},diffuseLighting:function(e,t,i){return this.parent()&&this.parent().diffuseLighting(e,t,i).in(this)},displacementMap:function(e,t,i,r){return this.parent()&&this.parent().displacementMap(this,e,t,i,r)},specularLighting:function(e,t,i,r){return this.parent()&&this.parent().specularLighting(e,t,i,r).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(e,t,i,r,n){return this.parent()&&this.parent().turbulence(e,t,i,r,n).in(this)}};SVG.extend(SVG.Effect,e),SVG.extend(SVG.ParentEffect,e),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(e){this.attr("in",e)}}});var t={blend:function(e,t,i){this.attr({in:e,in2:t,mode:i||"normal"})},colorMatrix:function(e,t){"matrix"==e&&(t=n(t)),this.attr({type:e,values:void 0===t?null:t})},convolveMatrix:function(e){e=n(e),this.attr({order:Math.sqrt(e.split(" ").length),kernelMatrix:e})},composite:function(e,t,i){this.attr({in:e,in2:t,operator:i})},flood:function(e,t){this.attr("flood-color",e),null!=t&&this.attr("flood-opacity",t)},offset:function(e,t){this.attr({dx:e,dy:t})},image:function(e){this.attr("href",e,SVG.xlink)},displacementMap:function(e,t,i,r,n){this.attr({in:e,in2:t,scale:i,xChannelSelector:r,yChannelSelector:n})},gaussianBlur:function(e,t){null!=e||null!=t?this.attr("stdDeviation",s(Array.prototype.slice.call(arguments))):this.attr("stdDeviation","0 0")},morphology:function(e,t){this.attr({operator:e,radius:t})},tile:function(){},turbulence:function(e,t,i,r,n){this.attr({numOctaves:t,seed:i,stitchTiles:r,baseFrequency:e,type:n})}},i={merge:function(){var e;if(arguments[0]instanceof SVG.Set){var t=this;arguments[0].each((function(e){this instanceof SVG.MergeNode?t.put(this):(this instanceof SVG.Effect||this instanceof SVG.ParentEffect)&&t.put(new SVG.MergeNode(this))}))}else{e=Array.isArray(arguments[0])?arguments[0]:arguments;for(var i=0;i<e.length;i++)e[i]instanceof SVG.MergeNode?this.put(e[i]):this.put(new SVG.MergeNode(e[i]))}},componentTransfer:function(e){if(this.rgb=new SVG.Set,["r","g","b","a"].forEach(function(e){this[e]=new(SVG["Func"+e.toUpperCase()])("identity"),this.rgb.add(this[e]),this.node.appendChild(this[e].node)}.bind(this)),e)for(var t in e.rgb&&(["r","g","b"].forEach(function(t){this[t].attr(e.rgb)}.bind(this)),delete e.rgb),e)this[t].attr(e[t])},diffuseLighting:function(e,t,i){this.attr({surfaceScale:e,diffuseConstant:t,kernelUnitLength:i})},specularLighting:function(e,t,i,r){this.attr({surfaceScale:e,diffuseConstant:t,specularExponent:i,kernelUnitLength:r})}},r={distantLight:function(e,t){this.attr({azimuth:e,elevation:t})},pointLight:function(e,t,i){this.attr({x:e,y:t,z:i})},spotLight:function(e,t,i,r,n,s){this.attr({x:e,y:t,z:i,pointsAtX:r,pointsAtY:n,pointsAtZ:s})},mergeNode:function(e){this.attr("in",e)}};function n(e){return Array.isArray(e)&&(e=new SVG.Array(e)),e.toString().replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," ")}function s(e){if(!Array.isArray(e))return e;for(var t=0,i=e.length,r=[];t<i;t++)r.push(e[t]);return r.join(" ")}function a(){var e=function(){};for(var t in"function"==typeof arguments[arguments.length-1]&&(e=arguments[arguments.length-1],Array.prototype.splice.call(arguments,arguments.length-1,1)),arguments)for(var i in arguments[t])e(arguments[t][i],i,arguments[t])}["r","g","b","a"].forEach((function(e){r["Func"+e.toUpperCase()]=function(e){switch(this.attr("type",e),e){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])}}})),a(t,(function(e,t){var i=t.charAt(0).toUpperCase()+t.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),e.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.Effect,extend:{}})})),a(i,(function(e,t){var i=t.charAt(0).toUpperCase()+t.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),e.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.ParentEffect,extend:{}})})),a(r,(function(e,t){var i=t.charAt(0).toUpperCase()+t.slice(1);SVG[i]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),e.apply(this,arguments)},inherit:SVG.ChildEffect,extend:{}})})),SVG.extend(SVG.MergeEffect,{in:function(e){return e instanceof SVG.MergeNode?this.add(e,0):this.add(new SVG.MergeNode(e),0),this}}),SVG.extend(SVG.CompositeEffect,SVG.BlendEffect,SVG.DisplacementMapEffect,{in2:function(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in2")+'"]').get(0)||this.attr("in2"):this.attr("in2",e)}}),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 e(e,n,s,a,o,l,c){for(var h=e.slice(n,s||c),d=a.slice(o,l||c),u=0,g={pos:[0,0],start:[0,0]},f={pos:[0,0],start:[0,0]};h[u]=t.call(g,h[u]),d[u]=t.call(f,d[u]),h[u][0]!=d[u][0]||"M"==h[u][0]||"A"==h[u][0]&&(h[u][4]!=d[u][4]||h[u][5]!=d[u][5])?(Array.prototype.splice.apply(h,[u,1].concat(r.call(g,h[u]))),Array.prototype.splice.apply(d,[u,1].concat(r.call(f,d[u])))):(h[u]=i.call(g,h[u]),d[u]=i.call(f,d[u])),++u!=h.length||u!=d.length;)u==h.length&&h.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",f.pos[0],f.pos[1],f.pos[0],f.pos[1],f.pos[0],f.pos[1]]);return{start:h,dest:d}}function t(e){switch(e[0]){case"z":case"Z":e[0]="L",e[1]=this.start[0],e[2]=this.start[1];break;case"H":e[0]="L",e[2]=this.pos[1];break;case"V":e[0]="L",e[2]=e[1],e[1]=this.pos[0];break;case"T":e[0]="Q",e[3]=e[1],e[4]=e[2],e[1]=this.reflection[1],e[2]=this.reflection[0];break;case"S":e[0]="C",e[6]=e[4],e[5]=e[3],e[4]=e[2],e[3]=e[1],e[2]=this.reflection[1],e[1]=this.reflection[0]}return e}function i(e){var t=e.length;return this.pos=[e[t-2],e[t-1]],-1!="SCQT".indexOf(e[0])&&(this.reflection=[2*this.pos[0]-e[t-4],2*this.pos[1]-e[t-3]]),e}function r(e){var t=[e];switch(e[0]){case"M":return this.pos=this.start=[e[1],e[2]],t;case"L":e[5]=e[3]=e[1],e[6]=e[4]=e[2],e[1]=this.pos[0],e[2]=this.pos[1];break;case"Q":e[6]=e[4],e[5]=e[3],e[4]=1*e[4]/3+2*e[2]/3,e[3]=1*e[3]/3+2*e[1]/3,e[2]=1*this.pos[1]/3+2*e[2]/3,e[1]=1*this.pos[0]/3+2*e[1]/3;break;case"A":e=(t=function(e,t){var i,r,n,s,a,o,l,c,h,d,u,g,f,p,v,x,m,b,y,w,C,S,k,L,A,E,z=Math.abs(t[1]),P=Math.abs(t[2]),_=t[3]%360,R=t[4],T=t[5],M=t[6],F=t[7],I=new SVG.Point(e),O=new SVG.Point(M,F),D=[];if(0===z||0===P||I.x===O.x&&I.y===O.y)return[["C",I.x,I.y,O.x,O.y,O.x,O.y]];for((r=(i=new SVG.Point((I.x-O.x)/2,(I.y-O.y)/2).transform((new SVG.Matrix).rotate(_))).x*i.x/(z*z)+i.y*i.y/(P*P))>1&&(z*=r=Math.sqrt(r),P*=r),n=(new SVG.Matrix).rotate(_).scale(1/z,1/P).rotate(-_),I=I.transform(n),o=(s=[(O=O.transform(n)).x-I.x,O.y-I.y])[0]*s[0]+s[1]*s[1],a=Math.sqrt(o),s[0]/=a,s[1]/=a,l=o<4?Math.sqrt(1-o/4):0,R===T&&(l*=-1),c=new SVG.Point((O.x+I.x)/2+l*-s[1],(O.y+I.y)/2+l*s[0]),h=new SVG.Point(I.x-c.x,I.y-c.y),d=new SVG.Point(O.x-c.x,O.y-c.y),u=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(u*=-1),g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1),T&&u>g&&(g+=2*Math.PI),!T&&u<g&&(g-=2*Math.PI),x=[],m=u,f=(g-u)/(p=Math.ceil(2*Math.abs(u-g)/Math.PI)),v=4*Math.tan(f/4)/3,C=0;C<=p;C++)y=Math.cos(m),b=Math.sin(m),w=new SVG.Point(c.x+y,c.y+b),x[C]=[new SVG.Point(w.x+v*b,w.y-v*y),w,new SVG.Point(w.x-v*b,w.y+v*y)],m+=f;for(x[0][0]=x[0][1].clone(),x[x.length-1][2]=x[x.length-1][1].clone(),n=(new SVG.Matrix).rotate(_).scale(z,P).rotate(-_),C=0,S=x.length;C<S;C++)x[C][0]=x[C][0].transform(n),x[C][1]=x[C][1].transform(n),x[C][2]=x[C][2].transform(n);for(C=1,S=x.length;C<S;C++)k=(w=x[C-1][2]).x,L=w.y,A=(w=x[C][0]).x,E=w.y,M=(w=x[C][1]).x,F=w.y,D.push(["C",k,L,A,E,M,F]);return D}(this.pos,e))[0]}return e[0]="C",this.pos=[e[5],e[6]],this.reflection=[2*e[5]-e[3],2*e[6]-e[4]],t}function n(e,t){if(!1===t)return!1;for(var i=t,r=e.length;i<r;++i)if("M"==e[i][0])return i;return!1}SVG.extend(SVG.PathArray,{morph:function(t){for(var i=this.value,r=this.parse(t),s=0,a=0,o=!1,l=!1;!1!==s||!1!==a;){var c;o=n(i,!1!==s&&s+1),l=n(r,!1!==a&&a+1),!1===s&&(s=0==(c=new SVG.PathArray(h.start).bbox()).height||0==c.width?i.push(i[0])-1:i.push(["M",c.x+c.width/2,c.y+c.height/2])-1),!1===a&&(a=0==(c=new SVG.PathArray(h.dest).bbox()).height||0==c.width?r.push(r[0])-1:r.push(["M",c.x+c.width/2,c.y+c.height/2])-1);var h=e(i,s,o,r,a,l);i=i.slice(0,s).concat(h.start,!1===o?[]:i.slice(o)),r=r.slice(0,a).concat(h.dest,!1===l?[]:r.slice(l)),s=!1!==o&&s+h.start.length,a=!1!==l&&a+h.dest.length}return this.value=i,this.destination=new SVG.PathArray,this.destination.value=r,this}})}(),
/*! svg.draggable.js - v2.2.2 - 2019-01-08
* https://github.com/svgdotjs/svg.draggable.js
* Copyright (c) 2019 Wout Fierens; Licensed MIT */
function(){function e(e){e.remember("_draggable",this),this.el=e}e.prototype.init=function(e,t){var i=this;this.constraint=e,this.value=t,this.el.on("mousedown.drag",(function(e){i.start(e)})),this.el.on("touchstart.drag",(function(e){i.start(e)}))},e.prototype.transformPoint=function(e,t){var i=(e=e||window.event).changedTouches&&e.changedTouches[0]||e;return this.p.x=i.clientX-(t||0),this.p.y=i.clientY,this.p.matrixTransform(this.m)},e.prototype.getBBox=function(){var e=this.el.bbox();return this.el instanceof SVG.Nested&&(e=this.el.rbox()),(this.el instanceof SVG.G||this.el instanceof SVG.Use||this.el instanceof SVG.Nested)&&(e.x=this.el.x(),e.y=this.el.y()),e},e.prototype.start=function(e){if("click"!=e.type&&"mousedown"!=e.type&&"mousemove"!=e.type||1==(e.which||e.buttons)){var t=this;if(this.el.fire("beforedrag",{event:e,handler:this}),!this.el.event().defaultPrevented){e.preventDefault(),e.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,r=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(e,i),box:r,transform:this.el.transform()},SVG.on(window,"mousemove.drag",(function(e){t.drag(e)})),SVG.on(window,"touchmove.drag",(function(e){t.drag(e)})),SVG.on(window,"mouseup.drag",(function(e){t.end(e)})),SVG.on(window,"touchend.drag",(function(e){t.end(e)})),this.el.fire("dragstart",{event:e,p:this.startPoints.point,m:this.m,handler:this})}}},e.prototype.drag=function(e){var t=this.getBBox(),i=this.transformPoint(e),r=this.startPoints.box.x+i.x-this.startPoints.point.x,n=this.startPoints.box.y+i.y-this.startPoints.point.y,s=this.constraint,a=i.x-this.startPoints.point.x,o=i.y-this.startPoints.point.y;if(this.el.fire("dragmove",{event:e,p:i,m:this.m,handler:this}),this.el.event().defaultPrevented)return i;if("function"==typeof s){var l=s.call(this.el,r,n,this.m);"boolean"==typeof l&&(l={x:l,y:l}),!0===l.x?this.el.x(r):!1!==l.x&&this.el.x(l.x),!0===l.y?this.el.y(n):!1!==l.y&&this.el.y(l.y)}else"object"==typeof s&&(null!=s.minX&&r<s.minX?a=(r=s.minX)-this.startPoints.box.x:null!=s.maxX&&r>s.maxX-t.width&&(a=(r=s.maxX-t.width)-this.startPoints.box.x),null!=s.minY&&n<s.minY?o=(n=s.minY)-this.startPoints.box.y:null!=s.maxY&&n>s.maxY-t.height&&(o=(n=s.maxY-t.height)-this.startPoints.box.y),null!=s.snapToGrid&&(r-=r%s.snapToGrid,n-=n%s.snapToGrid,a-=a%s.snapToGrid,o-=o%s.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:a,y:o},!0):this.el.move(r,n));return i},e.prototype.end=function(e){var t=this.drag(e);this.el.fire("dragend",{event:e,p:t,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(t,i){"function"!=typeof t&&"object"!=typeof t||(i=t,t=!0);var r=this.remember("_draggable")||new e(this);return(t=void 0===t||t)?r.init(i||{},t):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function e(e){this.el=e,e.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(e,t,i){var r="string"!=typeof e?e:t[e];return i?r/2:r},this.pointCoords=function(e,t){var i=this.pointsList[e];return{x:this.pointCoord(i[0],t,"t"===e||"b"===e),y:this.pointCoord(i[1],t,"r"===e||"l"===e)}}}e.prototype.init=function(e,t){var i=this.el.bbox();this.options={};var r=this.el.selectize.defaults.points;for(var n in this.el.selectize.defaults)this.options[n]=this.el.selectize.defaults[n],void 0!==t[n]&&(this.options[n]=t[n]);var s=["points","pointsExclude"];for(var n in s){var a=this.options[s[n]];"string"==typeof a?a=a.length>0?a.split(/\s*,\s*/i):[]:"boolean"==typeof a&&"points"===s[n]&&(a=a?r:[]),this.options[s[n]]=a}this.options.points=[r,this.options.points].reduce((function(e,t){return e.filter((function(e){return t.indexOf(e)>-1}))})),this.options.points=[this.options.points,this.options.pointsExclude].reduce((function(e,t){return e.filter((function(e){return t.indexOf(e)<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(e):this.selectRect(e),this.observe(),this.cleanup()},e.prototype.selectPoints=function(e){return this.pointSelection.isSelected=e,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},e.prototype.getPointArray=function(){var e=this.el.bbox();return this.el.array().valueOf().map((function(t){return[t[0]-e.x,t[1]-e.y]}))},e.prototype.drawPoints=function(){for(var e=this,t=this.getPointArray(),i=0,r=t.length;i<r;++i){var n=function(t){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var r=i.pageX||i.touches[0].pageX,n=i.pageY||i.touches[0].pageY;e.el.fire("point",{x:r,y:n,i:t,event:i})}}(i),s=this.drawPoint(t[i][0],t[i][1]).addClass(this.options.classPoints).addClass(this.options.classPoints+"_point").on("touchstart",n).on("mousedown",n);this.pointSelection.set.add(s)}},e.prototype.drawPoint=function(e,t){var i=this.options.pointType;switch(i){case"circle":return this.drawCircle(e,t);case"rect":return this.drawRect(e,t);default:if("function"==typeof i)return i.call(this,e,t);throw new Error("Unknown "+i+" point type!")}},e.prototype.drawCircle=function(e,t){return this.nested.circle(this.options.pointSize).center(e,t)},e.prototype.drawRect=function(e,t){return this.nested.rect(this.options.pointSize,this.options.pointSize).center(e,t)},e.prototype.updatePointSelection=function(){var e=this.getPointArray();this.pointSelection.set.each((function(t){this.cx()===e[t][0]&&this.cy()===e[t][1]||this.center(e[t][0],e[t][1])}))},e.prototype.updateRectSelection=function(){var e=this,t=this.el.bbox();if(this.rectSelection.set.get(0).attr({width:t.width,height:t.height}),this.options.points.length&&this.options.points.map((function(i,r){var n=e.pointCoords(i,t);e.rectSelection.set.get(r+1).center(n.x,n.y)})),this.options.rotationPoint){var i=this.rectSelection.set.length();this.rectSelection.set.get(i-1).center(t.width/2,20)}},e.prototype.selectRect=function(e){var t=this,i=this.el.bbox();function r(e){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var r=i.pageX||i.touches[0].pageX,n=i.pageY||i.touches[0].pageY;t.el.fire(e,{x:r,y:n,event:i})}}if(this.rectSelection.isSelected=e,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(e,n){var s=t.pointCoords(e,i),a=t.drawPoint(s.x,s.y).attr("class",t.options.classPoints+"_"+e).on("mousedown",r(e)).on("touchstart",r(e));t.rectSelection.set.add(a)})),this.rectSelection.set.each((function(){this.addClass(t.options.classPoints)}))),this.options.rotationPoint&&(this.options.points&&!this.rectSelection.set.get(9)||!this.options.points&&!this.rectSelection.set.get(1))){var n=function(e){(e=e||window.event).preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation();var i=e.pageX||e.touches[0].pageX,r=e.pageY||e.touches[0].pageY;t.el.fire("rot",{x:i,y:r,event:e})},s=this.drawPoint(i.width/2,20).attr("class",this.options.classPoints+"_rot").on("touchstart",n).on("mousedown",n);this.rectSelection.set.add(s)}},e.prototype.handler=function(){var e=this.el.bbox();this.nested.matrix(new SVG.Matrix(this.el).translate(e.x,e.y)),this.rectSelection.isSelected&&this.updateRectSelection(),this.pointSelection.isSelected&&this.updatePointSelection()},e.prototype.observe=function(){var e=this;if(MutationObserver)if(this.rectSelection.isSelected||this.pointSelection.isSelected)this.observerInst=this.observerInst||new MutationObserver((function(){e.handler()})),this.observerInst.observe(this.el.node,{attributes:!0});else try{this.observerInst.disconnect(),delete this.observerInst}catch(e){}else this.el.off("DOMAttrModified.select"),(this.rectSelection.isSelected||this.pointSelection.isSelected)&&this.el.on("DOMAttrModified.select",(function(){e.handler()}))},e.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(t,i){return"object"==typeof t&&(i=t,t=!0),(this.remember("_selectHandler")||new e(this)).init(void 0===t||t,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 e(e){e.remember("_resizeHandler",this),this.el=e,this.parameters={},this.lastUpdateCall=null,this.p=e.doc().node.createSVGPoint()}e.prototype.transformPoint=function(e,t,i){return this.p.x=e-(this.offset.x-window.pageXOffset),this.p.y=t-(this.offset.y-window.pageYOffset),this.p.matrixTransform(i||this.m)},e.prototype._extractPosition=function(e){return{x:null!=e.clientX?e.clientX:e.touches[0].clientX,y:null!=e.clientY?e.clientY:e.touches[0].clientY}},e.prototype.init=function(e){var t=this;if(this.stop(),"stop"!==e){for(var i in this.options={},this.el.resize.defaults)this.options[i]=this.el.resize.defaults[i],void 0!==e[i]&&(this.options[i]=e[i]);this.el.on("lt.resize",(function(e){t.resize(e||window.event)})),this.el.on("rt.resize",(function(e){t.resize(e||window.event)})),this.el.on("rb.resize",(function(e){t.resize(e||window.event)})),this.el.on("lb.resize",(function(e){t.resize(e||window.event)})),this.el.on("t.resize",(function(e){t.resize(e||window.event)})),this.el.on("r.resize",(function(e){t.resize(e||window.event)})),this.el.on("b.resize",(function(e){t.resize(e||window.event)})),this.el.on("l.resize",(function(e){t.resize(e||window.event)})),this.el.on("rot.resize",(function(e){t.resize(e||window.event)})),this.el.on("point.resize",(function(e){t.resize(e||window.event)})),this.update()}},e.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},e.prototype.resize=function(e){var t=this;this.m=this.el.node.getScreenCTM().inverse(),this.offset={x:window.pageXOffset,y:window.pageYOffset};var i=this._extractPosition(e.detail.event);if(this.parameters={type:this.el.type,p:this.transformPoint(i.x,i.y),x:e.detail.x,y:e.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!==e.detail.i){var r=this.el.array().valueOf();this.parameters.i=e.detail.i,this.parameters.pointCoords=[r[e.detail.i][0],r[e.detail.i][1]]}switch(e.type){case"lt":this.calc=function(e,t){var i=this.snapToGrid(e,t);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(e,t){var i=this.snapToGrid(e,t,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(e,t){var i=this.snapToGrid(e,t,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(e,t){var i=this.snapToGrid(e,t,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(e,t){var i=this.snapToGrid(e,t,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(e,t){var i=this.snapToGrid(e,t,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(e,t){var i=this.snapToGrid(e,t,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(e,t){var i=this.snapToGrid(e,t,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(e,t){var i=e+this.parameters.p.x,r=t+this.parameters.p.y,n=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),s=Math.atan2(r-this.parameters.box.y-this.parameters.box.height/2,i-this.parameters.box.x-this.parameters.box.width/2),a=this.parameters.rotation+180*(s-n)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(a-a%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(e,t){var i=this.snapToGrid(e,t,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),r=this.el.array().valueOf();r[this.parameters.i][0]=this.parameters.pointCoords[0]+i[0],r[this.parameters.i][1]=this.parameters.pointCoords[1]+i[1],this.el.plot(r)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:e}),SVG.on(window,"touchmove.resize",(function(e){t.update(e||window.event)})),SVG.on(window,"touchend.resize",(function(){t.done()})),SVG.on(window,"mousemove.resize",(function(e){t.update(e||window.event)})),SVG.on(window,"mouseup.resize",(function(){t.done()}))},e.prototype.update=function(e){if(e){var t=this._extractPosition(e),i=this.transformPoint(t.x,t.y),r=i.x-this.parameters.p.x,n=i.y-this.parameters.p.y;this.lastUpdateCall=[r,n],this.calc(r,n),this.el.fire("resizing",{dx:r,dy:n,event:e})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},e.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")},e.prototype.snapToGrid=function(e,t,i,r){var n;return void 0!==r?n=[(i+e)%this.options.snapToGrid,(r+t)%this.options.snapToGrid]:(i=null==i?3:i,n=[(this.parameters.box.x+e+(1&i?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+t+(2&i?0:this.parameters.box.height))%this.options.snapToGrid]),e<0&&(n[0]-=this.options.snapToGrid),t<0&&(n[1]-=this.options.snapToGrid),e-=Math.abs(n[0])<this.options.snapToGrid/2?n[0]:n[0]-(e<0?-this.options.snapToGrid:this.options.snapToGrid),t-=Math.abs(n[1])<this.options.snapToGrid/2?n[1]:n[1]-(t<0?-this.options.snapToGrid:this.options.snapToGrid),this.constraintToBox(e,t,i,r)},e.prototype.constraintToBox=function(e,t,i,r){var n,s,a=this.options.constraint||{};return void 0!==r?(n=i,s=r):(n=this.parameters.box.x+(1&i?0:this.parameters.box.width),s=this.parameters.box.y+(2&i?0:this.parameters.box.height)),void 0!==a.minX&&n+e<a.minX&&(e=a.minX-n),void 0!==a.maxX&&n+e>a.maxX&&(e=a.maxX-n),void 0!==a.minY&&s+t<a.minY&&(t=a.minY-s),void 0!==a.maxY&&s+t>a.maxY&&(t=a.maxY-s),[e,t]},e.prototype.checkAspectRatio=function(e,t){if(!this.options.saveAspectRatio)return e;var i=e.slice(),r=this.parameters.box.width/this.parameters.box.height,n=this.parameters.box.width+e[0],s=this.parameters.box.height-e[1],a=n/s;return a<r?(i[1]=n/r-this.parameters.box.height,t&&(i[1]=-i[1])):a>r&&(i[0]=this.parameters.box.width-s*r,t&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(t){return(this.remember("_resizeHandler")||new e(this)).init(t||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),void 0===window.Apex&&(window.Apex={});var De=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{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 m(this.ctx),this.ctx.axes=new ee(this.ctx),this.ctx.core=new Ie(this.ctx.el,this.ctx),this.ctx.config=new X({}),this.ctx.data=new W(this.ctx),this.ctx.grid=new U(this.ctx),this.ctx.graphics=new y(this.ctx),this.ctx.coreUtils=new w(this.ctx),this.ctx.crosshairs=new te(this.ctx),this.ctx.events=new J(this.ctx),this.ctx.exports=new V(this.ctx),this.ctx.localization=new Q(this.ctx),this.ctx.options=new E,this.ctx.responsive=new ie(this.ctx),this.ctx.series=new F(this.ctx),this.ctx.theme=new re(this.ctx),this.ctx.formatters=new j(this.ctx),this.ctx.titleSubtitle=new ne(this.ctx),this.ctx.legend=new de(this.ctx),this.ctx.toolbar=new ue(this.ctx),this.ctx.dimensions=new ce(this.ctx),this.ctx.updateHelpers=new Oe(this.ctx),this.ctx.zoomPanSelection=new ge(this.ctx),this.ctx.w.globals.tooltip=new ye(this.ctx)}}]),e}(),He=function(){function e(t){s(this,e),this.ctx=t,this.w=t.w}return o(e,[{key:"clear",value:function(e){var t=e.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:t})}},{key:"killSVG",value:function(e){e.each((function(e,t){this.removeClass("*"),this.off(),this.stop()}),!0),e.ungroup(),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,i=e.isUpdating,r=this.w.globals.dom.Paper.node;r.parentNode&&r.parentNode.parentNode&&!i&&(r.parentNode.parentNode.style.minHeight="unset");var n=this.w.globals.dom.baseEl;n&&this.ctx.eventList.forEach((function(e){n.removeEventListener(e,t.ctx.events.documentEvent)}));var s=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(s.Paper),s.Paper.remove(),s.elWrap=null,s.elGraphical=null,s.elAnnotations=null,s.elLegendWrap=null,s.baseEl=null,s.elGridRect=null,s.elGridRectMask=null,s.elGridRectMarkerMask=null,s.elForecastMask=null,s.elNonForecastMask=null,s.elDefs=null}}]),e}(),Ne=new WeakMap,Xe=function(){function e(t,i){s(this,e),this.opts=i,this.ctx=this,this.w=new B(i).init(),this.el=t,this.w.globals.cuid=x.randomId(),this.w.globals.chartID=this.w.config.chart.id?x.escapeString(this.w.config.chart.id):this.w.globals.cuid,new De(this).initModules(),this.create=x.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return o(e,[{key:"render",value:function(){var e=this;return new Promise((function(t,i){if(null!==e.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var r=e.w.config.chart.events.beforeMount;if("function"==typeof r&&r(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(e,t){var i=!1,r=e.getBoundingClientRect();"none"!==e.style.display&&0!==r.width||(i=!0);var n=new ResizeObserver((function(r){i&&t.call(e,r),i=!0}));e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(e.children).forEach((function(e){return n.observe(e)})):n.observe(e),Ne.set(t,n)}(e.el.parentNode,e.parentResizeHandler),!e.css){var n=e.el.getRootNode&&e.el.getRootNode(),s=x.is("ShadowRoot",n),a=e.el.ownerDocument,o=a.getElementById("apexcharts-css");!s&&o||(e.css=document.createElement("style"),e.css.id="apexcharts-css",e.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}',s?n.prepend(e.css):a.head.appendChild(e.css))}var l=e.create(e.w.config.series,{});if(!l)return t(e);e.mount(l).then((function(){"function"==typeof e.w.config.chart.events.mounted&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),t(l)})).catch((function(e){i(e)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(e,t){var i=this.w;new De(this).initModules();var r=this.w.globals;if(r.noData=!1,r.animationEnded=!1,this.responsive.checkResponsiveConfig(t),i.config.xaxis.convertedCatToNumeric&&new N(i.config).convertCatToNumericXaxis(i.config,this.ctx),null===this.el)return r.animationEnded=!0,null;if(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===r.svgWidth)return r.animationEnded=!0,null;var n=w.checkComboSeries(e);r.comboCharts=n.comboCharts,r.comboBarCount=n.comboBarCount;var s=e.every((function(e){return e.data&&0===e.data.length}));(0===e.length||s)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(e),this.theme.init(),new _(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),r.noData&&r.collapsedSeries.length!==r.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),r.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 a=this.core.xySettings();this.grid.createGridMask();var o=this.core.plotChartType(e,a),l=new T(this);l.bringForward(),i.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition();var c={plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}};return{elGraph:o,xyRatios:a,elInner:i.globals.dom.elGraphical,dimensions:c}}},{key:"mount",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,r=i.w;return new Promise((function(n,s){if(null===i.el)return s(new Error("Not enough data to display or target element not found"));(null===t||r.globals.allSeriesCollapsed)&&i.series.handleNoData(),"treemap"!==r.config.chart.type&&i.axes.drawAxis(r.config.chart.type,t.xyRatios),i.grid=new U(i);var a=i.grid.drawGrid();i.annotations=new z(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===r.config.grid.position&&a&&r.globals.dom.elGraphical.add(a.el);var o=new G(e.ctx),l=new K(e.ctx);if(null!==a&&(o.xAxisLabelCorrections(a.xAxisTickWidth),l.setYAxisTextAlignments(),r.config.yaxis.map((function(e,t){-1===r.globals.ignoreYAxisIndexes.indexOf(t)&&l.yAxisTitleRotate(t,e.opposite)}))),"back"===r.config.annotations.position&&(r.globals.dom.Paper.add(r.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),Array.isArray(t.elGraph))for(var c=0;c<t.elGraph.length;c++)r.globals.dom.elGraphical.add(t.elGraph[c]);else r.globals.dom.elGraphical.add(t.elGraph);if("front"===r.config.grid.position&&a&&r.globals.dom.elGraphical.add(a.el),"front"===r.config.xaxis.crosshairs.position&&i.crosshairs.drawXCrosshairs(),"front"===r.config.yaxis[0].crosshairs.position&&i.crosshairs.drawYCrosshairs(),"front"===r.config.annotations.position&&(r.globals.dom.Paper.add(r.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),!r.globals.noData){if(r.config.tooltip.enabled&&!r.globals.noData&&i.w.globals.tooltip.drawTooltip(t.xyRatios),r.globals.axisCharts&&(r.globals.isXNumeric||r.config.xaxis.convertedCatToNumeric||r.globals.isRangeBar))(r.config.chart.zoom.enabled||r.config.chart.selection&&r.config.chart.selection.enabled||r.config.chart.pan&&r.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:t.xyRatios});else{var h=r.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach((function(e){h[e]=!1}))}r.config.chart.toolbar.show&&!r.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}r.globals.memory.methodsToExec.length>0&&r.globals.memory.methodsToExec.forEach((function(e){e.method(e.params,!1,e.context)})),r.globals.axisCharts||r.globals.noData||i.core.resizeNonAxisCharts(),n(i)}))}},{key:"destroy",value:function(){var e,t;window.removeEventListener("resize",this.windowResizeHandler),this.el.parentNode,e=this.parentResizeHandler,(t=Ne.get(e))&&(t.disconnect(),Ne.delete(e));var i=this.w.config.chart.id;i&&Apex._chartInstances.forEach((function(e,t){e.id===x.escapeString(i)&&Apex._chartInstances.splice(t,1)})),new He(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(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],a=this.w;return a.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((function(e,i){return t.updateHelpers._extendSeries(e,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,i,r,n,s)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(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(e,t,i)}},{key:"appendSeries",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.w.config.series.slice();return r.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(r,t,i)}},{key:"appendData",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var r=i.w.config.series.slice(),n=0;n<r.length;n++)if(null!==e[n]&&void 0!==e[n])for(var s=0;s<e[n].data.length;s++)r[n].data.push(e[n].data[s]);return i.w.config.series=r,t&&(i.w.globals.initialSeries=x.clone(i.w.config.series)),this.update()}},{key:"update",value:function(e){var t=this;return new Promise((function(i,r){new He(t.ctx).clear({isUpdating:!0});var n=t.create(t.w.config.series,e);if(!n)return i(t);t.mount(n).then((function(){"function"==typeof t.w.config.chart.events.updated&&t.w.config.chart.events.updated(t,t.w),t.events.fireEvent("updated",[t,t.w]),t.w.globals.isDirty=!0,i(t)})).catch((function(e){r(e)}))}))}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),t=[this];return e.length&&(t=[],e.forEach((function(e){t.push(e)}))),t}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter((function(e){if(e.group)return!0})).map((function(t){return e.w.config.chart.group===t.group?t.chart:e}))}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"highlightSeriesOnLegendHover",value:function(e,t){return this.series.toggleSeriesOnHover(e,t)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(e,t)}},{key:"addEventListener",value:function(e,t){this.events.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.events.removeEventListener(e,t)}},{key:"addXaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this;i&&(r=i),r.annotations.addXaxisAnnotationExternal(e,t,r)}},{key:"addYaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this;i&&(r=i),r.annotations.addYaxisAnnotationExternal(e,t,r)}},{key:"addPointAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this;i&&(r=i),r.annotations.addPointAnnotationExternal(e,t,r)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;t&&(i=t),i.annotations.removeAnnotation(i,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new q(this.ctx);return t.getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new q(this.ctx);return t.getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:"zoomX",value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new V(this.ctx).dataURI(e)}},{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 e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;"function"==typeof e&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var t=x.escapeString(e),i=Apex._chartInstances.filter((function(e){return e.id===t}))[0];return i&&i.chart}},{key:"initOnLoad",value:function(){for(var t=document.querySelectorAll("[data-apexcharts]"),i=0;i<t.length;i++)new e(t[i],JSON.parse(t[i].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,t){var i=this.getChartByID(e);if(i){i.w.globals.isExecCalled=!0;var r=null;if(-1!==i.publicMethods.indexOf(t)){for(var n=arguments.length,s=new Array(n>2?n-2:0),a=2;a<n;a++)s[a-2]=arguments[a];r=i[t].apply(i,s)}return r}}},{key:"merge",value:function(e,t){return x.extend(e,t)}}]),e}();e.exports=Xe}(w,w.exports);var C=w.exports,S={exports:{}};self;var k,L=x(S.exports=(()=>{var e={77:function(e,t,i){var r,n;void 0===(n="function"==typeof(r=function(){var e,t,i,r,n,s={},a={},o={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:o.currentLocale,zeroFormat:o.zeroFormat,nullFormat:o.nullFormat,defaultFormat:o.defaultFormat,scalePercentBy100:o.scalePercentBy100};function c(e,t){this._input=e,this._value=t}return(e=function(i){var r,n,a,o;if(e.isNumeral(i))r=i.value();else if(0===i||void 0===i)r=0;else if(null===i||t.isNaN(i))r=null;else if("string"==typeof i)if(l.zeroFormat&&i===l.zeroFormat)r=0;else if(l.nullFormat&&i===l.nullFormat||!i.replace(/[^0-9]+/g,"").length)r=null;else{for(n in s)if((o="function"==typeof s[n].regexps.unformat?s[n].regexps.unformat():s[n].regexps.unformat)&&i.match(o)){a=s[n].unformat;break}r=(a=a||e._.stringToNumber)(i)}else r=Number(i)||null;return new c(i,r)}).version="2.0.6",e.isNumeral=function(e){return e instanceof c},e._=t={numberToFormat:function(t,i,r){var n,s,o,l,c,h,d,u,g=a[e.options.currentLocale],f=!1,p=!1,v="",x=1e12,m=1e9,b=1e6,y="",w=!1;if(t=t||0,s=Math.abs(t),e._.includes(i,"(")?(f=!0,i=i.replace(/[\(|\)]/g,"")):(e._.includes(i,"+")||e._.includes(i,"-"))&&(c=e._.includes(i,"+")?i.indexOf("+"):t<0?i.indexOf("-"):-1,i=i.replace(/[\+|\-]/g,"")),e._.includes(i,"a")&&(n=!!(n=i.match(/a(k|m|b|t)?/))&&n[1],e._.includes(i," a")&&(v=" "),i=i.replace(new RegExp(v+"a[kmbt]?"),""),s>=x&&!n||"t"===n?(v+=g.abbreviations.trillion,t/=x):s<x&&s>=m&&!n||"b"===n?(v+=g.abbreviations.billion,t/=m):s<m&&s>=b&&!n||"m"===n?(v+=g.abbreviations.million,t/=b):(s<b&&s>=1e3&&!n||"k"===n)&&(v+=g.abbreviations.thousand,t/=1e3)),e._.includes(i,"[.]")&&(p=!0,i=i.replace("[.]",".")),o=t.toString().split(".")[0],l=i.split(".")[1],h=i.indexOf(","),u=(i.split(".")[0].split(",")[0].match(/0/g)||[]).length,l?(e._.includes(l,"[")?(l=(l=l.replace("]","")).split("["),y=e._.toFixed(t,l[0].length+l[1].length,r,l[1].length)):y=e._.toFixed(t,l.length,r),o=y.split(".")[0],y=e._.includes(y,".")?g.delimiters.decimal+y.split(".")[1]:"",p&&0===Number(y.slice(1))&&(y="")):o=e._.toFixed(t,0,r),v&&!n&&Number(o)>=1e3&&v!==g.abbreviations.trillion)switch(o=String(Number(o)/1e3),v){case g.abbreviations.thousand:v=g.abbreviations.million;break;case g.abbreviations.million:v=g.abbreviations.billion;break;case g.abbreviations.billion:v=g.abbreviations.trillion}if(e._.includes(o,"-")&&(o=o.slice(1),w=!0),o.length<u)for(var C=u-o.length;C>0;C--)o="0"+o;return h>-1&&(o=o.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+g.delimiters.thousands)),0===i.indexOf(".")&&(o=""),d=o+y+(v||""),f?d=(f&&w?"(":"")+d+(f&&w?")":""):c>=0?d=0===c?(w?"-":"+")+d:d+(w?"-":"+"):w&&(d="-"+d),d},stringToNumber:function(e){var t,i,r,n=a[l.currentLocale],s=e,o={thousand:3,million:6,billion:9,trillion:12};if(l.zeroFormat&&e===l.zeroFormat)i=0;else if(l.nullFormat&&e===l.nullFormat||!e.replace(/[^0-9]+/g,"").length)i=null;else{for(t in i=1,"."!==n.delimiters.decimal&&(e=e.replace(/\./g,"").replace(n.delimiters.decimal,".")),o)if(r=new RegExp("[^a-zA-Z]"+n.abbreviations[t]+"(?:\\)|(\\"+n.currency.symbol+")?(?:\\))?)?$"),s.match(r)){i*=Math.pow(10,o[t]);break}i*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),i*=Number(e)}return i},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,i){return e.slice(0,i)+t+e.slice(i)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var i,r=Object(e),n=r.length>>>0,s=0;if(3===arguments.length)i=arguments[2];else{for(;s<n&&!(s in r);)s++;if(s>=n)throw new TypeError("Reduce of empty array with no initial value");i=r[s++]}for(;s<n;s++)s in r&&(i=t(i,r[s],s,r));return i},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce((function(e,i){var r=t.multiplier(i);return e>r?e:r}),1)},toFixed:function(e,t,i,r){var n,s,a,o,l=e.toString().split("."),c=t-(r||0);return n=2===l.length?Math.min(Math.max(l[1].length,c),t):c,a=Math.pow(10,n),o=(i(e+"e+"+n)/a).toFixed(n),r>t-n&&(s=new RegExp("\\.?0{1,"+(r-(t-n))+"}$"),o=o.replace(s,"")),o}},e.options=l,e.formats=s,e.locales=a,e.locale=function(e){return e&&(l.currentLocale=e.toLowerCase()),l.currentLocale},e.localeData=function(e){if(!e)return a[l.currentLocale];if(e=e.toLowerCase(),!a[e])throw new Error("Unknown locale : "+e);return a[e]},e.reset=function(){for(var e in o)l[e]=o[e]},e.zeroFormat=function(e){l.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){l.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){l.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,i){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=i,i},e.validate=function(t,i){var r,n,s,a,o,l,c,h;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{c=e.localeData(i)}catch(t){c=e.localeData(e.locale())}return s=c.currency.symbol,o=c.abbreviations,r=c.delimiters.decimal,n="."===c.delimiters.thousands?"\\.":c.delimiters.thousands,!(null!==(h=t.match(/^[^\d]+/))&&(t=t.substr(1),h[0]!==s)||null!==(h=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),h[0]!==o.thousand&&h[0]!==o.million&&h[0]!==o.billion&&h[0]!==o.trillion)||(l=new RegExp(n+"{2}"),t.match(/[^\d.,]/g)||(a=t.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},e.fn=c.prototype={clone:function(){return e(this)},format:function(t,i){var r,n,a,o=this._value,c=t||l.defaultFormat;if(i=i||Math.round,0===o&&null!==l.zeroFormat)n=l.zeroFormat;else if(null===o&&null!==l.nullFormat)n=l.nullFormat;else{for(r in s)if(c.match(s[r].regexps.format)){a=s[r].format;break}n=(a=a||e._.numberToFormat)(o,c,i)}return n},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var i=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],(function(e,t,r,n){return e+Math.round(i*t)}),0)/i,this},subtract:function(e){var i=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],(function(e,t,r,n){return e-Math.round(i*t)}),Math.round(this._value*i))/i,this},multiply:function(e){return this._value=t.reduce([this._value,e],(function(e,i,r,n){var s=t.correctionFactor(e,i);return Math.round(e*s)*Math.round(i*s)/Math.round(s*s)}),1),this},divide:function(e){return this._value=t.reduce([this._value,e],(function(e,i,r,n){var s=t.correctionFactor(e,i);return Math.round(e*s)/Math.round(i*s)})),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,i,r){var n,s=e._.includes(i," BPS")?" ":"";return t*=1e4,i=i.replace(/\s?BPS/,""),n=e._.numberToFormat(t,i,r),e._.includes(n,")")?((n=n.split("")).splice(-1,0,s+"BPS"),n=n.join("")):n=n+s+"BPS",n},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},n="("+(n=(i={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter((function(e){return i.suffixes.indexOf(e)<0}))).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(n)},format:function(t,n,s){var a,o,l,c=e._.includes(n,"ib")?r:i,h=e._.includes(n," b")||e._.includes(n," ib")?" ":"";for(n=n.replace(/\s?i?b/,""),a=0;a<=c.suffixes.length;a++)if(o=Math.pow(c.base,a),l=Math.pow(c.base,a+1),null===t||0===t||t>=o&&t<l){h+=c.suffixes[a],o>0&&(t/=o);break}return e._.numberToFormat(t,n,s)+h},unformat:function(t){var n,s,a=e._.stringToNumber(t);if(a){for(n=i.suffixes.length-1;n>=0;n--){if(e._.includes(t,i.suffixes[n])){s=Math.pow(i.base,n);break}if(e._.includes(t,r.suffixes[n])){s=Math.pow(r.base,n);break}}a*=s||1}return a}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,i,r){var n,s,a=e.locales[e.options.currentLocale],o={before:i.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:i.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(i=i.replace(/\s?\$\s?/,""),n=e._.numberToFormat(t,i,r),t>=0?(o.before=o.before.replace(/[\-\(]/,""),o.after=o.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(o.before,"-")&&!e._.includes(o.before,"(")&&(o.before="-"+o.before),s=0;s<o.before.length;s++)switch(o.before[s]){case"$":n=e._.insert(n,a.currency.symbol,s);break;case" ":n=e._.insert(n," ",s+a.currency.symbol.length-1)}for(s=o.after.length-1;s>=0;s--)switch(o.after[s]){case"$":n=s===o.after.length-1?n+a.currency.symbol:e._.insert(n,a.currency.symbol,-(o.after.length-(1+s)));break;case" ":n=s===o.after.length-1?n+" ":e._.insert(n," ",-(o.after.length-(1+s)+a.currency.symbol.length-1))}return n}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,i,r){var n=("number"!=typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return i=i.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(n[0]),i,r)+"e"+n[1]},unformat:function(t){var i=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(i[0]),n=Number(i[1]);return n=e._.includes(t,"e-")?n*=-1:n,e._.reduce([r,Math.pow(10,n)],(function(t,i,r,n){var s=e._.correctionFactor(t,i);return t*s*(i*s)/(s*s)}),1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,i,r){var n=e.locales[e.options.currentLocale],s=e._.includes(i," o")?" ":"";return i=i.replace(/\s?o/,""),s+=n.ordinal(t),e._.numberToFormat(t,i,r)+s}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,i,r){var n,s=e._.includes(i," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),i=i.replace(/\s?\%/,""),n=e._.numberToFormat(t,i,r),e._.includes(n,")")?((n=n.split("")).splice(-1,0,s+"%"),n=n.join("")):n=n+s+"%",n},unformat:function(t){var i=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*i:i}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,i){var r=Math.floor(e/60/60),n=Math.floor((e-60*r*60)/60),s=Math.round(e-60*r*60-60*n);return r+":"+(n<10?"0"+n:n)+":"+(s<10?"0"+s:s)},unformat:function(e){var t=e.split(":"),i=0;return 3===t.length?(i+=60*Number(t[0])*60,i+=60*Number(t[1]),i+=Number(t[2])):2===t.length&&(i+=60*Number(t[0]),i+=Number(t[1])),Number(i)}}),e})?r.call(t,i,t,e):r)||(e.exports=n)},607:(e,t,i)=>{i.r(t),i.d(t,{default:()=>s});var r=i(77),n=i.n(r);class s{constructor(e,t){this.emiter=t,this.columnProperties=()=>({class:{"align-center":!0}}),this.cellProperties=()=>({class:{"align-right":!0}}),this.cellTemplate=(e,t)=>{const i=parseFloat(t.model[t.prop]);return isNaN(i)?"":this.formated(i)},this.numberFormat=e||"0,0[.]00"}formated(e){const t=n()(e);return this.emiter&&this.emiter("beforeValueFormatted",t),t.format(this.numberFormat)}static getNumeralInstance(){return n()}}}},t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,i),n.exports}return i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(607)})()),A={exports:{}};
/*! @preserve
* numeral.js
* version : 2.0.6
* author : Adam Draper
* license : MIT
* http://adamwdraper.github.com/Numeral-js/
*/
k=A,function(e,t){k.exports?k.exports=t():e.numeral=t()}(v,(function(){var e,t,i,r,n,s={},a={},o={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:o.currentLocale,zeroFormat:o.zeroFormat,nullFormat:o.nullFormat,defaultFormat:o.defaultFormat,scalePercentBy100:o.scalePercentBy100};function c(e,t){this._input=e,this._value=t}return(e=function(i){var r,n,a,o;if(e.isNumeral(i))r=i.value();else if(0===i||void 0===i)r=0;else if(null===i||t.isNaN(i))r=null;else if("string"==typeof i)if(l.zeroFormat&&i===l.zeroFormat)r=0;else if(l.nullFormat&&i===l.nullFormat||!i.replace(/[^0-9]+/g,"").length)r=null;else{for(n in s)if((o="function"==typeof s[n].regexps.unformat?s[n].regexps.unformat():s[n].regexps.unformat)&&i.match(o)){a=s[n].unformat;break}r=(a=a||e._.stringToNumber)(i)}else r=Number(i)||null;return new c(i,r)}).version="2.0.6",e.isNumeral=function(e){return e instanceof c},e._=t={numberToFormat:function(t,i,r){var n,s,o,l,c,h,d,u,g=a[e.options.currentLocale],f=!1,p=!1,v="",x=1e12,m=1e9,b=1e6,y="",w=!1;if(t=t||0,o=Math.abs(t),e._.includes(i,"(")?(f=!0,i=i.replace(/[\(|\)]/g,"")):(e._.includes(i,"+")||e._.includes(i,"-"))&&(h=e._.includes(i,"+")?i.indexOf("+"):t<0?i.indexOf("-"):-1,i=i.replace(/[\+|\-]/g,"")),e._.includes(i,"a")&&(s=!!(s=i.match(/a(k|m|b|t)?/))&&s[1],e._.includes(i," a")&&(v=" "),i=i.replace(new RegExp(v+"a[kmbt]?"),""),o>=x&&!s||"t"===s?(v+=g.abbreviations.trillion,t/=x):o<x&&o>=m&&!s||"b"===s?(v+=g.abbreviations.billion,t/=m):o<m&&o>=b&&!s||"m"===s?(v+=g.abbreviations.million,t/=b):(o<b&&o>=1e3&&!s||"k"===s)&&(v+=g.abbreviations.thousand,t/=1e3)),e._.includes(i,"[.]")&&(p=!0,i=i.replace("[.]",".")),l=t.toString().split(".")[0],c=i.split(".")[1],d=i.indexOf(","),n=(i.split(".")[0].split(",")[0].match(/0/g)||[]).length,c?(e._.includes(c,"[")?(c=(c=c.replace("]","")).split("["),y=e._.toFixed(t,c[0].length+c[1].length,r,c[1].length)):y=e._.toFixed(t,c.length,r),l=y.split(".")[0],y=e._.includes(y,".")?g.delimiters.decimal+y.split(".")[1]:"",p&&0===Number(y.slice(1))&&(y="")):l=e._.toFixed(t,0,r),v&&!s&&Number(l)>=1e3&&v!==g.abbreviations.trillion)switch(l=String(Number(l)/1e3),v){case g.abbreviations.thousand:v=g.abbreviations.million;break;case g.abbreviations.million:v=g.abbreviations.billion;break;case g.abbreviations.billion:v=g.abbreviations.trillion}if(e._.includes(l,"-")&&(l=l.slice(1),w=!0),l.length<n)for(var C=n-l.length;C>0;C--)l="0"+l;return d>-1&&(l=l.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+g.delimiters.thousands)),0===i.indexOf(".")&&(l=""),u=l+y+(v||""),f?u=(f&&w?"(":"")+u+(f&&w?")":""):h>=0?u=0===h?(w?"-":"+")+u:u+(w?"-":"+"):w&&(u="-"+u),u},stringToNumber:function(e){var t,i,r,n=a[l.currentLocale],s=e,o={thousand:3,million:6,billion:9,trillion:12};if(l.zeroFormat&&e===l.zeroFormat)i=0;else if(l.nullFormat&&e===l.nullFormat||!e.replace(/[^0-9]+/g,"").length)i=null;else{for(t in i=1,"."!==n.delimiters.decimal&&(e=e.replace(/\./g,"").replace(n.delimiters.decimal,".")),o)if(r=new RegExp("[^a-zA-Z]"+n.abbreviations[t]+"(?:\\)|(\\"+n.currency.symbol+")?(?:\\))?)?$"),s.match(r)){i*=Math.pow(10,o[t]);break}i*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),i*=Number(e)}return i},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,i){return e.slice(0,i)+t+e.slice(i)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var i,r=Object(e),n=r.length>>>0,s=0;if(3===arguments.length)i=arguments[2];else{for(;s<n&&!(s in r);)s++;if(s>=n)throw new TypeError("Reduce of empty array with no initial value");i=r[s++]}for(;s<n;s++)s in r&&(i=t(i,r[s],s,r));return i},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){var e=Array.prototype.slice.call(arguments);return e.reduce((function(e,i){var r=t.multiplier(i);return e>r?e:r}),1)},toFixed:function(e,t,i,r){var n,s,a,o,l=e.toString().split("."),c=t-(r||0);return n=2===l.length?Math.min(Math.max(l[1].length,c),t):c,a=Math.pow(10,n),o=(i(e+"e+"+n)/a).toFixed(n),r>t-n&&(s=new RegExp("\\.?0{1,"+(r-(t-n))+"}$"),o=o.replace(s,"")),o}},e.options=l,e.formats=s,e.locales=a,e.locale=function(e){return e&&(l.currentLocale=e.toLowerCase()),l.currentLocale},e.localeData=function(e){if(!e)return a[l.currentLocale];if(e=e.toLowerCase(),!a[e])throw new Error("Unknown locale : "+e);return a[e]},e.reset=function(){for(var e in o)l[e]=o[e]},e.zeroFormat=function(e){l.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){l.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){l.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,i){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=i,i},e.validate=function(t,i){var r,n,s,a,o,l,c,h;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{c=e.localeData(i)}catch(t){c=e.localeData(e.locale())}return s=c.currency.symbol,o=c.abbreviations,r=c.delimiters.decimal,n="."===c.delimiters.thousands?"\\.":c.delimiters.thousands,!(null!==(h=t.match(/^[^\d]+/))&&(t=t.substr(1),h[0]!==s)||null!==(h=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),h[0]!==o.thousand&&h[0]!==o.million&&h[0]!==o.billion&&h[0]!==o.trillion)||(l=new RegExp(n+"{2}"),t.match(/[^\d.,]/g)||(a=t.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},e.fn=c.prototype={clone:function(){return e(this)},format:function(t,i){var r,n,a,o=this._value,c=t||l.defaultFormat;if(i=i||Math.round,0===o&&null!==l.zeroFormat)n=l.zeroFormat;else if(null===o&&null!==l.nullFormat)n=l.nullFormat;else{for(r in s)if(c.match(s[r].regexps.format)){a=s[r].format;break}n=(a=a||e._.numberToFormat)(o,c,i)}return n},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var i=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],(function(e,t,r,n){return e+Math.round(i*t)}),0)/i,this},subtract:function(e){var i=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],(function(e,t,r,n){return e-Math.round(i*t)}),Math.round(this._value*i))/i,this},multiply:function(e){return this._value=t.reduce([this._value,e],(function(e,i,r,n){var s=t.correctionFactor(e,i);return Math.round(e*s)*Math.round(i*s)/Math.round(s*s)}),1),this},divide:function(e){return this._value=t.reduce([this._value,e],(function(e,i,r,n){var s=t.correctionFactor(e,i);return Math.round(e*s)/Math.round(i*s)})),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,i,r){var n,s=e._.includes(i," BPS")?" ":"";return t*=1e4,i=i.replace(/\s?BPS/,""),n=e._.numberToFormat(t,i,r),e._.includes(n,")")?((n=n.split("")).splice(-1,0,s+"BPS"),n=n.join("")):n=n+s+"BPS",n},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},n="("+(n=(i={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter((function(e){return i.suffixes.indexOf(e)<0}))).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(n)},format:function(t,n,s){var a,o,l,c=e._.includes(n,"ib")?r:i,h=e._.includes(n," b")||e._.includes(n," ib")?" ":"";for(n=n.replace(/\s?i?b/,""),a=0;a<=c.suffixes.length;a++)if(o=Math.pow(c.base,a),l=Math.pow(c.base,a+1),null===t||0===t||t>=o&&t<l){h+=c.suffixes[a],o>0&&(t/=o);break}return e._.numberToFormat(t,n,s)+h},unformat:function(t){var n,s,a=e._.stringToNumber(t);if(a){for(n=i.suffixes.length-1;n>=0;n--){if(e._.includes(t,i.suffixes[n])){s=Math.pow(i.base,n);break}if(e._.includes(t,r.suffixes[n])){s=Math.pow(r.base,n);break}}a*=s||1}return a}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,i,r){var n,s,a=e.locales[e.options.currentLocale],o={before:i.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:i.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(i=i.replace(/\s?\$\s?/,""),n=e._.numberToFormat(t,i,r),t>=0?(o.before=o.before.replace(/[\-\(]/,""),o.after=o.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(o.before,"-")&&!e._.includes(o.before,"(")&&(o.before="-"+o.before),s=0;s<o.before.length;s++)switch(o.before[s]){case"$":n=e._.insert(n,a.currency.symbol,s);break;case" ":n=e._.insert(n," ",s+a.currency.symbol.length-1)}for(s=o.after.length-1;s>=0;s--)switch(o.after[s]){case"$":n=s===o.after.length-1?n+a.currency.symbol:e._.insert(n,a.currency.symbol,-(o.after.length-(1+s)));break;case" ":n=s===o.after.length-1?n+" ":e._.insert(n," ",-(o.after.length-(1+s)+a.currency.symbol.length-1))}return n}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,i,r){var n=("number"!=typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return i=i.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(n[0]),i,r)+"e"+n[1]},unformat:function(t){var i=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(i[0]),n=Number(i[1]);return n=e._.includes(t,"e-")?n*=-1:n,e._.reduce([r,Math.pow(10,n)],(function(t,i,r,n){var s=e._.correctionFactor(t,i);return t*s*(i*s)/(s*s)}),1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,i,r){var n=e.locales[e.options.currentLocale],s=e._.includes(i," o")?" ":"";return i=i.replace(/\s?o/,""),s+=n.ordinal(t),e._.numberToFormat(t,i,r)+s}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,i,r){var n,s=e._.includes(i," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),i=i.replace(/\s?\%/,""),n=e._.numberToFormat(t,i,r),e._.includes(n,")")?((n=n.split("")).splice(-1,0,s+"%"),n=n.join("")):n=n+s+"%",n},unformat:function(t){var i=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*i:i}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,i){var r=Math.floor(e/60/60),n=Math.floor((e-60*r*60)/60),s=Math.round(e-60*r*60-60*n);return r+":"+(n<10?"0"+n:n)+":"+(s<10?"0"+s:s)},unformat:function(e){var t=e.split(":"),i=0;return 3===t.length?(i+=60*Number(t[0])*60,i+=60*Number(t[1]),i+=Number(t[2])):2===t.length&&(i+=60*Number(t[0]),i+=Number(t[1])),Number(i)}}),e}));var E=A.exports,z={exports:{}},P=z.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},i=!t.document&&!!t.postMessage,r=i&&/blob:/i.test((t.location||{}).protocol),n={},s=0,a={parse:function(i,r){var o=(r=r||{}).dynamicTyping||!1;if(w(o)&&(r.dynamicTypingFunction=o,o={}),r.dynamicTyping=o,r.transform=!!w(r.transform)&&r.transform,r.worker&&a.WORKERS_SUPPORTED){var l=function(){if(!a.WORKERS_SUPPORTED)return!1;var i,r,o=(i=t.URL||t.webkitURL||null,r=e.toString(),a.BLOB_URL||(a.BLOB_URL=i.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),l=new t.Worker(o);return l.onmessage=v,l.id=s++,n[l.id]=l}();return l.userStep=r.step,l.userChunk=r.chunk,l.userComplete=r.complete,l.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,void l.postMessage({input:i,config:r,workerId:l.id})}var g=null;return a.NODE_STREAM_INPUT,"string"==typeof i?g=r.download?new c(r):new d(r):!0===i.readable&&w(i.read)&&w(i.on)?g=new u(r):(t.File&&i instanceof File||i instanceof Object)&&(g=new h(r)),g.stream(i)},unparse:function(e,t){var i=!1,r=!0,n=",",s="\r\n",o='"',l=o+o,c=!1,h=null,d=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(n=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(i=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(o=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");h=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+o),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(d=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var u=new RegExp(f(o),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return g(null,e,c);if("object"==typeof e[0])return g(h||Object.keys(e[0]),e,c)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||h),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),g(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function g(e,t,i){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var o=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(o&&r){for(var c=0;c<e.length;c++)0<c&&(a+=n),a+=p(e[c],c);0<t.length&&(a+=s)}for(var h=0;h<t.length;h++){var d=o?e.length:t[h].length,u=!1,g=o?0===Object.keys(t[h]).length:0===t[h].length;if(i&&!o&&(u="greedy"===i?""===t[h].join("").trim():1===t[h].length&&0===t[h][0].length),"greedy"===i&&o){for(var f=[],v=0;v<d;v++){var x=l?e[v]:v;f.push(t[h][x])}u=""===f.join("").trim()}if(!u){for(var m=0;m<d;m++){0<m&&!g&&(a+=n);var b=o&&l?e[m]:m;a+=p(t[h][b],m)}h<t.length-1&&(!i||0<d&&!g)&&(a+=s)}}return a}function p(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var r=!1;d&&"string"==typeof e&&d.test(e)&&(e="'"+e,r=!0);var s=e.toString().replace(u,l);return(r=r||!0===i||"function"==typeof i&&i(e,t)||Array.isArray(i)&&i[t]||function(e,t){for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return!0;return!1}(s,a.BAD_DELIMITERS)||-1<s.indexOf(n)||" "===s.charAt(0)||" "===s.charAt(s.length-1))?o+s+o:s}}};if(a.RECORD_SEP=String.fromCharCode(30),a.UNIT_SEP=String.fromCharCode(31),a.BYTE_ORDER_MARK="\ufeff",a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!i&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=p,a.ParserHandle=g,a.NetworkStreamer=c,a.FileStreamer=h,a.StringStreamer=d,a.ReadableStreamStreamer=u,t.jQuery){var o=t.jQuery;o.fn.parse=function(e){var i=e.config||{},r=[];return this.each((function(e){if("INPUT"!==o(this).prop("tagName").toUpperCase()||"file"!==o(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var n=0;n<this.files.length;n++)r.push({file:this.files[n],inputElem:this,instanceConfig:o.extend({},i)})})),n(),this;function n(){if(0!==r.length){var t,i,n,l,c=r[0];if(w(e.before)){var h=e.before(c.file,c.inputElem);if("object"==typeof h){if("abort"===h.action)return t="AbortError",i=c.file,n=c.inputElem,l=h.reason,void(w(e.error)&&e.error({name:t},i,n,l));if("skip"===h.action)return void s();"object"==typeof h.config&&(c.instanceConfig=o.extend(c.instanceConfig,h.config))}else if("skip"===h)return void s()}var d=c.instanceConfig.complete;c.instanceConfig.complete=function(e){w(d)&&d(e,c.file,c.inputElem),s()},a.parse(c.file,c.instanceConfig)}else w(e.complete)&&e.complete()}function s(){r.splice(0,1),n()}}}function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new g(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,i){if(this.isFirstChunk&&w(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(e);void 0!==n&&(e=n)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e;this._partialLine="";var o=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=o.meta.cursor;this._finished||(this._partialLine=s.substring(l-this._baseIndex),this._baseIndex=l),o&&o.data&&(this._rowCount+=o.data.length);var c=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)t.postMessage({results:o,workerId:a.WORKER_ID,finished:c});else if(w(this._config.chunk)&&!i){if(this._config.chunk(o,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);o=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(o.data),this._completeResults.errors=this._completeResults.errors.concat(o.errors),this._completeResults.meta=o.meta),this._completed||!c||!w(this._config.complete)||o&&o.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),c||o&&o.meta.paused||this._nextChunk(),o}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.call(this,e),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),i||(t.onload=y(this._chunkLoaded,this),t.onerror=y(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var n=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+n)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}i&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var i=t.statusText||e;this._sendError(new Error(i))}}function h(e){var t,i;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=y(this._chunkLoaded,this),t.onerror=y(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var n=Math.min(this._start+this._config.chunkSize,this._input.size);e=i.call(e,this._start,n)}var s=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,i=this._config.chunkSize;return i?(e=t.substring(0,i),t=t.substring(i)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function u(e){l.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0},this._streamData=y((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=y((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=y((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=y((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function g(e){var t,i,r,n=Math.pow(2,53),s=-n,o=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,c=this,h=0,d=0,u=!1,g=!1,v=[],x={data:[],errors:[],meta:{}};if(w(e.step)){var m=e.step;e.step=function(t){if(x=t,S())C();else{if(C(),0===x.data.length)return;h+=t.data.length,e.preview&&h>e.preview?i.abort():(x.data=x.data[0],m(x,c))}}}function y(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function C(){return x&&r&&(L("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(x.data=x.data.filter((function(e){return!y(e)}))),S()&&function(){if(x)if(Array.isArray(x.data[0])){for(var t=0;S()&&t<x.data.length;t++)x.data[t].forEach(i);x.data.splice(0,1)}else x.data.forEach(i);function i(t,i){w(e.transformHeader)&&(t=e.transformHeader(t,i)),v.push(t)}}(),function(){if(!x||!e.header&&!e.dynamicTyping&&!e.transform)return x;function t(t,i){var r,n=e.header?{}:[];for(r=0;r<t.length;r++){var s=r,a=t[r];e.header&&(s=r>=v.length?"__parsed_extra":v[r]),e.transform&&(a=e.transform(a,s)),a=k(s,a),"__parsed_extra"===s?(n[s]=n[s]||[],n[s].push(a)):n[s]=a}return e.header&&(r>v.length?L("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+r,d+i):r<v.length&&L("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+r,d+i)),n}var i=1;return!x.data.length||Array.isArray(x.data[0])?(x.data=x.data.map(t),i=x.data.length):x.data=t(x.data,0),e.header&&x.meta&&(x.meta.fields=v),d+=i,x}()}function S(){return e.header&&0===v.length}function k(t,i){return r=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[r]&&(e.dynamicTyping[r]=e.dynamicTypingFunction(r)),!0===(e.dynamicTyping[r]||e.dynamicTyping)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&(function(e){if(o.test(e)){var t=parseFloat(e);if(s<t&&t<n)return!0}return!1}(i)?parseFloat(i):l.test(i)?new Date(i):""===i?null:i):i;var r}function L(e,t,i,r){var n={type:e,code:t,message:i};void 0!==r&&(n.row=r),x.errors.push(n)}this.parse=function(n,s,o){var l=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var i=new RegExp(f(t)+"([^]*?)"+f(t),"gm"),r=(e=e.replace(i,"")).split("\r"),n=e.split("\n"),s=1<n.length&&n[0].length<r[0].length;if(1===r.length||s)return"\n";for(var a=0,o=0;o<r.length;o++)"\n"===r[o][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(n,l)),r=!1,e.delimiter)w(e.delimiter)&&(e.delimiter=e.delimiter(n),x.meta.delimiter=e.delimiter);else{var c=function(t,i,r,n,s){var o,l,c,h;s=s||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var d=0;d<s.length;d++){var u=s[d],g=0,f=0,v=0;c=void 0;for(var x=new p({comments:n,delimiter:u,newline:i,preview:10}).parse(t),m=0;m<x.data.length;m++)if(r&&y(x.data[m]))v++;else{var b=x.data[m].length;f+=b,void 0!==c?0<b&&(g+=Math.abs(b-c),c=b):c=b}0<x.data.length&&(f/=x.data.length-v),(void 0===l||g<=l)&&(void 0===h||h<f)&&1.99<f&&(l=g,o=u,h=f)}return{successful:!!(e.delimiter=o),bestDelimiter:o}}(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);c.successful?e.delimiter=c.bestDelimiter:(r=!0,e.delimiter=a.DefaultDelimiter),x.meta.delimiter=e.delimiter}var h=b(e);return e.preview&&e.header&&h.preview++,t=n,i=new p(h),x=i.parse(t,s,o),C(),u?{meta:{paused:!0}}:x||{meta:{paused:!1}}},this.paused=function(){return u},this.pause=function(){u=!0,i.abort(),t=w(e.chunk)?"":t.substring(i.getCharIndex())},this.resume=function(){c.streamer._halted?(u=!1,c.streamer.parseChunk(t,!0)):setTimeout(c.resume,3)},this.aborted=function(){return g},this.abort=function(){g=!0,i.abort(),x.meta.aborted=!0,w(e.complete)&&e.complete(x),t=""}}function f(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function p(e){var t,i=(e=e||{}).delimiter,r=e.newline,n=e.comments,s=e.step,o=e.preview,l=e.fastMode,c=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(c=e.escapeChar),("string"!=typeof i||-1<a.BAD_DELIMITERS.indexOf(i))&&(i=","),n===i)throw new Error("Comment character same as delimiter");!0===n?n="#":("string"!=typeof n||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var h=0,d=!1;this.parse=function(e,a,u){if("string"!=typeof e)throw new Error("Input must be a string");var g=e.length,p=i.length,v=r.length,x=n.length,m=w(s),b=[],y=[],C=[],S=h=0;if(!e)return O();if(l||!1!==l&&-1===e.indexOf(t)){for(var k=e.split(r),L=0;L<k.length;L++){if(C=k[L],h+=C.length,L!==k.length-1)h+=r.length;else if(u)return O();if(!n||C.substring(0,x)!==n){if(m){if(b=[],T(C.split(i)),D(),d)return O()}else T(C.split(i));if(o&&o<=L)return b=b.slice(0,o),O(!0)}}return O()}for(var A=e.indexOf(i,h),E=e.indexOf(r,h),z=new RegExp(f(c)+f(t),"g"),P=e.indexOf(t,h);;)if(e[h]!==t)if(n&&0===C.length&&e.substring(h,h+x)===n){if(-1===E)return O();h=E+v,E=e.indexOf(r,h),A=e.indexOf(i,h)}else if(-1!==A&&(A<E||-1===E))C.push(e.substring(h,A)),h=A+p,A=e.indexOf(i,h);else{if(-1===E)break;if(C.push(e.substring(h,E)),I(E+v),m&&(D(),d))return O();if(o&&b.length>=o)return O(!0)}else for(P=h,h++;;){if(-1===(P=e.indexOf(t,P+1)))return u||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:h}),F();if(P===g-1)return F(e.substring(h,P).replace(z,t));if(t!==c||e[P+1]!==c){if(t===c||0===P||e[P-1]!==c){-1!==A&&A<P+1&&(A=e.indexOf(i,P+1)),-1!==E&&E<P+1&&(E=e.indexOf(r,P+1));var _=M(-1===E?A:Math.min(A,E));if(e.substr(P+1+_,p)===i){C.push(e.substring(h,P).replace(z,t)),e[h=P+1+_+p]!==t&&(P=e.indexOf(t,h)),A=e.indexOf(i,h),E=e.indexOf(r,h);break}var R=M(E);if(e.substring(P+1+R,P+1+R+v)===r){if(C.push(e.substring(h,P).replace(z,t)),I(P+1+R+v),A=e.indexOf(i,h),P=e.indexOf(t,h),m&&(D(),d))return O();if(o&&b.length>=o)return O(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:h}),P++}}else P++}return F();function T(e){b.push(e),S=h}function M(t){var i=0;if(-1!==t){var r=e.substring(P+1,t);r&&""===r.trim()&&(i=r.length)}return i}function F(t){return u||(void 0===t&&(t=e.substring(h)),C.push(t),h=g,T(C),m&&D()),O()}function I(t){h=t,T(C),C=[],E=e.indexOf(r,h)}function O(e){return{data:b,errors:y,meta:{delimiter:i,linebreak:r,aborted:d,truncated:!!e,cursor:S+(a||0)}}}function D(){s(O()),b=[],y=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return h}}function v(e){var t=e.data,i=n[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){r=!0,x(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:m,resume:m};if(w(i.userStep)){for(var a=0;a<t.results.data.length&&(i.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},s),!r);a++);delete t.results}else w(i.userChunk)&&(i.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!r&&x(t.workerId,t.results)}function x(e,t){var i=n[e];w(i.userComplete)&&i.userComplete(t),i.terminate(),delete n[e]}function m(){throw new Error("Not implemented.")}function b(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=b(e[i]);return t}function y(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return r&&(t.onmessage=function(e){var i=e.data;if(void 0===a.WORKER_ID&&i&&(a.WORKER_ID=i.workerId),"string"==typeof i.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(i.input,i.config),finished:!0});else if(t.File&&i.input instanceof File||i.input instanceof Object){var r=a.parse(i.input,i.config);r&&t.postMessage({workerId:a.WORKER_ID,results:r,finished:!0})}}),(c.prototype=Object.create(l.prototype)).constructor=c,(h.prototype=Object.create(l.prototype)).constructor=h,(d.prototype=Object.create(d.prototype)).constructor=d,(u.prototype=Object.create(l.prototype)).constructor=u,a}(),_=t({props:{value:{type:[String,Array,Object],default:null},columns:{type:Array,default:()=>[]},field:{type:String,default:""},type:{type:String,default:""},tableHeight:{type:Number,default:300},fixedTable:{type:Boolean,default:!1},renderChart:{type:Boolean,default:!1},importExport:{type:Boolean,default:!0},chartOptions:{type:Object,default:()=>({})}},components:{VGrid:y},emits:["input"],setup(e,{emit:t}){const o=i([]),l=i([]);let c=i(),h=i(0),d=i("");const u=i({numeric:new L("0,0")}),g=i(),f=i(),p=i(""),v=i(!0);function x(t,i){if(i?.fields.length){const t=i.fields.map((e=>({prop:e,name:e,autoSize:!0})));e.fixedTable||t.find((e=>"$$_action"===e.prop))||t.push({prop:"$$_action",name:"Actions",pin:"colPinEnd",readonly:!0,cellTemplate:(e,t)=>e("span",{style:{color:"red"},onClick:()=>{let e=l.value;e.splice(t.rowIndex,1),e.forEach((e=>{delete e.$$_action})),m(e)}},"Remove")}),o.value=t}l.value=t||[]}"json"===e.type&&r((()=>e.columns),(t=>{e.fixedTable||t.find((e=>"$$_action"===e.prop))||t.push({prop:"$$_action",name:"Actions",pin:"colPinEnd",readonly:!0,cellTemplate:(e,t)=>e("span",{style:{color:"red"},onClick:()=>{let e=l.value;e.splice(t.rowIndex,1),e.forEach((e=>{delete e.$$_action})),m(e)}},"Remove")}),o.value=t.map((e=>("numeric"===e.columnType&&e.format&&(e.cellTemplate=(t,i)=>t("span",{},E(i.model[i.prop]).format(e.format))),{...e,autoSize:!0})))}),{immediate:!0}),r((()=>e.value),(t=>{if("string"==typeof t){if("text"===e.type)try{const{data:e,meta:i}=P.parse(t,{header:!0,skipEmptyLines:!0,dynamicTyping:!0});x(e,i)}catch(e){console.log(e)}else if("json"===e.type)try{const e=JSON.parse(t);let i=[];if(Array.isArray(e))i=e,p.value="array";else if(e&&Object.keys(e).length){let t=Object.keys(e),r=e[t[0]].length;for(let n=0;n<r;n++){let r={};for(let i=0;i<t.length;i++){let s=t[i];r[s]=e[s][n]}i.push(r)}p.value="object"}else p.value="array";l.value=i||[]}catch(e){console.log(e)}}else{let e=[];if(Array.isArray(t))e=t,p.value="array";else if(t&&Object.keys(t).length){let i=Object.keys(t),r=t[i[0]].length;for(let n=0;n<r;n++){let r={};for(let e=0;e<i.length;e++){let s=i[e];r[s]=t[s][n]}e.push(r)}p.value="object"}else p.value="array";l.value=e,v.value&&(console.log("更新数据!!!",l.value),m(l.value),v.value=!1)}b(e.chartOptions)}),{immediate:!0,deep:!0});function m(i){if("json"===e.type){if("array"===p.value)t("input",JSON.stringify(i));else if("object"===p.value){let e={};o.value.map((t=>{e[t.prop]=[],i.forEach((i=>{e[t.prop].push(i[t.prop])}))})),delete e.$$_action,t("input",JSON.stringify(e))}}else if("text"===e.type){const e=P.unparse(i,{header:!0,skipEmptyLines:!0});t("input",e)}}function b(t={}){if(!e.renderChart)return;const{series:i,xaxis:r,yaxis:s}=t;if(!i||!r)return;const a={chart:{height:350},stroke:{width:2},...t};Array.isArray(i)&&(a.series=i.map((e=>({name:e.name,data:l.value.map((t=>Number(t[e.dataKey]))),type:e.type})))),r&&(a.xaxis={categories:l.value.map((e=>e[r.categoryKey]))}),n((()=>{f.value?f.value.updateOptions(a):(f.value=new C(g.value,a),f.value.render())}))}return s((()=>{b(e.chartOptions)})),a((()=>{f.value?.destroy()})),{columnTypes:u,dataList:l,columnList:o,vgrid:c,onBeforeEditStart:e=>{h.value=e.detail.rowIndex,d.value=e.detail.prop},onAfterEdit:async function(e){let t=await c.value.$el.getVisibleSource(),i=e.target.value;const r=o.value.find((e=>e.prop===d.value));r&&"numeric"===r.columnType&&(i=parseFloat(i)),t[h.value][d.value]=i,t.forEach((e=>{delete e.$$_action})),m(t)},onBeforeRange:async function(e){let t=await c.value.$el.getVisibleSource();t.forEach((e=>{delete e.$$_action})),m(t)},addRow:function(){const e={};o.value.forEach((t=>{e[t.prop]="numeric"===t.columnType?0:""})),l.value.push(e),m(l.value)},chartEl:g,doExport:function(){let t=l.value.map((e=>{const t=e;return delete t.$$_action,t}));const i=P.unparse(t);console.log("export csv content: ",i);const r=document.createElement("a");r.href=`data:text/csv;charset=utf-8,\ufeff${i}`,r.download=`${e.field}_${Date.now()}.csv`,r.click()},doImport:function(e){const t=e.target?.files;let i=t[0]||null;i&&(console.log("File Object",i),P.parse(i,{header:!0,skipEmptyLines:!0,dynamicTyping:!0,complete:function(e){console.log("File Parsing complete:",e),x(e.data||[],e.meta||{fields:[]}),setTimeout((()=>{m(l.value)}),300)}}))}}}});const R={class:"extension-fixtable-wrapper"},T={key:0,class:"toolbar"},M=p("Add Row"),F={key:0,class:"right"},I=p("Export"),O={class:"btn-import"},D=p("Import CSV"),H={class:"chart-wrap"},N={class:"chart-box"},X={ref:"chartEl",class:"time-series"};var Y=[],B=[];!function(e,t){if(e&&"undefined"!=typeof document){var i,r=!0===t.prepend?"prepend":"append",n=!0===t.singleTag,s="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(n){var a=Y.indexOf(s);-1===a&&(a=Y.push(s)-1,B[a]={}),i=B[a]&&B[a][r]?B[a][r]:B[a][r]=o()}else i=o();65279===e.charCodeAt(0)&&(e=e.substring(1)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(document.createTextNode(e))}function o(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var i=Object.keys(t.attributes),n=0;n<i.length;n++)e.setAttribute(i[n],t.attributes[i[n]]);var a="prepend"===r?"afterbegin":"beforeend";return s.insertAdjacentElement(a,e),e}}("\n.toolbar[data-v-64969d30]{\n display: flex;\n justify-content: space-between;\n margin-bottom: 15px;\n}\n.toolbar .right[data-v-64969d30]{\n display: flex;\n align-items: center;\n}\n.toolbar .btn-import[data-v-64969d30]{\n position: relative;\n margin-left: 15px;\n}\n.toolbar .btn-import #import-csv-file[data-v-64969d30]{\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n}\n.table-wrap[data-v-64969d30]{\n margin-bottom: 15px;\n height: 300px;\n}\n",{}),_.render=function(e,t,i,r,n,s){const a=o("v-button"),p=o("v-grid");return l(),c("div",R,[e.fixedTable?g("v-if",!0):(l(),c("div",T,[h(a,{small:"",onClick:e.addRow},{default:d((()=>[M])),_:1},8,["onClick"]),e.importExport?(l(),c("div",F,[h(a,{onClick:e.doExport,kind:"info",small:""},{default:d((()=>[I])),_:1},8,["onClick"]),u("div",O,[h(a,{kind:"info",small:""},{default:d((()=>[D])),_:1}),u("input",{id:"import-csv-file",ref:"fileInput",type:"file",accept:"text/csv",onChange:t[0]||(t[0]=(...t)=>e.doImport&&e.doImport(...t))},null,544)])])):g("v-if",!0)])),u("div",{class:"table-wrap",style:f({height:`${e.tableHeight}px`})},[h(p,{ref:"vgrid",range:"",autoSizeColumn:"",theme:"material",source:e.dataList,columns:e.columnList,columnTypes:e.columnTypes,onBeforeeditstart:e.onBeforeEditStart,onFocusout:e.onAfterEdit,onAfteredit:e.onAfterEdit,onBeforeaange:e.onBeforeRange},null,8,["source","columns","columnTypes","onBeforeeditstart","onFocusout","onAfteredit","onBeforeaange"])],4),u("div",H,[u("div",N,[u("div",X,null,512)])])])},_.__scopeId="data-v-64969d30",_.__file="src/interface.vue";var W={id:"interface-datagrid",name:"Data Grid",icon:"open_in_new",description:"Specify fixed columns to generate an editable table field.",component:_,group:"standard",types:["json","text"],options:({field:e})=>{const t=[{field:"tableHeight",name:"Table Height",type:"integer",meta:{width:"half",interface:"input",options:{placeholder:"Please enter table height"}}},{field:"fixedTable",name:"Fixed Table",type:"boolean",meta:{width:"half",interface:"boolean"},schema:{default_value:!1}},{field:"renderChart",name:"Show Chart",type:"boolean",meta:{width:"half",interface:"boolean"},schema:{default_value:!1}},{field:"importExport",name:"Import Export",type:"boolean",meta:{width:"half",interface:"boolean"},schema:{default_value:!0}},{field:"chartOptions",name:"Chart Options",type:"json",meta:{width:"full",interface:"input-code"},schema:{default_value:{chart:{height:350},series:[{name:"A SERIES NAME",dataKey:"power",type:"line"}],xaxis:{categoryKey:"time"},yaxis:{min:0}}}}],i={standard:[{field:"columns",name:"Columns",type:"json",meta:{width:"full",interface:"input-code"},schema:{default_value:[{prop:"time",name:"Time"},{prop:"power",name:"Power",columnType:"numeric"},{prop:"name",name:"Name"}]}}],advanced:t},r={standard:[],advanced:t};return"json"===e?.type?i:"text"===e?.type?r:void 0}};export{W as default};