1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./D9n1Xl4a.js","./DPjC8IT1.js","./Dx2Pl1Mx.js","./BP7RTDzE.js","./WIjkpkkH.js","./CvdbqwUr.js","./CphIH-ey.js","./VZ7XBmiG.js","./CNs_Ozdc.js","./N4KhDBTh.js","./DXI8vJjO.js","./Bc01MVs_.js","./B5K46fFb.js","./BDNMzG2s.js","./Df7FGaam.js","./D86Lqu5H.js","./mO3HmLSa.js","./DboyyPry.js","./BTRnQ8M3.js","./CtcJLFXu.js","./DHBU6QoI.js","./BplV1kGz.js","./_id_.HBHMprpg.css","./Bn1WWgDQ.js","./DoHpQtzW.js","./D8ve9GC5.js","./BW1PGRk6.js","./C3hIIIgR.js","./Dchjp3fi.js","./Ldhj9hkL.js","./1iXl2Uc8.js","./CXaO8aIr.js","./ud4ZPjgy.js","./CMzFn8Cb.js","./DAbSxyyY.js","./B6P6CHJU.js","./BMQUVzGw.js","./DBm2Z4xt.js","./1z6QUOMV.js","./B76ECJnY.js","./D4sPpzFx.js","./Dd9Jsmdu.js","./Ct0r0Zic.js","./Cj9fMxky.js","./RbOctE5K.js","./PZY3A2wS.js","./Dxo_iV3u.js","./PtZmG8Ol.js","./Da-YpWgk.js","./_id_.DmTnjPPa.css","./A1qqYFYm.js","./CLW-ytZz.js","./B1kV9CqG.js","./B7DZXgNp.js","./DgYfz5Ue.js","./DGmMw6FQ.js","./CNR-mND8.js","./B0uW9U2z.js","./BvZeUhwl.js","./BI0pQUd-.js","./w7yLfhod.js","./BX8oy436.js","./analytics.PCk4F4TX.css","./BD5CFgrw.js","./CcTcxAkM.js","./A3caYJvq.js","./D7S62WgB.js","./DRFxu423.js","./QpMujeLm.js","./DTMNoCz3.js","./BHxVYVCh.js","./CgUXjiKc.js","./DJPHWJzv.js","./BPB3alrf.js","./Bp83Ft19.js","./DBVZJBK5.js","./BCqeVWb2.js","./D8daQILl.js","./CsCq7dX9.js","./Cdz7HEEC.js","./BuqeJYzW.js","./Tw05gkKp.js","./buNDsuIH.js","./CkMDRbU9.js","./BeioayY8.js","./BIJnJDVL.js","./Cq3Ckp2b.js","./mfaWRTof.js","./DZtX0hMu.js","./OEJ1i7nO.js","./CWFNB158.js","./Qu1mNT3f.js","./G629BxEj.js","./g2HMTDZr.js","./Bu8ipp71.js","./frontpage-mag-1-cover-hero.BXGSpFFF.css","./H98Oar6C.js","./DgiWXRNX.js","./DdNpvm71.js","./Ts0eBEOg.js","./frontpage-mag-4-ticker-mosaic.mehsG07W.css","./C-iz66Z4.js","./CiC5zXic.js","./CAi1zBhP.js","./DDlbC3A2.js","./CNV83NEj.js","./BryEzMo8.js","./dmAnQ4Ze.js","./D1gi4uXD.js","./HomepageApproachExperiment.MBgKqC8d.css","./Dh680pCS.js","./mAGEYc-7.js","./B28YAC7X.js","./D9uvAcev.js","./D8obQYIn.js","./C9Inlbn6.js","./6btPRL0a.js","./s6F7cpg1.js","./DZ-owhbu.js","./xn7ZcdBd.js","./COUFCp_2.js","./DQSrMGPq.js","./BSSchigU.js","./CwL7KN54.js","./BxLUuJZT.js","./Ma_INhoO.js","./DxcmuXK_.js","./P2hrZMwB.js","./CNx2duw_.js","./Cbz8aQP0.js","./BqH8S87R.js","./C2jUcZzf.js","./leseprobe-direct.Cqv-JvMM.css","./DjLLWADV.js","./Ovk3Cb2P.js","./DDV0hhxN.js","./leseprobe-options.JSuZNJkH.css","./COxwZW3_.js","./leseprobe-sitewide.D-b_ssJy.css","./D4K8TaBp.js","./magazin-pairing-options.C2r87hiS.css","./B3lV6HNw.js","./F8CcX-Do.js","./BqjqtRPo.js","./members-bento.oq8e5PL-.css","./DcEUuDM8.js","./HiVS-jnO.js","./sM-MuoeG.js","./DgL7hDHn.js","./Dq_BpYjZ.js","./DFOQu82G.js","./EIHCzvk2.js","./TyndvQ7U.js","./BZWcisf9.js","./members-hub-cards.DBJoKMue.css","./DI4F2bdq.js","./CKbgM9tT.js","./7t5XGVG8.js","./KYJgrL_4.js","./BS5Fu-eE.js","./D4TdohAk.js","./BtLXojJB.js","./CgtjwZjp.js","./CuFmsDlL.js","./CVK8Ms_7.js","./DvnQAKN2.js","./WMt7zQKr.js","./C0aWjD9W.js","./DpykFwH_.js","./6juiqx8d.js","./BEuKFP4i.js","./BbIJ1oyr.js","./HotTopicsSection.DRbHFzt3.css","./B85vDej_.js","./zAlp6eV-.js","./CCfirust.js","./DiHoOaH-.js","./BzRoxtzB.js","./B-fmpkWA.js","./4SQR51LF.js","./CWCZw1ly.js","./B4BkOIzm.js","./CWbeSZqo.js","./DvdMGW5A.js","./DkjJVg2l.js","./RrSy4TsI.js","./p2fTsJT9.js","./CCJkeTD2.js","./CMeL5FEl.js","./BGlHZLoo.js","./C3XEu2Ia.js","./_slug_.B4C_q_Xp.css","./hJ1mwG5H.js","./BpmmRwZs.js","./MagazinFlipbook.BxYZ0UOb.css","./Cv8ypued.js","./snfCJqQP.js","./BM86Q7Fy.js","./Xk_yYwrK.js","./BhwO-H10.js","./Bb2Mf3eL.js","./SfSwitch.CCbYt9-_.css","./2bBDpo8e.js","./B8MMPh9a.js","./D1hfHgh2.js","./CsOb7WOC.js","./BzFirVrQ.js","./CuK7BC_w.js","./CuWd6w54.js","./DEFnJhsu.js","./C8DexUfb.js","./CNHt6Kko.js","./CPKs2sZ5.js","./OhkVPved.js","./CYpFcnzC.js","./w1nBSz6T.js","./-6R51kA7.js","./CxASBoEK.js","./B06TohtO.js","./DRuFiXin.js","./Dv3ytxI8.js","./CDkGxTiA.js","./CQN_R7F3.js","./CYIA16aa.js","./cePctBX0.js","./aa172Jrv.js","./BL_op2xO.js","./CfVkOtkg.js","./UCe8vqla.js","./BT9sra1Q.js","./BfZaTWqq.js","./tdkL2GkY.js","./ub4rX_QB.js","./FCO7xB4w.js","./emR2p7eP.js","./DeGDjy-M.js","./DTgot58G.js","./CKuEDeSJ.js","./hutQHhz8.js","./DXDPzMRF.js","./Ba8G5dq4.js","./CeVwGtl3.js","./BJtrv-KJ.js","./Dp1XkHG5.js","./CenRSJxf.js","./DydSvlfH.js","./DWkyU-Lz.js","./CcE30apY.js","./BFiKnFWN.js","./Z43RzX2C.js","./Dp8B-RTQ.js","./Jv5UjgdV.js","./i13ez_lm.js","./CFh3AHqX.js","./DQIKaa2T.js","./DVuxxxj7.js","./links.x1XGuNl0.css","./MjKCFbZD.js","./YPRfhcbB.js","./DDQgVzhe.js","./CmZHYh1T.js","./DbyDVk9Z.js","./D1l-JKTS.js","./members.BZHfHogG.css","./C8mbp-Np.js","./BY5wYpi7.js","./mythen.BstPwq_B.css","./DiJ77nls.js","./nWyVWl4I.js","./a4EZEJ0d.js","./CLkunbco.js","./J53naHon.js","./BDs2f2qt.js","./DGAiXXtY.js","./CIXiF2xB.js","./BXniLP7O.
1js","./Cv_5CFwM.js","./CZZ5dPfB.js","./CaoGWLf_.js","./DMyLoqnS.js","./Cro4m9q-.js","./Ds03KznF.js","./DngLClCs.js","./CGp0bdqE.js","./DSdywI2V.js","./BEnLn9RU.js","./CVQZwfJu.js","./C41FD9xh.js","./BCVlSjJN.js","./BC5voOIJ.js","./BbUQtyrd.js","./DYPEQ10p.js","./2rgp_lBN.js","./bh6n-7vv.js","./C7XIWd-p.js","./DVoLP4LE.js","./CboSkEsB.js","./_slug_.CeScpFN8.css","./idV3Ab5F.js","./DeJH6LFm.js","./BY7MYLxy.js","./BTnMuOf4.js","./miAOJMSG.js","./DZtqpLrX.js","./CF1ukobu.js","./N2dFl9nc.js","./CqwM40jx.js"])))=>i.map(i=>d[i]); 2import{_ as e,a as t,c as n,f as r,g as i,h as a,i as o,m as s,n as c,o as l,p as u,r as d,t as f,u as p,v as m,y as h}from"./DPjC8IT1.js";import{A as g,B as _,D as v,E as y,F as b,Gt as x,Ht as S,I as C,K as w,L as T,M as E,N as D,Nt as O,O as k,P as A,R as j,S as M,T as N,U as ee,Ut as te,V as ne,W as re,Wt as ie,Y as ae,a as oe,b as se,bt as ce,ct as le,d as ue,dt as de,f as fe,gt as pe,ht as me,i as he,it as ge,j as _e,l as P,lt as ve,mt as ye,nt as be,p as F,pt as I,r as xe,st as Se,tt as Ce,u as L,ut as we,v as Te,x as Ee,xt as R,y as De,yt as Oe}from"./Dx2Pl1Mx.js";import{i as ke,r as Ae}from"./CphIH-ey.js";import{C as je,D as Me,F as Ne,I as Pe,L as Fe,M as Ie,N as Le,P as Re,R as ze,a as Be,b as Ve,c as He,f as Ue,g as We,h as Ge,i as Ke,j as qe,n as Je,o as Ye,p as Xe,r as Ze,s as Qe,t as $e,u as et,x as tt,y as nt}from"./BP7RTDzE.js";import{t as rt}from"./DXI8vJjO.js";import{n as it}from"./Bc01MVs_.js";import{n as at,t as ot}from"./B6P6CHJU.js";import{A as st,B as ct,C as lt,D as ut,E as dt,F as ft,G as pt,H as mt,I as z,K as ht,L as gt,M as _t,N as vt,O as yt,P as bt,R as xt,S as St,T as Ct,U as wt,V as Tt,W as Et,Y as Dt,_ as Ot,a as kt,b as At,d as jt,f as Mt,g as Nt,h as Pt,i as Ft,j as It,k as Lt,l as Rt,m as zt,p as Bt,q as Vt,t as Ht,u as Ut,v as Wt,w as Gt,x as Kt,y as qt,z as Jt}from"./CvdbqwUr.js";import{i as Yt,o as Xt,s as Zt,t as Qt}from"./VZ7XBmiG.js";import{t as $t}from"./Dchjp3fi.js";import{i as en,n as tn,r as nn,t as rn}from"./B5K46fFb.js";var an=Object.create,on=Object.defineProperty,sn=Object.getOwnPropertyDescriptor,cn=Object.getOwnPropertyNames,ln=Object.getPrototypeOf,un=Object.prototype.hasOwnProperty,dn=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),fn=(e,t)=>{let n={};for(var r in e)on(n,r,{get:e[r],enumerable:!0});return t||on(n,Symbol.toStringTag,{value:`Module`}),n},pn=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=cn(t),a=0,o=i.length,s;a<o;a++)s=i[a],!un.call(e,s)&&s!==n&&on(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=sn(t,s))||r.enumerable});return e},mn=(e,t,n)=>(n=e==null?{}:an(ln(e)),pn(t||!e||!e.__esModule||!un.call(e,`default`)?on(n,`default`,{value:e,enumerable:!0}):n,e));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),`global`in globalThis||(globalThis.global=globalThis);var hn=h({docsBase:e,reporters:m});function gn(e,t){return t&&typeof e==`function`&&(e.key=t),e}var _n=/\\/g,vn=/</g,yn=/"/g,bn=/%\w+(?:\.\w+)?/g,xn=`%separator`;function Sn(e,t,n=!1){let r;if(t===`s`||t===`pageTitle`)r=e.pageTitle;else if(t.includes(`.`)){let n=t.indexOf(`.`);r=e[t.substring(0,n)]?.[t.substring(n+1)]}else r=e[t];if(r!==void 0)return n?(r||``).replace(_n,`\\\\`).replace(vn,`\\u003C`).replace(yn,`\\"`):r||``}function Cn(e,t,n,r=!1){if(typeof e!=`string`||!e.includes(`%`))return e;let i=e;try{i=decodeURI(e)}catch{}let a=i.match(bn);if(!a)return e;let o=e.includes(xn);return e=e.replace(bn,e=>{if(e===xn||!a.includes(e))return e;let n=Sn(t,e.slice(1),r);return n===void 0?e:n}).trim(),o&&(e=e.split(xn).map(e=>e.trim()).filter(e=>e!==``).join(n?` ${n} `:` `)),e}var wn=(e,t)=>e._w===t._w?e._p-t._p:e._w-t._w,Tn=e=>e.includes(`:key`)?e:e.split(`:`).join(`:key:`),En=gn({key:`aliasSorting`,hooks:{"tags:resolve":e=>{let t=!1;for(let n of e.tags){let r=n.tagPriority;if(!r)continue;let i=String(r);if(i.startsWith(`before:`)){let r=Tn(i.slice(7)),a=e.tagMap.get(r);a&&(typeof a.tagPriority==`number`&&(n.tagPriority=a.tagPriority),n._p=a._p-1,t=!0)}else if(i.startsWith(`after:`)){let r=Tn(i.slice(6)),a=e.tagMap.get(r);a&&(typeof a.tagPriority==`number`&&(n.tagPriority=a.tagPriority),n._p=a._p+1,t=!0)}}t&&(e.tags=e.tags.sort(wn))}}}),Dn=gn({key:`deprecations`,hooks:{"entries:normalize":({tags:e})=>{for(let t of e)t.props.children&&(t.innerHTML=t.props.children,delete t.props.children),t.props.hid&&(t.key=t.props.hid,delete t.props.hid),t.props.vmid&&(t.key=t.props.vmid,delete t.props.vmid),`body`
2in t.props&&(t.props.body&&(t.tagPosition=`bodyClose`),delete t.props.body),t.props.renderPriority!=null&&(t.tagPriority=t.props.renderPriority,delete t.props.renderPriority)}}});function On(e){return typeof e?.then==`function`}var kn=256;function An(e,t){if(t===e.length)return;if(t===kn){let n=Array(e.length),r=!1;for(;t<e.length;t++){let i=Mn(e[t]);n[t]=i,r||=On(i)}return r?n:void 0}let n=Mn(e[t]);if(On(n)){let r=Array(e.length);r[t]=n;for(let n=t+1;n<e.length;n++)r[n]=Mn(e[n]);return r}let r=An(e,t+1);return r&&(r[t]=n),r}function jn(e,t,n){if(n===t.length)return;if(n===kn){let r=Array(t.length),i=!1;for(;n<t.length;n++){let a=Mn(e[t[n]]);r[n]=a,i||=On(a)}return i?r:void 0}let r=Mn(e[t[n]]);if(On(r)){let i=Array(t.length);i[n]=r;for(let r=n+1;r<t.length;r++)i[r]=Mn(e[t[r]]);return i}let i=jn(e,t,n+1);return i&&(i[n]=r),i}function Mn(e){if(typeof e==`function`)return e;if(On(e))return Promise.resolve(e).then(Mn);if(Array.isArray(e)){let t=An(e,0);return t?Promise.all(t):e}if(e?.constructor===Object){let t=Object.keys(e),n=jn(e,t,0);if(n)return Promise.all(n).then(e=>Object.fromEntries(t.map((t,n)=>[t,e[n]])))}return e}var Nn=gn(e=>{let t=new WeakMap;return{key:`promises`,hooks:{"entries:resolve":n=>{for(let r=n.entries.length-1;r>=0;r--){let i=n.entries[r],a=i.input;if(t.get(i)===a){n.entries.splice(r,1);continue}let o=Mn(a);if(!On(o)){t.delete(i);continue}t.set(i,a),n.entries.splice(r,1),Promise.resolve(o).then(n=>{t.get(i)===a&&(t.delete(i),i.input=n,delete i._tags,e.invalidate?.())},()=>{t.get(i)===a&&t.delete(i)})}}}}},`promises`),Pn={meta:`content`,link:`href`,htmlAttrs:`lang`},Fn=[`innerHTML`,`textContent`];function In(e,t,n,r=!1){return typeof e==`string`&&e.includes(`%`)?Cn(e,t,n,r):e}var Ln=gn(e=>({key:`template-params`,hooks:{"tags:resolve":({tagMap:t,tags:n})=>{let r=t.get(`templateParams`)?.props||{},i=r.separator||`|`;delete r.separator,r.pageTitle=In(r.pageTitle||e._title||``,r,i);for(let e of n){if(e.processTemplateParams===!1)continue;let t=Pn[e.tag];if(t&&typeof e.props[t]==`string`)e.props[t]=In(e.props[t],r,i);else if(e.processTemplateParams||e.tag===`titleTemplate`||e.tag===`title`)for(let t of Fn)typeof e[t]==`string`&&(e[t]=In(e[t],r,i,e.tag===`script`&&typeof e.props.type==`string`&&e.props.type.endsWith(`json`)))}e._templateParams=r,e._separator=i},"tags:afterResolve":({tagMap:t})=>{let n=t.get(`title`);n?.textContent&&n.processTemplateParams!==!1&&(n.textContent=In(n.textContent,e._templateParams,e._separator))}}}),`template-params`),Rn=new Set([`link`,`style`,`script`,`noscript`]),zn=new Set([`title`,`titleTemplate`,`script`,`style`,`noscript`]),Bn=new Set([`base`,`meta`,`link`,`style`,`script`,`noscript`]),Vn=new Set([`title`,`base`,`htmlAttrs`,`bodyAttrs`,`meta`,`link`,`style`,`script`,`noscript`]),Hn=new Set([`base`,`title`,`titleTemplate`,`bodyAttrs`,`htmlAttrs`,`templateParams`]),Un=new Set([`key`,`tagPosition`,`tagPriority`,`tagDuplicateStrategy`,`innerHTML`,`textContent`,`processTemplateParams`]),Wn=new Set([`templateParams`,`htmlAttrs`,`bodyAttrs`]),Gn=new Set([`theme-color`,`google-site-verification`,`author`,`og:locale:alternate`,`og:image`,`og:video`,`og:audio`,`article:author`,`article:tag`,`book:author`,`book:tag`,`twitter:image`]),Kn={critical:-8,high:-1,low:2},qn=e=>typeof e==`number`?Number.isFinite(e):e;function Jn(e){return e===`__proto__`||e===`constructor`||e===`prototype`}var Yn=[`twitter`,`fediverse`],Xn=[`og`,`book`,`article`,`profile`,`fb`,`payment`],Zn=[`ogImage`,`ogVideo`,`ogAudio`,`twitterImage`],Qn=[`contentType`,`defaultStyle`,`xUaCompatible`],$n={articleExpirationTime:`article:expiration_time`,articleModifiedTime:`article:modified_time`,articlePublishedTime:`article:published_time`,bookReleaseDate:`book:release_date`,fbAppId:`fb:app_id`,ogAudioSecureUrl:`og:audio:secure_url`,ogAudioUrl:`og:audio`,ogImageSecureUrl:`og:image:secure_url`,ogImageUrl:`og:image`,ogSiteName:`og:site_name`,ogVideoSecureUrl:`og:video:secure_url`,ogVideoUrl:`og:video`,paymentExpiresAt:`payment:expires_at`,paymentSuccessUrl:`payment:success_url`,profileFirstName:`profile:first_name`,profileLastName:`profile:last_name`,profileUsername:`profile:username`,msapplicationConfig:`msapplication-Config`,msapplicationTileColor:`msapplication-TileColor`,msapplicationTileImage:`msapplication-TileImage`},er=/([A-Z])/g,tr=/^(?:og|twitter)/,nr={appleItunesApp:{unpack:{entrySeparator:`, `,resolve:({key:e,value:t})=>`${rr(e)}=${t}`}},refresh:{metaKey:`http-equiv`,unpack:{entrySeparator:`;`,resolve:({key:e,value:t})=>e===`seconds`?`${t}`:void 0}},robots:{unpack:{entrySeparator:`, `,resolve:({key:e,value:t})=>typeof t==`boolean`?rr(e):`${rr(e)}:${t}`}},contentSecurityPolicy:{metaKey:`http-equiv`,unpack:{entrySeparator:`; `,resolve:({key:e,value:t})=>`${rr(e)} ${t}`}},charset:{}};function rr(e){let t=e.replace(er,`-$1`).toLowerCase(),n=t.indexOf(`-`);return n===-1?t:Yn.includes(t.slice(0,n))||Xn.includes(t.slice(0,n))?e.replace(er,`:$1`).toLowerCase():t}function ir(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>String(t)!==`false`&&e))}function ar(e){return Array.isArray(e)?e.map(ar):!e||typeof e!=`object`?e:Object.fromEntries(Object.entries(e).map(([e,t])=>[rr(e),ar(t)]))}function or(e,t={}){let{entrySeparator:n=``,keyValueSeparator:r=``,wrapValue:i,resolve:a}=t;return Object.entries(e).map(([e,n])=>{if(a){let t=a({key:e,value:n});if(t!==void 0)return t}
2let o=typeof n==`object`?or(n,t):typeof n==`number`?n.toString():typeof n==`string`&&i?`${i}${n.replace(new RegExp(i,`g`),`\\${i}`)}${i}`:n;return`${e}${r}${o}`}).join(n)}function sr(e,t){let n=ir(t),r=rr(e),i=cr(r);return Gn.has(r)?dr(Object.fromEntries(Object.entries(n).map(([t,n])=>[`${e}${t===`url`?``:`${t[0].toUpperCase()}${t.slice(1)}`}`,n]))||{}).sort((e,t)=>(e[i]?.length||0)-(t[i]?.length||0)):[{[i]:r,...n}]}function cr(e){if(nr[e]?.metaKey===`http-equiv`||Qn.includes(e))return`http-equiv`;let t=rr(e),n=t.indexOf(`:`);return n===-1?`name`:Xn.includes(t.slice(0,n))?`property`:`name`}function lr(e){return $n[e]||rr(e)}function ur(e,t){return t===`refresh`?`${e.seconds};url=${e.url}`:or(ar(e),{keyValueSeparator:`=`,entrySeparator:`, `,resolve:({value:e,key:t})=>e===null?``:typeof e==`boolean`?t:void 0,...nr[t]?.unpack})}function dr(e){let t=[],n={};for(let[r,i]of Object.entries(e)){if(Array.isArray(i)){if(r===`themeColor`){i.forEach(e=>{typeof e==`object`&&e&&t.push({name:`theme-color`,...e})});continue}for(let e of i)if(typeof e==`object`&&e){let n=[],i=[];for(let[t,a]of Object.entries(e)){let e=dr({[`${r}${t===`url`?``:`:${t}`}`]:a});(t===`url`?n:i).push(...e)}t.push(...n,...i)}else t.push(...typeof e==`string`?dr({[r]:e}):sr(r,e));continue}if(typeof i==`object`&&i){if(Zn.includes(r)){let e=r.startsWith(`twitter`)?`twitter`:`og`,n=r.replace(tr,``).toLowerCase(),a=e===`twitter`?`name`:`property`;i.url&&t.push({[a]:`${e}:${n}`,content:i.url}),i.secureUrl&&t.push({[a]:`${e}:${n}:secure_url`,content:i.secureUrl});for(let[r,o]of Object.entries(i))r!==`url`&&r!==`secureUrl`&&t.push({[a]:`${e}:${n}:${r}`,content:o})}else Gn.has(rr(r))?t.push(...sr(r,i)):n[r]=ir(i)}else n[r]=i}let r=Object.entries(n).map(([e,t])=>{if(e===`charset`)return{charset:t===null?`_null`:t};let n=cr(e),r=lr(e),i=t===null?`_null`:typeof t==`object`?ur(t,e):typeof t==`number`?t.toString():t;return n===`http-equiv`?{"http-equiv":r,content:i}:{[n]:r,content:i}});return[...t,...r].map(e=>`content`in e&&e.content===`_null`?{...e,content:null}:e)}var fr=gn({key:`flatMeta`,hooks:{"entries:normalize":e=>{let t=!1,n=[],r=[];for(let i of e.tags){if(i.tag!==`_flatMeta`){n.push(i);continue}t=!0;for(let e of dr(i.props))r.push({...i,tag:`meta`,props:e})}if(t){for(let e of r)n.push(e);e.tags=n}}}});function pr(e={}){return gn(t=>(e.twitterCard!==!1&&t.push({meta:[{name:`twitter:card`,content:e.twitterCard||`summary_large_image`,tagPriority:`low`}]}),t.push({meta:[{property:`og:title`,tagPriority:`low`,"data-infer":``},{property:`og:description`,tagPriority:`low`,"data-infer":``}]}),{key:`infer-seo-meta`,hooks:{"tags:beforeResolve":({tagMap:n})=>{let r=t._titleTemplate||t._title,i=n.get(`meta:og:title`);i?.props[`data-infer`]!==void 0&&(typeof r==`function`&&(r=r(t._title)),r=qn(r)?String(r):void 0,i.props.content=e.ogTitle?e.ogTitle(r):r||``,i.processTemplateParams=!0);let a=n.get(`meta:description`)?.props?.content,o=qn(a)?String(a):void 0,s=n.get(`meta:og:description`);s?.props[`data-infer`]!==void 0&&(s.props.content=e.ogDescription?e.ogDescription(o):o||``,s.processTemplateParams=!0)}}}),`infer-seo-meta`)}function mr(e){let t=new a;for(let n in e||{})t.hook(n,e[n]);return t}function hr(e,t,n){if(e.hooks?._hooks?.[t]?.length)return e.hooks?.callHook(t,n)}var gr=/^(?:viewport|description|keywords|robots)$/,_r=[`name`,`property`,`http-equiv`];function vr(e){let t=e.indexOf(`:`);if(t===-1)return!1;let n=e.slice(t+1);return Gn.has(n)||n.startsWith(`og:image:`)||n.startsWith(`og:video:`)||n.startsWith(`og:audio:`)||n.startsWith(`twitter:image:`)}function yr(e){let{props:t,tag:n,key:r}=e;if(Hn.has(n))return n;if(n===`link`){if(t.rel===`canonical`)return`canonical`;if(t.rel===`alternate`&&t.hreflang)return`alternate:${t.hreflang}`}if(t.charset)return`charset`;if(n===`meta`)for(let e of _r){let n=t[e];if(n!==void 0)return`meta:${n}${(typeof n!=`string`||!n.includes(`:`))&&!gr.test(n)&&r?`:key:${r}`:``}`}return r?`${n}:key:${r}`:t.id?`${n}:id:${t.id}`:n===`link`&&t.rel&&t.href?`link:${t.rel}:${t.href}`:zn.has(n)&&(e.textContent||e.innerHTML)?`${n}:content:${e.textContent||e.innerHTML}`:void 0}function br(e){let t=e._h||e._d||e.textContent||e.innerHTML;if(t)return t;let n=Object.keys(e.props).sort(),r=`${e.tag}:`,i=``;for(let t of n)r+=`${i}${t}:${String(e.props[t])}`,i=`,`;return r}function xr(e,t,n){if(n===`_resolver`)return e;typeof e==`function`&&(!n||n!==`titleTemplate`&&!n.startsWith(`on`))&&(e=e());let r=t?t(n,e):e;if(Array.isArray(r)){let e;for(let n=0;n<r.length;n++){let i=xr(r[n],t);e?e[n]=i:i!==r[n]&&(e=r.slice(0,n),e[n]=i)}return e||r}if(r?.constructor===Object){let e;for(let n in r){let i=Jn(n),a=i?void 0:xr(r[n],t,n);if(!e&&(i||a!==r[n])){e={};for(let t in r){if(t===n)break;e[t]=r[t]}}e&&!i&&(e[n]=a)}return e||r}return r}var Sr=/[\s"'<>/=\x00-\x1F\x7F]/;function Cr(e,t){let n=e===`style`,r=n?new Map:new Set,i=e=>{if(e){if(n){let t=e.indexOf(`:`);t>0&&r.set(e.slice(0,t).trim(),e.slice(t+1).trim())}
2else e.split(` `).forEach(e=>e&&r.add(e))}};if(typeof t==`string`)(n?t.split(`;`):[t]).forEach(i);else if(Array.isArray(t))t.forEach(i);else if(t&&typeof t==`object`)for(let e in t){let a=t[e];a&&a!==`false`&&(n?r.set(e.trim(),String(a)):i(e))}return r}function wr(e,t){if(e.props=e.props||{},!t)return e;if(e.tag===`templateParams`)return e.props=t,e;let n=Bn.has(e.tag)||e.tag===`htmlAttrs`||e.tag===`bodyAttrs`;for(let r in t){if(Jn(r))continue;let i=r.startsWith(`data-`),a=n&&!Un.has(r),o=a&&!i?r.toLowerCase():r;if(a&&(!o||Sr.test(o)))continue;let s=t[r];if(s===null)e.props[o]=null;else if(r===`class`||r===`style`)e.props[r]=Cr(r,s);else if(Un.has(r)){if((r===`textContent`||r===`innerHTML`)&&typeof s==`object`){let n=t.type||`application/json`;(n.endsWith(`json`)||n===`speculationrules`||n===`importmap`)&&(e.props.type=n,e[r]=JSON.stringify(s))}else e[r]=s}else if(s!==void 0){let t=String(s),n=e.tag===`meta`&&o===`content`;e.props[o]=t===`true`||t===``?i||n?t:!0:!s&&i&&t===`false`?`false`:s}}return e}function Tr(e,t){let n;return t.length&&(n=(e,n)=>{for(let r=0;r<t.length;r++)n=t[r](e,n);return n},e=n(void 0,e)),xr(e,n)}function Er(e,t){let n=wr({tag:e,props:{}},typeof t==`object`&&typeof t!=`function`?t:{[e===`script`||e===`noscript`||e===`style`?`innerHTML`:`textContent`]:t});if(n.key&&Rn.has(n.tag)&&(n.props[`data-hid`]=n._h=n.key),n.tag===`script`&&typeof n.innerHTML==`object`&&(n.innerHTML=JSON.stringify(n.innerHTML),n.props.type=n.props.type||`application/json`),Array.isArray(n.props.content)){let e=[];for(let t of n.props.content)e.push({...n,props:{...n.props,content:t}});return e}return n}function Dr(e,t){if(Array.isArray(t))for(let n of t)e.push(n);else e.push(t)}function Or(e,t){if(!e)return[];typeof e==`function`&&(e=e()),e=Tr(e,t);let n=[];for(let t in e){let r=e[t];if(r!==void 0){if(Array.isArray(r))for(let e of r)Dr(n,Er(t,e));else Dr(n,Er(t,r))}}return n}var kr=/</g,Ar=/<\/script/g,jr=(e,t)=>e._w===t._w?e._p-t._p:e._w-t._w,Mr=()=>100;function Nr(e){for(let t in e)return!1;return!0}var Pr=/^tags:|:render/;function Fr(e,t){let n=(t[`entries:resolve`]?.length||0)+(t[`entries:normalize`]?.length||0);if(e._h!==n){e._h=n;for(let t of e.entries.values())delete t._tags}}function Ir(e){for(let t=0;t<e.length;t++){let n=e[t],r={...n.props};r.class instanceof Set&&(r.class=new Set(r.class)),r.style instanceof Map&&(r.style=new Map(r.style)),e[t]={...n,props:r}}}function Lr(e,t){let n=e.tags,r=0;for(let t of e.tagMap.values())if(Array.isArray(t))for(let e of t)n[r++]=e;else n[r++]=t;n.length=r,t&&n.sort(jr)}function Rr(e){let t=!1;for(let n of e.tags.sort(jr)){let r=n._d||br(n);if(!r)continue;let i=e.tagMap.get(r);if(!i){e.tagMap.set(r,n);continue}if((n.tagDuplicateStrategy||(Wn.has(n.tag)?`merge`:null)||(n.key&&n.key===i.key?`merge`:null))===`merge`){let t={...i.props};for(let e in n.props)t[e]=e===`style`?new Map([...i.props.style||new Map,...n.props[e]]):e===`class`?new Set([...i.props.class||[],...n.props[e]]):n.props[e];e.tagMap.set(r,{...n,props:t})}else n._p>>10==i._p>>10&&n.tag===`meta`&&vr(r)?(e.tagMap.set(r,Object.assign([...Array.isArray(i)?i:[i],n],n)),t=!0):(n._w===i._w?n._p>i._p:n._w<i._w)&&e.tagMap.set(r,n)}return t}function zr(e,t){let n=e.tagMap.get(`title`),r=e.tagMap.get(`titleTemplate`);if(t._title=n?.textContent,!r)return;let i=r.textContent;if(t._titleTemplate=i,!i)return;let a=typeof i==`function`?i(n?.textContent):i;typeof a==`string`&&!t.plugins.has(`template-params`)&&(a=a.replace(`%s`,n?.textContent||``)),n?a===null?e.tagMap.delete(`title`):e.tagMap.set(`title`,{...n,textContent:a}):e.tagMap.set(`titleTemplate`,{...r,tag:`title`,textContent:a})}function Br(e){let t=0;for(let n of e){let{innerHTML:r,tag:i,props:a}=n;if(Vn.has(i)&&(!Nr(a)||qn(r)||qn(n.textContent))&&(i!==`meta`||qn(a.content)||a[`http-equiv`]||a.charset)){if(i===`script`&&(r||n.textContent)){let e=String(a.type),t=e.endsWith(`json`)||e===`importmap`||e===`speculationrules`,i=e=>t?(typeof e==`string`?e:JSON.stringify(e)).replace(kr,`\\u003C`):typeof e==`string`?e.replace(Ar,`<\\/script`):e;n={...n},r&&(n.innerHTML=i(r)),n.textContent&&(n.textContent=i(n.textContent)),n._d=yr(n)}e[t++]=n}}return e.length=t,e}function Vr(e,t){let n=t?.tagWeight??e.resolvedOptions._tagWeight??Mr,r={tagMap:new Map,tags:[]},i=e.hooks?._hooks||{};Fr(e,i);for(let t of e.entries.values())t._pending!==void 0&&(t.input=t._pending,delete t._pending,delete t._tags,delete t._precomputedTags);let a;(i[`entries:resolve`]?.length||i[`entries:normalize`]?.length)&&(a=[...e.entries.values()],i[`entries:resolve`]?.length&&hr(e,`entries:resolve`,{entr
2ies:a,...r})),Fr(e,i);for(let t of a||e.entries.values()){let a=t._tags;if(!a){if(t._precomputedTags&&n===e.resolvedOptions._tagWeight&&!i[`entries:normalize`]?.length&&!i[`entries:resolve`]?.length&&(!t.options||Nr(t.options)))a=t._precomputedTags;else{if(a=Or(t.input,e.resolvedOptions.propResolvers||[]),t.options&&!Nr(t.options))for(let e of a)Object.assign(e,t.options);if(i[`entries:normalize`]?.length){let n={tags:a,entry:t};hr(e,`entries:normalize`,n),a=n.tags}for(let e=0;e<a.length;e++){let r=a[e];r._w=n(r),r._p=(t._i<<10)+e,r._d=yr(r),r._d||(r._h=br(r))}t._tags=a}}r.tags.push(...a)}for(let e in i)if(i[e]?.length&&Pr.test(e)){Ir(r.tags);break}let o=Rr(r);return zr(r,e),Lr(r,o),hr(e,`tags:beforeResolve`,r),hr(e,`tags:resolve`,r),hr(e,`tags:afterResolve`,r),Br(r.tags)}var Hr=Object.prototype.hasOwnProperty;function Ur(e,t){return Hr.call(e,t)}var Wr=`usehead`;function Gr(){if(y()){let e=v(Wr);if(e)return e}throw Error(`useHead() was called without provide context, ensure you call it through the setup() function.`)}function Kr(e){return{install(t){t.config.globalProperties.$unhead=e,t.config.globalProperties.$head=e,t.provide(Wr,e)}}.install}var qr=Object.assign((e,t)=>ve(t)?ce(t):t,{_static:!0});function Jr(e,t={}){return Yr(t.head||Gr(),e,t)}function Yr(e,t,n={}){let r=Se();if(r&&!r.active)return{patch(){},dispose(){},_i:-1};let i=I(!1);if(n.onRendered&&r){let e=n.onRendered;n={...n,onRendered:t=>r.run(()=>e(t))}}let a;return be(()=>{let r=i.value?{}:xr(t,qr);a?a.patch(r):a=e.push(r,n)}),M()&&(A(()=>{a.dispose()}),b(()=>{i.value=!0}),E(()=>{i.value=!1})),a}function Xr(e){if(e._flatMeta)return e;let t={};for(let n in e)Ur(e,n)&&n!==`title`&&n!==`titleTemplate`&&(t[n]=e[n]);return{title:e.title,titleTemplate:e.titleTemplate,_flatMeta:t}}function Zr(e={},t={}){(t.head||Gr()).use(fr);let n=Jr(Xr(e),t),r=n.patch;return n.__patched||=(n.patch=e=>r(Xr(e)),!0),n}function Qr(e,t){if(typeof t==`function`&&t.key&&e.plugins.has(t.key))return;let n=typeof t==`function`?t(e):t,r=n.key||String(e.plugins.size+1);if(!e.plugins.get(r)){e.plugins.set(r,n);for(let t in n.hooks||{})e.hooks?.hook(t,n.hooks[t])}}function $r(e,t={}){let n=!t.document,r=new Map,i={_entryCount:1,_h:0,plugins:new Map,resolvedOptions:t,ssr:n,entries:r,hooks:void 0,render:()=>e(i),use:e=>Qr(i,e),push(e,t){let a=t?._index??i._entryCount++,o=t?{...t}:{};delete o.head,delete o.onRendered,delete o._index;let s={_i:a,input:e,options:o};return r.set(a,s),{_i:a,dispose(){r.delete(a)},patch(e){n?(s.input=e,delete s._tags):s._pending=e,r.has(a)||r.set(a,s)}}}};return t.init?.forEach(e=>e&&i.push(e)),i}function ei(e){let t=e||o();return t.ssrContext?.head||t.runWithContext(()=>{if(y()){let e=v(`usehead`);if(!e)throw hn.NUXT_E6001();return e}})}function ti(e,t={}){return Jr(e,{head:t.head||ei(t.nuxt),...t})}function ni(e,t={}){return Zr(e,{head:t.head||ei(t.nuxt),...t})}var ri=h({docsBase:e,reporters:m}),ii=()=>location.protocol+`//`+location.host;function ai(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),vt(n,``)}return vt(n,e)+r+i}function oi(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=ai(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){let{history:e}=window;e.state&&e.replaceState(z({},e.state,{scroll:Ut()}),``)}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),{pauseListeners:c,listen:l,destroy:d}}function si(e,t,n,r=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:null}}function ci(e){let{history:t,location:n}=window,r={value:ai(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:ii()+e+r;
vendor: 4,408 bytes, line 2
2try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,z({},t.state,si(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=z({},i.value,t.state,{forward:e,scroll:Ut()});a(o.current,o,!0),a(e,z({},si(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function li(e){e=Ct(e);let t=ci(e),n=oi(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=z({location:``,base:e,go:r,createHref:jt.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function ui(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),li(e)}var di={type:0,value:``},fi=/[a-zA-Z0-9_]/;function pi(e){if(!e)return[[]];if(e===`/`)return[[di]];if(!xt(e))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case 0:c===`\\`?(r=n,n=4):c===`/`?(l&&d(),o()):c===`:`?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:fi.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`)}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var mi=`[^/]+?`,hi={sensitive:!1,strict:!1,start:!0,end:!0},gi=/[.+*?^${}()[\]/\\]/g;function _i(e,t){let n=z({},hi,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(gi,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||mi;if(u!==mi){s+=10;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===0)n+=e.value;else if(e.type===1){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(Jt(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=Jt(c)?c.join(`/`):c;if(!l){if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`)}n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function vi(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function yi(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=vi(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(bi(r))return 1;if(bi(i))return-1}return i.length-r.length}function bi(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var xi={strict:!1,end:!0,sensitive:!1};function Si(e,t,n){let r=_i(pi(e.path),n),i=z(r,{record:e,parent:t,children:[],alias:[]});return t&&!i.record.aliasOf==!t.record.aliasOf&&t.children.push(i),i}function Ci(e,t){let n=[],r=new Map;t=mt(xi,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Ti(e);s.aliasOf=r&&r.record;let l=mt(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;
vendor: 12,932 bytes, line 2
2for(let e of t)u.push(Ti(z({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&!xt(u)){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Si(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Di(d)&&o(e.name)),ji(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:wt}function o(e){if(Kt(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=ki(e,n);n.splice(t,0,e),e.record.name&&!Di(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw gt(1,{location:e});s=i.record.name,a=z(wi(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&wi(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw gt(1,{location:e,currentLocation:t});s=i.record.name,a=z({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Oi(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function wi(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Ti(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ei(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ei(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Di(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Oi(e){return e.reduce((e,t)=>z(e,t.meta),{})}function ki(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;yi(e,t[i])<0?r=i:n=i+1}let i=Ai(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function Ai(e){let t=e;for(;t=t.parent;)if(ji(t)&&yi(e,t)===0)return t}function ji({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Mi(e){let t=v(pt),n=v(Et),r=P(()=>{let n=R(e.to);return t.resolve(n)}),i=P(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(Gt.bind(null,i));if(o>-1)return o;let s=Li(e[t-2]);return t>1&&Li(i)===s&&a[a.length-1].path!==s?a.findIndex(Gt.bind(null,e[t-2])):o}),a=P(()=>i.value>-1&&Ii(n.params,r.value.params)),o=P(()=>i.value>-1&&i.value===n.matched.length-1&<(n.params,r.value.params));function s(n={}){if(Fi(n)){let n=t[R(e.replace)?`replace`:`push`](R(e.to)).catch(wt);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:P(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function Ni(e){return e.length===1?e[0]:e}var Pi=Ee({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:Mi,setup(e,{slots:t}){let n=de(Mi(e)),{options:r}=v(pt),i=P(()=>({[Ri(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[Ri(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&Ni(t.default(n));return e.custom?r:N(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function Fi(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Ii(e,t){for(let n in t){let r=t[n],i=e[n];if(Jt(r)){if(!Jt(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}else if(r!==i)return!1}return!0}function Li(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Ri=(e,t,n)=>e??t??n,zi=Ee({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=v(ht),i=P(()=>e.route||r.value),a=v(Dt,0),o=P(()=>{let e=R(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=P(()=>i.value.matched[o.value]);ne(Dt,P(()=>o.value+1)),ne(Tt,s),ne(ht,i);let c=I();return Ce(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!Gt(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return Bi(n.default,{Component:l,route:r});let u=o.props[a],d=u?u===!0?r.params:typeof u==`function`?u(r):u:null,f=N(l,z({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return Bi(n.default,{Component:f,route:r})||f}}});function Bi(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Vi=zi;function Hi(e){let t=Ci(e.routes,e),n=e.parseQuery||ut,r=e.stringifyQuery||It,i=e.history,a=bt(),o=bt(),s=bt(),c=pe(Rt),l=pe(0),u=Rt;At&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let d=ft.bind(null,e=>``+e),f=ft.bind(null,zt),p=ft.bind(null,Mt);function m(e,n){let r,i;Kt(e)?(r=t.getRecordMatcher(e),i=n):i=e;let a=t.addRoute(i,r);return l.value++,()=>{a(),l.value++}}function h(e){let n=t.getRecordMatcher(e);n&&(t.removeRoute(n),l.value++)}function g(){t.clearRoutes(),l.value++}function _(){return t.getRoutes().map(e=>e.record)}function v(e){return!!t.getRecordMatcher(e)}function y(e,a){if(l.value,typeof e==`string`){a||=e.startsWith(`/`)?Rt:c.value;let r=yt(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return z(r,o,{params:p(o.params),redirectedFrom:void 0,href:s})}a=z({},a||(e.path!=null&&e.path.startsWith(`/`)&&!(`name`in e&&e.name)?Rt:c.value));let o;if(e.path!=null)o=z({},e,{path:yt(n,e.path,a.path).path});else{let t=z({},e.params);for(let e in t)t[e]??delete t[e];o=z({},e,{params:f(t)}),a.params=f(a.params)}let s=t.resolve(o,a),u=e.hash||``;s.params=d(p(s.params));let m=_t(r,z({},e,{hash:Bt(u),path:s.path})),h=i.createHref(m);return z({fullPath:m,hash:u,query:r===It?dt(e.query):e.query||{}},s,{redirectedFrom:void 0,href:h})}function b(e){return typeof e==`string`?yt(n,e,c.value.path):z({},e)}function x(e,t){if(u!==e)return gt(8,{from:t,to:e})}function S(e){return T(e)}function C(e){return S(z(b(e),{replace:!0}))}function w(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=b(i):{path:i},i.params={}),z({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function T(e,t){let n=u=y(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,l=w(n,i);if(l)return T(z(b(l),{state:typeof l==`object`?z({},a,l.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&St(r,i,n)&&(f=gt(16,{to:d,from:i}),ae(i,i,!0,!1)),(f?Promise.resolve(f):O(d,i)).catch(e=>ct(e)?ct(e,2)?e:ie(e):ne(e,d,i)).then(e=>{if(e){if(ct(e,2))return T(z({replace:s},b(e.to),{state:typeof e.to==`object`?z({},a,e.to.state):a,force:o}),t||d)}else e=A(d,i,!0,s,a);return k(d,i,e),e})}function E(e,t){let n=x(e,t);return n?Promise.reject(n):Promise.resolve()}function D(e){let t=ce.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function O(e,t){let n,[r,i,s]=Pt(e,t);n=Nt(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(qt(r,e,t))});let c=E.bind(null,e,t);return n.push(c),ue(n).then(()=>{n=[];for(let r of a.list())n.push(qt(r,e,t));return n.push(c),ue(n)}).then(()=>{n=Nt(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(qt(r,e,t))});return n.push(c),ue(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter){if(Jt(r.beforeEnter))for(let i of r.beforeEnter)n.push(qt(i,e,t));else n.push(qt(r.beforeEnter,e,t))}return n.push(c),ue(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Nt(s,`beforeRouteEnter`,e,t,D),n.push(c),ue(n))).then(()=>{n=[];for(let r of o.list())n.push(qt(r,e,t));return n.push(c),ue(n)}).catch(e=>ct(e,8)?e:Promise.reject(e))}function k(e,t,n){s.list().forEach(r=>D(()=>r(e,t,n)))}function A(e,t,n,r,a){let o=x(e,t);if(o)return o;let s=t===Rt,l=At?history.state:{};n&&(r||s?i.replace(e.fullPath,z({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,ae(e,t,n,s),ie()}let j;function M(){j||=i.listen((e,t,n)=>{if(!le.listening)return;let r=y(e),a=w(r,le.currentRoute.value);if(a){T(z(a,{replace:!0,force:!0}),r).catch(wt);return}u=r;let o=c.value;At&&n.delta&&Lt(Wt(o.fullPath,n.delta)),O(r,o).catch(e=>ct(e,12)?e:ct(e,2)?(T(z(b(e.to),{force:!0}),r).then(e=>{ct(e,20)&&!n.delta&&n.type===`pop`&&i.go(-1,!1)}).catch(wt),Promise.reject()):(n.delta&&i.go(-n.delta,!1),ne(e,r,o))).then(e=>{e||=A(r,o,!1),e&&(n.delta&&!ct(e,8)?i.go(-n.delta,!1):n.type===`pop`&&ct(e,20)&&i.go(-1,!1)),k(r,o,e)}).catch(wt)})}let N=bt(),ee=bt(),te;function ne(e,t,n){ie(e);let r=ee.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function re(){return te&&c.value!==Rt?Promise.resolve():new Promise((e,t)=>{N.add([e,t])})}function ie(e){return te||(te=!e,M(),N.list().forEach(([t,n])=>e?n(e):t()),N.reset()),e}function ae(t,n,r,i){let{scrollBehavior:a}=e;if(!At||!a)return Promise.resolve();let o=!r&&Ot(Wt(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return _e().then(()=>a(t,n,o)).then(e=>t===c.value&&e&&st(e)).catch(e=>t===c.value&&ne(e,t,n))}let oe=e=>i.go(e),se,ce=new Set,le={currentRoute:c,listening:!0,addRoute:m,removeRoute:h,clearRoutes:g,hasRoute:v,getRoutes:_,resolve:y,options:e,push:S,replace:C,go:oe,back:()=>oe(-1),forward:()=>oe(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:ee.add,isReady:re,install(e){e.component(`RouterLink`,Pi),e.component(`RouterView`,Vi),e.config.globalProperties.$router=le,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>R(c)}),At&&!se&&c.value===Rt&&(se=!0,S(i.location).catch(e=>{}));let t={};for(let e in Rt)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(pt,le),e.provide(Et,ye(t)),e.provide(ht,c);let n=e.unmount;ce.add(e),e.unmount=function(){ce.delete(e),ce.size<1&&(u=Rt,j&&j(),j=null,c.value=Rt,se=!1,te=!1),n()}}};function ue(e){return e.reduce((e,t)=>e.then(()=>D(t)),Promise.resolve())}return le}var Ui=(()=>{let e={payload:!0,payload:!0},t={prerender:!1,payload:!0,payload:!0},n={prerender:!1,ssr:!0,payload:!1},r={prerender:!1,payload:!1},i={},a={__proto__:null,"/abnehmen/alkohol-und-abnehmen":{__proto__:null,"":[e]},"/abnehmen/basisdiaet":{__proto__:null,"":[e]},"/abnehmen/clean-eating":{__proto__:null,"":[e]},"/abnehmen/diaet-luege-1-haeufiges-essen-beschleunigt-den-stoffwechsel":{__proto__:null,"":[e]},"/abnehmen/diaet-luege-10-fruehstuecken-wie-ein-kaiser-mittagessen-wie-ein-koenig-und-abendessen-wie-ein-bettler":{__proto__:null,"":[e]},"/abnehmen/diaet-luege-2-kleinere-haeufigere-mahlzeiten-weniger-appetit":{__proto__:null,"":[e]},"/abnehmen/diaet-luege-3-viele-kleine-mahlzeiten-halten-den-blutzucker-stabil":{__proto__:null,"":[e]},"/abnehmen/diaet-luege-4-fasten-schaltet-den-stoffwechsel-auf-sparflamme":{__proto__:null,"":[e]},"/abnehmen/diaet-luege-5-eiweiss-alle-2-3-stunden-30g":{__proto__:null,"":[e]},"/abnehmen/diaet-luege-6-fasten-verursacht-verlust-von-muskelmasse":{__proto__:null,"":[e]},"/abnehmen/diaet-luege-7-nicht-zu-fruehstuecken-ist-schlecht-und-macht-dick":{__proto__:null,"":[e]},"/abnehmen/diaet-luege-8-fasten-erhoeht-kortisol":{__proto__:null,"":[e]},"/abnehmen/diaet-luege-9-training-mit-leeren-magen-ist-schlecht-man-verliert-muskeln-und-hat-keine-kraft":{__proto__:null,"":[e]},"/abnehmen/die-10-groessten-diaet-luegen":{__proto__:null,"":[e]},"/abnehmen/die-extremste-aber-machbarste-diaet-und-gesund":{__proto__:null,"":[e]},"/abnehmen/die-fuenf-mahlzeiten-am-tag-luege":{__proto__:null,"":[e]},"/abnehmen/effektive-massnahmen-um-waehrend-den-feiertagen-ferien-nicht-zuzunehmen":{__proto__:null,"":[e]}
2,"/abnehmen/eingeschlafener-kaputter-stoffwechsel-hungerstoffwechsel":{__proto__:null,"":[e]},"/abnehmen/eod-refeeds":{__proto__:null,"":[e]},"/abnehmen/fettverbrennungszone-fettverbrennungspuls":{__proto__:null,"":[e]},"/abnehmen/funktionen-von-training-beim-abnehmen":{__proto__:null,"":[e]},"/abnehmen/gewichtsabnahme-vs-fettabnahme":{__proto__:null,"":[e]},"/abnehmen/glp-1-revolution":{__proto__:null,"":[e]},"/abnehmen/insulin":{__proto__:null,"":[e]},"/abnehmen/insulinsensitivitaet-einschaetzen":{__proto__:null,"":[e]},"/abnehmen/intermittent-fasting-basics":{__proto__:null,"":[e]},"/abnehmen/intermittent-fasting-leangains-methode":{__proto__:null,"":[e]},"/abnehmen/jojo-effekt":{__proto__:null,"":[e]},"/abnehmen/lokale-fettverbrennung":{__proto__:null,"":[e]},"/abnehmen/low-carb-diaet":{__proto__:null,"":[e]},"/abnehmen/machen-kohlenhydrate-dick":{__proto__:null,"":[e]},"/abnehmen/maximales-kaloriendefizit":{__proto__:null,"":[e]},"/abnehmen/muskelmasse-halten-bei-diaet":{__proto__:null,"":[e]},"/abnehmen/muskeln-aufbauen-fett-abbauen":{__proto__:null,"":[e]},"/abnehmen/mythen-und-fakten-beim-abnehmen":{__proto__:null,"":[e]},"/abnehmen/nuechternes-cardio-vs-cardio-nach-dem-fruehstueck":{__proto__:null,"":[e]},"/abnehmen/plateaus-beim-abnehmen":{__proto__:null,"":[e]},"/abnehmen/problemstellen":{__proto__:null,"":[e]},"/abnehmen/psmf-schnellstmoegliche-fettabnahme-1-einfuehrung":{__proto__:null,"":[e]},"/abnehmen/refeeds-cheatdays":{__proto__:null,"":[e]},"/abnehmen/schnell-abnehmen":{__proto__:null,"":[e]},"/abnehmen/training-appetit":{__proto__:null,"":[e]},"/abnehmen/training-noetig-um-abzunehmen":{__proto__:null,"":[e]},"/abnehmen/unter-grundumsatz":{__proto__:null,"":[e]},"/abnehmen/warum-7000kcal-einsparen-um-1kg-fett-abzunehmen":{__proto__:null,"":[e]},"/ausdauer/hiit-oder-sprintintervalle-vo2max":{__proto__:null,"":[e]},"/ausdauer/zone-2":{__proto__:null,"":[e]},"/blog/3-advent-naschen-in-der-weihnachtszeit":{__proto__:null,"":[e]},"/blog/4-advent-noch-5x-training-in-2019-festessen-waage-keine-schuldgefuehle":{__proto__:null,"":[e]},"/blog/advent-advent-und-der-alkohol":{__proto__:null,"":[e]},"/blog/ankuendigung-ultimativer-abnehmen-guide":{__proto__:null,"":[e]},"/blog/bewegung-in-der-winterzeit":{__proto__:null,"":[e]},"/blog/burn-diaet-2":{__proto__:null,"":[e]},"/blog/corona-virus":{__proto__:null,"":[e]},"/blog/der-ultimative-abnehmen-guide-ist-ab-jetzt-erhaeltlich":{__proto__:null,"":[e]},"/blog/die-burn-diaet-ist-da":{__proto__:null,"":[e]},"/blog/die-high-speed-diaet-kurz-vor-dem-release-inhaltsverzeichnis-und-vorwort":{__proto__:null,"":[e]},"/blog/die-neue-burn-build-rekomposition":{__proto__:null,"":[e]},"/blog/die-neue-scifitness-app-ist-da":{__proto__:null,"":[e]},"/blog/die-optimale-dosis-vitamin-d-neuer-vitamin-d-rechner":{__proto__:null,"":[e]},"/blog/endspurt-sommerfigur-2020":{__proto__:null,"":[e]},"/blog/fitladies-goes-science-fitness":{__proto__:null,"":[e]},"/blog/fitness3-app-mit-vielen-neuerungen":{__proto__:null,"":[e]},"/blog/fokus-stoffwechsel":{__proto__:null,"":[e]},"/blog/massives-update-high-speed-diaet-2-0-hsd-2-edition":{__proto__:null,"":[e]},"/blog/mitmachen-gewicht-halten-nach-der-diaet-jojo-effekt-ja-oder-nein-welche-strategien-sind-die-besten":{__proto__:null,"":[e]},"/blog/neue-app-features-exakter-kalorienverbrauch-kcal-und-makroziele":{__proto__:null,"":[e]},"/blog/neue-auflage-des-fitladies-one-trainingsplans":{__proto__:null,"":[e]},"/blog/neue-kraftstandards-rechner-1rm-5rm-etc-anfaenger-fortgeschrittener-oder-elite":{__proto__:null,"":[e]},"/blog/neuer-exakter-kalorienrechner-wie-viele-kalorien-verbrauchst-du-wirklich":{__proto__:null,"":[e]},"/blog/neuer-protein-rechner":{__proto__:null,"":[e]},"/blog/neues-booklet-jetzt-da-tipps-tricks-fuer-haeufige-probleme-beim-abnehmen":{__proto__:null,"":[e]},"/blog/neues-design-das-erwartet-dich":{__proto__:null,"":[e]},"/blog/neues-design":{__proto__:null,"":[e]},"/blog/november-sale":{__proto__:null,"":[e]},"/blog/strengthscore":{__proto__:null,"":[e]},"/blog/studie-saettigungsvermoegen-verschiedener-lebensmittel":{__proto__:null,"":[e]},"/blog/supplement-guide-update":{__proto__:null,"":[e]},"/erfolge/6-wochen-high-speed-diaet-9kg-und-von-hosengroesse-36-auf-30":{__proto__:null,"":[e]},"/erfolge/8-kg-muskelmasse-mit-dem-fe-muskelaufbau-fem-max":{__proto__:null,"":[e]},"/erfolge/annika-50-hsd":{__proto__:null,"":[e]},"/erfolge/danielas-hsd-mini-cut":{__proto__:null,"":[e]},"/erfolge/erfolgsgeschichte-markus":{__proto__:null,"":[e]},"/erfolge/fabians-hsd":{__proto__:null,"":[e]},"/erfolge/high-speed-diaet-12-kg-abgenommen":{__proto__:null,"":[e]},"/erfolge/hsd-mini-cut-sophie":{__proto__:null,"":[e]},"/erfolge/katja-hsd":{__proto__:null,"":[e]},"/erfolge/koerperfettanteil-halbiert":{__proto__:null,"":[e]}
2,"/erfolge/louisa-high-speed-diaet":{__proto__:null,"":[e]},"/erfolge/max-hsd-burn":{__proto__:null,"":[e]},"/erfolge/meli-from-fat-to-fit":{__proto__:null,"":[e]},"/erfolge/psmf-erfolgsgeschichte-michael":{__proto__:null,"":[e]},"/erfolge/sarah-hsd":{__proto__:null,"":[e]},"/erfolge/sarah-sub1020-von-22-auf-17":{__proto__:null,"":[e]},"/erfolge/sub10-20-erfahrung-eugen":{__proto__:null,"":[e]},"/erfolge/sub1020-von-13-auf-8-kfa":{__proto__:null,"":[e]},"/erfolge/thomas-hsd":{__proto__:null,"":[e]},"/erfolge/ullis-rekomposition":{__proto__:null,"":[e]},"/erfolge/warum-die-high-speed-diaet-fuer-sarah-der-wendepunkt-war":{__proto__:null,"":[e]},"/ernaehrung/biologische-wertigkeit-protein-eiweiss":{__proto__:null,"":[e]},"/ernaehrung/eiweiss-max":{__proto__:null,"":[e]},"/ernaehrung/fett":{__proto__:null,"":[e]},"/ernaehrung/fette":{__proto__:null,"":[e]},"/ernaehrung/fleisch-klima":{__proto__:null,"":[e]},"/ernaehrung/fruktose-fruchtzucker":{__proto__:null,"":[e]},"/ernaehrung/iifym":{__proto__:null,"":[e]},"/ernaehrung/ist-eine-kalorie-eine-kalorie":{__proto__:null,"":[e]},"/ernaehrung/kalorien-und-makros-zaehlen":{__proto__:null,"":[e]},"/ernaehrung/kohlenhydrate-protein-eiweiss-fett-makronaehrstoffe":{__proto__:null,"":[e]},"/ernaehrung/kohlenhydrate":{__proto__:null,"":[e]},"/ernaehrung/mediterrane-ernaehrung":{__proto__:null,"":[e]},"/ernaehrung/mikronaehrstoffe":{__proto__:null,"":[e]},"/ernaehrung/rotes-fleisch":{__proto__:null,"":[e]},"/ernaehrung/warum-omega-3-aus-leinoel-oder-walnuessen-ala-kein-ersatz-fuer-fischoel-ist":{__proto__:null,"":[e]},"/ernaehrung/wie-viel-omega-3-o3-index-rechner":{__proto__:null,"":[e]},"/ernaehrung/wie-viel-protein-eiweiss-brauche-ich-pro-tag-die-optimale-menge":{__proto__:null,"":[e]},"/food/magerquark-einfach-cremig-machen":{__proto__:null,"":[e]},"/food/magerquark-guide":{__proto__:null,"":[e]},"/frauen/bauch-beine-po-nur-so-funktioniert-es-wirklich":{__proto__:null,"":[e]},"/frauen/cellulite":{__proto__:null,"":[e]},"/frauen/schnelles-abnehmen-gefaehrlich-fuer-frauen":{__proto__:null,"":[e]},"/frauen/strong-girls-trainingsplan":{__proto__:null,"":[e]},"/frauen/waage-gewicht":{__proto__:null,"":[e]},"/gesundheit/flexible-fitness-programm":{__proto__:null,"":[e]},"/gesundheit/kfa-health":{__proto__:null,"":[e]},"/haltung/rundruecken":{__proto__:null,"":[e]},"/koerper/1-kg-muskeln-verbrauchen-100-kcal-mythos-oder-fakt":{__proto__:null,"":[e]},"/koerper/angst-fettzunahme-muskelaufbau":{__proto__:null,"":[e]},"/koerper/ekto-endo-mesomorphe-koerpertypen":{__proto__:null,"":[e]},"/koerper/insulinsensitivitaet":{__proto__:null,"":[e]},"/koerper/kalorienbedarf":{__proto__:null,"":[e]},"/koerper/kalorienvebrauch-krafttraining":{__proto__:null,"":[e]},"/koerper/kalorienverbrauch":{__proto__:null,"":[e]},"/koerper/kcal-energiebilanz":{__proto__:null,"":[e]},"/koerper/kfa-koerperfettanteil":{__proto__:null,"":[e]},"/koerper/koerperfettanteil-kfa-bestimmen":{__proto__:null,"":[e]},"/koerper/stoffwechsel":{__proto__:null,"":[e]},"/koerper/warum-der-bmi-oft-falsch-liegt":{__proto__:null,"":[e]},"/krafttraining/muskelversagen":{__proto__:null,"":[e]},"/krafttraining/wiederholungsbereiche":{__proto__:null,"":[e]},"/listen/eiweisshaltige-lebensmittel-liste":{__proto__:null,"":[e]},"/listen/fettreiche-lebensmittel-liste":{__proto__:null,"":[e]},"/listen/kaliumreiche-lebensmittel":{__proto__:null,"":[e]},"/listen/kohlenhydratreiche-lebensmittel-liste":{__proto__:null,"":[e]},"/listen/magnesium-lebensmittel":{__proto__:null,"":[e]},"/muskelaufbau/10-wahrheiten-fuer-anfaenger":{__proto__:null,"":[e]},"/muskelaufbau/2er-split-varianten":{__proto__:null,"":[e]},"/muskelaufbau/5x5-training":{__proto__:null,"":[e]},"/muskelaufbau/ernaehrung-fuer-muskelaufbau":{__proto__:null,"":[e]},"/muskelaufbau/gute-eiweissquellen-fuer-muskelaufbau":{__proto__:null,"":[e]},"/muskelaufbau/kraft-muskelmasse":{__proto__:null,"":[e]},"/muskelaufbau/muskelaufbau-vegetarier-veganer-moeglich":{__proto__:null,"":[e]},"/muskelaufbau/myo-reps":{__proto__:null,"":[e]},"/muskelaufbau/ober-unterkoerper-2er-split-beispielplaene":{__proto__:null,"":[e]},"/muskelaufbau/ober-unterkoerper-2er-split":{__proto__:null,"":[e]},"/muskelaufbau/optimales-volumen":{__proto__:null,"":[e]},"/muskelaufbau/pausezeiten":{__proto__:null,"":[e]},"/muskelaufbau/perfekte-ernaehrung-vor-nach-und-waehrend-dem-training-fuer-muskelaufbau":{__proto__:null,"":[e]},"/muskelaufbau/sixpack":{__proto__:null,"":[e]},"/muskelaufbau/spezialisierungs-zyklen":{__proto__:null,"":[e]},"/muskelaufbau/sub1020-diaet-kommt":{__proto__:null,"":[e]}
2,"/muskelaufbau/unendliches-volumen-fuer-hypertrophie-i-dont-buy-it-die-pelland-studie-teil-2-2":{__proto__:null,"":[e]},"/muskelaufbau/unendliches-volumen-fuer-hypertrophie-teil-1-2":{__proto__:null,"":[e]},"/muskelaufbau/volumen-krafttraining":{__proto__:null,"":[e]},"/muskelaufbau/wie-schnell-wie-viel-muskeln-aufbauen":{__proto__:null,"":[e]},"/muskelaufbau/wiederholungen-ewdh":{__proto__:null,"":[e]},"/psychologie/dont-fuck-with-the-program":{__proto__:null,"":[e]},"/psychologie/meinungen-sind-egal":{__proto__:null,"":[e]},"/psychologie/motivation":{__proto__:null,"":[e]},"/qa/aline":{__proto__:null,"":[e]},"/research-reviews/das-geheimnis-erfolgreicher-langzeit-abnehmer":{__proto__:null,"":[e]},"/research-reviews/gesundheitseffekte-training":{__proto__:null,"":[e]},"/research-reviews/gewichte-muskelaufbau":{__proto__:null,"":[e]},"/research-reviews/krafttraining-ausdauer-bessere-lauf-oekonomie":{__proto__:null,"":[e]},"/research-reviews/low-carb-low-fat-oder-mediterrane-diaet":{__proto__:null,"":[e]},"/research-reviews/regeneration-1":{__proto__:null,"":[e]},"/research-reviews/regeneration-2":{__proto__:null,"":[e]},"/research-reviews/regeneration-3":{__proto__:null,"":[e]},"/research-reviews/vegan-gains":{__proto__:null,"":[e]},"/research-reviews/volumen-muskelaufbau":{__proto__:null,"":[e]},"/research-reviews/wie-oft-trainieren-pro-woche":{__proto__:null,"":[e]},"/rezepte/burger":{__proto__:null,"":[e]},"/rezepte/caprese-tomate-mozarella":{__proto__:null,"":[e]},"/rezepte/eiersalat":{__proto__:null,"":[e]},"/rezepte/forellenfilets":{__proto__:null,"":[e]},"/rezepte/kuechenausstattung-empfehlungen":{__proto__:null,"":[e]},"/rezepte/low-carb-high-protein-pizza":{__proto__:null,"":[e]},"/rezepte/magerquark-erdbeer-shake":{__proto__:null,"":[e]},"/rezepte/omelette":{__proto__:null,"":[e]},"/rezepte/protein-porridge":{__proto__:null,"":[e]},"/rezepte/protein-waldbeereneis":{__proto__:null,"":[e]},"/rezepte/thunfisch-huettenkaese-pizza":{__proto__:null,"":[e]},"/rezepte/tofu-gemuese-pasta":{__proto__:null,"":[e]},"/supplements/bcaas":{__proto__:null,"":[e]},"/supplements/beta-alanin":{__proto__:null,"":[e]},"/supplements/der-supp-o-mat":{__proto__:null,"":[e]},"/supplements/glutamin":{__proto__:null,"":[e]},"/supplements/gruener-tee-extrakt":{__proto__:null,"":[e]},"/supplements/high-speed-diaet-supplements":{__proto__:null,"":[e]},"/supplements/koffein":{__proto__:null,"":[e]},"/supplements/kreatin":{__proto__:null,"":[e]},"/supplements/magnesium":{__proto__:null,"":[e]},"/supplements/omega-3-fischoel":{__proto__:null,"":[e]},"/supplements/proteinpulver-uebersicht":{__proto__:null,"":[e]},"/supplements/supplements-muskelaufbau":{__proto__:null,"":[e]},"/supplements/supplements-vegetarier-veganer":{__proto__:null,"":[e]},"/supplements/teure-mikronaehrstoffpraeparate":{__proto__:null,"":[e]},"/supplements/vitamin-d":{__proto__:null,"":[e]},"/supplements/whey-protein":{__proto__:null,"":[e]},"/supplements/zink-zn":{__proto__:null,"":[e]},"/training/barbell-complexes":{__proto__:null,"":[e]},"/training/das-eigene-fitnessstudio-fuer-zu-hause":{__proto__:null,"":[e]},"/training/das-geheimnis-des-perfekten-trainingsplans":{__proto__:null,"":[e]},"/training/eigenen-trainingsplan-erstellen-teil1":{__proto__:null,"":[e]},"/training/eigenen-trainingsplan-erstellen-teil2":{__proto__:null,"":[e]},"/training/erkaeltung-und-training":{__proto__:null,"":[e]},"/training/grunduebungen":{__proto__:null,"":[e]},"/training/minimale-trainingsdosis-um-kraft-muskeln-und-ausdauer-zu-erhalten":{__proto__:null,"":[e]},"/training/muskelkater":{__proto__:null,"":[e]},"/training/richtiges-aufwaermen":{__proto__:null,"":[e]},"/training/trainingspause-1-2-wochen":{__proto__:null,"":[e]},"/training/wie-technik-grunduebungen-lernen":{__proto__:null,"":[e]},"/trainingsplaene/3x5-programm":{__proto__:null,"":[e]},"/trainingsplaene/531-wendler-automatische-trainingsplan-erstellung":{__proto__:null,"":[e]},"/trainingsplaene/531-wendler-trainingsplan":{__proto__:null,"":[e]},"/trainingsplaene/alternierender-ganzkoerper-trainingsplan":{__proto__:null,"":[e]},"/trainingsplaene/fl-home-trainingsplan":{__proto__:null,"":[e]},"/trainingsplaene/fl-one-trainingsplan":{__proto__:null,"":[e]},"/trainingsplaene/fl-start-trainingsplan":{__proto__:null,"":[e]},"/trainingsplaene/fl-two-trainingsplan":{__proto__:null,"":[e]},"/trainingsplaene/ganzkoerpertraining-trainingsplan":{__proto__:null,"":[e]},"/trainingsplaene/hsd-heimtraining-anfaenger-trainingsplan":{__proto__:null,"":[e]},"/trainingsplaene/leangains-trainingsplan":{__proto__:null,"":[e]},"/trainingsplaene/lyle-mcdonalds-bulking-routine":{__proto__:null,"":[e]}
2,"/trainingsplaene/starting-strength-mark-rippetoe":{__proto__:null,"":[e]},"/trainingsplaene/westside-for-skinny-bastards-ws4sb":{__proto__:null,"":[e]},"/trainingsplaene/xplode-home":{__proto__:null,"":[e]},"/trainingsplaene/xplode-one":{__proto__:null,"":[e]},"/trainingsplaene/xplode-two":{__proto__:null,"":[e]},"/uebungen/1-armiges-rudern":{__proto__:null,"":[e]},"/uebungen/1-beiniges-kreuzheben":{__proto__:null,"":[e]},"/uebungen/45-back-extensions":{__proto__:null,"":[e]},"/uebungen/abduktion":{__proto__:null,"":[e]},"/uebungen/armkreisen":{__proto__:null,"":[e]},"/uebungen/ausfallschritte":{__proto__:null,"":[e]},"/uebungen/band-walks":{__proto__:null,"":[e]},"/uebungen/bankdruecken":{__proto__:null,"":[e]},"/uebungen/bankziehen":{__proto__:null,"":[e]},"/uebungen/bauchpresse":{__proto__:null,"":[e]},"/uebungen/beinbeuger":{__proto__:null,"":[e]},"/uebungen/beinheben":{__proto__:null,"":[e]},"/uebungen/beinpresse":{__proto__:null,"":[e]},"/uebungen/beinstrecker":{__proto__:null,"":[e]},"/uebungen/bizeps":{__proto__:null,"":[e]},"/uebungen/brust-dehnen":{__proto__:null,"":[e]},"/uebungen/brustpresse":{__proto__:null,"":[e]},"/uebungen/bulgarische-kniebeugen":{__proto__:null,"":[e]},"/uebungen/crunches":{__proto__:null,"":[e]},"/uebungen/curls-to-press":{__proto__:null,"":[e]},"/uebungen/deadhangs":{__proto__:null,"":[e]},"/uebungen/dips":{__proto__:null,"":[e]},"/uebungen/dorsiflexion":{__proto__:null,"":[e]},"/uebungen/duckwalks":{__proto__:null,"":[e]},"/uebungen/einbeinige-kniebeuge":{__proto__:null,"":[e]},"/uebungen/externe-rotation":{__proto__:null,"":[e]},"/uebungen/facepulls":{__proto__:null,"":[e]},"/uebungen/fliegende":{__proto__:null,"":[e]},"/uebungen/foam-rolling":{__proto__:null,"":[e]},"/uebungen/fusssohle-ausrollen":{__proto__:null,"":[e]},"/uebungen/gestrecktes-kreuzheben":{__proto__:null,"":[e]},"/uebungen/glute-bridge":{__proto__:null,"":[e]},"/uebungen/glute-kick-backs":{__proto__:null,"":[e]},"/uebungen/goblet-kniebeuge":{__proto__:null,"":[e]},"/uebungen/good-morning":{__proto__:null,"":[e]},"/uebungen/groiners":{__proto__:null,"":[e]},"/uebungen/hintere-oberschenkel-dehnen":{__proto__:null,"":[e]},"/uebungen/hip-thrusts":{__proto__:null,"":[e]},"/uebungen/hueftbeuger-dehnen":{__proto__:null,"":[e]},"/uebungen/invertiertes-rudern":{__proto__:null,"":[e]},"/uebungen/kettlebell-swings":{__proto__:null,"":[e]},"/uebungen/kh-schraegbankdruecken":{__proto__:null,"":[e]},"/uebungen/klimmzuege":{__proto__:null,"":[e]},"/uebungen/kniebeugen":{__proto__:null,"":[e]},"/uebungen/kreuzheben":{__proto__:null,"":[e]},"/uebungen/kurzhantel-bankdruecken":{__proto__:null,"":[e]},"/uebungen/latissimus-dehnen":{__proto__:null,"":[e]},"/uebungen/latzug":{__proto__:null,"":[e]},"/uebungen/liegestuetzen":{__proto__:null,"":[e]},"/uebungen/planks":{__proto__:null,"":[e]},"/uebungen/pull-throughs":{__proto__:null,"":[e]},"/uebungen/reverse-flys":{__proto__:null,"":[e]},"/uebungen/rollovers":{__proto__:null,"":[e]},"/uebungen/rudern":{__proto__:null,"":[e]},"/uebungen/rumaenisches-kreuzheben":{__proto__:null,"":[e]},"/uebungen/schraegbankdruecken":{__proto__:null,"":[e]},"/uebungen/schulterdruecken":{__proto__:null,"":[e]},"/uebungen/seal-rows":{__proto__:null,"":[e]},"/uebungen/seitabheben":{__proto__:null,"":[e]},"/uebungen/seitheben":{__proto__:null,"":[e]},"/uebungen/seitliche-ausfallschritte":{__proto__:null,"":[e]},"/uebungen/squat-stretch":{__proto__:null,"":[e]},"/uebungen/step-up":{__proto__:null,"":[e]},"/uebungen/trap-bar-kreuzheben":{__proto__:null,"":[e]},"/uebungen/trapezius-ausrollen":{__proto__:null,"":[e]},"/uebungen/trizeps":{__proto__:null,"":[e]},"/uebungen/ueberzuege":{__proto__:null,"":[e]},"/uebungen/valsalva-manoever":{__proto__:null,"":[e]},"/uebungen/waden-ausrollen":{__proto__:null,"":[e]},"/uebungen/waden-dehnen":{__proto__:null,"":[e]},"/uebungen/wadenheben":{__proto__:null,"":[e]},"/uebungen/x-walks":{__proto__:null,"":[e]},"/1rm":{__proto__:null,"":[e]},"/about":{__proto__:null,"":[e]},"/agb":{__proto__:null,"":[e]},"/burn-diaet":{__proto__:null,"":[e]},"/datenschutzerklaerung":{__proto__:null,"":[e]},"/diaeten":{__proto__:null,"":[e]},"/download-anleitungen":{__proto__:null,"":[e]},"/ebook-kaufen":{__proto__:null,"":[e]},"/fitladies-one-trainingsplan":{__proto__:null,"":[e]},"/fitness":{__proto__:null,"":[t]},"/guides":{__proto__:null,"":[e]},"/high-speed-diaet-kochbuch":{__proto__:null,"":[e]}
2,"/high-speed-diaet":{__proto__:null,"":[e]},"/impressum":{__proto__:null,"":[e]},"/kalorienrechner":{__proto__:null,"":[e]},"/kfa-rechner":{__proto__:null,"":[e]},"/konsultation":{__proto__:null,"":[e]},"/kontakt":{__proto__:null,"":[e]},"/kostenloser-kurs":{__proto__:null,"":[e]},"/kraftstandards":{__proto__:null,"":[e]},"/kraftwerte":{__proto__:null,"":[e]},"/kurse":{__proto__:null,"":[t]},"/maenner":{__proto__:null,"":[e]},"/premium":{__proto__:null,"":[e]},"/programme":{__proto__:null,"":[e]},"/proteinrechner":{__proto__:null,"":[e]},"/rekomposition-hub":{__proto__:null,"":[e]},"/rekomposition":{__proto__:null,"":[e]},"/schick-uns-deine-erfolgsgeschichte-mit-bildern":{__proto__:null,"":[e]},"/shift50":{__proto__:null,"":[e]},"/start2":{__proto__:null,"":[e]},"/suppomat":{__proto__:null,"":[e]},"/supporter":{__proto__:null,"":[e]},"/test":{__proto__:null,"":[e]},"/test5":{__proto__:null,"":[e]},"/tipps-tricks-abnehmen":{__proto__:null,"":[e]},"/tools":{__proto__:null,"":[t]},"/transformation-komplettpaket":{__proto__:null,"":[e]},"/updates":{__proto__:null,"":[e]},"/vitd-rechner":{__proto__:null,"":[e]},"/welches-programm":{__proto__:null,"":[e]},"/xplode-one-trainingsplan":{__proto__:null,"":[e]},"/abnehmen":{__proto__:null,"":[t]},"/ausdauer":{__proto__:null,"":[e]},"/blog":{__proto__:null,"":[t]},"/erfolge":{__proto__:null,"":[e]},"/ernaehrung":{__proto__:null,"":[e]},"/food":{__proto__:null,"":[e]},"/frauen":{__proto__:null,"":[e]},"/gesundheit":{__proto__:null,"":[e]},"/haltung":{__proto__:null,"":[e]},"/koerper":{__proto__:null,"":[e]},"/krafttraining":{__proto__:null,"":[e]},"/listen":{__proto__:null,"":[e]},"/muskelaufbau":{__proto__:null,"":[t]},"/psychologie":{__proto__:null,"":[e]},"/qa":{__proto__:null,"":[e]},"/research-reviews":{__proto__:null,"":[e]},"/rezepte":{__proto__:null,"":[e]},"/supplements":{__proto__:null,"":[t]},"/training":{__proto__:null,"":[e]},"/trainingsplaene":{__proto__:null,"":[t]},"/uebungen":{__proto__:null,"":[e]},"/artikel":{__proto__:null,"":[t]},"":{__proto__:null,"":[e]},"/app-demo":{__proto__:null,"":[n]},"/magazin":{__proto__:null,"":[n]},"/api/briefings/admin-preview":{__proto__:null,"":[r]},"/api/briefings/editor-access":{__proto__:null,"":[r]},"/login":{__proto__:null,"":[n]},"/hero-preview":{__proto__:null,"":[r]},"/fehler":{__proto__:null,"":[i]},"/api/content/magazin/current":{__proto__:null,"":[e]},"/api/content/magazin/articles":{__proto__:null,"":[e]},"/api/content/articles":{__proto__:null,"":[e]},"/api/content/search-index":{__proto__:null,"":[e]},"/api/content/article-images":{__proto__:null,"":[e]},"/_nuxt":{__proto__:null,"":[i]}};return(t,i)=>{let o=[];
2i.charCodeAt(i.length-1)===47&&(i=i.slice(0,-1));let s=a[i];if(s===void 0&&i.charCodeAt(i.length-1)===47&&(s=a[i.slice(0,-1)]),s!==void 0){let e=s[t];if(e===void 0&&(e=s[``]),e!==void 0)for(let t=e.length-1;t>=0;t--)o.push({data:e[t]})}let c=i.split(`/`);c.length>1&&c[c.length-1]===``&&(c.pop(),i=i.slice(0,-1));let l=c.length;return l>1&&(c[1]===`kalorienrechner`?l>2&&c[2]===`ergebnis`&&o.push({data:n,params:{_:i.slice(26)}}):c[1]===`kfa-rechner`?l>2&&c[2]===`ergebnis`&&o.push({data:n,params:{_:i.slice(22)}}):c[1]===`proteinrechner`?l>2&&c[2]===`ergebnis`&&o.push({data:n,params:{_:i.slice(25)}}):c[1]===`app-demo`?o.push({data:n,params:{_:i.slice(10)}}):c[1]===`member-area`?o.push({data:n,params:{_:i.slice(13)}}):c[1]===`magazin`?o.push({data:n,params:{_:i.slice(9)}}):c[1]===`api`?(l>2&&(c[2]===`content`?l>3&&(c[3]===`magazin`?l>4&&c[4]===`teaser`&&o.push({data:r,params:{_:i.slice(28)}}):c[3]===`article`?o.push({data:e,params:{_:i.slice(21)}}):c[3]===`page`&&o.push({data:e,params:{_:i.slice(18)}})):c[2]===`briefings`?l>3&&c[3]===`admin-preview`&&o.push({data:r,params:{_:i.slice(29)}}):c[2]===`member`?o.push({data:r,params:{_:i.slice(12)}}):c[2]===`members`?o.push({data:r,params:{_:i.slice(13)}}):c[2]===`auth`?o.push({data:r,params:{_:i.slice(10)}}):c[2]===`admin`?o.push({data:r,params:{_:i.slice(11)}}):c[2]===`checkout`||c[2]===`comments`?o.push({data:r,params:{_:i.slice(14)}}):c[2]===`hooks`?o.push({data:r,params:{_:i.slice(11)}}):c[2]===`rechner`&&o.push({data:r,params:{_:i.slice(13)}})),o.push({data:r,params:{_:i.slice(5)}})):c[1]===`members`?o.push({data:n,params:{_:i.slice(9)}}):c[1]===`briefings`?l>2&&c[2]===`vorschau`&&o.push({data:n,params:{_:i.slice(20)}}):c[1]===`checkout`?o.push({data:n,params:{_:i.slice(10)}}):c[1]===`auth`?o.push({data:n,params:{_:i.slice(6)}}):c[1]===`admin`?o.push({data:n,params:{_:i.slice(7)}}):c[1]===`experiments`?o.push({data:r,params:{_:i.slice(13)}}):c[1]===`_archive`?o.push({data:r,params:{_:i.slice(10)}}):c[1]===`bmi-rechner-2-0`&&l>2&&c[2]===`ergebnis`&&o.push({data:n,params:{_:i.slice(26)}})),o.reverse()}})(),Wi=Ui,Gi=function(e){if(!e.includes(`%`))return e;let t=e.indexOf(`?`),n=t===-1?e:e.slice(0,t);try{return t===-1?decodeURI(n):decodeURI(n)+e.slice(t)}catch{return e}},Ki=(e,t)=>{if(typeof e!=`string`)return e;let n=Gi(e);return t?n.toLowerCase():n},qi=e=>Zt.sensitive?Ge({},...Ui(``,Ki(e,!1)).map(e=>e.data).reverse()):Ge({},...Wi(``,Ki(e,!0)).map(e=>e.data).reverse()),Ji=`modulepreload`,Yi=function(e,t){return new URL(e,t).href},Xi={},B=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Yi(t,n),t=s(t),t in Xi)return;Xi[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ji,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Zi=rt,Qi=qi,$i;function ea(){let e;return e=Zi(it(`builds/meta/${t().app.buildId}.json`),{responseType:`json`}).then(e=>{if(!e||typeof e!=`object`||!Array.isArray(e.prerendered))throw ri.NUXT_E5004();return e}),$i=e,e.catch(t=>{$i===e&&($i=void 0),ri.NUXT_E5002({cause:t})}),e}function ta(){return $i||ea()}function na(e){let t=typeof e==`string`?e:e.path;try{return Qi(t)}catch(e){return ri.NUXT_E5003({path:t,cause:e}),{}}}var ra=2**32-1,ia=ra-1,aa=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function oa(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getPrototypeOf(t)===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===aa}function sa(e){return Object.prototype.toString.call(e).slice(8,-1)}function ca(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)}function la(e){return!(!Number.isInteger(e)||e<0||e>ia)}function ua(e){return!(!Number.isInteger(e)||e<0||e>ra)}function da(e){if(e.length===0||e.length>1&&e.charCodeAt(0)===48)return!1;for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<48||n>57)return!1}return la(+e)}function fa(e){for(var t=e.length-1;t>=0&&!da(e[t]);t--);return t+1}function pa(e){let t=Object.keys(e);return t.length=fa(t),t}function ma(e){return Uint8Array.fromBase64(e).buffer}function ha(e){return Uint8Array.from(Buffer.from(e,`base64`)).buffer}function ga(e){let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}var _a=typeof Uint8Array.fromBase64==`function`,va=typeof process==`object`&&process.versions?.n
2ode!==void 0,ya=_a?ma:va?ha:ga;function ba(e,t){if(!t)return e;let n={};for(let r of Object.keys(e))n[r]=t[r]??e[r];return n}var xa=Object.freeze({kind:`not-plain`}),Sa=Object.freeze({kind:`symbol-keys`});Object.freeze({identify:e=>e,typeOf:e=>e===null?`null`:typeof e,toPrimitive:e=>e,tagOf:e=>sa(e),isThenable:e=>typeof e.then==`function`,toPromise:e=>Promise.resolve(e),unbox:e=>e.valueOf(),toISOString:e=>isNaN(e.getDate())?``:e.toISOString(),toStringValue:e=>e.toString(),regExpInfo:e=>({source:e.source,flags:e.flags}),valuesOf:e=>e,entriesOf:e=>e,viewInfo:e=>({buffer:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength,length:e.length,bufferByteLength:e.buffer.byteLength}),toArrayBuffer:e=>e,lengthOf:e=>e.length,hasOwn:(e,t)=>Object.hasOwn(e,t),indicesOf:e=>pa(e),shapeOf:e=>oa(e)?ca(e).length>0?Sa:{kind:Object.getPrototypeOf(e)===null?`null-proto`:`plain`,keys:Object.keys(e)}:xa,get:(e,t)=>e[t]});var Ca=Object.freeze({fromPrimitive:e=>e,fromISOString:e=>new Date(e),fromStringValue:(e,t)=>e===`URL`?new URL(t):e===`URLSearchParams`?new URLSearchParams(t):Temporal[e.slice(9)].from(t),fromArrayBuffer:e=>e,fromRegExpInfo:(e,t)=>new RegExp(e,t),fromViewInfo:(e,t,n,r)=>{let i=globalThis[e];return n===void 0?new i(t):new i(t,n,r)},box:e=>Object(e),createArray:e=>Array(e),createSparseArray:e=>{let t=[];return t[ia]=void 0,delete t[ia],t.length=e,t},createObject:()=>({}),createNullPrototypeObject:()=>Object.create(null),createSet:()=>new Set,createMap:()=>new Map,set:(e,t,n)=>{e[t]=n},addValue:(e,t)=>{e.add(t)},addEntry:(e,t,n)=>{e.set(t,n)}});function wa(e,t,n){return Ta(JSON.parse(e),t,n)}function Ta(e,t,n){let r=ba(Ca,n?.operations);if(typeof e==`number`)return s(e,!0);if(!Array.isArray(e)||e.length===0)throw Error(`Invalid input`);let i=e,a=Array(i.length),o=null;function s(e,n=!1){if(e===-1)return r.fromPrimitive(void 0);if(e===-3)return r.fromPrimitive(NaN);if(e===-4)return r.fromPrimitive(1/0);if(e===-5)return r.fromPrimitive(-1/0);if(e===-6)return r.fromPrimitive(-0);if(n||typeof e!=`number`)throw Error(`Invalid input`);if(e in a)return a[e];if(e>=i.length)throw Error(`Invalid input`);let c=i[e];if(!c||typeof c!=`object`)a[e]=r.fromPrimitive(c);else if(Array.isArray(c)){if(typeof c[0]==`string`){let n=c[0],l=t&&Object.hasOwn(t,n)?t[n]:void 0;if(l){let t=c[1];if(typeof t!=`number`&&(t=i.push(c[1])-1),Object.hasOwn(a,t))return a[e]=l(a[t]);if(o??=new Set,o.has(t))throw Error(`Invalid circular reference`);return o.add(t),a[e]=l(s(t)),o.delete(t),a[e]}switch(n){case`Date`:a[e]=r.fromISOString(c[1]);break;case`Set`:let t=r.createSet();a[e]=t;for(let e=1;e<c.length;e+=1)r.addValue(t,s(c[e]));break;case`Map`:let o=r.createMap();a[e]=o;for(let e=1;e<c.length;e+=2)r.addEntry(o,s(c[e]),s(c[e+1]));break;case`RegExp`:a[e]=r.fromRegExpInfo(c[1],c[2]);break;case`Object`:{let t=c[1];if(typeof i[t]==`object`&&i[t][0]!==`BigInt`)throw Error(`Invalid input`);a[e]=r.box(s(t));break}case`BigInt`:a[e]=r.fromPrimitive(BigInt(c[1]));break;case`null`:let l=r.createNullPrototypeObject();a[e]=l;for(let e=1;e<c.length;e+=2){if(c[e]===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");r.set(l,c[e],s(c[e+1]))}break;case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Float16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`BigInt64Array`:case`BigUint64Array`:case`DataView`:{if(i[c[1]][0]!==`ArrayBuffer`)throw Error(`Invalid data`);let t=s(c[1]);a[e]=r.fromViewInfo(n,t,c[2],c[3]);break}case`ArrayBuffer`:{let t=c[1];if(typeof t!=`string`)throw Error(`Invalid ArrayBuffer encoding`);a[e]=r.fromArrayBuffer(ya(t));break}case`URL`:case`URLSearchParams`:case`Temporal.Duration`:case`Temporal.Instant`:case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.PlainMonthDay`:case`Temporal.PlainYearMonth`:case`Temporal.ZonedDateTime`:a[e]=r.fromStringValue(n,c[1]);break;default:throw Error(`Unknown type ${n}`)}}else if(c[0]===-7){let t=c[1];if(!ua(t))throw Error(`Invalid input`);let n=r.createSparseArray(t);a[e]=n;for(let e=2;e<c.length;e+=2){let i=c[e];if(!la(i)||i>=t)throw Error(`Invalid input`);
2r.set(n,i,s(c[e+1]))}}else{let t=r.createArray(c.length);a[e]=t;for(let e=0;e<c.length;e+=1){let n=c[e];n!==-2&&r.set(t,e,s(n))}}}else{let t=r.createObject();a[e]=t;for(let e of Object.keys(c)){if(e===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");r.set(t,e,s(c[e]))}}return a[e]}return s(0)}async function Ea(e,t={}){return await Fa(e)&&await Aa(await ka(e,t),Na(e)?`default`:`force-cache`)||null}var Da=`_payload.json`,Oa=`_b`;async function ka(e,n={}){let r=new URL(e,`http://localhost`);if(r.host!==`localhost`||nt(r.pathname,{acceptRelative:!0}))throw at.NUXT_E7001({url:e});let i=t(),a=n.hash||(n.fresh?Date.now():i.app.buildId),o=i.app.cdnURL,s=o&&await Ia(e)?o:i.app.baseURL,c=je(s,r.pathname,Da);return Na(e)||(r.search=``),a&&r.searchParams.set(Oa,String(a)),c+r.search}async function Aa(e,t){try{{let n=await fetch(e,{cache:t});return n.ok?await za(await n.text()):null}}catch(t){at.NUXT_E7002({url:e,cause:t})}return null}function ja(e){if(e.redirect)return!1;if(e.prerender)return!0}function Ma(e){return new URL(e,`http://localhost`).pathname}function Na(e){return!!na({path:Ma(e)}).payload}async function Pa(e){e=Ma(e),e=e===`/`?e:e.replace(/\/$/,``);try{return(await ta()).prerendered.includes(e)}catch{return!1}}async function Fa(e=Ue().path){let t=na({path:Ma(e)});if(t.ssr===!1)return!1;let n=ja(t);return n===void 0?t.payload?!0:await Pa(e):n}async function Ia(e=Ue().path){let t=ja(na({path:Ma(e)}));return t===void 0?await Pa(e):t}var La=null;async function Ra(){if(La)return La;let e=document.getElementById(`__NUXT_DATA__`);if(!e)return{};let t=await za(e.textContent||``),n=e.dataset.src?await Aa(e.dataset.src,t.prerenderedAt?`force-cache`:`no-cache`):void 0;return La={...t,...n,...window.__NUXT__},La.config?.public&&(La.config.public=de(La.config.public)),La}async function za(e){return await wa(e,o()._payloadRevivers)}function Ba(e,t){o()._payloadRevivers[e]=t}function Va(e){try{return JSON.parse(e)}catch{return e}}var Ha=[[`NuxtError`,e=>Ke(e)],[`EmptyShallowRef`,e=>pe(e===`_`?void 0:e===`0n`?BigInt(0):Va(e))],[`EmptyRef`,e=>I(e===`_`?void 0:e===`0n`?BigInt(0):Va(e))],[`ShallowRef`,e=>pe(e)],[`ShallowReactive`,e=>ye(e)],[`Ref`,e=>I(e)],[`Reactive`,e=>de(e)]],Ua=d({name:`nuxt:revive-payload:client`,order:-30,async setup(e){let t,n;for(let[e,t]of Ha)Ba(e,t);Object.assign(e.payload,([t,n]=s(()=>e.runWithContext(Ra)),t=await t,n(),t)),delete window.__NUXT__}},1);function Wa(e,t){t.push(l),e.vueApp.use(t);let n=!0,r=()=>{n=!1,t.render()};t.hooks?.hook(`dom:beforeRender`,e=>{e.shouldRender=!n}),e.hooks.hook(`page:start`,()=>{n=!0}),e.hooks.hook(`page:finish`,()=>{e.isHydrating||r()}),e.hooks.hook(`app:error`,r),e.hooks.hook(`app:suspense:resolve`,r);let i=t.push.bind(t);t.push=((t,n)=>{let r=i(t,n),a=r.dispose.bind(r);return r.dispose=()=>{let t=e[`~transitionPromise`];t?t.finally(a):a()},r})}function Ga(e,t,n){let r=e.push,i=e;i.ssr=!1,i.hooks=t,i.dirty=!!i.dirty,i.use=e=>Qr(i,e),i.render=()=>n(i);function a(){t.callHook(`entries:updated`,i),i._b||i.render()}return i.invalidate=()=>{for(let e of i.entries.values())delete e._tags;i.dirty=!0,a()},i.push=(n,o)=>{let s=o?.onRendered?t.hook(`dom:rendered`,o.onRendered):void 0,c=r(n,o),l=e.entries.get(c._i);return l&&(l._o=n),i.dirty=!0,a(),{_i:c._i,patch(e){c.patch(e),i.dirty=!0,a()},dispose(){s?.(),e.entries.has(c._i)&&(c.dispose(),i.invalidate())}}},i}var Ka=/\s+/;function qa(e={}){return t=>Xa(t,e)}function Ja(e){for(let t of e.entries.values())if(t._pending!==void 0)return!0;return!1}function Ya(e,t){let n={_d:t,_t:t.title,_e:new Map([[`htmlAttrs`,t.documentElement],[`bodyAttrs`,t.body]]),_p:{},_s:{},_l:new Map};for(let t of e.entries.values())if(t._o!==void 0){let e=t._o;for(let t of[`bodyAttrs`,`htmlAttrs`]){let r=e[t]?.class;if(typeof r==`string`){let e=n._e.get(t);for(let i of r.split(Ka))i&&(n._p[`${t}:attr:class:${i}`]=()=>e.classList.remove(i))}}}return n}function Xa(e,t={}){let n=t.document||e.resolvedOptions.document,r=e._dom;if(!n||e._du||r&&r._d===n&&!e.dirty&&!Ja(e))return!1;let i=n.defaultView;e._du=!0;let a=!1;try{let o=function(e,t,n){d._s[e]=!n&&f[e]||t,delete f[e]},s=function(e,t,n,r,i,a){let s=`${e}:event:${t}`,c=d._l.get(s);if(c&&c[0]===a&&c[1]===n&&c[2]===r){o(s,c[4]);return}c?.[4]();let l=`data-${t}`,u=(e=>r.call(i,e)),f=()=>{a.removeEventListener(n,u),i.getAttribute(l)===``&&i.removeAttribute(l),d._l.get(s)?.[3]===u&&d._l.delete(s)};a.addEventListener(n,u),d._l.set(s,[a,n,r,u,f]),i.setAttribute(l,``),o(s,f,!0)},c=function({id:e,$el:t,tag:n}){if(d._e.set(e,t),!n.tag.endsWith(`Attrs`)){let r=n.textContent;r!=null&&r!==``&&(r!==t.textContent&&(t.textContent=r),o(`${e}:text`,()=>{t.textContent===r&&(t.textContent=``)},!0));let i=n.innerHTML;i!=null&&i!==``&&(i!==t.innerHTML&&(t.innerHTML=i),o(`${e}:html`,()=>{t.innerHTML===i&&(t.innerHTML=``)},!0));let a=`${e}:el`;o(a,f[a]||(()=>{t?.remove(),d._e.delete(e)}))}for(let r in n.props){let a=n.props[r];if(r[0]===`o`&&r[1]===`n`&&typeof a==`function`){let o=r.slice(2);t?.dataset?.[`${r}fired`]&&a.call(t,new((i?.Event)||Event)(o)),s(e,r,o,a,t,n.tag===`bodyAttrs`&&i?i:t);continue}let c=`${e}:attr:${r}`;if(r===`class`&&a)for(let e of a){let n=`${c}:${e}`;o(n,f[n]||(()=>t.classList.remove(e))),t.classList.contains(e)||t.classList.add(e)}else if(r===`style`&&a)for(let[e,n]of a){let r=`${c}:${e}`;o(r,f[r]||(()=>t.style.removeProperty(e))),t.style.setProperty(e,n)}else a!==!1&&a!==null&&(t.getAttribute(r)!==a&&t.setAttribute(r,a===!0?``:String(a)),o(c,f[c]||(()=>t.removeAttribute(r))))}},l={shouldRender:!0,tags:[]};if(hr(e,`dom:beforeRender`,l),!l.shouldRender)return!1;let u=r;if(u?._d!==n){if(u){for(let e in u._s)u._s[e]();for(let e in u._p)u._p[e]();u._s=u._p={},u._e.clear(),u._l.clear()}u=void 0}u?u._p=u._s:u=Ya(e,n),u._s={};let d=u,f=d._p,p=[],m={};e.dirty=!1;let h=Vr(e,t.tagWeight?{tagWeight:t.tagWeight}:void 0),g=[],_={};for(let e of h){let t=_[e._d]||0,r=(t?`${e._d}:${t}`:e._d)||e._h,i={tag:e,id:r,shouldRender:!0};if(e.tag===`meta`&&e._d&&vr(e._d)&&(_[e._d]=t+1),g.push(i),e.tag===`title`){n.title=e.textContent,o(`title:`,()=>n.title=d._t);continue}i.$el=d._e.get(r),i.$el?c(i):Bn.has(e.tag)&&p.push(i)}if(p.length){let e=new Set(d._e.values());for(let t of[...n.body.children,...n.head.children]){let n=t.tagName.toLowerCase();if(!Bn.has(n)||e.has(t))continue;let r={innerHTML:t.innerHTML};for(let e of t.getAttributeNames())r[e]=t.getAttribute(e);let i=wr({tag:n,props:{}},r);i.key=t.getAttribute(`data-hid`)||void 0;let a=yr(i)||br(i),o=a,s=1;for(;d._e.has(o);)o=`${a}:${s++}
2`;d._e.set(o,t)}}for(let e of p){let t=d._e.get(e.id);e.$el=t||n.createElement(e.tag.tag),c(e),t||(m[e.tag.tagPosition||`head`]??=n.createDocumentFragment()).appendChild(e.$el)}m.head&&n.head.appendChild(m.head),m.bodyOpen&&n.body.insertBefore(m.bodyOpen,n.body.firstChild),m.bodyClose&&n.body.appendChild(m.bodyClose);for(let e in f)f[e]();e._dom=d,a=!0,hr(e,`dom:rendered`,{renders:g})}catch(t){throw e.dirty=!0,t}finally{e._du=!1}return a&&(e.dirty||Ja(e))&&Xa(e,t),a}var Za=e=>typeof e.tagPriority==`number`?e.tagPriority:100+(Kn[e.tagPriority]||0);function Qa(e={}){e.document=e.document||(typeof window<`u`?document:void 0);let t=e.render||qa({document:e.document}),n=Ga($r(t,{document:e.document,propResolvers:e.propResolvers,_tagWeight:Za,init:[]}),mr(e.hooks),t);return e.plugins?.forEach(e=>n.use(e)),e.init?.forEach(e=>e&&n.push(e)),n}function $a(e={}){let t=qa(),n,r=0;return n=Qa({render:()=>{let e=++r;setTimeout(()=>{e===r&&t(n)},0)},...e}),n.install=Kr(n),n}var eo={disableDefaults:!0,plugins:[Dn,Nn,Ln,En]},to=d({name:`nuxt:head`,enforce:`pre`,setup(e){Wa(e,$a(eo))}}),no=/(:\w+)\([^)]+\)/g,ro=/(:\w+)[?+*]/g,io=/:\w+/g,ao=(e,t)=>t.path.replace(no,`$1`).replace(ro,`$1`).replace(io,t=>e.params[t.slice(1)]?.toString()||``),oo=(e,t)=>{let n=e.route.matched.find(t=>t.components?.default===e.Component.type),r=t??n?.meta.key??(n&&ao(e.route,n));return typeof r==`function`?r(e.route):r},so=(e,t)=>({default:()=>e?N(he,e===!0?{}:e,t):t});function co(e){return Array.isArray(e)?e:[e]}var lo=He(async e=>{let t,n;if(!e.meta?.validate)return;let r=([t,n]=s(()=>Promise.resolve(e.meta.validate(e))),t=await t,n(),t);if(r!==!0)return Ke({fatal:!0,status:r&&(r.status||r.statusCode)||404,statusText:r&&(r.statusText||r.statusMessage)||`Page Not Found: ${e.fullPath}`,data:{path:e.fullPath}})},1),uo=[{slug:`abnehmen-ab-50-was-sich-veraendert-hat`,issue:`2026-04`,number:1,order:2,aliases:[]},{slug:`stimmt-das-koffein-dehydriert-herz`,issue:`2026-04`,number:1,order:3,aliases:[]},{slug:`kollagen-fuer-die-sehnen`,issue:`2026-04`,number:1,order:4,aliases:[]},{slug:`whey-protein-vor-dem-laufen`,issue:`2026-04`,number:1,order:5,aliases:[]},{slug:`schlaf-das-staerkste-werkzeug-das-du-nicht-kaufen-kannst`,issue:`2026-04`,number:1,order:6,aliases:[]},{slug:`minimal-effektive-trainingsdosis`,issue:`2026-05`,number:2,order:2,aliases:[]},{slug:`protein-arterien`,issue:`2026-05`,number:2,order:3,aliases:[]},{slug:`krafttraining-fast-70-recomp`,issue:`2026-05`,number:2,order:4,aliases:[]},{slug:`schritte-pro-tag`,issue:`2026-05`,number:2,order:5,aliases:[]},{slug:`sattheits-teller-diaet`,issue:`2026-05`,number:2,order:6,aliases:[]},{slug:`carnivore-diaet-was-ist-davon-zu-halten`,issue:`2026-06`,number:3,order:2,aliases:[]},{slug:`who-bewegungs-check-150-minuten-reichen-nicht`,issue:`2026-06`,number:3,order:3,aliases:[`bewegungsempfehlungen-triffst-du-sie`]},{slug:`protein-verteilung-stellschraube-oder-kosmetik`,issue:`2026-06`,number:3,order:4,aliases:[]},{slug:`schrumpfen-im-alter-was-hilft`,issue:`2026-07`,number:4,order:2,aliases:[]},{slug:`diaetpausen-vs-durchgehende-diaet`,issue:`2026-07`,number:4,order:3,aliases:[]},{slug:`natrium-ausschwitzen-herzschutz`,issue:`2026-07`,number:4,order:4,aliases:[]}],fo={issue:`2026-08`,number:5,slug:`4-zu-3-intervallfasten`,id:`briefing-4-zu-3-intervallfasten`,href:`/briefings/4-zu-3-intervallfasten`,attributionId:`2026-08/4-zu-3-intervallfasten`};function po(e){if(/^\/magazin\/(?:2026-08|5|ausgabe-5)(?:\/4-zu-3-intervallfasten)?\/?$/.test(e))return fo.href;let t=e.match(/^\/magazin\/([^/]+)\/([^/]+)\/?$/);if(!t)return null;let n=uo.find(e=>(e.slug===t[2]||e.aliases.includes(t[2]))&&[e.issue,String(e.number),`ausgabe-${e.number}`].includes(t[1]));return n?`/briefings/${n.slug}`:null}function mo(e,t){let n=`/magazin/${e}/${t}`;return po(n)??n}var ho=[lo,He(e=>{let t=po(e.path);if(t)return et({path:t,query:e.query,hash:e.hash},{redirectCode:301})}),He(async e=>{let t=e.query._mvid,n=typeof t==`string`?t:Array.isArray(t)?t[0]:null;if(n&&/^[a-f0-9]{16}$/i.test(n)){let t=window;t._paq=t._paq||[],t._paq.push([`setVisitorId`,n.toLowerCase()]);let r={...e.query};return delete r._mvid,et({path:e.path,query:r,hash:e.hash},{replace:!0})}},1),He(e=>{let t=na({path:e.path});if(t.redirect){let n=t.redirect.includes(`#`)?t.redirect:t.redirect+e.hash;return nt(n,{acceptRelative:!0})?(window.location.href=n,!1):n}})],go={auth:()=>B(()=>import(`./D9n1Xl4a.js`),__vite__mapDeps([0,1,2,3]),import.meta.url)},_o={layout:!1},vo={layout:`salespage`},yo={layout:`salespage`},bo={layout:`salespage`},xo={layout:!1},So={layout:!1}
2,Co={layout:!1},wo={layout:!1},To={layout:!1},Eo={layout:!1},Do={layout:!1},Oo={layout:!1},ko={layout:!1},Ao={layout:!1},jo={layout:!1},Mo={layout:!1},No={layout:!1},Po={layout:!1},Fo={layout:!1},Io={layout:!1},Lo={layout:!1},Ro={layout:!1},zo={layout:!1},Bo={layout:!1},Vo={layout:!1},Ho={layout:!1},Uo={layout:!1},Wo={layout:!1},Go={layout:!1},Ko={layout:!1},qo={layout:!1},Jo={layout:!1},Yo={layout:!1},Xo={layout:!1},Zo={layout:!1},Qo={layout:!1},$o={layout:!1},es={layout:!1},ts={layout:!1},ns={layout:!1},rs={layout:!1},is={layout:!1},as={layout:!1},os={layout:!1},ss={layout:!1},cs={layout:!1},ls={layout:!1},us={layout:!1},ds={layout:!1},fs={layout:!1},ps={layout:!1},ms={layout:!1},hs={layout:!1},gs={layout:!1},_s={layout:!1},vs={layout:`member-integrated`},ys={layout:`member-integrated`},bs={layout:`app-demo`},xs={layout:`default`},Ss={layout:`member-integrated`},Cs={layout:`app-demo`},ws={layout:`salespage`},Ts={layout:`default`},Es={layout:`salespage`},Ds={layout:`default`},Os={layout:!1},ks={layout:`salespage`},As={layout:`salespage`},js={layout:!1},Ms={layout:`salespage`},Ns={layout:`salespage`},Ps={layout:`salespage`},Fs={layout:`default`},Is={layout:`default`},Ls={layout:`default`},Rs={layout:`default`},zs={layout:`default`},Bs={layout:`salespage`,salespageLoginHref:`/login`},Vs={layout:`default`},Hs={layout:`member-integrated`},Us={layout:`default`},Ws={layout:`default`},Gs={layout:`default`},Ks={layout:`salespage`},qs={layout:!1},Js={layout:!1,salespageLoginHref:`/login`},Ys={layout:`salespage`},Xs={layout:`default`},Zs={layout:`salespage`},Qs={layout:`default`},$s={layout:`salespage`},ec={layout:`default`},tc={layout:`default`},nc={layout:`salespage`};function rc(e){let t=e.length,n=0,r=0,i=8997,a=0,o=33826,s=0,c=40164,l=0,u=52210;for(;n<t;)i^=e.charCodeAt(n++),r=i*435,a=o*435,s=c*435,l=u*435,s+=i<<8,l+=o<<8,a+=r>>>16,i=r&65535,s+=a>>>16,o=a&65535,u=l+(s>>>16)&65535,c=s&65535;return{high:(u<<16|c)>>>0,low:(o<<16|i)>>>0}}function ic(e){let{high:t,low:n}=rc(e);return BigInt(t)<<32n|BigInt(n)}var ac=`0123456789abcdef`;Array.from({length:256},(e,t)=>ac.charAt(t>>4)+ac.charAt(t&15));function oc(e){return ic(e).toString(36)}function sc(e,t){if(e===null)return`L`;let n,r=0,i=e,a=typeof e;if(a!==`object`)return a===`number`?e-e===0?`n`+e:`L`:a===`string`?`s`+e:a===`bigint`?`n`+e:a===`boolean`?e?`T`:`F`:void 0;let o=Array.isArray(e);if(!o){if(e instanceof Date)return`d`+ +e;if(e instanceof RegExp)return`r`+e.source+e.flags}if(a=t.indexOf(e),~a)return`~`+(a+1);if(typeof e.toJSON==`function`&&!ArrayBuffer.isView(e)){if(e=e.toJSON(),typeof e!=`object`||!e)return sc(e,t);if(a=t.indexOf(e),~a)return`~`+(a+1);o=Array.isArray(e)}if(t.push(i),o)for(n=`a`;r<e.length;n+=(a=sc(e[r++],t))===void 0?`L`:a);else if(e instanceof Set){n=`e`;for(let r of e)n+=(a=sc(r,t))===void 0?`L`:a}else if(e instanceof Map)for(i=[...e.keys()],i.length>1&&i.sort(),n=`o`;r<i.length;r++)(a=sc(e.get(i[r]),t))!==void 0&&(n+=i[r]+a);else if(e[Symbol.toStringTag]===void 0||ArrayBuffer.isView(e))for(i=Object.keys(e),i.length>1&&i.sort(),n=`o`;r<i.length;r++)(a=sc(e[i[r]],t))!==void 0&&(n+=i[r]+a);else throw Error(`Unsupported value`);return t.pop(),n}function cc(e){return sc(e,[])??`U`}function lc(e){return oc(cc(e))}var uc=[{id:3,name:`Abnehmen`,slug:`abnehmen`,count:45,description:``,parent:0},{id:303,name:`Ausdauer`,slug:`ausdauer`,count:2,description:``,parent:0},{id:97,name:`Blog`,slug:`blog`,count:32,description:``,parent:0},{id:117,name:`Erfolgsgeschichten`,slug:`erfolge`,count:21,description:``,parent:0},{id:116,name:`Ernährung`,slug:`ernaehrung`,count:18,description:``,parent:0},{id:73,name:`Food`,slug:`food`,count:2,description:``,parent:0},{id:110,name:`Frauen`,slug:`frauen`,count:5,description:``,parent:0},{id:4,name:`Gesundheit`,slug:`gesundheit`,count:7,description:``,parent:0},{id:115,name:`Haltung`,slug:`haltung`,count:1,description:``,parent:0},{id:301,name:`Körper`,slug:`koerper`,count:12,description:``,parent:0},{id:305,name:`Krafttraining`,slug:`krafttraining`,count:2,description:``,parent:0},{id:158,name:`Listen`,slug:`listen`,count:5,description:``,parent:0},{id:5,name:`Muskelaufbau`,slug:`muskelaufbau`,count:27,description:``,parent:0},{id:152,name:`Psychologie`,slug:`psychologie`,count:3,description:``,parent:0},{id:304,name:`Q&A`,slug:`qa`,count:1,description:``,parent:0},{id:297,name:`Research Reviews`,slug:`research-reviews`,count:14,description:``,parent:0},{id:107,name:`Rezepte`,slug:`rezepte`,count:12,description:``,parent:0},{id:93,name:`Supplements`,slug:`supplements`,count:17,description:``,parent:0},{id:114,name:`Training`,slug:`training`,count:17,description:``,parent:0},{id:62,name:`Trainingspläne`,slug:`trainingsplaene`,count:17,description:``,parent:0},{id:80,name:`Uebungen`,slug:`uebungen`,count:72,description:``,parent:0},{id:119,name:`Wissenschaft`,slug:`wissenschaft`,count:0,description:``,parent:0}],dc=new Map(uc.map(e=>[e.id,e])),fc=new Map(uc.map(e=>[e.slug,e]));function pc(){function e(e){return dc.get(e)??null}function t(e){return fc.get(e)??null}function n(){return uc}function r(e,t){return t?`/${t}/${e}`:`/${e}`}function i(n){return n.primary_category_slug?t(n.primary_category_slug):n.categories&&n.categories.length>0?e(n.categories[0]):null}return{getCategory:e,getCategoryBySlug:t,getAllCategories:n,getArticleUrl:r,getPrimaryCategoryFromMeta:i}}function mc(){return $t(`/api/content/search-index`)}function hc(){return $t(`/api/content/article-images`)}function gc(){let{data:e}=rn(`article-images`,()=>hc());function t(t){if(!e.value)return null;let n=t.replace(/^https?:\/\/[^/]+/i,``).split(/[?#]/)[0].replace(/^\/+|\/+$/g,``).split(`/`).pop();return n?e.value[n]??null:null}return{getImageByPath:t}}
2function _c(e){return vc(e.replace(/<[^>]*>/g,``)).trim()}function vc(e){let t={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`,"–":`â`,"—":`â`,"‘":`â`,"’":`â`,"“":`â`,"”":`â`,"…":`â¦`," ":` `};return e.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&[a-z]+;/gi,e=>t[e]||e)}var yc={validate:e=>{let{getCategoryBySlug:t}=pc();return!!t(e.params.category)}},bc=[{name:`experiments-kurse-nobs-lektion-id`,path:`/experiments/kurse-nobs/lektion/:id()`,meta:_o||{},component:()=>B(()=>import(`./WIjkpkkH.js`),__vite__mapDeps([4,2,5,1,6,3,7,8]),import.meta.url)},{name:`bmi-rechner-2-0-ergebnis-id`,path:`/bmi-rechner-2-0/ergebnis/:id()`,component:()=>B(()=>import(`./N4KhDBTh.js`),__vite__mapDeps([9,2,3,1,10,11,7,5,6,12,13,14,15,16,17,18,19,20,21,22]),import.meta.url)},{name:`briefings-vorschau-slug`,path:`/briefings/vorschau/:slug()`,component:()=>B(()=>import(`./Bn1WWgDQ.js`),__vite__mapDeps([23,2,3,1]),import.meta.url)},{name:`checkout-success-orderId`,path:`/checkout/success/:orderId()`,component:()=>B(()=>import(`./DoHpQtzW.js`),__vite__mapDeps([24,2,3,1,7,5,6,17]),import.meta.url)},{name:`kalorienrechner-ergebnis-id`,path:`/kalorienrechner/ergebnis/:id()`,component:()=>B(()=>import(`./D8ve9GC5.js`),__vite__mapDeps([25,2,6,3,1,10,11,7,5,12,17,18,14,26,19,20,27,28,29,30,31,32,15,16,33,34,35,36,37,38,39,13,40,41,42,43,44,45,46]),import.meta.url)},{name:`kfa-rechner-ergebnis-id`,path:`/kfa-rechner/ergebnis/:id()`,component:()=>B(()=>import(`./PtZmG8Ol.js`),__vite__mapDeps([47,2,6,3,1,10,11,7,5,12,13,17,18,14,26,19,20,48,16,41,42,28,43,44,45,46,49]),import.meta.url)},{name:`proteinrechner-ergebnis-id`,path:`/proteinrechner/ergebnis/:id()`,component:()=>B(()=>import(`./A1qqYFYm.js`),__vite__mapDeps([50,2,3,1,10,11,7,5,6,12,14,51,52,27,28,29,30,31,32,16,17,18,19,20,41,42,43,44,45,46]),import.meta.url)},{name:`_archive-ab-40`,path:`/_archive/ab-40`,component:()=>B(()=>import(`./B7DZXgNp.js`),__vite__mapDeps([53,2]),import.meta.url)},{name:`_archive-demand-test`,path:`/_archive/demand-test`,component:()=>B(()=>import(`./DgYfz5Ue.js`),__vite__mapDeps([54,2]),import.meta.url)},{name:`_archive-entspannt-radikal`,path:`/_archive/entspannt-radikal`,component:()=>B(()=>import(`./DGmMw6FQ.js`),__vite__mapDeps([55,2]),import.meta.url)},{name:`_archive-entspannt-radikal-40`,path:`/_archive/entspannt-radikal-40`,component:()=>B(()=>import(`./CNR-mND8.js`),__vite__mapDeps([56,2]),import.meta.url)},{name:`_archive-flagshipkurs`,path:`/_archive/flagshipkurs`,meta:vo||{},component:()=>B(()=>import(`./B0uW9U2z.js`),__vite__mapDeps([57,2,8]),import.meta.url)},{name:`_archive-mein-fortschritt`,path:`/_archive/mein-fortschritt`,component:()=>B(()=>import(`./BvZeUhwl.js`),__vite__mapDeps([58,2]),import.meta.url)},{name:`_archive-member`,path:`/_archive/member`,meta:yo||{},component:()=>B(()=>import(`./BI0pQUd-.js`),__vite__mapDeps([59,2,8]),import.meta.url)},{name:`_archive-perflong`,path:`/_archive/perflong`,meta:bo||{},component:()=>B(()=>import(`./w7yLfhod.js`),__vite__mapDeps([60,2,8]),import.meta.url)},{name:`admin-analytics`,path:`/admin/analytics`,meta:xo||{},component:()=>B(()=>import(`./BX8oy436.js`),__vite__mapDeps([61,2,10,3,1,11,12,5,6,13,8,62]),import.meta.url)},{name:`experiments-app-shell-health`,path:`/experiments/app-shell-health`,meta:So||{},component:()=>B(()=>import(`./BD5CFgrw.js`),__vite__mapDeps([63,2,7,1,3,5,6,8,64,65,66,67]),import.meta.url)},{name:`experiments-app-shell-health-integrated`,path:`/experiments/app-shell-health-integrated`,meta:Co||{},component:()=>B(()=>import(`./QpMujeLm.js`),__vite__mapDeps([68,2,8,69,7,1,3,5,6,70,71,35,12,52,64,65,66,72]),import.meta.url)},{name:`experiments-app-shell-health-live`,path:`/experiments/app-shell-health-live`,meta:wo||{},component:()=>B(()=>import(`./BPB3alrf.js`),__vite__mapDeps([73,2,8,74,3,1,35,7,5,6,13,70,71,12,52,64,65,66,72]),import.meta.url)},{name:`experiments-app-shell-modell2`,path:`/experiments/app-shell-modell2`,meta:To||{},component:()=>B(()=>import(`./DBVZJBK5.js`),__vite__mapDeps([75,2,7,1,3,5,6,8,70,65,66,72,67,76]),import.meta.url)},{name:`experiments-app-shell-saeulen`,path:`/experiments/app-shell-saeulen`,meta:Eo||{},component:()=>B(()=>import(`./DTMNoCz3.js`).then(e=>e.n),__vite__mapDeps([69,2,7,1,3,5,6,8,70,71,35,12,52,64,65,66,72]),import.meta.url)},{name:`experiments-app-shell-status-hubs`,path:`/experiments/app-shell-status-hubs`,meta:Do||{},component:()=>B(()=>import(`./D8daQILl.js`),__vite__mapDeps([77,2,8,69,7,1,3,5,6,70,71,35,12,52,64,65,66,72]),import.meta.url)},{name:`experiments-calculator-header-options`,path:`/experiments/calculator-header-options`,meta:Oo||{},component:()=>B(()=>import(`./CsCq7dX9.js`),__vite__mapDeps([78,2,7,1,3,5,6,79,8]),import.meta.url)},{name:`experiments-calculator-suite-macro-flow`,path:`/experiments/calculator-suite-macro-flow`,meta:ko||{},component:()=>B(()=>import(`./BuqeJYzW.js`),__vite__mapDeps([80,2,8,81,82,7,1,3,5,6]),import.meta.url)},{name:`experiments-calculator-suite-options`,path:`/experiments/calculator-suite-options`,meta:Ao||{},component:()=>B(()=>import(`./CkMDRbU9.js`),__vite__mapDeps([83,2,7,1,3,5,6,8,81,82]),import.meta.url)},{name:`experiments-calculator-suite-plus-cockpit`,path:`/experiments/calculator-suite-plus-cockpit`,meta:jo||{},component:()=>B(()=>import(`./BeioayY8.js`),__vite__mapDeps([84,2,8,81,82,7,1,3,5,6]),import.meta.url)},{name:`experiments-calculator-suite-tools-hub`,path:`/experiments/calculator-suite-tools-hub`,meta:Mo||{},component:()=>B(()=>import(`./BIJnJDVL.js`),__vite__mapDeps([85,2,7,1,3,5,6,8,81,82]),import.meta.url)},{name:`experiments-content-hub-navigation`,path:`/experiments/content-hub-navigation`,meta:No||{},component:()=>B(()=>import(`./Cq3Ckp2b.js`),__vite__mapDeps([86,2,6,7,1,3,5,8]),import.meta.url)},{name:`experiments-frontpage-mag-1-cover-hero`,path:`/experiments/frontpage-mag-1-cover-hero`,component:()=>B(()=>import(`./mfaWRTof.js`),__vite__mapDeps([87,2,7,1,3,5,6,13,64,88,89,90,11,79,91,18,92,93,94,28,10,12,95]),import.meta.url)},{name:`experiments-frontpage-mag-2-editorial-grid`,path:`/experiments/frontpage-mag-2-editorial-grid`,component:()=>B(()=>import(`./H98Oar6C.js`),__vite__mapDeps([96,2,7,1,3,5,6,94,28,10,11,12]),import.meta.url)},{name:`experiments-frontpage-mag-3-bento`,path:`/experiments/frontpage-mag-3-bento`,component:()=>B(()=>import(`./DgiWXRNX.js`),__vite__mapDeps([97,2,7,1,3,5,6,89,94,28,10,11,12]),import.meta.url)},{name:`experiments-frontpage-mag-4-ticker-mosaic`,path:`/experiments/frontpage-mag-4-ticker-mosaic`,component:()=>B(()=>import(`./DdNpvm71.js`),__vite__mapDeps([98,2,6,7,1,3,5,13,89,94,28,10,11,12,99,100]),import.meta.url)},{name:`experiments-frontpage-mag-5-vertical-spread`,path:`/experiments/frontpage-mag-5-vertical-spread`,component:()=>B(()=>import(`./C-iz66Z4.js`),__vite__mapDeps([101,2,7,1,3,5,6,89,94,28,10,11,12]),import.meta.url)},{name:`experiments-gesundheitsprofil`,path:`/experiments/gesundheitsprofil`,meta:Po||{},component:()=>B(()=>import(`./CiC5zXic.js`),__vite__mapDeps([102,2,7,1,3,5,6,8,65,66,67]),import.meta.url)},{name:`experiments-gesundheitsprofil-modell2`,path:`/experiments/gesundheitsprofil-modell2`,meta:Fo||{},component:()=>B(()=>import(`./CAi1zBhP.js`),__vite__mapDeps([103,2,7,1,3,5,6,8,65,66,72,67,76]),import.meta.url)},{name:`experiments-gesundheitsprofil-saeulen`,path:`/experiments/gesundheitsprofil-saeulen`,meta:Io||{},component:()=>B(()=>
2import(`./DDlbC3A2.js`),__vite__mapDeps([104,2,7,1,3,5,6,8,66,72,67]),import.meta.url)},{name:`experiments-homepage-content-first`,path:`/experiments/homepage-content-first`,meta:Lo||{},component:()=>B(()=>import(`./CNV83NEj.js`),__vite__mapDeps([105,2,8,106,7,1,3,5,6,13,107,28,10,11,12,94,108,109]),import.meta.url)},{name:`experiments-homepage-hybrid-router`,path:`/experiments/homepage-hybrid-router`,meta:Ro||{},component:()=>B(()=>import(`./Dh680pCS.js`),__vite__mapDeps([110,2,8,106,7,1,3,5,6,13,107,28,10,11,12,94,108,109]),import.meta.url)},{name:`experiments-homepage-magazine-first`,path:`/experiments/homepage-magazine-first`,meta:zo||{},component:()=>B(()=>import(`./mAGEYc-7.js`),__vite__mapDeps([111,2,8,106,7,1,3,5,6,13,107,28,10,11,12,94,108,109]),import.meta.url)},{name:`experiments-homepage-tool-first`,path:`/experiments/homepage-tool-first`,meta:Bo||{},component:()=>B(()=>import(`./B28YAC7X.js`),__vite__mapDeps([112,2,8,106,7,1,3,5,6,13,107,28,10,11,12,94,108,109]),import.meta.url)},{name:`experiments-kcal-result-layout-options`,path:`/experiments/kcal-result-layout-options`,meta:Vo||{},component:()=>B(()=>import(`./D9uvAcev.js`),__vite__mapDeps([113,2,7,1,3,5,6,8]),import.meta.url)},{name:`experiments-kcal-result-recommended`,path:`/experiments/kcal-result-recommended`,meta:Ho||{},component:()=>B(()=>import(`./D8obQYIn.js`),__vite__mapDeps([114,2,7,1,3,5,6,8]),import.meta.url)},{name:`experiments-kurse-approaches`,path:`/experiments/kurse-approaches`,meta:Uo||{},component:()=>B(()=>import(`./C9Inlbn6.js`),__vite__mapDeps([115,2,8]),import.meta.url)},{name:`experiments-kurse-curriculum`,path:`/experiments/kurse-curriculum`,meta:Wo||{},component:()=>B(()=>import(`./6btPRL0a.js`),__vite__mapDeps([116,2,11,3,1,8,117,118]),import.meta.url)},{name:`experiments-kurse-diagnose-curriculum`,path:`/experiments/kurse-diagnose-curriculum`,meta:Go||{},component:()=>B(()=>import(`./xn7ZcdBd.js`),__vite__mapDeps([119,2,6,8,117,11,3,1]),import.meta.url)},{name:`experiments-kurse-kompass`,path:`/experiments/kurse-kompass`,meta:Ko||{},component:()=>B(()=>import(`./COUFCp_2.js`),__vite__mapDeps([120,2,6,8,117,11,3,1]),import.meta.url)},{name:`experiments-kurse-nobs`,path:`/experiments/kurse-nobs`,meta:qo||{},component:()=>B(()=>import(`./DQSrMGPq.js`),__vite__mapDeps([121,2,6,5,1,3,7,8,117,11]),import.meta.url)},{name:`experiments-kurse-problem-auswahl`,path:`/experiments/kurse-problem-auswahl`,meta:Jo||{},component:()=>B(()=>import(`./BSSchigU.js`),__vite__mapDeps([122,2,6,8,123,11,3,1]),import.meta.url)},{name:`experiments-kurse-problem-pfad`,path:`/experiments/kurse-problem-pfad`,meta:Yo||{},component:()=>B(()=>import(`./BxLUuJZT.js`),__vite__mapDeps([124,2,8,123,11,3,1]),import.meta.url)},{name:`experiments-kurse-wegweiser`,path:`/experiments/kurse-wegweiser`,meta:Xo||{},component:()=>B(()=>import(`./Ma_INhoO.js`),__vite__mapDeps([125,2,8,123,11,3,1]),import.meta.url)},{name:`experiments-leseprobe-direct`,path:`/experiments/leseprobe-direct`,meta:Zo||{},component:()=>B(()=>import(`./DxcmuXK_.js`),__vite__mapDeps([126,2,6,7,1,3,5,13,8,45,17,127,128,30,129,130,32,94,28,10,11,12,131,132]),import.meta.url)},{name:`experiments-leseprobe-options`,path:`/experiments/leseprobe-options`,meta:Qo||{},component:()=>B(()=>import(`./DjLLWADV.js`),__vite__mapDeps([133,2,6,13,8,127,128,30,129,130,32,36,18,134,28,10,3,1,11,17,26,37,135,19,136]),import.meta.url)},{name:`experiments-leseprobe-sitewide`,path:`/experiments/leseprobe-sitewide`,meta:$o||{},component:()=>B(()=>import(`./COxwZW3_.js`),__vite__mapDeps([137,2,6,13,8,127,128,30,129,130,32,94,28,10,3,1,11,12,5,131,135,18,36,19,134,17,26,37,138]),import.meta.url)},{name:`experiments-magazin-pairing-options`,path:`/experiments/magazin-pairing-options`,component:()=>B(()=>import(`./D4K8TaBp.js`),__vite__mapDeps([139,2,13,140]),import.meta.url)},{name:`experiments-member-calculator-results`,path:`/experiments/member-calculator-results`,meta:es||{},component:()=>B(()=>import(`./B3lV6HNw.js`),__vite__mapDeps([141,2,7,1,3,5,6,8]),import.meta.url)},{name:`experiments-member-courses`,path:`/experiments/member-courses`,component:()=>B(()=>import(`./F8CcX-Do.js`),__vite__mapDeps([142,2,7,1,3,5,6,92,131]),import.meta.url)},{name:`experiments-members-bento`,path:`/experiments/members-bento`,meta:ts||{},component:()=>B(()=>import(`./BqjqtRPo.js`),__vite__mapDeps([143,2,7,1,3,5,6,13,8,144]),import.meta.url)},{name:`experiments-members-command-center`,path:`/experiments/members-command-center`,meta:ns||{},component:()=>B(()=>import(`./DcEUuDM8.js`),__vite__mapDeps([145,2,8,146,7,1,3,5,6,94,28,10,11,12,147,64]),import.meta.url)},{name:`experiments-members-command-center-board`,path:`/experiments/members-command-center-board`,meta:rs||{},component:()=>B(()=>import(`./DgL7hDHn.js`),__vite__mapDeps([148,2,8,146,7,1,3,5,6,94,28,10,11,12,147,64]),import.meta.url)},{name:`experiments-members-command-center-focus`,path:`/experiments/members-command-center-focus`,meta:is||{},component:()=>B(()=>import(`./Dq_BpYjZ.js`),__vite__mapDeps([149,2,8,146,7,1,3,5,6,94,28,10,11,12,147,64]),import.meta.url)},{name:`experiments-members-command-center-radar`,path:`/experiments/members-command-center-radar`,meta:as||{},component:()=>B(()=>import(`./DFOQu82G.js`),__vite__mapDeps([150,2,8,146,7,1,3,5,6,94,28,10,11,12,147,64]),import.meta.url)},{name:`experiments-members-command-center-workbench`,path:`/experiments/members-command-center-workbench`,meta:os||{},component:()=>B(()=>import(`./EIHCzvk2.js`),__vite__mapDeps([151,2,8,146,7,1,3,5,6,94,28,10,11,12,147,64]),import.meta.url)},{name:`experiments-members-dashboard`,path:`/experiments/members-dashboard`,meta:ss||{},component:()=>B(()=>import(`./TyndvQ7U.js`),__vite__mapDeps([152,2,7,1,3,5,6,8,147,64]),import.meta.url)},{name:`experiments-members-hub-cards`,path:`/experiments/members-hub-cards`,meta:cs||{},component:()=>B(()=>import(`./BZWcisf9.js`),__vite__mapDeps([153,2,6,7,1,3,5,13,8,154]),import.meta.url)}
2,{name:`experiments-members-personal-feed`,path:`/experiments/members-personal-feed`,meta:ls||{},component:()=>B(()=>import(`./DI4F2bdq.js`),__vite__mapDeps([155,2,7,1,3,5,6,8]),import.meta.url)},{name:`experiments-nav-app-shell`,path:`/experiments/nav-app-shell`,meta:us||{},component:()=>B(()=>import(`./CKbgM9tT.js`),__vite__mapDeps([156,2,7,1,3,5,6,8,64,157,65]),import.meta.url)},{name:`experiments-nav-mein-sf-rail`,path:`/experiments/nav-mein-sf-rail`,meta:ds||{},component:()=>B(()=>import(`./KYJgrL_4.js`),__vite__mapDeps([158,2,6,7,1,3,5,8]),import.meta.url)},{name:`experiments-nav-member-area`,path:`/experiments/nav-member-area`,meta:fs||{},component:()=>B(()=>import(`./BS5Fu-eE.js`),__vite__mapDeps([159,2,6,7,1,3,5,8,64,157,65]),import.meta.url)},{name:`experiments-protein3`,path:`/experiments/protein3`,meta:ps||{},component:()=>B(()=>import(`./D4TdohAk.js`),__vite__mapDeps([160,2,8]),import.meta.url)},{name:`experiments-protein4`,path:`/experiments/protein4`,meta:ms||{},component:()=>B(()=>import(`./BtLXojJB.js`),__vite__mapDeps([161,2,8]),import.meta.url)},{name:`experiments-sendjay-native-checkout`,path:`/experiments/sendjay-native-checkout`,meta:hs||{},component:()=>B(()=>import(`./CgtjwZjp.js`),__vite__mapDeps([162,2,6,3,1,10,11,7,5,12,17,8,127,128,30,129,130,32]),import.meta.url)},{name:`experiments-startpage-hero-cta-options`,path:`/experiments/startpage-hero-cta-options`,meta:gs||{},component:()=>B(()=>import(`./CuFmsDlL.js`),__vite__mapDeps([163,2,6,7,1,3,5,8]),import.meta.url)},{name:`experiments-startpage-hero-editorial`,path:`/experiments/startpage-hero-editorial`,component:()=>B(()=>import(`./CVK8Ms_7.js`),__vite__mapDeps([164,2,7,1,3,5,6,79,165]),import.meta.url)},{name:`experiments-startpage-hero-options`,path:`/experiments/startpage-hero-options`,component:()=>B(()=>import(`./WMt7zQKr.js`),__vite__mapDeps([166,2,7,1,3,5,6,13,92,90,11,79,91,18,93,118,167,168,43,169,170,28,10,12,45,17,107,171,172,173]),import.meta.url)},{name:`experiments-status-v1`,path:`/experiments/status-v1`,meta:_s||{},component:()=>B(()=>import(`./zAlp6eV-.js`),__vite__mapDeps([174,2,7,1,3,5,6,8,66,72,76]),import.meta.url)},{name:`members-account`,path:`/members/account`,meta:{...vs||{},middleware:`auth`},component:()=>B(()=>import(`./CCfirust.js`),__vite__mapDeps([175,2,6,3,1,10,11,35,7,5,8,34,176,177,40,178]),import.meta.url)},{name:`members-rechner`,path:`/members/rechner`,meta:{...ys||{},middleware:`auth`},component:()=>B(()=>import(`./4SQR51LF.js`),__vite__mapDeps([179,2,3,1,10,11,7,5,6,8,177,180]),import.meta.url)},{name:`members-willkommen`,path:`/members/willkommen`,meta:{middleware:`auth`},component:()=>B(()=>import(`./B4BkOIzm.js`),__vite__mapDeps([181,2,6,3,1,10,11,28,91,7,5,18,8]),import.meta.url)},{name:`checkout-productSlug-packageSlug`,path:`/checkout/:productSlug()/:packageSlug()`,component:()=>B(()=>import(`./CWbeSZqo.js`),__vite__mapDeps([182,2,3,1,183,184,185]),import.meta.url)},{name:`magazin-ym-slug`,path:`/magazin/:ym()/:slug()`,component:()=>B(()=>import(`./p2fTsJT9.js`),__vite__mapDeps([186,2,3,1,7,5,6,79,17,183,184,44,187,91,18,169]),import.meta.url)},{name:`briefings-slug`,path:`/briefings/:slug()`,component:()=>B(()=>import(`./CMeL5FEl.js`),__vite__mapDeps([188,2,3,1,10,11,7,5,6,28,13,189,79,52,168,43,17,183,184,44,190,191]),import.meta.url)},{name:`magazin-ym`,path:`/magazin/:ym()`,component:()=>B(()=>import(`./hJ1mwG5H.js`),__vite__mapDeps([192,2,3,1,7,5,6,12,17,91,18,169,193,194]),import.meta.url)},{name:`app-demo-path`,path:`/app-demo/:path(.*)*`,meta:bs||{},component:()=>B(()=>import(`./Cv8ypued.js`),__vite__mapDeps([195,2,8,74,3,1,35,7,5,6,13,70,71,12,52,64,65,66,72]),import.meta.url)},{name:`category-segments`,path:`/category/:segments(.*)*`,component:()=>B(()=>import(`./snfCJqQP.js`),__vite__mapDeps([196,2,3,1]),import.meta.url)},{name:`1rm`,path:`/1rm`,meta:xs||{},component:()=>B(()=>import(`./BM86Q7Fy.js`),__vite__mapDeps([197,2,6,7,1,3,5,8,198,13,199,30,129,200,31,201,202,79,203,204,205,29,32,14,206,51,52]),import.meta.url)},{name:`abnehmen`,path:`/abnehmen`,component:()=>B(()=>import(`./CuK7BC_w.js`),__vite__mapDeps([207,2,7,1,3,5,6,208,88]),import.meta.url)},{name:`account-geloescht`,path:`/account-geloescht`,meta:Ss||{},component:()=>B(()=>import(`./DEFnJhsu.js`),__vite__mapDeps([209,2,7,1,3,5,6,8]),import.meta.url)},{name:`app-demo`,path:`/app-demo`,meta:Cs||{},component:()=>B(()=>import(`./C8DexUfb.js`),__vite__mapDeps([210,2,8,74,3,1,35,7,5,6,13,70,71,12,52,64,65,66,72]),import.meta.url)},{name:`artikel`,path:`/artikel`,component:()=>B(()=>import(`./CNHt6Kko.js`),__vite__mapDeps([211,2,7,1,3,5,6,107,28,10,11,12,208,88]),import.meta.url)},{name:`bestaetigt`,path:`/bestaetigt`,component:()=>B(()=>import(`./CPKs2sZ5.js`),__vite__mapDeps([212,2,91,7,1,3,5,6,18]),import.meta.url)},{name:`biologisch-juenger`,path:`/biologisch-juenger`,meta:ws||{},component:()=>B(()=>import(`./OhkVPved.js`),__vite__mapDeps([213,2,6,79,18,8,214,35,1,3,215,36,20,134,28,10,11,17,26,37,208]),import.meta.url)},{name:`blog`,path:`/blog`,component:()=>B(()=>import(`./-6R51kA7.js`),__vite__mapDeps([216,2,107,28,10,3,1,11,12,5,6,208,88,7]),import.meta.url)},{name:`bmi-rechner-2-0`,path:`/bmi-rechner-2-0`,meta:Ts||{},component:()=>B(()=>import(`./CxASBoEK.js`),__vite__mapDeps([217,2,3,1,10,11,7,5,6,18,8,199,30,129,200,198,13,31,201,202,79,204,206,42,28,12,43,17,44,45,46,27,29,32,21,218,219,220,52,221,177,222]),import.meta.url)},{name:`briefings`,path:`/briefings`,component:()=>B(()=>import(`./CYIA16aa.js`),__vite__mapDeps([223,2,10,3,1,11,7,5,6,168,43,190,52]),import.meta.url)},{name:`burn-diaet`,path:`/burn-diaet`,meta:Es||{},component:()=>B(()=>import(`./cePctBX0.js`),__vite__mapDeps([224,2,11,3,1,79,17,184,91,7,5,6,18,8,214,35,225,226,29,30,31,32,227]),import.meta.url)},{name:`diaeten`,path:`/diaeten`,component:()=>B(()=>
2import(`./UCe8vqla.js`),__vite__mapDeps([228,2,7,1,3,5,6,91,18,208,88]),import.meta.url)},{name:`download-anleitungen`,path:`/download-anleitungen`,meta:Ds||{},component:()=>B(()=>import(`./BT9sra1Q.js`),__vite__mapDeps([229,2,7,1,3,5,6,91,18,8]),import.meta.url)},{name:`e-mail-erfolgreich-bestaetigt`,path:`/e-mail-erfolgreich-bestaetigt`,component:()=>B(()=>import(`./BfZaTWqq.js`),__vite__mapDeps([230,2,7,1,3,5,6]),import.meta.url)},{name:`email-anmeldung-aktivieren`,path:`/email-anmeldung-aktivieren`,component:()=>B(()=>import(`./tdkL2GkY.js`),__vite__mapDeps([231,2]),import.meta.url)},{name:`experiments`,path:`/experiments`,meta:Os||{},component:()=>B(()=>import(`./ub4rX_QB.js`),__vite__mapDeps([232,2,7,1,3,5,6,8,81,108,147,64]),import.meta.url)},{name:`fehler`,path:`/fehler`,component:()=>B(()=>import(`./FCO7xB4w.js`),__vite__mapDeps([233,2,91,7,1,3,5,6,18]),import.meta.url)},{name:`fitladies-ernaehrung-leicht`,path:`/fitladies-ernaehrung-leicht`,meta:ks||{},component:()=>B(()=>import(`./emR2p7eP.js`),__vite__mapDeps([234,2,17,184,91,7,1,3,5,6,18,8,214,35,225,226,29,30,31,32,227,92]),import.meta.url)},{name:`fitladies-one-trainingsplan`,path:`/fitladies-one-trainingsplan`,meta:As||{},component:()=>B(()=>import(`./DeGDjy-M.js`),__vite__mapDeps([235,2,11,3,1,79,17,184,91,7,5,6,18,8,214,35,225,226,29,30,31,32,227]),import.meta.url)},{name:`fitness`,path:`/fitness`,component:()=>B(()=>import(`./DTgot58G.js`),__vite__mapDeps([236,2,107,28,10,3,1,11,12,5,6,208]),import.meta.url)},{name:`frauen`,path:`/frauen`,component:()=>B(()=>import(`./CKuEDeSJ.js`),__vite__mapDeps([237,2,107,28,10,3,1,11,12,5,6,208]),import.meta.url)},{name:`habits`,path:`/habits`,component:()=>B(()=>import(`./hutQHhz8.js`),__vite__mapDeps([238,2,7,1,3,5,6,208]),import.meta.url)},{name:`hero-preview`,path:`/hero-preview`,meta:js||{},component:()=>B(()=>import(`./DXDPzMRF.js`),__vite__mapDeps([239,2,7,1,3,5,6,8,173,11]),import.meta.url)},{name:`high-speed-diaet`,path:`/high-speed-diaet`,meta:Ms||{},component:()=>B(()=>import(`./Ba8G5dq4.js`),__vite__mapDeps([240,2,11,3,1,79,183,184,91,7,5,6,18,8,214,35,225,226,29,30,31,32,227,17,185]),import.meta.url)},{name:`high-speed-diaet-kochbuch`,path:`/high-speed-diaet-kochbuch`,meta:Ns||{},component:()=>B(()=>import(`./CeVwGtl3.js`),__vite__mapDeps([241,2,79,17,184,91,7,1,3,5,6,18,8,214,35,225,226,29,30,31,32,227]),import.meta.url)},{name:`high-speed-diaet-v2`,path:`/high-speed-diaet-v2`,meta:Ps||{},component:()=>B(()=>import(`./BJtrv-KJ.js`),__vite__mapDeps([242,2,79,17,183,184,91,7,1,3,5,6,18,8,214,35,225,226,29,30,31,32,227,185]),import.meta.url)},{name:`hsd-rechner`,path:`/hsd-rechner`,meta:Fs||{},component:()=>B(()=>import(`./Dp1XkHG5.js`),__vite__mapDeps([243,2,7,1,3,5,6,8,202,79,204,199,30,129,200,205,29,31,32,14,206,51,52,42,28,10,11,12,43,17,44,45,46,27,218,221]),import.meta.url)},{name:`kalorienrechner`,path:`/kalorienrechner`,meta:Is||{},component:()=>B(()=>import(`./CenRSJxf.js`),__vite__mapDeps([244,2,6,3,1,10,11,7,5,18,8,128,30,129,130,32,198,13,199,200,31,201,202,79,203,204,205,29,206,26,37,42,28,12,43,17,44,45,46,27,218,220,52,221,177,222,226,33,34,35,36,38,39,40,245,246]),import.meta.url)},{name:`kfa-rechner`,path:`/kfa-rechner`,meta:Ls||{},component:()=>B(()=>import(`./CcE30apY.js`),__vite__mapDeps([247,2,3,1,10,11,18,8,198,13,199,30,129,200,31,201,202,7,5,6,79,204,206,26,37,42,28,12,43,17,44,45,46,27,29,32,218,220,52,221,177,222,226,33,34,35,36,38,39,40,246]),import.meta.url)},{name:`konsultation`,path:`/konsultation`,component:()=>B(()=>import(`./BFiKnFWN.js`),__vite__mapDeps([248,2,107,28,10,3,1,11,12,5,6,208]),import.meta.url)},{name:`kontakt`,path:`/kontakt`,component:()=>B(()=>import(`./Z43RzX2C.js`),__vite__mapDeps([249,2,107,28,10,3,1,11,12,5,6,208]),import.meta.url)},{name:`kraftstandards`,path:`/kraftstandards`,meta:Rs||{},component:()=>B(()=>import(`./Dp8B-RTQ.js`),__vite__mapDeps([250,2,7,1,3,5,6,8,202,79,205,29,30,31,32,206,42,28,10,11,12,43,17,44,45,46,27,218,199,129,200,221]),import.meta.url)},{name:`kraftwerte`,path:`/kraftwerte`,meta:zs||{},component:()=>B(()=>import(`./Jv5UjgdV.js`),__vite__mapDeps([251,2,7,1,3,5,6,8,202,79,205,29,30,31,32,206,218,199,129,200,221]),import.meta.url)},{name:`kurse`,path:`/kurse`,component:()=>B(()=>import(`./i13ez_lm.js`),__vite__mapDeps([252,2,19,253,6,3,1,18,36,20,134,28,10,11,17,26,37,208,93,254]),import.meta.url)},{name:`links`,path:`/links`,meta:Bs||{},component:()=>B(()=>import(`./DVuxxxj7.js`),__vite__mapDeps([255,2,3,1,79,13,17,8,214,35,215,94,28,10,11,12,5,6,256]),import.meta.url)},{name:`login`,path:`/login`,component:()=>B(()=>import(`./MjKCFbZD.js`),__vite__mapDeps([257,2,3,1,258,259,6,7,5,28,10,11,17,91,18,99]),import.meta.url)},{name:`magazin`,path:`/magazin`,component:()=>B(()=>import(`./CmZHYh1T.js`),__vite__mapDeps([260,2,7,1,3,5,6,91,18]),import.meta.url)},{name:`makrorechner`,path:`/makrorechner`,meta:Vs||{},component:()=>B(()=>import(`./DbyDVk9Z.js`),__vite__mapDeps([261,2,7,1,3,5,6,8,202,79,204,199,30,129,200,205,29,31,32,206,42,28,10,11,12,43,17,44,45,46,27,218,220,52,221]),import.meta.url)},{name:`members`,path:`/members`,meta:Hs||{},component:()=>B(()=>import(`./D1l-JKTS.js`),__vite__mapDeps([262,2,6,3,1,7,5,13,17,193,194,8,170,28,10,11,12,34,35,258,177,94,171,38,40,259,91,18,99,178,180,263]),import.meta.url)},{name:`muskelaufbau`,path:`/muskelaufbau`,component:()=>B(()=>import(`./C8mbp-Np.js`),__vite__mapDeps([264,2,7,1,3,5,6,208]),import.meta.url)},{name:`mythen`,path:`/mythen`,meta:Us||{},component:()=>B(()=>import(`./BY5wYpi7.js`),__vite__mapDeps([265,2,6,7,1,3,5,13,8,204,199,30,129,200,208,266]),import.meta.url)},{name:`omega3-rechner`,path:`/omega3-rechner`,meta:Ws||{},component:()=>B(()=>import(`./DiJ77nls.js`),__vite__mapDeps([267,2,8,202,7,1,3,5,6,79,205,29,30,31,32,14,51,52,42,28,10,11,12,43,17,44,45,46,27,220,221,226]),import.meta.url)},{name:`passwort-vergessen`,path:`/passwort-vergessen`,component:()=>B(()=>import(`./nWyVWl4I.js`),__vite__mapDeps([268,2,6,3,1,10,11,7,5,91,18]),import.meta.url)},{name:`passwort-zuruecksetzen`,path:`/passwort-zuruecksetzen`,component:()=>B(()=>import(`./a4EZEJ0d.js`),__vite__mapDeps([269,2,6,3,1,10,11,7,5,91,18]),import.meta.url)},{name:`proteinrechner`,path:`/proteinrechner`,meta:Gs||{},component:()=>B(()=>import(`./CLkunbco.js`),__vite__mapDeps([270,2,3,1,10,11,18,8,198,13,199,30,129,200,31,201,202,7,5,6,79,206,26,19,37,42,28,12,43,17,44,45,46,27,29,32,218,219,220,52,221,177,222,226,33,34,35,36,38,39,40,245,204,246]),import.meta.url)},{name:`registrieren`,path:`/registrieren`,component:()=>B(()=>import(`./J53naHon.js`),__vite__mapDeps([271,2,6,3,1,7,5,28,10,11,91,18,39,13]),import.meta.url)},{name:`rekomposition`,path:`/rekomposition`,meta:Ks||{},component:()=>B(()=>import(`./BDs2f2qt.js`),__vite__mapDeps([272,2,11,3,1,79,17,184,91,7,5,6,18,8,214,35,225,226,29,30,31,32,227]),import.meta.url)},{name:`rekomposition-hub`,path:`/rekomposition-hub`,component:()=>B(()=>import(`./DGAiXXtY.js`),__vite__mapDeps([273,2,7,1,3,5,6,208]),import.meta.url)},{name:`rezepte`,path:`/rezepte`,component:()=>B(()=>import(`./CIXiF2xB.js`),__vite__mapDeps([274,2,107,28,10,3,1,11,12,5,6,208,88,7]),import.meta.url)}
2,{name:`schick-uns-deine-erfolgsgeschichte-mit-bildern`,path:`/schick-uns-deine-erfolgsgeschichte-mit-bildern`,component:()=>B(()=>import(`./BXniLP7O.js`),__vite__mapDeps([275,2,107,28,10,3,1,11,12,5,6,208]),import.meta.url)},{name:`science-fitness-magazin`,path:`/science-fitness-magazin`,meta:qs||{},component:()=>B(()=>import(`./Cv_5CFwM.js`),__vite__mapDeps([276,2,3,1,8]),import.meta.url)},{name:`sf-plus`,path:`/sf-plus`,meta:Js||{},component:()=>B(()=>import(`./CZZ5dPfB.js`),__vite__mapDeps([277,2,6,3,1,7,5,79,13,168,43,17,183,184,91,18,8,170,28,10,11,12,278,214,35,215,205,29,30,31,32,227,93,256]),import.meta.url)},{name:`shift50`,path:`/shift50`,component:()=>B(()=>import(`./DMyLoqnS.js`),__vite__mapDeps([279,2,79,17,183,184,91,7,1,3,5,6,18,20,208,227]),import.meta.url)},{name:`sub10-20-faq`,path:`/sub10-20-faq`,meta:Ys||{},component:()=>B(()=>import(`./Cro4m9q-.js`),__vite__mapDeps([280,2,8,107,28,10,3,1,11,12,5,6]),import.meta.url)},{name:`supplements`,path:`/supplements`,component:()=>B(()=>import(`./Ds03KznF.js`),__vite__mapDeps([281,2,107,28,10,3,1,11,12,5,6,208]),import.meta.url)},{name:`suppomat`,path:`/suppomat`,meta:Xs||{},component:()=>B(()=>import(`./DngLClCs.js`),__vite__mapDeps([282,2,6,7,1,3,5,91,18,8,199,30,129,200,130,31,283,32,202,79,203,204,205,29,37]),import.meta.url)},{name:`tipps-tricks-abnehmen`,path:`/tipps-tricks-abnehmen`,meta:Zs||{},component:()=>B(()=>import(`./DSdywI2V.js`),__vite__mapDeps([284,2,8,107,28,10,3,1,11,12,5,6]),import.meta.url)},{name:`tools`,path:`/tools`,meta:Qs||{},component:()=>B(()=>import(`./BEnLn9RU.js`),__vite__mapDeps([285,2,8,64,88,7,1,3,5,6]),import.meta.url)},{name:`trainingsplaene`,path:`/trainingsplaene`,component:()=>B(()=>import(`./CVQZwfJu.js`),__vite__mapDeps([286,2,7,1,3,5,6,208,88]),import.meta.url)},{name:`transformation-komplettpaket`,path:`/transformation-komplettpaket`,meta:$s||{},component:()=>B(()=>import(`./C41FD9xh.js`),__vite__mapDeps([287,2,7,1,3,5,6,79,183,184,91,18,8,214,35,225,226,29,30,31,32,227,17]),import.meta.url)},{name:`ueber-johannes`,path:`/ueber-johannes`,component:()=>B(()=>import(`./BCVlSjJN.js`),__vite__mapDeps([288,2,11,3,1,289,253,6,18,36,19,20,134,28,10,17,26,37]),import.meta.url)},{name:`uebungen`,path:`/uebungen`,component:()=>B(()=>import(`./BbUQtyrd.js`),__vite__mapDeps([290,2,7,1,3,5,6,208,88]),import.meta.url)},{name:`updates`,path:`/updates`,component:()=>B(()=>import(`./DYPEQ10p.js`),__vite__mapDeps([291,2,253,6,3,1,18,36,19,20,134,28,10,11,17,26,37,208]),import.meta.url)},{name:`vitd-rechner`,path:`/vitd-rechner`,meta:ec||{},component:()=>B(()=>import(`./2rgp_lBN.js`),__vite__mapDeps([292,2,7,1,3,5,6,8,202,79,204,199,30,129,200,205,29,31,32,14,206,51,52,42,28,10,11,12,43,17,44,45,46,27,220,221,226]),import.meta.url)},{name:`welches-programm`,path:`/welches-programm`,meta:tc||{},component:()=>B(()=>import(`./bh6n-7vv.js`),__vite__mapDeps([293,2,91,7,1,3,5,6,18,8,294,13,17,184,253,36,19,20,134,28,10,11,26,37,289,48,107,12]),import.meta.url)},{name:`xplode-one-trainingsplan`,path:`/xplode-one-trainingsplan`,meta:nc||{},component:()=>B(()=>import(`./DVoLP4LE.js`),__vite__mapDeps([295,2,11,3,1,79,17,184,91,7,5,6,18,8,214,35,225,226,29,30,31,32,227]),import.meta.url)},{name:`category-slug`,path:`/:category()/:slug()`,meta:yc||{},component:()=>B(()=>import(`./CboSkEsB.js`),__vite__mapDeps([296,2,3,1,7,5,6,12,189,79,13,187,8,294,17,184,91,18,253,36,19,20,134,28,10,11,26,37,289,48,42,43,44,45,46,107,27,29,30,31,32,297]),import.meta.url)},{name:`slug`,path:`/:slug()`,component:()=>B(()=>import(`./idV3Ab5F.js`),__vite__mapDeps([298,2,3,1,7,5,6,294,13,17,184,91,18,253,36,19,20,134,28,10,11,26,37,289,48,107,12,208]),import.meta.url)},{name:`index`,path:`/`,component:()=>B(()=>import(`./DeJH6LFm.js`),__vite__mapDeps([299,2,90,11,3,1,7,5,6,79,13,91,18,92,93,165,167,168,43,169,170,28,10,12,45,17,107,171,172,254,36,19,20,134,26,37]),import.meta.url)}];function xc(e,t,n){let{pathname:r,search:i,hash:a}=t,o=e.indexOf(`#`);if(o>-1){let t=a.includes(e.slice(o))?e.slice(o).length:1,n=a.slice(t);return n[0]!==`/`&&(n=`/`+n),qe(n,``)}let s=qe(r,e),c=!n||Ve(s,n)?s:n;return c+(c.includes(`?`)?``:i)+a}var Sc=d({name:`nuxt:router`,enforce:`pre`,async setup(e){let n,r,i=t().app.baseURL;Xt&&!i.includes(`#`)&&(i+=`#`);let a=Zt.history?.(i)??(Xt?ui(i):li(i)),o=Zt.routes?([n,r]=s(()=>Zt.routes(bc)),n=await n,r(),n??bc):bc,c,l=Hi({...Zt,scrollBehavior:(e,t,n
2)=>{if(t===Rt){c=n;return}if(Zt.scrollBehavior){if(l.options.scrollBehavior=Zt.scrollBehavior,`scrollRestoration`in window.history){let e=l.beforeEach(()=>{e(),window.history.scrollRestoration=`manual`})}return Zt.scrollBehavior(e,Rt,c||n)}},history:a,routes:o});`scrollRestoration`in window.history&&(window.history.scrollRestoration=`auto`),e.vueApp.use(l);let u=pe(l.currentRoute.value);l.afterEach((e,t)=>{u.value=t}),Object.defineProperty(e.vueApp.config.globalProperties,"previousRoute",{get:()=>u.value});let d=xc(i,window.location,e.payload.path),f=pe(l.currentRoute.value),p=()=>{f.value=l.currentRoute.value};l.afterEach((e,t)=>{let n=e.matched.at(-1)?.components?.default,r=t.matched.at(-1)?.components?.default;if(n===r){oo({route:e,Component:{type:n}})===oo({route:t,Component:{type:r}})&&p();return}e.matched.length<t.matched.length&&e.matched.every((e,n)=>e.components?.default===t.matched[n]?.components?.default)&&p()});let m={sync:p};for(let e in f.value)Object.defineProperty(m,e,{get:()=>f.value[e],enumerable:!0});e._route=ye(m),e._middleware||={global:[],named:{}};let h=Qe();l.afterEach(async(t,n,r)=>{delete e._processingMiddleware,!e.isHydrating&&h.value&&await e.runWithContext(Ze),r&&await e.callHook(`page:loading:end`)});try{[n,r]=s(()=>l.isReady()),await n,r()}catch(t){[n,r]=s(()=>Je(e,t)),await n,r()}let g=d===l.currentRoute.value.fullPath?l.currentRoute.value:l.resolve(d),_=l.currentRoute.value.fullPath,v=e.isHydrating&&e.payload.prerenderedAt&&e.payload.path&&d!==e.payload.path&&Ve(l.currentRoute.value.path,e.payload.path);p();function y(t){!e.isHydrating&&t.fullPath!==xc(i,window.location)&&a.push(t.fullPath)}let b=e.payload.state._layout;return l.beforeEach(async(t,n)=>{await e.callHook(`page:loading:start`),t.meta=de(t.meta),e.isHydrating&&b&&!le(t.meta.layout)&&(t.meta.layout=b),e._processingMiddleware=!0;{let r=new Set([...ho,...e._middleware.global]);for(let e of t.matched){let t=e.meta.middleware;if(t)for(let e of co(t))r.add(e)}let i=na({path:t.path});if(i.appMiddleware)for(let e in i.appMiddleware)i.appMiddleware[e]?r.add(e):r.delete(e);for(let i of r){let r=typeof i==`string`?e._middleware.named[i]||await go[i]?.().then(e=>e.default||e):i;if(!r)throw Re.NUXT_E2004({entry:String(i),validMiddleware:void 0});try{let i=await e.runWithContext(()=>r(t,n));if(!e.payload.serverRendered&&e.isHydrating&&(i===!1||i instanceof Error)){let t=i||Ke({status:404,statusText:`Page Not Found: ${d}`});return await e.runWithContext(()=>Ye(t)),!1}if(i===!0)continue;if(i===!1)return i;if(i)return Be(i)&&i.fatal&&(await e.runWithContext(()=>Ye(i)),y(t)),i}catch(n){let r=Ke(n);return r.fatal&&(await e.runWithContext(()=>Ye(r)),y(t)),r}}}}),l.onError(async()=>{delete e._processingMiddleware,await e.callHook(`page:loading:end`)}),l.afterEach(t=>{if(t.matched.length===0&&!h.value)return e.runWithContext(()=>Ye(Ke({status:404,fatal:!1,statusText:`Page not found: ${t.fullPath}`,data:{path:t.fullPath}})))}),e.hooks.hookOnce(`app:created`,async()=>{try{if(`name`in g&&(g.name=void 0),l.currentRoute.value.fullPath===_){if(v){let t=l.resolve(e.payload.path);`name`in t&&(t.name=void 0),await l.replace({...t,force:!0});let n=()=>{e[`~restoreDeferredRoute`]&&(e[`~restoreDeferredRoute`]=void 0,l.currentRoute.value=l.resolve(d),p(),l.replace({...g,force:!0}).catch(()=>{}))};e[`~restoreDeferredRoute`]=n,e.hooks.hookOnce(`app:suspense:resolve`,n)}else await l.replace({...g,force:!0})}l.options.scrollBehavior=Zt.scrollBehavior}catch(t){await Je(e,t)}}),{provide:{router:l}}}},1),Cc=Symbol.for(`@supabase/supabase-js.traceContextExtractor`);function wc(){return globalThis[Cc]}function Tc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ec(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var Dc=e=>e?(...t)=>e(...t):(...e)=>
vendor: 18,847 bytes, line 2
2fetch(...e),Oc=class extends Error{constructor(e,t=`FunctionsError`,n){super(e),this.name=t,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}},kc=class extends Oc{constructor(e){super(`Failed to send a request to the Edge Function`,`FunctionsFetchError`,e)}},Ac=class extends Oc{constructor(e){super(`Relay Error invoking the Edge Function`,`FunctionsRelayError`,e)}},jc=class extends Oc{constructor(e){super(`Edge Function returned a non-2xx status code`,`FunctionsHttpError`,e)}},Mc;(function(e){e.Any=`any`,e.ApNortheast1=`ap-northeast-1`,e.ApNortheast2=`ap-northeast-2`,e.ApSouth1=`ap-south-1`,e.ApSoutheast1=`ap-southeast-1`,e.ApSoutheast2=`ap-southeast-2`,e.CaCentral1=`ca-central-1`,e.EuCentral1=`eu-central-1`,e.EuWest1=`eu-west-1`,e.EuWest2=`eu-west-2`,e.EuWest3=`eu-west-3`,e.SaEast1=`sa-east-1`,e.UsEast1=`us-east-1`,e.UsWest1=`us-west-1`,e.UsWest2=`us-west-2`})(Mc||={});var Nc=class{constructor(e,{headers:t={},customFetch:n,region:r=Mc.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=Dc(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Ec(this,arguments,void 0,function*(e,t={}){var n;let r,i,a;try{let{headers:n,method:o,body:s,signal:c,timeout:l}=t,u={},{region:d}=t;d||=this.region;let f=new URL(`${this.url}/${e}`);d&&d!==`any`&&(u[`x-region`]=d,f.searchParams.set(`forceFunctionRegion`,d));let p,m=!!n&&Object.keys(n).some(e=>e.toLowerCase()===`content-type`);s&&!m?typeof Blob<`u`&&s instanceof Blob||s instanceof ArrayBuffer?(u[`Content-Type`]=`application/octet-stream`,p=s):typeof s==`string`?(u[`Content-Type`]=`text/plain`,p=s):typeof FormData<`u`&&s instanceof FormData?p=s:(u[`Content-Type`]=`application/json`,p=JSON.stringify(s)):p=s&&typeof s!=`string`&&!(typeof Blob<`u`&&s instanceof Blob)&&!(s instanceof ArrayBuffer)&&!(typeof FormData<`u`&&s instanceof FormData)?JSON.stringify(s):s;let h=c;l&&(i=new AbortController,r=setTimeout(()=>i.abort(),l),c?(h=i.signal,a=()=>i.abort(),c.addEventListener(`abort`,a)):h=i.signal);let g=yield this.fetch(f.toString(),{method:o||`POST`,headers:Object.assign(Object.assign(Object.assign({},u),this.headers),n),body:p,signal:h}).catch(e=>{throw new kc(e)}),_=g.headers.get(`x-relay-error`);if(_&&_===`true`)throw new Ac(g);if(!g.ok)throw new jc(g);let v=(g.headers.get(`Content-Type`)??`text/plain`).split(`;`)[0].trim().toLowerCase(),y;return y=v===`application/json`?yield g.json():v===`application/octet-stream`||v===`application/pdf`?yield g.blob():v===`text/event-stream`?g:v===`multipart/form-data`?yield g.formData():yield g.text(),{data:y,error:null,response:g}}catch(e){return{data:null,error:e,response:e instanceof jc||e instanceof Ac?e.context:void 0}}finally{r&&clearTimeout(r),a&&((n=t.signal)==null||n.removeEventListener(`abort`,a))}})}},Pc=class extends Error{constructor(e){super(e.message),this.name=`PostgrestError`,this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}},Fc=3,Ic=e=>Math.min(1e3*2**e,3e4),Lc=[520,503],Rc=[`GET`,`HEAD`,`OPTIONS`];function zc(e){"@babel/helpers - typeof";return zc=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zc(e)}function Bc(e,t){if(zc(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(zc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Vc(e){var t=Bc(e,`string`);return zc(t)==`symbol`?t:t+``}function Hc(e,t,n){return(t=Vc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Uc(Object(n),!0).forEach(function(t){Hc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gc(e,t){return new Promise(n=>{if(t?.aborted){n();return}let r=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e);function i(){clearTimeout(r),n()}t?.addEventListener(`abort`,i)})}function Kc(e,t,n,r){return!(!r||n>=Fc||!Rc.includes(e)||!Lc.includes(t))}async function qc(e,t,n,r){let i=0;for(;;){let a=Wc({},n.headers);i>0&&(a[`X-Retry-Count`]=String(i));let o;try{o=await e(t,{method:n.method,headers:a,body:n.body,signal:n.signal})}catch(e){if(e?.name===`AbortError`||e?.code===`ABORT_ERR`||!Rc.includes(n.method))throw e;if(r&&i<Fc){let e=Ic(i);i++,await Gc(e,n.signal);continue}throw e}if(Kc(n.method,o.status,i,r)){let e=o.headers?.get(`Retry-After`)??null,t=e===null?Ic(i):Math.max(0,parseInt(e,10)||0)*1e3;await o.text(),i++,await Gc(t,n.signal);continue}return o}}var Jc=class{constructor(e){this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError??!1,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle??!1,this.shouldStripNulls=e.shouldStripNulls??!1,this.urlLengthLimit=e.urlLengthLimit??8e3,this.retryEnabled=e.retry??!0,this.fetch=e.fetch?e.fetch:fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get(`Accept`)===`text/csv`)throw Error(`stripNulls() cannot be used with csv()`);return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(this.schema===void 0||([`GET`,`HEAD`].includes(this.method)?this.headers.set(`Accept-Profile`,this.schema):this.headers.set(`Content-Profile`,this.schema)),this.method!==`GET`&&this.method!==`HEAD`&&this.headers.set(`Content-Type`,`application/json`),this.shouldStripNulls){let e=this.headers.get(`Accept`);e===`application/vnd.pgrst.object+json`?this.headers.set(`Accept`,`application/vnd.pgrst.object+json;nulls=stripped`):(!e||e===`application/json`)&&this.headers.set(`Accept`,`application/vnd.pgrst.array+json;nulls=stripped`)}let r=this.fetch,i=(async()=>{let e={};n.headers.forEach((t,n)=>{e[n]=t});let t=await qc(r,n.url.toString(),{method:n.method,headers:e,body:JSON.stringify(n.body,(e,t)=>typeof t==`bigint`?t.toString():t),signal:n.signal},n.retryEnabled);return await n.processResponse(t)})();return this.shouldThrowOnError||(i=i.catch(e=>{let t=``,n=``,r=``,i=e?.cause;if(i){let n=i?.message??``,r=i?.code??``;t=`${e?.name??`FetchError`}: ${e?.message}`,t+=`\n\nCaused by: ${i?.name??`Error`}: ${n}`,r&&(t+=` (${r})`),i?.stack&&(t+=`\n${i.stack}`)}else t=e?.stack??``;let a=this.url.toString().length;return e?.name===`AbortError`||e?.code===`ABORT_ERR`?(r=``,n=`Request was aborted (timeout or manual cancellation)`,a>this.urlLengthLimit&&(n+=`. Note: Your request URL is ${a} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(i?.name===`HeadersOverflowError`||i?.code===`UND_ERR_HEADERS_OVERFLOW`)&&(r=``,n=`HTTP headers exceeded server limits (typically 16KB)`,a>this.urlLengthLimit&&(n+=`. Your request URL is ${a} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${e?.name??`FetchError`}: ${e?.message}`,details:t,hint:n,code:r},data:null,count:null,status:0,statusText:``}})),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,i=null,a=e.status,o=e.statusText;if(e.ok){if(t.method!==`HEAD`){let i=await e.text();if(i!==``){if(t.headers.get(`Accept`)===`text/csv`)r=i;else if(t.headers.get(`Accept`)&&t.headers.get(`Accept`)?.includes(`application/vnd.pgrst.plan+text`))r=i;else try{r=JSON.parse(i)}catch{if(n={message:i},r=null,t.shouldThrowOnError)throw new Pc({message:i,details:``,hint:``,code:``})}}}let s=t.headers.get(`Prefer`)?.match(/count=(exact|planned|estimated)/),c=e.headers.get(`content-range`)?.split(`/`);if(s&&c&&c.length>1&&(i=parseInt(c[1])),t.isMaybeSingle&&Array.isArray(r)){if(r.length>1){if(n={code:`PGRST116`,details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:`JSON object requested, multiple (or no) rows returned`},r=null,i=null,a=406,o=`Not Acceptable`,t.shouldThrowOnError)throw new Pc(Wc(Wc({},n),{},{hint:n.hint??``}))}else r=r.length===1?r[0]:null}}else{let i=await e.text();try{n=JSON.parse(i),Array.isArray(n)&&e.status===404&&(r=[],n=null,a=200,o=`OK`)}catch{e.status===404&&i===``?(a=204,o=`No Content`):n={message:i}}if(n&&t.shouldThrowOnError)throw new Pc(n)}return{success:n===null,error:n,data:r,count:i,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},Yc=class extends Jc{throwOnError(){return super.throwOnError()}select(e){let t=!1,n=(e??`*`).split(``).map(e=>/\s/.test(e)&&!t?``:(e===`"`&&(t=!t),e)).join(``);return this.url.searchParams.set(`select`,n),this.headers.append(`Prefer`,`return=representation`),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){let a=i?`${i}.order`:`order`,o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:``}${e}.${t?`asc`:`desc`}${n===void 0?``:n?`.nullsfirst`:`.nullslast`}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){let r=n===void 0?`limit`:`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){let i=r===void 0?`offset`:`${r}.offset`,a=r===void 0?`limit`:`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set(`Accept`,`application/vnd.pgrst.object+json`),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set(`Accept`,`text/csv`),this}geojson(){return this.headers.set(`Accept`,`application/geo+json`),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:a=`text`}={}){let o=[e?`analyze`:null,t?`verbose`:null,n?`settings`:null,r?`buffers`:null,i?`wal`:null].filter(Boolean).join(`|`),s=this.headers.get(`Accept`)??`application/json`;return this.headers.set(`Accept`,`application/vnd.pgrst.plan+${a}; for="${s}"; options=${o};`),this}rollback(){return this.headers.append(`Prefer`,`tx=rollback`),this}returns(){return this}maxAffected(e){return this.headers.append(`Prefer`,`handling=strict`),this.headers.append(`Prefer`,`max-affected=${e}`),this}},Xc=RegExp(`[,()]`),Zc=class extends Yc{throwOnError(){return super.throwOnError()}eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(`,`)}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(`,`)}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(`,`)}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(`,`)}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&Xc.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&Xc.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t==`string`?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(`,`)}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t==`string`?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(`,`)}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t==`string`?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(`,`)}}`),this}textSearch(e,t,{config:n,type:r}={}){let i=``;r===`plain`?i=`pl`:r===`phrase`?i=`ph`:r===`websearch`&&(i=`w`);let a=n===void 0?``:`(${n})`;return this.url.searchParams.append(e,`${i}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([e,t])=>t!==void 0).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){let r=n?`${n}.or`:`or`;return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},Qc=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:i=8e3,retry:a}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){let{head:n=!1,count:r}=t??{},i=n?`HEAD`:`GET`,a=!1,o=(e??`*`).split(``).map(e=>/\s/.test(e)&&!a?``:(e===`"`&&(a=!a),e)).join(``),{url:s,headers:c}=this.cloneRequestState();return s.searchParams.set(`select`,o),r&&c.append(`Prefer`,`count=${r}`),new Zc({method:i,url:s,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){let{url:r,headers:i}=this.cloneRequestState();if(t&&i.append(`Prefer`,`count=${t}`),n||i.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);r.searchParams.set(`columns`,e.join(`,`))}}return new Zc({method:`POST`,url:r,headers:i,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){let{url:a,headers:o}=this.cloneRequestState();if(o.append(`Prefer`,`resolution=${n?`ignore`:`merge`}-duplicates`),t!==void 0&&a.searchParams.set(`on_conflict`,t),r&&o.append(`Prefer`,`count=${r}`),i||o.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);a.searchParams.set(`columns`,e.join(`,`))}}return new Zc({method:`POST`,url:a,headers:o,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){let{url:n,headers:r}=this.cloneRequestState();return t&&r.append(`Prefer`,`count=${t}`),new Zc({method:`PATCH`,url:n,headers:r,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){let{url:t,headers:n}=this.cloneRequestState();return e&&n.append(`Prefer`,`count=${e}`),new Zc({method:`DELETE`,url:t,headers:n,schema:this.schema,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function $c(e,t){try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return new Pc({message:String(t.message??e),details:t.details??``,hint:t.hint??``,code:t.code??``})}catch{}return new Pc({message:e||t,details:``,hint:``,code:``})}function el(e,t,n){let r=e;return{success:!1,error:new Pc({message:`${r?.name??`FetchError`}: ${r?.message}`,details:``,hint:``,code:``}),data:null,count:null,status:t,statusText:n}}var tl=class e{constructor(e,{headers:t={},schema:n,fetch:r,timeout:i,urlLengthLimit:a=8e3,retry:o}={}){this.url=e,this.headers=new Headers(t),this.schemaName=n,this.urlLengthLimit=a;let s=r??globalThis.fetch;this.fetch=i!==void 0&&i>0?(e,t)=>{let n=new AbortController,r=setTimeout(()=>n.abort(),i),a=t?.signal;if(a){if(a.aborted)return clearTimeout(r),s(e,t);let i=()=>{clearTimeout(r),n.abort()};return a.addEventListener(`abort`,i,{once:!0}),s(e,Wc(Wc({},t),{},{signal:n.signal})).finally(()=>{clearTimeout(r),a.removeEventListener(`abort`,i)})}return s(e,Wc(Wc({},t),{},{signal:n.signal})).finally(()=>clearTimeout(r))}:s,this.retry=o}from(e){if(!e||typeof e!=`string`||e.trim()===``)throw Error(`Invalid relation name: relation must be a non-empty string.`);return new Qc(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}async getOpenApiSpec(){var e=this;let t=new Headers(e.headers);t.set(`Accept`,`application/openapi+json`),e.schemaName&&t.set(`Accept-Profile`,e.schemaName);let n={};t.forEach((e,t)=>{n[t]=e});let r=e.fetch??globalThis.fetch,i;try{i=await qc(r,`${e.url}/`,{method:`GET`,headers:n},e.retry??!0)}catch(e){return el(e,0,``)}let a;try{a=await i.text()}catch(e){return el(e,i.status,i.statusText)}if(i.ok)try{return{success:!0,error:null,data:JSON.parse(a),count:null,status:i.status,statusText:i.statusText}}catch{}return{success:!1,error:$c(a,i.statusText),data:null,count:null,status:i.status,statusText:i.statusText}}rpc(e,t={},{head:n=!1,get:r=!1,count:i}={}){let a,o=new URL(`${this.url}/rpc/${e}`),s,c=e=>typeof e==`object`&&!!e&&(!Array.isArray(e)||e.some(c)),l=n&&Object.values(t).some(c);l?(a=`POST`,s=t):n||r?(a=n?`HEAD`:`GET`,Object.entries(t).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(`,`)}}`:`${t}
2`]).forEach(([e,t])=>{o.searchParams.append(e,t)})):(a=`POST`,s=t);let u=new Headers(this.headers);return l?u.set(`Prefer`,i?`count=${i},return=minimal`:`return=minimal`):i&&u.set(`Prefer`,`count=${i}`),new Zc({method:a,url:o,headers:u,schema:this.schemaName,body:s,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},nl=class{constructor(){}static detectEnvironment(){if(typeof WebSocket<`u`)return{type:`native`,wsConstructor:WebSocket};let e=globalThis;if(typeof globalThis<`u`&&e.WebSocket!==void 0)return{type:`native`,wsConstructor:e.WebSocket};let t=typeof global<`u`?global:void 0;if(t&&t.WebSocket!==void 0)return{type:`native`,wsConstructor:t.WebSocket};if(typeof globalThis<`u`&&e.WebSocketPair!==void 0&&globalThis.WebSocket===void 0)return{type:`cloudflare`,error:`Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.`,workaround:`Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime.`};if(typeof globalThis<`u`&&e.EdgeRuntime||typeof navigator<`u`&&navigator.userAgent?.includes(`Vercel-Edge`))return{type:`unsupported`,error:`Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.`,workaround:`Use serverless functions or a different deployment target for WebSocket functionality.`};let n=globalThis.process;if(n){let e=n.versions;if(e&&e.node)return{type:`unsupported`,error:`Node.js detected but native WebSocket not found.`,workaround:`Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option.`}}return{type:`unsupported`,error:`Unknown JavaScript runtime without WebSocket support.`,workaround:`Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation.`}}static getWebSocketConstructor(){let e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let t=e.error||`WebSocket not supported in this environment.`;throw e.workaround&&(t+=`\n\nSuggested solution: ${e.workaround}`),Error(t)}static isWebSocketSupported(){try{return this.detectEnvironment().type===`native`}catch{return!1}}},rl=`realtime-js/2.116.0`,il=`1.0.0`,al=`2.0.0`,ol=al,sl=1e4,cl=15e3,ll=1e4,ul={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},dl={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`,access_token:`access_token`},fl={connecting:`connecting`,open:`open`,closing:`closing`,closed:`closed`},pl=class{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT=`broadcast`,this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,t){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event==`string`)return t(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){return this._isArrayBuffer(e.payload?.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){let t=e.payload?.payload??new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,t)}_encodeJsonUserBroadcastPush(e){let t=e.payload?.payload??{},n=new TextEncoder().encode(JSON.stringify(t)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,n)}_encodeUserBroadcastPush(e,t,n){let r=new TextEncoder,i=r.encode(e.topic),a=r.encode(e.ref??``),o=r.encode(e.join_ref??``),s=r.encode(e.payload.event),c=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},l=r.encode(Object.keys(c).length===0?``:JSON.stringify(c));if(o.length>255)throw Error(`joinRef length ${o.length} exceeds maximum of 255`);if(a.length>255)throw Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw Error(`topic length ${i.length} exceeds maximum of 255`);if(s.length>255)throw Error(`userEvent length ${s.length} exceeds maximum of 255`);if(l.length>255)throw Error(`metadata length ${l.length} exceeds maximum of 255`);let u=this.USER_BROADCAST_PUSH_META_LENGTH+o.length+a.length+i.length+s.length+l.length,d=new ArrayBuffer(this.HEADER_LENGTH+u),f=new DataView(d),p=new Uint8Array(d),m=0;f.setUint8(m++,this.KINDS.userBroadcastPush),f.setUint8(m++,o.length),f.setUint8(m++,a.length),f.setUint8(m++,i.length),f.setUint8(m++,s.length),f.setUint8(m++,l.length),f.setUint8(m++,t),p.set(o,m),m+=o.length,p.set(a,m),m+=a.length,p.set(i,m),m+=i.length,p.set(s,m),m+=s.length,p.set(l,m),m+=l.length;var h=new Uint8Array(d.byteLength+n.byteLength);return h.set(new Uint8Array(d),0),h.set(new Uint8Array(n),d.byteLength),h.buffer}decode(e,t){if(this._isArrayBuffer(e))return t(this._binaryDecode(e));if(typeof e==`string`){let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}return t({})}_binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,t,r)}}_decodeUserBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+4,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=e.slice(s,e.byteLength),f=o===this.JSON_ENCODING?JSON.parse(n.decode(d)):d,p={type:this.BROADCAST_EVENT,event:l,payload:f};return a>0&&(p.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:p}}_isArrayBuffer(e){return e instanceof ArrayBuffer||e?.constructor?.name===`ArrayBuffer`}_pick(e,t){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(([e])=>t.includes(e)))}},V;(function(e){e.abstime=`abstime`,e.bool=`bool`,e.date=`date`,e.daterange=`daterange`,e.float4=`float4`,e.float8=`float8`,e.int2=`int2`,e.int4=`int4`,e.int4range=`int4range`,e.int8=`int8`,e.int8range=`int8range`,e.json=`json`,e.jsonb=`jsonb`,e.money=`money`,e.numeric=`numeric`,e.oid=`oid`,e.reltime=`reltime`,e.text=`text`,e.time=`time`,e.timestamp=`timestamp`,e.timestamptz=`timestamptz`,e.timetz=`timetz`,e.tsrange=`tsrange`,e.tstzrange=`tstzrange`})(V||={});var ml=(e,t,n={})=>{let r=n.skipTypes??[];return t?Object.keys(t).reduce((n,i)=>(n[i]=hl(i,e,t,r),n),{}):{}},hl=(e,t,n,r)=>{let i=t.find(t=>t.name===e)?.type,a=n[e];return i&&!r.includes(i)?gl(i,a):_l(a)},gl=(e,t)=>
vendor: 19,869 bytes, lines 2-3
2{if(e.charAt(0)===`_`)return xl(t,e.slice(1,e.length));switch(e){case V.bool:return vl(t);case V.float4:case V.float8:case V.int2:case V.int4:case V.int8:case V.numeric:case V.oid:return yl(t);case V.json:case V.jsonb:return bl(t);case V.timestamp:return Sl(t);case V.abstime:case V.date:case V.daterange:case V.int4range:case V.int8range:case V.money:case V.reltime:case V.text:case V.time:case V.timestamptz:case V.timetz:case V.tsrange:case V.tstzrange:return _l(t);default:return _l(t)}},_l=e=>e,vl=e=>{switch(e){case`t`:return!0;case`f`:return!1;default:return e}},yl=e=>{if(typeof e==`string`){let t=parseFloat(e);if(!Number.isNaN(t))return t}return e},bl=e=>{if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e},xl=(e,t)=>{if(typeof e!=`string`)return e;let n=e.length-1,r=e[n];if(e[0]===`{`&&r===`}`){let r,i=e.slice(1,n);try{r=JSON.parse(`[`+i+`]`)}catch{r=i?i.split(`,`):[]}return r.map(e=>gl(t,e))}return e},Sl=e=>typeof e==`string`?e.replace(` `,`T`):e,Cl=e=>{let t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,`http`),t.pathname=t.pathname.replace(/\/+$/,``).replace(/\/socket\/websocket$/i,``).replace(/\/socket$/i,``).replace(/\/websocket$/i,``),t.pathname===``||t.pathname===`/`?t.pathname=`/api/broadcast`:t.pathname+=`/api/broadcast`,t.href},wl=e=>typeof e==`function`?e:function(){return e},Tl=typeof self<`u`?self:null,El=typeof window<`u`?window:null,Dl=Tl||El||globalThis,Ol=`2.0.0`,kl=1e4,Al=1e3,jl=100,Ml={connecting:0,open:1,closing:2,closed:3},Nl={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},Pl={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`},Fl={longpoll:`longpoll`,websocket:`websocket`},Il={complete:4},Ll=`base64url.bearer.phx.`,Rl=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived(`timeout`)||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger(`timeout`,{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},zl=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries+=1,this.callback()},this.timerCalc(this.tries+1))}},Bl=class{constructor(e,t,n){this.state=Nl.closed,this.topic=e,this.params=wl(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Rl(this,Pl.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new zl(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive(`ok`,()=>{this.state=Nl.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive(`error`,e=>{this.state=Nl.errored,this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log(`channel`,`close ${this.topic}`),this.state=Nl.closed,this.socket.remove(this)}),this.onError(e=>{this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=Nl.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive(`timeout`,()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`timeout ${this.topic}`,this.joinPush.timeout),new Rl(this,Pl.leave,wl({}),this.timeout).send(),this.state=Nl.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Pl.reply,(e,t)=>{this.trigger(this.replyEventName(t),e)})}join(e=this.timeout){if(this.joinedOnce)throw Error(`tried to join multiple times. 'join' can only be called a single time per channel instance`);return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Nl.closed,this.bindings=[]}onClose(e){this.on(Pl.close,e)}onError(e){return this.on(Pl.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>n.event!==e||t!==void 0&&t!==n.ref)}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t||={},!this.joinedOnce)throw Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Rl(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Nl.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`leave ${this.topic}`),this.trigger(Pl.close,`leave`)},n=new Rl(this,Pl.leave,wl({}),e);return n.receive(`ok`,()=>t()).receive(`timeout`,()=>t()),n.send(),this.canPush()||n.trigger(`ok`,{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic===e?r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log(`channel`,`dropping outdated message`,{topic:e,event:t,payload:n,joinRef:r}),!1):!0:!1}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Nl.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let i=this.onMessage(e,t,n,r);if(t&&!i)throw Error(`channel onMessage callbacks must return the payload, modified or unmodified`);let a=this.bindings.filter(r=>r.event===e&&this.filterBindings(r,t,n));for(let e=0;e<a.length;e++)a[e].callback(i,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Nl.closed}isErrored(){return this.state===Nl.errored}isJoined(){return this.state===Nl.joined}isJoining(){return this.state===Nl.joining}isLeaving(){return this.state===Nl.leaving}},Vl=class{static request(e,t,n,r,i,a,o){if(Dl.XDomainRequest){let n=new Dl.XDomainRequest;return this.xdomainRequest(n,e,t,r,i,a,o)}if(Dl.XMLHttpRequest){let s=new Dl.XMLHttpRequest;return this.xhrRequest(s,e,t,n,r,i,a,o)}if(Dl.fetch&&Dl.AbortController)return this.fetchRequest(e,t,n,r,i,a,o);throw Error(`No suitable XMLHttpRequest implementation found`)}static fetchRequest(e,t,n,r,i,a,o){let s={method:e,headers:n,body:r},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),s.signal=c.signal),Dl.fetch(t,s).then(e=>e.text()).then(e=>this.parseJSON(e)).then(e=>o&&o(e)).catch(e=>{e.name===`AbortError`&&a?a():o&&o(null)}),c}static xdomainRequest(e,t,n,r,i,a,o){return e.timeout=i,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);o&&o(t)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,i,a,o,s){e.open(t,n,!0),e.timeout=a;for(let[t,n]of Object.entries(r))e.setRequestHeader(t,n);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{e.readyState===Il.complete&&s&&s(this.parseJSON(e.responseText))},o&&(e.ontimeout=o),e.send(i),e}static parseJSON(e){if(!e||e===``)return null;try{return JSON.parse(e)}catch{return console&&console.log(`failed to parse JSON response`,e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=t?`${t}[${r}]`:r,a=e[r];typeof a==`object`?n.push(this.serialize(a,i)):n.push(encodeURIComponent(i)+`=`+encodeURIComponent(a))}return n.join(`&`)}static appendParams(e,t){return Object.keys(t).length===0?e:`${e}${e.match(/\?/)?`&`:`?`}${this.serialize(t)}`}},Hl=e=>{let t=``,n=new Uint8Array(e),r=n.byteLength;for(let e=0;e<r;e++)t+=String.fromCharCode(n[e]);return btoa(t)},Ul=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Ll)&&(this.authToken=atob(t[1].slice(Ll.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Ml.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace(`ws://`,`http://`).replace(`wss://`,`https://`).replace(RegExp(`(.*)/`+Fl.websocket),`$1/`+Fl.longpoll)}endpointURL(){return Vl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Ml.connecting}ontimeout(){this.onerror(`timeout`),this.closeAndRetry(1005,`timeout`,!1)}isActive(){return this.readyState===Ml.open||this.readyState===Ml.connecting}poll(){let e={Accept:`application/json`};this.authToken&&(e[`X-Phoenix-AuthToken`]=this.authToken),this.ajax(`GET`,e,null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:n,messages:r}=e;if(t===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,`session_gone`,!1);return}this.token=n}else t=0;switch(t){case 200:r.forEach(e=>{setTimeout(()=>this.onmessage({data:e}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Ml.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,`forbidden`,!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,`internal server error`,500);break;default:throw Error(`unhandled poll status ${t}`)}})}send(e){typeof e!=`string`&&(e=Hl(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e,t=0){this.awaitingBatchAck=!0;let n=t+jl,r=e.slice(t,n);this.ajax(`POST`,{"Content-Type":`application/x-ndjson`},r.join(` 3`),()=>this.onerror(`timeout`),t=>{!t||t.status!==200?(this.awaitingBatchAck=!1,this.onerror(t&&t.status),this.closeAndRetry(1011,`internal server error`,!1)):n<e.length?this.batchSend(e,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,n){for(let e of this.reqs)e.abort();this.readyState=Ml.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<`u`?this.onclose(new CloseEvent(`close`,r)):this.onclose(r)}ajax(e,t,n,r,i){let a;a=Vl.request(e,this.endpointURL(),t,n,this.timeout,()=>{this.reqs.delete(a),r()},e=>{this.reqs.delete(a),this.isActive()&&i(e)}),this.reqs.add(a)}},Wl=class e{constructor(t,n={}){let r=n.events||{state:`presence_state`,diff:`presence_diff`};this.state=Object.create(null),this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.joinRef=this.channel.joinRef(),this.state=e.syncState(this.state,t,n,r),this.pendingDiffs.forEach(t=>{this.state=e.syncDiff(this.state,t,n,r)}),this.pendingDiffs=[],i()}),this.channel.on(r.diff,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(t):(this.state=e.syncDiff(this.state,t,n,r),i())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(t){return e.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,t,n,r){let i=this.toNullProtoObj(this.clone(e));t=this.toNullProtoObj(t);let a=Object.create(null),o=Object.create(null);return this.map(i,(e,n)=>{t[e]||(o[e]=n)}),this.map(t,(e,t)=>{let n=i[e];if(n){let r=t.metas.map(e=>e.phx_ref),i=n.metas.map(e=>e.phx_ref),s=t.metas.filter(e=>i.indexOf(e.phx_ref)<0),c=n.metas.filter(e=>r.indexOf(e.phx_ref)<0);s.length>0&&(a[e]=t,a[e].metas=s),c.length>0&&(o[e]=this.clone(n),o[e].metas=c)}else a[e]=t}),this.syncDiff(i,{joins:a,leaves:o},n,r)}static syncDiff(e,t,n,r){e=this.toNullProtoObj(e);let{joins:i,leaves:a}=this.clone(t);return n||=function(){},r||=function(){},this.map(i,(t,r)=>{let i=e[t];if(e[t]=this.clone(r),i){let n=e[t].metas.map(e=>e.phx_ref),r=i.metas.filter(e=>n.indexOf(e.phx_ref)<0);e[t].metas.unshift(...r)}n(t,i,r)}),this.map(a,(t,n)=>{let i=e[t];if(!i)return;let a=n.metas.map(e=>e.phx_ref);i.metas=i.metas.filter(e=>a.indexOf(e.phx_ref)<0),r(t,i,n),i.metas.length===0&&delete e[t]}),e}static list(e,t){return t||=function(e,t){return t},this.map(e,(e,n)=>t(e,n))}static map(e,t){return Object.getOwnPropertyNames(e).map(n=>t(n,e[n]))}static toNullProtoObj(e){if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=e[n]}),t}static clone(e){return JSON.parse(JSON.stringify(e))}},Gl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:i,payload:a}=e,o=new TextEncoder,s=o.encode(t),c=o.encode(n),l=o.encode(i),u=o.encode(r);this.assertFieldSize(s.byteLength,`join_ref`),this.assertFieldSize(c.byteLength,`ref`),this.assertFieldSize(l.byteLength,`topic`),this.assertFieldSize(u.byteLength,`event`);let d=this.META_LENGTH+s.byteLength+c.byteLength+l.byteLength+u.byteLength,f=new ArrayBuffer(this.HEADER_LENGTH+d),p=new Uint8Array(f),m=new DataView(f),h=0;m.setUint8(h++,this.KINDS.push),m.setUint8(h++,s.byteLength),m.setUint8(h++,c.byteLength),m.setUint8(h++,l.byteLength),m.setUint8(h++,u.byteLength),p.set(s,h),h+=s.byteLength,p.set(c,h),h+=c.byteLength,p.set(l,h),h+=l.byteLength,p.set(u,h),h+=u.byteLength;var g=new Uint8Array(f.byteLength+a.byteLength);return g.set(p,0),g.set(new Uint8Array(a),f.byteLength),g.buffer},assertFieldSize(e,t){if(e>255)throw Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}},decodePush(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,s=n.decode(e.slice(o,o+r));o+=r;let c=n.decode(e.slice(o,o+i));o+=i;let l=n.decode(e.slice(o,o+a));return o+=a,{join_ref:s,ref:null,topic:c,event:l,payload:e.slice(o,e.byteLength)}},decodeReply(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=n.decode(e.slice(s,s+o));s+=o;let f={status:d,response:e.slice(s,e.byteLength)};return{join_ref:c,ref:l,topic:u,event:Pl.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=this.HEADER_LENGTH+2,o=n.decode(e.slice(a,a+r));a+=r;let s=n.decode(e.slice(a,a+i));return a+=i,{join_ref:null,ref:null,topic:o,event:s,payload:e.slice(a,e.byteLength)}}},Kl=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||kl,this.transport=t.transport||Dl.WebSocket||Ul,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=Dl&&Dl.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Gl.encode.bind(Gl),this.defaultDecoder=Gl.decode.bind(Gl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||`arraybuffer`,this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport===Ul?(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder):(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder);let r=null;El&&El.addEventListener&&(El.addEventListener(`pagehide`,e=>{this.conn&&(this.disconnect(),r=this.connectClock)}),El.addEventListener(`pageshow`,e=>{r===this.connectClock&&(r=null,this.connect())}),El.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(e,t,n)=>{console.log(`${e}: ${t}`,n)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=wl(t.params||{}),this.endPoint=`${e}/${Fl.websocket}`,this.vsn=t.vsn||Ol,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new zl(()=>{if(this.pageHidden){this.log(`Not reconnecting as page is hidden!`),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken&&wl(t.authToken)}getLongPollTransport(){return Ul}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&=(this.conn.close(),null),this.transport=e}protocol(){return location.protocol.match(/^https/)?`wss`:`ws`}endPointURL(){let e=Vl.appendParams(Vl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)===`/`?e.charAt(1)===`/`?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`:e}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log(`passing params to connect is deprecated. Instead pass :params to the Socket constructor`),this.params=wl(e)),(!this.conn||this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Ul?this.connectWithF
vendor: 4,375 bytes, line 3
3allback(Ul,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:t});let r=this.onMessage(i=>{i.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Ul:return`LongPoll`;default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=[`phoenix`,`${Ll}${btoa(this.authToken()).replace(/=/g,``)}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,i,a,o=this.transportName(e),s=t=>{this.log(`transport`,`falling back to ${o}...`,t),this.off([i,a]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return s(`memorized`);this.fallbackTimer=setTimeout(s,t),a=this.onError(e=>{this.log(`transport`,`error`,e),r&&!n&&(clearTimeout(this.fallbackTimer),s(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let t=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t}`,`true`),this.log(`transport`,`established ${t} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,t),this.ping(e=>{this.log(`transport`,`connected to primary after`,e),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log(`transport`,`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks(`open`)}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log(`transport`,`heartbeat timeout. Attempting to re-establish connection`);try{this.heartbeatCallback(`timeout`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.triggerChanError(Error(`heartbeat timeout`)),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),Al,`heartbeat timeout`)}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();let r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||``):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Ml.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log(`transport`,`close`,e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks(`close`,e)}onConnError(e){this.hasLogger()&&this.log(`transport`,`error`,e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks(`error`,e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}
vendor: 11,846 bytes, line 3
3triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Pl.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Ml.connecting:return`connecting`;case Ml.open:return`open`;case Ml.closing:return`closing`;default:return`closed`}}isConnected(){return this.connectionState()===`open`}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([t])=>e.indexOf(t)===-1)}channel(e,t={}){let n=new Bl(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;this.log(`push`,`${t} ${n} (${a}, ${i})`,r)}this.isConnected()?this.encode(e,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(e,e=>this.conn.send(e)))}makeRef(){let e=this.ref+1;return this.ref=e===this.ref?0:e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback(`disconnected`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback(`sent`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;if(i&&i===this.pendingHeartbeatRef){let e=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(r.status===`ok`?`ok`:`error`,e)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log(`receive`,`${r.status||``} ${t} ${n} ${i&&`(`+i+`)`||``}`.trim(),r);for(let e=0;e<this.channels.length;e++){let o=this.channels[e];o.isMember(t,n,r,a)&&o.trigger(n,r,i,a)}this.triggerStateCallbacks(`message`,e)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(t){this.log(`error`,`error in ${e} callback`,t)}})}catch(t){this.log(`error`,`error triggering ${e} callbacks`,t)}}leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t.isJoined()||t.isJoining()));t&&(this.hasLogger()&&this.log(`transport`,`leaving duplicate topic "${e}"`),t.leave())}},ql=class e{constructor(t,n){let r=Xl(n);this.presence=new Wl(t.getChannel(),r),this.presence.onJoin((n,r,i)=>{let a=e.onJoinPayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onLeave((n,r,i)=>{let a=e.onLeavePayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onSync(()=>{t.getChannel().trigger(`presence`,{event:`sync`})})}get state(){return e.transformState(this.presence.state)}static transformState(e){return e=Yl(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{let r=e[n];return t[n]=Jl(r),t},{})}static onJoinPayload(e,t,n){return{event:`join`,key:e,currentPresences:Zl(t),newPresences:Jl(n)}}static onLeavePayload(e,t,n){return{event:`leave`,key:e,currentPresences:Zl(t),leftPresences:Jl(n)}}};function Jl(e){return e.metas.map(e=>{let t=Object.getOwnPropertyDescriptors(e),n=Object.defineProperties({},t);return n.presence_ref=n.phx_ref,delete n.phx_ref,delete n.phx_ref_prev,n})}function Yl(e){return JSON.parse(JSON.stringify(e))}function Xl(e){return e?.events&&{events:e.events}}function Zl(e){return e?.metas?Jl(e):[]}var Ql;(function(e){e.SYNC=`sync`,e.JOIN=`join`,e.LEAVE=`leave`})(Ql||={});var $l=class{get state(){return this.presenceAdapter.state}constructor(e,t){this.channel=e,this.presenceAdapter=new ql(this.channel.channelAdapter,t)}};function eu(e){if(e instanceof Error)return e;if(typeof e==`string`)return Error(e);if(e&&typeof e==`object`){let t=e;if(typeof t.code==`number`){let n=typeof t.reason==`string`&&t.reason?` (${t.reason})`:``;return Error(`socket closed: ${t.code}${n}`,{cause:e})}return Error(`channel error: transport failure`,{cause:e})}return Error(`channel error: connection lost`)}var tu=class{constructor(e,t,n){let r=nu(n);this.channel=e.getSocket().channel(t,r),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,t){return this.channel.on(e,t)}off(e,t){this.channel.off(e,t)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,t,n){let r;try{r=this.channel.push(e,t,n)}catch{throw Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>100){let e=this.channel.pushBuffer.shift();e.cancelTimeout(),this.socket.log(`channel`,`discarded push due to buffer overflow: ${e.event}`,e.payload())}return r}updateJoinPayload(e){let t=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},t),e)}canPush(){return this.socket.isConnected()&&this.state===ul.joined}isJoined(){return this.state===ul.joined}isJoining(){return this.state===ul.joining}isClosed(){return this.state===ul.closed}isLeaving(){return this.state===ul.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}};function nu(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},e.config)}}var ru=/[,()"\\]/,iu=e=>ru.test(e)||e!==e.trim(),au=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`,ou=e=>{let t=e===null?`null`:String(e);return iu(t)?au(t):t},su=e=>e===null?`null`:String(e),cu=(e,t)=>{if(e===`in`){let e=Array.isArray(t)?t:[t];if(e.length===0)throw Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(e)).map(e=>ou(e)).join(`,`)})`}return e===`is`?`is.${su(t)}`:`${e}.${ou(t)}`},lu=class{constructor(){this.filters=[]}add(e,t,n,r=!1){let i=r?`not.`:``;return this.filters.push(`${e}=${i}${cu(t,n)}`),this}eq(e,t){return this.add(e,`eq`,t)}neq(e,t){return this.add(e,`neq`,t)}gt(e,t){return this.add(e,`gt`,t)}gte(e,t){return this.add(e,`gte`,t)}lt(e,t){return this.add(e,`lt`,t)}lte(e,t){return this.add(e,`lte`,t)}in(e,t){return this.add(e,`in`,t)}like(e,t){return this.add(e,`like`,t)}ilike(e,t){return this.add(e,`ilike`,t)}match(e,t){return this.add(e,`match`,t)}imatch(e,t){return this.add(e,`imatch`,t)}is(e,t){return this.add(e,`is`,t)}isDistinct(e,t){return this.add(e,`isdistinct`,t)}not(e,t,n){return this.add(e,t,n,!0)}build(){return this.filters.join(`,`)}toString(){return this.build()}},uu;(function(e){e.ALL=`*`,e.INSERT=`INSERT`,e.UPDATE=`UPDATE`,e.DELETE=`DELETE`})(uu||={});var du;(function(e){e.BROADCAST=`broadcast`,e.PRESENCE=`presence`,e.POSTGRES_CHANGES=`postgres_changes`,e.SYSTEM=`system`})(du||={});var fu;(function(e){e.SUBSCRIBED=`SUBSCRIBED`,e.TIMED_OUT=`TIMED_OUT`,e.CLOSED=`CLOSED`,e.CHANNEL_ERROR=`CHANNEL_ERROR`})(fu||={});var pu=class e{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,t={config:{}},n){if(this.topic=e,this.params=t,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,``),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},t.config),this.channelAdapter=new tu(this.socket.socketAdapter,e,this.params),this.presence=new $l(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=Cl(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&this.params.config?.broadcast?.replay)throw Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,t=this.timeout){if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){let{config:{broadcast:n,presence:r,private:i,postgres_changes_options:a}}=this.params,o=this.bindings.postgres_changes?.map(e=>e.filter)??[],s=!!this.bindings[du.PRESENCE]&&this.bindings[du.PRESENCE].length>0||this.params.config.presence?.enabled===!0,c={},l=Object.assign({broadcast:n,presence:Object.assign(Object.assign({},r),{enabled:s}),postgres_changes:o,private:i},a?{postgres_changes_options:a}:{});this.socket.accessTokenValue&&(c.access_token=this.socket.accessTokenValue),this._onError(t=>{e?.(fu.CHANNEL_ERROR,eu(t))}),this._onClose(()=>e?.(fu.CLOSED)),this.updateJoinPayload(Object.assign({config:l},c)),this._updateFilterMessage();let u=a?.wait&&o.length>0?Math.max(t,(a.timeout??cl)+ll):t;this.channelAdapter.subscribe(u).receive(`ok`,async({postgres_changes:t})=>{if(this.socket._isManualToken()||this.socket.setAuth(),t===void 0){e?.(fu.SUBSCRIBED);return}this._updatePostgresBindings(t,e)}).receive(`error`,t=>{this.state=ul.errored;let n=Object.values(t).join(`, `)||`error`;e?.(fu.CHANNEL_ERROR,Error(n,{cause:t}))}).receive(`timeout`,()=>{e?.(fu.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){let r=this.bindings.postgres_changes,i=r?.length??0,a=[];for(let o=0;o<i;o++){let i=r[o],{filter:{event:s,schema:c,table:l,filter:u}}=i,d=t&&t[o];if(d&&d.event===s&&e.isFilterValueEqual(d.schema,c)&&e.isFilterValueEqual(d.table,l)&&e.isFilterValueEqual(d.filter,u))a.push(Object.assign(Object.assign({},i),{id:d.id}));else{this.unsubscribe(),this.state=ul.errored,n?.(fu.CHANNEL_ERROR,Error(`mismatch between server and client bindings for postgres changes`));return}}this.bindings.postgres_changes=a,this.state!=ul.errored&&n&&n(fu.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:`presence`,event:`track`,payload:e},t)}async untrack(e={}){return await this.send({type:`presence`,event:`untrack`},e)}on(e,t,n){let r=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===du.PRESENCE||e===du.POSTGRES_CHANGES;if(r&&i)throw this.socket.log(`channel`,`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,t,n)}async httpSend(e,t,n={}){if(t==null)return Promise.reject(Error(`Payload is required for httpSend()`));let r=t instanceof ArrayBuffer||ArrayBuffer.isView(t),i={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":r?`application/octet-stream`:`application/json`};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&a.searchParams.set(`private`,`true`);let o={method:`POST`,headers:i,body:r?t:JSON.stringify(t)},s=await this._fetchWithTimeout(a.toString(),o,n.timeout??this.timeout);if(s.status===202)return{success:!0};if(s.status===404)return Promise.reject(Error(`httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
3ime-js/migrations/httpsend-server-version.md`));let c=s.statusText;try{let e=await s.json();c=e.error||e.message||c}catch{}return Promise.reject(Error(c))}async send(e,t={}){if(!this.channelAdapter.canPush()&&e.type===`broadcast`){let n=`Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.`;this.socket.hasLogger()?this.socket.log(`channel`,n):console.warn(n);let{event:r,payload:i}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":`application/json`};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);let o={method:`POST`,headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:r,payload:i,private:this.private}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,o,t.timeout??this.timeout);return await e.body?.cancel(),e.ok?`ok`:`error`}catch(e){return e instanceof Error&&e.name===`AbortError`?`timed out`:`error`}}return new Promise(n=>{let r=this.channelAdapter.push(e.type,e,t.timeout||this.timeout);e.type===`broadcast`&&!this.params?.config?.broadcast?.ack&&n(`ok`),r.receive(`ok`,()=>n(`ok`)),r.receive(`error`,()=>n(`error`)),r.receive(`timeout`,()=>n(`timed out`))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(t=>{this.channelAdapter.unsubscribe(e).receive(`ok`,()=>t(`ok`)).receive(`timeout`,()=>t(`timed out`)).receive(`error`,()=>t(`error`))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,t,n){let r=new AbortController,i=setTimeout(()=>r.abort(),n),a=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),a}_on(t,n,r){let i=t.toLocaleLowerCase(),a=n?.filter;if((a instanceof lu||typeof a==`object`&&a&&typeof a.build==`function`)&&(n=Object.assign(Object.assign({},n),{filter:a.build()})),i===du.POSTGRES_CHANGES&&this.bindings[i]?.find(t=>e.isSamePostgresFilter(t.filter,n)))return this.socket.log(`error`,`duplicate \`postgres_changes\` binding for ${this.topic} ignored`,n),this;let o=this.channelAdapter.on(t,r),s={type:i,filter:n,callback:r,ref:o};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,t,n)=>{let r=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(r,n))return!1;let i=this.bindings[r]?.find(t=>t.ref===e.ref);if(!i)return!0;if([`broadcast`,`presence`,`postgres_changes`].includes(r)){if(`id`in i){let e=i.id,n=i.filter?.event;return e&&t.ids?.includes(e)&&(n===`*`||n?.toLocaleLowerCase()===t.data?.type.toLocaleLowerCase())}{let e=(i?.filter?.event)?.toLocaleLowerCase();return e===`*`||e===(t?.event)?.toLocaleLowerCase()}}return i.type.toLocaleLowerCase()===r})}_notThisChannelEvent(e,t){let{close:n,error:r,leave:i,join:a}=dl;return t&&[n,r,i,a].includes(e)&&t!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,t,n)=>{if(typeof t==`object`&&`ids`in t){let e=t.data,{schema:n,table:r,commit_timestamp:i,type:a,errors:o}=e;return Object.assign(Object.assign({},{schema:n,table:r,commit_timestamp:i,eventType:a,new:{},old:{},errors:o}),this._getPayloadRecords(e))}return t})}copyBindings(e){if(this.joinedOnce)throw Error(`cannot copy bindings into joined channel`);for(let t in e.bindings)for(let n of e.bindings[t])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,t){return(e??void 0)===(t??void 0)}static isSamePostgresFilter(t,n){let r=(t?.select)?.join()??void 0,i=(n?.select)?.join()??void 0;return t?.event===n?.event&&e.isFilterValueEqual(t?.schema,n?.schema)&&e.isFilterValueEqual(t?.table,n?.table)&&e.isFilterValueEqual(t?.filter,n?.filter)&&r===i}_getPayloadRecords(e){let t={new:{},old:{}};return(e.type===`INSERT`||e.type===`UPDATE`)&&(t.new=ml(e.columns,e.record)),(e.type===`UPDATE`||e.type===`DELETE`)&&(t.old=ml(e.columns,e.old_record)),t}},mu=class{constructor(e,t){this.socket=new Kl(e,t)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,t,n,r=1e4){return new Promise(i=>{setTimeout(()=>i(`timeout`),r),this.socket.disconnect(()=>{e(),i(`ok`)},t,n)})}push(e){this.socket.push(e)}log(e,t,n){this.socket.log(e,t,n)}hasLogger(){return this.socket.hasLogger()}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==fl.connecting}isDisconnecting(){return this.socket.connectionState()==fl.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}},hu={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},gu=[1e3,2e3,5e3,1e4],_u=1e4;function vu(){let e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){return Array.from(e.keys())[t]??null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function yu(){try{if(typeof globalThis<`u`&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return vu()}var bu=` 4 addEventListener("message", (e) => { 5 if (e.data.event === "start") { 6 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 7 } 8 });`,xu=class{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,t){if(this.channels=[],this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint=``,this.headers={},this.params={}
8,this.ref=0,this.serializer=new pl,this._manuallySetToken=!1,this._authPromise=null,this._authGeneration=0,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),!t?.params?.apikey)throw Error(`API key is required to connect to Realtime`);this.apiKey=t.params.apikey;let n=this._initializeOptions(t);this.socketAdapter=new mu(e,n),this.httpEndpoint=Cl(e),this.fetch=this._resolveFetch(t?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely(`connect`),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){let t=e.message;throw Error(`WebSocket not available: ${t}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,t){return this._cancelPendingDisconnect(),this.isDisconnecting()?`ok`:await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,t)}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return t===`ok`&&e.teardown(),t}async removeAllChannels(){let e=this.channels.map(async e=>{let t=await e.unsubscribe();return e.teardown(),t}),t=await Promise.all(e);return await this.disconnect(),t}log(e,t,n){this.socketAdapter.log(e,t,n)}hasLogger(){return this.socketAdapter.hasLogger()}connectionState(){return this.socketAdapter.connectionState()||fl.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,t={config:{}}){let n=`realtime:${e}`,r=this.getChannels().find(e=>e.topic===n);if(r)return r;{let n=new pu(`realtime:${e}`,t,this);return this._cancelPendingDisconnect(),this.channels.push(n),n}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){let t=++this._authGeneration,n=this._performAuth(e,t);t===this._authGeneration&&(this._authPromise=n);try{await n}finally{this._authPromise===n&&(this._authPromise=null)}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic),this.channels.length===0&&(this.log(`transport`,`no channels remaining, scheduling disconnect`),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log(`transport`,`disconnecting immediately - no channels`),this.disconnect();return}
8this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log(`transport`,`deferred disconnect fired - no channels, disconnecting`),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log(`transport`,`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log(`transport`,`pending disconnect cancelled - channel activity detected`),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e,t){let n,r=!1;if(e)n=e,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(e){this.log(`error`,`Error fetching access token from callback`,e),n=this.accessTokenValue}else n=this.accessTokenValue;t===this._authGeneration&&(this.accessToken?this._manuallySetToken=!1:r&&(this._manuallySetToken=!0),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(e=>{let t={access_token:n,version:rl};e.updateJoinPayload(t),e.joinedOnce&&e.channelAdapter.isJoined()&&e.channelAdapter.push(dl.access_token,{access_token:n})})))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e=`general`){this._isManualToken()||this.setAuth().catch(t=>{this.log(`error`,`Error setting auth in ${e}`,t)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(e=>{this.log(`error`,`error waiting for auth on connect`,e)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(t,n)=>{t!==`disconnected`&&(t==`sent`&&this._setAuthSafely(),e&&e(t,n))}}_startWorkerHeartbeat(){this.workerUrl?this.log(`worker`,`starting worker for from ${this.workerUrl}`):this.log(`worker`,`starting default worker`);let e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log(`worker`,`worker error`,e.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=e=>{e.data.event===`keepAlive`&&this.sendHeartbeat()},this.workerRef.postMessage({event:`start`,interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&=(this.log(`worker`,`terminating worker`),this.workerRef.terminate(),void 0)}_workerObjectUrl(e){let t;if(e)t=e;else{let e=new Blob([bu],{type:`application/javascript`});t=URL.createObjectURL(e)}return t}_initializeOptions(e){this.worker=e?.worker??!1,this.accessToken=e?.accessToken??null;let t={};t.timeout=e?.timeout??sl,t.heartbeatIntervalMs=e?.heartbeatIntervalMs??hu.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=e?.disconnectOnEmptyChannelsAfterMs??2*(e?.heartbeatIntervalMs??hu.HEARTBEAT_INTERVAL),t.transport=e?.transport??nl.getWebSocketConstructor(),t.params=e?.params,t.logger=e?.logger,t.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),t.sessionStorage=e?.sessionStorage??yu(),t.reconnectAfterMs=e?.reconnectAfterMs??(e=>gu[e-1]||_u);let n,r,i=e?.vsn??ol;switch(i){case il:n=(e,t)=>t(JSON.stringify(e)),r=(e,t)=>t(JSON.parse(e));break;case al:n=this.serializer.encode.bind(this.serializer),r=this.serializer.decode.bind(this.serializer);break;default:throw Error(`Unsupported serializer version: ${t.vsn}`)}if(t.vsn=i,t.encode=e?.encode??n,t.decode=e?.decode??r,t.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,t.params=Object.assign(Object.assign({},t.params),{log_level:this.logLevel})),this.worker){if(typeof window<`u`&&!window.Worker)throw Error(`Web Worker is not supported`);this.workerUrl=e?.workerUrl,t.autoSendHeartbeat=!this.worker}return t}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
vendor: 4,836 bytes, line 8
8,Su=class extends Error{constructor(e,t){super(e),this.name=`IcebergError`,this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType===`CommitStateUnknownException`||[500,502,504].includes(t.status)&&t.icebergType?.includes(`CommitState`)===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Cu(e,t,n){let r=new URL(t,e);if(n)for(let[e,t]of Object.entries(n))t!==void 0&&r.searchParams.set(e,t);return r.toString()}async function wu(e){return!e||e.type===`none`?{}:e.type===`bearer`?{Authorization:`Bearer ${e.token}`}:e.type===`header`?{[e.name]:e.value}:e.type===`custom`?await e.getHeaders():{}}function Tu(e){let t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:a,headers:o}){let s=Cu(e.baseUrl,r,i),c=await wu(e.auth),l=await t(s,{method:n,headers:{...a?{"Content-Type":`application/json`}:{},...c,...o},body:a?JSON.stringify(a):void 0}),u=await l.text(),d=(l.headers.get(`content-type`)||``).includes(`application/json`),f=d&&u?JSON.parse(u):u;if(!l.ok){let e=d?f:void 0,t=e?.error;throw new Su(t?.message??`Request failed with status ${l.status}`,{status:l.status,icebergType:t?.type,icebergCode:t?.code,details:e})}return{status:l.status,headers:l.headers,data:f}}}}function Eu(e){return e.join(`�`)}var Du=class{constructor(e,t=``){this.client=e,this.prefix=t}async listNamespaces(e){let t=e?{parent:Eu(e.namespace)}:void 0;return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(e=>({namespace:e}))}async createNamespace(e,t){let n={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:`DELETE`,path:`${this.prefix}/namespaces/${Eu(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${Eu(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${Eu(e.namespace)}`}),!0}catch(e){if(e instanceof Su&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(e){if(e instanceof Su&&e.status===409)return;throw e}}};function Ou(e){return e.join(`�`)}var ku=class{constructor(e,t=``,n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${Ou(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){let n={};return this.accessDelegation&&(n[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${Ou(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){let n=await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${Ou(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data[`metadata-location`],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:`DELETE`,path:`${this.prefix}/namespaces/${Ou(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){let t={};return this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${Ou(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){let t={};this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation);try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${Ou(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(e){if(e instanceof Su&&e.status===404)return!1;throw e}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Su&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},Au=class{constructor(e){let t=`v1`;e.catalogName&&(t+=`/${e.catalogName}`);let n=e.baseUrl.endsWith(`/`)?e.baseUrl:`${e.baseUrl}/`;this.client=Tu({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(`,`),this.namespaceOps=new Du(this.client,t),this.tableOps=new ku(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
8async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};function ju(e){"@babel/helpers - typeof";return ju=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ju(e)}function Mu(e,t){if(ju(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(ju(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Nu(e){var t=Mu(e,`string`);return ju(t)==`symbol`?t:t+``}function Pu(e,t,n){return(t=Nu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fu(Object(n),!0).forEach(function(t){Pu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Iu=class extends Error{constructor(e,t=`storage`,n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t===`vectors`?`StorageVectorsError`:`StorageError`,this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Lu(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}var Ru=class extends Iu{constructor(e,t,n,r=`storage`,i){super(e,r,t,n),this.name=r===`vectors`?`StorageVectorsApiError`:`StorageApiError`,this.status=t,this.statusCode=n,this.code=i}toJSON(){return H(H({},super.toJSON()),{},{code:this.code})}},zu=class extends Iu{constructor(e,t,n=`storage`){super(e,n),this.name=n===`vectors`?`StorageVectorsUnknownError`:`StorageUnknownError`,this.originalError=t}};function Bu(e,t,n){let r=H({},e),i=t.toLowerCase();for(let e of Object.keys(r))e.toLowerCase()===i&&delete r[e];return r[i]=n,r}function Vu(e){let t={};for(let[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}var Hu=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Uu=e=>{if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Wu=e=>{if(Array.isArray(e))return e.map(e=>Wu(e));if(typeof e==`function`||e!==Object(e))return e;let t={};return Object.entries(e).forEach(([e,n])=>{let r=e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,``));t[r]=Wu(n)}),t},Gu=e=>!e||typeof e!=`string`||e.length===0||e.length>100||e.trim()!==e||e.includes(`/`)||e.includes(`\\`)?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Ku=e=>e.split(`/`).map(encodeURIComponent).join(`/`),qu=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.msg==`string`)return t.msg;if(typeof t.message==`string`)return t.message;if(typeof t.error_description==`string`)return t.error_description;if(typeof t.error==`string`)return t.error;if(typeof t.error==`object`&&t.error!==null){let e=t.error;if(typeof e.message==`string`)return e.message}}return JSON.stringify(e)},Ju=async(e,t,n,r)=>{if(typeof e==`object`&&e&&`json`in e&&typeof e.json==`function`){let n=e,i=parseInt(String(n.status),10);Number.isFinite(i)||(i=500),n.json().then(e=>{let n=e?.statusCode||e?.code||i+``;t(new Ru(qu(e),i,n,r,e?.code))}).catch(()=>{let e=i+``;t(new Ru(n.statusText||`HTTP ${i} error`,i,e,r))})}else t(new zu(qu(e),e,r))},Yu=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};if(e===`GET`||e===`HEAD`||!r)return H(H({},i),n);if(Uu(r)){let e=t?.headers||{},n;for(let[t,r]of Object.entries(e))t.toLowerCase()===`content-type`&&(n=r);i.headers=Bu(e,`Content-Type`,n??`application/json`),i.body=JSON.stringify(r)}else i.body=r;return t?.duplex&&(i.duplex=t.duplex),H(H({},i),n)};async function Xu(e,t,n,r,i,a,o){return new Promise((s,c)=>{e(n,Yu(t,r,i,a)).then(e=>{if(!e.ok)throw e;if(r?.noResolveJson)return e;if(o===`vectors`){let t=e.headers.get(`content-type`);if(e.headers.get(`content-length`)===`0`||e.status===204||!t||!t.includes(`application/json`))return{}}return e.json()}).then(e=>s(e)).catch(e=>Ju(e,c,r,o))})}function Zu(e=`storage`){return{get:async(t,n,r,i)=>Xu(t,`GET`,n,r,i,void 0,e),post:async(t,n,r,i,a)=>Xu(t,`POST`,n,i,a,r,e),put:async(t,n,r,i,a)=>Xu(t,`PUT`,n,i,a,r,e),head:async(t,n,r,i)=>Xu(t,`HEAD`,n,H(H({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,a)=>Xu(t,`DELETE`,n,i,a,r,e)}}var{get:Qu,post:$u,put:ed,head:td,remove:nd}=Zu(`storage`),rd=Zu(`vectors`),id=class{constructor(e,t={},n,r=`storage`){this.shouldThrowOnError=!1,this.url=e,this.headers=Vu(t),this.fetch=Hu(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Bu(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Lu(e))return{data:null,error:e};throw e}}},ad=Symbol.toStringTag,od=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[ad]=`StreamDownloadBuilder`,this.promise=null}
8then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||=this.execute(),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Lu(t))return{data:null,error:t};throw t}}},sd=Symbol.toStringTag,cd=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[sd]=`BlobDownloadBuilder`,this.promise=null}asStream(){return new od(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||=this.execute(),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Lu(t))return{data:null,error:t};throw t}}},ld={limit:100,offset:0,sortBy:{column:`name`,order:`asc`}},ud={cacheControl:`3600`,contentType:`text/plain;charset=UTF-8`,upsert:!1},dd=class extends id{constructor(e,t={},n,r){super(e,t,r,`storage`),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let a,o=H(H({},ud),r),s=H(H({},i.headers),e===`POST`&&{"x-upsert":String(o.upsert)}),c=o.metadata;if(typeof Blob<`u`&&n instanceof Blob?(a=new FormData,a.append(`cacheControl`,o.cacheControl),c&&a.append(`metadata`,i.encodeMetadata(c)),a.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(a=n,a.has(`cacheControl`)||a.append(`cacheControl`,o.cacheControl),c&&!a.has(`metadata`)&&a.append(`metadata`,i.encodeMetadata(c))):(a=n,s[`cache-control`]=`max-age=${o.cacheControl}`,s[`content-type`]=o.contentType,c&&(s[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&a instanceof ReadableStream||a&&typeof a==`object`&&`pipe`in a&&typeof a.pipe==`function`)&&!o.duplex&&(o.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))s=Bu(s,e,t);let l=i._removeEmptyFolders(t),u=i._getFinalPath(l),d=await(e==`PUT`?ed:$u)(i.fetch,`${i.url}/object/${u}`,a,H({headers:s},o?.duplex?{duplex:o.duplex}:{}));return{path:l,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate(`POST`,e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;let a=i._removeEmptyFolders(e),o=i._getFinalPath(a),s=new URL(i.url+`/object/upload/sign/${o}`);return s.searchParams.set(`token`,t),i.handleOperation(async()=>{let e,t=H(H({},ud),r),o=H(H({},i.headers),{"x-upsert":String(t.upsert)}),c=t.metadata;if(typeof Blob<`u`&&n instanceof Blob?(e=new FormData,e.append(`cacheControl`,t.cacheControl),c&&e.append(`metadata`,i.encodeMetadata(c)),e.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(e=n,e.has(`cacheControl`)||e.append(`cacheControl`,t.cacheControl),c&&!e.has(`metadata`)&&e.append(`metadata`,i.encodeMetadata(c))):(e=n,o[`cache-control`]=`max-age=${t.cacheControl}`,o[`content-type`]=t.contentType,c&&(o[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&e instanceof ReadableStream||e&&typeof e==`object`&&`pipe`in e&&typeof e.pipe==`function`)&&!t.duplex&&(t.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))o=Bu(o,e,t);return{path:a,fullPath:(await ed(i.fetch,s.toString(),e,H({headers:o},t?.duplex?{duplex:t.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e),i=H({},n.headers);t?.upsert&&(i[`x-upsert`]=`true`);let a=await $u(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),o=new URL(n.url+a.url),s=o.searchParams.get(`token`);if(!s)throw new Iu(`No token returned by API`);return{signedUrl:o.toString(),path:e,token:s}})}async update(e,t,n){return this.uploadOrUpdate(`PUT`,e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await $u(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
8stinationBucket:n?.destinationBucket,sourceVersionId:n?.sourceVersionId},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await $u(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket,sourceVersionId:n?.sourceVersionId},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e),a=typeof n?.transform==`object`&&n.transform!==null&&Object.keys(n.transform).length>0,o=await $u(r.fetch,`${r.url}/object/sign/${i}`,H(H({expiresIn:t},a?{transform:n.transform}:{}),n?.versionId==null?{}:{versionId:n.versionId}),{headers:r.headers}),s=new URLSearchParams;n?.download&&s.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&s.set(`cacheNonce`,String(n.cacheNonce));let c=s.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${c?`&${c}`:``}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{let i=await $u(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),a=new URLSearchParams;n?.download&&a.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&a.set(`cacheNonce`,String(n.cacheNonce));let o=a.toString();return i.map(e=>H(H({},e),{},{signedUrl:e.signedURL?encodeURI(`${r.url}${e.signedURL}${o?`&${o}`:``}`):null}))})}download(e,t,n){let r=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image/authenticated`:`object`,i=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(i,t.transform),t?.cacheNonce!=null&&i.set(`cacheNonce`,String(t.cacheNonce)),t?.versionId!=null&&i.set(`versionId`,String(t.versionId));let a=i.toString(),o=this._getFinalPath(e);return new cd(()=>Qu(this.fetch,`${this.url}/${r}/${o}${a?`?${a}`:``}`,{headers:this.headers,noResolveJson:!0},n),this.shouldThrowOnError)}async info(e,t){var n=this;let r=n._getFinalPath(e),i=new URLSearchParams;t?.versionId!=null&&i.set(`versionId`,String(t.versionId));let a=i.toString();return n.handleOperation(async()=>Wu(await Qu(n.fetch,`${n.url}/object/info/${r}${a?`?${a}`:``}`,{headers:n.headers})))}async exists(e){var t=this;let n=t._getFinalPath(e);try{return await td(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Lu(e)){let t=e instanceof Ru?e.status:e instanceof zu?e.originalError?.status:void 0;if(t!==void 0&&[400,404].includes(t))return{data:!1,error:e}}throw e}}getPublicUrl(e,t){let n=this._getFinalPath(e),r=new URLSearchParams;t?.download&&r.set(`download`,t.download===!0?``:t.download),t?.transform&&this.applyTransformOptsToQuery(r,t.transform),t?.cacheNonce!=null&&r.set(`cacheNonce`,String(t.cacheNonce)),t?.versionId!=null&&r.set(`versionId`,String(t.versionId));let i=r.toString(),a=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image`:`object`;return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}`)+(i?`?${i}`:``)}}}async remove(e){var t=this;return t.handleOperation(async()=>await nd(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,n){var r=this;return r.handleOperation(async()=>{let i=Ku(r._getFinalPath(e)),a=new URLSearchParams;t?.transformations&&a.set(`transformations`,`true`);let o=a.toString();return await nd(r.fetch,`${r.url}/cdn/${i}${o?`?${o}`:``}`,{},{headers:r.headers},n)})}async list(e,t,n){var r=this;return r.handleOperation(async()=>{let i=t?.sortBy?H(H({},ld.sortBy),t.sortBy):ld.sortBy,a=H(H(H({},ld),t),{},{sortBy:i,prefix:e||``});return await $u(r.fetch,`${r.url}/object/list/${r.bucketId}`,a,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{let r=H({},e);return await $u(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<`u`?Buffer.from(e).toString(`base64`):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,``)}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,``).replace(/\/+/g,`/`)}applyTransformOptsToQuery(e,t){return t.width&&e.set(`width`,t.width.toString()),t.height&&e.set(`height`,t.height.toString()),t.resize&&e.set(`resize`,t.resize),t.format&&e.set(`format`,t.format),t.quality&&e.set(`quality`,t.quality.toString()),e}},fd={"X-Client-Info":`storage-js/2.116.0`},pd=class extends id{constructor(e,t={},n,r){let i=new URL(e);r?.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes(`storage.supabase.`)&&(i.hostname=i.hostname.replace(`supabase.`,`storage.supabase.`));let a=i.href.replace(/\/$/,``),o=H(H({},fd),t);super(a,o,n,`storage`)}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=t.listBucketOptionsToQueryString(e);return await Qu(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Qu(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await $u(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes,versioning_status:t.ver
8sioningStatus},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await ed(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes,versioning_status:t.versioningStatus},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await $u(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await nd(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async getBucketLifecycle(e){var t=this;return t.handleOperation(async()=>await Qu(t.fetch,t.bucketLifecycleUrl(e),{headers:t.headers}))}async updateBucketLifecycle(e,t){var n=this;return n.handleOperation(async()=>await ed(n.fetch,n.bucketLifecycleUrl(e),t,{headers:n.headers}))}async deleteBucketLifecycle(e){var t=this;return t.handleOperation(async()=>await nd(t.fetch,t.bucketLifecycleUrl(e),{},{headers:t.headers}))}async purgeBucketCache(e,t,n){var r=this;return r.handleOperation(async()=>{let i=new URLSearchParams;t?.transformations&&i.set(`transformations`,`true`);let a=i.toString();return await nd(r.fetch,`${r.url}/cdn/${Ku(e)}${a?`?${a}`:``}`,{},{headers:r.headers},n)})}bucketLifecycleUrl(e){return`${this.url}/bucket/${Ku(e)}/lifecycle`}listBucketOptionsToQueryString(e){let t={};return e&&(`limit`in e&&(t.limit=String(e.limit)),`offset`in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?`?`+new URLSearchParams(t).toString():``}},md=class extends id{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=H(H({},fd),t);super(r,i,n,`storage`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await $u(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=new URLSearchParams;e?.limit!==void 0&&n.set(`limit`,e.limit.toString()),e?.offset!==void 0&&n.set(`offset`,e.offset.toString()),e?.sortColumn&&n.set(`sortColumn`,e.sortColumn),e?.sortOrder&&n.set(`sortOrder`,e.sortOrder),e?.search&&n.set(`search`,e.search);let r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Qu(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await nd(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!Gu(e))throw new Iu(`Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.`);let n=new Au({baseUrl:this.url,catalogName:e,auth:{type:`custom`,getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(e,t){let n=e[t];return typeof n==`function`?async(...t)=>{try{return{data:await n.apply(e,t),error:null}}catch(e){if(r)throw e;return{data:null,error:e}}}:n}})}},hd=class extends id{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=H(H({},fd),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createIndex(e){var t=this;return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await rd.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await rd.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},gd=class extends id{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=H(H({},fd),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw Error(`Vector batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw Error(`segmentCount must be between 1 and 16`);if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw Error(`Keys batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},_d=class extends id{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=H(H({},fd),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await rd.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},vd=class extends _d{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new yd(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},yd=class extends hd{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,H(H({},e),{},{vectorBucketName:n.vectorBucketName}))}
8async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,H(H({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new bd(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},bd=class extends gd{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,H(H({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,H(H({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,H(H({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,H(H({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,H(H({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},xd=class extends pd{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new dd(this.url,this.headers,e,this.fetch)}get vectors(){return new vd(this.url+`/vector`,{headers:this.headers,fetch:this.fetch})}get analytics(){return new md(this.url+`/iceberg`,this.headers,this.fetch)}},Sd=`2.116.0`,Cd=3e4,wd=3*Cd,Td=2*Cd,Ed=`http://localhost:9999`,Dd=`supabase.auth.token`,Od={"X-Client-Info":`gotrue-js/${Sd}`},kd=`X-Supabase-Api-Version`,Ad={"2024-01-01":{timestamp:Date.parse(`2024-01-01T00:00:00.0Z`),name:`2024-01-01`}},jd=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Md=`sb_flow_id`,Nd=class extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name=`AuthError`,this.status=t,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}};function U(e){return typeof e==`object`&&!!e&&`__isAuthError`in e}var Pd=class extends Nd{constructor(e,t,n){super(e,t,n),this.name=`AuthApiError`,this.status=t,this.code=n}};function Fd(e){return U(e)&&e.name===`AuthApiError`}var Id=class extends Nd{constructor(e,t){super(e),this.name=`AuthUnknownError`,this.originalError=t}},Ld=class extends Nd{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}},Rd=class extends Ld{constructor(){super(`Auth session missing!`,`AuthSessionMissingError`,400,void 0)}};function zd(e){return U(e)&&e.name===`AuthSessionMissingError`}var Bd=class extends Ld{constructor(){super(`Auth session or user missing`,`AuthInvalidToken
8ResponseError`,500,void 0)}},Vd=class extends Ld{constructor(e){super(e,`AuthInvalidCredentialsError`,400,void 0)}},Hd=class extends Ld{constructor(e,t=null){super(e,`AuthImplicitGrantRedirectError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}};function Ud(e){return U(e)&&e.name===`AuthImplicitGrantRedirectError`}var Wd=class extends Ld{constructor(e,t=null){super(e,`AuthPKCEGrantCodeExchangeError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}},Gd=class extends Ld{constructor(){super(`PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.`,`AuthPKCECodeVerifierMissingError`,400,`pkce_code_verifier_not_found`)}},Kd=class extends Ld{constructor(e,t){super(e,`AuthRetryableFetchError`,t,void 0)}};function qd(e){return U(e)&&e.name===`AuthRetryableFetchError`}var Jd=class extends Ld{constructor(e=`Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)`){super(e,`AuthRefreshDiscardedError`,409,void 0)}};function Yd(e){return U(e)&&e.name===`AuthRefreshDiscardedError`}var Xd=class extends Ld{constructor(e,t,n){super(e,`AuthWeakPasswordError`,t,`weak_password`),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}},Zd=class extends Ld{constructor(e){super(e,`AuthInvalidJwtError`,400,`invalid_jwt`)}},Qd=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.split(``),$d=` 9\r=`.split(``),ef=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<$d.length;t+=1)e[$d[t].charCodeAt(0)]=-2;for(let t=0;t<Qd.length;t+=1)e[Qd[t].charCodeAt(0)]=t;return e})();function tf(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)n(Qd[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6;else if(t.queuedBits>0)for(t.queue<<=6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;)n(Qd[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function nf(e,t,n){let r=ef[e];
9if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else if(r===-2)return;else throw Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}function rf(e){let t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=e=>{sf(e,r,n)};for(let t=0;t<e.length;t+=1)nf(e.charCodeAt(t),i,a);return t.join(``)}function af(e,t){if(e<=127){t(e);return}if(e<=2047){t(192|e>>6),t(128|e&63);return}if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function of(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){let t=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|t)+65536,n+=1}af(r,t)}}function sf(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw Error(`Invalid UTF-8 sequence`);--t.utf8seq}else if(t.utf8seq>0){if(e<=127)throw Error(`Invalid UTF-8 sequence`);t.codepoint=t.codepoint<<6|e&63,--t.utf8seq,t.utf8seq===0&&n(t.codepoint)}}function cf(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)nf(e.charCodeAt(t),n,r);return new Uint8Array(t)}function lf(e){let t=[];return of(e,e=>t.push(e)),new Uint8Array(t)}function uf(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>tf(e,n,r)),tf(null,n,r),t.join(``)}function df(e){return Math.round(Date.now()/1e3)+e}function ff(){return Symbol(`auth-callback`)}var pf=()=>typeof window<`u`&&typeof document<`u`,mf={tested:!1,writable:!1},hf=()=>{if(!pf())return!1;try{if(typeof globalThis.localStorage!=`object`)return!1}catch{return!1}if(mf.tested)return mf.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),mf.tested=!0,mf.writable=!0}catch{mf.tested=!0,mf.writable=!1}return mf.writable};function gf(e){let t={},n=new URL(e);if(n.hash&&n.hash[0]===`#`)try{new URLSearchParams(n.hash.substring(1)).forEach((e,n)=>{t[n]=e})}catch{}return n.searchParams.forEach((e,n)=>{t[n]=e}),t}var _f=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),vf=e=>typeof e==`object`&&!!e&&`status`in e&&`ok`in e&&`json`in e&&typeof e.json==`function`,yf=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},bf=async(e,t)=>{let n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},xf=async(e,t)=>{await e.removeItem(t)},Sf=class e{constructor(){this.promise=new e.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}};Sf.promiseConstructor=Promise;function Cf(e){let t=e.split(`.`);if(t.length!==3)throw new Zd(`Invalid JWT structure`);for(let e=0;e<t.length;e++)if(!jd.test(t[e]))throw new Zd(`JWT not in base64url format`);return{header:JSON.parse(rf(t[0])),payload:JSON.parse(rf(t[1])),signature:cf(t[2]),raw:{header:t[0],payload:t[1]}}}async function wf(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Tf(e,t){return new Promise((n,r)=>{(async()=>{for(let i=0;i<1/0;i++)try{let r=await e(i);if(!t(i,null,r)){n(r);return}}catch(e){if(!t(i,e)){r(e);return}}})()})}function Ef(e){return(`0`+e.toString(16)).substr(-2)}function Df(){let e=new Uint32Array(56);if(typeof crypto>`u`){let e=``;for(let t=0;t<56;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~`.charAt(Math.floor(Math.random()*66));return e}return crypto.getRandomValues(e),Array.from(e,Ef).join(``)}async function Of(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t),r=new Uint8Array(n);return Array.from(r).map(e=>String.fromCharCode(e)).join(``)}async function kf(e){if(!(typeof crypto<`u`&&crypto.subtle!==void 0&&typeof TextEncoder<`u`))return console.warn(`WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.`),e;let t=await Of(e);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var Af=/^[a-zA-Z0-9_-]{8,64}$/;function jf(e){return typeof e==`string`&&Af.test(e)?e:null}function Mf(){if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,Ef).join(``)}let e=``;for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}var Nf=(e,t)=>
9`${e}-flow-${t}-code-verifier`,Pf=e=>`${e}-flows-code-verifier`;async function Ff(e,t){let n=await bf(e,Pf(t));return Array.isArray(n)?n.filter(e=>jf(e)!==null):[]}async function If(e,t,n,r,i){await yf(e,Nf(t,n),r);let a=(await Ff(e,t)).filter(e=>e!==n);for(a.push(n);a.length>5;){let n=a.shift();await xf(e,Nf(t,n)),i?.(n)}await yf(e,Pf(t),a),await yf(e,`${t}-code-verifier`,r)}async function Lf(e,t,n){if(n){let r=await bf(e,Nf(t,n));return{verifier:typeof r==`string`?r:null,flowId:n}}let r=await bf(e,`${t}-code-verifier`);return{verifier:typeof r==`string`?r:null,flowId:null}}async function Rf(e,t,n){let r=`${t}-code-verifier`;if(!n){await xf(e,r);return}let i=Nf(t,n),a=await bf(e,i);await xf(e,i);let o=await Ff(e,t),s=o.filter(e=>e!==n);s.length!==o.length&&(s.length>0?await yf(e,Pf(t),s):await xf(e,Pf(t))),a!=null&&a===await bf(e,r)&&await xf(e,r)}async function zf(e,t){let n=await Ff(e,t);for(let r of n)await xf(e,Nf(t,r));await xf(e,Pf(t)),await xf(e,`${t}-code-verifier`)}function Bf(e,t){let n=e.indexOf(`#`),r=n===-1?e:e.slice(0,n),i=n===-1?``:e.slice(n),a=r.indexOf(`?`);if(a!==-1){let e=r.slice(0,a),t=r.slice(a+1).split(`&`).filter(e=>e!==``&&e!==`sb_flow_id`&&!e.startsWith(`sb_flow_id=`));r=t.length>0?`${e}?${t.join(`&`)}`:e}let o=r.includes(`?`)?`&`:`?`;return`${r}${o}${Md}=${encodeURIComponent(t)}${i}`}async function Vf(e,t,n=!1,r){let i=Df(),a=i;n&&(a+=`/recovery`);let o=Mf();await If(e,t,o,a,r);let s=await kf(i);return[s,i===s?`plain`:`s256`,o]}var Hf=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Uf(e){let t=e.headers.get(kd);if(!t||!t.match(Hf))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Wf(e){if(!e)throw Error(`Missing exp claim`);if(e<=Math.floor(Date.now()/1e3))throw Error(`JWT has expired`)}function Gf(e){switch(e){case`RS256`:return{name:`RSASSA-PKCS1-v1_5`,hash:{name:`SHA-256`}};case`ES256`:return{name:`ECDSA`,namedCurve:`P-256`,hash:{name:`SHA-256`}};default:throw Error(`Invalid alg claim`)}}var Kf=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function qf(e){if(!Kf.test(e))throw Error(`@supabase/auth-js: Expected parameter to be UUID but is not`)}function Jf(e){if(!e.passkey)throw Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Yf(e){if(!e.recoveryCodes)throw Error("@supabase/auth-js: the MFA recovery codes API is experimental and disabled by default. Enable it by passing `auth: { experimental: { recoveryCodes: true } }` to createClient (or to the GoTrueClient constructor).")}function Xf(){return new Proxy({},{get:(e,t)=>{if(t===`__isUserNotAvailableProxy`)return!0;if(typeof t==`symbol`){let e=t.toString();if(e===`Symbol(Symbol.toPrimitive)`||e===`Symbol(Symbol.toStringTag)`||e===`Symbol(util.inspect.custom)`)return}throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Zf(e,t){return new Proxy(e,{get:(e,n,r)=>{if(n===`__isInsecureUserWarningProxy`)return!0;if(typeof n==`symbol`){let t=n.toString();if(t===`Symbol(Symbol.toPrimitive)`||t===`Symbol(Symbol.toStringTag)`||t===`Symbol(util.inspect.custom)`||t===`Symbol(nodejs.util.inspect.custom)`)return Reflect.get(e,n,r)}return!t.value&&typeof n==`string`&&(console.warn(`Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.`),t.value=!0),Reflect.get(e,n,r)}})}function Qf(e){return JSON.parse(JSON.stringify(e))}var $f=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.msg==`string`)return t.msg;if(typeof t.message==`string`)return t.message;if(typeof t.error_description==`string`)return t.error_description;if(typeof t.error==`string`)return t.error}return JSON.stringify(e)},ep=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function tp(e){if(!vf(e))throw new Kd($f(e),0);let t;try{t=await e.json()}catch(t){throw ep.includes(e.status)?new Kd(e.statusText||`HTTP ${e.status}`,e.status):new Id($f(t),t)}if(ep.includes(e.status))throw new Kd($f(t),e.status);let n,r=Uf(e);if(r&&r.getTime()>=Ad[`2024-01-01`].timestamp&&typeof t==`object`&&t&&typeof t.code==`string`?n=t.code:typeof t==`object`&&t&&typeof t.error_code==`string`&&(n=t.error_code),!n){if(typeof t==`object`&&t&&typeof t.weak_password==`object`&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((e,t)=>
9e&&typeof t==`string`,!0))throw new Xd($f(t),e.status,t.weak_password.reasons)}else if(n===`weak_password`)throw new Xd($f(t),e.status,t.weak_password?.reasons||[]);else if(n===`session_not_found`)throw new Rd;throw new Pd($f(t),e.status||500,n)}var np=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};return e===`GET`?i:(i.headers=Object.assign({"Content-Type":`application/json;charset=UTF-8`},t?.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function W(e,t,n,r){let i=Object.assign({},r?.headers);i[`X-Supabase-Api-Version`]||(i[kd]=Ad[`2024-01-01`].name),r?.jwt&&(i.Authorization=`Bearer ${r.jwt}`);let a=r?.query??{};r?.redirectTo&&(a.redirect_to=r.redirectTo);let o=await rp(e,t,n+(Object.keys(a).length?`?`+new URLSearchParams(a).toString():``),{headers:i,noResolveJson:r?.noResolveJson},{},r?.body);return r?.xform?r?.xform(o):{data:Object.assign({},o),error:null}}async function rp(e,t,n,r,i,a){let o=np(t,r,i,a),s;try{s=await e(n,Object.assign({},o))}catch(e){throw new Kd($f(e),0)}if(s.ok||await tp(s),r?.noResolveJson)return s;try{return await s.json()}catch(e){await tp(e)}}function ip(e){let t=null;up(e)&&(t=Object.assign({},e),e.expires_at||(t.expires_at=df(e.expires_in)));let n=e.user??(typeof e?.id==`string`?e:null);return{data:{session:t,user:n},error:null}}function ap(e){let t=ip(e);return!t.error&&e.weak_password&&typeof e.weak_password==`object`&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message==`string`&&e.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0)&&(t.data.weak_password=e.weak_password),t}function op(e){return{data:{user:e.user??e},error:null}}function sp(e){return{data:e,error:null}}function cp(e){let{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,o=Tc(e,[`action_link`,`email_otp`,`hashed_token`,`redirect_to`,`verification_type`]);return{data:{properties:{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},user:Object.assign({},o)},error:null}}function lp(e){return e}function up(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}var dp=[`global`,`local`,`others`],fp=class{constructor({url:e=``,headers:t={},fetch:n,experimental:r}){this.url=e,this.headers=t,this.fetch=_f(n),this.experimental=r??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,t=dp[0]){if(dp.indexOf(t)<0)throw Error(`@supabase/auth-js: Parameter scope must be one of ${dp.join(`, `)}`);try{return await W(this.fetch,`POST`,`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(U(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await W(this.fetch,`POST`,`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:op})}catch(e){if(U(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,n=Tc(e,[`options`]),r=Object.assign(Object.assign({},n),t);return`newEmail`in n&&(r.new_email=n?.newEmail,delete r.newEmail),await W(this.fetch,`POST`,`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:cp,redirectTo:t?.redirectTo})}catch(e){if(U(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await W(this.fetch,`POST`,`${this.url}/admin/users`,{body:e,headers:this.headers,xform:op})}catch(e){if(U(e))return{data:{user:null},error:e};throw e}}async listUsers(e){try{let t={nextPage:null,lastPage:0,total:0},n=await W(this.fetch,`GET`,`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:lp});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>
90&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(U(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){qf(e);try{return await W(this.fetch,`GET`,`${this.url}/admin/users/${e}`,{headers:this.headers,xform:op})}catch(e){if(U(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){qf(e);try{return await W(this.fetch,`PUT`,`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:op})}catch(e){if(U(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){qf(e);try{return await W(this.fetch,`DELETE`,`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:op})}catch(e){if(U(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){qf(e.userId);try{let{data:t,error:n}=await W(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(e){if(U(e))return{data:null,error:e};throw e}}async _deleteFactor(e){qf(e.userId),qf(e.id);try{return{data:await W(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(U(e))return{data:null,error:e};throw e}}async _listOAuthClients(e){try{let t={nextPage:null,lastPage:0,total:0},n=await W(this.fetch,`GET`,`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:lp});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>0&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(U(e))return{data:{clients:[]},error:e};throw e}}async _createOAuthClient(e){try{return await W(this.fetch,`POST`,`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(U(e))return{data:null,error:e};throw e}}async _getOAuthClient(e){try{return await W(this.fetch,`GET`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(U(e))return{data:null,error:e};throw e}}async _updateOAuthClient(e,t){try{return await W(this.fetch,`PUT`,`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(U(e))return{data:null,error:e};throw e}}async _deleteOAuthClient(e){try{return await W(this.fetch,`DELETE`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(U(e))return{data:null,error:e};throw e}}async _regenerateOAuthClientSecret(e){try{return await W(this.fetch,`POST`,`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(U(e))return{data:null,error:e};throw e}}async _listCustomProviders(e){try{let t={};return e?.type&&(t.type=e.type),await W(this.fetch,`GET`,`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:e=>({data:{providers:e?.providers??[]},error:null})})}catch(e){if(U(e))return{data:{providers:[]},error:e};throw e}}async _createCustomProvider(e){try{return await W(this.fetch,`POST`,`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(U(e))return{data:null,error:e};throw e}}async _getCustomProvider(e){try{return await W(this.fetch,`GET`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(U(e))return{data:null,error:e};throw e}}async _updateCustomProvider(e,t){try{return await W(this.fetch,`PUT`,`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(U(e))return{data:null,error:e};throw e}}async _deleteCustomProvider(e){try{return await W(this.fetch,`DELETE`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(U(e))return{data:null,error:e};throw e}}async _adminListPasskeys(e){Jf(this.experimental),qf(e.userId);try{return await W(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(U(e))return{data:null,error:e};throw e}}async _adminDeletePasskey(e){Jf(this.experimental),qf(e.userId),qf(e.passkeyId);try{return await W(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(U(e))return{data:null,error:e};throw e}}};function pp(e={}){return{getItem:t=>
9e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&hf()&&globalThis.localStorage&&globalThis.localStorage.getItem(`supabase.gotrue-js.locks.debug`);var mp=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}};function hp(){if(typeof globalThis!=`object`)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<`u`&&(self.globalThis=self)}}function gp(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function _p(e){return parseInt(e,16)}function vp(e){let t=new TextEncoder().encode(e);return`0x`+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)}function yp(e){let{chainId:t,domain:n,expirationTime:r,issuedAt:i=new Date,nonce:a,notBefore:o,requestId:s,resources:c,scheme:l,uri:u,version:d}=e;if(!Number.isInteger(t))throw Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${t}`);if(!n)throw Error(`@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.`);if(a&&a.length<8)throw Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!u)throw Error(`@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.`);if(d!==`1`)throw Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(e.statement?.includes(` 10`))throw Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);let f=gp(e.address),p=`${l?`${l}://${n}`:n} wants you to sign in with your Ethereum account:\n${f}\n\n${e.statement?`${e.statement}\n`:``}`,m=`URI: ${u}\nVersion: ${d}\nChain ID: ${t}${a?`\nNonce: ${a}`:``}\nIssued At: ${i.toISOString()}`;if(r&&(m+=`\nExpiration Time: ${r.toISOString()}`),o&&(m+=`\nNot Before: ${o.toISOString()}`),s&&(m+=`\nRequest ID: ${s}`),c){let e=` 11Resources:`;for(let t of c){if(!t||typeof t!=`string`)throw Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${t}`);e+=`\n- ${t}`}m+=e}return`${p}\n${m}`}var bp=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=r??(n instanceof Error?n.name:void 0)??`Unknown Error`,this.code=t}toJSON(){return{name:this.name,message:this.message,code:this.code}}},xp=class extends bp{constructor(e,t){super({code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:t,message:e}),this.name=`WebAuthnUnknownError`,this.originalError=t}};function Sp({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new bp({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new bp({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new bp({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new bp({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new bp({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new bp({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new bp({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new bp({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!kp(t))return new bp({message:`${window.location.hostname}
11 is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new bp({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new bp({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new bp({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return new bp({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}function Cp({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new bp({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new bp({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!kp(t))return new bp({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new bp({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new bp({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return new bp({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}var wp=new class{createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}};function Tp(e){if(!e)throw Error(`Credential creation options are required`);if(typeof PublicKeyCredential<`u`&&`parseCreationOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON==`function`)return PublicKeyCredential.parseCreationOptionsFromJSON(e);let{challenge:t,user:n,excludeCredentials:r}=e,i=Tc(e,[`challenge`,`user`,`excludeCredentials`]),a=cf(t).buffer,o=Object.assign(Object.assign({},n),{id:cf(n.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(r&&r.length>0){s.excludeCredentials=Array(r.length);for(let e=0;e<r.length;e++){let t=r[e];s.excludeCredentials[e]=Object.assign(Object.assign({},t),{id:cf(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return s}function Ep(e){if(!e)throw Error(`Credential request options are required`);if(typeof PublicKeyCredential<`u`&&`parseRequestOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON==`function`)return PublicKeyCredential.parseRequestOptionsFromJSON(e);let{challenge:t,allowCredentials:n}=e,r=Tc(e,[`challenge`,`allowCredentials`]),i=cf(t).buffer,a=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){a.allowCredentials=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e];a.allowCredentials[e]=Object.assign(Object.assign({},t),{id:cf(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return a}function Dp(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e;return{id:e.id,rawId:e.id,response:{attestationObject:uf(new Uint8Array(e.response.attestationObject)),clientDataJSON:uf(new Uint8Array(e.response.clientDataJSON))},type:`public-key`,clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:t.authenticatorAttachment??void 0}}function Op(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e,n=e.getClientExtensionResults(),r=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:uf(new Uint8Array(r.authenticatorData)),clientDataJSON:uf(new Uint8Array(r.clientDataJSON)),signature:uf(new Uint8Array(r.signature)),userHandle:r.userHandle?uf(new Uint8Array(r.userHandle)):void 0},type:`public-key`,clientExtensionResults:n,authenticatorAttachment:t.authenticatorAttachment??void 0}}function kp(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Ap(){return!!(pf()&&`PublicKeyCredential`in window&&window.PublicKeyCredential&&`credentials`in navigator&&typeof(navigator==null?void 0:navigator.credentials)?.create==`function`&&typeof(navigator==null?void 0:navigator.credentials)?.get==`function`)}async function jp(e){try{let t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new xp(`Browser returned unexpected credential type`,t)}:{data:null,error:new xp(`Empty credential response`,t)}}
11catch(t){return{data:null,error:Sp({error:t,options:e})}}}async function Mp(e){try{let t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new xp(`Browser returned unexpected credential type`,t)}:{data:null,error:new xp(`Empty credential response`,t)}}catch(t){return{data:null,error:Cp({error:t,options:e})}}}var Np={hints:[`security-key`],authenticatorSelection:{authenticatorAttachment:`cross-platform`,requireResidentKey:!1,userVerification:`preferred`,residentKey:`discouraged`},attestation:`direct`},Pp={userVerification:`preferred`,hints:[`security-key`],attestation:`direct`};function Fp(...e){let t=e=>typeof e==`object`&&!!e&&!Array.isArray(e),n=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),r={};for(let i of e)if(i)for(let e in i){let a=i[e];if(a!==void 0){if(Array.isArray(a))r[e]=a;else if(n(a))r[e]=a;else if(t(a)){let n=r[e];r[e]=t(n)?Fp(n,a):Fp(a)}else r[e]=a}}return r}function Ip(e,t){return Fp(Np,e,t||{})}function Lp(e,t){return Fp(Pp,e,t||{})}var Rp=class{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:`webauthn`}))}async _challenge({factorId:e,webauthn:t,friendlyName:n,signal:r},i){try{let{data:a,error:o}=await this.client.mfa.challenge({factorId:e,webauthn:t});if(!a)return{data:null,error:o};let s=r??wp.createNewAbortSignal();if(a.webauthn.type===`create`){let{user:e}=a.webauthn.credential_options.publicKey;if(!e.name){let t=n;if(t)e.name=`${e.id}:${t}`;else{let t=(await this.client.getUser()).data.user,n=t?.user_metadata?.name||t?.email||t?.id||`User`;e.name=`${e.id}:${n}`}}e.displayName||=e.name}switch(a.webauthn.type){case`create`:{let{data:t,error:n}=await jp({publicKey:Ip(a.webauthn.credential_options.publicKey,i?.create),signal:s});return t?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:t}},error:null}:{data:null,error:n}}case`request`:{let t=Lp(a.webauthn.credential_options.publicKey,i?.request),{data:n,error:r}=await Mp(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:t,signal:s}));return n?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:n}},error:null}:{data:null,error:r}}}}catch(e){return U(e)?{data:null,error:e}:{data:null,error:new Id(`Unexpected error in challenge`,e)}}}async _verify({challengeId:e,factorId:t,webauthn:n}){return this.client.mfa.verify({factorId:t,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new Nd(`rpId is required for WebAuthn authentication`)};try{if(!Ap())return{data:null,error:new Id(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this.challenge({factorId:e,webauthn:{rpId:t,rpOrigins:n},signal:r},{request:i});if(!a)return{data:null,error:o};let{webauthn:s}=a;return this._verify({factorId:e,challengeId:a.challengeId,webauthn:{type:s.type,rpId:t,rpOrigins:n,credential_response:s.credential_response}})}catch(e){return U(e)?{data:null,error:e}:{data:null,error:new Id(`Unexpected error in authenticate`,e)}}}async _register({friendlyName:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new Nd(`rpId is required for WebAuthn registration`)};try{if(!Ap())return{data:null,error:new Id(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this._enroll({friendlyName:e});if(!a)return await this.client.mfa.listFactors().then(t=>t.data?.all.find(t=>t.factor_type===`webauthn`&&t.friendly_name===e&&t.status===`unverified`)).then(e=>e?this.client.mfa.unenroll({factorId:e?.id}):void 0),{data:null,error:o};let{data:s,error:c}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:t,rpOrigins:n},signal:r},{create:i});return s?this._verify({factorId:a.id,challengeId:s.challengeId,webauthn:{rpId:t,rpOrigins:n,type:s.webauthn.type,credential_response:s.webauthn.credential_response}}):{data:null,error:c}}catch(e){return U(e)?{data:null,error:e}:{data:null,error:new Id(`Unexpected error in register`,e)}}}};hp();var zp={url:Ed,storageKey:Dd,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Od,flowType:`implicit`,debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Bp={},Vp=!1,Hp=class e{get jwks(){return Bp[this.storageKey]?.jwks??{keys:[]}}set jwks(e){Bp[this.storageKey]=Object.assign(Object.assign({},Bp[this.storageKey]),{jwks:e})}get jwks_cached_at(){return Bp[this.storageKey]?.cachedAt??-(2**53-1)}set jwks_cached_at(e){Bp[this.storageKey]=Object.assign(Object.assign({},Bp[this.storageKey]),{cachedAt:e})}constructor(t){var n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;let r=Object.assign(Object.assign({},zp),t);
11if(this.storageKey=r.storageKey,this.instanceID=e.nextInstanceID[this.storageKey]??0,e.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!r.debug,typeof r.debug==`function`&&(this.logger=r.debug),this.instanceID>0&&pf()){let e=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(e),this.logDebugMessages&&console.trace(e)}if(this.persistSession=r.persistSession,this.autoRefreshToken=r.autoRefreshToken,this.experimental=r.experimental??{},this.admin=new fp({url:r.url,headers:r.headers,fetch:r.fetch,experimental:this.experimental}),this.url=r.url,this.headers=r.headers,this.fetch=_f(r.fetch),this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,this.throwOnError=r.throwOnError,this.lockAcquireTimeout=r.lockAcquireTimeout,r.lock!=null&&(this.lock=r.lock,Vp||(Vp=!0,console.warn(`${this._logPrefix()} The "lock" option is deprecated and will be removed in v3. The client now coordinates session refreshes without a lock, so most apps can drop the option. See https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/migrations/lockless-coordination.md`))),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=-(2**53-1)),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new Rp(this),recoveryCodes:{getStatus:this._getRecoveryCodesStatus.bind(this),generate:this._generateRecoveryCodes.bind(this),verify:this._verifyRecoveryCode.bind(this),regenerate:this._regenerateRecoveryCodes.bind(this),unenroll:this._unenrollRecoveryCodes.bind(this)}},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(r.storage?this.storage=r.storage:hf()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=pp(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=pp(this.memoryStorage)),pf()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error(`Failed to create a new BroadcastChannel, multi-tab state changes will not be available`,e)}(n=this.broadcastChannel)==null||n.addEventListener(`message`,async e=>{this._debug(`received broadcast notification from other tab or client`,e),(e.data.event===`TOKEN_REFRESHED`||e.data.event===`SIGNED_IN`)&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}catch(e){this._debug(`#broadcastChannel`,`error`,e)}})}r.skipAutoInitialize||this.initialize().catch(e=>{this._debug(`#initialize()`,`error`,e)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Sd}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock==null?await this._initialize():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))();
11let e=await this.initializePromise,t=this._pendingInitNotifications??[];this._pendingInitNotifications=null;for(let e of t)await this._notifyAllSubscribers(e.event,e.session,e.broadcast);return e}async _initialize(){try{let e={},t=`none`;if(pf()&&(e=gf(window.location.href),this._isImplicitGrantCallback(e)?t=`implicit`:await this._isPKCECallback(e)&&(t=`pkce`)),pf()&&this.detectSessionInUrl&&t!==`none`){let{data:n,error:r}=await this._getSessionFromURL(e,t);if(r){if(this._debug(`#_initialize()`,`error detecting session from URL`,r),Ud(r)){let e=r.details?.code;if(e===`identity_already_exists`||e===`identity_not_found`||e===`single_identity_not_deletable`)return{error:r}}return{error:r}}let{session:i,redirectType:a}=n;return this._debug(`#_initialize()`,`detected session in URL`,i,`redirect type`,a),await this._saveSession(i),setTimeout(async()=>{a===`recovery`?await this._notifyAllSubscribers(`PASSWORD_RECOVERY`,i):await this._notifyAllSubscribers(`SIGNED_IN`,i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return U(e)?this._returnResult({error:e}):this._returnResult({error:new Id(`Unexpected error during initialization`,e)})}finally{await this._handleVisibilityChange(),this._debug(`#_initialize()`,`end`)}}async signInAnonymously(e){try{let{data:t,error:n}=await W(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{data:e?.options?.data??{},gotrue_meta_security:{captcha_token:e?.options?.captchaToken}},xform:ip});if(n||!t)return this._returnResult({data:{user:null,session:null},error:n});let r=t.session,i=t.user;return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,r)),this._returnResult({data:{user:i,session:r},error:null})}catch(e){if(U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signUp(e){let t=null;try{let n;if(`email`in e){let{email:r,password:i,options:a}=e,o=null,s=null;this.flowType===`pkce`&&([o,s,t]=await this._getCodeChallengeAndMethod()),n=await W(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,t),body:{email:r,password:i,data:a?.data??{},gotrue_meta_security:{captcha_token:a?.captchaToken},code_challenge:o,code_challenge_method:s},xform:ip})}else if(`phone`in e){let{phone:t,password:r,options:i}=e;n=await W(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:r,data:i?.data??{},channel:i?.channel??`sms`,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:ip})}else throw new Vd(`You must provide either an email or phone number and a password`);let{data:r,error:i}=n;if(i||!r)return await Rf(this.storage,this.storageKey,t),this._returnResult({data:{user:null,session:null},error:i});let a=r.session,o=r.user;return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(await Rf(this.storage,this.storageKey,t),U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithPassword(e){try{let t;if(`email`in e){let{email:n,password:r,options:i}=e;t=await W(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:ap})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await W(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:ap})}else throw new Vd(`You must provide either an email or phone number and a password`);let{data:n,error:r}=t;if(r)return this._returnResult({data:{user:null,session:null},error:r});if(!n||!n.session||!n.user){let e=new Bd;return this._returnResult({data:{user:null,session:null},error:e})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers(`SIGNED_IN`,n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:r})}catch(e){if(U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOAuth(e){return await this._handleProviderSignIn(e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:e.options?.skipBrowserRedirect})}async exchangeCodeForSession(e,t){return await this.initializePromise,this.lock==null?this._exchangeCodeForSession(e,t):this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e,t))}async signInWithWeb3(e){let{chain:t}=e;switch(t){case`ethereum`:return await this.signInWithEthereum(e);case`solana`:return await this.signInWithSolana(e);default:throw Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!pf()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`ethereum`in e&&typeof e.ethereum==`object`&&`request`in e.ethereum&&typeof e.ethereum.request==`function`)s=e.ethereum;else throw Error(`@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.`)}let c=new URL(o?.url??window.location.href),l=await s.request({method:`eth_requestAccounts`}).then(e=>e).catch(()=>{throw Error(`@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid`)});if(!l||l.length===0)throw Error(`@supabase/auth-js: No accounts available. Please ensure the wallet is connected.`);let u=gp(l[0]),d=o?.signInWithEthereum?.chainId;d||=_p(await s.request({method:`eth_chainId`})),t=yp({domain:c.host,address:u,statement:a,uri:c.href,version:`1`,chainId:d,nonce:o?.signInWithEthereum?.nonce,issuedAt:o?.signInWithEthereum?.issuedAt??new Date,expirationTime:o?.signInWithEthereum?.expirationTime,notBefore:o?.signInWithEthereum?.notBefore,requestId:o?.signInWithEthereum?.requestId,resources:o?.signInWithEthereum?.resources}),n=await s.request({method:`personal_sign`,params:[vp(t),u]})}try{let{data:r,error:i}=await W(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`ethereum`,message:t,signature:n},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:ip});if(i)throw i;if(!r||!r.session||!r.user){let e=new Bd;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSolana(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!pf()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`solana`in e&&typeof e.solana==`object`&&(`signIn`in e.solana&&typeof e.solana.signIn==`function`||`signMessage`in e.
11solana&&typeof e.solana.signMessage==`function`))s=e.solana;else throw Error(`@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.`)}let c=new URL(o?.url??window.location.href);if(`signIn`in s&&s.signIn){let e=await s.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},o?.signInWithSolana),{version:`1`,domain:c.host,uri:c.href}),a?{statement:a}:null)),r;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`)r=e[0];else if(e&&typeof e==`object`&&`signedMessage`in e&&`signature`in e)r=e;else throw Error(`@supabase/auth-js: Wallet method signIn() returned unrecognized value`);if(`signedMessage`in r&&`signature`in r&&(typeof r.signedMessage==`string`||r.signedMessage instanceof Uint8Array)&&r.signature instanceof Uint8Array)t=typeof r.signedMessage==`string`?r.signedMessage:new TextDecoder().decode(r.signedMessage),n=r.signature;else throw Error(`@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields`)}else{if(!(`signMessage`in s)||typeof s.signMessage!=`function`||!(`publicKey`in s)||typeof s!=`object`||!s.publicKey||!(`toBase58`in s.publicKey)||typeof s.publicKey.toBase58!=`function`)throw Error(`@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API`);t=[`${c.host} wants you to sign in with your Solana account:`,s.publicKey.toBase58(),...a?[``,a,``]:[``],`Version: 1`,`URI: ${c.href}`,`Issued At: ${o?.signInWithSolana?.issuedAt??new Date().toISOString()}`,...o?.signInWithSolana?.notBefore?[`Not Before: ${o.signInWithSolana.notBefore}`]:[],...o?.signInWithSolana?.expirationTime?[`Expiration Time: ${o.signInWithSolana.expirationTime}`]:[],...o?.signInWithSolana?.chainId?[`Chain ID: ${o.signInWithSolana.chainId}`]:[],...o?.signInWithSolana?.nonce?[`Nonce: ${o.signInWithSolana.nonce}`]:[],...o?.signInWithSolana?.requestId?[`Request ID: ${o.signInWithSolana.requestId}`]:[],...o?.signInWithSolana?.resources?.length?[`Resources`,...o.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join(` 12`);let e=await s.signMessage(new TextEncoder().encode(t),`utf8`);if(!e||!(e instanceof Uint8Array))throw Error(`@supabase/auth-js: Wallet signMessage() API returned an recognized value`);n=e}}try{let{data:r,error:i}=await W(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`solana`,message:t,signature:uf(n)},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:ip});if(i)throw i;if(!r||!r.session||!r.user){let e=new Bd;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e,t){let n=t?.flowId!=null,r=n?jf(t?.flowId):pf()?jf(gf(window.location.href)[Md]):null;n&&!r&&this._debug(`#_exchangeCodeForSession()`,`provided flowId is not a valid flow id`,t?.flowId);let{verifier:i,flowId:a}=n&&!r?{verifier:null,flowId:null}:await Lf(this.storage,this.storageKey,r),[o,s]=(i??``).split(`/`);try{if(!o&&this.flowType===`pkce`)throw new Gd;let{data:t,error:n}=await W(this.fetch,`POST`,`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:o},xform:ip});if(await Rf(this.storage,this.storageKey,a),n)throw n;if(!t||!t.session||!t.user){let e=new Bd;return this._returnResult({data:{user:null,session:null,redirectType:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(s===`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,t.session)),this._returnResult({data:Object.assign(Object.assign({},t),{redirectType:s??null}),error:n})}catch(e){if(await Rf(this.storage,this.storageKey,a),U(e))return this._returnResult({data:{user:null,session:null,redirectType:null},error:e});throw e}}async signInWithIdToken(e){try{let{options:t,provider:n,token:r,access_token:i,nonce:a}=e,{data:o,error:s}=await W(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:r,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:t?.captchaToken}},xform:ip});if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!o||!o.session||!o.user){let e=new Bd;return this._returnResult({data:{user:null,session:null},error:e})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers(`SIGNED_IN`,o.session)),this._returnResult({data:o,error:s})}catch(e){if(U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOtp(e){let t=null;try{if(`email`in e){let{email:n,options:r}=e,i=null,a=null;this.flowType===`pkce`&&([i,a,t]=await this._getCodeChallengeAndMethod());let{error:o}=await W(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{email:n,data:r?.data??{},create_user:r?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:r?.captchaToken},code_challenge:i,code_challenge_method:a},redirectTo:this._maybeAppendFlowIdToRedirect(r?.emailRedirectTo,t)});return this._returnResult({data:{user:null,session:null},error:o})}if(`phone`in e){let{phone:t,options:n}=e,{data:r,error:i}=await W(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:n?.data??{},create_user:n?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:n?.captchaToken},channel:n?.channel??`sms`}});return this._returnResult({data:{user:null,session:null,messageId:r?.message_id},error:i})}throw new Vd(`You must provide either an email or phone number.`)}catch(e){if(await Rf(this.storage,this.storageKey,t),U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async verifyOtp(e){try{let t,n;`options`in e&&(t=e.options?.redirectTo,n=e.options?.captchaToken);let{data:r,error:i}=await W(this.fetch,`POST`,`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:n}}),redirectTo:t,xform:ip});if(i)throw i;if(!r)throw Error(`An error occurred on token verification.`);let a=r.session,o=r.user;return a?.access_token&&(await this._saveSession(a),await this._notifyAllSubscribers(e.type==`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSSO(e){let t=null;try{let n=null,r=null;this.flowType===`pkce`&&([n,r,t]=await this._getCodeChallengeAndMethod());let i=await W(this.fetch,`POST`,`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},`providerId`in e?{provider_id:e.providerId}:null),`domain`in e?{domain:e.domain}:null),{redirect_to:this._maybeAppendFlowIdToRedirect(e.options?.redirectTo,t)}),e?.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:n,code_challenge_method:r}),headers:this.headers,xform:sp});return i.data?.url&&pf()&&!e.options?.skipBrowserRedirect&&window.location.assign(i.data.url),this._returnResult(i)}catch(e){if(await Rf(this.storage,this.storageKey,t),U(e))return this._returnResult({data:null,error:e});throw e}}async reauthenticate(){return await this.initializePromise,this.lock==null?await this._reauthenticate():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new Rd;let{error:r}=await W(this.fetch,`GET`,`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:r})})}catch(e){if(U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){let t=null;try{let n=`${this.url}/resend`;if(`email`in e){let{email:r,type:i,options:a}=e,o=null,s=null;this.flowType===`pkce`&&([o,s,t]=await this._getCodeChallengeAndMethod());let{error:c}=await W(this.fetch,`POST`,n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:a?.captchaToken}
12,code_challenge:o,code_challenge_method:s},redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,t)});return c&&await Rf(this.storage,this.storageKey,t),this._returnResult({data:{user:null,session:null},error:c})}if(`phone`in e){let{phone:t,type:r,options:i}=e,{data:a,error:o}=await W(this.fetch,`POST`,n,{headers:this.headers,body:{phone:t,type:r,gotrue_meta_security:{captcha_token:i?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a?.message_id},error:o})}throw new Vd(`You must provide either an email or phone number and a type`)}catch(e){if(await Rf(this.storage,this.storageKey,t),U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async getSession(){return await this.initializePromise,this.lock==null?await this._useSession(async e=>e):await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug(`#_acquireLock`,`begin`,e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await n}catch{}})()),n}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug(`#_acquireLock`,`lock acquired for storage key`,this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch{}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug(`#_acquireLock`,`lock released for storage key`,this.storageKey),this.lockAcquired=!1}})}finally{this._debug(`#_acquireLock`,`end`)}}async _useSession(e){this._debug(`#_useSession`,`begin`);try{return await e(await this.__loadSession())}finally{this._debug(`#_useSession`,`end`)}}async __loadSession(){this._debug(`#__loadSession()`,`begin`),this.lock!=null&&!this.lockAcquired&&this._debug(`#__loadSession()`,`used outside of an acquired lock!`,Error().stack);try{let e=null,t=await bf(this.storage,this.storageKey);if(this._debug(`#getSession()`,`session from storage`,t),t!==null&&(this._isValidSession(t)?e=t:(this._debug(`#getSession()`,`session from storage is not valid`),await this._removeSession())),!e)return{data:{session:null},error:null};let n=e.expires_at?e.expires_at*1e3-Date.now()<wd:!1;if(this._debug(`#__loadSession()`,`session has${n?``:` not`} expired`,`expires_at`,e.expires_at),!n){if(this.userStorage){let t=await bf(this.userStorage,this.storageKey+`-user`);t?.user?e.user=t.user:e.user=Xf()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let t={value:this.suppressGetSessionWarning};e.user=Zf(e.user,t),t.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}let{data:r,error:i}=await this._callRefreshToken(e.refresh_token);if(i){if(e.expires_at&&e.expires_at*1e3>Date.now()){let t=await bf(this.storage,this.storageKey);if(t&&t.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:r},error:null})}finally{this._debug(`#__loadSession()`,`end`)}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let t;return t=this.lock==null?await this._getUser():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()),t.data.user&&(this.suppressGetSessionWarning=!0),t}async _getUser(e){try{return e?await W(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:e,xform:op}):await this._useSession(async e=>{let{data:t,error:n}=e;if(n)throw n;return!t.session?.access_token&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Rd}:await W(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:t.session?.access_token??void 0,xform:op})})}catch(e){if(U(e))return zd(e)&&await this._removeSession(),this._returnResult({data:{user:null},error:e});throw e}}async updateUser(e,t={}){return await this.initializePromise,this.lock==null?await this._updateUser(e,t):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){let n=null;try{return await this._useSession(async r=>{let{data:i,error:a}=r;if(a)throw a;if(!i.session)throw new Rd;let o=i.session,s=null,c=null;this.flowType===`pkce`&&e.email!=null&&([s,c,n]=await this._getCodeChallengeAndMethod());let{data:l,error:u}=await W(this.fetch,`PUT`,`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(t?.emailRedirectTo,n),body:Object.assign(Object.assign({},e),{code_challenge:s,code_challenge_method:c}),jwt:o.access_token,xform:op});if(u)throw u;return o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers(`USER_UPDATED`,o),this._returnResult({data:{user:o.user},error:null})})}catch(e){if(await Rf(this.storage,this.storageKey,n),U(e))return this._returnResult({data:{user:null},error:e});throw e}}async setSession(e){return await this.initializePromise,this.lock==null?await this._setSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Rd;let t=Date.now()/1e3,n=t,r=!0,i=null,{payload:a}=Cf(e.access_token);if(a.exp&&(n=a.exp,r=n<=t),r){let{data:t,error:n}=await this._callRefreshToken(e.refresh_token);if(n)return this._returnResult({data:{user:null,session:null},error:n});if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:r,error:a}=await this._getUser(e.access_token);if(a)return this._returnResult({data:{user:null,session:null},error:a});i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:`bearer`,expires_in:n-t,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers(`SIGNED_IN`,i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(e){if(U(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}}async refreshSession(e){return await this.initializePromise,this.lock==null?await this._refreshSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{if(!e){let{data:n,error:r}=t;if(r)throw r;e=n.session??void 0}if(!e?.refresh_token)throw new Rd;let{data:n,error:r}=await this._callRefreshToken(e.refresh_token);return r?this._returnResult({data:{user:null,session:null},error:r}):n?this._returnResult({data:{user:n.user,session:n},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(e){if(U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){try{if(!pf())throw new Hd(`No browser detected.`);if(e.error||e.error_description||e.error_code)throw new Hd(e.error_description||`Error in URL with unspecified error_description`,{error:e.error||`unspecified_error`,code:e.error_code||`unspecified_code`});switch(t){case`implicit`:if(this.flowType===`pkce`)throw new Wd(`Not a valid PKCE flow url.`);break;case`pkce`:if(this.flowType===`implicit`)throw new Hd(`Not a valid implicit grant flow url.`)}if(t===`pkce`){if(this._debug(`#_initialize()`,`begin`,`is PKCE flow`,!0),!e.code)throw new Wd(`No code detected.`);let{data:t,error:n}=await this._exchangeCodeForSession(e.code,{flowId:e[Md]});if(n)throw n;let r=new URL(window.location.href);return r.searchParams.delete(`code`),r.searchParams.delete(Md),window.history.replaceState(window.history.state,``,r.toString()),{data:{session:t.session,redirectType:t.redirectType??null},error:null}}let{provider_token:n,provider_refresh_token:r,access_token:i,refresh_token:a,expires_in:o,expires_at:s,token_type:c}=e;if(!i||!o||!a||!c)throw new Hd(`No session defined in URL`);let l=Math.round(Date.now()/1e3),u=parseInt(o),d=l+u;s&&(d=parseInt(s));let f=d-l;
12f*1e3<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${u}s`);let p=d-u;l-p>=120?console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale`,p,d,l):l-p<0&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew`,p,d,l);let{data:m,error:h}=await this._getUser(i);if(h)throw h;let g={provider_token:n,provider_refresh_token:r,access_token:i,expires_in:u,expires_at:d,refresh_token:a,token_type:c,user:m.user};return window.location.hash=``,this._debug(`#_getSessionFromURL()`,`clearing window.location.hash`),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(e){if(U(e))return this._returnResult({data:{session:null,redirectType:null},error:e});throw e}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl==`function`?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){if(!e.code)return!1;let t=jf(e[Md]);return t&&await bf(this.storage,Nf(this.storageKey,t))?!0:!!await bf(this.storage,`${this.storageKey}-code-verifier`)}async signOut(e={scope:`global`}){return await this.initializePromise,this.lock==null?await this._signOut(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:`global`}){return await this._useSession(async t=>{let n=async()=>{await this._removeSession()},{data:r,error:i}=t;if(i&&!zd(i))return this._returnResult({error:i});let a=r.session?.access_token;if(a){let{error:t}=await this.admin.signOut(a,e);if(t&&!(Fd(t)&&(t.status===404||t.status===401||t.status===403)||zd(t)))return e!==`others`&&await n(),this._returnResult({error:t})}return e!==`others`&&await n(),this._returnResult({error:null})})}onAuthStateChange(e){let t=ff(),n={id:t,callback:e,unsubscribe:()=>{this._debug(`#unsubscribe()`,`state change callback with id removed`,t),this.stateChangeEmitters.delete(t)}};return this._debug(`#onAuthStateChange()`,`registered callback with id`,t),this.stateChangeEmitters.set(t,n),(async()=>{await this.initializePromise,this.lock==null?await this._emitInitialSession(t):await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async t=>{try{let{data:{session:n},error:r}=t;if(r)throw r;await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,n),this._debug(`INITIAL_SESSION`,`callback id`,e,`session`,n)}catch(t){if(await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,null),this._debug(`INITIAL_SESSION`,`callback id`,e,`error`,t),Yd(t))return;zd(t)||qd(t)||Fd(t)&&(t.code===`refresh_token_not_found`||t.code===`refresh_token_already_used`||t.code===`session_expired`)?console.warn(t):console.error(t)}})}async resetPasswordForEmail(e,t={}){let n=null,r=null,i=null;this.flowType===`pkce`&&([n,r,i]=await this._getCodeChallengeAndMethod(!0));try{return await W(this.fetch,`POST`,`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(t.redirectTo,i)})}catch(e){if(await Rf(this.storage,this.storageKey,i),U(e))return this._returnResult({data:null,error:e});throw e}}async getUserIdentities(){try{let{data:e,error:t}=await this.getUser();if(t)throw t;return this._returnResult({data:{identities:e.user.identities??[]},error:null})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async linkIdentity(e){return`token`in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){let t=null;try{let{data:n,error:r}=await this._useSession(async n=>{let{data:r,error:i}=n;if(i)throw i;let{url:a,flowId:o}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:!0});return t=o,await W(this.fetch,`GET`,a,{headers:this.headers,jwt:r.session?.access_token??void 0})});if(r)throw r;return pf()&&!e.options?.skipBrowserRedirect&&window.location.assign(n?.url),this._returnResult({data:{provider:e.provider,url:n?.url,flowId:t},error:null})}catch(n){if(U(n))return this._returnResult({data:{provider:e.provider,url:null,flowId:t},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async t=>{try{let{error:n,data:{session:r}}=t;if(n)throw n;let{options:i,provider:a,token:o,access_token:s,nonce:c}=e,{data:l,error:u}=await W(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:r?.access_token??void 0,body:{provider:a,id_token:o,access_token:s,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:ip});return u?this._returnResult({data:{user:null,session:null},error:u}):!l||!l.session||!l.user?this._returnResult({data:{user:null,session:null},error:new Bd}):(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(`USER_UPDATED`,l.session)),this._returnResult({data:l,error:u}))}catch(e){if(await Rf(this.storage,this.storageKey,null),U(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)throw r;return await W(this.fetch,`DELETE`,`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:n.session?.access_token??void 0})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken()`;this._debug(t,`begin`);try{let n=Date.now();return await Tf(async n=>(n>0&&await wf(200*2**(n-1)),this._debug(t,`refreshing attempt`,n),await W(this.fetch,`POST`,`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:ip})),(e,t)=>{let r=200*2**e;return t&&qd(t)&&Date.now()+r-n<3e4})}catch(e){if(this._debug(t,`error`,e),U(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}finally{this._debug(t,`end`)}}_isValidSession(e){return typeof e==`object`&&!!e&&`access_token`in e&&`refresh_token`in e&&`expires_at`in e}async _handleProviderSignIn(e,t){let{url:n,flowId:r}=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug(`#_handleProviderSignIn()`,`provider`,e,`options`,t,`url`,n),pf()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n,flowId:r},error:null}}async _recoverAndRefresh(){let e=`#_recoverAndRefresh()`;this._debug(e,`begin`);try{let t=await bf(this.storage,this.storageKey);if(t&&this.userStorage){let e=await bf(this.userStorage,this.storageKey+`-user`);!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!e&&(e={user:t.user},await yf(this.userStorage,this.storageKey+`-user`,e)),t.user=e?.user??Xf()}else if(t&&!t.user&&!t.user){let e=await bf(this.storage,this.storageKey+`-user`);e&&e?.user?(t.user=e.user,await xf(this.storage,this.storageKey+`-user`),await yf(this.storage,this.storageKey,t)):t.user=Xf()}if(this._debug(e,`session from storage`,t),!this._isValidSession(t)){this._debug(e,`session is not val
12id`),t!==null&&await this._removeSession();return}let n=(t.expires_at??1/0)*1e3-Date.now()<wd;if(this._debug(e,`session has${n?``:` not`} expired with margin of ${wd}s`),n){if(this.autoRefreshToken&&t.refresh_token){let{error:n}=await this._callRefreshToken(t.refresh_token);n&&(Yd(n)?this._debug(e,`refresh discarded by commit guard`,n):this._debug(e,`refresh failed`,n))}}else if(t.user&&t.user.__isUserNotAvailableProxy===!0)try{let{data:n,error:r}=await this._getUser(t.access_token);!r&&n?.user?(t.user=n.user,await this._saveSession(t),await this._notifyAllSubscribers(`SIGNED_IN`,t)):this._debug(e,`could not get user data, skipping SIGNED_IN notification`)}catch(t){console.error(`Error getting user data:`,t),this._debug(e,`error getting user data, skipping SIGNED_IN notification`,t)}else await this._notifyAllSubscribers(`SIGNED_IN`,t)}catch(t){this._debug(e,`error`,t),qd(t)?console.warn(t):console.error(t);return}finally{this._debug(e,`end`)}}async _callRefreshToken(e){var t,n;if(!e)throw new Rd;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug(`#_callRefreshToken()`,`returning cached failure (cooldown active)`),this.lastRefreshFailure.result;let r=`#_callRefreshToken()`;this._debug(r,`begin`);try{this.refreshingDeferred=new Sf,this.refreshingDeferred.promise.then(void 0,()=>{});let t=await bf(this.storage,this.storageKey),{data:n,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!n.session)throw new Rd;let a=await bf(this.storage,this.storageKey);if(t!==null&&(a===null||a.refresh_token!==t.refresh_token)){this._debug(r,`commit guard: storage changed since refresh started, discarding rotated tokens`,{startedWith:`present`,nowHolds:a?`replaced`:`cleared`});let e={data:null,error:new Jd};return this.refreshingDeferred.resolve(e),e}let o=this._sessionRemovalEpoch;if(await this._saveSession(n.session),this._sessionRemovalEpoch!==o){this._debug(r,`commit guard (post-save): _removeSession ran during _saveSession, undoing write`),await xf(this.storage,this.storageKey),this.userStorage&&await xf(this.userStorage,this.storageKey+`-user`);let e={data:null,error:new Jd};return this.refreshingDeferred.resolve(e),e}await this._notifyAllSubscribers(`TOKEN_REFRESHED`,n.session);let s={data:n.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(s),s}catch(i){if(this._debug(r,`error`,i),U(i)){let n={data:null,error:i};if(!qd(i)){let e=await bf(this.storage,this.storageKey);e?.expires_at&&e.expires_at*1e3>Date.now()?this._debug(r,`proactive refresh failed, access token still valid â preserving session`):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:n,expiresAt:Date.now()+Td},(t=this.refreshingDeferred)==null||t.resolve(n),n}throw(n=this.refreshingDeferred)==null||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(r,`end`)}}async _notifyAllSubscribers(e,t,n=!0){if(this._pendingInitNotifications!==null&&n){this._pendingInitNotifications.push({event:e,session:t,broadcast:n});return}let r=`#_notifyAllSubscribers(${e})`;this._debug(r,`begin`,t,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:t});let r=[],i=Array.from(this.stateChangeEmitters.values()).map(async n=>{try{await n.callback(e,t)}catch(e){r.push(e)}});if(await Promise.all(i),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,`end`)}}async _saveSession(e){this._debug(`#_saveSession()`,e),this.suppressGetSessionWarning=!0;let t=Object.assign({},e),n=t.user&&t.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&t.user&&await yf(this.userStorage,this.storageKey+`-user`,{user:t.user});let e=Object.assign({},t);delete e.user;let r=Qf(e);await yf(this.storage,this.storageKey,r)}else{let e=Qf(t);await yf(this.storage,this.storageKey,e)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug(`#_removeSession()`),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await xf(this.storage,this.storageKey),await zf(this.storage,this.storageKey),await xf(this.storage,this.storageKey+`-user`),this.userStorage&&await xf(this.userStorage,this.storageKey+`-user`),await this._notifyAllSubscribers(`SIGNED_OUT`,null)}_removeVisibilityChangedCallback(){this._debug(`#_removeVisibilityChangedCallback()`);let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&pf()&&window!=null&&window.removeEventListener&&window.removeEventListener(`visibilitychange`,e)}
12catch(e){console.error(`removing visibilitychange callback failed`,e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug(`#_startAutoRefresh()`);let e=setInterval(()=>this._autoRefreshTokenTick(),Cd);this.autoRefreshTicker=e,e&&typeof e==`object`&&typeof e.unref==`function`?e.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(e);let t=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=t,t&&typeof t==`object`&&typeof t.unref==`function`?t.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(t)}async _stopAutoRefresh(){this._debug(`#_stopAutoRefresh()`);let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);let t=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,t&&clearTimeout(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)==null||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug(`#_autoRefreshTokenTick()`,`begin`),this.lock!=null){try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/Cd);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${Cd}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}})}catch(e){if(e instanceof mp)this._debug(`auto refresh token tick lock not available`);else throw e}return}if(this.refreshingDeferred!==null){this._debug(`#_autoRefreshTokenTick()`,`refresh already in flight, skipping`);return}try{let e=Date.now();try{await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/Cd);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${Cd}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}}async _handleVisibilityChange(){if(this._debug(`#_handleVisibilityChange()`),!pf()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug(`#visibilityChangedCallback`,`error`,e)}},window==null||window.addEventListener(`visibilitychange`,this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error(`_handleVisibilityChange`,e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;if(this._debug(t,`visibilityState`,document.visibilityState),document.visibilityState===`visible`){if(this.autoRefreshToken&&this._startAutoRefresh(),!e){if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!==`visible`){this._debug(t,`acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting`);return}await this._recoverAndRefresh()});else{if(document.visibilityState!==`visible`){this._debug(t,`visibilityState is no longer visible, skipping recovery`);return}await this._recoverAndRefresh()}}}else document.visibilityState===`hidden`&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,n){let r=n?.redirectTo,i=null,a=null,o=null;this.flowType===`pkce`&&([i,a,o]=await this._getCodeChallengeAndMethod(),r=this._maybeAppendFlowIdToRedirect(r,o));let s=[`provider=${encodeURIComponent(t)}`];if(r&&s.push(`redirect_to=${encodeURIComponent(r)}`),n?.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),i!=null&&a!=null){let e=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(e.toString())}if(n?.queryParams){let e=new URLSearchParams(n.queryParams);s.push(e.toString())}return n?.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),{url:`${e}?${s.join(`&`)}`,flowId:o}}_maybeAppendFlowIdToRedirect(e,t){return!e||!t||!this.experimental.appendPkceFlowIdToRedirects?e??void 0:Bf(e,t)}async _getCodeChallengeAndMethod(e=!1){return Vf(this.storage,this.storageKey,e,e=>this._debug(`#_getCodeChallengeAndMethod()`,`evicted oldest pending PKCE verifier slot`,e))}async _unenroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;return r?this._returnResult({data:null,error:r}):await W(this.fetch,`DELETE`,`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:n?.session?.access_token})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _enroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType===`phone`?{phone:e.phone}:e.factorType===`totp`?{issuer:e.issuer}:{}),{data:a,error:o}=await W(this.fetch,`POST`,`${this.url}/factors`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(e.factorType===`totp`&&a.type===`totp`&&a?.totp?.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),this._returnResult({data:a,error:null}))})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _verify(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({challenge_id:e.challengeId},`webauthn`in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type===`create`?Dp(e.webauthn.credential_response):Op(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:o}=await W(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/verify`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers(`MFA_CHALLENGE_VERIFIED`,a),this._returnResult({data:a,error:o}))})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challenge(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=await W(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:n?.session?.access_token});if(i.error)return i;let{data:a}=i;if(a.type!==`webauthn`)return{data:a,error:null};switch(a.webauthn.type){case`create`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Tp(a.webauthn.credential_options.publicKey)})})}),error:null};case`request`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Ep(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challengeAndVerify(e){let{data:t,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){let{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};let n={all:[],phone:[],totp:[],webauthn:[],recovery_code:[]};for(let t of e?.factors??[])n.all.push(t),t.status===`verified`&&t.factor_type in n&&Array.isArray(n[t.factor_type])&&n[t.factor_type].push(t);return{data:n,error:null}}async _getAuthenticatorAssuranceLevel(e){if(e)try{let{payload:t}=Cf(e),n=null;t.aal&&(n=t.aal);let r=n,{data:{user:i},error:a}=await this.getUser(e);if(a)return this._returnResult({data:null,error:a});((i?.factors)?.filter(e=>e.status===`verified`)??[]).length>0&&(r=`aal2`);let o=t.amr||[];return{data:{currentLevel:n,nextLevel:r,currentAuthenticationMethods:o},error:null}}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:t},error:n}
12=await this.getSession();if(n)return this._returnResult({data:null,error:n});if(!t)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:r}=Cf(t.access_token),i=null;r.aal&&(i=r.aal);let a=i;(t.user.factors?.filter(e=>e.status===`verified`)??[]).length>0&&(a=`aal2`);let o=r.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:o},error:null}}async _getRecoveryCodesStatus(){Yf(this.experimental);try{return await this._useSession(async e=>{let{data:t,error:n}=e;if(n)return this._returnResult({data:null,error:n});let{data:r,error:i}=await W(this.fetch,`GET`,`${this.url}/factors/recovery-codes`,{headers:this.headers,jwt:t?.session?.access_token});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _generateRecoveryCodes(e){Yf(this.experimental);try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let{data:i,error:a}=await W(this.fetch,`POST`,`${this.url}/factors/recovery-codes`,{body:e?.friendlyName?{friendly_name:e.friendlyName}:void 0,headers:this.headers,jwt:n?.session?.access_token});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _verifyRecoveryCode(e){Yf(this.experimental);let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let{data:i,error:a}=await W(this.fetch,`POST`,`${this.url}/factors/recovery-codes/verify`,{body:{code:e.code},headers:this.headers,jwt:n?.session?.access_token});if(a)return this._returnResult({data:null,error:a});let o=Object.assign({expires_at:df(i.expires_in)},i);return await this._saveSession(o),await this._notifyAllSubscribers(`MFA_CHALLENGE_VERIFIED`,o),this._returnResult({data:i,error:null})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _regenerateRecoveryCodes(){Yf(this.experimental);try{return await this._useSession(async e=>{let{data:t,error:n}=e;if(n)return this._returnResult({data:null,error:n});let{data:r,error:i}=await W(this.fetch,`POST`,`${this.url}/factors/recovery-codes/regenerate`,{headers:this.headers,jwt:t?.session?.access_token});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _unenrollRecoveryCodes(){Yf(this.experimental);try{return await this._useSession(async e=>{let{data:t,error:n}=e;if(n)return this._returnResult({data:null,error:n});let{data:r,error:i}=await W(this.fetch,`DELETE`,`${this.url}/factors/recovery-codes`,{headers:this.headers,jwt:t?.session?.access_token});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await W(this.fetch,`GET`,`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new Rd})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _approveAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new Rd});let a=await W(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`approve`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&pf()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _denyAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new Rd});let a=await W(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`deny`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&pf()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _listOAuthGrants(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;return n?this._returnResult({data:null,error:n}):t?await W(this.fetch,`GET`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new Rd})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?(await W(this.fetch,`DELETE`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Rd})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async fetchJwk(e,t={keys:[]}){let n=t.keys.find(t=>t.kid===e);if(n)return n;let r=Date.now();if(n=this.jwks.keys.find(t=>t.kid===e),n&&this.jwks_cached_at+6e5>r)return n;let{data:i,error:a}=await W(this.fetch,`GET`,`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=r,n=i.keys.find(t=>t.kid===e),!n)?null:n}async getClaims(e,t={}){try{let n=e;if(!n){let{data:e,error:t}
12=await this.getSession();if(t||!e.session)return this._returnResult({data:null,error:t});n=e.session.access_token}let{header:r,payload:i,signature:a,raw:{header:o,payload:s}}=Cf(n);if(!t?.allowExpired)try{Wf(i.exp)}catch(e){throw new Zd(e instanceof Error?e.message:`JWT validation failed`)}let c=!r.alg||r.alg.startsWith(`HS`)||!r.kid||!(`crypto`in globalThis&&`subtle`in globalThis.crypto)?null:await this.fetchJwk(r.kid,t?.keys?{keys:t.keys}:t?.jwks);if(!c){let{error:e}=await this.getUser(n);if(e)throw e;return{data:{claims:i,header:r,signature:a},error:null}}let l=Gf(r.alg),u=await crypto.subtle.importKey(`jwk`,c,l,!0,[`verify`]);if(!await crypto.subtle.verify(l,u,a,lf(`${o}.${s}`)))throw new Zd(`Invalid JWT signature`);return{data:{claims:i,header:r,signature:a},error:null}}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async signInWithPasskey(e){Jf(this.experimental);try{if(!Ap())return this._returnResult({data:null,error:new Id(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyAuthentication({options:{captchaToken:e?.options?.captchaToken}});if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await Mp({publicKey:Ep(t.options),signal:e?.options?.signal??wp.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new Id(`WebAuthn ceremony failed`,null)});let a=Op(r);return this._verifyPasskeyAuthentication({challengeId:t.challenge_id,credential:a})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async registerPasskey(e){Jf(this.experimental);try{if(!Ap())return this._returnResult({data:null,error:new Id(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyRegistration();if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await jp({publicKey:Tp(t.options),signal:e?.options?.signal??wp.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new Id(`WebAuthn ceremony failed`,null)});let a=Dp(r);return this._verifyPasskeyRegistration({challengeId:t.challenge_id,credential:a})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyRegistration(){Jf(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new Rd});let{data:r,error:i}=await W(this.fetch,`POST`,`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:t.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){Jf(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Rd});let{data:i,error:a}=await W(this.fetch,`POST`,`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyAuthentication(e){Jf(this.experimental);try{let{data:t,error:n}=await W(this.fetch,`POST`,`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:e?.options?.captchaToken}}});return n?this._returnResult({data:null,error:n}):this._returnResult({data:t,error:null})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyAuthentication(e){Jf(this.experimental);try{let{data:t,error:n}=await W(this.fetch,`POST`,`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:ip});return n?this._returnResult({data:null,error:n}):(t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,t.session)),this._returnResult({data:t,error:null}))}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _listPasskeys(){Jf(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new Rd});let{data:r,error:i}=await W(this.fetch,`GET`,`${this.url}/passkeys`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){Jf(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Rd});let{data:i,error:a}=await W(this.fetch,`PATCH`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}async _deletePasskey(e){Jf(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new Rd});let{error:i}=await W(this.fetch,`DELETE`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(e){if(U(e))return this._returnResult({data:null,error:e});throw e}}};Hp.nextInstanceID={};var Up=Hp,Wp=`2.116.0`,Gp=``,Kp;if(typeof Deno<`u`)Gp=`deno`,Kp=Deno.version?.deno;else if(typeof document<`u`)Gp=`web`;else if(typeof navigator<`u`&&navigator.product===`ReactNative`)Gp=`react-native`;else{var qp;Gp=`node`;let e=globalThis.process;Kp=e==null||(qp=e.version)==null?void 0:qp.replace(/^v/,``)}var Jp=[`runtime=${Gp}`];Kp&&Jp.push(`runtime-version=${Kp}`);var Yp={headers:{"X-Client-Info":`supabase-js/${Wp}; ${Jp.join(`; `)}`}},Xp={schema:`public`},Zp={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:`implicit`},Qp={},$p={enabled:!1,respectSamplingDecision:!0};function em(e){if(!e||typeof e!=`string`)return null;let t=e.split(`-`);if(t.length!==4)return null;let[n,r,i,a]=t;if(n.length!==2||r.length!==32||i.length!==16||a.length!==2)return null;let o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(i)||!o.test(a)||r===`00000000000000000000000000000000`||i===`0000000000000000`?null:{version:n,traceId:r,parentId:i,traceFlags:a,isSampled:(parseInt(a,16)&1)==1}}function tm(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(let e of t)try{if(typeof e==`string`){if(nm(n.hostname,e))return!0}
12else if(e instanceof RegExp){if(e.test(n.hostname))return!0}else if(typeof e==`function`&&e(n))return!0}catch{continue}return!1}function nm(e,t){if(t===e)return!0;if(t.startsWith(`*.`)){let n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith(`.`+n)))return!0}return!1}function rm(e){let t=[];try{let n=new URL(e);t.push(n.hostname)}catch{}return t.push(`*.supabase.co`,`*.supabase.in`),t.push(`localhost`,`127.0.0.1`,`[::1]`),t}function im(e){"@babel/helpers - typeof";return im=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},im(e)}function am(e,t){if(im(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(im(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function om(e){var t=am(e,`string`);return im(t)==`symbol`?t:t+``}function sm(e,t,n){return(t=om(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?cm(Object(n),!0).forEach(function(t){sm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var lm=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),um=()=>Headers,dm=e=>e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`),fm=`sb_temp_`,pm=new Set,mm=e=>{if(!e.startsWith(`sb_`)||dm(e)||e.startsWith(fm))return;let t=e.match(/^sb_[a-zA-Z0-9]+_/)?.[0]??`unknown`;pm.has(t)||(pm.add(t),console.warn(`@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type.`))},hm=(e,t,n,r,i,a)=>{let o=lm(r),s=um(),c=i?.enabled===!0,l=i?.respectSamplingDecision!==!1,u=c?rm(t):null,d=!(a?.omitApiKeyAsBearer&&dm(e));return async(t,r)=>{let i=await n(),a=new s(r?.headers);if(a.has(`apikey`)||a.set(`apikey`,e),!a.has(`Authorization`)){let t=i??(d?e:null);t&&a.set(`Authorization`,`Bearer ${t}`)}if(u){let e=vm(t,u,l);e&&(e.traceparent&&!a.has(`traceparent`)&&a.set(`traceparent`,e.traceparent),e.tracestate&&!a.has(`tracestate`)&&a.set(`tracestate`,e.tracestate),e.baggage&&!a.has(`baggage`)&&a.set(`baggage`,e.baggage))}return o(t,G(G({},r),{},{headers:a}))}},gm=!1,_m=!1;function vm(e,t,n){let r=wc();if(!r)return gm||(gm=!0,console.warn("@supabase/supabase-js: tracePropagation is enabled but the tracing runtime is not loaded, so trace headers will not be attached. Add `import '@supabase/supabase-js/tracing'` at your application entry point (requires the OpenTelemetry API package to be installed). The CDN/UMD build does not support trace propagation.")),null;if(!tm(typeof e==`string`||e instanceof URL?e:e.url,t))return null;let i=r();if(!i||!i.traceparent){var a;if(i!=null&&(a=i.carrierKeys)!=null&&a.length&&!_m){_m=!0;let e=i.carrierKeys.includes(`sentry-trace`)?" Sentry detected: set `propagateTraceparent: true` in Sentry.init() to emit it.":` Configure your tracing SDK to emit W3C trace context on outgoing requests.`;console.warn(`@supabase/supabase-js: tracePropagation is enabled and a tracing SDK is active, but its propagator wrote [${i.carrierKeys.join(`, `)}] and no W3C traceparent header, so trace headers will not be attached.`+e)}return null}if(n){let e=em(i.traceparent);if(e&&!e.isSampled)return{traceparent:i.traceparent}}return i}function ym(e){return typeof e==`boolean`?{enabled:e}:e}function bm(e){return e.endsWith(`/`)?e:e+`/`}var xm=!1;function Sm(e){xm||typeof e==`object`&&e&&`schema`in e&&e.schema!==void 0&&(xm=!0,console.warn(`@
12supabase/supabase-js: The "schema" option must be nested under "db", e.g. createClient(url, key, { db: { schema: 'myschema' } }). A top-level "schema" is ignored and queries go to the default schema.`))}function Cm(e,t){let{db:n,auth:r,realtime:i,global:a}=e,{db:o,auth:s,realtime:c,global:l}=t,u=ym(e.tracePropagation),d=ym(t.tracePropagation),f={db:G(G({},o),n),auth:G(G({},s),r),realtime:G(G({},c),i),storage:{},global:G(G(G({},l),a),{},{headers:G(G({},l?.headers??{}),a?.headers??{})}),tracePropagation:{enabled:u?.enabled??d?.enabled??!1,respectSamplingDecision:u?.respectSamplingDecision??d?.respectSamplingDecision??!0},accessToken:async()=>``};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function wm(e){let t=e?.trim();if(!t)throw Error(`supabaseUrl is required.`);if(!t.match(/^https?:\/\//i))throw Error(`Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.`);try{return new URL(bm(t))}catch{throw Error(`Invalid supabaseUrl: Provided URL is malformed.`)}}var Tm=class extends Up{constructor(e){super(e)}},Em=class{constructor(e,t,n){this.supabaseUrl=e,this.supabaseKey=t;let r=wm(e);if(!t)throw Error(`supabaseKey is required.`);mm(t),Sm(n),this.realtimeUrl=new URL(`realtime/v1`,r),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace(`http`,`ws`),this.authUrl=new URL(`auth/v1`,r),this.storageUrl=new URL(`storage/v1`,r),this.functionsUrl=new URL(`functions/v1`,r);let i=`sb-${r.hostname.split(`.`)[0]}-auth-token`,a={db:Xp,realtime:Qp,auth:G(G({},Zp),{},{storageKey:i}),global:Yp,tracePropagation:$p},o=Cm(n??{},a);this.settings=o,this.storageKey=o.auth.storageKey??``,this.headers=o.global.headers??{},o.accessToken?(this.accessToken=o.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(o.auth??{},this.headers,o.global.fetch),this.fetch=hm(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation),this.functionsFetch=hm(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(G({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},o.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(e=>this.realtime.setAuth(e)).catch(e=>console.warn(`Failed to set initial Realtime auth token:`,e)),this.rest=new tl(new URL(`rest/v1`,r).href,{headers:this.headers,schema:o.db.schema,fetch:this.fetch,timeout:o.db.timeout,urlLengthLimit:o.db.urlLengthLimit,retry:o.db.retry}),this.storage=new xd(this.storageUrl.href,this.headers,this.fetch,n?.storage),o.accessToken||this._listenForAuthEvents()}get functions(){return new Nc(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}getOpenApiSpec(){return this.rest.getOpenApiSpec()}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var e=this;if(e.accessToken)return await e.accessToken();let{data:t}=await e.auth.getSession();return t.session?.access_token??null}async _getAccessToken(){var e=this;return await e._getSessionToken()??e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:a,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:f},p,m){let h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Tm({url:this.authUrl.href,headers:G(G({},h),p),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,fetch:m,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(e=>e.toLowerCase()===`authorization`)})}_initRealtimeClient(e){return new xu(this.realtimeUrl.href,G(G({},e),{},{params:G(G({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,`CLIENT`,t?.access_token)})}_handleTokenChanged(e,t,n){(e===`TOKEN_REFRESHED`||e===`SIGNED_IN`||e===`INITIAL_SESSION`)&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e===`SIGNED_OUT`&&(this.realtime.setAuth(),t==`STORAGE`&&this.auth.signOut(),this.changedAccessToken=void 0)}},Dm=(e,t,n)=>new Em(e,t,n);
12function Om(){if(typeof window<`u`||globalThis.Deno!==void 0)return!1;let e=globalThis.process;if(!e)return!1;let t=e.version;if(t==null)return!1;let n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}Om()&&console.warn(`â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715`);var km=dn((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parse=s,e.stringifySetCookie=c,e.serialize=c,e.stringifySetCookie=c,e.serialize=c;var t=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,n=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,o=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function s(e,t){let n=new o,r=e.length;if(r<2)return n;let i=t?.decode||f,a=0;do{let t=u(e,a,r);if(t===-1)break;let o=l(e,a,r);if(t>o){a=e.lastIndexOf(`;`,t-1)+1;continue}let s=d(e,a,t);n[s]===void 0&&(n[s]=i(d(e,t+1,o))),a=o+1}while(a<r);return n}function c(e,a,o){let s=typeof e==`object`?e:{...o,name:e,value:String(a)},c=(typeof a==`object`?a:o)?.encode||encodeURIComponent;if(!t.test(s.name))throw TypeError(`argument name is invalid: ${s.name}`);let l=s.value?c(s.value):``;if(!n.test(l))throw TypeError(`argument val is invalid: ${s.value}`);let u=s.name+`=`+l;if(s.maxAge!==void 0){if(!Number.isInteger(s.maxAge))throw TypeError(`option maxAge is invalid: ${s.maxAge}`);u+=`; Max-Age=`+s.maxAge}if(s.domain){if(!r.test(s.domain))throw TypeError(`option domain is invalid: ${s.domain}`);u+=`; Domain=`+s.domain}if(s.path){if(!i.test(s.path))throw TypeError(`option path is invalid: ${s.path}`);u+=`; Path=`+s.path}if(s.expires){if(!p(s.expires)||!Number.isFinite(s.expires.valueOf()))throw TypeError(`option expires is invali
12d: ${s.expires}`);u+=`; Expires=`+s.expires.toUTCString()}if(s.httpOnly&&(u+=`; HttpOnly`),s.secure&&(u+=`; Secure`),s.partitioned&&(u+=`; Partitioned`),s.priority)switch(typeof s.priority==`string`?s.priority.toLowerCase():void 0){case`low`:u+=`; Priority=Low`;break;case`medium`:u+=`; Priority=Medium`;break;case`high`:u+=`; Priority=High`;break;default:throw TypeError(`option priority is invalid: ${s.priority}`)}if(s.sameSite)switch(typeof s.sameSite==`string`?s.sameSite.toLowerCase():s.sameSite){case!0:case`strict`:u+=`; SameSite=Strict`;break;case`lax`:u+=`; SameSite=Lax`;break;case`none`:u+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid: ${s.sameSite}`)}return u}function l(e,t,n){let r=e.indexOf(`;`,t);return r===-1?n:r}function u(e,t,n){let r=e.indexOf(`=`,t);return r<n?r:-1}function d(e,t,n){let r=t,i=n;do{let t=e.charCodeAt(r);if(t!==32&&t!==9)break}while(++r<i);for(;i>r;){let t=e.charCodeAt(i-1);if(t!==32&&t!==9)break;i--}return e.slice(r,i)}function f(e){if(e.indexOf(`%`)===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function p(e){return a.call(e)===`[object Date]`}}));function Am(){return typeof window<`u`&&window.document!==void 0}function jm(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}var Mm={path:`/`,sameSite:`lax`,httpOnly:!1,maxAge:3456e4},Nm=/^(.*)[.](0|[1-9][0-9]*)$/;function Pm(e,t){if(e===t)return!0;let n=e.match(Nm);return!!(n&&n[1]===t)}function Fm(e,t,n){let r=n??3180,i=encodeURIComponent(t);if(i.length<=r)return[{name:e,value:t}];let a=[];for(;i.length>0;){let e=i.slice(0,r),t=e.lastIndexOf(`%`);t>r-3&&(e=e.slice(0,t));let n=``;for(;e.length>0;)try{n=decodeURIComponent(e);break}catch(t){if(t instanceof URIError&&e.at(-3)===`%`&&e.length>3)e=e.slice(0,e.length-3);else throw t}a.push(n),i=i.slice(e.length)}return a.map((t,n)=>({name:`${e}.${n}`,value:t}))}async function Im(e,t){let n=await t(e);if(n)return n;let r=[];for(let n=0;;n++){let i=await t(`${e}.${n}`);if(!i)break;r.push(i)}return r.length>0?r.join(``):null}var Lm=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.split(``),Rm=` 13\r=`.split(``),zm=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Rm.length;t+=1)e[Rm[t].charCodeAt(0)]=-2;for(let t=0;t<Lm.length;t+=1)e[Lm[t].charCodeAt(0)]=t;return e})();function Bm(e){let t=[],n=0,r=0;if(Um(e,e=>{for(n=n<<8|e,r+=8;r>=6;){let e=n>>r-6&63;t.push(Lm[e]),r-=6}}),r>0)for(n<<=6-r,r=6;r>=6;){let e=n>>r-6&63;t.push(Lm[e]),r-=6}return t.join(``)}function Vm(e){let t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i=0,a=0;for(let t=0;t<e.length;t+=1){let o=zm[e.charCodeAt(t)];if(o>-1)for(i=i<<6|o,a+=6;a>=8;)Wm(i>>a-8&255,r,n),a-=8;else if(o===-2)continue;else throw Error(`Invalid Base64-URL character "${e.at(t)}" at position ${t}`)}return t.join(``)}function Hm(e,t){if(e<=127){t(e);return}if(e<=2047){t(192|e>>6),t(128|e&63);return}if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Um(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){let t=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|t)+65536,n+=1}Hm(r,t)}}function Wm(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw Error(`Invalid UTF-8 sequence`);--t.utf8seq}else if(t.utf8seq>0){if(e<=127)throw Error(`Invalid UTF-8 sequence`);t.codepoint=t.codepoint<<6|e&63,--t.utf8seq,t.utf8seq===0&&n(t.codepoint)}}var Gm=mn(km()),Km=`base64-`,qm=/-flow-[A-Za-z0-9_-]{8,64}-code-verifier$/;function Jm(e){return qm.test(e)}var Ym=`-flows-code-verifier`;function Xm(e){return e.endsWith(Ym)}function Zm(e){if(!e.startsWith(Km))return e;let t;try{t=Vm(e.substring(7))}catch(e){return console.warn(`@supabase/ssr: could not base64url-decode chunked cookie value, treating as absent. Cookie chunks may have been written partially across responses.`,e),null}try{JSON.parse(t)}
13catch{return console.warn(`@supabase/ssr: chunked cookie decoded to invalid JSON, treating as absent. This usually indicates that cookie chunks from different writes were combined (e.g. response committed before all Set-Cookie headers were sent).`),null}return t}function Qm(e,t){let n=e.cookies&&(`get`in e.cookies||`getAll`in e.cookies)?e.cookies:null,r=e.cookieEncoding,i={},a={},o,s,c=()=>{let e=(0,Gm.parse)(document.cookie);return Object.keys(e).map(t=>({name:t,value:e[t]??``}))},l=e=>{e.forEach(({name:e,value:t,options:n})=>{document.cookie=(0,Gm.serialize)(e,t,n)})};if(n){if(`get`in n){let e=async e=>{let t=e.flatMap(e=>[e,...Array.from({length:5}).map((t,n)=>`${e}.${n}`)]),r=[];for(let e=0;e<t.length;e+=1){let i=await n.get(t[e]);(i||typeof i==`string`)&&r.push({name:t[e],value:i})}return r};if(o=async t=>await e(t),`set`in n&&`remove`in n)s=async e=>{for(let t=0;t<e.length;t+=1){let{name:r,value:i,options:a}=e[t];i?await n.set(r,i,a):await n.remove(r,a)}};else if(t)s=async()=>{console.warn(`@supabase/ssr: createServerClient was configured without set and remove cookie methods, but the client needs to set cookies. This can lead to issues such as random logouts, early session termination or increased token refresh requests. If in NextJS, check your middleware.ts file, route handlers and server actions for correctness. Consider switching to the getAll and setAll cookie methods instead of get, set and remove which are deprecated and can be difficult to use correctly.`)};else throw Error(`@supabase/ssr: createBrowserClient requires configuring a getAll and setAll cookie method (deprecated: alternatively both get, set and remove can be used)`)}else if(`getAll`in n){if(o=async()=>await n.getAll(),`setAll`in n)s=n.setAll;else if(t)s=async()=>{console.warn(`@supabase/ssr: createServerClient was configured without the setAll cookie method, but the client needs to set cookies. This can lead to issues such as random logouts, early session termination or increased token refresh requests. If in NextJS, check your middleware.ts file, route handlers and server actions for correctness.`)};else throw Error(`@supabase/ssr: createBrowserClient requires configuring both getAll and setAll cookie methods (deprecated: alternatively both get, set and remove can be used)`)}else throw Error(`@supabase/ssr: ${t?`createServerClient`:`createBrowserClient`} requires configuring getAll and setAll cookie methods (deprecated: alternatively use get, set and remove).${Am()?` As this is called in a browser runtime, consider removing the cookies option object to use the document.cookie API automatically.`:``}`)}else if(!t&&Am())o=()=>c(),s=l;else if(t)throw Error(`@supabase/ssr: createServerClient must be initialized with cookie options that specify getAll and setAll functions (deprecated, not recommended: alternatively use get, set and remove)`);else o=()=>[],s=()=>{throw Error(`@supabase/ssr: createBrowserClient in non-browser runtimes (including Next.js pre-rendering mode) was not initialized cookie options that specify getAll and setAll functions (deprecated: alternatively use get, set and remove), but they were needed`)};if(!t)return{getAll:o,setAll:s,setItems:i,removedItems:a,storage:{isServer:!1,getItem:async e=>{let t=await o([e]),n=await Im(e,async e=>{let n=t?.find(({name:t})=>t===e)||null;return n?n.value:null});return n?Zm(n):null},setItem:async(t,n)=>{let i=(await o([t]))?.map(({name:e})=>e)||[],a=new Set(i.filter(e=>Pm(e,t))),c=n;r===`base64url`&&(c=Km+Bm(n));let l=Fm(t,c);l.forEach(({name:e})=>{a.delete(e)});let u={...Mm,...e?.cookieOptions,maxAge:0},d={...Mm,...e?.cookieOptions,maxAge:Mm.maxAge};delete u.name,delete d.name;let f=u.domain?(()=>{let{domain:e,...t}=u;return t})():null,p=[...f?[...a].map(e=>({name:e,value:``,options:f})):[],...[...a].map(e=>({name:e,value:``,options:u})),...l.map(({name:e,value:t})=>({name:e,value:t,options:d}))];p.length>0&&await s(p,{})},removeItem:async t=>{let n=((await o([t]))?.map(({name:e})=>e)||[]).filter(e=>Pm(e,t));if(n.length===0)return;let r={...Mm,...e?.cookieOptions,maxAge:0};delete r.name;let i=r.domain?(()=>{let{domain:e,...t}=r;return t})():null,a=[...i?n.map(e=>({name:e,value:``,options:i})):[],...n.map(e=>({name:e,value:``,options:r}))];await s(a,{})}}};let u=s,d=!1;return s=async(e,t)=>{let n=!d&&Object.keys(t).length>0;await u(e,n?t:{}),n&&(d=!0)},{getAll:o,setAll:s,setItems:i,removedItems:a,storage:{isServer:!0,getItem:async e=>{if(typeof i[e]==`string`)return i[e];if(a[e])return null;let t=await o([e]),n=await Im(e,async e=>{let n=t?.find(({name:t})=>t===e)||null;return n?n.value:null});return n?typeof n==`string`?Zm(n):n:null},setItem:async(t,n)=>{t.endsWith(`-code-verifier`)&&await $m({getAll:o,setAll:s,setItems:{[t]:n},removedItems:{}},{cookieOptions:e?.cookieOptions??null,cookieEncoding:r}),i[t]=n,delete a[t]},removeItem:async t=>{(Jm(t)||Xm(t))&&await $m({getAll:o,setAll:s,setItems:{},removedItems:{[t]:!0}},{cookieOptions:e?.cookieOptions??null,cookieEncoding:r}),delete i[t],a[t]=!0}}}}async function $m({getAll:e,setAll:t,setItems:n,removedItems:r},i){let a=i.cookieEncoding,o=i.cookieOptions??null,s=await e([...n?Object.keys(n):[],...r?Object.keys(r):[]]),c=s?.map(({name:e})=>e)||[],l=new Map(s?.map(({name:e,value:t})=>[e,t])||[]),u=Object.keys(r).flatMap(e=>c.filter(t=>Pm(t,e))),d=Object.keys(n).flatMap(e=>{let t=new Set(c.filter(t=>
13Pm(t,e))),r=n[e];a===`base64url`&&(r=Km+Bm(r));let i=Fm(e,r);return i.forEach(e=>{t.delete(e.name)}),u.push(...t),i}).filter(({name:e,value:t})=>l.get(e)!==t),f=u.filter(e=>l.has(e)),p={...Mm,...o,maxAge:0},m={...Mm,...o,maxAge:Mm.maxAge};delete p.name,delete m.name;let h=p.domain&&f.length>0?(()=>{let{domain:e,...t}=p;return t})():null;(f.length!==0||d.length!==0)&&await t([...h?f.map(e=>({name:e,value:``,options:h})):[],...f.map(e=>({name:e,value:``,options:p})),...d.map(({name:e,value:t})=>({name:e,value:t,options:m}))],{"Cache-Control":`private, no-cache, no-store, must-revalidate, max-age=0`,Expires:`0`,Pragma:`no-cache`})}var eh=`0.12.7`,th=new Set;function nh(e){th.has(e)||(th.add(e),console.warn(e))}var rh=!1,ih=[`@supabase/auth-helpers-nextjs`,`@supabase/auth-helpers-react`,`@supabase/auth-helpers-remix`,`@supabase/auth-helpers-sveltekit`];function ah(){if(rh||typeof process>`u`||!{}.npm_package_name)return;let e={}.npm_package_name;ih.includes(e)&&(rh=!0,console.warn(` 14ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 15â â ï¸ IMPORTANT: Package Consolidation Notice â 16â â 17â The ${e.padEnd(35)} package name is deprecated. â 18â â 19â You are now using @supabase/ssr - a unified solution for all frameworks. â 20â â 21â The auth-helpers packages have been consolidated into @supabase/ssr â 22â to provide better maintenance and consistent APIs across frameworks. â 23â â 24â Please update your package.json to use @supabase/ssr directly: â 25â npm uninstall ${e.padEnd(42)} â 26â npm install @supabase/ssr â 27â â 28â For more information, visit: â 29â https://supabase.com/docs/guides/auth/server-side â 30ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 31 `))}var oh;function sh(e,t,n){ah();let r=n?.isSingleton===!0||(!n||!(`isSingleton`in n))&&Am();if(r&&oh)return oh;if(!e||!t)throw Error(`@supabase/ssr: Your project's URL and API key are required to create a Supabase client! 32 33Check your Supabase project's API settings to find these values 34 35https://supabase.com/dashboard/project/_/settings/api`);n?.auth?.storage&&nh("@supabase/ssr: createBrowserClient always manages the session via cookies, so the `auth.storage` option you passed is ignored. If you don't need the session to be readable on the server, use @supabase/supabase-js's createClient directly with your own `storage` instead.");let{storage:i}=Qm({...n,cookieEncoding:n?.cookieEncoding??`base64url`},!1),a=Dm(e,t,{...n,global:{...n?.global,headers:{...n?.global?.headers,"X-Client-Info":`supabase-ssr/${eh} createBrowserClient`}},auth:{...n?.auth,...n?.cookieOptions?.name?{storageKey:n.cookieOptions.name}:null,flowType:`pkce`,autoRefreshToken:n?.auth?.autoRefreshToken??Am(),detectSessionInUrl:n?.auth?.detectSessionInUrl??Am(),persistSession:n?.auth?.persistSession??!0,storage:i,...n?.cookies&&`encode`in n.cookies&&n.cookies.encode===`tokens-only`?{userStorage:n?.auth?.userStorage??(Am()?window.localStorage:jm())}:null}});return r&&(oh=a),a}async function ch(e,t){for(let n=1;n<=3;n++)try{return await fetch(e,t)}catch(r){if(t?.signal?.aborted)throw r;if(n===3){let{headers:n,...i}=t??{};throw console.error(`Error fetching request ${e}
35`,r,i),r}console.warn(`Retrying fetch attempt ${n+1} for request: ${e}`),await new Promise(e=>setTimeout(e,100*n))}throw Error(`Unreachable code`)}var lh=()=>ot(`supabase_session`,()=>null),uh=()=>ot(`supabase_user`,()=>null),dh=d({name:`supabase`,enforce:`pre`,async setup({provide:e}){let n,r,i=o(),{url:a,key:c,cookieOptions:l,cookiePrefix:u,useSsrCookies:d,clientOptions:f}=t().public.supabase,p;p=d?sh(a,c,{...f,cookieOptions:{...l,name:u},isSingleton:!0,global:{fetch:ch,...f.global}}):Dm(a,c,{...f,global:{fetch:ch,...f.global}}),e(`supabase`,{client:p});let m=lh(),h=uh();if(!m.value){let{data:e}=([n,r]=s(()=>p.auth.getSession()),n=await n,r(),n);if(e.session){m.value=e.session;let{data:t}=([n,r]=s(()=>p.auth.getClaims()),n=await n,r(),n);h.value=t?.claims??null}}i.hook(`page:start`,async()=>{let{data:e}=await p.auth.getClaims();h.value=e?.claims??null}),p.auth.onAuthStateChange((e,t)=>{JSON.stringify(m.value)!==JSON.stringify(t)&&(m.value=t,t?.user?p.auth.getClaims().then(({data:e})=>{h.value=e?.claims??null}):h.value=null)})}},1);function fh(e){return typeof e==`function`?e():e&&e.__v_isRef===!0?e.value:e}function ph(e){e.indexable!==void 0&&(e.indexable=String(e.indexable)!==`false`),e.trailingSlash!==void 0&&!e.trailingSlash&&(e.trailingSlash=String(e.trailingSlash)!==`false`),e.url&&!nt(String(e.url),{acceptRelative:!0,strict:!1})&&(e.url=Me(String(e.url)));let t=Object.keys(e).sort((e,t)=>e.localeCompare(t)),n={};for(let r of t)n[r]=e[r];return n}function mh(e){let t=e?.debug||!1,n=[];function r(e){if(!e||typeof e!=`object`||Object.keys(e).length===0)return()=>{};if(!e._context&&t){let t=Error(`tmp`).stack?.split(` 36`)[2]?.split(` `)[5];t?.includes(`/`)&&(t=`anonymous`),e._context=t}let r={};for(let t in e){let n=e[t];n!==void 0&&n!==``&&(r[t]=n)}return Object.keys(r).some(e=>!e.startsWith(`_`))?(n.push(r),()=>{let e=n.indexOf(r);e!==-1&&n.splice(e,1)}):()=>{}}function i(e){let t={};e?.debug&&(t._context={}),t._priority={};for(let r in n.sort((e,t)=>(e._priority||0)-(t._priority||0)))for(let i in n[r]){let a=i,o=e?.resolveRefs?fh(n[r][i]):n[r][i];!i.startsWith(`_`)&&o!==void 0&&o!==``&&(t[i]=o,n[r]._priority!==void 0&&n[r]._priority!==-1&&(t._priority[a]=n[r]._priority),e?.debug&&(t._context[a]=n[r]._context?.[a]||n[r]._context||`anonymous`))}return e?.skipNormalize?t:ph(t)}return{stack:n,push:r,get:i}}var hh=We({nuxt:{},icon:{provider:`server`,class:``,aliases:{},iconifyApiEndpoint:`https://api.iconify.design`,localApiEndpoint:`/api/_nuxt_icon`,fallbackToApi:!0,cssSelectorPrefix:`i-`,cssWherePseudo:!0,mode:`css`,attrs:{"aria-hidden":!0},collections:`academicons.akar-icons.ant-design.arcticons.basil.bi.bitcoin-icons.bpmn.brandico.bx.bxl.bxs.bytesize.carbon.catppuccin.cbi.charm.ci.cib.cif.cil.circle-flags.circum.clarity.codex.codicon.covid.cryptocurrency.cryptocurrency-color.cuida.dashicons.devicon.devicon-plain.dinkie-icons.duo-icons.ei.el.emojione.emojione-monotone.emojione-v1.entypo.entypo-social.eos-icons.ep.et.eva.f7.fa.fa-brands.fa-regular.fa-solid.fa6-brands.fa6-regular.fa6-solid.fa7-brands.fa7-regular.fa7-solid.fad.famicons.fe.feather.file-icons.flag.flagpack.flat-color-icons.flat-ui.flowbite.fluent.fluent-color.fluent-emoji.fluent-emoji-flat.fluent-emoji-high-contrast.fluent-mdl2.fontelico.fontisto.formkit.foundation.fxemoji.gala.game-icons.garden.geo.gg.gis.gravity-ui.gridicons.grommet-icons.guidance.healthicons.heroicons.heroicons-outline.heroicons-solid.hugeicons.humbleicons.ic.icomoon-free.icon-park.icon-park-outline.icon-park-solid.icon-park-twotone.iconamoon.iconoir.icons8.il.ion.iwwa.ix.jam.la.lets-icons.line-md.lineicons.logos.ls.lsicon.lucide.lucide-lab.mage.majesticons.maki.map.marketeq.material-icon-theme.material-symbols.material-symbols-light.mdi.mdi-light.medical-icon.memory.meteocons.meteor-icons.mi.mingcute.mono-icons.mynaui.nimbus.nonicons.noto.noto-v1.nrk.octicon.oi.ooui.openmoji.oui.pajamas.pepicons.pepicons-pencil.pepicons-pop.pepicons-print.ph.picon.pixel.pixelarticons.prime.proicons.ps.qlementine-icons.quill.radix-icons.raphael.ri.rivet-icons.roentgen.si.si-glyph.sidekickicons.simple-icons.simple-line-icons.skill-icons.solar.stash.streamline.streamline-block.streamline-color.streamline-cyber.streamline-cyber-color.streamline-emojis.streamline-flex.streamline-flex-color.streamline-freehand.streamline-freehand-color.streamline-kameleon-color.streamline-logos.streamline-pixel.streamline-plump.streamline-plump-color.streamline-sharp.streamline-sharp-color.streamline-stickies-color.streamline-ultimate.streamline-ultimate-color.subway.svg-spinners.system-uicons.tabler.tdesign.teenyicons.temaki.token.token-branded.topcoat.twemoji.typcn.uil.uim.uis.uit.uiw.unjs.vaadin.vs.vscode-icons.websymbol.weui.whh.wi.wpf.zmdi.zondicons`.split(`.`),fetchTimeout:1500}});function gh(){let e=o();return e._appConfig||=de(hh),e._appConfig}var _h=rt;function vh(){return _h}function yh(e){return I()}var bh=rt,xh=[`method`,`baseURL`,`query`,`params`,`body`,`headers`];function Sh(e){let t=[ce(e.method)?.toUpperCase()||`GET`,ce(e.baseURL)];for(let n of[e.query||e.params]){let e=ce(n);if(!e)continue;let r={};for(let[t,n]of Object.entries(e))r[ce(t)]=ce(n);t.push(r)}if(e.body){let n=ce(e.body);if(!n)t.push(lc(n));else if(n instanceof ArrayBuffer)t.push(lc(Object.fromEntries([...new Uint8Array(n).entries()].map(([e,t])=>[e,t.toString()]))));else if(n instanceof FormData){let e=[];for(let t of n.entries()){let[n,r]=t;e.push([n,r instanceof File?`${r.name}:${r.size}:${r.lastModified}`:r])}t.push(lc(e))}else if(O(n))t.push(lc(de(n)));else try{t.push(lc(n))}catch{tn.NUXT_E3002({cause:n})}}return t}var Ch=nn({name:`createUseFetch`,factory(e={}){function t(t,n,r){let[i={},a]=typeof n==`string`?[{},n]:[n,r],o=typeof e==`function`?e(i):e,{server:s,lazy:c,default:l,transform:u,pick:d,watch:f,immediate:m,getCachedData:h,deep:g,dedupe:_,timeout:v,enabled:y,...b}={...typeof e==`function`?{}:o,...i,...typeof e==`function`?o:{}},x=P(()=>ce(t)),S=P(()=>ce(b.key)||`$f`+lc([a,typeof x.value==`string`?x.value:``,...Sh(b)]));if(!b.baseURL&&typeof x.value==`string`&&x.value[0]===`/`&&x.value[1]===`/`)throw tn.NUXT_E3001({url:x.value});let C=de({...p,...b,cache:typeof b.cache==`boolean`?void 0:b.cache}),w={server:s,lazy:c,default:l,transform:u,pick:d,immediate:m,getCachedData:h,deep:g,dedupe:_,timeout:v,enabled:y,watch:f===!1?[]:[...f||[],C]};return f===!1&&(w._keyTriggersExecute=!1),rn(S,(e,{signal:t})=>{let n=b.$fetch||bh,r={signal:t,...C};for(let e of xh)typeof r[e]==`function`&&(r[e]=ce(r[e]));return n(x.value,r)},w)}return t}}),wh=Ch.__nuxt_factory();Ch.__nuxt_factory({lazy:!0,_functionName:`useLazyFetch`});function Th(e){return typeof e==`string`?`'${e}'`:new kh().serialize(e)}var Eh=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Dh=(function(){let e=new Uint8Array(128);for(let t=0;t<69;
36t++)e[Eh.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Oh(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&Dh[n]?Dh[n]:n+128,s=a<128&&Dh[a]?Dh[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var kh=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?Oh(e,t):n===`number`&&r===`number`?e-t:Oh(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort(Oh),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),Ah=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],jh=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Mh=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Nh=[],Ph=class{_data=new Fh;_hash=new Fh([...Ah]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)Nh[n]=e[t+n]|0;else{let e=Nh[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Nh[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Nh[n]=t+Nh[n-7]+i+Nh[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+jh[n]+Nh[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=Fh.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new Fh(t,i)}},Fh=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(Mh.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Ih(e){return new Ph().finalize(e).toBase64()}function Lh(e){return Ih(Th(e))}globalThis.cookieStore;function Rh(e={}){let t=e.path||window.location.pathname,n=new URL(t,window.location.href);if(n.host!==window.location.host)throw Re.NUXT_E2010({path:t});if(n.protocol&&tt(n.protocol))throw Re.NUXT_E2002({toPath:t,protocol:n.protocol});let r={};try{r=JSON.parse(sessionStorage.getItem(`nuxt:reload`)||`{}`)}catch{}if(e.force||r?.path!==t||r?.expires<Date.now()){try{sessionStorage.setItem(`nuxt:reload`,JSON.stringify({path:t,expires:Date.now()+(e.ttl??1e4)}))}catch{}if(e.persistState)try{sessionStorage.setItem(`nuxt:reload:state`,JSON.stringify({state:o().payload.state}))}catch{}window.location.pathname===t?window.location.reload():window.location.href=t}}var zh=qi;function Bh(e,t){return R(t)??e?.meta.layout??zh(e?.path??`/`).appLayout??`default`}var Vh=d({name:`nuxt-site-config:init`,enforce:`pre`,async setup(e){let t=mh(),n=ot(`site-config`);{let e=n.value||window.__NUXT_SITE_CONFIG__||{};for(let n in e)n[0]!==`_`&&t.push({[n]:e[n],_priority:e._priority?.[n]||-1})}return{provide:{nuxtSiteConfig:t}}}}),Hh=d({name:`nuxt:payload`,setup(e){let t=new Set;
36Xe().beforeResolve(async(n,r)=>{let i=Na(n.path),a=i?Ie(n.fullPath):n.path;if(a===(i?Ie(r.fullPath):r.path))return;let o=await Ea(a);if(o){for(let n of t)delete e.static.data[n];for(let n in o.data)n in e.static.data||t.add(n),e.static.data[n]=o.data[n]}}),Ht(()=>{e.hooks.hook(`link:prefetch`,async e=>{let{hostname:t,pathname:n}=new URL(e,window.location.href);t===window.location.hostname&&await Ea(e).catch(()=>{at.NUXT_E7003({url:e})})}),navigator.connection?.effectiveType!==`slow-2g`&&setTimeout(ta,1e3)})}}),Uh=d(()=>{let e=Xe();Ht(()=>{e.beforeResolve(async()=>{await new Promise(e=>{setTimeout(e,100),requestAnimationFrame(()=>{setTimeout(e,0)})})})})}),Wh=d(e=>{let t;async function n(){let i;try{i=await ta()}catch(e){let t=e;if(!(`status`in t&&(t.status===404||t.status===403)))throw t}t&&clearTimeout(t),t=setTimeout(n,r);try{let n=await rt(it(`builds/latest.json`)+`?${Date.now()}`);n.id!==i?.id&&(e.hooks.callHook(`app:manifest:update`,n),t&&clearTimeout(t))}catch{}}Ht(()=>{t=setTimeout(n,r)})}),Gh=d({name:`nuxt:chunk-reload-crawler`,setup(e){let t=!0;e.hooks.hookOnce(`app:suspense:resolve`,()=>{t=!1}),e.hook(`app:chunkError`,()=>{t&&ze(navigator.userAgent)&&Rh()})}}),Kh=d({name:`nuxt:chunk-reload`,setup(e){let n=Xe(),r=t(),i=new Set;n.beforeEach(()=>{i.clear()}),e.hook(`app:chunkError`,({error:e})=>{i.add(e)});function a(e){Rh({path:je(r.app.baseURL,e.fullPath),persistState:!0})}e.hook(`app:manifest:update`,()=>{n.beforeResolve(a)}),n.onError((e,t)=>{i.has(e)&&a(t)})}}),qh=d({name:`nuxt:island-link-navigation`,setup(e){}}),Jh=[[`Icon`,se(()=>B(()=>Promise.resolve().then(()=>ZC).then(e=>e.default||e.default||e),void 0,import.meta.url))]],Yh=d({name:`nuxt:global-components`,setup(e){for(let[t,n]of Jh)e.vueApp.component(t,n),e.vueApp.component(`Lazy`+t,n)}}),Xh={"app-demo":se(()=>B(()=>import(`./BY7MYLxy.js`).then(e=>e.default||e),__vite__mapDeps([300,2,3,1,7,5,6,301,12,52,128,30,129,130,32,31,283,200,170,28,10,11,45,17,278,34,35,176,258,127,64,302]),import.meta.url)),default:se(()=>B(()=>import(`./DZtqpLrX.js`).then(e=>e.default||e),__vite__mapDeps([303,2,13,301,6,3,1,7,5,12,52,128,30,129,130,32,31,283,200,170,28,10,11,45,17,278,34,35,176,258,127,64,302,304,46]),import.meta.url)),"member-integrated":se(()=>B(()=>import(`./N2dFl9nc.js`).then(e=>e.default||e),__vite__mapDeps([305,2,13,301,6,3,1,7,5,12,52,128,30,129,130,32,31,283,200,170,28,10,11,45,17,278,34,35,176,258,127,64,302,304,46]),import.meta.url)),salespage:se(()=>B(()=>import(`./CqwM40jx.js`).then(e=>e.default||e),__vite__mapDeps([306,2,6,3,1,7,5,79,302,11,214,35,215]),import.meta.url))},Zh=d({name:`nuxt:prefetch`,setup(e){let t=Xe();e.hooks.hook(`app:mounted`,()=>{t.beforeEach(async e=>{let t=e?.meta?.layout;t&&typeof Xh[t]==`function`&&await Xh[t]()})}),e.hooks.hook(`link:prefetch`,e=>{if(nt(e))return;let n=t.resolve(e);if(!n)return;let r=n.meta.layout,i=co(n.meta.middleware).filter(e=>typeof e==`string`);for(let e of i){let t=go[e];typeof t==`function`&&t()}typeof r==`string`&&r in Xh&&Yt(Xh[r])})}}),Qh=/^[a-z0-9]+(-[a-z0-9]+)*$/,$h=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!eg(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!eg(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!eg(e,n)?null:e}return null},eg=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function tg(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}var ng=Object.freeze({left:0,top:0,width:16,height:16}),rg=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ig=Object.freeze({...ng,...rg}),ag=Object.freeze({...ig,body:``,hidden:!1});function og(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function sg(e,t){let n=og(e,t);for(let r in ag)r in rg?r in e&&!(r in n)&&(n[r]=rg[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function cg(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=sg(r[e]||i[e],a)}
36return o(t),n.forEach(o),sg(e,a)}function lg(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=tg(e);for(let i in r){let a=r[i];a&&(t(i,cg(e,i,a)),n.push(i))}return n}var ug={provider:``,aliases:{},not_found:{},...ng};function dg(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function fg(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!dg(e,ug))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!dg(t,ag))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!dg(t,ag))return null}return t}var pg=Object.create(null);function mg(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function hg(e,t){let n=pg[e]||(pg[e]=Object.create(null));return n[t]||(n[t]=mg(e,t))}function gg(e,t){return fg(t)?lg(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function _g(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var vg=!1;function yg(e){return typeof e==`boolean`&&(vg=e),vg}function bg(e){let t=typeof e==`string`?$h(e,!0,vg):e;if(t){let e=hg(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function xg(e,t){let n=$h(e,!0,vg);if(!n)return!1;let r=hg(n.provider,n.prefix);return t?_g(r,n.name,t):(r.missing.add(n.name),!0)}function Sg(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),vg&&!t&&!e.prefix){let t=!1;return fg(e)&&(e.prefix=``,lg(e,(e,n)=>{xg(e,n)&&(t=!0)})),t}let n=e.prefix;return eg({prefix:n,name:`a`})?!!gg(hg(t,n),e):!1}function Cg(e){let t=bg(e);return t&&{...ig,...t}}var wg=Object.freeze({width:null,height:null}),Tg=Object.freeze({...wg,...rg}),Eg=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Dg=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Og(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(Eg);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=Dg.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function kg(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function Ag(e,t){return e?`<defs>`+e+`</defs>`+t:t}function jg(e,t,n){let r=kg(e);return Ag(r.defs,t+r.content+n)}var Mg=e=>e===`unset`||e===`undefined`||e===`none`;function Ng(e,t){let n={...ig,...e},r={...Tg,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=jg(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=Og(d,c/l)):(u=o===`auto`?c:o,d=s===null?Og(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{Mg(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var Pg=/\sid="(\S+)"/g,Fg=new Map;function Ig(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=Fg.get(e)||0;return Fg.set(e,t+1),t?`${e}${t}`:e}function Lg(e){let t=[],n;for(;n=Pg.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=Ig(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}var Rg=Object.create(null);function zg(e,t){Rg[e]=t}function Bg(e){return Rg[e]||Rg[``]}function Vg(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var Hg=Object.create(null),Ug=[`https://api.simplesvg.com`,`https://api.unisvg.com`],Wg=[];Ug.length>0;)Ug.length===1||Math.random()>
vendor: 6,977 bytes, line 36
36.5?Wg.push(Ug.shift()):Wg.push(Ug.pop());Hg[``]=Vg({resources:[`https://api.iconify.design`].concat(Wg)});function Gg(e,t){let n=Vg(t);return n!==null&&(Hg[e]=n,!0)}function Kg(e){return Hg[e]}function qg(){return Object.keys(Hg)}var Jg=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function Yg(e){Jg=e}function Xg(){return Jg}function Zg(e,t){let n=Kg(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function Qg(e){return e===404}var $g=(e,t,n)=>{let r=[],i=Zg(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function e_(e){if(typeof e==`string`){let t=Kg(e);if(t)return t.path}return`/`}var t_={prepare:$g,send:(e,t,n)=>{if(!Jg){n(`abort`,424);return}let r=e_(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;Jg(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(Qg(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function n_(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function r_(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||n_([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var i_=0;function a_(e,t,n){let r=i_++,i=n_.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function o_(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=hg(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function s_(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i=typeof e==`string`?$h(e,t,n):e;i&&r.push(i)}),r}var c_={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function l_(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function u_(e){let t={...c_,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=l_(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function d_(){}var f_=Object.create(null);function p_(e){if(!f_[e]){let t=Kg(e);if(!t)return;f_[e]={config:t,redundancy:u_(t)}}return f_[e]}function m_(e,t,n){let r,i;if(typeof e==`string`){let t=Bg(e);if(!t)return n(void 0,424),d_;i=t.send;let a=p_(e);a&&(r=a.redundancy)}else{let t=Vg(e);if(t){r=u_(t);let n=Bg(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),d_):r.query(t,i,n)().abort}function h_(){}function g_(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,r_(e)}))}function __(e){let t=[],n=[];return e.forEach(e=>{(e.match(Qh)?t:n).push(e)}),{valid:t,invalid:n}}function v_(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!gg(e,n).length){r();return}}catch(e){console.error(e)}r(),g_(e)}function y_(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function b_(e,t){e.iconsToLoad=e.iconsToLoad?e.iconsToLoad.concat(t).sort():t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;let i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i)){y_(e.loadIcons(r,n,t),t=>{v_(e,r,t)});return}if(i){r.forEach(r=>{y_(i(r,n,t),t=>{v_(e,[r],t?{prefix:n,icons:{[r]:t}}:null)})});return}let{valid:a,invalid:o}=__(r);if(o.length&&v_(e,o,null),!a.length)return;let s=n.match(Qh)?Bg(t):null;if(!s){v_(e,a,null);return}s.prepare(t,n,a).forEach(n=>{m_(t,n,t=>{v_(e,n.icons,t)})})}))}var x_=(e,t)=>{let n=o_(s_(e,!0,yg()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,h_)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(hg(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=hg(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}
36),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&b_(e,t)}),t?a_(t,n,i):h_},S_=e=>new Promise((t,n)=>{let r=typeof e==`string`?$h(e,!0):e;if(!r){n(e);return}x_([r||e],i=>{if(i.length&&r){let e=bg(r);if(e){t({...ig,...e});return}}n(e)})});function C_(e,t,n){hg(n||``,t).loadIcons=e}function w_(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in wg?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var T_=/[\s,]+/;function E_(e,t){t.split(T_).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0}})}function D_(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function O_(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function k_(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function A_(e){return`data:image/svg+xml,`+k_(e)}function j_(e){return`url("`+A_(e)+`")`}var M_={...Tg,inline:!1},N_={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},P_={display:`inline-block`},F_={backgroundColor:`currentColor`},I_={backgroundColor:`transparent`},L_={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},R_={webkitMask:F_,mask:F_,background:I_};for(let e in R_){let t=R_[e];for(let n in L_)t[e+n]=L_[n]}var z_={};[`horizontal`,`vertical`].forEach(e=>{let t=e.slice(0,1)+`Flip`;z_[e+`-flip`]=t,z_[e.slice(0,1)+`-flip`]=t,z_[e+`Flip`]=t});function B_(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var V_=(e,t)=>{let n=w_(M_,t),r={...N_},i=t.mode||`svg`,a={},o=t.style,s=typeof o==`object`&&!(o instanceof Array)?o:{};for(let e in t){let i=t[e];if(i!==void 0)switch(e){case`icon`:case`style`:case`onLoad`:case`mode`:case`ssr`:case`customise`:break;case`inline`:case`hFlip`:case`vFlip`:n[e]=i===!0||i===`true`||i===1;break;case`flip`:typeof i==`string`&&E_(n,i);break;case`color`:a.color=i;break;case`rotate`:typeof i==`string`?n[e]=D_(i):typeof i==`number`&&(n[e]=i);break;case`ariaHidden`:case`aria-hidden`:i!==!0&&i!==`true`&&delete r[`aria-hidden`];break;default:{let t=z_[e];t?(i===!0||i===`true`||i===1)&&(n[t]=!0):M_[e]===void 0&&(r[e]=i)}}}let c=Ng(e,n),l=c.attributes;if(n.inline&&(a.verticalAlign=`-0.125em`),i===`svg`)return r.style={...a,...s},Object.assign(r,l),r.innerHTML=Lg(c.body),N(`svg`,r);let{body:u,width:d,height:f}=e,p=i===`mask`||i!==`bg`&&u.indexOf(`currentColor`)!==-1,m=O_(u,{...l,width:d+``,height:f+``});return r.style={...a,"--svg":j_(m),width:B_(l.width),height:B_(l.height),...P_,...p?F_:I_,...s},N(`span`,r)};if(yg(!0),zg(``,t_),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!Sg(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;Gg(e,r)||console.error(n)}catch{console.error(n)}}}}var H_={...ig,body:``},U_=Ee((e,{emit:t})=>{let n=I(null);function r(){n.value&&=(n.value.abort?.(),null)}let i=I(!!e.ssr),a=I(``),o=pe(null);function s(){let i=e.icon;if(typeof i==`object`&&i&&typeof i.body==`string`)return a.value=``,{data:i};let o;if(typeof i!=`string`||(o=$h(i,!1,!0))===null)return null;let s=bg(o);if(!s){let e=n.value;return(!e||e.name!==i)&&(s===null?n.value={name:i}:n.value={name:i,abort:x_([o],c)}),null}r(),a.value!==i&&(a.value=i,_e(()=>{t(`load`,i)}));let l=e.customise;if(l){s=Object.assign({},s);let e=l(s.body,o.name,o.prefix,o.provider);typeof e==`string`&&(s.body=e)}let u=[`iconify`];return o.prefix!==``&&u.push(`iconify--`+o.prefix),o.provider!==``&&u.push(`iconify--`+o.provider),{data:s,classes:u}}function c(){let e=s();e?e.data!==o.value?.data&&(o.value=e):o.value=null}return i.value?c():T(()=>{i.value=!0,c()}),Ce(()=>e.icon,c),j(r),()=>
36{let t=o.value;if(!t)return V_(H_,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(` `)}),V_({...ig,...t.data},n)}},{props:[`icon`,`mode`,`ssr`,`width`,`height`,`style`,`color`,`inline`,`rotate`,`hFlip`,`horizontalFlip`,`vFlip`,`verticalFlip`,`flip`,`id`,`ariaHidden`,`customise`,`title`],emits:[`load`]}),W_={getAPIConfig:Kg,setAPIModule:zg,sendAPIQuery:m_,setFetch:Yg,getFetch:Xg,listAPIProviders:qg},G_=d({name:`@nuxt/icon`,setup(){let e=t(),n=gh().icon,r=vh(),i=r.native;W_.setFetch((e,t)=>{let n=globalThis.$fetch?.native;return(i||n||globalThis.fetch)(e,t)});let a=[];if(n.provider===`server`){let t=e.app?.baseURL?.replace(/\/$/,``)??``;a.push(t+(n.localApiEndpoint||`/api/_nuxt_icon`)),(n.fallbackToApi===!0||n.fallbackToApi===`client-only`)&&a.push(n.iconifyApiEndpoint)}else n.provider===`none`?W_.setFetch(()=>Promise.resolve(new Response)):a.push(n.iconifyApiEndpoint);async function o(e,t){try{let n=await r(a[0]+`/`+t+`.json`,{query:{icons:e.join(`,`)}});if(!n||n.prefix!==t||!n.icons)throw Error(`Invalid data`+JSON.stringify(n));return n}catch(e){return console.error(`Failed to load custom icons`,e),null}}Gg(``,{resources:a});for(let e of n.customCollections||[])e&&C_(o,e)}});function K_(e){let t=de({});return be(()=>{let n=o().$nuxtSiteConfig.get(Ge({resolveRefs:!0},e));t&&n&&Object.assign(t,n)}),delete t._priority,t}var q_=d(()=>{let e=ei();if(!e)return;let{tagPriority:n,separator:r,titleSeparator:i}=t().public[`seo-utils`],a=K_(),o=a.separator||r||a.titleSeparator||i,s=a.titleSeparator||i||a.separator||r,c={meta:[],templateParams:{site:a,siteUrl:a.url,siteName:a.name}};o&&(c.templateParams.separator=o),s&&(c.templateParams.titleSeparator=s),a.description&&(c.templateParams.siteDescription=a.description,c.meta.push({name:`description`,content:`%site.description`,tagPriority:n})),e.push(c)}),J_=`x-nuxt-seo-utils-disabled-twitter-card`,Y_=d(()=>{let e=ei();if(!e)return;let{automaticTwitterTags:n}=t().public[`seo-utils`];e.use(Ln),n===!1?(e.use(pr({twitterCard:J_})),e.use({key:`nuxt-seo-utils:twitter-card-suppression`,hooks:{"tags:beforeResolve":({tags:e})=>{for(let t=e.length-1;t>=0;t--){let n=e[t];n.tag===`meta`&&n.props.name===`twitter:card`&&n.props.content===J_&&e.splice(t,1)}}}})):e.use(pr())});function X_(){let e=K_({resolveRefs:!1});return{t:(e,t,n)=>t,te:e=>!1,strategy:`no_prefix`,defaultLocale:P(()=>ce(e.defaultLocale)||`en`),locale:P(()=>ce(e.currentLocale)||ce(e.defaultLocale)||`en`)}}var Z_=/\d/,Q_=[`-`,`_`,`/`,`.`];function $_(e=``){if(!Z_.test(e))return e!==e.toLowerCase()}function ev(e,t){let n=t??Q_,r=[];if(!e||typeof e!=`string`)return r;let i=``,a,o;for(let t of e){let e=n.includes(t);if(e===!0){r.push(i),i=``,a=void 0;continue}let s=$_(t);if(o===!1){if(a===!1&&s===!0){r.push(i),i=t,a=s;continue}if(a===!0&&s===!1&&i.length>1){let e=i.at(-1);r.push(i.slice(0,Math.max(0,i.length-1))),i=e+t,a=s;continue}}i+=t,a=s,o=e}return r.push(i),r}function tv(e){return e?e[0].toUpperCase()+e.slice(1):``}var nv=/^(a|an|and|as|at|but|by|for|if|in|is|nor|of|on|or|the|to|with)$/i;function rv(e,t){return(Array.isArray(e)?e:ev(e)).filter(Boolean).map(e=>nv.test(e)?e.toLowerCase():tv(t?.normalize?e.toLowerCase():e)).join(` `)}function iv(){let e=Ue(),t=Qe(),n;try{n=X_()}catch{}return P(()=>{if(t.value?.statusCode&&[404,500].includes(t.value.statusCode))return`${t.value.statusCode} - ${t.value.message}`;if(typeof e.meta?.title==`string`)return e.meta?.title;let r=Le(e.path||`/`).split(`/`).pop(),i=r?rv(r):null,a=e.matched?.at(-1);if(a){let e=String(a.name).split(`___`)?.[0];e&&n&&(i=n.t(`pages.${e}.title`,i||``,{missingWarn:!1})||i)}return i})}var av=d({name:`nuxt-seo:fallback-titles`,env:{islands:!1},setup(){let e=iv();ti({title:()=>e.value},{tagPriority:101})}}),ov=Object.defineProperty,sv=Object.defineProperties,cv=Object.getOwnPropertyDescriptors,lv=Object.getOwnPropertySymbols,uv=Object.prototype.hasOwnProperty,dv=Object.prototype.propertyIsEnumerable,fv=(e,t,n)=>t in e?ov(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||={})uv.call(t,n)&&fv(e,n,t[n]);if(lv)for(var n of lv(t))dv.call(t,n)&&fv(e,n,t[n]);return e},q=(e,t)=>
36sv(e,cv(t)),J=(e,t,n)=>fv(e,typeof t==`symbol`?t:t+``,n),pv=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),Y=class{static isSSR(){return typeof window>`u`||typeof document>`u`}static isBrowser(){return!this.isSSR()}static hasAPI(e){return!this.isSSR()&&window[e]!==void 0}static getApex(){return typeof window<`u`&&window.Apex?window.Apex:typeof global<`u`&&global.Apex?global.Apex:{}}},mv=class e{constructor(e,t=null){this.nodeName=e,this.namespaceURI=t,this.attributes=new Map,this.children=[],this.textContent=``,this.style={},this.classList=new hv,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){if(e&&e!==this){if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}e.parentNode=this,this.children.push(e)}return e}removeChild(e){let t=this.children.indexOf(e);return t!==-1&&(this.children.splice(t,1),e.parentNode=null),e}insertBefore(e,t){if(!t)return this.appendChild(e);if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}let n=this.children.indexOf(t);return n!==-1&&(e.parentNode=this,this.children.splice(n,0,e)),e}cloneNode(t=!1){let n=new e(this.nodeName,this.namespaceURI);return n.textContent=this.textContent,this.attributes.forEach((e,t)=>{n.attributes.set(t,e)}),Object.assign(n.style,this.style),t&&this.children.forEach(e=>{e.cloneNode&&n.appendChild(e.cloneNode(!0))}),n}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getRootNode(){let e=this;for(;e.parentNode;)e=e.parentNode;return e}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let e=``;if(this.attributes.forEach((t,n)=>{e+=` ${n}="${t}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${e}/>`;let t=this.children.map(e=>e.toString()).join(``);return`<${this.nodeName}${e}>${this.textContent}${t}</${this.nodeName}>`}get innerHTML(){return this.children.map(e=>e.toString()).join(``)}set innerHTML(e){this.children=[],this.textContent=e}get outerHTML(){return this.toString()}get isConnected(){return!0}},hv=class{constructor(){this.classes=new Set}add(...e){e.forEach(e=>this.classes.add(e))}remove(...e){e.forEach(e=>this.classes.delete(e))}contains(e){return this.classes.has(e)}toggle(e,t){return t===!0?(this.classes.add(e),!0):t===!1||this.classes.has(e)?(this.classes.delete(e),!1):(this.classes.add(e),!0)}toString(){return Array.from(this.classes).join(` `)}},gv=class{constructor(){this.SVGNS=`http://www.w3.org/2000/svg`,this.XLINKNS=`http://www.w3.org/1999/xlink`}createElementNS(e,t){return new mv(t,e)}createTextNode(e){let t={nodeName:`#text`,nodeType:3,textContent:e,toString(){return t.textContent}};return t}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString(e){return e.toString?e.toString():``}}}createDOMParser(){return{parseFromString(e,t){let n=new mv(`root`);return n.innerHTML=e,{documentElement:n}}}}},_v=null,vv=null,yv=null,X=class{static init(){Y.isSSR()&&!_v&&(_v=new gv)}static createElement(e){return Y.isSSR()?(_v||this.init(),_v.createElementNS(null,e)):document.createElement(e)}static createElementNS(e,t){return Y.isSSR()?(_v||this.init(),_v.createElementNS(e,t)):document.createElementNS(e,t)}static createTextNode(e){return Y.isSSR()?(_v||this.init(),_v.createTextNode(e)):document.createTextNode(e)}static querySelector(e){return Y.isSSR()?null:document.querySelector(e)}static querySelectorAll(e){return Y.isSSR()?[]:document.querySelectorAll(e)}static getComputedStyle(e){return Y.isSSR()?{}:window.getComputedStyle(e)}static getBoundingClientRect(e){return Y.isSSR()?(_v||this.init(),_v.getBoundingClientRect(e)):e?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return Y.isSSR()?(_v||this.init(),vv||=_v.createXMLSerializer(),vv):(vv||=new XMLSerializer,vv)}static getDOMParser(){return Y.isSSR()?(_v||this.init(),yv||=_v.createDOMParser(),yv):(yv||=new DOMParser,yv)}static addWindowEventListener(e,t,n){Y.isBrowser()&&window.addEventListener(e,t,n)}static removeWindowEventListener(e,t,n){Y.isBrowser()&&window.removeEventListener(e,t,n)}static requestAnimationFrame(e){return Y.isBrowser()?window.requestAnimationFrame(e):(e(0),null)}static cancelAnimationFrame(e){Y.isBrowser()&&e&&window.cancelAnimationFrame(e)}static elementExists(e){return e?Y.isSSR()?e._ssrMode===!0||e.nodeName!==void 0:e.getRootNode?e.getRootNode({composed:!0})===document||e.isConnected:!1:!1}
36static getWindow(){return Y.isBrowser()?window:null}static getDocument(){return Y.isBrowser()?document:null}static _getShim(){return _v}static _resetShim(){_v=null,vv=null,yv=null}},Z=class e{static isObject(e){return e&&typeof e==`object`&&!Array.isArray(e)}static is(e,t){return Object.prototype.toString.call(t)===`[object `+e+`]`}static isSafari(){return Y.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(e,t){let n=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach(r=>{this.isObject(t[r])&&r in e?n[r]=this.extend(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}static extendArray(t,n){let r=[];return t.map(t=>{r.push(e.extend(n,t))}),t=r,t}static monthMod(e){return e%12}static clone(e,t=new WeakMap,n=!1){if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);let r;if(Array.isArray(e)){if(n)r=e.slice();else{r=[],t.set(e,r);for(let n=0;n<e.length;n++)r[n]=this.clone(e[n],t,!1)}}else if(e instanceof Date)r=new Date(e.getTime());else if(n)r=Object.assign({},e);else{r={},t.set(e,r);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=this.clone(e[n],t,!1))}return r}static shallowClone(e){return typeof e!=`object`||!e?e:Array.isArray(e)?e.slice():Object.assign({},e)}static shallowEqual(e,t){if(e===t)return!0;if(!e||!t)return!1;if(typeof e!=`object`||typeof t!=`object`)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}static log10(e){return Math.log(e)/Math.LN10}static roundToBase10(e){return 10**Math.floor(Math.log10(e))}static roundToBase(e,t){return t**+Math.floor(Math.log(e)/Math.log(t))}static parseNumber(e){return typeof e==`number`||e===null?e:parseFloat(e)}static stripNumber(e,t=2){return Number.isInteger(e)?e:parseFloat(e.toPrecision(t))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(e){return e.toString().includes(`e`)?Math.round(e):e}static elementExists(e){return!(!e||!e.isConnected)}static isInShadowDOM(t){if(!t||!t.getRootNode)return!1;let n=t.getRootNode();return n&&n!==document&&e.is(`ShadowRoot`,n)}static getShadowRootHost(t){return e.isInShadowDOM(t)&&t.getRootNode().host||null}static getDimensions(e){if(!e)return[0,0];if(Y.isSSR())return[e._ssrWidth||400,e._ssrHeight||300];let t;try{t=getComputedStyle(e,null)}catch{return[e.clientWidth||0,e.clientHeight||0]}let n=e.clientWidth,r=e.clientHeight;if(!n||!r){let t=e.getBoundingClientRect();n||=t.width,r||=t.height}return r-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),n-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),[n,r]}static getBoundingClientRect(e){if(!e)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(Y.isSSR())return X.getBoundingClientRect(e);let 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}}static getLargestStringFromArr(e){return e.reduce((e,t)=>(Array.isArray(t)&&(t=t.reduce((e,t)=>e.length>t.length?e:t)),e.length>t.length?e:t),0)}static hexToRgba(e=`#999999`,t=.6){e.substring(0,1)!==`#`&&(e=`#999999`);let n=e.replace(`#`,``),r=n.match(RegExp(`(.{`+n.length/3+`})`,`g`))||[];for(let e=0;e<r.length;e++)r[e]=parseInt(r[e].length===1?r[e]+r[e]:r[e],16);return t!==void 0&&r.push(t),`rgba(`+r.join(`,`)+`)`}static getOpacityFromRGBA(e){return parseFloat(e.replace(/^.*,(.+)\)/,`$1`))}static parseHex(e){if(typeof e!=`string`)return null;let t=e.trim().replace(`#`,``);return t.length===3&&(t=t.split(``).map(e=>e+e).join(``)),/^[0-9a-fA-F]{6}$/.test(t)?[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]:null}static relativeLuminance([e,t,n]){let r=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(e)+.7152*r(t)+.0722*r(n)}static getContrastRatio(t,n){let r=e.parseHex(t),i=e.parseHex(n);if(!r||!i)return 0;let a=e.relativeLuminance(r),o=e.relativeLuminance(i),s=Math.max(a,o),c=Math.min(a,o);return(s+.05)/(c+.05)}static rgb2hex(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?`#`+(`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):``}shadeRGBColor(e,t){let n=t.split(`,`),r=e<0?0:255,i=e<0?e*-1:e,a=parseInt(n[0].slice(4),10),o=parseInt(n[1],10),s=parseInt(n[2],10);
36return`rgb(`+(Math.round((r-a)*i)+a)+`,`+(Math.round((r-o)*i)+o)+`,`+(Math.round((r-s)*i)+s)+`)`}shadeHexColor(e,t){let n=parseInt(t.slice(1),16),r=e<0?0:255,i=e<0?e*-1:e,a=n>>16,o=n>>8&255,s=n&255;return`#`+(16777216+(Math.round((r-a)*i)+a)*65536+(Math.round((r-o)*i)+o)*256+(Math.round((r-s)*i)+s)).toString(16).slice(1)}shadeColor(t,n){return e.isColorHex(n)?this.shadeHexColor(t,n):this.shadeRGBColor(t,n)}static isColorHex(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}static isCSSVariable(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.startsWith(`var(`)&&t.endsWith(`)`)}static getThemeColor(t){if(!e.isCSSVariable(t)||Y.isSSR())return t;let n=document.createElement(`div`);n.style.cssText=`position:fixed; left: -9999px; visibility:hidden;`,n.style.color=t,document.body.appendChild(n);let r;try{r=window.getComputedStyle(n).color}finally{n.parentNode&&n.parentNode.removeChild(n)}return r}static applyOpacityToColor(e,t){let n=Number(t);return Number.isFinite(n)?n<=0?`transparent`:n>=1?e:`color-mix(in srgb, ${e} ${Math.round(n*100)}%, transparent)`:e}static getPolygonPos(e,t){let n=[],r=Math.PI*2/t;for(let i=0;i<t;i++){let t={};t.x=e*Math.sin(i*r),t.y=-e*Math.cos(i*r),n.push(t)}return n}static polarToCartesian(e,t,n,r){let i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}static escapeString(e,t=`x`){let n=e.toString().slice();return n=n.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,t),n}static negToZero(e){return e<0?0:e}static moveIndexInArray(e,t,n){if(n>=e.length){let t=n-e.length+1;for(;t--;)e.push(void 0)}return e.splice(n,0,e.splice(t,1)[0]),e}static extractNumber(e){return parseFloat(e.replace(/[^\d.]*/g,``))}static findAncestor(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}static setELstyles(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e.style.key=t[n])}static preciseAddition(e,t){let n=(String(e).split(`.`)[1]||``).length,r=(String(t).split(`.`)[1]||``).length,i=10**Math.max(n,r);return(Math.round(e*i)+Math.round(t*i))/i}static isNumber(e){return!isNaN(e)&&parseFloat(String(Number(e)))===e&&!isNaN(parseInt(e,10))}static isFloat(e){return Number(e)===e&&e%1!=0}static isMsEdge(){if(Y.isSSR())return!1;let e=window.navigator.userAgent,t=e.indexOf(`Edge/`);return t>0&&parseInt(e.substring(t+5,e.indexOf(`.`,t)),10)}static getGCD(e,t,n=7){let r=10**(n-Math.floor(Math.log10(Math.max(e,t))));for(r>1?(e=Math.round(Math.abs(e)*r),t=Math.round(Math.abs(t)*r)):r=1;t;){let n=t;t=e%t,e=n}return e/r}static getPrimeFactors(e){let t=[],n=2;for(;e>=2;)e%n==0?(t.push(n),e/=n):n++;return t}static mod(e,t,n=7){let r=10**(n-Math.floor(Math.log10(Math.max(e,t))));return e=Math.round(Math.abs(e)*r),t=Math.round(Math.abs(t)*r),e%t/r}},bv=class{constructor(e){this.w=e,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]}isValidDate(e){return typeof e!=`number`&&!isNaN(this.parseDate(e))}getTimeStamp(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}getDate(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}parseDate(e){if(!isNaN(Date.parse(e)))return this.getTimeStamp(e);let t=Date.parse(e.replace(/-/g,`/`).replace(/[a-z]+/gi,` `));return t=this.getTimeStamp(t),t}parseDateWithTimezone(e){return Date.parse(e.replace(/-/g,`/`).replace(/[a-z]+/gi,` `))}formatDate(e,t){let n=this.w.globals.locale,r=this.w.config.xaxis.labels.datetimeUTC,i=[`\0`,...n.months],a=[`�`,...n.shortMonths],o=[`�`,...n.days],s=[`�`,...n.shortDays];function c(e,t=2){let n=e+``;for(;n.length<t;)n=`0`+n;return n}let l=r?e.getUTCFullYear():e.getFullYear();t=t.replace(/(^|[^\\])yyyy+/g,`$1`+l),t=t.replace(/(^|[^\\])yy/g,`$1`+l.toString().substr(2,2)),t=t.replace(/(^|[^\\])y/g,`$1`+l);let u=(r?e.getUTCMonth():e.getMonth())+1;t=t.replace(/(^|[^\\])MMMM+/g,`$1`+i[0]),t=t.replace(/(^|[^\\])MMM/g,`$1`+a[0]),t=t.replace(/(^|[^\\])MM/g,`$1`+c(u)),t=t.replace(/(^|[^\\])M/g,`$1`+u);let d=r?e.getUTCDate():e.getDate();t=t.replace(/(^|[^\\])dddd+/g,`$1`+o[0]),t=t.replace(/(^|[^\\])ddd/g,`$1`+s[0]),t=t.replace(/(^|[^\\])dd/g,`$1`+c(d)),t=t.replace(/(^|[^\\])d/g,`$1`+d);let f=r?e.getUTCHours():e.getHours();t=t.replace(/(^|[^\\])HH+/g,`$1`+c(f)),t=t.replace(/(^|[^\\])H/g,`$1`+f);let p=f>12?f-12:f===0?12:f;t=t.replace(/(^|[^\\])hh+/g,`$1`+c(p)),t=t.replace(/(^|[^\\])h/g,`$1`+p);let m=r?e.getUTCMinutes():e.getMinutes();t=t.replace(/(^|[^\\])mm+/g,`$1`+c(m)),t=t.replace(/(^|[^\\])m/g,`$1`+m);let h=r?e.getUTCSeconds():e.getSeconds();t=t.replace(/(^|[^\\])ss+/g,`$1`+c(h)),t=t.replace(/(^|[^\\])s/g,`$1`+h);let g=r?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,`$1`+c(g,3)),g=Math.round(g/10),t=t.replace(/(^|[^\\])ff/g,`$1`+c(g)),g=Math.round(g/10),t=t.replace(/(^|[^\\])f/g,`$1`+g);let _=f<12?`AM`:`PM`;t=t.replace(/(^|[^\\])TT+/g,`$1`+_),t=t.replace(/(^|[^\\])T/g,`$1`+_.charAt(0));let v=_.toLowerCase();t=t.replace(/(^|[^\\])tt+/g,`$1`+v),t=t.replace(/(^|[^\\])t/g,`$1`+v.charAt(0));let y=-e.getTimezoneOffset(),b=r||!y?`Z`:y>0?`+`:`-`;if(!r){y=Math.abs(y);let e=Math.floor(y/60),t=y%60;b+=c(e)+`:`+c(t)}t=t.replace(/(^|[^\\])K/g,`$1`+b);let x=(r?e.getUTCDay():e.getDay())+1;return t=t.replace(new RegExp(o[0],`g`),o[x]),t=t.replace(new RegExp(s[0],`g`),s[x]),t=t.replace(new RegExp(i[0],`g`),i[u]),t=t.replace(new RegExp(a[0],`g`),a[u]),t=t.replace(/\\(.)/g,`$1`),t}getTimeUnitsfromTimestamp(e,t){let n=this.w;n.config.xaxis.min!==void 0&&(e=n.config.xaxis.min),n.config.xaxis.max!==void 0&&(t=n.config.xaxis.max);let r=this.getDate(e),i=this.getDate(t),a=this.formatDate(r,`yyyy MM dd HH mm ss fff`).split(` `),o=this.formatDate(i,`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:
36parseInt(a[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(o[0],10)}}isLeapYear(e){return e%4==0&&e%100!=0||e%400==0}calculcateLastDaysOfMonth(e,t,n){return this.determineDaysOfMonths(e,t)-n}determineDaysOfYear(e){let t=365;return this.isLeapYear(e)&&(t=366),t}determineRemainingDaysOfYear(e,t,n){let r=this.daysCntOfYear[t]+n;return t>1&&this.isLeapYear(e)&&r++,r}determineDaysOfMonths(e,t){let n=30;switch(e=Z.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(n=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:n=31;break;default:n=31}return n}getDateFields(e,t){let n=new Date(e);return t?{year:n.getUTCFullYear(),month:n.getUTCMonth(),date:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),ms:n.getUTCMilliseconds(),weekday:n.getUTCDay()}:{year:n.getFullYear(),month:n.getMonth(),date:n.getDate(),hour:n.getHours(),minute:n.getMinutes(),second:n.getSeconds(),ms:n.getMilliseconds(),weekday:n.getDay()}}addInterval(e,t,n,r){let i=new Date(e);if(r)switch(t){case`year`:i.setUTCFullYear(i.getUTCFullYear()+n);break;case`month`:i.setUTCMonth(i.getUTCMonth()+n);break;case`week`:i.setUTCDate(i.getUTCDate()+n*7);break;case`day`:i.setUTCDate(i.getUTCDate()+n);break;case`hour`:i.setUTCHours(i.getUTCHours()+n);break;case`minute`:i.setUTCMinutes(i.getUTCMinutes()+n);break;case`second`:i.setUTCSeconds(i.getUTCSeconds()+n)}else switch(t){case`year`:i.setFullYear(i.getFullYear()+n);break;case`month`:i.setMonth(i.getMonth()+n);break;case`week`:i.setDate(i.getDate()+n*7);break;case`day`:i.setDate(i.getDate()+n);break;case`hour`:i.setHours(i.getHours()+n);break;case`minute`:i.setMinutes(i.getMinutes()+n);break;case`second`:i.setSeconds(i.getSeconds()+n)}return i.getTime()}ceilToBoundary(e,t,n,r){let i=new Date(e);if(r)switch(t){case`second`:{let t=i.getUTCSeconds(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(r),i.getTime())}case`minute`:{let t=i.getUTCMinutes(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(r),i.getTime())}case`hour`:{let t=i.getUTCHours(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(r),i.getTime())}case`day`:return i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0),i.setUTCDate(i.getUTCDate()+1),i.getTime());case`week`:{let t=6048e5,r=Date.UTC(1970,0,5);i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0);let a=i.getTime(),o=Math.ceil((a-r)/t),s=r+Math.ceil(o/n)*n*t;return s>=e?s:s+n*t}case`month`:{let t=i.getUTCMonth(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCDate()===1&&i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:(i.setUTCMilliseconds(0),i.setUTCSeconds(0),i.setUTCMinutes(0),i.setUTCHours(0),i.setUTCDate(1),i.setUTCMonth(r),i.getTime())}case`year`:{let t=i.getUTCFullYear(),r=Math.ceil(t/n)*n;return r===t&&i.getUTCMonth()===0&&i.getUTCDate()===1&&i.getUTCHours()===0&&i.getUTCMinutes()===0&&i.getUTCSeconds()===0&&i.getUTCMilliseconds()===0?e:Date.UTC(r,0,1)}}else switch(t){case`second`:{let t=i.getSeconds(),r=Math.ceil(t/n)*n;return r===t&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(r),i.getTime())}case`minute`:{let t=i.getMinutes(),r=Math.ceil(t/n)*n;return r===t&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(r),i.getTime())}case`hour`:{let t=i.getHours(),r=Math.ceil(t/n)*n;return r===t&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(r),i.getTime())}case`day`:return i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0),i.setDate(i.getDate()+1),i.getTime());case`week`:{let t=6048e5,r=new Date(1970,0,5).getTime();i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0);let a=i.getTime(),o=Math.ceil((a-r)/t),s=r+Math.ceil(o/n)*n*t;return s>=e?s:s+n*t}
36case`month`:{let t=i.getMonth(),r=Math.ceil(t/n)*n;return r===t&&i.getDate()===1&&i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:(i.setMilliseconds(0),i.setSeconds(0),i.setMinutes(0),i.setHours(0),i.setDate(1),i.setMonth(r),i.getTime())}case`year`:{let t=i.getFullYear(),r=Math.ceil(t/n)*n;return r===t&&i.getMonth()===0&&i.getDate()===1&&i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0&&i.getMilliseconds()===0?e:new Date(r,0,1).getTime()}}return e}isAtBoundary(e,t,n){let r=this.getDateFields(e,n);switch(t){case`year`:return r.month===0&&r.date===1&&r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`month`:return r.date===1&&r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`day`:return r.hour===0&&r.minute===0&&r.second===0&&r.ms===0;case`hour`:return r.minute===0&&r.second===0&&r.ms===0;case`minute`:return r.second===0&&r.ms===0;case`second`:return r.ms===0}return!1}},xv=class{constructor(e){this.w=e,this.tooltipKeyFormat=`dd MMM`}xLabelFormat(e,t,n,r){let i=this.w;if(i.config.xaxis.type===`datetime`&&i.config.xaxis.labels.formatter===void 0&&i.config.tooltip.x.formatter===void 0){let e=new bv(this.w);return e.formatDate(e.getDate(t),i.config.tooltip.x.format)}return e(t,n,r)}defaultGeneralFormatter(e){return Array.isArray(e)?e.map(e=>e):e}defaultYFormatter(e,t){let n=this.w;if(Z.isNumber(e)){if(n.globals.yValueDecimal!==0)e=e.toFixed(t.decimalsInFloat===void 0?n.globals.yValueDecimal:t.decimalsInFloat);else{let t=e.toFixed(0);e=Number(t)===e?t:e.toFixed(1)}}return e}setLabelFormatters(){let e=this.w,t=e.formatters;return t.xaxisTooltipFormatter=e=>this.defaultGeneralFormatter(e),t.ttKeyFormatter=e=>this.defaultGeneralFormatter(e),t.ttZFormatter=e=>e,t.legendFormatter=e=>this.defaultGeneralFormatter(e),t.xLabelFormatter=e.config.xaxis.labels.formatter===void 0?t=>{if(Z.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&e.config.xaxis.type===`numeric`){if(Z.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);{let n=e.globals.maxX-e.globals.minX;if(n>0){let e=n/10,r=Math.max(0,-Math.floor(Math.log10(e)));return t.toFixed(r)}return t.toFixed(0)}}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t}:e.config.xaxis.labels.formatter,t.ttKeyFormatter=typeof e.config.tooltip.x.formatter==`function`?e.config.tooltip.x.formatter:t.xLabelFormatter,typeof e.config.xaxis.tooltip.formatter==`function`&&(t.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||e.config.tooltip.y.formatter!==void 0)&&(t.ttVal=e.config.tooltip.y),e.config.tooltip.z.formatter!==void 0&&(t.ttZFormatter=e.config.tooltip.z.formatter),e.config.legend.formatter!==void 0&&(t.legendFormatter=e.config.legend.formatter),t.yLabelFormatters=[],e.config.yaxis.forEach((n,r)=>{if(n.labels.formatter!==void 0)t.yLabelFormatters[r]=n.labels.formatter;else if(e.config.chart.type===`violin`){let n=e=>typeof e==`number`&&isFinite(e)?`${Math.round(e*100)/100}`:e;t.yLabelFormatters[r]=t=>e.globals.xyCharts?Array.isArray(t)?t.map(n):n(t):t}else t.yLabelFormatters[r]=t=>e.globals.xyCharts?Array.isArray(t)?t.map(e=>this.defaultYFormatter(e,n)):this.defaultYFormatter(t,n):t}),e.globals}heatmapLabelFormatters(){let e=this.w;if(e.config.chart.type===`heatmap`){e.globals.yAxisScale[0].result=e.seriesData.seriesNames.slice();let t=e.seriesData.seriesNames.reduce((e,t)=>e.length>t.length?e:t,0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}},Sv=({isTimeline:e,seriesIndex:t,dataPointIndex:n,y1:r,y2:i,w:a})=>{let o=a.rangeData.seriesRangeStart[t][n],s=a.rangeData.seriesRangeEnd[t][n],c=a.labelData.labels[n],l=a.config.series[t].name?a.config.series[t].name:``,u=a.formatters.ttKeyFormatter,d=a.config.tooltip.y.title.formatter,f={w:a,seriesIndex:t,dataPointIndex:n,start:o,end:s};typeof d==`function`&&(l=d(l,f)),a.config.series[t].data[n]?.x&&(c=a.config.series[t].data[n].x),e||a.config.xaxis.type===`datetime`&&(c=new xv(a).xLabelFormat(a.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new bv(a).formatDate,w:a})),typeof u==`function`&&(c=u(c,f)),Number.isFinite(r)&&Number.isFinite(i)&&(o=r,s=i);let p=``,m=``,h=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0){if(a.config.xaxis.type===`datetime`){let e=new bv(a);p=e.formatDate(e.getDate(o),a.config.tooltip.x.format),m=e.formatDate(e.getDate(s),a.config.tooltip.x.format)}else p=o,m=s}else p=a.config.tooltip.x.formatter(o),m=a.config.tooltip.x.formatter(s);return{start:o,end:s,startVal:p,endVal:m,ylabel:c,color:h,seriesName:l}},Cv=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a,seriesIndex:o,dataPointIndex:s}=e,c=e.w.globals.tooltip.tooltipLabels.getFormatters(o);i=c.yLbFormatter(i),a=c.yLbFormatter(a);let l=c.yLbFormatter(e.w.seriesData.series[o][s]),u=``,d=`<span class="value start-value"> 37 ${i} 38 </span> <span class="separator">-</span> <span class="value end-value"> 39 ${a} 40 </span>`;return u=e.w.globals.comboCharts?e.w.config.series[o].type===`rangeArea`||e.w.config.series[o].type===`rangeBar`?d:`<span>${l}</span>`:d,`<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: `+t+`">`+(n||``)+`</span></div><div> <span class="category">`+r+`: </span> `+u+` </div></div>`},wv=class{constructor(e){this.opts=e}hideYAxis(){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}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:`straight`},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(e){return this.hideYAxis(),Z.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}})}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(e,t){let n=t.w.config.series[t.seriesIndex].name;return e===null?``:n+`: `+e},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:`top`,labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}}
40,markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:`straight`}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:`center`}}},dataLabels:{style:{colors:[`#fff`]},background:{enabled:!1}},stroke:{width:0,lineCap:`square`},fill:{opacity:.85},legend:{markers:{shape:`square`}},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}}}}}funnel(){return this.hideYAxis(),q(K({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:`around`,borderRadius:0,dataLabels:{position:`center`}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}pyramid(){return this.funnel()}gauge(){return q(K({},this.radialBar()),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:`60%`},track:{background:`#e7e7e7`,strokeWidth:`100%`,margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:`32px`,fontWeight:600,offsetY:8}}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:e,dataPointIndex:t,w:n})=>this._getBoxTooltip(n,e,t,[`Open`,`High`,``,`Low`,`Close`],`candlestick`)},states:{active:{filter:{type:`none`}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:[`#24292e`]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:e,dataPointIndex:t,w:n})=>this._getBoxTooltip(n,e,t,[`Minimum`,`Q1`,`Median`,`Q3`,`Maximum`],`boxPlot`)},markers:{size:7,strokeWidth:1,strokeColors:`#111`},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:[`#24292e`]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:e,dataPointIndex:t,w:n})=>this._getViolinTooltip(n,e,t)},states:{active:{filter:{type:`none`}}},xaxis:{crosshairs:{width:1}}}}rangeBar(){let e=e=>{let{color:t,seriesName:n,ylabel:r,startVal:i,endVal:a}=Sv(q(K({},e),{isTimeline:!0}));return Cv(q(K({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))},t=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a}=Sv(e);return Cv(q(K({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:`square`},plotOptions:{bar:{borderRadius:0,dataLabels:{position:`center`}}},dataLabels:{enabled:!1,formatter(e,{seriesIndex:t,dataPointIndex:n,w:r}){let i=()=>{let e=r.rangeData.seriesRangeStart[t][n];return r.rangeData.seriesRangeEnd[t][n]-e};return r.globals.comboCharts?r.config.series[t].type===`rangeBar`||r.config.series[t].type===`rangeArea`?i():e:i()},background:{enabled:!1},style:{colors:[`#fff`]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom(n){return n.w.config.plotOptions&&n.w.config.plotOptions.bar&&n.w.config.plotOptions.bar.horizontal?e(n):t(n)}},xaxis:{tickPlacement:`between`,tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(e){return e.plotOptions.bar?.barHeight||(e.plotOptions.bar.barHeight=2),e.plotOptions.bar?.columnWidth||(e.plotOptions.bar.columnWidth=2),e}area(){return{stroke:{width:4,fill:{type:`solid`,gradient:{inverseColors:!1,shade:`light`,type:`vertical`,opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},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}}}rangeArea(){let e=e=>{let{color:t,seriesName:n,ylabel:r,start:i,end:a}=Sv(e);return Cv(q(K({},e),{color:t,seriesName:n,ylabel:r,start:i,end:a}))};return{stroke:{curve:`straight`,width:0},fill:{type:`solid`,opacity:.6},markers:{size:0},states:{hover:{filter:{type:`none`}},active:{filter:{type:`none`}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom(t){return e(t)}}}}brush(e){return Z.extend(e,{chart:{toolbar:{autoSelected:`selection`,show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}stacked100(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;let t=e.dataLabels.formatter;return e.yaxis.forEach((t,n)=>{e.yaxis[n].min=0,e.yaxis[n].max=100}),e.chart.type===`bar`&&(e.dataLabels.formatter=t||function(e){return typeof e==`number`?e&&e.toFixed(0)+`%`:e}),e}stackedBars(){let e=this.bar();return q(K({},e),{plotOptions:q(K({},e.plotOptions),{bar:q(K({},e.plotOptions.bar),{borderRadiusApplication:`end`,borderRadiusWhenStacked:`last`})})})}
vendor: 4,211 bytes, lines 40-42
40convertCatToNumeric(e){return e.xaxis.convertedCatToNumeric=!0,e}convertCatToNumericXaxis(e,t){e.xaxis.type=`numeric`,e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(e){return Z.isNumber(e)?Math.floor(e):e};let n=e.xaxis.labels.formatter,r=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return t&&t.length&&(r=t.map(e=>Array.isArray(e)?e:String(e))),r&&r.length&&(e.xaxis.labels.formatter=function(e){return Z.isNumber(e)?n(r[Math.floor(e)-1]):n(e)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||`dataPoints`,e}bubble(){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}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){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`}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:[`#fff`]}},stroke:{show:!0,width:2,colors:[`#fff`]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter(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`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(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`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return e.toFixed(1)+`%`},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:`dark`,fillSeriesColor:!0},legend:{position:`right`},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){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:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:e=>e,style:{colors:[`#a8a8a8`],fontSize:`11px`}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},stroke:{lineCap:`butt`},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},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(e,t,n,r,i){let a=e.candleData.seriesCandleO[t][n],o=e.candleData.seriesCandleH[t][n],s=e.candleData.seriesCandleM[t][n],c=e.candleData.seriesCandleL[t][n],l=e.candleData.seriesCandleC[t][n],u=e.config.series[t];return u.type&&u.type!==i?`<div class="apexcharts-custom-tooltip"> 41 ${u.name?u.name:`series-`+(t+1)}: <strong>${e.seriesData.series[t][n]}</strong> 42 </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div>${r[0]}: <span class="value">`+a+`</span></div><div>${r[1]}: <span class="value">`+o+`</span></div>`+(s?`<div>${r[2]}: <span class="value">`+s+`</span></div>`:``)+`<div>${r[3]}: <span class="value">`+c+`</span></div><div>${r[4]}: <span class="value">`+l+`</span></div></div>`}
vendor: 7,402 bytes, line 42
42_getViolinTooltip(e,t,n){let r=e.violinData.seriesViolinMin[t]?.[n],i=e.violinData.seriesViolinMax[t]?.[n],a=e.violinData.seriesViolinPoints[t]?.[n]||[],o=e.config.series[t].name||`series-`+(t+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${e.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${o}</div><div>Min: <span class="value">${r}</span></div><div>Max: <span class="value">${i}</span></div><div>Observations: <span class="value">${a.length}</span></div></div>`}},Tv={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`}}},Ev=class{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,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:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:`#fff`,strokeWidth:2,strokeColor:`#333`,shape:`circle`,offsetX:0,offsetY:0,cssClass:``},label:{borderColor:`#c2c2c2`,borderWidth:1,borderRadius:2,text:void 0,textAnchor:`middle`,offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click: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,click: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,click: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}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:``,locales:[Tv],defaultLocale:`en`,dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:`#000`,opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick: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,keyDown:void 0,keyUp:void 0},foreColor:`#373d3f`,fontFamily:`Helvetica, Arial, sans-serif`,height:`auto`,parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,injectStyleSheet:!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,targets:void 0},stacked:!1,stackOnlyBar:!0,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`,categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:`zoom`},type:`line`,width:`100%`,zoom:{enabled:!0,type:`x`,autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:`#90CAF9`,opacity:.4},stroke:{color:`#0D47A1`,opacity:.4,width:1}}},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:`lttb`,targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:`origin`},bar:{horizontal:!1,columnWidth:`70%`,barHeight:`70%`,distributed:!1,borderRadius:0,borderRadiusApplication:`around`,borderRadiusWhenStacked:`last`,rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:`top`,maxItems:100,hideOverflowingLabels:!0,orientation:`horizontal`,total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:`#373d3f`,fontSize:`12px`,fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:`#00B746`,downward:`#EF403C`},wick:{useFillColor:!0}},boxPlot:{colors:{upper:`#00E396`,lower:`#008FFB`},points:{show:!1,shape:`circle`,size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:`series-dark`,strokeColor:`#fff`,strokeWidth:1}},violin:{bandwidthScale:1,normalize:`individual`,points:{show:!0,shape:`circle`,size:2.5,jitter:.5,constrainToViolin:!0,maxPoints:3e3,opacity:.9,fillColor:`series-dark`,strokeColor:`#fff`,strokeWidth:1}}
42,heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:`70%`,height:`70%`,thickness:12,align:`center`,stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:`11px`,fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},funnel:{shape:`rectangle`,lastShape:`flat`},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:`scale`},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:`#000`,borderWidth:1,borderRadius:2,style:{background:`rgba(0, 0, 0, 0.6)`,color:`#fff`,fontSize:`12px`,fontFamily:void 0,fontWeight:400,cssClass:``,padding:{left:6,right:6,top:2,bottom:2}}}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:`arc`,min:0,max:100,bands:[],bandsStyle:{strokeWidth:`40%`,gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:`#666`,placement:`outside`},minor:{count:4,length:5,width:1,color:`#999`,placement:`outside`},labels:{show:!1,offset:6,fontSize:`11px`,fontFamily:void 0,fontWeight:400,color:`#666`,formatter(e){return String(e)}}},needle:{color:`#333`,length:`85%`,baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:800,easing:`ease-out`}},hollow:{margin:5,size:`50%`,background:`transparent`,image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:`front`,stroke:void 0,strokeWidth:1,strokeDasharray:void 0,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(e){return e}},value:{show:!0,fontSize:`14px`,fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(e){return e+`%`}},total:{show:!1,label:`Total`,fontSize:`16px`,fontWeight:600,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((e,t)=>e+t,0)/e.seriesData.series.length+`%`}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:`16px`,formatter(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:`65%`,background:`transparent`,labels:{show:!1,name:{show:!0,fontSize:`16px`,fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(e){return e}},value:{show:!0,fontSize:`20px`,fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(e){return e}},total:{show:!1,showAlways:!1,label:`Total`,fontSize:`16px`,fontWeight:400,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((e,t)=>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(e){return e===null?``: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`,backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:`#fff`,dropShadow:{enabled:!1,top:1,left:1,blur:1,color:`#000`,opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:`#000`,opacity:.8}},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],c
42olorStops:[]},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:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:`top-left`,separator:` / `,rootLabel:`All`,offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260}},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:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:`vertical`,labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},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`,offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:`center`,offsetX:0,offsetY:0,style:{color:void 0,fontSize:`14px`,fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:`lighten`}},active:{allowMultipleDataPointsSelection:!1,filter:{type:`darken`}}},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,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:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,arrow:!0,custom:void 0,fillSeriesColor:!1,theme:`light`,cssClass:``,style:{fontSize:`12px`,fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:`dd MMM`,formatter:void 0},y:{formatter:void 0,title:{formatter(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`,day:`dd MMM`,hour:`HH:mm`,minute:`HH:mm`,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},stepSize:void 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:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:`12px`,fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:``,palette:`palette1`,monochrome:{enabled:!1,color:`#008FFB`,shadeTo:`light`,shadeIntensity:.65},accessibility:{colorBlindMode:``}}}}},Dv=class{constructor(e){this.opts=e}init({responsiveOverride:e}){let t=this.opts,n=new Ev,r=new wv(t);t=this.normalizeAliasedChartType(t),this.chartType=t.chart.type,t=this.extendYAxis(t),t=this.extendAnnotations(t);let i=n.init(),a={};if(t&&typeof t==`object`){let n={},o=[`line`,`area`,`bar`,`candlestick`,`boxPlot`,`violin`,`rangeBar`,`rangeArea`,`bubble`,`scatter`,`heatmap`,`treemap`,`pie`,`polarArea`,`donut`,`radar`,`radialBar`],s=t.chart.requestedType;n=s===`funnel`||s===`pyramid`?r[s]():s===`gauge`?r.gauge():o.indexOf(t.chart.type)===-1?r.line():r[t.chart.type](),t.plotOptions?.bar?.isFunnel&&(n=r.funnel()),t.chart.stacked&&t.chart.type===`bar`&&(n=r.stackedBars()),t.chart.brush?.enabled&&(n=r.brush(n)),t.plotOptions?.line?.isSlopeChart&&(n=r.slope()),t.chart.stacked&&t.chart.stackType===`100%`&&(t=r.stacked100(t)),t.plotOptions?.bar?.isDumbbell&&(t=r.dumbbell(t)),this.checkForDarkTheme(Y.getApex()),this.checkForDarkTheme(t),t.xaxis=t.xaxis||Y.getApex().xaxis||{},e||(t.xaxis.convertedCatToNumeric=!1),t=this.checkForCatToNumericXAxis(this.chartType,n,t),(t.chart.sparkline?.enabled||Y.getApex().chart?.sparkline?.enabled)&&(n=r.sparkline(n)),a=Z.extend(i,n)}let o=Z.extend(a,Y.getApex());return i=Z.extend(o,t),i=this.handleUserInputErrors(i),i}normalizeAliasedChartType(e){if(!e||!e.chart)return e;let t=e.chart.type;return t!==`funnel`&&t!==`pyramid`&&t!==`gauge`?e:(e.chart.requestedType=t,t===`funnel`||t===`pyramid`?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel=!0,e.plotOptions.bar.horizontal=!0,e.chart.type=`bar`,t===`pyramid`?e.plotOptions.bar.isPyramid=!0:e.plotOptions.bar.isPyramid=!1):t===`gauge`&&(e.chart.type=`radialBar`),e)}checkForCatToNumericXAxis(e,t,n){let r=new wv(n),i=(e===`bar`||e===`boxPlot`||e===`violin`)&&n.plotOptions?.bar?.horizontal,a=e===`pie`||e===`polarArea`||e===`donut`||e===`radar`||e===`radialBar`||e===`heatmap`,o=n.xaxis.type!==`datetime`&&n.xaxis.type!==`numeric`,s=(e===`scatter`||e===`bubble`)&&n.plotOptions?.scatter?.jitter?.enabled,c=n.xaxis.tickPlacement?n.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return!i&&!a&&!s&&o&&c!==`between`&&(n=r.convertCatToNumeric(n)),n}extendYAxis(e,t){let n=new Ev;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={});let r=Y.getApex();
42e.yaxis.constructor!==Array&&r.yaxis&&r.yaxis.constructor!==Array&&(e.yaxis=Z.extend(e.yaxis,r.yaxis)),e.yaxis=e.yaxis.constructor===Array?Z.extendArray(e.yaxis,n.yAxis):[Z.extend(n.yAxis,e.yaxis)];let i=!1;e.yaxis.forEach(e=>{e.logarithmic&&(i=!0)});let a=e.series;return t&&!a&&(a=t.config.series),i&&a.length!==e.yaxis.length&&a.length&&(e.yaxis=a.map((t,r)=>{if(t.name||(a[r].name=`series-${r+1}`),e.yaxis[r])return e.yaxis[r].seriesName=a[r].name,e.yaxis[r];{let t=Z.extend(n.yAxis,e.yaxis[0]);return t.show=!1,t}})),i&&a.length>1&&a.length!==e.yaxis.length&&console.warn(`A multi-series logarithmic chart should have equal number of series and y-axes`),e}extendAnnotations(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e),e}extendYAxisAnnotations(e){let t=new Ev;return e.annotations.yaxis=Z.extendArray(e.annotations.yaxis===void 0?[]:e.annotations.yaxis,t.yAxisAnnotation),e}extendXAxisAnnotations(e){let t=new Ev;return e.annotations.xaxis=Z.extendArray(e.annotations.xaxis===void 0?[]:e.annotations.xaxis,t.xAxisAnnotation),e}extendPointAnnotations(e){let t=new Ev;return e.annotations.points=Z.extendArray(e.annotations.points===void 0?[]:e.annotations.points,t.pointAnnotation),e}checkForDarkTheme(e){e.theme&&e.theme.mode===`dark`&&(e.tooltip||={},e.tooltip.theme!==`light`&&(e.tooltip.theme=`dark`),e.chart.foreColor||(e.chart.foreColor=`#f6f7f8`),e.theme.palette||(e.theme.palette=`palette4`))}handleUserInputErrors(e){let t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw Error(`tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.`);if(t.chart.type===`bar`&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw 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(t.chart.type===`bar`||t.chart.type===`rangeBar`)&&t.tooltip.shared&&t.xaxis.crosshairs.width===`barWidth`&&t.series.length>1&&(t.xaxis.crosshairs.width=`tickWidth`),(t.chart.type===`candlestick`||t.chart.type===`boxPlot`)&&t.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${t.chart.type} chart is not supported.`),t.yaxis[0].reversed=!1),t}},Ov=1.618,kv=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],Av=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],jv=class{initGlobalVars(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.dataWasParsed=!1,e.originalSeries=null,e.maxValsInArrayIndex=0,e.yValueDecimal=0,e.allSeriesHasEqualX=!0,e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.isXNumeric=!1,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.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0,e.disableZoomIn=!1,e.disableZoomOut=!1,e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.rotateXLabels=!1,e.overlappingXLabels=!1,e.radialSize=0,e.barHeight=0,e.barWidth=0,e.animationEnded=!1,e.isDestroyed=!1,e.bulkRevealScheduled=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.lastDrawnDataLabelsIndexes=[],e.textRectsCache=new Map,e.domCache=new Map,e.dimensionCache={},e.cachedSelectors={},e.seriesNS||this._attachNamespaces(e)}_attachNamespaces(e){let t=(t,n,r=n)=>{Object.defineProperty(t,r,{get(){return e[n]},set(t){e[n]=t},enumerable:!0,configurable:!0})},n={};t(n,`series`,`data`);for(let e of`seriesNames.seriesX.seriesZ.seriesXvalues.seriesYvalues.seriesGoals.seriesLog.seriesColors.seriesPercent.seriesTotals.stackedSeriesTotals.seriesCandleO.seriesCandleH.seriesCandleM.seriesCandleL.seriesCandleC.seriesRangeStart.seriesRangeEnd.seriesRange.seriesYAxisMap.seriesYAxisReverseMap.seriesGroups.barGroups.lineGroups.areaGroups.originalSeries.collapsedSeries.collapsedSeriesIndices.ancillaryCollapsedSeries.ancillaryCollapsedSeriesIndices.allSeriesCollapsed.risingSeries.previousPaths.ignoreYAxisIndexes.labels.categoryLabels.timescaleLabels.groups`.split(`.`))t(n,e);Object.defineProperty(e,"seriesNS",{value:n,writable:!1,enumerable:!1,
42configurable:!0});let r={};for(let e of`minX.maxX.initialMinX.initialMaxX.minY.maxY.minYArr.maxYArr.minZ.maxZ.minDate.maxDate.minXDiff.xRange.yRange.zRange.xAxisScale.yAxisScale.xAxisTicksPositions.xTickAmount.multiAxisTickAmount.dataPoints.maxValsInArrayIndex.isXNumeric.isMultipleYAxis.isMultiLineX.isDataXYZ.dataFormatXNumeric.allSeriesHasEqualX.hasNullValues.dataWasParsed.hasXaxisGroups.hasSeriesGroups.skipFirstTimelinelabel.skipLastTimelinelabel.yValueDecimal.invalidLogScale.noLabelsProvided`.split(`.`))t(r,e);Object.defineProperty(e,"axes",{value:r,writable:!1,enumerable:!1,configurable:!0});let i={};for(let e of[`svgWidth`,`svgHeight`,`gridWidth`,`gridHeight`,`translateX`,`translateY`,`translateXAxisX`,`translateXAxisY`,`translateYAxisX`,`xAxisLabelsHeight`,`xAxisGroupLabelsHeight`,`xAxisLabelsWidth`,`yAxisLabelsWidth`,`yAxisWidths`,`yLabelsCoords`,`yTitleCoords`,`padHorizontal`,`barPadForNumericAxis`,`rotateXLabels`,`scaleX`,`scaleY`,`radialSize`,`defaultLabels`,`overlappingXLabels`])t(i,e);Object.defineProperty(e,"layout",{value:i,writable:!1,enumerable:!1,configurable:!0});let a={};for(let e of[`domCache`,`dimensionCache`,`cachedSelectors`,`textRectsCache`,`pointsArray`,`dataLabelsRects`,`lastDrawnDataLabelsIndexes`,`delayedElements`,`resizeTimer`,`selectionResizeTimer`,`resizeObserver`])t(a,e);Object.defineProperty(e,"cache",{value:a,writable:!1,enumerable:!1,configurable:!0})}globalVars(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},LINE_HEIGHT_RATIO:Ov,axisCharts:!0,isSlopeChart:e.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,invalidLogScale:!1,hasNullValues:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],svgWidth:0,svgHeight:0,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:kv,niceScaleDefaultTicks:Av,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}init(e){let t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=Z.extend({},e),t.initialSeries=Z.clone(e.series),t.lastXAxis=Z.clone(t.initialConfig.xaxis),t.lastYAxis=Z.clone(t.initialConfig.yaxis),t}},Mv=class{constructor(e){this.opts=e}init(){let e=new Dv(this.opts).init({responsiveOverride:!1}),t=new jv().init(e),n={config:e,globals:t,dom:{},interact:{zoomEnabled:e.chart.toolbar.autoSelected===`zoom`&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected===`pan`&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected===`selection`&&e.chart.toolbar.tools.selection,zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},lastWheelExecution:0,capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:Y.isBrowser()?`ontouchstart`in window||navigator.maxTouchPoints>0:!1},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinMin:[],seriesViolinMax:[]},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvi
42ded:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[]}};Object.defineProperty(t,"dom",{get(){return n.dom},set(e){n.dom=e},enumerable:!1,configurable:!0});for(let e of[`xLabelFormatter`,`yLabelFormatters`,`xaxisTooltipFormatter`,`ttKeyFormatter`,`ttVal`,`ttZFormatter`,`legendFormatter`])Object.defineProperty(t,e,{get(){return n.formatters[e]},set(t){n.formatters[e]=t},enumerable:!1,configurable:!0});for(let e of[`zoomEnabled`,`panEnabled`,`selectionEnabled`,`zoomed`,`selection`,`visibleXRange`,`selectedDataPoints`,`mousedown`,`clientX`,`clientY`,`lastClientPosition`,`lastWheelExecution`,`capturedSeriesIndex`,`capturedDataPointIndex`,`disableZoomIn`,`disableZoomOut`,`isTouchDevice`])Object.defineProperty(t,e,{get(){return n.interact[e]},set(t){n.interact[e]=t},enumerable:!1,configurable:!0});for(let e of[`gridHeight`,`gridWidth`,`translateX`,`translateY`,`translateXAxisX`,`translateXAxisY`,`rotateXLabels`,`xAxisHeight`,`xAxisLabelsHeight`,`xAxisGroupLabelsHeight`,`xAxisLabelsWidth`,`yLabelsCoords`,`yTitleCoords`])Object.defineProperty(t,e,{get(){return n.layout[e]},set(t){n.layout[e]=t},enumerable:!1,configurable:!0});for(let e of[`series`,`seriesNames`,`seriesX`,`seriesZ`,`seriesColors`,`seriesGoals`,`stackedSeriesTotals`,`stackedSeriesTotalsByGroups`])Object.defineProperty(t,e,{get(){return n.seriesData[e]},set(t){n.seriesData[e]=t},enumerable:!1,configurable:!0});for(let e of[`isXNumeric`,`dataFormatXNumeric`,`isDataXYZ`,`isRangeData`,`isRangeBar`,`isMultiLineX`,`noLabelsProvided`,`dataWasParsed`])Object.defineProperty(t,e,{get(){return n.axisFlags[e]},set(t){n.axisFlags[e]=t},enumerable:!1,configurable:!0});for(let e of[`labels`,`categoryLabels`,`timescaleLabels`,`hasXaxisGroups`,`groups`,`seriesGroups`])Object.defineProperty(t,e,{get(){return n.labelData[e]},set(t){n.labelData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesRangeStart`,`seriesRangeEnd`,`seriesRange`])Object.defineProperty(t,e,{get(){return n.rangeData[e]},set(t){n.rangeData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesCandleO`,`seriesCandleH`,`seriesCandleM`,`seriesCandleL`,`seriesCandleC`])Object.defineProperty(t,e,{get(){return n.candleData[e]},set(t){n.candleData[e]=t},enumerable:!1,configurable:!0});for(let e of[`seriesViolinDensity`,`seriesViolinPoints`,`seriesViolinMin`,`seriesViolinMax`])Object.defineProperty(t,e,{get(){return n.violinData[e]},set(t){n.violinData[e]=t},enumerable:!1,configurable:!0});return n}},Nv=class{constructor(e){this.w=e}static checkComboSeries(e,t){let n=!1,r=0,i=0;return t===void 0&&(t=`line`),e.length&&e[0].type!==void 0&&e.forEach(e=>{(e.type===`bar`||e.type===`column`||e.type===`candlestick`||e.type===`boxPlot`||e.type===`violin`)&&r++,e.type!==void 0&&e.type!==t&&i++}),i>0&&(n=!0),{comboBarCount:r,comboCharts:n}}getStackedSeriesTotals(e=[]){let t=this.w,n=[];if(t.seriesData.series.length===0)return n;for(let r=0;r<t.seriesData.series[t.globals.maxValsInArrayIndex].length;r++){let i=0;for(let n=0;n<t.seriesData.series.length;n++)t.seriesData.series[n][r]!==void 0&&e.indexOf(n)===-1&&(i+=t.seriesData.series[n][r]);n.push(i)}return n}getSeriesTotalByIndex(e=null){if(e===null)return this.w.config.series.reduce((e,t)=>e+t,0);{let t=this.w.seriesData.series[e];return Array.isArray(t)?t.reduce((e,t)=>e+t,0):t??0}}getStackedSeriesTotalsByGroups(){let e=this.w,t=[];return e.labelData.seriesGroups.forEach(n=>{let r=[];e.config.series.forEach((t,i)=>{n.indexOf(e.seriesData.seriesNames[i])>-1&&r.push(i)});let i=e.seriesData.series.map((e,t)=>r.indexOf(t)===-1?t:-1).filter(e=>e!==-1);t.push(this.getStackedSeriesTotals(i))}),t}setSeriesYAxisMappings(){let e=this.w.globals,t=this.w.config,n=[],r=[],i=[],a=this.w.seriesData.series.length>t.yaxis.length||t.yaxis.some(e=>Array.isArray(e.seriesName));
42t.series.forEach((e,t)=>{i.push(t),r.push(null)}),t.yaxis.forEach((e,t)=>{n[t]=[]});let o=[];t.yaxis.forEach((e,r)=>{let s=!1;if(e.seriesName){let o=[];Array.isArray(e.seriesName)?o=e.seriesName:o.push(e.seriesName),o.forEach(e=>{t.series.forEach((t,o)=>{if(t.name===e){let e=o;r===o||a?!a||i.indexOf(o)>-1?n[r].push([r,o]):console.warn(`Series '`+t.name+`' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes.`):(n[o].push([o,r]),e=r),s=!0,e=i.indexOf(e),e!==-1&&i.splice(e,1)}})})}s||o.push(r)}),n=n.map(e=>{let t=[];return e.forEach(e=>{r[e[1]]=e[0],t.push(e[1])}),t});let s=t.yaxis.length-1;for(let e=0;e<o.length&&(s=o[e],n[s]=[],i);e++){let e=i[0];i.shift(),n[s].push(e),r[e]=s}i.forEach(e=>{n[s].push(e),r[e]=s}),e.seriesYAxisMap=n.map(e=>e),e.seriesYAxisReverseMap=r.map(e=>e),e.seriesYAxisMap.forEach((e,n)=>{e.forEach(e=>{if(t.series[e]&&t.series[e].group===void 0){let r=t.series[e];r.group=`apexcharts-axis-${n.toString()}`}})})}isSeriesNull(e=null){let t=[],n=this.w.config.series;return t=e===null?n.filter(e=>e!==null):n[e]&&Array.isArray(n[e].data)?n[e].data.filter(e=>e!==null):n[e]!==null&&n[e]!==void 0?[n[e]]:[],t.length===0}seriesHaveSameValues(e){let t=this.w.seriesData.series[e];return!Array.isArray(t)||t.every((e,t,n)=>e===n[0])}getCategoryLabels(e){let t=this.w,n=e.slice();return t.config.xaxis.convertedCatToNumeric&&(n=e.map(e=>t.config.xaxis.labels.formatter(e-t.globals.minX+1))),n}getLargestSeries(){let e=this.w;e.globals.maxValsInArrayIndex=e.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,e.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){let e=this.w,t=0;return e.globals.markers.size.forEach(e=>{t=Math.max(t,e)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(e=>{t=Math.max(t,e.size)}),t>0&&(e.config.markers.hover.size>0?t=e.config.markers.hover.size:t+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=t,t}getSeriesTotals(){let e=this.w;e.globals.seriesTotals=e.seriesData.series.map(e=>{let t=0;if(Array.isArray(e))for(let n=0;n<e.length;n++)t+=e[n];else t+=e;return t})}getSeriesTotalsXRange(e,t){let n=this.w;return n.seriesData.series.map((r,i)=>{let a=0;for(let o=0;o<r.length;o++)n.seriesData.seriesX[i][o]>e&&n.seriesData.seriesX[i][o]<t&&(a+=r[o]);return a})}getPercentSeries(){let e=this.w;e.globals.seriesPercent=e.seriesData.series.map(t=>{let n=[];if(Array.isArray(t))for(let r=0;r<t.length;r++){let i=e.seriesData.stackedSeriesTotals[r],a=0;i&&(a=100*t[r]/i),n.push(a)}else{let r=e.globals.seriesTotals.reduce((e,t)=>e+t,0),i=100*t/r;n.push(i)}return n})}getCalculatedRatios(){let e=this.w,t=e.globals,n=[],r=0,i=0,a=0,o=0,s=[],c=.1,l=0;if(t.yRange=[],t.isMultipleYAxis)for(let e=0;e<t.minYArr.length;e++)t.yRange.push(Math.abs(t.minYArr[e]-t.maxYArr[e])),s.push(0);else t.yRange.push(Math.abs(t.minY-t.maxY));t.xRange=Math.abs(t.maxX-t.minX),t.zRange=Math.abs(t.maxZ-t.minZ);for(let e=0;e<t.yRange.length;e++)n.push(t.yRange[e]/this.w.layout.gridHeight);if(i=t.xRange/this.w.layout.gridWidth,r=t.yRange/this.w.layout.gridWidth,a=t.xRange/this.w.layout.gridHeight,o=t.zRange/this.w.layout.gridHeight*16,o||=1,t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0){let e=t;e.hasNegs=!0}if(e.globals.seriesYAxisReverseMap.length>0){let a=(t,r)=>{let i=e.config.yaxis[e.globals.seriesYAxisReverseMap[r]],a=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=this.getBaseLog(i.logBase,t)),-a*t/n[r]};if(t.isMultipleYAxis){s=[];for(let e=0;e<n.length;e++)s.push(a(t.minYArr[e],e))}else s=[],s.push(a(t.minY,0)),t.minY!==Number.MIN_VALUE&&Math.abs(t.minY)!==0&&(c=-t.minY/r,l=t.minX/i)}else s=[],s.push(0),c=0,l=0;return{yRatio:n,invertedYRatio:r,zRatio:o,xRatio:i,invertedXRatio:a,baseLineInvertedY:c,baseLineY:s,baseLineX:l}}getLogSeries(e){let t=this.w;return t.globals.seriesLog=e.map((e,n)=>{let r=t.globals.seriesYAxisReverseMap[n];return t.config.yaxis[r]&&t.config.yaxis[r].logarithmic?e.map(e=>e===null?null:this.getLogVal(t.config.yaxis[r].logBase,e,n)):e}),t.globals.invalidLogScale?e:t.globals.seriesLog}getLogValAtSeriesIndex(e,t){if(e===null)return null;let n=this.w,r=n.globals.seriesYAxisReverseMap[t];
42return n.config.yaxis[r]&&n.config.yaxis[r].logarithmic?this.getLogVal(n.config.yaxis[r].logBase,e,t):e}getBaseLog(e,t){return Math.log(t)/Math.log(e)}getLogVal(e,t,n){if(t<=0)return 0;let r=this.w,i=r.globals.minYArr[n]===0?-1:this.getBaseLog(e,r.globals.minYArr[n]),a=(r.globals.maxYArr[n]===0?0:this.getBaseLog(e,r.globals.maxYArr[n]))-i;return t<1?t/a:(this.getBaseLog(e,t)-i)/a}getLogYRatios(e){let t=this.w,n=this.w.globals,r=n;return r.yLogRatio=e.slice(),r.logYRange=n.yRange.map((e,i)=>{let a=t.globals.seriesYAxisReverseMap[i];if(t.config.yaxis[a]&&this.w.config.yaxis[a].logarithmic){let e=-Number.MAX_VALUE,a=Number.MIN_VALUE,o=1;return n.seriesLog.forEach((n,r)=>{n.forEach(n=>{t.config.yaxis[r]&&t.config.yaxis[r].logarithmic&&(e=Math.max(n,e),a=Math.min(n,a))})}),o=n.yRange[i]**+(Math.abs(a-e)/n.yRange[i]),r.yLogRatio[i]=o/this.w.layout.gridHeight,o}}),r.invalidLogScale?e.slice():r.yLogRatio}static extendArrayProps(e,t,n){return t?.yaxis&&(t=e.extendYAxis(t,n)),t?.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),t?.annotations?.xaxis&&(t=e.extendXAxisAnnotations(t)),t?.annotations?.points&&(t=e.extendPointAnnotations(t))),t}drawSeriesByGroup(e,t,n,r){let i=this.w,a=[];return e.series.length>0&&t.forEach(t=>{let o=[],s=[];e.i.forEach((n,r)=>{i.config.series[n].group===t&&(o.push(e.series[r]),s.push(n))}),o.length>0&&a.push(r.draw(o,n,s))}),a}},Pv=`http://www.w3.org/2000/svg`;function Fv(e){return 1-(1-e)**3}function Iv(e){return 1+2.70158*(e-1)**3+1.70158*(e-1)**2}var Lv=null;function Rv(){if(!Y.isBrowser())return!1;try{return Lv||=window.matchMedia(`(prefers-reduced-motion: reduce)`),!!Lv.matches}catch{return!1}}function zv(e,t,n){if(!Y.isBrowser()||n.globals.dataChanged||n.globals.resized)return!1;let r=n.config.chart.animations;if(!r||r.enabled===!1)return!1;let i=n.config.chart.type;if(i!==`line`&&i!==`area`&&i!==`rangeArea`||!(n.layout.gridWidth>0))return!1;let a=(r.speed||800)*2,o=Math.max(0,Math.min(1,t/n.layout.gridWidth)),s=(1-Math.cbrt(1-o))*a,c=e.node.style;c.opacity=`0`;let l=null,u=e=>{l===null&&(l=e),e-l>=s?c.opacity=``:X.requestAnimationFrame(u)};return X.requestAnimationFrame(u),!0}function Bv(e){let t=e.config.chart.animations;t&&t.respectReducedMotion!==!1&&Rv()&&(t.enabled=!1,t.dynamicAnimation&&(t.dynamicAnimation.enabled=!1))}function Vv(e){let t=e.style,n=e.index||0,r=typeof e.baseDelay==`number`?e.baseDelay:40,i=e.row||0,a=e.col||0,o=e.groupIndex||0,s=e.perGroup||1,c=e.centerDistance||0;switch(t){case`none`:return 0;case`diagonal`:return(i+a)*r;case`group`:return o*r+n%s*(r/4);case`centroid`:return c*r*(n+1);default:return n*r}}var Hv=class{constructor(e,t){this.w=e,this.ctx=t}animateLine(e,t,n,r){e.attr(t).animate(r).attr(n)}animateMarker(e,t,n,r){e.attr({opacity:0}).animate(t).attr({opacity:1}).after(()=>{r()})}animatePop(e,{speed:t,delay:n=0,onComplete:r}){let i=this.w;if(!Y.isBrowser()||!i.globals.shouldAnimate||t<1){r&&r();return}let a=e.node.style;a.transformBox=`fill-box`,a.transformOrigin=`center`,a.transform=`scale(0)`,a.opacity=`0`;let o=performance.now()+n,s=e=>{let n=Math.max(0,Math.min(1,(e-o)/t));a.transform=`scale(${Iv(n)})`,a.opacity=String(Math.min(1,n*2)),n<1?X.requestAnimationFrame(s):(a.transform=``,a.transformOrigin=``,a.transformBox=``,a.opacity=``,r&&r())};X.requestAnimationFrame(s)}animateRect(e,t,n,r,i,a=0){e.attr(t).animate(r,a).attr(n).after(()=>i())}animatePathsGradually(e){let{el:t,realIndex:n,j:r,fill:i,pathFrom:a,pathTo:o,speed:s,delay:c}=e,l=this,u=this.w,d=0;u.config.chart.animations.animateGradually.enabled&&(d=u.config.chart.animations.animateGradually.delay),u.config.chart.animations.dynamicAnimation.enabled&&u.globals.dataChanged&&u.config.chart.type!==`bar`&&(d=0),l.morphSVG(t,n,r,u.config.chart.type===`line`&&!u.globals.comboCharts?`stroke`:i,a,o,s,c*d)}revealBulk(e){let t=this.w;if(e.node.classList.add(`apexcharts-element-hidden`),t.globals.delayedElements.push({el:e.node}),!Y.isBrowser()||!t.globals.shouldAnimate){this.animationCompleted(e);return}t.globals.bulkRevealScheduled||(t.globals.bulkRevealScheduled=!0,X.requestAnimationFrame(()=>{t.globals.isDestroyed||(t.globals.bulkRevealScheduled=!1,this.animationCompleted(e))}))}
42showDelayedElements(){this.w.globals.delayedElements.forEach(e=>{let t=e.el;t.classList.remove(`apexcharts-element-hidden`),t.classList.add(`apexcharts-hidden-element-shown`)})}animationCompleted(e){let t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),typeof t.config.chart.events.animationEnd==`function`&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}animateDraw(e,{realIndex:t,j:n,isFill:r,isLast:i,speed:a,delay:o,mask:s}){let c=this.w,l=this,u=()=>{i&&c.globals.shouldAnimate&&l.animationCompleted(e),l.showDelayedElements()};if(!Y.isBrowser()||!c.globals.shouldAnimate||a<1){u();return}let d=e.node,f=()=>{let e=s&&s.type===`radial`,i=c.layout.gridWidth+8,l=s&&s.cx||0,f=s&&s.cy||0,p=(s&&s.r||c.layout.gridWidth/2)+4,m=`apexDrawMask${c.globals.cuid}-${t}-${n??0}-${r?`f`:`s`}`,h=X.createElementNS(Pv,`mask`);h.setAttribute(`id`,m),h.setAttribute(`maskUnits`,`userSpaceOnUse`);let g;if(e){let e=p;h.setAttribute(`x`,String(l-e)),h.setAttribute(`y`,String(f-e)),h.setAttribute(`width`,String(e*2)),h.setAttribute(`height`,String(e*2)),g=X.createElementNS(Pv,`circle`),g.setAttribute(`cx`,String(l)),g.setAttribute(`cy`,String(f)),g.setAttribute(`r`,`0`),g.setAttribute(`fill`,`#fff`)}else h.setAttribute(`x`,`-4`),h.setAttribute(`y`,`-4`),h.setAttribute(`width`,String(i)),h.setAttribute(`height`,String(c.layout.gridHeight+8)),g=X.createElementNS(Pv,`rect`),g.setAttribute(`x`,`-4`),g.setAttribute(`y`,`-4`),g.setAttribute(`width`,`0`),g.setAttribute(`height`,String(c.layout.gridHeight+8)),g.setAttribute(`fill`,`#fff`);h.appendChild(g),c.dom.elDefs.node.appendChild(h),d.setAttribute(`mask`,`url(#${m})`);let _=performance.now()+(o||0),v=t=>{if(c.globals.isDestroyed)return;let n=Math.max(0,Math.min(1,(t-_)/a)),r=Fv(n);e?g.setAttribute(`r`,String(r*p)):g.setAttribute(`width`,String(r*i)),n<1?X.requestAnimationFrame(v):(d.removeAttribute(`mask`),h.parentNode&&h.parentNode.removeChild(h),u())};X.requestAnimationFrame(v)},p=e=>{d.setAttribute(`stroke-dasharray`,String(e)),d.setAttribute(`stroke-dashoffset`,String(e));let t=performance.now()+(o||0),n=r=>{if(c.globals.isDestroyed)return;let i=Math.max(0,Math.min(1,(r-t)/a));d.setAttribute(`stroke-dashoffset`,String(e*(1-Fv(i)))),i<1?X.requestAnimationFrame(n):(d.removeAttribute(`stroke-dasharray`),d.removeAttribute(`stroke-dashoffset`),u())};X.requestAnimationFrame(n)};X.requestAnimationFrame(()=>{if(c.globals.isDestroyed)return;if(r){f();return}let e=d.getAttribute(`stroke-dasharray`);if(e&&e!==`0`&&e!==``){f();return}let t=0;try{typeof d.getTotalLength==`function`&&(t=d.getTotalLength())}catch{t=0}if(!t){u();return}p(t)})}morphSVG(e,t,n,r,i,a,o,s){let c=this.w;i||=e.attr(`pathFrom`),a||=e.attr(`pathTo`);let l=()=>(c.config.chart.type===`radar`&&(o=1),`M 0 ${c.layout.gridHeight}`);(!i||i.indexOf(`undefined`)>-1||i.indexOf(`NaN`)>-1)&&(i=l()),(!a.trim()||a.indexOf(`undefined`)>-1||a.indexOf(`NaN`)>-1)&&(a=l()),c.globals.shouldAnimate||(o=1);let u=(this.ctx?.morphTypeChange)?.isActive()===!0?`polygons`:`commands`;e.plot(i).animate(1,s).plot(i).animate(o,s).plot(a,u).after(()=>{Z.isNumber(n)?n===c.seriesData.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&this.animationCompleted(e):r!==`none`&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.seriesData.series.length-1||c.globals.comboCharts)&&this.animationCompleted(e),this.showDelayedElements()})}},Uv=class{constructor(e){this.w=e}getDefaultFilter(e,t){let n=this.w;e.unfilter&&e.unfilter(!0),n.config.chart.dropShadow.enabled&&this.dropShadow(e,n.config.chart.dropShadow,t)}applyFilter(e,t,n){var r;let i=this.w;if(e.unfilter&&e.unfilter(!0),n===`none`){this.getDefaultFilter(e,t);return}let a=i.config.chart.dropShadow,o=n===`lighten`?2:.3;e.filterWith&&(e.filterWith(e=>{e.colorMatrix({type:`matrix`,values:` 43 ${o} 0 0 0 0 44 0 ${o} 0 0 0 45 0 0 ${o} 0 0 46 0 0 0 1 0 47 `,in:`SourceGraphic`,result:`brightness`}),a.enabled&&this.addShadow(e,t,a,`brightness`)}),a.noUserSpaceOnUse||(r=e.filterer()?.node)==null||r.setAttribute(`filterUnits`,`userSpaceOnUse`),this._scaleFilterSize(e.filterer()?.node))}addShadow(e,t,n,r){let i=this.w,{blur:a,top:o,left:s,color:c,opacity:l}=n;if(c=Array.isArray(c)?c[t]:c,i.config.chart.dropShadow.enabledOnSeries?.length>0&&i.config.chart.dropShadow.enabledOnSeries.indexOf(t)===-1)return e;e.offset({in:r,dx:s,dy:o,result:`offset`}),e.gaussianBlur({in:`offset`,stdDeviation:a,result:`blur`}),e.flood({"flood-color":c,"flood-opacity":l,result:`flood`}
47),e.composite({in:`flood`,in2:`blur`,operator:`in`,result:`shadow`}),e.merge([`shadow`,r])}dropShadow(e,t,n=0){var r;let i=this.w;return e.unfilter&&e.unfilter(!0),Z.isMsEdge()&&i.config.chart.type===`radialBar`||i.config.chart.dropShadow.enabledOnSeries?.length>0&&i.config.chart.dropShadow.enabledOnSeries?.indexOf(n)===-1||e.filterWith&&(e.filterWith(e=>{this.addShadow(e,n,t,`SourceGraphic`)}),t.noUserSpaceOnUse||(r=e.filterer()?.node)==null||r.setAttribute(`filterUnits`,`userSpaceOnUse`),this._scaleFilterSize(e.filterer()?.node)),e}setSelectionFilter(e,t,n){let r=this.w;if(r.interact.selectedDataPoints[t]!==void 0&&r.interact.selectedDataPoints[t].indexOf(n)>-1){e.node.setAttribute(`selected`,!0);let n=r.config.states.active.filter;n!==`none`&&this.applyFilter(e,t,n.type)}}_scaleFilterSize(e){e&&(t=>{for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.setAttribute(n,t[n])})({width:`200%`,height:`200%`,x:`-50%`,y:`-50%`})}},Q=class e{constructor(e,t=null){this.w=e,this.ctx=t}roundPathCorners(e,t){e.indexOf(`NaN`)>-1&&(e=``);function n(e,t,n){var i=t.x-e.x,a=t.y-e.y,o=Math.sqrt(i*i+a*a);return r(e,t,Math.min(1,n/o))}function r(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function i(e,t){e.length>2&&(e[e.length-2]=t.x,e[e.length-1]=t.y)}function a(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}var o=e.split(/[,\s]/).reduce(function(e,t){var n=t.match(/^([a-zA-Z])(.+)/);return n?(e.push(n[1]),e.push(n[2])):e.push(t),e},[]).reduce(function(e,t){return parseFloat(t)==t&&e.length?e[e.length-1].push(t):e.push([t]),e},[]),s=[];if(o.length>1){var c=a(o[0]),l=null;o[o.length-1][0]==`Z`&&o[0].length>2&&(l=[`L`,c.x,c.y],o[o.length-1]=l),s.push(o[0]);for(var u=1;u<o.length;u++){var d=s[s.length-1],f=o[u],p=f==l?o[1]:o[u+1];if(p&&d&&d.length>2&&f[0]==`L`&&p.length>2&&p[0]==`L`){var m=a(d),h=a(f),g=a(p),_=n(h,m,t),v=n(h,g,t);i(f,_),f.origPoint=h,s.push(f);var y=r(_,h,.5),b=r(h,v,.5),x=[`C`,y.x,y.y,b.x,b.y,v.x,v.y];x.origPoint=h,s.push(x)}else s.push(f)}if(l){var S=a(s[s.length-1]);s.push([`Z`]),i(s[0],S)}}else s=o;return s.reduce(function(e,t){return e+t.join(` `)+` `},``)}drawLine(e,t,n,r,i=`#a8a8a8`,a=0,o=null,s=`butt`){return this.w.dom.Paper.line().attr({x1:e,y1:t,x2:n,y2:r,stroke:i,"stroke-dasharray":a,"stroke-width":o,"stroke-linecap":s})}drawRect(e=0,t=0,n=0,r=0,i=0,a=`#fefefe`,o=1,s=null,c=null,l=0){let u=this.w.dom.Paper.rect();return u.attr({x:e,y:t,width:n>0?n:0,height:r>0?r:0,rx:i,ry:i,opacity:o,"stroke-width":s===null?0:s,stroke:c===null?`none`:c,"stroke-dasharray":l}),u.node.setAttribute(`fill`,a),u}drawPolygon(e,t=`#e1e1e1`,n=1,r=`none`){return this.w.dom.Paper.polygon(e).attr({fill:r,stroke:t,"stroke-width":n})}drawCircle(e,t=null){let n=this.w;e<0&&(e=0);let r=n.dom.Paper.circle(e*2);return t!==null&&r.attr(t),r}drawPath({d:e=``,stroke:t=`#a8a8a8`,strokeWidth:n=1,fill:r,fillOpacity:i=1,strokeOpacity:a=1,classes:o,strokeLinecap:s=null,strokeDashArray:c=0}){let l=this.w;return s===null&&(s=l.config.stroke.lineCap),(e.indexOf(`undefined`)>-1||e.indexOf(`NaN`)>-1)&&(e=`M 0 ${l.layout.gridHeight}`),l.dom.Paper.path(e).attr({fill:r,"fill-opacity":i,stroke:t,"stroke-opacity":a,"stroke-linecap":s,"stroke-width":n,"stroke-dasharray":c,class:o})}group(e=null){let t=this.w.dom.Paper.group();return e!==null&&t.attr(e),t}move(e,t){return[`M`,e,t].join(` `)}line(e,t,n=null){return n===`H`?[` H`,e].join(` `):n===`V`?[` V`,t].join(` `):[` L`,e,t].join(` `)}curve(e,t,n,r,i,a){return[`C`,e,t,n,r,i,a].join(` `)}quadraticCurve(e,t,n,r){return[`Q`,e,t,n,r].join(` `)}arc(e,t,n,r,i,a,o,s=!1){let c=`A`;return s&&(c=`a`),[c,e,t,n,r,i,a,o].join(` `)}renderPaths({j:e,realIndex:t,pathFrom:n,pathTo:r,stroke:i,strokeWidth:a,strokeLinecap:o,fill:s,animationDelay:c,initialSpeed:l,dataChangeSpeed:u,className:d,chartType:f,shouldClipToGrid:p=!0,bindEventsOnPaths:m=!0,drawShadow:h=!0,drawMask:g=null}){let _=this.w,v=new Uv(this.w),y=new Hv(this.w,this.ctx??void 0),b=this.w.config.chart.animations.enabled,x=b&&this.w.config.chart.animations.dynamicAnimation.enabled;if(n&&n.startsWith(`M 0 0 `)&&r){let e=r.match(/^M\s+[\d.-]+\s+[\d.-]+/);e&&(n=n.replace(/^M\s+0\s+0/,e[0]))}let S,C=!!(b&&!_.globals.resized||x&&_.globals.dataChanged&&_.globals.shouldAnimate),w=typeof d==`string`&&(d.indexOf(`apexcharts-line`)>-1||d.indexOf(`apexcharts-area`)>-1||d.indexOf(`apexcharts-rangeArea`)>-1||d.indexOf(`apexcharts-radar`)>-1),T=!(!b||_.globals.resized||_.globals.dataChanged||!w),E=_.config.chart.animations.largeDatasetThreshold??0,D=!!(C&&!T&&E>0&&_.globals.dataPoints>E),O=!(f!==`candlestick`&&f!==`boxPlot`||!C||T||!_.globals.dataChanged),k=D||O;C&&!T&&!k?S=n:(S=r,C||(_.globals.animationEnded=!0));let A=_.config.stroke.dashArray,j=0;j=Array.isArray(A)?A[t]:_.config.stroke.dashArray;let M=this.drawPath({d:S,stroke:i,strokeWidth:a,fill:s,fillOpacity:1,classes:d,strokeLinecap:o,strokeDashArray:j});M.attr(`index`,t),p&&(f===`bar`&&!_.globals.isBarHorizontal||_.globals.comboCharts?M.attr({"clip-path":`url(#gridRectBarMask${_.globals.cuid})`}):M.attr({"clip-path":`url(#gridRectMask${_.globals.cuid})`})),_.config.chart.dropShadow.enabled&&h&&v.dropShadow(M,_.config.chart.dropShadow,t),m&&(M.node.addEventListener(`mouseenter`,this.pathMouseEnter.bind(this,M)),M.node.addEventListener(`mouseleave`,this.pathMouseLeave.bind(this,M)),M.node.addEventListener(`mousedown`,this.pathMouseDown.bind(this,M))),M.attr({pathTo:r,pathFrom:n});let N={el:M,j:e,realIndex:t,pathFrom:n,pathTo:r,fill:s,strokeWidth:a,delay:c};if(b&&!_.globals.resized&&!_.globals.dataChanged){if(T){let n=l*2,r=i===`none`||a===0,o=_.seriesData.series.length,s=_.globals.comboCharts?!0:t===o-1;y.animateDraw(M,{realIndex:t,j:e,isFill:r,isLast:s,speed:n,delay:0,mask:g})}else k||y.animatePathsGradually(q(K({},N),{speed:l}))}else(_.globals.resized||!_.globals.dataChanged)&&!k&&y.showDelayedElements();return _.globals.dataChanged&&x&&C&&!k&&y.animatePathsGradually(q(K({},N),{speed:u})),k&&y.revealBulk(M),M}drawPattern(e,t,n,r=`#a8a8a8`,i=0){return this.w.dom.Paper.pattern(t,n,a=>{e===`horizontalLines`?a.line(0,0,n,0).stroke({color:r,width:i+1}):e===`verticalLines`?a.line(0,0,0,t).stroke({color:r,width:i+1}):e===`slantedLines`?a.line(0,0,t,n).stroke({color:r,width:i}):e===`squares`?a.rect(t,n).fill(`none`).stroke({color:r,width:i}):e===`circles`&&a.circle(t).fill(`none`).stroke({color:r,width:i})})}drawGradient(e,t,n,r,i,a=null,o=null,s=[],c=0){let l=this.w,u;t.length<9&&t.indexOf(`#`)===0&&(t=Z.hexToRgba(t,r)),n.length<9&&n.indexOf(`#`)===0&&(n=Z.hexToRgba(n,i));let d=0,f=1,p=1,m=null;o!==null&&(d=o[0]===void 0?0:o[0]/100,f=o[1]===void 0?1:o[1]/100,p=o[2]===void 0?1:o[2]/100,m=o[3]===void 0?null:o[3]/100);let h=l.config.chart.type===`donut`||l.config.chart.type===`pie`||l.config.chart.type===`polarArea`||l.config.chart.type===`bubble`;if(u=!s||s.length===0?l.dom.Paper.gradient(h?`radial`:`linear`,e=>{e.stop(d,t,r),e.stop(f,n,i),e.stop(p,n,i),m!==null&&e.stop(m,t,r)}):l.dom.Paper.gradient(h?`radial`:`linear`,e=>
47{(Array.isArray(s[c])?s[c]:s).forEach(t=>{e.stop(t.offset/100,t.color,t.opacity)})}),!h)e===`vertical`?u.from(0,0).to(0,1):e===`diagonal`?u.from(0,0).to(1,1):e===`horizontal`?u.from(0,1).to(1,1):e===`diagonal2`&&u.from(1,0).to(0,1);else{let e=l.layout.gridWidth/2,t=l.layout.gridHeight/2;l.config.chart.type===`bubble`?u.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2}):u.attr({gradientUnits:`userSpaceOnUse`,cx:e,cy:t,r:a})}return u}getTextBasedOnMaxWidth({text:e,maxWidth:t,fontSize:n,fontFamily:r}){let i=this.getTextRects(e,n,r,``),a=i.width/e.length,o=Math.floor(t/a);return t<i.width?e.slice(0,o-3)+`...`:e}drawText({x:e,y:t,text:n,textAnchor:r,fontSize:i,fontFamily:a,fontWeight:o,foreColor:s,opacity:c,maxWidth:l,cssClass:u=``,isPlainText:d=!0,dominantBaseline:f=`auto`}){let p=this.w;n===void 0&&(n=``);let m=n;r||=`start`,(!s||!s.length)&&(s=p.config.chart.foreColor),a||=p.config.chart.fontFamily,i||=`11px`,o||=`regular`;let h={maxWidth:l,fontSize:i,fontFamily:a},g;return Array.isArray(n)?g=p.dom.Paper.text(e=>{for(let t=0;t<n.length;t++)m=n[t],l&&(m=this.getTextBasedOnMaxWidth(K({text:n[t]},h))),t===0?e.tspan(m):e.tspan(m).newLine()}):(l&&(m=this.getTextBasedOnMaxWidth(K({text:n},h))),g=d?p.dom.Paper.plain(n):p.dom.Paper.text(e=>e.tspan(m))),g.attr({x:e,y:t,"text-anchor":r,"dominant-baseline":f,"font-size":i,"font-family":a,"font-weight":o,fill:s,class:`apexcharts-text `+u}),g.node.style.fontFamily=a,g.node.style.opacity=c,g}getMarkerPath(e,t,n,r){let i=``;switch(n){case`cross`:r/=1.4,i=`M ${e-r} ${t-r} L ${e+r} ${t+r} M ${e-r} ${t+r} L ${e+r} ${t-r}`;break;case`plus`:r/=1.12,i=`M ${e-r} ${t} L ${e+r} ${t} M ${e} ${t-r} L ${e} ${t+r}`;break;case`star`:case`sparkle`:{let a=5;r*=1.15,n===`sparkle`&&(r/=1.1,a=4);let o=Math.PI/a;for(let n=0;n<=2*a;n++){let a=n*o,s=n%2==0?r:r/2,c=e+s*Math.sin(a),l=t-s*Math.cos(a);i+=(n===0?`M`:`L`)+c+`,`+l}i+=`Z`;break}case`triangle`:i=`M ${e} ${t-r} 48 L ${e+r} ${t+r} 49 L ${e-r} ${t+r} 50 Z`;break;case`square`:case`rect`:r/=1.125,i=`M ${e-r} ${t-r} 51 L ${e+r} ${t-r} 52 L ${e+r} ${t+r} 53 L ${e-r} ${t+r} 54 Z`;break;case`diamond`:r*=1.05,i=`M ${e} ${t-r} 55 L ${e+r} ${t} 56 L ${e} ${t+r} 57 L ${e-r} ${t} 58 Z`;break;case`line`:r/=1.1,i=`M ${e-r} ${t} 59 L ${e+r} ${t}`;break;default:r*=2,i=`M ${e}, ${t} 60 m -${r/2}, 0 61 a ${r/2},${r/2} 0 1,0 ${r},0 62 a ${r/2},${r/2} 0 1,0 -${r},0`}return i}drawMarkerShape(e,t,n,r,i){let a=this.drawPath({d:this.getMarkerPath(e,t,n,r),stroke:i.pointStrokeColor,strokeDashArray:i.pointStrokeDashArray,strokeWidth:i.pointStrokeWidth,fill:i.pointFillColor,fillOpacity:i.pointFillOpacity,strokeOpacity:i.pointStrokeOpacity});return a.attr({cx:e,cy:t,shape:i.shape,class:i.class?i.class:``}),a}drawMarker(e,t,n){e||=0;let r=n.pSize||0;return Z.isNumber(t)||(r=0,t=0),this.drawMarkerShape(e,t,n?.shape,r,K(K({},n),n.shape===`line`||n.shape===`plus`||n.shape===`cross`?{pointStrokeColor:n.pointFillColor,pointStrokeOpacity:n.pointFillOpacity}:{}))}pathMouseEnter(t,n){let r=this.w,i=new Uv(this.w),a=parseInt(t.node.getAttribute(`index`)??``,10),o=parseInt(t.node.getAttribute(`j`)??``,10);if(!(isNaN(a)||isNaN(o))&&(typeof r.config.chart.events.dataPointMouseEnter==`function`&&r.config.chart.events.dataPointMouseEnter(n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}),e._fireEvent(r,`dataPointMouseEnter`,[n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}]),(r.config.states.active.filter.type===`none`||t.node.getAttribute(`selected`)!==`true`)&&r.config.states.hover.filter.type!==`none`&&!r.interact.isTouchDevice)){let e=r.config.states.hover.filter;i.applyFilter(t,a,e.type)}}pathMouseLeave(t,n){let r=this.w,i=new Uv(this.w),a=parseInt(t.node.getAttribute(`index`)??``,10),o=parseInt(t.node.getAttribute(`j`)??``,10);isNaN(a)||isNaN(o)||(typeof r.config.chart.events.dataPointMouseLeave==`function`&&r.config.chart.events.dataPointMouseLeave(n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}),e._fireEvent(r,`dataPointMouseLeave`,[n,this.ctx,{seriesIndex:a,dataPointIndex:o,w:r}]),(r.config.states.active.filter.type===`none`||t.node.getAttribute(`selected`)!==`true`)&&r.config.states.hover.f
62ilter.type!==`none`&&i.getDefaultFilter(t,a))}pathMouseDown(t,n){let r=this.w,i=new Uv(this.w),a=parseInt(t.node.getAttribute(`index`)??``,10),o=parseInt(t.node.getAttribute(`j`)??``,10);if(isNaN(a)||isNaN(o))return;let s=`false`;if(t.node.getAttribute(`selected`)===`true`){t.node.setAttribute(`selected`,`false`);let e=r.interact.selectedDataPoints[a].indexOf(o);e>-1&&r.interact.selectedDataPoints[a].splice(e,1)}else{if(!r.config.states.active.allowMultipleDataPointsSelection&&r.interact.selectedDataPoints.length>0){r.interact.selectedDataPoints=[];let e=r.dom.Paper.find(`.apexcharts-series path:not(.apexcharts-decoration-element)`),t=r.dom.Paper.find(`.apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)`),n=e=>{Array.prototype.forEach.call(e,e=>{e.node.setAttribute(`selected`,`false`),i.getDefaultFilter(e,a)})};n(e),n(t)}t.node.setAttribute(`selected`,`true`),s=`true`,r.interact.selectedDataPoints[a]===void 0&&(r.interact.selectedDataPoints[a]=[]),r.interact.selectedDataPoints[a].push(o)}if(s===`true`){let e=r.config.states.active.filter;if(e!==`none`)i.applyFilter(t,a,e.type);else if(r.config.states.hover.filter!==`none`&&!r.interact.isTouchDevice){let e=r.config.states.hover.filter;i.applyFilter(t,a,e.type)}}else if(r.config.states.active.filter.type!==`none`){if(r.config.states.hover.filter.type!==`none`&&!r.interact.isTouchDevice){let e=r.config.states.hover.filter;i.applyFilter(t,a,e.type)}else i.getDefaultFilter(t,a)}typeof r.config.chart.events.dataPointSelection==`function`&&r.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:r.interact.selectedDataPoints,seriesIndex:a,dataPointIndex:o,w:r}),n&&e._fireEvent(r,`dataPointSelection`,[n,this.ctx,{selectedDataPoints:r.interact.selectedDataPoints,seriesIndex:a,dataPointIndex:o,w:r}])}rotateAroundCenter(e){let t={};return e&&typeof e.getBBox==`function`&&(t=e.getBBox()),{x:t.x+t.width/2,y:t.y+t.height/2}}setupEventDelegation(t,n){let r=null;t.node.addEventListener(`mouseover`,i=>{let a=e._findDelegateTarget(i.target,t.node,n);a&&a!==r&&(r&&r.instance&&this.pathMouseLeave(r.instance,i),r=a,a.instance&&this.pathMouseEnter(a.instance,i))}),t.node.addEventListener(`mouseout`,i=>{r&&(i.relatedTarget?e._findDelegateTarget(i.relatedTarget,t.node,n):null)!==r&&(r&&r.instance&&this.pathMouseLeave(r.instance,i),r=null)}),t.node.addEventListener(`mousedown`,r=>{let i=e._findDelegateTarget(r.target,t.node,n);i&&i.instance&&this.pathMouseDown(i.instance,r)})}static _fireEvent(e,t,n){let r=e.globals.events;if(!r||!Object.prototype.hasOwnProperty.call(r,t))return;let i=r[t];for(let e=0;e<i.length;e++)i[e].apply(null,n)}static _findDelegateTarget(e,t,n){for(;e&&e!==t&&e!==document;){if(e.matches&&e.matches(n))return e;e=e.parentNode}return null}static setAttrs(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.setAttribute(n,t[n])}getTextRects(e,t,n,r,i=!0){let a=this.w,o=[e,t,n,r,i].join(`\0`),s=a.globals.textRectsCache;if(s&&s.has(o))return s.get(o);let c=this.drawText({x:-200,y:-200,text:e,textAnchor:`start`,fontSize:t,fontFamily:n,foreColor:`#fff`,opacity:0});r&&c.attr(`transform`,r),a.dom.Paper.add(c);let l=c.bbox(),u=l.y;i||(l=c.node.getBoundingClientRect()),c.remove();let d={width:l.width,height:l.height,centerOffset:i?u+l.height/2- -200:0};return s&&s.set(o,d),d}placeTextWithEllipsis(e,t,n){if(typeof e.getComputedTextLength==`function`&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=n/1.1)){for(let r=t.length-3;r>0;r-=3)if(e.getSubStringLength(0,r)<=n/1.1){e.textContent=t.substring(0,r)+`...`;return}e.textContent=`.`}}},$=`http://www.w3.org/2000/svg`,Wv=class e{constructor(e,t){typeof e==`object`?(this.x=e.x,this.y=e.y):(this.x=e||0,this.y=t||0)}transform(e){return e.apply(this)}clone(){return new e(this.x,this.y)}},Gv=class e{constructor(e,t,n,r,i,a){this.a=e??1,this.b=t??0,this.c=n??0,this.d=r??1,this.e=i??0,this.f=a??0}rotate(t){let n=t*Math.PI/180,r=Math.cos(n),i=Math.sin(n);return this.multiply(new e(r,i,-i,r,0,0))}scale(t,n){return this.multiply(new e(t,0,0,n??t,0,0))}multiply(t){return new e(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}
62apply(e){return new Wv(this.a*e.x+this.c*e.y+this.e,this.b*e.x+this.d*e.y+this.f)}},Kv=class{constructor(e,t,n,r){this.x=e,this.y=t,this.w=n,this.h=r,this.width=n,this.height=r,this.x2=e+n,this.y2=t+r}},qv=class{constructor(e){this.w=e,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(e){let t=this.w,n=t.config,r=parseInt(String(t.layout.gridWidth),10),i=parseInt(String(t.layout.gridHeight),10),a=r>i?r:i,o=e.image,s=0,c=0;e.width===void 0&&e.height===void 0?n.fill.image.width!==void 0&&n.fill.image.height!==void 0?(s=n.fill.image.width+1,c=n.fill.image.height):(s=a+1,c=a):(s=e.width,c=e.height);let l=X.createElementNS($,`pattern`);Q.setAttrs(l,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:`userSpaceOnUse`,width:s+`px`,height:c+`px`});let u=X.createElementNS($,`image`);l.appendChild(u);let d=Y.isBrowser()?window.SVG:global.SVG;u.setAttributeNS(d.xlink,`href`,o),Q.setAttrs(u,{x:0,y:0,preserveAspectRatio:`none`,width:s+`px`,height:c+`px`}),u.style.opacity=e.opacity,t.dom.elDefs.node.appendChild(l)}getSeriesIndex(e){let t=this.w,n=t.config.chart.type;return this.seriesIndex=(n===`bar`||n===`rangeBar`)&&t.config.plotOptions.bar.distributed||n===`heatmap`||n===`treemap`?e.seriesNumber:e.seriesNumber%t.seriesData.series.length,this.seriesIndex}computeColorStops(e,t){let n=this.w,r=null,i=null;for(let n of e)n>=t.threshold?(r===null||n>r)&&(r=n):(i===null||n<i)&&(i=n);r===null&&(r=t.threshold),i===null&&(i=t.threshold);let a=r-t.threshold+(t.threshold-i);a===0&&(a=1);let o=100-(t.threshold-i)/a*100;return o=Math.max(0,Math.min(o,100)),[{offset:o,color:t.colorAboveThreshold,opacity:n.config.fill.opacity},{offset:0,color:t.colorBelowThreshold,opacity:n.config.fill.opacity}]}fillPath(e){let t=this.w;this.opts=e;let n=this.w.config,r,i,a;this.seriesIndex=this.getSeriesIndex(e);let o=n.plotOptions.line.colors.colorAboveThreshold&&n.plotOptions.line.colors.colorBelowThreshold,s=this.getFillColors()[this.seriesIndex];t.seriesData.seriesColors[this.seriesIndex]!==void 0&&(s=t.seriesData.seriesColors[this.seriesIndex]),typeof s==`function`&&(s=s({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));let c=e.fillType?e.fillType:this.getFillType(this.seriesIndex),l=Array.isArray(n.fill.opacity)?n.fill.opacity[this.seriesIndex]:n.fill.opacity,u=c===`gradient`||o;e.color&&(s=e.color);let d=t.config.series[this.seriesIndex];d?.data?.[e.dataPointIndex]?.fillColor&&(s=d?.data?.[e.dataPointIndex]?.fillColor),s||(s=`#fff`,console.warn(`undefined color - ApexCharts`)),e.opacity!==void 0&&e.opacity!==null&&(l=e.opacity);let f=s;Z.isCSSVariable(s)?f=Z.applyOpacityToColor(s,l):s.indexOf(`rgb`)===-1?s.indexOf(`#`)===-1?f=s:s.length<9&&(f=Z.hexToRgba(s,l)):s.indexOf(`rgba`)>-1?l=Z.getOpacityFromRGBA(s):f=Z.hexToRgba(Z.rgb2hex(s),l);let p=Z.isCSSVariable(s)?Z.getThemeColor(s):s;if(c===`pattern`&&(i=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:i,fillColor:p,defaultColor:f})),u){let r=n.fill.gradient.colorStops?[...n.fill.gradient.colorStops]:[],i=n.fill.gradient.type;o&&(r[this.seriesIndex]=this.computeColorStops(t.seriesData.series[this.seriesIndex],n.plotOptions.line.colors),i=`vertical`),a=this.handleGradientFill({type:i,fillConfig:e.fillConfig,fillColor:p,fillOpacity:l,colorStops:r,i:this.seriesIndex})}if(c===`image`){let i=n.fill.image.src,a=e.patternID?e.patternID:``,o=`pattern${t.globals.cuid}${e.seriesNumber+1}${a}`;this.patternIDs.indexOf(o)===-1&&(this.clippedImgArea({opacity:l,image:Array.isArray(i)?e.seriesNumber<i.length?i[e.seriesNumber]:i[0]:i,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:o}),this.patternIDs.push(o)),r=`url(#${o})`}else r=u?a:c===`pattern`?i:f;return e.solid&&(r=f),r}getFillType(e){let t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}getFillColors(){let e=this.w,t=e.config,n=this.opts,r=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type===`line`?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):t.chart.type===`line`?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),n.fillColors!==void 0&&(r=[],Array.isArray(n.fillColors)?r=n.fillColors.slice():r.push(n.fillColors)),r}handlePatternFill({fillConfig:e,patternFill:t,fillColor:n,defaultColor:r}){let i=this.w.config.fill;e&&(i=e);let a=this.opts,o=new Q(this.w),s=Array.isArray(i.pattern.strokeWidth)?i.pattern.strokeWidth[this.seriesIndex]:i.pattern.strokeWidth,c=n;return t=Array.isArray(i.pattern.style)?i.pattern.style[a.seriesNumber]===void 0?r:o.drawPattern(i.pattern.style[a.seriesNumber],i.pattern.width,i.pattern.height,c,s):o.drawPattern(i.pattern.style,i.pattern.width,i.pattern.height,c,s),t}handleGradientFill({type:e,fillColor:t,fillOpacity:n,fillConfig:r,colorStops:i,i:a}){let o=this.w.config.fill;r&&(o=K(K({},o),r));let s=this.opts,c=new Q(this.w),l=new Z;e||=o.gradient.type;let u=t,d,f=o.gradient.opacityFrom===void 0?n:Array.isArray(o.gradient.opacityFrom)?o.gradient.opacityFrom[a]:o.gradient.opacityFrom;u.indexOf(`rgba`)>-1&&(f=Z.getOpacityFromRGBA(u));let p=o.gradient.opacityTo===void 0?n:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[a]:o.gradient.opacityTo;
62if(o.gradient.gradientToColors===void 0||o.gradient.gradientToColors.length===0)d=o.gradient.shade===`dark`?l.shadeColor(parseFloat(o.gradient.shadeIntensity)*-1,t.indexOf(`rgb`)>-1?Z.rgb2hex(t):t):l.shadeColor(parseFloat(o.gradient.shadeIntensity),t.indexOf(`rgb`)>-1?Z.rgb2hex(t):t);else if(o.gradient.gradientToColors[s.seriesNumber]){let e=o.gradient.gradientToColors[s.seriesNumber];d=e,e.indexOf(`rgba`)>-1&&(p=Z.getOpacityFromRGBA(e))}else d=t;if(o.gradient.gradientFrom&&(u=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){let e=u;u=d,d=e}return u.indexOf(`rgb`)>-1&&(u=Z.rgb2hex(u)),d.indexOf(`rgb`)>-1&&(d=Z.rgb2hex(d)),c.drawGradient(e,u,d,f,p,s.size,o.gradient.stops,i,a)}},Jv=class{constructor(e,t){this.w=e,this.ctx=t,this._filters=new Uv(this.w),this._graphics=new Q(this.w,this.ctx)}setGlobalMarkerSize(){let 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.seriesData.series.length+1)for(let t=0;t<=e.seriesData.series.length;t++)e.globals.markers.size[t]===void 0&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(()=>e.config.markers.size)}plotChartMarkers({pointsPos:e,seriesIndex:t,j:n,pSize:r,alwaysDrawMarker:i=!1,isVirtualPoint:a=!1}){let o=this.w,s=t,c=e,l=null,u=new Q(this.w),d=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(c.x))for(let e=0;e<c.x.length;e++){let f,p=n,m=!Z.isNumber(c.y[e]);o.globals.markers.largestSize===0&&o.globals.hasNullValues&&o.seriesData.series[s][n+1]!==null&&!a&&(m=!0),n===1&&e===0&&(p=0),n===1&&e===1&&(p=1);let h=`apexcharts-marker`;if((o.config.chart.type===`line`||o.config.chart.type===`area`)&&!o.globals.comboCharts&&!o.config.tooltip.intersect&&(h+=` no-pointer-events`),(Array.isArray(o.config.markers.size)?o.globals.markers.size[t]>0:o.config.markers.size>0)||i||d){m||(h+=` w${Z.randomId()}`);let n=this.getMarkerConfig({cssClass:h,seriesIndex:t,dataPointIndex:p}),a=o.config.series[s];a.data[p]&&(a.data[p].fillColor&&(n.pointFillColor=a.data[p].fillColor),a.data[p].strokeColor&&(n.pointStrokeColor=a.data[p].strokeColor)),r!==void 0&&(n.pSize=r),(c.x[e]<-o.globals.markers.largestSize||c.x[e]>o.layout.gridWidth+o.globals.markers.largestSize||c.y[e]<-o.globals.markers.largestSize||c.y[e]>o.layout.gridHeight+o.globals.markers.largestSize)&&(n.pSize=0),m||((o.globals.markers.size[t]>0||i||d)&&!l&&(l=u.group({class:i||d?``:`apexcharts-series-markers`}),l.attr(`clip-path`,`url(#gridRectMarkerMask${o.globals.cuid})`),this.setupMarkerDelegation(l)),f=u.drawMarker(c.x[e],c.y[e],n),f.attr(`rel`,p),f.attr(`j`,p),f.attr(`index`,t),f.node.setAttribute(`default-marker-size`,n.pSize),zv(f,c.x[e],o),this._filters.setSelectionFilter(f,t,p),l&&l.add(f))}else o.globals.pointsArray[t]===void 0&&(o.globals.pointsArray[t]=[]),o.globals.pointsArray[t].push([c.x[e],c.y[e]])}return l}getMarkerConfig({cssClass:e,seriesIndex:t,dataPointIndex:n=null,radius:r=null,size:i=null,strokeWidth:a=null}){let o=this.w,s=this.getMarkerStyle(t),c=i===null?o.globals.markers.size[t]:i,l=o.config.markers;return n!==null&&l.discrete.length&&l.discrete.map(e=>{e.seriesIndex===t&&e.dataPointIndex===n&&(s.pointStrokeColor=e.strokeColor,s.pointFillColor=e.fillColor,c=e.size,s.pointShape=e.shape)}),{pSize:r===null?c:r,pRadius:r===null?l.radius:r,pointStrokeWidth:a===null?Array.isArray(l.strokeWidth)?l.strokeWidth[t]:l.strokeWidth:a,pointStrokeColor:s.pointStrokeColor,pointFillColor:s.pointFillColor,shape:s.pointShape||(Array.isArray(l.shape)?l.shape[t]:l.shape),class:e,pointStrokeOpacity:Array.isArray(l.strokeOpacity)?l.strokeOpacity[t]:l.strokeOpacity,pointStrokeDashArray:Array.isArray(l.strokeDashArray)?l.strokeDashArray[t]:l.strokeDashArray,pointFillOpacity:Array.isArray(l.fillOpacity)?l.fillOpacity[t]:l.fillOpacity,seriesIndex:t}}setupMarkerDelegation(e){let t=this.w,n=`.apexcharts-marker`;this._graphics.setupEventDelegation(e,n),e.node.addEventListener(`click`,r=>{t.config.markers.onClick&&Q._findDelegateTarget(r.target,e.node,n)&&t.config.markers.onClick(r)}),e.node.addEventListener(`dblclick`,r=>{t.config.markers.onDblClick&&Q._findDelegateTarget(r.target,e.node,n)&&t.config.markers.onDblClick(r)}
62),e.node.addEventListener(`touchstart`,t=>{let r=Q._findDelegateTarget(t.target,e.node,n);r&&r.instance&&this._graphics.pathMouseDown(r.instance,t)},{passive:!0})}addEvents(e){let t=this.w;e.node.addEventListener(`mouseenter`,this._graphics.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener(`mouseleave`,this._graphics.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener(`mousedown`,this._graphics.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`,this._graphics.pathMouseDown.bind(this.ctx,e),{passive:!0})}getMarkerStyle(e){let t=this.w,n=t.globals.markers.colors,r=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(r)?r[e]:r,pointFillColor:Array.isArray(n)?n[e]:n}}},Yv=class{constructor(e,t){this.ctx=t,this.w=e,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new Hv(this.w),this.filters=new Uv(this.w),this.fill=new qv(this.w),this.markers=new Jv(this.w,this.ctx),this.graphics=new Q(this.w)}draw(e,t,n){let r=this.w,i=this.graphics,a=n.realIndex,o=n.pointsPos,s=n.zRatio,c=n.elParent,l=i.group({class:`apexcharts-series-markers apexcharts-series-${r.config.chart.type}`});if(l.attr(`clip-path`,`url(#gridRectMarkerMask${r.globals.cuid})`),this.markers.setupMarkerDelegation(l),Array.isArray(o.x))for(let e=0;e<o.x.length;e++){let n=t+1,i=!0;t===0&&e===0&&(n=0),t===0&&e===1&&(n=1);let u=r.globals.markers.size[a];if(s!==1/0){let e=r.config.plotOptions.bubble;u=r.seriesData.seriesZ[a][n],e.zScaling&&(u/=s),e.minBubbleRadius&&u<e.minBubbleRadius&&(u=e.minBubbleRadius),e.maxBubbleRadius&&u>e.maxBubbleRadius&&(u=e.maxBubbleRadius)}let d=o.x[e],f=o.y[e];if(u||=0,(f===null||r.seriesData.series[a][n]===void 0)&&(i=!1),i){let e=this.drawPoint(d,f,u,a,n,t);l.add(e)}c.add(l)}}drawPoint(e,t,n,r,i,a){let o=this.w,s=r,c=this.anim,l=this.filters,u=this.fill,d=this.markers,f=this.graphics,p=d.getMarkerConfig({cssClass:`apexcharts-marker`,seriesIndex:s,dataPointIndex:i,radius:o.config.chart.type===`bubble`||o.globals.comboCharts&&o.config.series[r]&&o.config.series[r].type===`bubble`?n:null}),m=u.fillPath({seriesNumber:r,dataPointIndex:i,color:p.pointFillColor,patternUnits:`objectBoundingBox`,value:o.seriesData.series[r][a]}),h=f.drawMarker(e,t,p),g=o.config.series[s];g.data[i]&&g.data[i].fillColor&&(m=g.data[i].fillColor);let _=o.config.plotOptions.scatter?.jitter;if(_?.enabled&&_.distributed&&o.globals.colors.length){let e=Math.round(o.seriesData.seriesX[r]?.[i]);isNaN(e)||(m=o.globals.colors[e%o.globals.colors.length])}if(h.attr({fill:m}),o.config.chart.dropShadow.enabled){let e=o.config.chart.dropShadow;l.dropShadow(h,e,r)}if(this.initialAnim&&!o.globals.dataChanged&&!o.globals.resized){let e=o.config.chart.animations,t=e.speed,n=o.globals.dataPoints||1,r=e.animateGradually,a=r&&r.enabled!==!1?Math.min(20,t*.5/Math.max(1,n)):0,s=Vv({style:a>0?`sequential`:`none`,index:i,baseDelay:a});c.animatePop(h,{speed:t,delay:s,onComplete:()=>c.animationCompleted(h)})}else o.globals.animationEnded=!0;return h.attr({rel:i,j:i,index:r,"default-marker-size":p.pSize}),l.setSelectionFilter(h,r,i),h.node.classList.add(`apexcharts-marker`),h}centerTextInBubble(e){let t=this.w;return e+=parseInt(t.config.dataLabels.style.fontSize,10)/4,{y:e}}},Xv=class{constructor(e,t=null){this.w=e,this.ctx=t}dataLabelsCorrection(e,t,n,r,i,a,o){let s=this.w,c=new Q(this.w),l=!1,u=c.getTextRects(n,o),d=u.width,f=u.height;t<0&&(t=0),t>s.layout.gridHeight+f&&(t=s.layout.gridHeight+f/2),s.globals.dataLabelsRects[r]===void 0&&(s.globals.dataLabelsRects[r]=[]),s.globals.dataLabelsRects[r].push({x:e,y:t,width:d,height:f});let p=s.globals.dataLabelsRects[r].length-2,m=s.globals.lastDrawnDataLabelsIndexes[r]===void 0?0:s.globals.lastDrawnDataLabelsIndexes[r][s.globals.lastDrawnDataLabelsIndexes[r].length-1];if(s.globals.dataLabelsRects[r][p]!==void 0){let n=s.globals.dataLabelsRects[r][m];(e>n.x+n.width||t>n.y+n.height||t+f<n.y||e+d<n.x)&&(l=!0)}return(i===0||a)&&(l=!0),{x:e,y:t,textRects:u,drawnextLabel:l}}drawDataLabel({type:e,pos:t,i:n,j:r,isRangeStart:i,strokeWidth:a=2}){let o=this.w,s=new Q(this.w),c=o.config.dataLabels,l=0,u=0,d=r,f=null;if(o.globals.collapsedSeriesIndices.indexOf(n)!==-1||!c.enabled||!Array.isArray(t.x))return f;f=s.group({class:`apexcharts-data-labels`});for(let s=0;s<t.x.length;s++)if(l=t.x[s]+c.offsetX,u=t.y[s]+c.offsetY+a,!isNaN(l)){r===1&&s===0&&(d=0),r===1&&s===1&&(
62d=1);let a=o.seriesData.series[n][d];e===`rangeArea`&&(a=i?o.rangeData.seriesRangeStart[n][d]:o.rangeData.seriesRangeEnd[n][d]);let c=``,p=e=>o.config.dataLabels.formatter(e,{seriesIndex:n,dataPointIndex:d,w:o});o.config.chart.type===`bubble`?(a=o.seriesData.seriesZ[n][d],c=p(a),u=t.y[s],u=new Yv(this.w,this.ctx).centerTextInBubble(u).y):a!==void 0&&(c=p(a));let m=o.config.dataLabels.textAnchor;o.globals.isSlopeChart&&(m=d===0?`end`:d===o.config.series[n].data.length-1?`start`:`middle`),this.plotDataLabelsText({x:l,y:u,text:c,i:n,j:d,parent:f,offsetCorrection:!0,dataLabelsConfig:o.config.dataLabels,textAnchor:m})}return f}plotDataLabelsText(e){let t=this.w,n=new Q(this.w),{x:r,y:i,i:a,j:o,text:s,textAnchor:c,fontSize:l,parent:u,dataLabelsConfig:d,color:f,alwaysDrawDataLabel:p,offsetCorrection:m,className:h}=e,g=null;if(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(a)<0)return g;let _={x:r,y:i,drawnextLabel:!0,textRects:null};if(m&&(_=this.dataLabelsCorrection(r,i,s,a,o,p,parseInt(d.style.fontSize,10).toString())),t.interact.zoomed||(r=_.x,i=_.y),_.textRects){let e=t.globals.barPadForNumericAxis||0;(r<-(e+20)-_.textRects.width||r>t.layout.gridWidth+_.textRects.width+e+30)&&(s=``)}let v=t.globals.dataLabels.style.colors[a];((t.config.chart.type===`bar`||t.config.chart.type===`rangeBar`)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(v=t.globals.dataLabels.style.colors[o]),typeof v==`function`&&(v=v({series:t.seriesData.series,seriesIndex:a,dataPointIndex:o,w:t})),f&&(v=f);let y=d.offsetX,b=d.offsetY;if((t.config.chart.type===`bar`||t.config.chart.type===`rangeBar`)&&(y=0,b=0),t.globals.isSlopeChart&&(o!==0&&(y=d.offsetX*-2+5),o!==0&&o!==t.config.series[a].data.length-1&&(y=0)),_.drawnextLabel){if(c===`middle`&&r===t.layout.gridWidth&&(c=`end`),g=n.drawText({x:r+y,y:i+b,foreColor:v,textAnchor:c||d.textAnchor,text:s,fontSize:l||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||`normal`}),g.attr({class:h||`apexcharts-datalabel`,cx:r,cy:i}),d.dropShadow.enabled){let e=d.dropShadow;new Uv(this.w).dropShadow(g,e)}u.add(g),zv(g,r,t),t.globals.lastDrawnDataLabelsIndexes[a]===void 0&&(t.globals.lastDrawnDataLabelsIndexes[a]=[]),t.globals.lastDrawnDataLabelsIndexes[a].push(o)}return g}addBackgroundToDataLabel(e,t){let n=this.w,r=n.config.dataLabels.background,i=r.padding,a=r.padding/2,o=t.width,s=t.height,c=new Q(this.w).drawRect(t.x-i,t.y-a/2,o+i*2,s+a,r.borderRadius,n.config.chart.background===`transparent`||!n.config.chart.background?`#fff`:n.config.chart.background,r.opacity,r.borderWidth,r.borderColor);return r.dropShadow.enabled&&new Uv(this.w).dropShadow(c,r.dropShadow),c}dataLabelsBackground(){var e;let t=this.w;if(t.config.chart.type===`bubble`)return;let n=t.dom.baseEl.querySelectorAll(`.apexcharts-datalabels text`);for(let r=0;r<n.length;r++){let i=n[r],a=i.getBBox(),o=null;if(a.width&&a.height&&(o=this.addBackgroundToDataLabel(i,a)),o){(e=i.parentNode)==null||e.insertBefore(o.node,i);let n=t.config.dataLabels.background.backgroundColor||i.getAttribute(`fill`);t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged?o.animate().attr({fill:n}):o.attr({fill:n}),i.setAttribute(`fill`,t.config.dataLabels.background.foreColor);let r=i.getAttribute(`cx`);r!==null&&zv(o,parseFloat(r),t)}}}bringForward(){let e=this.w,t=e.dom.baseEl.querySelectorAll(`.apexcharts-datalabels`),n=e.dom.baseEl.querySelector(`.apexcharts-plot-series:last-child`);for(let e=0;e<t.length;e++)n&&n.insertBefore(t[e],n.nextSibling)}},Zv=class{static invalidateAll(e){e&&e.globals&&(e.globals.cachedSelectors&&(e.globals.cachedSelectors={}),e.globals.domCache&&e.globals.domCache.clear(),e.globals.dimensionCache={})}static invalidateDimensions(e){e&&e.globals&&(e.globals.dimensionCache={})}static invalidateSelectors(e){e&&e.globals&&e.globals.cachedSelectors&&(e.globals.cachedSelectors={})}static getCachedSelector(e,t,n){return!e||!e.globals?n():(e.globals.cachedSelectors||(e.globals.cachedSelectors={}),e.globals.cachedSelectors[t]||(e.globals.cachedSelectors[t]=n()),e.globals.cachedSelectors[t])}static getCachedDimension(e,t,n,r=1e3){if(!e||!e.globals)return n();e.globals.dimensionCache||(e.globals.dimensionCache={});let i=e.globals.dimensionCache[t],a=Date.now();if(i&&i.lastUpdate&&a-i.lastUpdate<r)return i.value;let o=n();return e.globals.dimensionCache[t]={value:o,lastUpdate:a},o}
62static cacheDOMElement(e,t,n){e&&e.globals&&(e.globals.domCache||(e.globals.domCache=new Map),e.globals.domCache.set(t,n))}static getCachedDOMElement(e,t){return!e||!e.globals||!e.globals.domCache?null:e.globals.domCache.get(t)||null}},Qv=class{constructor(e,{theme:t=null,timeScale:n=null}={}){this.w=e,this.theme=t,this.timeScale=n}getLabel(e,t,n,r,i=[],a=`12px`,o=!0){let s=this.w,c=e[r]===void 0?``:e[r],l=c,u=s.formatters.xLabelFormatter,d=s.config.xaxis.labels.formatter,f=new xv(this.w),p=c;o&&(l=f.xLabelFormat(u,c,p,{i:r,dateFormatter:new bv(this.w).formatDate,w:s}),d!==void 0&&(l=d(c,e[r],{i:r,dateFormatter:new bv(this.w).formatDate,w:s}))),t.length>0?(n=t[r].position,l=t[r].value):s.config.xaxis.type===`datetime`&&d===void 0&&(l=``),l===void 0&&(l=``),l=Array.isArray(l)?l:l.toString();let m=new Q(this.w),h={};h=s.layout.rotateXLabels&&o?m.getTextRects(l,parseInt(a,10).toString(),null,`rotate(${s.config.xaxis.labels.rotate} 0 0)`,!1):m.getTextRects(l,parseInt(a,10).toString());let g=!s.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(l)&&(String(l)===`NaN`||i.indexOf(l)>=0&&g)&&(l=``),{x:n,text:l,textRect:h}}checkLabelBasedOnTickamount(e,t,n){let r=this.w,i=r.config.xaxis.tickAmount;return i===`dataPoints`&&(i=Math.round(r.layout.gridWidth/120)),i>n||e%Math.round(n/(i+1))===0||(t.text=``),t}checkForOverflowingLabels(e,t,n,r,i){let a=this.w;if(e===0&&a.globals.skipFirstTimelinelabel&&(t.text=``),e===n-1&&a.globals.skipLastTimelinelabel&&(t.text=``),a.config.xaxis.labels.hideOverlappingLabels&&r.length>0){let e=i[i.length-1];if(a.config.xaxis.labels.trim&&a.config.xaxis.type!==`datetime`)return t;t.x<e.textRect.width/(a.layout.rotateXLabels?Math.abs(a.config.xaxis.labels.rotate)/12:1.01)+e.x&&(t.text=``)}return t}checkForReversedLabels(e,t){let n=this.w;return n.config.yaxis[e]&&n.config.yaxis[e].reversed&&t.reverse(),t}yAxisAllSeriesCollapsed(e){let t=this.w.globals;return!t.seriesYAxisMap[e].some(e=>t.collapsedSeriesIndices.indexOf(e)===-1)}translateYAxisIndex(e){let t=this.w,n=t.globals,r=t.config.yaxis;return t.seriesData.series.length>r.length||r.some(e=>Array.isArray(e.seriesName))?e:n.seriesYAxisReverseMap[e]}isYAxisHidden(e){let t=this.w,n=t.config.yaxis[e];if(!n.show||this.yAxisAllSeriesCollapsed(e))return!0;
62if(!n.showForNullSeries){let n=t.globals.seriesYAxisMap[e],r=new Nv(this.w);return n.every(e=>r.isSeriesNull(e))}return!1}getYAxisForeColor(e,t){var n;let r=this.w;return Array.isArray(e)&&r.globals.yAxisScale[t]&&((n=this.theme)==null||n.pushExtraColors(e,r.globals.yAxisScale[t].result.length,!1)),e}drawYAxisTicks(e,t,n,r,i,a,o){let s=this.w,c=new Q(this.w),l=s.layout.translateY+s.config.yaxis[i].labels.offsetY;if(s.globals.isBarHorizontal?l=0:s.config.chart.type===`heatmap`&&(l+=a/2),r.show&&t>0){s.config.yaxis[i].opposite===!0&&(e+=r.width);for(let i=t;i>=0;i--){let t=c.drawLine(e+n.offsetX-r.width+r.offsetX,l+r.offsetY,e+n.offsetX+r.offsetX,l+r.offsetY,r.color);o.add(t),l+=a}}}},$v=class{constructor(e,t,n){this.w=e,this.ctx=t,this.elgrid=n,this.axesUtils=new Qv(e,{theme:t.theme,timeScale:t.timeScale}),this.xaxisLabels=e.labelData.labels.slice(),e.labelData.timescaleLabels.length>0&&!e.globals.isBarHorizontal&&(this.xaxisLabels=e.labelData.timescaleLabels.slice()),e.config.xaxis.overwriteCategories&&(this.xaxisLabels=e.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],this.offY=e.config.xaxis.position===`top`?0:e.layout.gridHeight,this.offY+=e.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=e.config.chart.type===`bar`&&e.config.plotOptions.bar.horizontal,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.xaxisBorderWidth=e.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=e.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth=String(this.xaxisBorderWidth).indexOf(`%`)>-1?e.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=e.config.xaxis.axisBorder.height,this.yaxis=e.config.yaxis[0]}drawXaxis(){let e=this.w,t=new Q(this.w),n=t.group({class:`apexcharts-xaxis`,transform:`translate(${e.config.xaxis.offsetX}, ${e.config.xaxis.offsetY})`}),r=t.group({class:`apexcharts-xaxis-texts-g`,transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});n.add(r);let i=[];for(let e=0;e<this.xaxisLabels.length;e++)i.push(this.xaxisLabels[e]);if(this.drawXAxisLabelAndGroup(!0,t,r,i,e.axisFlags.isXNumeric,(e,t)=>t),e.labelData.hasXaxisGroups){let n=e.labelData.groups;i=[];for(let e=0;e<n.length;e++)i.push(n[e].title);let a={};e.config.xaxis.group.style&&(a.xaxisFontSize=e.config.xaxis.group.style.fontSize,a.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,a.xaxisForeColors=e.config.xaxis.group.style.colors,a.fontWeight=e.config.xaxis.group.style.fontWeight,a.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,t,r,i,!1,(e,t)=>n[e].cols*t,a)}if(e.config.xaxis.title.text!==void 0){let r=t.group({class:`apexcharts-xaxis-title`}),i=t.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position===`bottom`?e.layout.xAxisLabelsHeight:-e.layout.xAxisLabelsHeight-10)+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});r.add(i),n.add(r)}if(e.config.xaxis.axisBorder.show){let r=e.globals.barPadForNumericAxis,i=t.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-r,this.offY,this.xaxisBorderWidth+r,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(i):n.add(i)}return n}drawXAxisLabelAndGroup(e,t,n,r,i,a,o={}){let s=[],c=[],l=this.w,u=o.xaxisFontSize||this.xaxisFontSize,d=o.xaxisFontFamily||this.xaxisFontFamily,f=o.xaxisForeColors||this.xaxisForeColors,p=o.fontWeight||l.config.xaxis.labels.style.fontWeight,m=o.cssClass||l.config.xaxis.labels.style.cssClass,h,g=l.globals.padHorizontal,_=r.length,v=l.config.xaxis.type===`category`?l.globals.dataPoints:_;if(v===0&&_>v&&(v=_),i){let e=Math.max(Number(l.config.xaxis.tickAmount)||1,v>1?v-1:v);h=l.layout.gridWidth/Math.min(e,_-1),g=g+a(0,h)/2+l.config.xaxis.labels.offsetX}else h=l.layout.gridWidth/v,g=g+a(0,h)+l.config.xaxis.labels.offsetX;for(let i=0;i<=_-1;i++){let o=g-a(i,h)/2+l.config.xaxis.labels.offsetX;i===0&&_===1&&h/2===g&&v===1&&(o=l.layout.gridWidth/2);let y=this.axesUtils.getLabel(r,l.labelData.timescaleLabels,o,i,s,u,e),b=28;l.layout.rotateXLabels&&e&&(b=22),l.config.xaxis.title.text&&l.config.xaxis.position===`top`&&(b+=p
62arseFloat(l.config.xaxis.title.style.fontSize)+2),e||(b=b+parseFloat(u)+(l.layout.xAxisLabelsHeight-l.layout.xAxisGroupLabelsHeight)+(l.layout.rotateXLabels?10:0)),y=l.config.xaxis.tickAmount!==void 0&&l.config.xaxis.tickAmount!==`dataPoints`&&l.config.xaxis.type!==`datetime`?this.axesUtils.checkLabelBasedOnTickamount(i,y,_):this.axesUtils.checkForOverflowingLabels(i,y,_,s,c);let x=()=>e&&l.config.xaxis.convertedCatToNumeric?f[l.globals.minX+i-1]:f[i],S=(y.textRect?.width??0)/2,C=y.x+S<0;if(l.config.xaxis.labels.show&&!C){let r=t.drawText({x:y.x,y:this.offY+l.config.xaxis.labels.offsetY+b-(l.config.xaxis.position===`top`?l.layout.xAxisHeight+l.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:`middle`,fontWeight:p,fontSize:u,fontFamily:d,foreColor:Array.isArray(f)?x():f,isPlainText:!1,cssClass:(e?`apexcharts-xaxis-label `:`apexcharts-xaxis-group-label `)+m});if(n.add(r),r.on(`click`,e=>{if(typeof l.config.chart.events.xAxisLabelClick==`function`){let t=Object.assign({},l,{labelIndex:i});l.config.chart.events.xAxisLabelClick(e,this.ctx,t)}}),e){let e=X.createElementNS($,`title`);e.textContent=Array.isArray(y.text)?y.text.join(` `):y.text,r.node.appendChild(e),y.text!==``&&(s.push(y.text),c.push(y))}}i<_-1&&(g+=a(i+1,h))}}drawXaxisInversed(e){let t=this.w,n=new Q(this.w),r=t.config.yaxis[0].opposite?t.globals.translateYAxisX[e]:0,i=n.group({class:`apexcharts-yaxis apexcharts-xaxis-inversed`,rel:e}),a=n.group({class:`apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g`,transform:`translate(`+r+`, 0)`});i.add(a);let o=[];if(t.config.yaxis[e].show)for(let e=0;e<this.xaxisLabels.length;e++)o.push(this.xaxisLabels[e]);let s=t.layout.gridHeight/o.length,c=-(s/2.2),l=t.formatters.yLabelFormatters[0],u=t.config.yaxis[0].labels;if(u.show)for(let r=0;r<=o.length-1;r++){let i=o[r]===void 0?``:o[r];i=l(i,{seriesIndex:e,dataPointIndex:r,w:t});let d=this.axesUtils.getYAxisForeColor(u.style.colors,e),f=()=>Array.isArray(d)?d[r]:d,p=0;Array.isArray(i)&&(p=i.length/2*parseInt(u.style.fontSize,10));let m=u.offsetX-15,h=`end`;this.yaxis.opposite&&(h=`start`),t.config.yaxis[0].labels.align===`left`?(m=u.offsetX,h=`start`):t.config.yaxis[0].labels.align===`center`?(m=u.offsetX,h=`middle`):t.config.yaxis[0].labels.align===`right`&&(h=`end`);let g=n.drawText({x:m,y:c+s+u.offsetY-p,text:i,textAnchor:h,foreColor:f(),fontSize:u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-yaxis-label `+u.style.cssClass,maxWidth:u.maxWidth});a.add(g),g.on(`click`,e=>{if(typeof t.config.chart.events.xAxisLabelClick==`function`){let n=Object.assign({},t,{labelIndex:r});t.config.chart.events.xAxisLabelClick(e,this.ctx,n)}});let _=X.createElementNS($,`title`);if(_.textContent=Array.isArray(i)?i.join(` `):i,g.node.appendChild(_),t.config.yaxis[e].labels.rotate!==0){let r=n.rotateAroundCenter(g.node);g.node.setAttribute(`transform`,`rotate(${t.config.yaxis[e].labels.rotate} 0 ${r.y})`)}c+=s}if(t.config.yaxis[0].title.text!==void 0){let e=n.group({class:`apexcharts-yaxis-title apexcharts-xaxis-title-inversed`,transform:`translate(`+r+`, 0)`}),a=n.drawText({x:t.config.yaxis[0].title.offsetX,y:t.layout.gridHeight/2+t.config.yaxis[0].title.offsetY,text:t.config.yaxis[0].title.text,textAnchor:`middle`,foreColor:t.config.yaxis[0].title.style.color,fontSize:t.config.yaxis[0].title.style.fontSize,fontWeight:t.config.yaxis[0].title.style.fontWeight,fontFamily:t.config.yaxis[0].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text `+t.config.yaxis[0].title.style.cssClass});e.add(a),i.add(e)}let d=0;this.isCategoryBarHorizontal&&t.config.yaxis[0].opposite&&(d=t.layout.gridWidth);let f=t.config.xaxis.axisBorder;if(f.show){let e=n.drawLine(t.globals.padHorizontal+f.offsetX+d,1+f.offsetY,t.globals.padHorizontal+f.offsetX+d,t.layout.gridHeight+f.offsetY,f.color,0);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(e):i.add(e)}return t.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,o.length,t.config.yaxis[0].axisBorder,t.config.yaxis[0].axisTicks,0,s,i),i}drawXaxisTicks(e,t,n){let r=this.w,i=e;if(e<0||e-2>r.layout.gridWidth)return;let a=this.offY+r.config.xaxis.axisTicks.offsetY;if(t=t+a+r.config.xaxis.axisTicks.height,r.config.xaxis.position===`top`&&(t=a-r.config.xaxis.axisTicks.height),r.config.xaxis.axisTicks.show){let o=new Q(this.w).drawLine(e+r.config.xaxis.axisTicks.offsetX,a+r.config.xaxis.offsetY,i+r.config.xaxis.axisTicks.offsetX,t+r.config.xaxis.offsetY,r.config.xaxis.axisTicks.color);n.add(o),o.node.classList.add(`apexcharts-xaxis-tick`)}}getXAxisTicksPositions(){let e=this.w,t=[],n=this.xaxisLabels.length,r=e.globals.padHorizontal;if(e.labelData.timescaleLabels.length>0)for(let e=0;e<n;e++)r=this.xaxisLabels[e].position,t.push(r);else{let i=n;for(let n=0;n<i;n++){let n=i;e.axisFlags.isXNumeric&&e.config.chart.type!==`bar`&&--n,r+=e.layout.gridWidth/n,t.push(r)}}return t}xAxisLabelCorrections(){var e,t;let n=this.w,r=new Q(this.w),i=n.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g`),a=n.dom.baseEl.querySelectorAll(`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)`),o=n.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-inversed text`),s=n.dom.baseEl.querySelectorAll(`.apexcharts-xaxis-inversed-texts-g text tspan`);if(n.layout.rotateXLabels||n.config.xaxis.labels.rotateAlways)for(let e=0;e<a.length;
62e++){let t=r.rotateAroundCenter(a[e]);--t.y,t.x+=1,a[e].setAttribute(`transform`,`rotate(${n.config.xaxis.labels.rotate} ${t.x} ${t.y})`),a[e].setAttribute(`text-anchor`,`end`),i?.setAttribute(`transform`,`translate(0, -10)`);let o=a[e].childNodes;n.config.xaxis.labels.trim&&Array.prototype.forEach.call(o,e=>{r.placeTextWithEllipsis(e,e.textContent,n.layout.xAxisLabelsHeight-(n.config.legend.position===`bottom`?20:10))})}else{let e=n.layout.gridWidth/(n.labelData.labels.length+1);for(let t=0;t<a.length;t++){let i=a[t].childNodes;n.config.xaxis.labels.trim&&n.config.xaxis.type!==`datetime`&&Array.prototype.forEach.call(i,t=>{r.placeTextWithEllipsis(t,t.textContent,e)})}}if(o.length>0){let i=o[o.length-1].getBBox(),a=o[0].getBBox();i.x<-20&&((e=o[o.length-1].parentNode)==null||e.removeChild(o[o.length-1])),a.x+a.width>n.layout.gridWidth&&!n.globals.isBarHorizontal&&((t=o[0].parentNode)==null||t.removeChild(o[0]));for(let e=0;e<s.length;e++)r.placeTextWithEllipsis(s[e],s[e].textContent??``,n.config.yaxis[0].labels.maxWidth-(n.config.yaxis[0].title.text?parseFloat(n.config.yaxis[0].title.style.fontSize)*2:0)-15)}}},ey=class{constructor(e,t){this.w=e,this.ctx=t,this.xaxisLabels=e.labelData.labels.slice(),this.axesUtils=new Qv(t.w,{theme:t.theme,timeScale:t.timeScale}),this.isRangeBar=e.rangeData.seriesRange.length&&e.globals.isBarHorizontal,e.labelData.timescaleLabels.length>0&&(this.xaxisLabels=e.labelData.timescaleLabels.slice())}drawGridArea(e=null){let t=this.w,n=new Q(this.w);e||=n.group({class:`apexcharts-grid`});let r=n.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.layout.gridHeight,`transparent`),i=n.drawLine(t.globals.padHorizontal,t.layout.gridHeight,t.layout.gridWidth,t.layout.gridHeight,`transparent`);return e.add(i),e.add(r),e}drawGrid(){if(this.w.globals.axisCharts){let e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){let e=this.w,t=e.globals,n=new Q(this.w),r=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width,i=e=>{let t=X.createElementNS($,`clipPath`);return t.setAttribute(`id`,e),t};e.dom.elGridRectMask=i(`gridRectMask${t.cuid}`),e.dom.elGridRectBarMask=i(`gridRectBarMask${t.cuid}`),e.dom.elGridRectMarkerMask=i(`gridRectMarkerMask${t.cuid}`),e.dom.elForecastMask=i(`forecastMask${t.cuid}`),e.dom.elNonForecastMask=i(`nonForecastMask${t.cuid}`);let a=[`bar`,`rangeBar`,`candlestick`,`boxPlot`,`violin`].includes(e.config.chart.type)||e.globals.comboBarCount>0,o=0,s=0;
62a&&e.axisFlags.isXNumeric&&!e.globals.isBarHorizontal&&(o=Math.max(e.config.grid.padding.left,t.barPadForNumericAxis),s=Math.max(e.config.grid.padding.right,t.barPadForNumericAxis)),e.dom.elGridRect=n.drawRect(-r/2-2,-r/2-2,e.layout.gridWidth+r+4,e.layout.gridHeight+r+4,0,`#fff`),e.dom.elGridRectBar=n.drawRect(-r/2-o-2,-r/2-2,e.layout.gridWidth+r+s+o+4,e.layout.gridHeight+r+4,0,`#fff`);let c=e.globals.markers.largestSize;e.dom.elGridRectMarker=n.drawRect(Math.min(-r/2-o-2,-c),-c,e.layout.gridWidth+Math.max(r+s+o+4,c*2),e.layout.gridHeight+c*2,0,`#fff`),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);let l=e.dom.elDefs.node;l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}_drawGridLines({i:e,x1:t,y1:n,x2:r,y2:i,xCount:a,parent:o}){let s=this.w;if(!(e===0&&s.globals.skipFirstTimelinelabel||e===a-1&&s.globals.skipLastTimelinelabel&&!s.config.xaxis.labels.formatter||s.config.chart.type===`radar`)){s.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:t,y1:n,x2:r,y2:i,xCount:a,parent:o});let c=0;if(s.labelData.hasXaxisGroups&&s.config.xaxis.tickPlacement===`between`){let t=s.labelData.groups;if(t){let n=0;for(let r=0;n<e&&r<t.length;r++)n+=t[r].cols;n===e&&(c=s.layout.xAxisLabelsHeight*.6)}}new $v(this.w,this.ctx).drawXaxisTicks(t,c,s.dom.elGraphical)}}_drawGridLine({i:e,x1:t,y1:n,x2:r,y2:i,xCount:a,parent:o}){let s=this.w,c=o.node.classList.contains(`apexcharts-gridlines-horizontal`),l=s.globals.barPadForNumericAxis,u=n===0&&i===0||t===0&&r===0||n===s.layout.gridHeight&&i===s.layout.gridHeight||s.globals.isBarHorizontal&&(e===0||e===a-1),d=new Q(this.w).drawLine(t-(c?l:0),n,r+(c?l:0),i,s.config.grid.borderColor,s.config.grid.strokeDashArray);d.node.classList.add(`apexcharts-gridline`),u&&s.config.grid.show?this.elGridBorders.add(d):o.add(d)}_drawGridBandRect({c:e,x1:t,y1:n,x2:r,y2:i,type:a}){let o=this.w,s=new Q(this.w),c=o.globals.barPadForNumericAxis,l=o.config.grid[a].colors[e],u=s.drawRect(t-(a===`row`?c:0),n,r+(a===`row`?c*2:0),i,0,l,o.config.grid[a].opacity);this.elg.add(u),u.attr(`clip-path`,`url(#gridRectMask${o.globals.cuid})`),u.node.classList.add(`apexcharts-grid-${a}`)}_drawXYLines({xCount:e,tickAmount:t}){let n=this.w,r=({xC:t,x1:n,y1:r,x2:i,y2:a})=>{for(let o=0;o<t;o++)n=this.xaxisLabels[o].position,i=this.xaxisLabels[o].position,this._drawGridLines({i:o,x1:n,y1:r,x2:i,y2:a,xCount:e,parent:this.elgridLinesV})},i=({xC:t,x1:r,y1:i,x2:a,y2:o})=>{for(let s=0;s<t+ +!n.axisFlags.isXNumeric;s++)s===0&&t===1&&n.globals.dataPoints===1&&(r=n.layout.gridWidth/2,a=r),this._drawGridLines({i:s,x1:r,y1:i,x2:a,y2:o,xCount:e,parent:this.elgridLinesV}),r+=n.layout.gridWidth/(n.axisFlags.isXNumeric?t-1:t),a=r};if(n.config.grid.xaxis.lines.show||n.config.xaxis.axisTicks.show){let t=n.globals.padHorizontal,a,o=n.layout.gridHeight;n.labelData.timescaleLabels.length?r({xC:e,x1:t,y1:0,x2:a,y2:o}):(n.axisFlags.isXNumeric&&(e=n.globals.xAxisScale?.result.length),i({xC:e,x1:t,y1:0,x2:a,y2:o}))}if(n.config.grid.yaxis.lines.show){let e=0,r=0,i=n.layout.gridWidth,a=t+1;this.isRangeBar&&(a=n.labelData.labels.length);for(let o=0;o<a+ +!!this.isRangeBar;o++)this._drawGridLine({i:o,xCount:a+ +!!this.isRangeBar,x1:0,y1:e,x2:i,y2:r,parent:this.elgridLinesH}),e+=n.layout.gridHeight/(this.isRangeBar?a:t),r=e}}_drawInvertedXYLines({xCount:e}){let t=this.w;if(t.config.grid.xaxis.lines.show||t.config.xaxis.axisTicks.show){let n=t.globals.padHorizontal,r,i=t.layout.gridHeight;for(let a=0;a<e+1;a++)t.config.grid.xaxis.lines.show&&this._drawGridLine({i:a,xCount:e+1,x1:n,y1:0,x2:r,y2:i,parent:this.elgridLinesV}),new $v(this.w,this.ctx).drawXaxisTicks(n,0,t.dom.elGraphical),n+=t.layout.gridWidth/e,r=n}if(t.config.grid.yaxis.lines.show){let e=0,n=0,r=t.layout.gridWidth;for(let i=0;i<t.globals.dataPoints+1;i++)this._drawGridLine({i,xCount:t.globals.dataPoints+1,x1:0,y1:e,x2:r,y2:n,parent:this.elgridLinesH}),e+=t.layout.gridHeight/t.globals.dataPoints,n=e}}renderGrid(){let e=this.w,t=e.globals,n=new Q(this.w);this.elg=n.group({class:`apexcharts-grid`}
62),this.elgridLinesH=n.group({class:`apexcharts-gridlines-horizontal`}),this.elgridLinesV=n.group({class:`apexcharts-gridlines-vertical`}),this.elGridBorders=n.group({class:`apexcharts-grid-borders`}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());let r=0;for(;r<t.seriesYAxisMap.length&&t.ignoreYAxisIndexes.includes(r);)r++;r===t.seriesYAxisMap.length&&(r=0);let i=t.yAxisScale[r].result.length-1,a;return!t.isBarHorizontal||this.isRangeBar?(a=this.xaxisLabels.length,this.isRangeBar&&(i=e.labelData.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(a=e.config.xaxis.tickAmount),t.yAxisScale?.[r]?.result?.length>0&&e.config.xaxis.type!==`datetime`&&(a=t.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:a,tickAmount:i})):(a=i,i=t.xTickAmount,this._drawInvertedXYLines({xCount:a,tickAmount:i})),this.drawGridBands(a,i),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.layout.gridWidth/a}}drawGridBands(e,t){let n=this.w;if(n.config.grid.row.colors?.length>0&&((e,r,i,a,o,s)=>{for(let c=0,l=0;c<r;c++,l++)l>=n.config.grid[e].colors.length&&(l=0),this._drawGridBandRect({c:l,x1:i,y1:a,x2:o,y2:s,type:e}),a+=n.layout.gridHeight/t})(`row`,t,0,0,n.layout.gridWidth,n.layout.gridHeight/t),n.config.grid.column.colors?.length>0){let t=!n.globals.isBarHorizontal&&n.config.xaxis.tickPlacement===`on`&&(n.config.xaxis.type===`category`||n.config.xaxis.convertedCatToNumeric)?e-1:e;n.axisFlags.isXNumeric&&(t=(n.globals.xAxisScale?.result.length??1)-1);let r=n.globals.padHorizontal,i=n.globals.padHorizontal+n.layout.gridWidth/t,a=n.layout.gridHeight;for(let o=0,s=0;o<e;o++,s++)s>=n.config.grid.column.colors.length&&(s=0),n.config.xaxis.type===`datetime`&&(r=this.xaxisLabels[o].position,i=(this.xaxisLabels[o+1]?.position||n.layout.gridWidth)-this.xaxisLabels[o].position),this._drawGridBandRect({c:s,x1:r,y1:0,x2:i,y2:a,type:`column`}),r+=n.layout.gridWidth/t}}},ty=class{constructor(e){this.w=e,this.coreUtils=new Nv(this.w)}niceScale(e,t,n=0){let r=1e-11,i=this.w,a=i.globals,o,s,c,l;a.isBarHorizontal?(o=i.config.xaxis,s=Math.max((a.svgWidth-100)/25,2)):(o=i.config.yaxis[n],s=Math.max((a.svgHeight-100)/15,2)),Z.isNumber(s)||(s=10),c=o.min!==void 0&&o.min!==null,l=o.max!==void 0&&o.min!==null;let u=o.stepSize!==void 0&&o.stepSize!==null,d=o.tickAmount!==void 0&&o.tickAmount!==null,f=d?o.tickAmount:Av[Math.min(Math.round(s/2),Av.length-1)];if(a.isMultipleYAxis&&!d&&a.multiAxisTickAmount>0&&(f=a.multiAxisTickAmount,d=!0),f=f===`dataPoints`?a.dataPoints-1:Math.abs(Math.round(f)),(e===Number.MIN_VALUE&&t===0||!Z.isNumber(e)&&!Z.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE)&&(e=Z.isNumber(o.min)?o.min:0,t=Z.isNumber(o.max)?o.max:e+f,a.allSeriesCollapsed=!1),e>t){console.warn(`axis.min cannot be greater than axis.max: swapping min and max`);let n=t;t=e,e=n}else e===t&&(e=e===0?0:e-1,t=t===0?2:t+1);let p=[];f<1&&(f=1);let m=f,h=Math.abs(t-e),g=.15;!c&&e>0&&e/h<g&&(e=0,c=!0),!l&&t<0&&-t/h<g&&(t=0,l=!0),h=Math.abs(t-e);let _=h/m,v=_,y=Math.floor(Math.log10(v)),b=10**y,x=Math.ceil(v/b);if(x=kv[a.yValueDecimal===0?0:1][x],v=x*b,_=v,a.isBarHorizontal&&o.stepSize&&o.type!==`datetime`?(_=o.stepSize,u=!0):u&&(_=o.stepSize),u&&o.forceNiceScale&&(_*=10**(y-Math.floor(Math.log10(_)))),c&&l){let e=h/m;if(d){if(u){if(Z.mod(h,_)!=0){let t=Z.getGCD(_,e);_=e/t<10?t:e}else Z.mod(_,e)==0?_=e:(e=_,d=!1)}else _=e}else if(u)Z.mod(h,_)==0?e=_:_=e;else if(Z.mod(h,_)==0)e=_;else{m=Math.ceil(h/_),e=h/m;let t=Z.getGCD(h,_);h/t<s&&(e=t),_=e}m=Math.round(h/_)}else{if(!c&&!l){if(a.isMultipleYAxis&&d){let n=_*Math.floor(e/_),r=n+_*m;r<t&&(_*=2),e=n,r=t,t=e+_*m,h=Math.abs(t-e),e>0&&e<Math.abs(r-t)&&(e=0,t=_*m),t<0&&-t<Math.abs(n-e)&&(t=0,e=-_*m)}else e=_*Math.floor(e/_),t=_*Math.ceil(t/_)}else if(l){if(d)e=t-_*m;else{let n=e;e=_*Math.floor(e/_),Math.abs(t-e)/Z.getGCD(h,_)>s&&(e=t-_*f,e+=_*Math.floor((n-e)/_))}}else if(c){if(d)t=e+_*m;else{let n=t;t=_*Math.ceil(t/_),Math.abs(t-e)/Z.getGCD(h,_)>s&&(t=e+_*f,t+=_*Math.ceil((n-t)/_))}}h=Math.abs(t-e),_=Z.getGCD(h,_),m=Math.round(h/_)}if(!d&&!(c||l)&&(m=Math.ceil((h-r)/(_+r)),m>16&&Z.getPrimeFactors(m).length<2&&m++),!d&&o.forceNiceScale&&a.yValueDecimal===0&&m>h&&(m=h,_=Math.round(h/m)),m>s&&(!(d||u)||o.forceNiceScale)){let e=Z.getPrimeFactors(m),t=e.length-1,n=m;
62reduceLoop:for(var S=0;S<t;S++)for(var C=0;C<=t-S;C++){let r=Math.min(C+S,t),i=n,a=1;for(var w=C;w<=r;w++)a*=e[w];if(i/=a,i<s){n=i;break reduceLoop}}_=n===m?h:h/n,m=Math.round(h/_)}a.isMultipleYAxis&&a.multiAxisTickAmount==0&&a.ignoreYAxisIndexes.indexOf(n)<0&&(a.multiAxisTickAmount=m);let T=e-_,E=_*r;do T+=_,p.push(Z.stripNumber(T,7));while(t-T>E);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}linearScale(e,t,n=10,r=0,i=void 0){let a=Math.abs(t-e),o=[];if(e===t)return o=[e],{result:o,niceMin:o[0],niceMax:o[o.length-1]};n=this._adjustTicksForSmallRange(n,r,a),n===`dataPoints`&&(n=this.w.globals.dataPoints-1);let s=n;if(i||=a/s,i!==0&&isFinite(i)){let e=10**Math.max(2,-Math.floor(Math.log10(Math.abs(i)))+2);i=Math.round((i+2**-52)*e)/e}let c=n===Number.MAX_VALUE?5:s;n===Number.MAX_VALUE&&(i=1);let l=e;for(;c>=0;)o.push(l),l=Z.preciseAddition(l,i),--c;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}logarithmicScaleNice(e,t,n){t<=0&&(t=Math.max(e,n)),e<=0&&(e=Math.min(t,n));let r=[],i=Math.ceil(Math.log(t)/Math.log(n)+1),a=Math.floor(Math.log(e)/Math.log(n));for(let e=a;e<i;e++)r.push(n**+e);return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}logarithmicScale(e,t,n){t<=0&&(t=Math.max(e,n)),e<=0&&(e=Math.min(t,n));let r=[],i=Math.log(t)/Math.log(n),a=Math.log(e)/Math.log(n),o=i-a,s=Math.round(o),c=o/s;for(let e=0,t=a;e<s;e++,t+=c)r.push(n**+t);return r.push(n**+i),{result:r,niceMin:e,niceMax:t}}_adjustTicksForSmallRange(e,t,n){let r=e;if(t!==void 0&&this.w.config.yaxis[t].labels.formatter&&this.w.config.yaxis[t].tickAmount===void 0){let e=Number(this.w.config.yaxis[t].labels.formatter(1));Z.isNumber(e)&&this.w.globals.yValueDecimal===0&&(r=Math.ceil(n))}return r<e?r:e}setYScaleForIndex(e,t,n){let r=this.w.globals,i=this.w.config,a=r.isBarHorizontal?i.xaxis:i.yaxis[e];r.yAxisScale[e]===void 0&&(r.yAxisScale[e]=[]);let o=Math.abs(n-t);a.logarithmic&&o<=5&&(r.invalidLogScale=!0),a.logarithmic&&o>5?(r.allSeriesCollapsed=!1,r.yAxisScale[e]=a.forceNiceScale?this.logarithmicScaleNice(t,n,a.logBase):this.logarithmicScale(t,n,a.logBase)):n===-Number.MAX_VALUE||!Z.isNumber(n)||t===Number.MAX_VALUE||!Z.isNumber(t)?r.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e):(r.allSeriesCollapsed=!1,r.yAxisScale[e]=this.niceScale(t,n,e))}setXScale(e,t){let n=this.w,r=n.globals;if(t===-Number.MAX_VALUE||!Z.isNumber(t))r.xAxisScale=this.linearScale(0,10,10);else{let i=r.xTickAmount;r.xAxisScale=this.linearScale(e,t,i,0,n.config.xaxis.max===void 0?n.config.xaxis.stepSize:void 0)}return r.xAxisScale}scaleMultipleYAxes(){let e=this.w.config,t=this.w.globals;this.coreUtils.setSeriesYAxisMappings();let n=t.seriesYAxisMap,r=t.minYArr,i=t.maxYArr,a=[],o=!t.isBarHorizontal;if(t.allSeriesCollapsed=!0,t.barGroups=[],n.forEach((n,s)=>{let c=[];if(n.forEach(t=>{let n=e.series[t]?.group;c.indexOf(n)<0&&c.push(n)}),n.length>0){let l=Number.MAX_VALUE,u=-Number.MAX_VALUE,d=l,f=u,p,m;if(e.chart.stacked){let r=Array(t.dataPoints).fill(0),i=[],a=[],o=[];c.forEach(()=>{i.push(r.map(()=>Number.MIN_VALUE)),a.push(r.map(()=>Number.MIN_VALUE)),o.push(r.map(()=>Number.MIN_VALUE))});for(let r=0;r<n.length;r++){!p&&e.series[n[r]].type&&(p=e.series[n[r]].type);let l=n[r];m=e.series[l].group?e.series[l].group:`axis-${s.toString()}`,t.collapsedSeriesIndices.indexOf(l)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(l)<0&&(t.allSeriesCollapsed=!1,c.forEach((t,n)=>{if(e.series[l].group===t)for(let e=0;e<this.w.seriesData.series[l].length;e++){let t=this.w.seriesData.series[l][e];t>=0?a[n][e]+=t:o[n][e]+=t,i[n][e]+=t,d=Math.min(d,t),f=Math.max(f,t)}})),(p===`bar`||p===`column`)&&t.barGroups.push(m)}p||=e.chart.type,p===`bar`||p===`column`?c.forEach((e,t)=>{l=Math.min(l,Math.min.apply(null,o[t])),u=Math.max(u,Math.max.apply(null,a[t]))}):(c.forEach((e,t)=>{d=Math.min(d,Math.min.apply(null,i[t])),f=Math.max(f,Math.max.apply(null,i[t]))}),l=d,u=f),l===Number.MIN_VALUE&&u===Number.MIN_VALUE&&(u=-Number.MAX_VALUE)}else for(let e=0;e<n.length;e++){let a=n[e];l=Math.min(l,r[a]),u=Math.max(u,i[a]),t.collapsedSeriesIndices.indexOf(a)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(a)<0&&(t.allSeriesCollapsed=!1)}e.yaxis[s].min!==void 0&&(l=typeof e.yaxis[s].min==`function`?e.yaxis[s].min(l):e.yaxis[s].min),e.yaxis[s].max!==void 0&&(u=typeof e.yaxis[s].max==`function`?e.yaxis[s].max(u):e.yaxis[s].max),t.barGroups=t.barGroups.filter((e,t,n
62)=>n.indexOf(e)===t);let h=e.yaxis[s];o&&h.alignZero===!0&&!h.logarithmic&&h.min===void 0&&h.max===void 0&&t.ignoreYAxisIndexes.indexOf(s)<0&&Z.isNumber(l)&&Z.isNumber(u)?a.push({ai:s,minY:l,maxY:u}):(this.setYScaleForIndex(s,l,u),n.forEach(e=>{r[e]=t.yAxisScale[s].niceMin,i[e]=t.yAxisScale[s].niceMax}))}else this.setYScaleForIndex(s,0,-Number.MAX_VALUE)}),a.length>=2){a.forEach(e=>{this.setYScaleForIndex(e.ai,e.minY,e.maxY),n[e.ai].forEach(n=>{r[n]=t.yAxisScale[e.ai].niceMin,i[n]=t.yAxisScale[e.ai].niceMax})});let e=0;a.forEach(n=>{let r=t.yAxisScale[n.ai],i=r.niceMax-r.niceMin;if(i>0){let t=-r.niceMin/i;t>e&&(e=t)}}),e>1&&(e=1),e<0&&(e=0);let o=e=>{if(e<=0)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t,r;return r=n<=1+1e-9?1:n<=2+1e-9?2:n<=2.5+1e-9?2.5:n<=5+1e-9?5:10,r*t};a.forEach(a=>{let s=t.yAxisScale[a.ai];if(!s.result||s.result.length<2)return;let c=s.niceMax-s.niceMin;if(c<=0)return;let l=-s.niceMin/c;if(Math.abs(l-e)<=1e-9)return;let u=l<e&&e<1-1e-9,d=!u&&l>e&&e>1e-9;if(!u&&!d)return;let f=u?-e*s.niceMax/(1-e):s.niceMin,p=d?-s.niceMin*(1-e)/e:s.niceMax,m=p-f;if(m<=0)return;let h=Math.max(s.result.length,5),g=o(m/Math.max(h-1,1));if(g<=0)return;let _,v;if(u){_=Math.floor(f/g+1e-9)*g;let t=e>1e-9?_*(e-1)/e:s.niceMax,n=Math.max(t,s.niceMax);v=Math.ceil(n/g-1e-9)*g}else{v=Math.ceil(p/g-1e-9)*g;let t=e<1-1e-9?-e*v/(1-e):s.niceMin,n=Math.min(t,s.niceMin);_=Math.floor(n/g+1e-9)*g}s.result=[];for(let e=_;e<=v+g*1e-9;e=Z.preciseAddition(e,g))s.result.push(Z.stripNumber(e,7));s.niceMin=_,s.niceMax=v,n[a.ai].forEach(e=>{r[e]=s.niceMin,i[e]=s.niceMax})})}else if(a.length===1){let e=a[0];this.setYScaleForIndex(e.ai,e.minY,e.maxY),n[e.ai].forEach(n=>{r[n]=t.yAxisScale[e.ai].niceMin,i[n]=t.yAxisScale[e.ai].niceMax})}}},ny=class{constructor(e){this.w=e,this.scales=new ty(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(e,t=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=null){let i=this.w.config,a=this.w.globals,o=-Number.MAX_VALUE,s=Number.MIN_VALUE;r===null&&(r=e+1);let c=this.w.seriesData.series,l=c,u=c;i.chart.type===`candlestick`?(l=this.w.candleData.seriesCandleL,u=this.w.candleData.seriesCandleH):i.chart.type===`boxPlot`?(l=this.w.candleData.seriesCandleO,u=this.w.candleData.seriesCandleC):i.chart.type===`violin`?(l=this.w.violinData.seriesViolinMin,u=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(l=this.w.rangeData.seriesRangeStart,u=this.w.rangeData.seriesRangeEnd);let d=!1;if(this.w.seriesData.seriesX.length>=r){let e=a.brushSource?.w.config.chart.brush;(i.chart.zoom.enabled&&i.chart.zoom.autoScaleYaxis||e?.enabled&&e?.autoScaleYaxis)&&(d=!0)}for(let f=e;f<r;f++){a.dataPoints=Math.max(a.dataPoints,c[f].length);let e=i.series[f].type;this.w.labelData.categoryLabels.length&&(a.dataPoints=this.w.labelData.categoryLabels.filter(e=>e!==void 0).length),this.w.labelData.labels.length&&i.xaxis.type!==`datetime`&&this.w.seriesData.series.reduce((e,t)=>e+t.length,0)!==0&&(a.dataPoints=Math.max(a.dataPoints,this.w.labelData.labels.length));let r=0,p=c[f].length-1;if(d){if(i.xaxis.min)for(;r<p&&this.w.seriesData.seriesX[f][r]<i.xaxis.min;r++);if(i.xaxis.max)for(;p>r&&this.w.seriesData.seriesX[f][p]>i.xaxis.max;p--);}for(let i=r;i<=p&&i<this.w.seriesData.series[f].length;i++){let r=c[f][i];if(r!==null&&Z.isNumber(r)){switch(u[f]?.[i]!==void 0&&(o=Math.max(o,u[f][i]),t=Math.min(t,u[f][i])),l[f]?.[i]!==void 0&&(t=Math.min(t,l[f][i]),n=Math.max(n,l[f][i])),e){case`candlestick`:this.w.candleData.seriesCandleC[f][i]!==void 0&&(o=Math.max(o,this.w.candleData.seriesCandleH[f][i]),t=Math.min(t,this.w.candleData.seriesCandleL[f][i]));break;case`boxPlot`:this.w.candleData.seriesCandleC[f][i]!==void 0&&(o=Math.max(o,this.w.candleData.seriesCandleC[f][i]),t=Math.min(t,this.w.candleData.seriesCandleO[f][i]));break;case`violin`:this.w.violinData.seriesViolinMax[f]?.[i]!==void 0&&(o=Math.max(o,this.w.violinData.seriesViolinMax[f][i]),t=Math.min(t,this.w.violinData.seriesViolinMin[f][i]))}if(e&&e!==`candlestick`&&e!==`boxPlot`&&e!==`violin`&&e!==`rangeArea`&&e!==`rangeBar`&&(o=Math.max(o,this.w.seriesData.series[f][i]),t=Math.min(t,this.w.seriesData.series[f][i])),this.w.seriesData.seriesGoals[f]&&this.w.seriesData.seriesGoals[f][i]&&Array.isArray(this.w.seriesData.seriesGoals[f][i])&&this.w.seriesData.seriesGoals[f][i].forEac
62h(e=>{o=Math.max(o,e.value),t=Math.min(t,e.value)}),this.w.config.chart.type===`boxPlot`||e===`boxPlot`){let e=this.w.candleData.seriesBoxPoints?.[f]?.[i];if(e)for(let n=0;n<e.length;n++){let r=e[n];typeof r==`number`&&(o=Math.max(o,r),t=Math.min(t,r))}}n=o,r=Z.noExponents(r),Z.isFloat(r)&&(a.yValueDecimal=Math.max(a.yValueDecimal,r.toString().split(`.`)[1].length)),s>l[f]?.[i]&&l[f]?.[i]<0&&(s=l[f][i])}else a.hasNullValues=!0}(e===`bar`||e===`column`)&&(s<0&&o<0&&(o=0,n=Math.max(n,0)),s===Number.MIN_VALUE&&(s=0,t=Math.min(t,0)))}return i.chart.type===`rangeBar`&&this.w.rangeData.seriesRangeStart.length&&a.isBarHorizontal&&(s=t),i.chart.type===`bar`&&(s<0&&o<0&&(o=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:o,lowestY:t,highestY:n}}setYRange(){let e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;let n=Number.MAX_VALUE,r;if(e.isMultipleYAxis){n=Number.MAX_VALUE;for(let t=0;t<this.w.seriesData.series.length;t++)r=this.getMinYMaxY(t),e.minYArr[t]=r.lowestY,e.maxYArr[t]=r.highestY,n=Math.min(n,r.lowestY)}return r=this.getMinYMaxY(0,n,void 0,this.w.seriesData.series.length),t.chart.type===`bar`?(e.minY=r.minY,e.maxY=r.maxY):(e.minY=r.lowestY,e.maxY=r.highestY),n=r.lowestY,t.chart.stacked&&this._setStackedMinMax(),t.chart.type===`line`||t.chart.type===`area`||t.chart.type===`scatter`||t.chart.type===`candlestick`||t.chart.type===`boxPlot`||t.chart.type===`violin`||t.chart.type===`rangeBar`&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&n!==-Number.MAX_VALUE&&n!==e.maxY&&(e.minY=n):e.minY=e.minY===Number.MIN_VALUE?r.minY:Math.min(r.minY,e.minY),t.yaxis.forEach((t,n)=>{t.max!==void 0&&(typeof t.max==`number`?e.maxYArr[n]=t.max:typeof t.max==`function`&&(e.maxYArr[n]=t.max(e.isMultipleYAxis?e.maxYArr[n]:e.maxY)),e.maxY=e.maxYArr[n]),t.min!==void 0&&(typeof t.min==`number`?e.minYArr[n]=t.min:typeof t.min==`function`&&(e.minYArr[n]=t.min(e.isMultipleYAxis?e.minYArr[n]===Number.MIN_VALUE?0:e.minYArr[n]:e.minY)),e.minY=e.minYArr[n])}),e.isBarHorizontal&&[`min`,`max`].forEach(n=>{t.xaxis[n]!==void 0&&typeof t.xaxis[n]==`number`&&(n===`min`?e.minY=t.xaxis[n]:e.maxY=t.xaxis[n])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=n):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],t.series.forEach(n=>{let r=n;switch(r.type||t.chart.type){case`bar`:case`column`:e.barGroups.push(r.group);break;case`line`:e.lineGroups.push(r.group);break;case`area`:e.areaGroups.push(r.group)}}),e.barGroups=e.barGroups.filter((e,t,n)=>n.indexOf(e)===t),e.lineGroups=e.lineGroups.filter((e,t,n)=>n.indexOf(e)===t),e.areaGroups=e.areaGroups.filter((e,t,n)=>n.indexOf(e)===t),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}setXRange(){let e=this.w.globals,t=this.w.config,n=t.xaxis.type===`numeric`||t.xaxis.type===`datetime`||t.xaxis.type===`category`&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric;if(this.w.axisFlags.isXNumeric&&(()=>{for(let t=0;t<this.w.seriesData.series.length;t++)if(this.w.labelData.labels[t])for(let n=0;n<this.w.labelData.labels[t].length;n++)this.w.labelData.labels[t][n]!==null&&Z.isNumber(this.w.labelData.labels[t][n])&&(e.maxX=Math.max(e.maxX,this.w.labelData.labels[t][n]),e.initialMaxX=Math.max(e.maxX,this.w.labelData.labels[t][n]),e.minX=Math.min(e.minX,this.w.labelData.labels[t][n]),e.initialMinX=Math.min(e.minX,this.w.labelData.labels[t][n]))})(),this.w.axisFlags.noLabelsProvided&&t.xaxis.categories.length===0&&(e.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],e.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],e.minX=1,e.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let r=10;if(t.xaxis.tickAmount===void 0)r=Math.round(e.svgWidth/150),t.xaxis.type===`numeric`&&e.dataPoints<30&&(r=e.dataPoints-1),r>e.dataPoints&&e.dataPoints!==0&&(r=e.dataPoints-1);else if(t.xaxis.tickAmount===`dataPoints`){if(this.w.seriesData.series.length>1&&(r=this.w.seriesData.series[e.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){let t=Math.round(e.maxX-e.minX);t<30&&(r=t)}}else r=t.xaxis.tickAmount;if(e.xTickAmount=r,t.xaxis.max!==void 0&&typeof t.xaxis.max==`number`&&(e.maxX=t.xaxis.max),t.xaxis.min!==void 0&&typeof t.xaxis.min==`number`&&(e.minX=t.xaxis.min),t.xaxis.range!==void 0&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE){if(t.xa
62xis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){let t=[];for(let n=e.minX-1;n<e.maxX;n++)t.push(n+1);e.xAxisScale={result:t,niceMin:t[0],niceMax:t[t.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX)}else e.xAxisScale=this.scales.linearScale(0,r,r,0,t.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,r-1,0,t.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());n&&(this.w.labelData.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&this.w.labelData.labels.length&&(e.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}setZRange(){let e=this.w.globals;if(this.w.axisFlags.isDataXYZ){for(let t=0;t<this.w.seriesData.series.length;t++)if(this.w.seriesData.seriesZ[t]!==void 0)for(let n=0;n<this.w.seriesData.seriesZ[t].length;n++)this.w.seriesData.seriesZ[t][n]!==null&&Z.isNumber(this.w.seriesData.seriesZ[t][n])&&(e.maxZ=Math.max(e.maxZ,this.w.seriesData.seriesZ[t][n]),e.minZ=Math.min(e.minZ,this.w.seriesData.seriesZ[t][n]))}}_handleSingleDataPoint(){let e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){let n=new bv(this.w);if(t.xaxis.type===`datetime`){let r=n.getDate(e.minX);t.xaxis.labels.datetimeUTC?r.setUTCDate(r.getUTCDate()-2):r.setDate(r.getDate()-2),e.minX=new Date(r).getTime();let i=n.getDate(e.maxX);t.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()+2):i.setDate(i.getDate()+2),e.maxX=new Date(i).getTime()}else(t.xaxis.type===`numeric`||t.xaxis.type===`category`&&!this.w.axisFlags.noLabelsProvided)&&(e.minX-=2,e.initialMinX=e.minX,e.maxX+=2,e.initialMaxX=e.maxX)}}_getMinXDiff(){let e=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach(t=>{if(t.length){t.length===1&&t.push(this.w.seriesData.seriesX[e.maxValsInArrayIndex][this.w.seriesData.seriesX[e.maxValsInArrayIndex].length-1]);let n=t.slice();n.sort((e,t)=>e-t),n.forEach((t,r)=>{if(r>0){let i=t-n[r-1];i>0&&(e.minXDiff=Math.min(i,e.minXDiff))}}),(e.dataPoints===1||e.minXDiff===Number.MAX_VALUE)&&(e.minXDiff=.5)}})}_setStackedMinMax(){let e=this.w.globals;if(!this.w.seriesData.series.length)return;let t=this.w.labelData.seriesGroups;t.length||(t=[this.w.seriesData.seriesNames.map(e=>e)]);let n={},r={};t.forEach(t=>{n[t]=[],r[t]=[],this.w.config.series.map((e,n)=>t.indexOf(this.w.seriesData.seriesNames[n])>-1?n:null).filter(e=>e!==null).forEach(i=>{for(let a=0;a<this.w.seriesData.series[e.maxValsInArrayIndex].length;a++)n[t][a]===void 0&&(n[t][a]=0,r[t][a]=0),(this.w.config.chart.stacked&&!e.comboCharts||this.w.config.chart.stacked&&e.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series?.[i]?.type===`bar`||this.w.config.series?.[i]?.type===`column`))&&this.w.seriesData.series[i][a]!==null&&Z.isNumber(this.w.seriesData.series[i][a])&&(this.w.seriesData.series[i][a]>0?n[t][a]+=parseFloat(String(this.w.seriesData.series[i][a]))+1e-4:r[t][a]+=parseFloat(String(this.w.seriesData.series[i][a])))})}),Object.entries(n).forEach(([t])=>{n[t].forEach((i,a)=>{e.maxY=Math.max(e.maxY,n[t][a]),e.minY=Math.min(e.minY,r[t][a])})})}};function ry(){return{palette1:[`#008FFB`,`#00A86F`,`#CA8501`,`#FF4560`,`#846DD5`],palette2:[`#6978CB`,`#039DE2`,`#49A84D`,`#B39105`,`#D68000`],palette3:[`#209FCC`,`#648291`,`#D4526E`,`#0FA783`,`#A19285`],palette4:[`#2FA59D`,`#73A20B`,`#099DE1`,`#FD5D5D`,`#648291`],palette5:[`#2B908F`,`#F56566`,`#2EAB16`,`#FA4443`,`#1EA2BD`],palette6:[`#449DD1`,`#F86624`,`#EA3A4A`,`#9C63D1`,`#899E2A`],palette7:[`#DF475B`,`#1B998B`,`#7E75B7`,`#F46036`,`#B1911B`],palette8:[`#9C63D1`,`#F86624`,`#B38F04`,`#EA3A4A`,`#2FA2B3`],palette9:[`#98776F`,`#A19285`,`#A8705E`,`#BA6560`,`#A0927F`],palette10:[`#C91EFF`,`#A94BFD`,`#6C6AFE`,`#2983FF`,`#009ED8`],cvdDeuteranopia:[`#0072B2`,`#E69F00`,`#56B4E9`,`#009E73`,`#F0E442`,`#D55E00`,`#CC79A7`],cvdProtanopia:[`#0077BB`,`#EE7733`,`#009988`,`#EE3377`,`#BBBBBB`,`#33BBEE`,`#CC3311`],cvdTritanopia:[`#CC3311`,`#009988`,`#EE7733`,`#0077BB`,`#EE3377`,`#BBBBBB`,`#33BBEE`],highContrast:[`#005A9C`,`#C00000`,`#007A33`,`#6C3483`,`#7B3F00`,`#0097A7`,`#4A235A`]}}var iy=class{constructor(e,{theme:t=null,timeScale:n=null}={},r){this.w=e,this.elgrid=r,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.axisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=e.config.chart.type===`bar`&&e.config.plotOptions.bar.horizontal,this.xAxisoffX=e.config.xaxis.position===`bottom`?e.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Qv(e,{theme:t,timeScale:n})}drawYaxis(e){let t=this.w,n=new Q(this.w),r=t.config.yaxis[e].labels.style,{fontSize:i,fontFamily:a,fontWeight:o}=r,s=n.group({class:`apexcharts-yaxis`,rel:e,transform:`translate(${t.globals.translateYAxisX[e]}, 0)`});if(this.axesUtils.isYAxisHidden(e))return s;let c=n.group({class:`apexcharts-yaxis-texts-g`});s.add(c);let l=t.globals.yAxisScale[e].result.length-1,u=t.layout.gridHeight/l,d=t.formatters.yLabelFormatters[e],f=this.axesUtils.checkForRever
62sedLabels(e,t.globals.yAxisScale[e].result.slice());if(t.config.yaxis[e].labels.show){let s=t.layout.translateY+t.config.yaxis[e].labels.offsetY;t.globals.isBarHorizontal?s=0:t.config.chart.type===`heatmap`&&(s-=u/2),s+=parseInt(i,10)/3;let p=null;for(let m=l;m>=0;m--){let l=d(f[m],m,t),h=t.config.yaxis[e].labels.padding;t.config.yaxis[e].opposite&&t.config.yaxis.length!==0&&(h*=-1);let g=this.getTextAnchor(t.config.yaxis[e].labels.align,t.config.yaxis[e].opposite),_=this.axesUtils.getYAxisForeColor(r.colors,e),v=Array.isArray(_)?_[m]:_,y=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-label tspan`)).map(e=>e.textContent),b=n.drawText({x:h,y:s,text:y.includes(l)&&!t.config.yaxis[e].labels.showDuplicates?``:l,textAnchor:g,fontSize:i,fontFamily:a,fontWeight:o,maxWidth:t.config.yaxis[e].labels.maxWidth,foreColor:v,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${r.cssClass}`});c.add(b),this.addTooltip(b,l),p===null&&(p=b),t.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(n,b,p,t.config.yaxis[e].labels.rotate),s+=u}}return this.addYAxisTitle(n,s,e),this.addAxisBorder(n,s,e,l,u),s}getTextAnchor(e,t){return e===`left`?`start`:e===`center`?`middle`:e===`right`?`end`:t?`start`:`end`}addTooltip(e,t){let n=X.createElementNS($,`title`);n.textContent=Array.isArray(t)?t.join(` `):t,e.node.appendChild(n)}rotateLabel(e,t,n,r){let i=e.rotateAroundCenter(n.node),a=e.rotateAroundCenter(t.node);t.node.setAttribute(`transform`,`rotate(${r} ${i.x} ${a.y})`)}addYAxisTitle(e,t,n){let r=this.w;if(r.config.yaxis[n].title.text!==void 0){let i=e.group({class:`apexcharts-yaxis-title`}),a=r.config.yaxis[n].opposite?r.globals.translateYAxisX[n]:0,o=e.drawText({x:a,y:r.layout.gridHeight/2+r.layout.translateY+r.config.yaxis[n].title.offsetY,text:r.config.yaxis[n].title.text,textAnchor:`end`,foreColor:r.config.yaxis[n].title.style.color,fontSize:r.config.yaxis[n].title.style.fontSize,fontWeight:r.config.yaxis[n].title.style.fontWeight,fontFamily:r.config.yaxis[n].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${r.config.yaxis[n].title.style.cssClass}`});i.add(o),t.add(i)}}addAxisBorder(e,t,n,r,i){let a=this.w,o=a.config.yaxis[n].axisBorder,s=31+o.offsetX;if(a.config.yaxis[n].opposite&&(s=-31-o.offsetX),o.show){let n=e.drawLine(s,a.layout.translateY+o.offsetY-2,s,a.layout.gridHeight+a.layout.translateY+o.offsetY+2,o.color,0,o.width);t.add(n)}a.config.yaxis[n].axisTicks.show&&this.axesUtils.drawYAxisTicks(s,r,o,a.config.yaxis[n].axisTicks,n,i,t)}drawYaxisInversed(e){let t=this.w,n=new Q(this.w),r=n.group({class:`apexcharts-xaxis apexcharts-yaxis-inversed`}),i=n.group({class:`apexcharts-xaxis-texts-g`,transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});r.add(i);let a=t.globals.yAxisScale[e].result.length-1,o=t.layout.gridWidth/a+.1,s=o+t.config.xaxis.labels.offsetX,c=t.formatters.xLabelFormatter,l=this.axesUtils.checkForReversedLabels(e,t.globals.yAxisScale[e].result.slice()),u=t.labelData.timescaleLabels;if(u.length>0&&(this.xaxisLabels=u.slice(),l=u.slice(),a=l.length),t.config.xaxis.labels.show)for(let r=u.length?0:a;u.length?r<u.length:r>=0;u.length?r++:r--){let a=c?.(l[r],r,t),d=t.layout.gridWidth+t.globals.padHorizontal-(s-o+t.config.xaxis.labels.offsetX);if(u.length){let e=this.axesUtils.getLabel(l,u,d,r,this.drawnLabels,this.xaxisFontSize);d=e.x,a=e.text,this.drawnLabels.push(e.text),r===0&&t.globals.skipFirstTimelinelabel&&(a=``),r===l.length-1&&t.globals.skipLastTimelinelabel&&(a=``)}let f=n.drawText({x:d,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-(t.config.xaxis.position===`top`?t.layout.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:a,textAnchor:`middle`,foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${t.config.xaxis.labels.style.cssClass}`});i.add(f),this.addTooltip(f,a),s+=o}return this.inversedYAxisTitleText(r),this.inversedYAxisBorder(r),r}inversedYAxisBorder(e){let t=this.w,n=new Q(this.w),r=t.config.xaxis.axisBorder;if(r.show){let i=0;t.config.chart.type===`bar`&&t.axisFlags.isXNumeric&&(i-=15);let a=n.drawLine(t.globals.padHorizontal+i+r.offsetX,this.xAxisoffX,t.layout.gridWidth,this.xAxisoffX,r.color,0,r.height);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(a):e.add(a)}}inversedYAxisTitleText(e){let t=this.w,n=new Q(this.w);if(t.config.xaxis.title.text!==void 0){let r=n.group({class:`apexcharts-xaxis-title apexcharts-yaxis-title-inversed`}),i=n.drawText({x:t.layout.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(i),e.add(r)}}yAxisTitleRotate(e,t){let n=this.w,r=new Q(this.w),i=n.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),a=i?i.getBoundingClientRect():{width:0,height:0},o=n.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-title text`),s=o?o.getBoundingClientRect():{width:0,height:0};if(o){let i=this.xPaddingForYAxisTitle(e,a,s,t);o.setAttribute(`x`,String(i.xPos-(t?10:0)));
62let c=r.rotateAroundCenter(o);o.setAttribute(`transform`,`rotate(${t?n.config.yaxis[e].title.rotate*-1:n.config.yaxis[e].title.rotate} ${c.x} ${c.y})`)}}xPaddingForYAxisTitle(e,t,n,r){let i=this.w,a=0,o=10;return i.config.yaxis[e].title.text===void 0||e<0?{xPos:a,padd:0}:(r?a=t.width+i.config.yaxis[e].title.offsetX+n.width/2+o/2:(a=t.width*-1+i.config.yaxis[e].title.offsetX+o/2+n.width/2,i.globals.isBarHorizontal&&(o=25,a=t.width*-1-i.config.yaxis[e].title.offsetX-o)),{xPos:a,padd:o})}setYAxisXPosition(e,t){let n=this.w,r=0,i=0,a=18,o=1;n.config.yaxis.length>1&&(this.multipleYs=!0),n.config.yaxis.forEach((s,c)=>{let l=n.globals.ignoreYAxisIndexes.includes(c)||!s.show||s.floating||e[c].width===0,u=e[c].width+t[c].width;s.opposite?n.globals.isBarHorizontal?(i=n.layout.gridWidth+n.layout.translateX-1,n.globals.translateYAxisX[c]=i-s.labels.offsetX):(i=n.layout.gridWidth+n.layout.translateX+o,l||(o+=u+20),n.globals.translateYAxisX[c]=i-s.labels.offsetX+20):(r=n.layout.translateX-a,l||(a+=u+20),n.globals.translateYAxisX[c]=r+s.labels.offsetX)})}setYAxisTextAlignments(){let e=this.w;Array.from(e.dom.baseEl.getElementsByClassName(`apexcharts-yaxis`)).forEach((t,n)=>{let r=e.config.yaxis[n];if(r&&!r.floating&&r.labels.align!==void 0){let t=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${n}'] .apexcharts-yaxis-texts-g`),i=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${n}'] .apexcharts-yaxis-label`)),a=t.getBoundingClientRect();i.forEach(e=>{e.setAttribute(`text-anchor`,r.labels.align)}),r.labels.align===`left`&&!r.opposite?t.setAttribute(`transform`,`translate(-${a.width}, 0)`):r.labels.align===`center`?t.setAttribute(`transform`,`translate(${a.width/2*(r.opposite?1:-1)}, 0)`):r.labels.align===`right`&&r.opposite&&t.setAttribute(`transform`,`translate(${a.width}, 0)`)}})}},ay=class{constructor(e,t){this.w=e,this.ctx=t,this.documentEvent=this.documentEvent.bind(this)}addEventListener(e,t){let n=this.w;Object.prototype.hasOwnProperty.call(n.globals.events,e)?n.globals.events[e].push(t):n.globals.events[e]=[t]}removeEventListener(e,t){let n=this.w;if(!Object.prototype.hasOwnProperty.call(n.globals.events,e))return;let r=n.globals.events[e].indexOf(t);r!==-1&&n.globals.events[e].splice(r,1)}fireEvent(e,t){let n=this.w;if(!Object.prototype.hasOwnProperty.call(n.globals.events,e))return;(!t||!t.length)&&(t=[]);let r=n.globals.events[e],i=r.length;for(let e=0;e<i;e++)r[e].apply(null,t)}setupEventHandlers(){let e=this.w,t=this.ctx,n=e.dom.baseEl.querySelector(e.globals.chartClass);this.ctx.eventList.forEach(r=>{n?.addEventListener(r,n=>{let r=n.target.getAttribute(`i`)===null&&e.interact.capturedSeriesIndex!==-1?e.interact.capturedSeriesIndex:n.target.getAttribute(`i`),i=n.target.getAttribute(`j`)===null&&e.interact.capturedDataPointIndex!==-1?e.interact.capturedDataPointIndex:n.target.getAttribute(`j`),a=Object.assign({},e,{seriesIndex:e.globals.axisCharts?r:0,dataPointIndex:i});n.type===`keydown`?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(t.ctx.keyboardNavigation&&t.ctx.keyboardNavigation.handleKey(n),typeof e.config.chart.events.keyDown==`function`&&e.config.chart.events.keyDown(n,t,a),t.ctx.events.fireEvent(`keydown`,[n,t,a])):n.type===`keyup`?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(typeof e.config.chart.events.keyUp==`function`&&e.config.chart.events.keyUp(n,t,a),t.ctx.events.fireEvent(`keyup`,[n,t,a])):n.type===`mousemove`||n.type===`touchmove`?typeof e.config.chart.events.mouseMove==`function`&&e.config.chart.events.mouseMove(n,t,a):n.type===`mouseleave`||n.type===`touchleave`?typeof e.config.chart.events.mouseLeave==`function`&&e.config.chart.events.mouseLeave(n,t,a):(n.type===`mouseup`&&n.which===1||n.type===`touchend`)&&(typeof e.config.chart.events.click==`function`&&e.config.chart.events.click(n,t,a),t.ctx.events.fireEvent(`click`,[n,t,a]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(t=>{e.dom.baseEl.addEventListener(t,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(e){let t=this.w,n=e.target.className;if(e.type===`click`){let e=t.dom.baseEl.querySelector(`.apexcharts-menu`);e&&e.classList.contains(`apexcharts-menu-open`)&&n!==`apexcharts-menu-icon`&&e.classList.remove(`apexcharts-menu-open`)}t.interact.clientX=e.type===`touchmove`?e.touches[0].clientX:e.clientX,t.interact.clientY=e.type===`touchmove`?e.touches[0].clientY:e.clientY}},oy=class{constructor(e){this.w=e}setCurrentLocaleValues(e){let t=this.w.config.chart.locales,n=Y.getApex();n.chart&&n.chart.locales&&n.chart.locales.length>0&&(t=this.w.config.chart.locales.concat(n.chart.locales));let r=t.filter(t=>t.name===e)[0];if(r){let e=Z.extend(Tv,r);this.w.globals.locale=e.options}else throw Error(`Wrong locale name provided. Please make sure you set the correct locale name in options`)}},sy=class{constructor(e,t){this.w=e,this.ctx=t}drawAxis(e,t){let n=this.w.globals,r=this.w.config,i=new $v(this.w,this.ctx,t),a=new iy(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},t);if(n.axisCharts&&e!==`radar`){let e,t;n.isBarHorizontal?(t=a.drawYaxisInversed(0),e=i.drawXaxisInversed(0),this.w.dom.elGraphical.add(e),this.w.dom.elGraphical.add(t)):(e=i.drawXaxis(),this.w.dom.elGraphical.add(e),r.yaxis.map((e,r)=>{if(n.ignoreYAxisIndexes.indexOf(r)===-1&&(t=a.drawYaxis(r),this.w.dom.Paper.add(t),this.w.config.grid.position===`back`)){let e=this.w.dom.Paper.children()[1];e&&(e.remove(),this.w.dom.Paper.add(e))}}))}}},cy=class{constructor(e){this.w=e}drawXCrosshairs(){let e=this.w,t=new Q(this.w),n=new Uv(this.w),r=e.config.xaxis.crosshairs.fill.gradient,i=e.config.xaxis.crosshairs.dropShadow,a=e.config.xaxis.crosshairs.fill.type,o=r.colorFrom,s=r.colorTo,c=r.opacityFrom,l=r.opacityTo,u=r.stops,d=i.enabled,f=i.left,p=i.top,m=i.blur,h=i.color,g=i.opacity,_=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){a===`gradient`&&(_=t.drawGradient(`vertical`,o,s,c,l,null,u,[]));let r=t.drawRect();e.config.xaxis.crosshairs.width===1&&(r=t.drawLine(0,0,0,0));let i=e.layout.gridHeight;(!Z.isNumber(i)||i<0)&&(i=0);let v=e.config.xaxis.crosshairs.width;(!Z.isNumber(v)||Number(v)<0)&&(v=0),r.attr({class:`apexcharts-xcrosshairs`,x:0,y:0,y2:i,width:v,height:i,fill:_,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&&(r=n.dropShadow(r,{left:f,top:p,blur:m,color:h,opacity:g})),e.dom.elGraphical.add(r)}}drawYCrosshairs(){let e=this.w,t=new Q(this.w),n=e.config.yaxis[0].crosshairs,r=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){let i=t.drawLine(-r,0,e.layout.gridWidth+r,0,n.stroke.color,n.stroke.dashArray,n.stroke.width);i.attr({class:`apexcharts-ycrosshairs`}),e.dom.elGraphical.add(i)}let i=t.drawLine(-r,0,e.layout.gridWidth+r,0,n.stroke.color,0,0);i.attr({class:`apexcharts-ycrosshairs-hidden`}),e.dom.elGraphical.add(i)}};function ly(e,t){if(!Z.isObject(e)||!Z.isObject(t))return t===void 0?e:t;let n=K({},e);for(let r of Object.keys(t)){let i=t[r];
62i!==void 0&&(n[r]=Z.isObject(i)&&Z.isObject(e[r])?ly(e[r],i):i)}return n}var uy=class{constructor(e){this.w=e,this._activeBreakpoint=null}checkResponsiveConfig(e){let t=this.w,n=t.config;if(n.responsive.length===0)return;let r=n.responsive.slice();r.sort((e,t)=>e.breakpoint>t.breakpoint?1:t.breakpoint>e.breakpoint?-1:0).reverse();let i=new Dv({}),a=(e={})=>{let n=r[0].breakpoint,a=Y.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(a>n){if(this._activeBreakpoint!==null){if(!t.globals.initialConfig)return;let n=Z.clone(t.globals.initialConfig);n.series=Z.clone(t.config.series);let r=Nv.extendArrayProps(i,n,t);e=Z.extend(r,e),this.overrideResponsiveOptions(e),this._activeBreakpoint=null}}else for(let n=0;n<r.length;n++)if(a<r[n].breakpoint){let a=r[n].options?.yaxis?Z.clone(r[n].options.yaxis):null;if(e=Nv.extendArrayProps(i,r[n].options,t),e=Z.extend(t.config,e),Array.isArray(t.config.yaxis)&&a){let n=Array.isArray(a)?a:[a];e=q(K({},e),{yaxis:t.config.yaxis.map((e,t)=>ly(e,n[t]))})}this.overrideResponsiveOptions(e),this._activeBreakpoint=r[n].breakpoint}};if(e){let n=Nv.extendArrayProps(i,e,t);n=Z.extend(t.config,n),n=Z.extend(n,e),a(n)}else a({})}overrideResponsiveOptions(e){let t=new Dv(e).init({responsiveOverride:!0});this.w.config=t}},dy=class e{constructor(e,{toggleDataSeries:t=void 0,revertDefaultAxisMinMax:n=void 0,updateSeries:r=void 0}={}){this.w=e,this._toggleDataSeries=t||null,this._revertDefaultAxisMinMax=n||null,this._updateSeries=r||null,this.legendInactiveClass=`legend-mouseover-inactive`}clearSeriesCache(){let e=this.w;e.globals.cachedSelectors&&(delete e.globals.cachedSelectors.allSeriesEls,delete e.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){let e=this.w,t=`allSeriesEls`;return e.globals.cachedSelectors[t]||(e.globals.cachedSelectors[t]=e.dom.baseEl.getElementsByClassName(`apexcharts-series`)),e.globals.cachedSelectors[t]}getSeriesByName(e){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${Z.escapeString(e)}']`)}isSeriesHidden(e){let t=this.getSeriesByName(e),n=parseInt(t.getAttribute(`data:realIndex`)??`0`,10);return{isHidden:t.classList.contains(`apexcharts-series-collapsed`),realIndex:n}}addCollapsedClassToSeries(t,n){e.addCollapsedClassToSeries(this.w,t,n)}static addCollapsedClassToSeries(e,t,n){function r(e){for(let r=0;r<e.length;r++)e[r].index===n&&t.node.classList.add(`apexcharts-series-collapsed`)}r(e.globals.collapsedSeries),r(e.globals.ancillaryCollapsedSeries)}toggleSeries(e){var t;let n=this.isSeriesHidden(e);return(t=this._toggleDataSeries)==null||t.call(this,n.realIndex,n.isHidden),n.isHidden}showSeries(e){var t;let n=this.isSeriesHidden(e);n.isHidden&&((t=this._toggleDataSeries)==null||t.call(this,n.realIndex,!0))}hideSeries(e){var t;let n=this.isSeriesHidden(e);n.isHidden||(t=this._toggleDataSeries)==null||t.call(this,n.realIndex,!1)}resetSeries(e=!0,t=!0,n=!0){var r,i;let a=this.w;this.clearSeriesCache();let o=Z.clone(a.globals.initialSeries);a.globals.previousPaths=[],n?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),a.config.series=o,e&&(t&&(a.interact.zoomed=!1,(r=this._revertDefaultAxisMinMax)==null||r.call(this)),(i=this._updateSeries)==null||i.call(this,o,a.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(e){let t=this.w;for(let n=0;n<e.length;n++)t.globals.collapsedSeriesIndices.indexOf(n)>-1&&(e[n].data=[]);return e}highlightSeries(e){let t=this.w,n=this.getSeriesByName(e),r=parseInt(n?.getAttribute(`data:realIndex`)??``,10),i=`highlightSeriesEls`,a=t.globals.cachedSelectors[i];a||(a=t.dom.baseEl.querySelectorAll(`.apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis`),t.globals.cachedSelectors[i]=a);let o=null,s=null,c=null;if(t.globals.axisCharts||t.config.chart.type===`radialBar`){if(t.globals.axisCharts){o=t.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${r}']`),s=t.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${r}']`);let e=t.globals.seriesYAxisReverseMap[r];c=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}']`)}else o=t.dom.baseEl.querySelector(`.apexcharts-series[rel='${r+1}']`)}else o=t.dom.baseEl.querySelector(`.apexcharts-series[rel='${r+1}'] path`);for(let e=0;e<a.length;e++)a[e].classList.add(this.legendInactiveClass);if(o)t.globals.axisCharts||o.parentNode?.classList.remove(this.legendInactiveClass),o.classList.remove(this.legendInactiveClass),s!==null&&s.classList.remove(this.legendInactiveClass),c!==null&&c.classList.remove(this.legendInactiveClass);else for(let e=0;e<a.length;e++)a[e].classList.remove(this.legendInactiveClass)}toggleSeriesOnHover(e,t){let n=this.w;t||=e.target;let r=n.dom.baseEl.querySelectorAll(`.apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis`);if(e.type===`mousemove`){let e=parseInt(t.getAttribute(`rel`),10)-1;this.highlightSeries(n.seriesData.seriesNames[e])}else if(e.type===`mouseout`)for(let e=0;e<r.length;e++)r[e].classList.remove(this.legendInactiveClass)}highlightRangeInSeries(e,t){let n=this.w,r=n.dom.baseEl.getElementsByClassName(`apexcharts-heatmap-rect`),i=e=>{for(let t=0;t<r.length;t++){let n=r[t].classList;typeof n[e]==`function`&&n[e](this.legendInactiveClass)}};if(t===`reset`){i(`remove`);return}let a=n.config.plotOptions.heatmap.colorScale.ranges,o=a&&a[e];if(o){i(`add`);for(let e=0;e<r.length;e++){let t=Number(r[e].getAttribute(`val`));t>=o.from&&t<=o.to&&r[e].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(e=`asc`,t=[]){let n=this.w,r=0;if(n.config.series.length>1){let i=n.config.series.map((e,r)=>e.data&&e.data.length>0&&n.globals.collapsedSeriesIndices.indexOf(r)===-1&&(!n.globals.comboCharts||t.length===0||t.length&&t.indexOf(n.config.series[r].type)>-1)?r:-1);for(let t=e===`asc`?0:i.length-1;e===`asc`?t<i.length:t>=0;e===`asc`?t++:t--)if(i[t]!==-1){r=i[t];break}}return r}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((e,t)=>e.type===`bar`||e.type===`column`?t:-1).filter(e=>e!==-1):this.w.config.series.map((e,t)=>t)}getPreviousPaths(){let e=this.w;if(!e.globals.axisCharts){e.globals.previousPaths=e.seriesData.series;return}e.globals.previousPaths=[];function t(t,n,r){let i=t[n].childNodes,a={type:r,paths:[],realIndex:t[n].getAttribute(`data:realIndex`)};for(let e=0;e<i.length;e++)if(i[e].hasAttribute(`pathTo`)){let t=i[e].getAttribute(`pathTo`);a.paths.push({d:t})}e.globals.previousPaths.push(a)}let n=t=>e.dom.baseEl.querySelectorAll(`.apexcharts-${t}-series .apexcharts-series`);[`line`,`area`,`bar`,`rangebar`,`rangeArea`,`candlestick`,`radar`].forEach(e
62=>{let r=n(e);for(let n=0;n<r.length;n++)t(r,n,e)});let r=e.dom.baseEl.querySelectorAll(`.apexcharts-${e.config.chart.type} .apexcharts-series`);if(r.length>0)for(let t=0;t<r.length;t++){let n=e.dom.baseEl.querySelectorAll(`.apexcharts-${e.config.chart.type} .apexcharts-series[data\\:realIndex='${t}'] rect`),r=[];for(let e=0;e<n.length;e++){let t=t=>n[e].getAttribute(t),i={x:parseFloat(t(`x`)??`0`),y:parseFloat(t(`y`)??`0`),width:parseFloat(t(`width`)??`0`),height:parseFloat(t(`height`)??`0`)};r.push({rect:i,color:n[e].getAttribute(`color`)})}e.globals.previousPaths.push(r)}}clearPreviousPaths(){let e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}handleNoData(){let e=this.w,t=this,n=e.config.noData,r=new Q(t.w),i=e.globals.svgWidth/2,a=e.globals.svgHeight/2,o=`middle`;if(e.globals.noData=!0,e.globals.animationEnded=!0,n.align===`left`?(i=10,o=`start`):n.align===`right`&&(i=e.globals.svgWidth-10,o=`end`),n.verticalAlign===`top`?a=50:n.verticalAlign===`bottom`&&(a=e.globals.svgHeight-50),i+=n.offsetX,a=a+parseInt(n.style.fontSize,10)+2+n.offsetY,n.text!==void 0&&n.text!==``){let t=r.drawText({x:i,y:a,text:n.text,textAnchor:o,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,foreColor:n.style.color,opacity:1,cssClass:`apexcharts-text-nodata`});e.dom.Paper.add(t)}}setNullSeriesToZeroValues(e){let t=this.w;for(let n=0;n<e.length;n++)if(e[n].length===0)for(let r=0;r<e[t.globals.maxValsInArrayIndex].length;r++)e[n].push(0);return e}hasAllSeriesEqualX(){let e=!0,t=this.w,n=this.filteredSeriesX();for(let t=0;t<n.length-1;t++)if(n[t][0]!==n[t+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}filteredSeriesX(){return this.w.seriesData.seriesX.map(e=>e.length>0?e:[])}},fy=class{constructor(e){this.w=e,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}checkHeatmapDistributed(){let{chart:e,plotOptions:t}=this.w.config;return e.type===`treemap`&&t.treemap&&t.treemap.distributed||e.type===`heatmap`&&t.heatmap&&t.heatmap.distributed}checkBarDistributed(){let{chart:e,plotOptions:t}=this.w.config;return t.bar&&t.bar.distributed&&(e.type===`bar`||e.type===`rangeBar`)}init(){this.setDefaultColors()}setDefaultColors(){let e=this.w,t=new Z;e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||`light`}`);let n=e.config.theme.accessibility?.colorBlindMode;if(n){e.globals.colors=this.getColorBlindColors(n),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);let t=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes([`fill`,`stroke`],t),this.applyDataLabelsColors(t),this.applyRadarPolygonsColors(),this.applyMarkersColors(t),n===`highContrast`&&e.dom.elWrap.classList.add(`apexcharts-high-contrast`);return}let r=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(r),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.seriesData.series,t));let i=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes([`fill`,`stroke`],i),this.applyDataLabelsColors(i),this.applyRadarPolygonsColors(),this.applyMarkersColors(i)}getColors(e){let t=this.w;return!e||e.length===0?this.predefined():Array.isArray(e)&&e.length>0&&typeof e[0]==`function`?(this.isColorFn=!0,t.config.series.map((n,r)=>{let i=e[r]||e[0];return typeof i==`function`?i({value:t.globals.axisCharts?t.seriesData.series[r][0]||0:t.seriesData.series[r],seriesIndex:r,dataPointIndex:r,w:this.w}):i})):e}applySeriesColors(e,t){e.forEach((e,n)=>{e&&(t[n]=e)})}getMonochromeColors(e,t,n){let{color:r,shadeIntensity:i,shadeTo:a}=e,o=this.isBarDistributed||this.isHeatmapDistributed?t[0].length*t.length:t.length,s=1/(o/i),c=0;return Array.from({length:o},()=>{let e=a===`dark`?n.shadeColor(c*-1,r):n.shadeColor(c,r);return c+=s,e})}applyColorTypes(e,t){let n=this.w;e.forEach(e=>{n.globals[e].colors=n.config[e].colors===void 0?this.isColorFn?n.config.colors:t:n.config[e].colors.slice(),this.pushExtraColors(n.globals[e].colors)})}applyDataLabelsColors(e){let t=this.w;t.globals.dataLabels.style.colors=t.config.dataLabels.style.colors===void 0?e:t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){let e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode===`dark`?`#343A3F`:`none`]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}applyMarkersColors(e){let t=this.w;t.globals.markers.colors=t.config.markers.colors===void 0?e:t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}pushExtraColors(e,t,n=null){let r=this.w,i=t||r.seriesData.series.length;if(n===null&&(n=this.isBarDistributed||this.isHeatmapDistributed||r.config.chart.type===`heatmap`&&r.config.plotOptions.heatmap&&r.config.plotOptions.heatmap.colorScale.inverse),n&&r.seriesData.series.length&&(i=r.seriesData.series[r.globals.maxValsInArrayIndex].length*r.seriesData.series.length),e.length<i){let t=i-e.length;for(let n=0;n<t;n++)e.push(e[n])}}getColorBlindColors(e){let t=ry();return({deuteranopia:t.cvdDeuteranopia,protanopia:t.cvdProtanopia,tritanopia:t.cvdTritanopia,highContrast:t.highContrast}[e]||t.palette1).slice()}updateThemeOptions(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};let t=e.theme.mode,n=t===`dark`?`palette4`:t===`light`?`palette1`:e.theme.palette||`palette1`,r=t===`dark`?`#f6f7f8`:t===`light`?`#373d3f`:e.chart.foreColor||`#373d3f`;return e.tooltip.theme=t||`light`,e.chart.foreColor=r,e.theme.palette=n,e}predefined(){let e=this.w.config.theme.palette,t=ry();return t[e]||t.palette1}},py=class{constructor(e){this.w=e}draw(){this.drawTitleSubtitle(`title`),this.drawTitleSubtitle(`subtitle`)}
62drawTitleSubtitle(e){let t=this.w,n=e===`title`?t.config.title:t.config.subtitle,r=t.globals.svgWidth/2,i=n.offsetY,a=`middle`;if(n.align===`left`?(r=10,a=`start`):n.align===`right`&&(r=t.globals.svgWidth-10,a=`end`),r+=n.offsetX,i=i+parseInt(n.style.fontSize,10)+n.margin/2,n.text!==void 0){let o=new Q(this.w).drawText({x:r,y:i,text:n.text,textAnchor:a,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,fontWeight:n.style.fontWeight,foreColor:n.style.color,opacity:1});o.node.setAttribute(`class`,`apexcharts-${e}-text`),t.dom.Paper.add(o)}}},my=class{constructor(e){this.w=e.w,this.dCtx=e}getTitleSubtitleCoords(e){let t=this.w,n=0,r=0,i=e===`title`?t.config.title.floating:t.config.subtitle.floating,a=t.dom.baseEl.querySelector(`.apexcharts-${e}-text`);if(a!==null&&!i){let e=a.getBoundingClientRect();n=e.width,r=t.globals.axisCharts?e.height+5:e.height}return{width:n,height:r}}getLegendsRect(){let e=this.w,t=e.dom.elLegendWrap;!e.config.legend.height&&(e.config.legend.position===`top`||e.config.legend.position===`bottom`)&&t&&(t.style.maxHeight=e.globals.svgHeight/2+`px`);let n=Object.assign({},Z.getBoundingClientRect(t));return t!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:n.x,y:n.y,height:n.height,width:n.height===0?0:n.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},(e.config.legend.position===`left`||e.config.legend.position===`right`)&&this.dCtx.lgRect.width*1.5>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){let e=this.w,t=[];e.config.series.forEach((n,r)=>{n.data.forEach((n,i)=>{let a=(t=>e.config.dataLabels.formatter(t,{seriesIndex:r,dataPointIndex:i,w:e}))(e.seriesData.series[r][i]);t.push(a)})});let n=Z.getLargestStringFromArr(t),r=new Q(this.w),i=e.config.dataLabels.style,a=r.getTextRects(n,parseInt(i.fontSize).toString(),i.fontFamily);return{width:a.width*1.05,height:a.height}}getLargestStringFromMultiArr(e,t){let n=this.w,r=e;if(n.axisFlags.isMultiLineX){let e=t.map(e=>Array.isArray(e)?e.length:1),n=Math.max(...e);r=t[e.indexOf(n)]}return r}},hy=class{constructor(e){this.w=e.w,this.dCtx=e}getxAxisLabelsCoords(){let e=this.w,t=e.labelData.labels.slice();e.config.xaxis.convertedCatToNumeric&&t.length===0&&(t=e.labelData.categoryLabels);let n;if(e.labelData.timescaleLabels.length>0){let t=this.getxAxisTimeScaleLabelsCoords();n={width:t.width,height:t.height},e.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=(e.config.legend.position===`left`||e.config.legend.position===`right`)&&!e.config.legend.floating?this.dCtx.lgRect.width:0;let r=e.formatters.xLabelFormatter,i=Z.getLargestStringFromArr(t),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,t);e.globals.isBarHorizontal&&(i=e.globals.yAxisScale[0].result.reduce((e,t)=>e.length>t.length?e:t,0),a=i);let o=new xv(this.w),s=i;i=o.xLabelFormat(r,i,s,{i:void 0,dateFormatter:new bv(this.w).formatDate,w:e}),a=o.xLabelFormat(r,a,s,{i:void 0,dateFormatter:new bv(this.w).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&i===void 0||String(i).trim()===``)&&(i=`1`,a=i);let c=new Q(this.w),l=c.getTextRects(i,e.config.xaxis.labels.style.fontSize),u=l;if(i!==a&&(u=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),n={width:l.width>=u.width?l.width:u.width,height:l.height>=u.height?l.height:u.height},n.width*t.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&e.config.xaxis.labels.rotate!==0||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.layout.rotateXLabels=!0;let t=t=>c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,`rotate(${e.config.xaxis.labels.rotate} 0 0)`,!1);l=t(i),i!==a&&(u=t(a)),n.height=(l.height>u.height?l.height:u.height)/1.5,n.width=l.width>u.width?l.width:u.width}}else e.layout.rotateXLabels=!1}return e.config.xaxis.labels.show||(n={width:0,height:0}),{width:n.width,height:n.height}}getxAxisGroupLabelsCoords(){let e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};let t=e.config.xaxis.group.style?.fontSize||e.config.xaxis.labels.style.fontSize,n=e.labelData.groups.map(e=>e.title),r,i=Z.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(i,n),o=new Q(this.w),s=o.getTextRects(i,t),c=s;return i!==a&&(c=o.getTextRects(a,t)),r={width:s.width>=c.width?s.width:c.width,height:s.height>=c.height?s.height:c.height},e.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}getxAxisTitleCoords(){let e=this.w,t=0,n=0;if(e.config.xaxis.title.text!==void 0){let r=new Q(this.w).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=r.width,n=r.height}return{width:t,height:n}}getxAxisTimeScaleLabelsCoords(){let e=this.w;this.dCtx.timescaleLabels=e.labelData.timescaleLabels.slice();let t=this.dCtx.timescaleLabels.map(e=>e.value),n=t.reduce((e,t)=>
62e===void 0?(console.error(`You have possibly supplied invalid Date format. Please supply a valid JavaScript Date`),0):e.length>t.length?e:t,0),r=new Q(this.w).getTextRects(n,e.config.xaxis.labels.style.fontSize);return r.width*1.05*t.length>e.layout.gridWidth&&e.config.xaxis.labels.rotate!==0&&(e.globals.overlappingXLabels=!0),r}additionalPaddingXLabels(e){let t=this.w,n=t.globals,r=t.config,i=r.xaxis.type,a=e.width;n.skipLastTimelinelabel=!1,n.skipFirstTimelinelabel=!1;let o=t.config.yaxis[0].opposite&&t.globals.isBarHorizontal,s=e=>n.collapsedSeriesIndices.indexOf(e)!==-1,c=e=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){let i=this.dCtx.timescaleLabels[0],o=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+a/1.75-this.dCtx.yAxisWidthRight,s=i.position-a/1.75+this.dCtx.yAxisWidthLeft,c=t.config.legend.position===`right`&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;o>n.svgWidth-t.layout.translateX-c&&(n.skipLastTimelinelabel=!0),s<-((!e.show||e.floating)&&(r.chart.type===`bar`||r.chart.type===`candlestick`||r.chart.type===`rangeBar`||r.chart.type===`boxPlot`||r.chart.type===`violin`)?a/1.75:10)&&(n.skipFirstTimelinelabel=!0)}else i===`datetime`?this.dCtx.gridPad.right<a&&!t.layout.rotateXLabels&&(n.skipLastTimelinelabel=!0):i!==`datetime`&&this.dCtx.gridPad.right<a/2-this.dCtx.yAxisWidthRight&&!t.layout.rotateXLabels&&!t.config.xaxis.labels.trim&&(this.dCtx.xPadRight=a/2+1)},l=(e,t)=>{r.yaxis.length>1&&s(t)||c(e)};r.yaxis.forEach((e,t)=>{o?(this.dCtx.gridPad.left<a&&(this.dCtx.xPadLeft=a/2+1),this.dCtx.xPadRight=a/2+1):l(e,t)})}},gy=class{constructor(e){this.w=e.w,this.dCtx=e}getyAxisLabelsCoords(){let e=this.w,t=[],n=10,r=new Qv(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return e.config.yaxis.map((i,a)=>{let o={seriesIndex:a,dataPointIndex:-1,w:e},s=e.globals.yAxisScale[a],c=0;if(!r.isYAxisHidden(a)&&i.labels.show&&i.labels.minWidth!==void 0&&(c=i.labels.minWidth),!r.isYAxisHidden(a)&&i.labels.show&&s.result.length){let r=e.formatters.yLabelFormatters[a],l=s.niceMin===Number.MIN_VALUE?0:s.niceMin,u=s.result.reduce((e,t)=>String(r(e,o))?.length>String(r(t,o))?.length?e:t,l);u=r(u,o);let d=u;if((u===void 0||u.length===0)&&(u=s.niceMax),String(u).length===1&&(u+=`.0`,d=u),e.globals.isBarHorizontal){n=0;let t=e.labelData.labels.slice();u=Z.getLargestStringFromArr(t),u=r(u,{seriesIndex:a,dataPointIndex:-1,w:e}),d=this.dCtx.dimHelpers.getLargestStringFromMultiArr(u,t)}let f=new Q(this.w),p=`rotate(${i.labels.rotate} 0 0)`,m=f.getTextRects(u,i.labels.style.fontSize,i.labels.style.fontFamily,p,!1),h=m;u!==d&&(h=f.getTextRects(d,i.labels.style.fontSize,i.labels.style.fontFamily,p,!1)),t.push({width:(c>h.width||c>m.width?c:h.width>m.width?h.width:m.width)+n,height:h.height>m.height?h.height:m.height})}else t.push({width:0,height:0})}),t}getyAxisTitleCoords(){let e=this.w,t=[];return e.config.yaxis.map(e=>{if(e.show&&e.title.text!==void 0){let n=new Q(this.w),r=`rotate(${e.title.rotate} 0 0)`,i=n.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);t.push({width:i.width,height:i.height})}else t.push({width:0,height:0})}),t}getTotalYAxisWidth(){let e=this.w,t=0,n=0,r=0,i=e.globals.yAxisScale.length>1?10:0,a=new Qv(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),o=function(t){return e.globals.ignoreYAxisIndexes.indexOf(t)>-1},s=(s,c)=>{let l=e.config.yaxis[c].floating,u=0;s.width>0&&!l?(u=s.width+i,o(c)&&(u=u-s.width-i)):u=l||a.isYAxisHidden(c)?0:5,e.config.yaxis[c].opposite?r+=u:n+=u,t+=u};return e.layout.yLabelsCoords.map((e,t)=>{s(e,t)}),e.layout.yTitleCoords.map((e,t)=>{s(e,t)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.layout.yLabelsCoords[0].width+e.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=n,this.dCtx.yAxisWidthRight=r,t}},_y=class{constructor(e){this.w=e.w,this.dCtx=e}gridPadForColumnsInNumericAxis(e){let{w:t}=this,{config:n,globals:r}=t;if(r.noData||r.collapsedSeries.length+r.ancillaryCollapsedSeries.length===n.series.length)return 0;let i=e=>[`bar`,`rangeBar`,`candlestick`,`boxPlot`,`violin`].includes(e),a=n.chart.type,o=0,s=i(a)?n.series.length:1;r.comboBarCount>
620&&(s=r.comboBarCount),r.collapsedSeries.forEach(e=>{i(e.type)&&--s}),n.chart.stacked&&(s=1);let c=i(a)||r.comboBarCount>0,l=Math.abs(r.initialMaxX-r.initialMinX);if(c&&t.axisFlags.isXNumeric&&!r.isBarHorizontal&&s>0&&l!==0){l<=3&&(l=r.dataPoints);let t=l/e,i=r.minXDiff&&r.minXDiff/t>0?r.minXDiff/t:0;i>e/2&&(i/=2),o=i*parseInt(n.plotOptions.bar.columnWidth,10)/100,o<1&&(o=1),r.barPadForNumericAxis=o}return o}gridPadFortitleSubtitle(){let{w:e}=this,{globals:t}=e,n=this.dCtx.isSparkline||!t.axisCharts?0:10;[`title`,`subtitle`].forEach(r=>{e.config[r].text===void 0?n+=this.dCtx.isSparkline||!t.axisCharts?0:5:n+=e.config[r].margin}),e.config.legend.show&&e.config.legend.position===`bottom`&&!e.config.legend.floating&&!t.axisCharts&&(n+=10);let r=this.dCtx.dimHelpers.getTitleSubtitleCoords(`title`),i=this.dCtx.dimHelpers.getTitleSubtitleCoords(`subtitle`);e.layout.gridHeight-=r.height+i.height+n,e.layout.translateY+=r.height+i.height+n}setGridXPosForDualYAxis(e,t){let{w:n}=this,r=new Qv(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});n.config.yaxis.forEach((i,a)=>{n.globals.ignoreYAxisIndexes.indexOf(a)===-1&&!i.floating&&!r.isYAxisHidden(a)&&(i.opposite&&(n.layout.translateX-=t[a].width+e[a].width+parseInt(i.labels.style.fontSize,10)/1.2+12),n.layout.translateX<2&&(n.layout.translateX=2))})}},vy=class{constructor(e,t){this.w=e,this.ctx=t,this.theme=t.theme,this.timeScale=t.timeScale,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 my(this),this.dimYAxis=new gy(this),this.dimXAxis=new hy(this),this.dimGrid=new _y(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){let e=this.w,t=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};let n=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach(([e,t])=>{this.gridPad[e]=Math.max(t,this.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(n/2,this.gridPad.top),this.gridPad.bottom=Math.max(n/2,this.gridPad.bottom)),t.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),e.layout.gridHeight=e.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,e.layout.gridWidth=e.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;let r=this.dimGrid.gridPadForColumnsInNumericAxis(e.layout.gridWidth);return e.layout.gridWidth=e.layout.gridWidth-r*2,e.layout.translateX=e.layout.translateX+this.gridPad.left+this.xPadLeft+(r>0?r:0),e.layout.translateY=e.layout.translateY+this.gridPad.top,{layout:{gridHeight:e.layout.gridHeight,gridWidth:e.layout.gridWidth,translateX:e.layout.translateX,translateY:e.layout.translateY,translateXAxisX:e.layout.translateXAxisX,translateXAxisY:e.layout.translateXAxisY,rotateXLabels:e.layout.rotateXLabels,xAxisHeight:e.layout.xAxisHeight,xAxisLabelsHeight:e.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:e.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:e.layout.xAxisLabelsWidth,yLabelsCoords:e.layout.yLabelsCoords,yTitleCoords:e.layout.yTitleCoords}}}setDimensionsForAxisCharts(){let e=this.w,t=e.globals,n=this.dimYAxis.getyAxisLabelsCoords(),r=this.dimYAxis.getyAxisTitleCoords();t.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((t,i)=>{e.layout.yLabelsCoords.push({width:n[i].width,index:i}),e.layout.yTitleCoords.push({width:r[i].width,index:i})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();let i=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(i,o,a),e.layout.translateXAxisY=e.layout.rotateXLabels?this.xAxisHeight/8:-4,e.layout.translateXAxisX=e.layout.rotateXLabels&&e.axisFlags.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(e.layout.rotateXLabels=!1,e.layout.translateXAxisY=-1*(parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5)),e.layout.translateXAxisY=e.layout.translateXAxisY+e.config.xaxis.labels.offsetY,e.layout.translateXAxisX=e.layout.translateXAxisX+e.config.xaxis.labels.offsetX;let s=this.yAxisWidth,c=this.xAxisHeight;e.layout.xAxisLabelsHeight=this.xAxisHeight-o.height,e.layout.xAxisGroupLabelsHeight=e.layout.xAxisLabelsHeight-i.height,e.layout.xAxisLabelsWidth=this.xAxisWidth,e.layout.xAxisHeight=this.xAxisHeight;let l=10;(e.config.chart.type===`radar`||this.isSparkline)&&(s=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||e.config.chart.type===`treemap`)&&(s=0,c=0,l=0),!this.isSparkline&&e.config.chart.type!==`treemap`&&this.dimXAxis.additionalPaddingXLabels(i);let u=()=>{e.layout.translateX=s+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-this.lgRect.height-c-(!this.isSparkline&&e.config.chart.type!==`treemap`?e.layout.rotateXLabels?10:15:0),e.layout.gridWidth=t.svgWidth-s-this.datalabelsCoords.width*2};switch(e.config.xaxis.position===`top`&&(l=e.layout.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case`bottom`:e.layout.translateY=l,u();break;case`top`:e.layout.translateY=this.lgRect.height+l,u();break;case`left`:e.layout.translateY=l,e.layout.translateX=this.lgRect.width+s+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-c-12,e.layout.gridWidth=t.svgWidth-this.lgRect.width-s-this.datalabelsCoords.width*2;break;case`right`:e.layout.translateY=l,e.layout.translateX=s+this.datalabelsCoords.width,e.layout.gridHeight=t.svgHeight-c-12,e.layout.gridWidth=t.svgWidth-this.lgRect.width-s-this.datalabelsCoords.width*2-5;break;default:throw Error(`Legend position not supported`)}this.dimGrid.setGridXPosForDualYAxis(r,n),new iy(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(n,r)}setDimensionsForNonAxisCharts(){let e=this.w,t=e.globals,n=e.config,r=0;e.config.legend.show&&!e.config.legend.floating&&(r=20);let i=n.chart.type===`pie`||n.chart.type===`polarArea`||n.chart.type===`donut`?`pie`:`radialBar`,a=n.plotOptions[i].offsetY,o=n.plotOptions[i].offsetX;if(!n.legend.show||n.legend.floating){e.layout.gridHeight=t.svgHeight;let n=e.dom.elWrap.getBoundingClientRect().width;e.layout.gridWidth=Math.min(n,e.layout.gridHeight),e.layout.translateY=a,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;return}switch(n.legend.position){case`bottom`:e.layout.gridHeight=t.svgHeight-this.lgRect.height,e.layout.gridWidth=t.svgWidth,e.layout.translateY=a-10,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;break;case`top`:e.layout.gridHeight=t.svgHeight-this.lgRect.height,e.layout.gridWidth=t.svgWidth,e.layout.translateY=this.lgRect.height+a+10,e.layout.translateX=o+(t.svgWidth-e.layout.gridWidth)/2;break;case`left`:e.layout.gridWidth=t.svgWidth-this.lgRect.width-r,e.layout.gridHeight=n.chart.height===`auto`?e.layout.gridWidth:t.svgHeight,e.layout.translateY=a,e.layout.translateX=o+this.lgRect.width+r;break;case`right`:e.layout.gridWidth=t.svgWidth-this.lgRect.width-r-5,e.layout.gridHeight=n.chart.height===`auto`?e.layout.gridWidth:t.svgHeight,e.layout.translateY=a,e.layout.translateX=o+10;break;default:throw Error(`Legend position not supported`)}}conditionalChecksForAxisCoords(e,t,n){let r=this.w,i=r.labelData.hasXaxisGroups?2:1,a=n.height+e.height+t.height,o=r.axisFlags.isMultiLineX?1.2:Ov,s=r.layout.rotateXLabels?22:10,c=r.layout.rotateXLabels&&r.config.legend.position===`bottom`?10:0;this.xAxisHeight=a*o+i*s+c,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);let l=0,u=0;
62r.config.yaxis.forEach(e=>{l+=e.labels.minWidth,u+=e.labels.maxWidth}),this.yAxisWidth<l&&(this.yAxisWidth=l),this.yAxisWidth>u&&(this.yAxisWidth=u)}},yy=1e3,by=60*yy,xy=60*by,Sy=24*xy,Cy=7*Sy,wy=30*Sy,Ty=365*Sy,Ey=10/86400,Dy=[{unit:`second`,step:1,approxMs:yy},{unit:`second`,step:5,approxMs:5*yy},{unit:`second`,step:15,approxMs:15*yy},{unit:`second`,step:30,approxMs:30*yy},{unit:`minute`,step:1,approxMs:by},{unit:`minute`,step:5,approxMs:5*by},{unit:`minute`,step:15,approxMs:15*by},{unit:`minute`,step:30,approxMs:30*by},{unit:`hour`,step:1,approxMs:xy},{unit:`hour`,step:3,approxMs:3*xy},{unit:`hour`,step:6,approxMs:6*xy},{unit:`hour`,step:12,approxMs:12*xy},{unit:`day`,step:1,approxMs:Sy},{unit:`day`,step:2,approxMs:2*Sy},{unit:`week`,step:1,approxMs:Cy},{unit:`week`,step:2,approxMs:2*Cy},{unit:`month`,step:1,approxMs:wy},{unit:`month`,step:3,approxMs:3*wy},{unit:`month`,step:6,approxMs:6*wy},{unit:`year`,step:1,approxMs:Ty},{unit:`year`,step:2,approxMs:2*Ty},{unit:`year`,step:5,approxMs:5*Ty},{unit:`year`,step:10,approxMs:10*Ty},{unit:`year`,step:25,approxMs:25*Ty},{unit:`year`,step:50,approxMs:50*Ty},{unit:`year`,step:100,approxMs:100*Ty}],Oy=10,ky=class{constructor(e,t){this.w=e,this.ctx=t,this.tickInterval=null,this.timeScaleArray=[],this.utc=e.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(e,t){let n=this.w;if(n.globals.allSeriesCollapsed)return n.labelData.labels=[],n.labelData.timescaleLabels=[],this.timeScaleArray=[],[];let r=t-e,i=r/Sy;n.interact.disableZoomIn=!1,n.interact.disableZoomOut=!1,i<Ey?n.interact.disableZoomIn=!0:i>5e4&&(n.interact.disableZoomOut=!0);let a=Number.isFinite(n.config.xaxis.tickAmount)?n.config.xaxis.tickAmount:Oy;this.tickInterval=Ay(r,a);let o=this.generateBaseTicks(e,t,this.tickInterval);return this.timeScaleArray=o,o}generateBaseTicks(e,t,n){let r=this.w,i=new bv(r),a=this.utc,o=r.layout.gridWidth,s=t-e,c=[],l=i.ceilToBoundary(e,n.unit,n.step,a),u=0;for(;l<=t&&u<5e3;){let t=i.getDateFields(l,a),r=s>0?(l-e)/s*o:0;c.push({timestamp:l,position:r,unit:n.unit,year:t.year,month:t.month+1,day:t.date,hour:t.hour,minute:t.minute,second:t.second,value:l}),l=i.addInterval(l,n.unit,n.step,a),u++}return c}recalcDimensionsBasedOnFormat(e){let t=this.w,n=this.formatDates(e),r=this.removeOverlappingTS(n);t.labelData.timescaleLabels=r.slice();let i=new vy(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(i.layout)}formatDates(e){let t=this.w,n=new bv(t),r=t.config.xaxis.labels.format,i=t.config.xaxis.labels.datetimeFormatter,a=this.utc,o=(e,t=2)=>String(e).padStart(t,`0`),s=r||this._effectiveFormat(e,i);return e.map(e=>{let t=n.getDate(e.timestamp),r=n.formatDate(t,s);return{dateString:`${e.year}-${o(e.month)}-${o(e.day)}T${o(e.hour)}:${o(e.minute)}:${o(e.second)}.000${a?`Z`:``}`,position:e.position,value:r,unit:e.unit,year:e.year,month:e.month}})}_effectiveFormat(e,t){if(e.length===0)return t.day||`dd MMM`;let n=this.tickInterval&&this.tickInterval.unit||e[0].unit,r=t[n===`week`?`day`:n]||t.day||`dd MMM`,i=e[0],a=e[e.length-1],o=i.year!==a.year,s=o||i.month!==a.month||i.day!==a.day,c=/y/i.test(r),l=/M/.test(r),u=/d/i.test(r);return n===`month`||n===`week`||n===`day`?o&&!c?r+` yyyy`:r:(n===`hour`||n===`minute`||n===`second`)&&s&&!u&&!l?(o?`dd MMM yyyy`:`dd MMM`)+` `+r:r}removeOverlappingTS(e){if(e.length===0)return[];let t=this.w,n=new Q(t),r=!1,i;e[0].value&&e.every(t=>t.value.length===e[0].value.length)&&(r=!0,i=n.getTextRects(e[0].value,t.config.xaxis.labels.style.fontSize).width);let a=0;return e.map((o,s)=>{if(s===0||!t.config.xaxis.labels.hideOverlappingLabels)return o;let c=r?i:n.getTextRects(e[a].value,t.config.xaxis.labels.style.fontSize).width,l=e[a].position;return o.position>l+c+10?(a=s,o):null}).filter(e=>e!==null)}};function Ay(e,t){if((!Number.isFinite(t)||t<=0)&&(t=Oy),e<=0)return Dy[0];let n=e/t,r=Dy[0],i=1/0;for(let e of Dy){let t=Math.abs(Math.log(e.approxMs/n));t<i&&(i=t,r=e)}return r}var jy=`__apexcharts_registry__`;globalThis[jy]||(globalThis[jy]={});function My(){return globalThis[jy]}function Ny(e){Object.assign(My(),e)}function Py(e){let t=My()[e];if(!t)throw Error(`ApexCharts: chart type "${e}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);return t}var Fy=class{constructor(e,t,n){this.w=t,this.ctx=n,this.el=e}setupElements(){let{globals:e,config:t}=this.w,n=t.chart.type,r=[`line`,`area`,`bar`,`rangeBar`,`rangeArea`,`candlestick`,`boxPlot`,`violin`,`scatter`,`bubble`];e.axisCharts=[...r,`radar`,`heatmap`,`treemap`].includes(n),e.xyCharts=r.includes(n),e.isBarHorizontal=[`bar`,`rangeBar`,`boxPlot`,`violin`].includes(n)&&t.plotOptions.bar.horizontal,e.chartClass=`.apexcharts${e.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),Q.setAttrs(this.w.dom.elWrap,{id:e.chartClass.substring(1),class:`apexcharts-canvas ${e.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);let i=globalThis.SVG;if(this.w.dom.Paper=i().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:`apexcharts-svg`,"xmlns:data":`ApexChartsNS`,transform:`translate(${t.chart.offsetX}, ${t.chart.offsetY})`}),this.w.dom.Paper.node.style.background=t.theme.mode===`dark`&&!t.chart.background?`#343A3F`:t.theme.mode===`light`&&!t.chart.background?`#fff`:t.chart.background,this.setSVGDimensions(),this.w.dom.elLegendForeign=X.createElementNS($,`foreignObject`),Q.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),this.w.dom.elLegendWrap=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),this.w.dom.elLegendWrap.classList.add(`apexcharts-legend`),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),t.chart.accessibility.enabled&&t.chart.accessibility.announcements.enabled){let e=X.createElement(`div`);e.className=`apexcharts-sr-status`,e.setAttribute(`role`,`status`),e.setAttribute(`aria-live`,`polite`),e.setAttribute(`aria-atomic`,`true`),this.w.dom.elWrap.appendChild(e)}if(t.chart.accessibility.enabled){let e=this.getAccessibleChartLabel(),n=t.chart.accessibility.keyboard.enabled&&t.chart.accessibility.keyboard.navigation.enabled?`application`:`img`;if(this.w.dom.Paper.attr({role:n,"aria-label":e}),t.chart.accessibility.description){let e=X.createElementNS($,`desc`);e.textContent=t.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(e,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:`apexcharts-inner apexcharts-graphical`}
62),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}plotChartType(e,t){let{w:n,ctx:r}=this,{config:i,globals:a}=n,o={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},violin:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},s=i.chart.type||`line`,c=null,l=0;this.w.seriesData.series.forEach((t,r)=>{let i=e[r]?.type===`column`?`bar`:e[r]?.type||(s===`column`?`bar`:s),a=o;a[i]?(i===`rangeArea`?(a[i].series.push(this.w.rangeData.seriesRangeStart[r]),a[i].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[r])):a[i].series.push(t),a[i].i.push(r),i===`bar`&&(n.globals.columnSeries=o.bar)):[`heatmap`,`treemap`,`pie`,`donut`,`polarArea`,`radialBar`,`radar`].includes(i)?c=i:console.warn(`You have specified an unrecognized series type (${i}).`),s!==i&&i!==`scatter`&&l++}),l>0&&(c&&console.warn(`Chart or series type ${c} cannot appear with other chart or series types.`),o.bar.series.length>0&&i.plotOptions.bar.horizontal&&(l-=o.bar.series.length,o.bar={series:[],i:[]},n.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),a.comboCharts||=l>0;let u=o.line.series.length>0||o.area.series.length>0||o.scatter.series.length>0||o.bubble.series.length>0||o.rangeArea.series.length>0||!a.comboCharts&&[`line`,`area`,`scatter`,`bubble`,`rangeArea`].includes(i.chart.type)?new(Py(`line`))(r.w,r,t):null,d=o.candlestick.series.length>0||o.boxPlot.series.length>0||!a.comboCharts&&[`candlestick`,`boxPlot`].includes(i.chart.type)?new(Py(`candlestick`))(r.w,r,t):null,f=o.violin.series.length>0||!a.comboCharts&&i.chart.type===`violin`?new(Py(`violin`))(r.w,r,t):null;r.pie=!a.comboCharts&&[`pie`,`donut`,`polarArea`].includes(i.chart.type)?new(Py(`pie`))(r.w,r):null,r.rangeBar=o.rangeBar.series.length>0||!a.comboCharts&&i.chart.type===`rangeBar`?new(Py(`rangeBar`))(r.w,r,t):null;let p=[];if(a.comboCharts){let e=new Nv(this.w);if(o.area.series.length>0&&p.push(...e.drawSeriesByGroup(o.area,a.areaGroups,`area`,u)),o.bar.series.length>0){if(i.chart.stacked){let e=new(Py(`barStacked`))(r.w,r,t);p.push(e.draw(o.bar.series,o.bar.i))}else r.bar=new(Py(`bar`))(r.w,r,t),p.push(r.bar.draw(o.bar.series,o.bar.i))}if(o.rangeArea.series.length>0&&p.push(u.draw(o.rangeArea.series,`rangeArea`,o.rangeArea.i,o.rangeArea.seriesRangeEnd)),o.line.series.length>0&&p.push(...e.drawSeriesByGroup(o.line,a.lineGroups,`line`,u)),o.candlestick.series.length>0&&p.push(d.draw(o.candlestick.series,`candlestick`,o.candlestick.i)),o.boxPlot.series.length>0&&p.push(d.draw(o.boxPlot.series,`boxPlot`,o.boxPlot.i)),o.violin.series.length>0&&p.push(f.draw(o.violin.series,`violin`,o.violin.i)),o.rangeBar.series.length>0&&p.push(r.rangeBar.draw(o.rangeBar.series,o.rangeBar.i)),o.scatter.series.length>0){let e=new(Py(`line`))(r.w,r,t,!0);p.push(e.draw(o.scatter.series,`scatter`,o.scatter.i))}if(o.bubble.series.length>0){let e=new(Py(`line`))(r.w,r,t,!0);p.push(e.draw(o.bubble.series,`bubble`,o.bubble.i))}}else{let e=i.chart.type;switch(e){case`line`:p=u.draw(this.w.seriesData.series,`line`);break;case`area`:p=u.draw(this.w.seriesData.series,`area`);break;case`bar`:i.chart.stacked?p=new(Py(`barStacked`))(r.w,r,t).draw(this.w.seriesData.series):(r.bar=new(Py(`bar`))(r.w,r,t),p=r.bar.draw(this.w.seriesData.series));break;case`candlestick`:p=d.draw(this.w.seriesData.series,`candlestick`);break;case`boxPlot`:p=d.draw(this.w.seriesData.series,e);break;case`violin`:p=f.draw(this.w.seriesData.series,`violin`);break;case`rangeBar`:p=r.rangeBar.draw(this.w.seriesData.series);break;case`rangeArea`:p=u.draw(this.w.rangeData.seriesRangeStart,`rangeArea`,void 0,this.w.rangeData.seriesRangeEnd);break;case`heatmap`:p=new(Py(`heatmap`))(r.w,r,t).draw(this.w.seriesData.series);break;case`treemap`:p=new(Py(`treemap`))(r.w,r).draw(this.w.seriesData.series);break;case`pie`:case`donut`:case`polarArea`:p=r.pie.draw(this.w.seriesData.series);break;case`radialBar`:p=new(Py(`radialBar`))(r.w,r).draw(this.w.seriesData.series);break;case`radar`:p=new(Py(`radar`))(r.w,r).draw(this.w.seriesData.series);break;default:p=u.draw(this.w.seriesData.series)}}return p}setSVGDimensions(){let{globals:e,config:t}=this.w;t.chart.width=t.chart.width||`100%`,t.chart.height=t.chart.height||`auto`;let n=t.chart.width,r=t.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let i=Z.getDimensions(this.el),a=n.toString().split(/[0-9]+/g).pop();a===`%`?Z.isNumber(i[0])&&(i[0].width===0&&(i=Z.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(n,10)/100):(a===`px`||a===``)&&(e.svgWidth=parseInt(n,10));let o=String(r).toString().split(/[0-9]+/g).pop();if(e.svgHeight=r!==`auto`&&r!==``?o===`%`?Z.getDimensions(this.el.parentNode)[1]*parseInt(r,10)/100:parseInt(r,10):e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2,e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Q.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),o!==`%`&&Y.isBrowser()){let n=e.axisCharts&&(t.grid.show||t.dataLabels.enabled||t.xaxis.labels.show||t.xaxis.axisBorder.show||t.xaxis.axisTicks.show||t.yaxis.some(e=>e.show&&(e.labels.show||e.axisBorder.show||e.axisTicks.show))),r=t.chart.sparkline.enabled||!n?0:t.chart.parentHeightOffset,i=this.w.dom.Paper.node;i.parentNode?.parentNode&&(i.parentNode.parentNode.style.minHeight=`${e.svgHeight+r}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`}shiftGraphPosition(){let{globals:e}=this.w,{translateY:t,translateX:n}=e;Q.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${n}, ${t})`})}resizeNonAxisCharts(){let{w:e}=this,t=e.config.chart.height?String(e.config.chart.height):``,n=t!==``&&t!==`auto`,r=t.includes(`%`),i=0,a=e.config.chart.sparkline.enabled?1:15;a+=e.config.grid.padding.bottom,[`top`,`bottom`].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(i=(this.ctx.legend?.legendHelpers.getLegendDimensions().clwh??0)+7);let o=e.dom.baseEl.querySelector(`.apexcharts-radialbar, .apexcharts-pie`),s=e.globals.pieExternalLabelMarginY||0,c=s>0?e.globals.radialSize*2+s*2:e.globals.radialSize*2.05,l=Math.abs(e.config.plotOptions.radialBar.endAngle-e.config.plotOptions.radialBar.startAngle);if(o&&!e.config.chart.sparkline.enabled&&l<360){let t=Z.getBoundingClientRect(this.w.dom.Paper.node),n=1/0,s=-1/0,l=e=>{var r;if(e.classList?.contains(`apexcharts-radialbar-hollow`))return;let i=((r=e.tagName)?.toLowerCase)?.call(r);if(i===`text`||i===`tspan`)return;let a=Array.from(e.children??[]);if(a.length>
620){a.forEach(e=>l(e));return}let o=Z.getBoundingClientRect(e);if(o.bottom-o.top>0){let e=o.top-t.top,r=o.bottom-t.top;e<n&&(n=e),r>s&&(s=r)}};Array.from(o.children??[]).forEach(e=>l(e)),Number.isFinite(n)||(n=0),Number.isFinite(s)||(s=Z.getBoundingClientRect(o).bottom-t.top);let u=Math.max(a,e.globals.radialSize*.2),d=Math.max(u-n,0);d!==0&&(e.layout.translateY=(e.layout.translateY??0)+d,Q.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${e.layout.translateX??0}, ${e.layout.translateY})`}),s+=d),c=s>0?s:e.globals.radialSize*2.05;let f=Math.max(u,n),p=Math.ceil(c+i+f),m=e.config.chart.offsetY??0,h=p+Math.max(m,0);r||(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute(`height`,String(h)),this.w.dom.elWrap.style.height=`${h}px`,Q.setAttrs(this.w.dom.Paper.node,{height:p}),Y.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${h}px`));return}let u=Math.ceil(c+this.w.layout.translateY+i+a);n||(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute(`height`,String(u)),this.w.dom.elWrap.style.height=`${u}px`,Q.setAttrs(this.w.dom.Paper.node,{height:u}),Y.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${u}px`))}coreCalculations(){new ny(this.w).init()}resetGlobals(){let e=()=>this.w.config.series.map(()=>[]),t=new jv,{globals:n}=this.w,r={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:n.originalSeries};t.initGlobalVars(n),n.seriesXvalues=e(),n.seriesYvalues=e(),r.dataWasParsed&&(this.w.axisFlags.dataWasParsed=r.dataWasParsed,n.originalSeries=r.originalSeries)}isMultipleY(){return Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1?(this.w.globals.isMultipleYAxis=!0,!0):!1}xySettings(){let{w:e}=this,t=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position===`back`&&new cy(this.w).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position===`back`&&new cy(this.w).drawYCrosshairs(),e.config.xaxis.type===`datetime`&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new ky(this.w,this.ctx);let t=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?t=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(t=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(t)}t=new Nv(this.w).getCalculatedRatios()}return t}updateSourceChart(e){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){let{ctx:e,w:t}=this;if(t.config.chart.brush.enabled&&typeof t.config.chart.events.selection!=`function`){let n=Array.isArray(t.config.chart.brush.targets)?t.config.chart.brush.targets:[t.config.chart.brush.target];n.forEach(t=>{let n=e.constructor.getChartByID(t);n.w.globals.brushSource=this.ctx,typeof n.w.config.chart.events.zoomed!=`function`&&(n.w.config.chart.events.zoomed=()=>this.updateSourceChart(n)),typeof n.w.config.chart.events.scrolled!=`function`&&(n.w.config.chart.events.scrolled=()=>this.updateSourceChart(n))}),t.config.chart.events.selection=(t,r)=>{n.forEach(t=>{e.constructor.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){let e=this.w,t=e.config;if(t.chart.accessibility&&t.chart.accessibility.description)return t.chart.accessibility.description;let n=t.chart.type,r=[];if(t.title.text)r.push(`${t.title.text}. ${n} chart`),t.subtitle.text&&r.push(t.subtitle.text);else{let i=Array.isArray(e.seriesData.seriesNames)&&e.seriesData.seriesNames.length?e.seriesData.seriesNames.filter(Boolean):Array.isArray(t.series)?t.series.map(e=>typeof e==`object`&&e?e.name:null).filter(Boolean):[],a=e.seriesData.series.length||(t.series?t.series.length:0);i.length?r.push(`${n} chart with ${a} data series: ${i.join(`, `)}`):r.push(`${n} chart with ${a} data series`)}return r.join(`. `)}},Iy=class e{constructor(e,{resetGlobals:t=()=>{},isMultipleY:n=()=>{}}={}){this.w=e,this.resetGlobals=t,this.isMultipleY=n,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Nv(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){let e=this.w.config.series,t=new dy(this.w);this.activeSeriesIndex=t.getActiveConfigSeriesIndex();let n=e[this.activeSeriesIndex];return n&&n.data&&n.data.length>0&&n.data[0]!==null&&n.data[0]!==void 0?n.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){let e=this.getFirstDataPoint();if(!e||e.x===void 0)return!1;let t=this.w.config.series[this.activeSeriesIndex]?.data;if(t){let e=e=>e&&e.x!==void 0;for(let n=1;n<Math.min(3,t.length);n++)if(e(t[n])!==!0){console.warn(`ApexCharts: series data has mixed formats starting at index ${n}`);break}}return!0}isFormat2DArray(){let e=this.getFirstDataPoint();return e&&Array.isArray(e)}handleFormat2DArray(e,t){let n=this.w.config,r=e[t].data,i=n.chart.type===`boxPlot`||n.series[t].type===`boxPlot`;
62for(let e=0;e<r.length;e++){let t=r[e],a=t[0],o=t[1],s=t[2];if(o!==void 0&&(Array.isArray(o)&&o.length===4&&!i?this.twoDSeries.push(Z.parseNumber(o[3])):t.length>=5?this.twoDSeries.push(Z.parseNumber(t[4])):this.twoDSeries.push(Z.parseNumber(o)),this.w.axisFlags.dataFormatXNumeric=!0),n.xaxis.type===`datetime`){let e=new Date(a).getTime();this.twoDSeriesX.push(e)}else this.twoDSeriesX.push(a);s!==void 0&&(this.threeDSeries.push(s),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(e,t){let n=this.w.config,r=this.w.globals,i=new bv(this.w),a=e[t].data,o=t;r.collapsedSeriesIndices.indexOf(t)>-1&&(o=this.activeSeriesIndex);let s=e[o].data;for(let e=0;e<a.length;e++){let n=a[e];if(n.y!==void 0){let e=Array.isArray(n.y)?Z.parseNumber(n.y[n.y.length-1]):Z.parseNumber(n.y);this.twoDSeries.push(e)}this.seriesGoals[t]===void 0&&(this.seriesGoals[t]=[]),n.goals!==void 0&&Array.isArray(n.goals)?this.seriesGoals[t].push(n.goals):this.seriesGoals[t].push(null),n.z!==void 0&&(this.threeDSeries.push(n.z),this.w.axisFlags.isDataXYZ=!0)}for(let e=0;e<s.length;e++){let t=s[e].x,a=typeof t==`string`,o=Array.isArray(t),c=!o&&!!i.isValidDate(t);if(a||c){if(a||n.xaxis.convertedCatToNumeric){let e=r.isBarHorizontal&&this.w.axisFlags.isRangeData;n.xaxis.type===`datetime`&&!e?this.twoDSeriesX.push(i.parseDate(t)):(this.fallbackToCategory=!0,this.twoDSeriesX.push(t),!isNaN(t)&&this.w.config.xaxis.type!==`category`&&typeof t!=`string`&&(this.w.axisFlags.isXNumeric=!0))}else n.xaxis.type===`datetime`?this.twoDSeriesX.push(i.parseDate(t.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(t)))}else o?(this.fallbackToCategory=!0,this.twoDSeriesX.push(t)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(t))}}handleRangeData(e,t){let n={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?n=this.handleRangeDataFormat(`array`,e,t):this.isFormatXY()&&(n=this.handleRangeDataFormat(`xy`,e,t)),this.w.rangeData.seriesRangeStart[t]=n.start===void 0?[]:n.start,this.w.rangeData.seriesRangeEnd[t]=n.end===void 0?[]:n.end,this.w.rangeData.seriesRange[t]=n.rangeUniques,this.w.rangeData.seriesRange.forEach(e=>{e&&e.forEach(e=>{let t=e.y,n=t.length;if(!(n<=1))for(let r=0;r<n;r++){let i=t[r],a=i.y1,o=i.y2;for(let s=r+1;s<n;s++){let n=t[s],r=n.y1;if(a<=n.y2&&r<=o){let t=e;t.overlaps.add(i.rangeName),t.overlaps.add(n.rangeName)}}}})}),n}handleCandleStickBoxData(e,t){let n={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?n=this.handleCandleStickBoxDataFormat(`array`,e,t):this.isFormatXY()&&(n=this.handleCandleStickBoxDataFormat(`xy`,e,t)),this.w.candleData.seriesCandleO[t]=n.o,this.w.candleData.seriesCandleH[t]=n.h,this.w.candleData.seriesCandleM[t]=n.m,this.w.candleData.seriesCandleL[t]=n.l,this.w.candleData.seriesCandleC[t]=n.c,this.w.candleData.seriesBoxPoints[t]=n.points||[],n}handleViolinData(e,t){let n=this.w,r=e[t].data,i=[],a=[],o=[],s=[],c=[];for(let e=0;e<r.length;e++){let t=r[e],n=t?.y?.density??t?.[1]??[],l=t?.y?.points??t?.[2]??[],u=[],d=[],f=0,p=null,m=1/0,h=-1/0;for(let e=0;e<n.length;e++){let t=Z.parseNumber(n[e][0]),r=Z.parseNumber(n[e][1]);t!==null&&r!==null&&(u.push(t),d.push(r),r>f&&(f=r,p=t),t<m&&(m=t),t>h&&(h=t))}let g=[];for(let e=0;e<l.length;e++){let t=Z.parseNumber(l[e]);t!==null&&(g.push(t),t<m&&(m=t),t>h&&(h=t))}i.push({values:u,weights:d,maxWeight:f}),a.push(g),o.push(m===1/0?0:m),s.push(h===-1/0?0:h),c.push(p===null?g.length?g[Math.floor(g.length/2)]:0:p)}n.violinData.seriesViolinDensity[t]=i,n.violinData.seriesViolinPoints[t]=a,n.violinData.seriesViolinMin[t]=o,n.violinData.seriesViolinMax[t]=s,this.twoDSeries=c}handleRangeDataFormat(e,t,n){let r=[],i=[],a=new Map,o=[];if(t[n].data.forEach(e=>{if(!a.has(e.x)){let t={x:e.x,overlaps:new Set,y:[]};a.set(e.x,t),o.push(t)}}),e===`array`)for(let e=0;e<t[n].data.length;e++)Array.isArray(t[n].data[e])?(r.push(t[n].data[e][1][0]),i.push(t[n].data[e][1][1])):(r.push(t[n].data[e]),i.push(t[n].data[e]));else if(e===`xy`)for(let e=0;e<t[n].data.length;e++){let o=Array.isArray(t[n].data[e].y),s=Z.randomId(),c=t[n].data[e].x,l={y1:o?t[n].data[e].y[0]:t[n].data[e].y,y2:o?t[n].data[e].y[1]:t[n].data[e].y,rangeName:s};t[n].data[e].rangeName=s;let u=a.get(c);u&&u.y.push(l),r.push(l.y1),i.push(l.y2)}return{start:r,end:i,rangeUniques:o}}handleCandleStickBoxDataFormat(e,t,n){let r=this.w,i=r.config.chart.type===`boxPlot`||r.config.series[n].type===`boxPlot`,a=[],o=[],s=[],c=[],l=[],u=[],d=t[n].data,f;f=e===`array`?i&&d[0].length===6||!i&&d[0].length===5?e=>e.slice(1):e=>Array.isArray(e[1])?e[1]:[]:e=>Array.isArray(e.y)?e.y:[];for(let e=0;e<d.length;e++){let t=f(d[e]);t&&t.length>=2&&(a.push(t[0]),o.push(t[1]),i?(s.push(t[2]),c.push(t[3]),l.push(t[4])):(c.push(t[2]),l.push(t[3])));let n=d[e]&&d[e].points;u.push(Array.isArray(n)?n:[])}return{o:a,h:o,m:s,l:c,c:l,points:u}}parseDataAxisCharts(t){let n=this.w.config,r=this.w.globals,i=new bv(this.w),a=n.labels.length>0?n.labels.slice():n.xaxis.categories.slice();this.w.axisFlags.isRangeBar=n.chart.type===`rangeBar`&&r.isBarHorizontal,this.w.labelData.hasXaxisGroups=n.xaxis.type===`category`&&n.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=n.xaxis.group.groups),t.forEach((e,t)=>{e.name===void 0?this.w.seriesData.seriesNames.push(`series-`+parseInt(String(t+1),10)):this.w.seriesData.seriesNames.push(e.name)}),this.coreUtils.setSeriesYAxisMappings();let o=[],s=[...new Set(n.series.map(e=>e.group))];
62n.series.forEach((e,t)=>{let n=s.indexOf(e.group);o[n]||(o[n]=[]),o[n].push(this.w.seriesData.seriesNames[t])}),this.w.labelData.seriesGroups=o;let c=()=>{for(let e=0;e<a.length;e++)if(typeof a[e]==`string`){if(i.isValidDate(a[e]))this.twoDSeriesX.push(i.parseDate(a[e]));else throw Error(`You have provided invalid Date format. Please provide a valid JavaScript Date`)}else this.twoDSeriesX.push(a[e])};for(let i=0;i<t.length;i++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],t[i].data===void 0){console.error(`It is a possibility that you may have not included 'data' property in series.`);return}let o=n.chart.dataReducer,s=r.dataReducerRawSeries?.[i]?.data;if(o?.enabled&&this.isMultiFormat()&&Array.isArray(s)&&s.length>(o.threshold??500)){let r=o.targetPoints??250,a=n.xaxis.min,c=n.xaxis.max,l=a==null&&c==null?s:e.sliceByXRange(s,a,c),u=l;if(l.length>r){let t=Array.isArray(l[0])?l[0]?.[1]:l[0]?.y;Array.isArray(t)?t.length===4?u=e.ohlcAggregate(l,r):t.length===2&&(u=e.rangeAggregate(l,r)):u=e.lttbDownsample(l,r)}t[i]=q(K({},t[i]),{data:u})}if((n.chart.type===`rangeBar`||n.chart.type===`rangeArea`||t[i].type===`rangeBar`||t[i].type===`rangeArea`)&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,i)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,i):this.isFormatXY()&&this.handleFormatXY(t,i),(n.chart.type===`candlestick`||t[i].type===`candlestick`||n.chart.type===`boxPlot`||t[i].type===`boxPlot`)&&this.handleCandleStickBoxData(t,i),(n.chart.type===`violin`||t[i].type===`violin`)&&this.handleViolinData(t,i),this.w.seriesData.series.push(this.twoDSeries),this.w.labelData.labels.push(this.twoDSeriesX),this.w.seriesData.seriesX.push(this.twoDSeriesX),this.w.seriesData.seriesGoals=this.seriesGoals,i===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{n.xaxis.type===`datetime`?(this.w.axisFlags.isXNumeric=!0,c(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):n.xaxis.type===`numeric`&&(this.w.axisFlags.isXNumeric=!0,a.length>0&&(this.twoDSeriesX=a,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);let e=t[i].data.map(e=>Z.parseNumber(e));this.w.seriesData.series.push(e)}this.w.seriesData.seriesZ.push(this.threeDSeries),t[i].color===void 0?this.w.seriesData.seriesColors.push(void 0):this.w.seriesData.seriesColors.push(t[i].color)}return this.w}parseDataNonAxisCharts(e){let t=this.w.config,n=Array.isArray(e)&&e.every(e=>typeof e==`number`)&&t.labels.length>0,r=Array.isArray(e)&&e.some(e=>e&&typeof e==`object`&&e.data||e&&typeof e==`object`&&e.parsing);if(n&&r&&console.warn(`ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility.`),n){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=t.labels.slice();for(let e=0;e<this.w.seriesData.series.length;e++)this.w.seriesData.seriesNames[e]===void 0&&this.w.seriesData.seriesNames.push(`series-`+(e+1));return this.w}if(Array.isArray(e)&&e.every(e=>typeof e==`number`)){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=[];for(let e=0;e<this.w.seriesData.series.length;e++)this.w.seriesData.seriesNames.push(t.labels[e]||`series-${e+1}`);return this.w}let i=this.extractPieDataFromSeries(e);this.w.seriesData.series=i.values,this.w.seriesData.seriesNames=i.labels,t.chart.type===`radialBar`&&(this.w.seriesData.series=this.w.seriesData.series.map(e=>{let t=Z.parseNumber(e);return t>100&&console.warn(`ApexCharts: RadialBar value ${t} > 100, consider using percentage values (0-100)`),t}));for(let e=0;e<this.w.seriesData.series.length;e++)this.w.seriesData.seriesNames[e]===void 0&&this.w.seriesData.seriesNames.push(`series-`+(e+1));return this.w}resetParsingFlags(){let e=this.w;e.axisFlags.dataWasParsed=!1,e.globals.originalSeries=null,e.config.series&&e.config.series.forEach(e=>{e.__apexParsed&&delete e.__apexParsed})}extractPieDataFromSeries(e){let t=[],n=[];if(!Array.isArray(e))return console.warn(`ApexCharts: Expected array for series data`),{values:[],labels:[]};if(e.length===0)return console.warn(`ApexCharts: Empty series array`),{values:[],labels:[]};let r=e[0];if(typeof r==`object`&&r&&r.data)this.extractPieDataFromSeriesObjects(e,t,n
62);else return console.warn(`ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property.`),{values:[],labels:[]};return{values:t,labels:n}}extractPieDataFromSeriesObjects(e,t,n){e.forEach((e,r)=>{if(!e.data||!Array.isArray(e.data)){console.warn(`ApexCharts: Series ${r} has no valid data array`);return}e.data.forEach(e=>{typeof e==`object`&&e?e.x!==void 0&&e.y!==void 0?(n.push(String(e.x)),t.push(Z.parseNumber(e.y))):console.warn(`ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:`,e):console.warn(`ApexCharts: Expected object data point, got:`,typeof e)})})}handleExternalLabelsData(e){let t=this.w.config;if(t.xaxis.categories.length>0)this.w.labelData.labels=t.xaxis.categories;else if(t.labels.length>0)this.w.labelData.labels=t.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){this.w.rangeData.seriesRange.map(e=>{e.forEach(e=>{this.w.labelData.labels.indexOf(e.x)<0&&e.x&&this.w.labelData.labels.push(e.x)})});let e=this.w.labelData.labels;if(e.length>0&&(typeof e[0]==`number`||typeof e[0]==`string`))this.w.labelData.labels=[...new Set(e)];else{let t=new Map;for(let n of e){let e=JSON.stringify(n);t.has(e)||t.set(e,n)}this.w.labelData.labels=Array.from(t.values())}}t.xaxis.convertedCatToNumeric&&(new wv(t).convertCatToNumericXaxis(t,this.w.seriesData.seriesX[0]),this._generateExternalLabels(e))}else this._generateExternalLabels(e)}_generateExternalLabels(e){let t=this.w.globals,n=this.w.config,r=[];if(t.axisCharts){if(this.w.seriesData.series.length>0){if(this.isFormatXY()){let e=n.series.map(e=>{let t=new Map;for(let n of e.data)t.has(n.x)||t.set(n.x,n);return Array.from(t.values())}),t=e.reduce((e,t,n,r)=>r[e].length>t.length?e:n,0);for(let n=0;n<e[t].length;n++)r.push(n+1)}else for(let e=0;e<this.w.seriesData.series[t.maxValsInArrayIndex].length;e++)r.push(e+1)}this.w.seriesData.seriesX=[];for(let t=0;t<e.length;t++)this.w.seriesData.seriesX.push(r);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(r.length===0){r=t.axisCharts?[]:this.w.seriesData.series.map((e,t)=>t+1);for(let t=0;t<e.length;t++)this.w.seriesData.seriesX.push(r)}this.w.labelData.labels=r,n.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=r.map(e=>n.xaxis.labels.formatter(e))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(e){let t=this.w.config,n=this.w.globals,r=t.parsing;if(this.w.axisFlags.dataWasParsed||!r&&!e.some(e=>e.parsing))return e;let i=e.map((e,t)=>{if(!e.data||!Array.isArray(e.data)||e.data.length===0)return e;let n={x:e.parsing?.x||r?.x,y:e.parsing?.y||r?.y,z:e.parsing?.z||r?.z};if(!n.x&&!n.y)return e;let i=e.data[0];if(typeof i==`object`&&i&&(Object.prototype.hasOwnProperty.call(i,`x`)||Object.prototype.hasOwnProperty.call(i,`y`))||Array.isArray(i))return e;if(!n.x||!n.y||Array.isArray(n.y)&&n.y.length===0)return console.warn(`ApexCharts: Series ${t} has parsing config but missing x or y field specification`),e;let a=e.data.map((e,r)=>{if(typeof e!=`object`||!e)return console.warn(`ApexCharts: Series ${t}, data point ${r} is not an object, skipping parsing`),e;let i=this.getNestedValue(e,n.x),a,o;if(Array.isArray(n.y)){let r=n.y.map(t=>this.getNestedValue(e,t));this.w.config.chart.type===`bubble`?(r.length<2&&console.warn(`ApexCharts: series[${t}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(n.y)}`),a=r[0]):a=r}else a=this.getNestedValue(e,n.y);n.z&&(o=this.getNestedValue(e,n.z)),i===void 0&&console.warn(`ApexCharts: Series ${t}, data point ${r} missing field '${n.x}'`),a===void 0&&console.warn(`ApexCharts: Series ${t}, data point ${r} missing field '${n.y}'`);let s={x:i,y:a,z:void 0};if(this.w.config.chart.type===`bubble`&&Array.isArray(n.y)&&n.y.length===2){let t=this.getNestedValue(e,n.y[1]);t!==void 0&&(s.z=t)}return o!==void 0&&(s.z=o),s});return q(K({},e),{data:a,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,n.originalSeries||=Z.clone(e),i}getNestedValue(e,t){if(!e||typeof e!=`object`||!t)return;if(t.indexOf(`.`)===-1)return e[t];let n=t.split(`.`),r=e;for(let e=0;e<n.length;e++){if(typeof r!=`object`||!r)return;r=r[n[e]]}return r}expandScatterJitterData(e){let t=this.w.config,n=t.chart.type===`scatter`||t.chart.type===`bubble`,r=t.plotOptions?.scatter?.jitter;if(!n||!r||!r.enabled||!Array.isArray(e))return e;
62if(!e.some(e=>Array.isArray(e?.data)&&e.data.some(e=>e&&!Array.isArray(e)&&Array.isArray(e.y))))return t.xaxis.type!==`datetime`&&Array.isArray(t.xaxis.categories)&&t.xaxis.categories.length&&this._applyBandAxis(t.xaxis.categories.slice()),e;let i=[],a=new Map;e.forEach(e=>{Array.isArray(e?.data)&&e.data.forEach(e=>{if(e&&Array.isArray(e.y)){let t=String(e.x);a.has(t)||(a.set(t,i.length),i.push(e.x))}})});let o=r.maxPoints||5e3,s=e.map(e=>{if(!Array.isArray(e?.data))return e;let t=[];return e.data.forEach(e=>{if(e&&Array.isArray(e.y)){let n=a.get(String(e.x)),r=e.y,i=r.length>o?Math.ceil(r.length/o):1;for(let e=0;e<r.length;e+=i){let i=Z.parseNumber(r[e]);i!==null&&t.push({x:n,y:i})}}else if(e&&typeof e==`object`&&!Array.isArray(e)){let n=String(e.x);t.push({x:a.has(n)?a.get(n):e.x,y:e.y})}else t.push(e)}),q(K({},e),{data:t})});return this._applyBandAxis(i),s}_applyBandAxis(e){let t=this.w.config.xaxis,n=e.length;if(!n)return;let r=t._scatterBand=t._scatterBand||{};t.type=`numeric`,(t.min==null||r.min)&&(t.min=-1,r.min=!0),(t.max==null||r.max)&&(t.max=n,r.max=!0),(t.tickAmount==null||t.tickAmount===`dataPoints`||r.tick)&&(t.tickAmount=n+1,r.tick=!0),t.labels=t.labels||{};let i=t.labels.formatter;if(typeof i!=`function`||i._scatterBand){let n=(t=>{let n=Math.round(t);return Math.abs(t-n)<1e-6&&e[n]!==void 0?e[n]:``});n._scatterBand=!0,t.labels.formatter=n}}parseData(e){let t=this.w,n=t.config,r=t.globals;if(e=this.parseRawDataIfNeeded(e),e=this.expandScatterJitterData(e),n.chart.dataReducer?.enabled&&r.axisCharts&&!r.dataReducerRawSeries){r.dataReducerRawSeries=e.map(e=>({data:Array.isArray(e?.data)?e.data.slice():e?.data}));let t=1/0,n=-1/0;for(let r of e){let e=r?.data;if(!Array.isArray(e)||e.length===0)continue;let i=!Array.isArray(e[0]),a=i?e[0]?.x:e[0]?.[0],o=i?e[e.length-1]?.x:e[e.length-1]?.[0];typeof a==`number`&&(t=Math.min(t,a)),typeof o==`number`&&(n=Math.max(n,o))}t!==1/0&&(r.dataReducerRawMinX=t,r.dataReducerRawMaxX=n)}if(n.series=e,r.dataReducerRawSeries&&n.chart.dataReducer?.enabled){let t=r.dataReducerRawSeries;r.initialSeries=e.map((e,n)=>q(K({},e),{data:(t[n]?.data)?.slice()??e.data}))}else r.initialSeries=Z.clone(e);if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),r.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),n.chart.stacked){let e=new dy(this.w);this.w.seriesData.series=e.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),r.axisCharts&&(this.w.seriesData.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),this.w.seriesData.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),!this.w.axisFlags.dataFormatXNumeric&&(!this.w.axisFlags.isXNumeric||n.xaxis.type===`numeric`&&n.labels.length===0&&n.xaxis.categories.length===0)&&this.handleExternalLabelsData(e);let i=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let e=0;e<i.length;e++)if(Array.isArray(i[e])){this.w.axisFlags.isMultiLineX=!0;break}return{seriesData:{series:this.w.seriesData.series,seriesNames:this.w.seriesData.seriesNames,seriesX:this.w.seriesData.seriesX,seriesZ:this.w.seriesData.seriesZ,seriesColors:this.w.seriesData.seriesColors,seriesGoals:this.w.seriesData.seriesGoals,initialSeries:r.initialSeries,originalSeries:r.originalSeries,stackedSeriesTotals:this.w.seriesData.stackedSeriesTotals,stackedSeriesTotalsByGroups:this.w.seriesData.stackedSeriesTotalsByGroups,noLabelsProvided:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC,seriesBoxPoints:this.w.candleData.seriesBoxPoints},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}static sliceByXRange(e,t,n){let r=e.length;if(r===0)return e;let i=Array.isArray(e[0])?e=>e[0]:e=>e.x,a=0;if(t!=null){let n=0,o=r-1;for(;n<=o;){let r=n+o>>1;i(e[r])<t?n=r+1:o=r-1}a=Math.max(0,n-1)}let o=r;if(n!=null){let t=0,a=r-1;for(;t<=a;){let r=t+a>>1;i(e[r])>n?a=r-1:t=r+1}o=Math.min(r,t+1)}return a===0&&o===r?e.slice():e.slice(a,o)}static lttbDownsample(e,t){let n=e.length;if(t>=n||t<3)return e;let r=!Array.isArray(e[0]),i=r?e=>e.x:e=>e[0],a=r?e=>e.y:e=>e[1],o=[];o.push(e[0]);let s=(n-2)/(t-2),c=0;for(let r=0;r<t-2;r++){let t=Math.floor((r+1)*s)+1,l=Math.min(Math.floor((r+2)*s)+1,n),u=0,d=0,f=l-t;for(let n=t;n<l;n++)u+=i(e[n]),d+=a(e[n]);u/=f,d/=f;let p=Math.floor(r*s)+1,m=Math.min(Math.floor((r+1)*s)+1,n),h=i(e[c]),g=a(e[c]),_=-1,v=p;for(let t=p;t<m;t++){let n=Math.abs((h-u)*(a(e[t])-g)-(h-i(e[t]))*(d-g))*.5;n>_&&(_=n,v=t)}o.push(e[v]),c=v}return o.push(e[n-1]),o}static ohlcAggregate(e,t){let n=e.length;if(t>=n||t<1)return e;let r=!Array.isArray(e[0]),i=r?e=>e.x:e=>e[0],a=r?e=>e.y:e=>e[1],o=r?(e,t)=>({x:e,y:t}):(e,t)=>[e,t],s=[],c=n/t;for(let r=0;r<t;r++){let l=Math.floor(r*c),u=r===t-1?n:Math.floor((r+1)*c);if(u<=l)continue;let d=a(e[l]),f=d[0],p=d[1],m=d[2],h=d[3];for(let t=l+1;t<u;t++){let n=a(e[t]);n[1]>p&&(p=n[1]),n[2]<m&&(m=n[2]),h=n[3]}s.push(o(i(e[l]),[f,p,m,h]))}return s}static rangeAggregate(e,t){let n=e.length;if(t>=n||t<1)return e;let r=!Array.isArray(e[0]),i=r?e=>e.x:e=>e[0],a=r?e=>e.y:e=>e[1],o=r?(e,t)=>({x:e,y:t}):(e,t)=>[e,t],s=[],c=n/t;for(let r=0;r<t;r++){let l=Math.floor(r*c),u=r===t-1?n:Math.floor((r+1)*c);if(u<=l)continue;let d=1/0,f=-1/0;for(let t=l;t<u;t++){let n=a(e[t]);if(n!=null)for(let e=0;e<2;e++){let t=n[e];t!=null&&isFinite(t)&&(t<d&&(d=t),t>f&&(f=t))}}s.push(o(i(e[l]),d===1/0?[null,null]:[d,f]))}return s}excludeCollapsedSeriesInYAxis(){let e=this.w,t=[];
62e.globals.seriesYAxisMap.forEach((n,r)=>{let i=0;n.forEach(t=>{e.globals.collapsedSeriesIndices.indexOf(t)!==-1&&i++}),i>0&&i==n.length&&t.push(r)}),e.globals.ignoreYAxisIndexes=t.map(e=>e)}},Ly=class{constructor(e,t){this.w=e,this.ctx=t}_updateOptions(e,t=!1,n=!0,r=!0,i=!1){return new Promise(a=>{let o=[this.ctx];r&&(o=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(o=[this.ctx],this.w.globals.isExecCalled=!1),o.forEach((r,s)=>{var c;let l=r.w;if(l.globals.shouldAnimate=n,t||(l.globals.resized=!0,l.globals.dataChanged=!0,n&&r.series.getPreviousPaths()),n&&e&&typeof e==`object`){let t=e?.chart?.type,n=l.config.chart.requestedType||l.config.chart.type;t&&t!==n&&((c=r.morphTypeChange)==null||c.captureBeforeDestroy({fromType:n,toType:t,newSeries:e.series||l.config.series}))}if(e&&typeof e==`object`){r.config=new Dv(e);let t=e.chart&&e.chart.type,n=t===`funnel`||t===`pyramid`||t===`gauge`,a=!!l.config.chart.requestedType;if(t&&!n&&a){e.chart=e.chart||{},e.chart.requestedType=t;let n=l.config.chart.requestedType;(n===`funnel`||n===`pyramid`)&&(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel===void 0&&(e.plotOptions.bar.isFunnel=!1),e.plotOptions.bar.isPyramid===void 0&&(e.plotOptions.bar.isPyramid=!1))}if(r.config.normalizeAliasedChartType(e),e=Nv.extendArrayProps(r.config,e,l),r.w.globals.chartID!==this.w.globals.chartID&&delete e.series,l.config=Z.extend(l.config,e),i&&(l.globals.lastXAxis=e.xaxis?Z.clone(e.xaxis):[],l.globals.lastYAxis=e.yaxis?Z.clone(e.yaxis):[],l.globals.initialConfig=Z.extend({},l.config),l.globals.initialSeries=Z.clone(l.config.series),e.series)){for(let e=0;e<l.globals.collapsedSeriesIndices.length;e++){let t=l.config.series[l.globals.collapsedSeriesIndices[e]];l.globals.collapsedSeries[e].data=l.globals.axisCharts?t.data.slice():t}for(let e=0;e<l.globals.ancillaryCollapsedSeriesIndices.length;e++){let t=l.config.series[l.globals.ancillaryCollapsedSeriesIndices[e]];l.globals.ancillaryCollapsedSeries[e].data=l.globals.axisCharts?t.data.slice():t}r.series.emptyCollapsedSeries(l.config.series)}}return r.update(e).then(()=>{s===o.length-1&&a(r)})})})}_updateSeries(e,t,n=!1){return new Promise(r=>{let i=this.w;i.globals.shouldAnimate=t,i.globals.dataChanged=!0,Zv.invalidateSelectors(i),t&&this.ctx.series.getPreviousPaths();let a=i.config.series.length;i.globals.dataReducerRawSeries=null,this.ctx.data.resetParsingFlags();let o=this.ctx.data.parseData(e);return this.ctx._writeParsedSeriesData(o.seriesData),this.ctx._writeParsedRangeData(o.rangeData),this.ctx._writeParsedCandleData(o.candleData),this.ctx._writeParsedLabelData(o.labelData),this.ctx._writeParsedAxisFlags(o.axisFlags),n&&(i.globals.initialConfig&&(i.globals.initialConfig.series=Z.clone(i.config.series)),i.globals.initialSeries=Z.clone(i.config.series)),this._canUseFastPath(e,a,i)?this.ctx.fastUpdate(t).then(()=>{r(this.ctx)}):this.ctx.update().then(()=>{r(this.ctx)})})}_canUseFastPath(e,t,n){return!(!n.dom.elGraphical||!n.globals.axisCharts||e.length!==t||n.globals.collapsedSeries.length>0||n.globals.ancillaryCollapsedSeries.length>0||n.globals.risingSeries.length>0||n.globals.comboCharts||n.interact.zoomed)}_extendSeries(e,t){let n=this.w,r=n.config.series[t];return q(K({},n.config.series[t]),{name:e.name?e.name:r?.name,color:e.color?e.color:r?.color,type:e.type?e.type:r?.type,group:e.group?e.group:r?.group,hidden:e.hidden===void 0?r?.hidden:e.hidden,data:e.data?e.data:r?.data,zIndex:e.zIndex===void 0?t:e.zIndex})}toggleDataPointSelection(e,t){let n=this.w,r=null,i=`.apexcharts-series[data\\:realIndex='${e}']`;if(n.globals.axisCharts?r=n.dom.Paper.findOne(`${i} path[j='${t}'], ${i} circle[j='${t}'], ${i} rect[j='${t}']`):t===void 0&&(r=n.dom.Paper.findOne(`${i} path[j='${e}']`),(n.config.chart.type===`pie`||n.config.chart.type===`polarArea`||n.config.chart.type===`donut`)&&this.ctx.pie.pieClicked(e)),r)new Q(this.w).pathMouseDown(r,null);else return console.warn(`toggleDataPointSelection: Element not found`),null;return r.node?r.node:null}forceXAxisUpdate(e){let t=this.w;return[`min`,`max`].forEach(n=>{e.xaxis[n]!==void 0&&(t.config.xaxis[n]=e.xaxis[n],t.globals.lastXAxis[n]=e.xaxis[n])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric&&(e=new wv(e).convertCatToNumericXaxis(e,this.ctx)),e}forceYAxisUpdate(e){return e.chart&&e.chart.stacked&&e.chart.stackType===`100%`&&(Array.isArray(e.yaxis)?e.yaxis.forEach((t,n)=>{e.yaxis[n].min=0,e.yaxis[n].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}revertDefaultAxisMinMax(e){let t=this.w,n=t.globals.lastXAxis,r=t.globals.lastYAxis;e&&e.xaxis&&(n=e.xaxis),e&&e.yaxis&&(r=e.yaxis);let i=n;t.config.xaxis.min=i.min,t.config.xaxis.max=i.max;let a=e=>{if(r[e]!==void 0){let n=r[e];t.config.yaxis[e].min=n.min,t.config.yaxis[e].max=n.max}};t.config.yaxis.map((e,n)=>{t.interact.zoomed?a(n):r[n]===void 0?this.ctx.opts.yaxis[n]!==void 0&&(e.min=this.ctx.opts.yaxis[n].min,e.max=this.ctx.opts.yaxis[n].max):a(n)})}},Ry=class{constructor(e){this.w=e.w,this.ttCtx=e}getNearestValues({hoverArea:e,elGrid:t,clientX:n,clientY:r}){let i=this.w,a=t.getBoundingClientRect(),o=a.width,s=a.height,c=o/(i.globals.dataPoints-1),l=s/i.globals.dataPoints,u=this.hasBars();(i.globals.comboCharts||u)&&!i.config.xaxis.convertedCatToNumeric&&(c=o/i.globals.dataPoints);let d=n-a.left-i.globals.barPadForNumericAxis,f=r-a.top;d<0||f<0||d>o||f>s?(e.classList.remove(`hovering-zoom`),e.classList.remove(`hovering-pan`)):i.interact.zoomEnabled?(e.classList.remove(`hovering-pan`),e.classList.add(`hovering-zoom`)):i.interact.panEnabled&&(e.classList.remove(`hovering-zoom`),e.classList.add(`hovering-pan`));let p=Math.round(d/c),m=Math.floor(f/l);u&&!i.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(d/c),--p);let h=null,g=null,_=i.globals.seriesXvalues.map(e=>e.filter(e=>Z.isNumber(e))),v=i.globals.seriesYvalues.map(e=>e.filter(e=>Z.isNumber(e)));if(i.axisFlags.isXNumeric){let e=this.ttCtx.getElGrid();if(!e)return{hoverX:d,hoverY:f};let t=e.getBoundingClientRect(),n=d*(t.width/o),r=f*(t.height/s);g=this.closestInMultiArray(n,r,_,v),h=g.index,p=g.j??0,h!==null&&i.globals.hasNullValues&&(_=i.globals.seriesXvalues[h],g=this.closestInArray(n,_),p=g.j??0)}return i.interact.capturedSeriesIndex=h===null?-1:h,(!p||p<1)&&(p=0),i.globals.isBarHorizontal?i.interact.capturedDataPointIndex=m:i.interact.capturedDataPointIndex=p,{capturedSeries:h,j:i.globals.isBarHorizontal?m:p,hoverX:d,hoverY:f}}getFirstActiveXArray(e){let t=this.w,n=0,r=e.map((e,t)=>e.length>0?t:-1);for(let e=0;e<r.length;e++)if(r[e]!==-1&&t.globals.collapsedSeriesIndices.indexOf(e)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1){n=r[e];break}return n}closestInMultiArray(e,t,n,r){let i=this.w,a=e=>i.globals.collapsedSeriesIndices.indexOf(e)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1,o=i.config.chart.type,s=!i.globals.comboCharts&&(o===`line`||o===`area`),c=1/0,l=null,u=null;if(i.globals.allSeriesHasEqualX){let i=1/0;for(let t=0;t<n.length;t++){if(!a(t))continue;let o=n[t],s=r[t],c=Math.min(o.length,s.length);for(let t=0;t<c;t++){let n=Math.abs(e-o[t]);n<i&&(i=n,u=t)}}if(u!==null){if(s){let i=1/0;for(let o=0;o<n.length;o++){if(!a(o))continue;let s=n[o],c=r[o],d=Math.min(s.length,c.length);if(d<2){let e=c[u];if(typeof e!=`number`)continue;let n=Math.abs(t-e);n<i&&(i=n,l=o);continue}for(let n=0;n<d-1;n++){let r=this._distanceToSegment(e,t,s[n],c[n],s[n+1],c[n+1]);r.dist<i&&(i=r.dist,l=o)}}}else{let e=1/0;for(let i=0;i<n.length;i++){if(!a(i))continue;let n=r[i][u];if(typeof n!=`number`)continue;let o=Math.abs(t-n);o<e&&(e=o,l=i)}}}return{index:l,j:u}}for(let i=0;i<n.length;i++){if(!a(i))continue;let o=n[i],d=r[i],f=Math.min(o.length,d.length);if(s&&f>=2){for(let n=0;n<f-1;n++){let r=this._distanceToSegment(e,t,o[n],d[n],o[n+1],d[n+1]);r.dist<c&&(c=r.dist,l=i,u=r.t<.5?n:n+1)}continue}for(let n=0;n<f;n++){let r=e-o[n],a=t-d[n],s=Math.sqrt(r*r+a*a);s<c&&(c=s,l=i,u=n)}}return{index:l,j:u}}_distanceToSegment(e,t,n,r,i,a){let o=i-n,s=a-r,c=o*o+s*s,l=c===0?0:((e-n)*o+(t-r)*s)/c;l<0?l=0:l>1&&(l=1);let u=n+l*o,d=r+l*s,f=e-u,p=t-d;return{dist:Math.sqrt(f*f+p*p),t:l}}closestInArray(e,t){let n=t[0],r=null,i=Math.abs(e-n);for(let n=0;n<t.length;n++){let a=Math.abs(e-t[n]);a<i&&(i=a,r=n)}return{j:r}}isXoverlap(e){let t=this.w,n=[],r=t.seriesData.seriesX.filter(e=>e[0]!==void 0);if(r.length>0)for(let t=0;t<r.length-1;t++)r[t][e]!==void 0&&r[t+1][e]!==void 0&&r[t][e]!==r[t+1][e]&&n.push(`unEqual`);return n.length===0}isInitialSeriesSameLen(){let e=!0,t=this.w.globals.initialSeries?.filter((e,t)=>
62!this.w.globals.collapsedSeriesIndices?.includes(t))||[];for(let n=0;n<t.length-1;n++){if(!t[n]?.data||!t[n+1]?.data)return!0;if(t[n].data.length!==t[n+1].data.length){e=!1;break}}return e}getBarsHeight(e){return[...e].reduce((e,t)=>e+t.getBBox().height,0)}getElMarkers(e){return typeof e==`number`?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(`.apexcharts-series-markers-wrap > *`)}getAllMarkers(e=!1){let t=[...this.w.dom.baseEl.querySelectorAll(`.apexcharts-series-markers-wrap`)];e&&(t=t.filter(e=>{let t=Number(e.getAttribute(`data:realIndex`));return this.w.globals.collapsedSeriesIndices.indexOf(t)===-1})),t.sort((e,t)=>{var n=Number(e.getAttribute(`data:realIndex`)),r=Number(t.getAttribute(`data:realIndex`));return r<n?1:r>n?-1:0});let n=[];return t.forEach(e=>{n.push(e.querySelector(`.apexcharts-marker`))}),n}hasMarkers(e){return this.getElMarkers(e).length>0}getPathFromPoint(e,t){let n=Number(e.getAttribute(`cx`)),r=Number(e.getAttribute(`cy`)),i=e.getAttribute(`shape`);return new Q(this.w).getMarkerPath(n,r,i,t)}getElBars(){return this.w.dom.baseEl.querySelectorAll(`.apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series`)}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(e){let t=this.w,n=t.config.markers.hover.size;return n===void 0&&(n=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),n}toggleAllTooltipSeriesGroups(e){let t=this.w,n=this.ttCtx;n.allTooltipSeriesGroups.length===0&&(n.allTooltipSeriesGroups=t.dom.baseEl.querySelectorAll(`.apexcharts-tooltip-series-group`));let r=n.allTooltipSeriesGroups;for(let n=0;n<r.length;n++)e===`enable`?(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`)}},zy=class{constructor(e){this.w=e.w,this.ttCtx=e,this.tooltipUtil=new Ry(e)}drawSeriesTexts({shared:e=!0,ttItems:t,i:n=0,j:r=null,y1:i,y2:a,e:o}){let s=this.w;s.config.tooltip.custom===void 0?this.toggleActiveInactiveSeries(e,n):this.handleCustomTooltip({i:n,j:r,y1:i,y2:a,w:s});let c=this.getValuesToPrint({i:n,j:r});this.printLabels({i:n,j:r,values:c,ttItems:t,shared:e,e:o});let l=this.ttCtx.getElTooltip();l&&(this.ttCtx.tooltipRect.ttWidth=l.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=l.getBoundingClientRect().height)}printLabels({i:e,j:t,values:n,ttItems:r,shared:i,e:a}){let o=this.w,{xVal:s,zVal:c,xAxisTTVal:l}=n,u=o.seriesData.series.length,d=t!==null&&o.config.plotOptions.bar.distributed?o.globals.colors[t]:o.globals.colors[e];for(let n=0;n<u;n++){let f=o.config.tooltip.inverseOrder?u-1-n:n,p=this.computeSeriesRow({i:e,j:t,t:n,tIndex:f,shared:i,e:a,basePColor:d});this.DOMHandling({i:e,t:f,j:t,ttItems:r,values:{val:p.val,goalVals:p.goalVals,xVal:s,xAxisTTVal:l,zVal:c},seriesName:p.seriesName,shared:i,pColor:p.pColor})}}computeSeriesRow({i:e,j:t,tIndex:n,shared:r,e:i,basePColor:a}){let o=this.w,s=this.getFormatters(e),c=a,l,u=[],d=o.config.chart.type===`treemap`?s.yLbTitleFormatter(String(o.config.series[e].data[t].x),{series:o.seriesData.series,seriesIndex:e,dataPointIndex:t,w:o}):this.getSeriesName({fn:s.yLbTitleFormatter,index:e,seriesIndex:e,j:t});return o.globals.axisCharts&&(r?(s=this.getFormatters(n),d=this.getSeriesName({fn:s.yLbTitleFormatter,index:n,seriesIndex:e,j:t}),c=o.globals.colors[n],l=this.formatYValue(s,n,t),u=this.formatGoalVals(s,n,t)):(c=this.resolvePatternColor(i,c),l=this.formatYValue(s,e,t),u=this.formatGoalVals(s,e,t))),t===null&&(l=s.yLbFormatter(o.seriesData.series[e],q(K({},o),{seriesIndex:e,dataPointIndex:e}))),{seriesName:d,val:l,goalVals:u,pColor:c}}formatYValue(e,t,n){let r=this.w;return r.axisFlags.isRangeData?e.yLbFormatter(r.rangeData.seriesRangeStart?.[t]?.[n],{series:r.rangeData.seriesRangeStart,seriesIndex:t,dataPointIndex:n,w:r})+` - `+e.yLbFormatter(r.rangeData.seriesRangeEnd?.[t]?.[n],{series:r.rangeData.seriesRangeEnd,seriesIndex:t,dataPointIndex:n,w:r}):e.yLbFormatter(r.seriesData.series[t][n],{series:r.seriesData.series,seriesIndex:t,dataPointIndex:n,w:r})}formatGoalVals(e,t,n){let r=this.w,i=r.seriesData.seriesGoals[t]?.[n];return Array.isArray(i)?i.map(i=>({attrs:i,val:e.yLbFormatter(i.value,{seriesIndex:t,dataPointIndex:n,w:r})})):[]}resolvePatternColor(e,t){let n=this.w,r=(e?.target)?.getAttribute(`fill`);return r?r.indexOf(`url`)===-1?r:r.indexOf(`Pattern`)===-1?t:(n.dom.baseEl.querySelector(r.substr(4).slice(0,-1))?.childNodes[0])?.getAttribute(`stroke`)??t:t}getFormatters(e){let t=this.w,n=t.formatters.yLabelFormatters[e],r;return t.formatters.ttVal===void 0?r=t.config.tooltip.y.title.formatter:Array.isArray(t.formatters.ttVal)?(n=t.formatters.ttVal[e]&&t.formatters.ttVal[e].formatter,r=t.formatters.ttVal[e]&&t.formatters.ttVal[e].title&&t.formatters.ttVal[e].title.formatter):(n=t.formatters.ttVal.formatter,typeof t.formatters.ttVal.title.formatter==`function`&&(r=t.formatters.ttVal.title.formatter)),typeof n!=`function`&&(n=t.formatters.yLabelFormatters[
620]?t.formatters.yLabelFormatters[0]:function(e){return e}),typeof r!=`function`&&(r=function(e){return e?e+`: `:``}),{yLbFormatter:n,yLbTitleFormatter:r}}getSeriesName({fn:e,index:t,seriesIndex:n,j:r}){let i=this.w;return e(String(i.seriesData.seriesNames[t]),{series:i.seriesData.series,seriesIndex:n,dataPointIndex:r,w:i})}DOMHandling({t:e,j:t,ttItems:n,values:r,seriesName:i,shared:a,pColor:o}){let s=this.w,c=this.ttCtx,{val:l,goalVals:u,xVal:d,xAxisTTVal:f,zVal:p}=r;if(!n||!n[e])return;let m=null;m=n[e].children,s.config.tooltip.fillSeriesColor&&(n[e].style.backgroundColor=o,m[0].style.display=`none`),c.showTooltipTitle&&(c.tooltipTitle===null&&(c.tooltipTitle=s.dom.baseEl.querySelector(`.apexcharts-tooltip-title`)),c.tooltipTitle&&(c.tooltipTitle.innerHTML=d)),c.isXAxisTooltipEnabled&&c.xaxisTooltipText&&(c.xaxisTooltipText.innerHTML=f===``?d:f);let h=n[e].querySelector(`.apexcharts-tooltip-text-y-label`);h&&(h.innerHTML=i||``);let g=n[e].querySelector(`.apexcharts-tooltip-text-y-value`);g&&(g.innerHTML=l===void 0?``:l),m[0]&&m[0].classList.contains(`apexcharts-tooltip-marker`)&&(s.config.tooltip.marker.fillColors&&Array.isArray(s.config.tooltip.marker.fillColors)&&(o=s.config.tooltip.marker.fillColors[e]),s.config.tooltip.fillSeriesColor?m[0].style.backgroundColor=o:m[0].style.color=o),s.config.tooltip.marker.show||(m[0].style.display=`none`);let _=n[e].querySelector(`.apexcharts-tooltip-text-goals-label`),v=n[e].querySelector(`.apexcharts-tooltip-text-goals-value`);if(u.length&&s.seriesData.seriesGoals[e]){let n=()=>{let e=`<div>`,t=`<div>`;u.forEach(n=>{e+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${n.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${n.attrs.name}</div>`,t+=`<div>${n.val}</div>`}),_.innerHTML=e+`</div>`,v.innerHTML=t+`</div>`};a?s.seriesData.seriesGoals[e][t]&&Array.isArray(s.seriesData.seriesGoals[e][t])?n():(_.innerHTML=``,v.innerHTML=``):n()}else _.innerHTML=``,v.innerHTML=``;if(p!==null){let t=n[e].querySelector(`.apexcharts-tooltip-text-z-label`);t.innerHTML=s.config.tooltip.z.title;let r=n[e].querySelector(`.apexcharts-tooltip-text-z-value`);r.innerHTML=p===void 0?``:p}if(a&&m[0]){if(s.config.tooltip.hideEmptySeries){let t=n[e].querySelector(`.apexcharts-tooltip-marker`),r=n[e].querySelector(`.apexcharts-tooltip-text`);parseFloat(l)==0?(t.style.display=`none`,r.style.display=`none`):(t.style.display=`block`,r.style.display=`block`)}l==null||s.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||s.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1?m[0].parentNode.style.display=`none`:m[0].parentNode.style.display=s.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1&&(m[0].parentNode.style.display=`none`)}toggleActiveInactiveSeries(e,t){let n=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups(`enable`);else{this.tooltipUtil.toggleAllTooltipSeriesGroups(`disable`);let e=n.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${t}`);if(e){let t=e;t.classList.add(`apexcharts-active`),t.style.display=n.config.tooltip.items.display}}}getValuesToPrint({i:e,j:t}){var n,r,i;let a=this.w,o=a.seriesData.seriesX.map(e=>e.length>0?e:[]),s=``,c=``,l=null,u=null,d={series:a.seriesData.series,seriesIndex:e,dataPointIndex:t,w:a},f=a.formatters.ttZFormatter;t===null?u=a.seriesData.series[e]:a.axisFlags.isXNumeric&&a.config.chart.type!==`treemap`?(s=o[e][t],o[e].length===0&&(s=o[this.tooltipUtil.getFirstActiveXArray(o)][t])):s=new Iy(this.w).isFormatXY()?a.config.series[e].data[t]===void 0?``:a.config.series[e].data[t].x:a.labelData.labels[t]===void 0?``:a.labelData.labels[t];let p=s;return s=a.axisFlags.isXNumeric&&a.config.xaxis.type===`datetime`?new xv(this.w).xLabelFormat(a.formatters.ttKeyFormatter,p,p,{i:void 0,dateFormatter:new bv(this.w).formatDate,w:this.w}):a.globals.isBarHorizontal?a.formatters.yLabelFormatters[0](p,d):(n=a.formatters).xLabelFormatter?.call(n,p,d)??p,a.config.tooltip.x.formatter!==void 0&&(s=(r=a.formatters).ttKeyFormatter?.call(r,p,d)??p),a.seriesData.seriesZ.length>0&&a.seriesData.seriesZ[e].length>0&&(l=f?.(a.seriesData.seriesZ[e][t],a)),c=typeof a.config.xaxis.tooltip.formatter==`function`?(i=a.formatters).xaxisTooltipFormatter?.call(i,p,d):s,{val:Array.isArray(u)?u.join(` `):u,xVal:Array.isArray(s)?s.join(` `):s,xAxisTTVal:Array.isArray(c)?c.join(` `):c,zVal:l}}handleCustomTooltip({i:e,j:t,y1:n,y2:r,w:i}){let a=this.ttCtx.getElTooltip(),o=i.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]);let s=o({series:i.seriesData.series,seriesIndex:e,dataPointIndex:t,y1:n,y2:r,w:i});
62a&&(typeof s==`string`||typeof s==`number`?a.innerHTML=String(s):(s instanceof Element||typeof s.nodeName==`string`)&&(a.innerHTML=``,a.appendChild(s.cloneNode(!0))))}},By=class{constructor(e){this.ttCtx=e,this.w=e.w}moveXCrosshairs(e,t=null){let n=this.ttCtx,r=this.w,i=n.getElXCrosshairs(),a=e-n.xcrosshairsWidth/2,o=r.labelData.labels.slice().length;if(t!==null&&(a=r.layout.gridWidth/o*t),i!==null&&!r.globals.isBarHorizontal&&(i.setAttribute(`x`,String(a)),i.setAttribute(`x1`,String(a)),i.setAttribute(`x2`,String(a)),i.setAttribute(`y2`,String(r.layout.gridHeight)),i.classList.add(`apexcharts-active`)),a<0&&(a=0),a>r.layout.gridWidth&&(a=r.layout.gridWidth),n.isXAxisTooltipEnabled){let e=a;(r.config.xaxis.crosshairs.width===`tickWidth`||r.config.xaxis.crosshairs.width===`barWidth`)&&(e=a+n.xcrosshairsWidth/2),this.moveXAxisTooltip(e)}}moveYCrosshairs(e){let t=this.ttCtx;t.ycrosshairs!==null&&Q.setAttrs(t.ycrosshairs,{y1:e,y2:e}),t.ycrosshairsHidden!==null&&Q.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}moveXAxisTooltip(e){let t=this.w,n=this.ttCtx;if(n.xaxisTooltip!==null&&n.xcrosshairsWidth!==0){n.xaxisTooltip.classList.add(`apexcharts-active`);let r=n.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.layout.translateY+5+t.config.xaxis.offsetY,i=n.xaxisTooltip.getBoundingClientRect().width;if(e-=i/2,!isNaN(e)){e+=t.layout.translateX;let i=new Q(this.w).getTextRects(n.xaxisTooltipText?.innerHTML??``,t.config.xaxis.labels.style.fontSize);n.xaxisTooltipText&&(n.xaxisTooltipText.style.minWidth=i.width+`px`),n.xaxisTooltip.style.left=e+`px`,n.xaxisTooltip.style.top=r+`px`}}}moveYAxisTooltip(e){let t=this.w,n=this.ttCtx;n.yaxisTTEls===null&&(n.yaxisTTEls=[...t.dom.baseEl.querySelectorAll(`.apexcharts-yaxistooltip`)]);let r=parseInt(n.ycrosshairsHidden?.getAttribute(`y1`)??`0`,10),i=t.layout.translateY+r;if(n.yaxisTTEls){let r=n.yaxisTTEls[e].getBoundingClientRect(),a=r.height,o,s=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),c=t.dom.elWrap.getBoundingClientRect();if(s){let e=s.getBoundingClientRect();e.width>0&&(o=e.left+e.width/2-c.left-r.width/2)}o??=t.config.yaxis[e].opposite?t.globals.translateYAxisX[e]+4:t.globals.translateYAxisX[e]-r.width-4,i-=a/2,t.globals.ignoreYAxisIndexes.indexOf(e)===-1&&i>0&&i<t.layout.gridHeight?(n.yaxisTTEls[e].classList.add(`apexcharts-active`),n.yaxisTTEls[e].style.top=i+`px`,n.yaxisTTEls[e].style.left=o+t.config.yaxis[e].tooltip.offsetX+`px`):n.yaxisTTEls[e].classList.remove(`apexcharts-active`)}}moveTooltip(e,t,n=null){let r=this.ttCtx.getElTooltip();if(!r)return;let i=this.computeTooltipPosition(e,t,n);i!==null&&this.applyTooltipPosition(r,i)}computeTooltipPosition(e,t,n=null){var r;let i=this.w,a=this.ttCtx,o=a.tooltipRect,s=!!i.config.tooltip.arrow,c=n===null?1:parseFloat(String(n)),l=o.ttHeight||0,u=o.ttWidth||0,d=parseFloat(String(e)),f=parseFloat(String(t));if(isNaN(d))return null;let p=d+c+5,m=f+i.layout.translateY,h=s?m-l/2+c/2:f+c/2,g=`right`;if(p>i.layout.gridWidth/2&&(p=p-u-c-10,g=`left`),p>i.layout.gridWidth-u-10&&(p=i.layout.gridWidth-u),p<-20&&(p=-20),i.config.tooltip.followCursor){let e=a.getElGrid();if(!e)return null;let t=e.getBoundingClientRect();p=a.e.clientX-t.left,p>i.layout.gridWidth/2?(p-=u,g=`left`):g=`right`,h=a.e.clientY+i.layout.translateY-t.top,h>i.layout.gridHeight/2&&(h-=l)}else if(!i.globals.isBarHorizontal){if(s){let e=i.layout.translateY,t=i.layout.translateY+i.layout.gridHeight;h+l>t&&(h=t-l),h<e&&(h=e)}else l/2+h>i.layout.gridHeight&&(h=i.layout.gridHeight-l+i.layout.translateY)}if(isNaN(p))return null;p+=i.layout.translateX;let _=i.config?.chart?.accessibility;if(_?.enabled&&_?.keyboard?.navigation?.enabled&&((r=i.dom?.baseEl)?.querySelector)?.call(r,`.apexcharts-keyboard-focused`)){let e=s?m:f,t=(c||1)+12,n=h,r=h+l;!isNaN(e)&&l>0&&n<e+t&&r>e-t&&(h=e-l-t,h<0&&(h=e+t))}let v=null;if(s&&l>0){let e=m-h,t=l-10;v=Math.max(10,Math.min(t,e))}return{x:p,y:h,placement:g,arrowY:v}}applyTooltipPosition(e,t){if(!e)return;let n=e.dataset.positioned!==`true`;n&&(e.style.transitionProperty=`none`),e.style.left=t.x+`px`,e.style.top=t.y+`px`,t.placement&&(e.dataset.placement=t.placement),t.arrowY!=null&&e.style.setProperty(`--apx-tt-arrow-y`,t.arrowY+`px`),t.arrowX!=null&&e.style.setProperty(`--apx-tt-arrow-x`,t.arrowX+`px`),n&&(e.offsetWidth,e.dataset.positioned=`true`,requestAnimationFrame(()=>{e.style.transitionProperty=``}))}moveMarkers(e,t){let n=this.w,r=this.ttCtx;if(n.globals.markers.size[e]>0){let i=n.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker`);for(let e=0;e<i.length;e++)parseInt(i[e].getAttribute(`rel`)??`0`,10)===t&&(r.marker.resetPointsSize(),r.marker.enlargeCurrentPoint(t,i[e]))}else r.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}moveDynamicPointOnHover(e,t){let n=this.w,r=this.ttCtx,i=0,a=0,o=new Q(this.w),s=n.globals.pointsArray,c=r.tooltipUtil.getHoverMarkerSize(t),l=n.config.series[t].type;if(l&&(l===`column`||l===`candlestick`||l===`boxPlot`||l===`violin`))return;i=s[t]?.[e]?.[0],a=s[t]?.[e]?.[1]||0;let u=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers path`);if(u&&a<n.layout.gridHeight&&a>0){let e=u.getAttribute(`shape`)??`circle`,t=o.getMarkerPath(i,a,e,c*1.5);u.setAttribute(`d`,t)}this.moveXCrosshairs(i),r.fixedTooltip||this.moveTooltip(i,a,c)}moveDynamicPointsOnHover(e){let t=this.ttCtx,n=t.w,r=0,i=0,a=0,o=n.globals.pointsArray,s=new dy(this.w),c=new Q(this.w);a=s.getActiveConfigSeriesIndex(`asc`,[`line`,`area`,`scatter`,`bubble`]);let l=t.tooltipUtil.getHoverMarkerSize(a);if(o[a]?.[e]&&(r=o[a][e][0],i=o[a][e][1]),isNaN(r))return;let u=t.tooltipUtil.getAllMarkers();if(u.length)for(let t=0;t<n.seriesData.series.length;t++){let i=o[t];if(n.globals.comboCharts&&i===void 0&&u.splice(t,0,null),i&&i.length){let i=o[t][e][1],a;u[t].setAttribute(`cx`,r);let s=u[t].getAttribute(`shape`)??`circle`;if(n.config.chart.type===`rangeArea`&&!n.globals.comboCharts){let r=e+n.seriesData.series[t].length;a=o[t][r][1];let s=Math.abs(i-a)/2;i-=s}if(i!==null&&!isNaN(i)&&i<n.layout.gridHeight+l&&i+l>0){let e=c.getMarkerPath(r,i,s,l);u[t].setAttribute(`d`,e)}else u[t].setAttribute(`d`,``)}}this.moveXCrosshairs(r),t.fixedTooltip||this.moveTooltip(r,i||n.layout.gridHeight,l)}moveStickyTooltipOverBars(e,t){let n=this.w,r=this.ttCtx,i=n.globals.columnSeries?n.globals.columnSeries.length:n.seriesData.series.length;n.config.chart.stacked&&(i=n.globals.barGroups.length);let a=i>=2&&i%2==0?Math.floor(i/2):Math.floor(i/2)+1;n.globals.isBarHorizontal&&(a=new dy(this.w).getActiveConfigSeriesIndex(`desc`)+1);let o=n.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-candlestick-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-violin-series .apexcharts-series[rel='${a}'] path[j='${e}'], .apexcharts-rangebar-series .apexcharts-series[rel='${a}'] path[j='${e}']`);!o&&typeof t==`number`&&(o=n.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'], 63 .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'], 64 .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'], 65 .apexcharts-violin-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}'], 66 .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`));let s=o?parseFloat(o.getAttribute(`cx`)??`0`):0,c=o?parseFloat(o.getAttribute(`cy`)??`0`):0,l=o?parseFloat(o.getAttribute(`barWidth`)??`0`):0,u=r.getElGrid();if(!u)return;let d=u.getBoundingClientRect(),f=o&&(o.classList.contains(`apexcharts-candlestick-area`)||o.classList.contains(`apexcharts-boxPlot-area`));if(n.axisFlags.isXNumeric){if(o&&!f){let t=this._datapointCenterXFromBars(e,d);t==null?s-=i%2==0?0:l/2:s=t}o&&f&&(s-=l/2)}else n.globals.isBarHorizontal||(s=r.xAxisTicksPositions[e-1]+r.dataPointsDividedWidth/2,isNaN(s)&&(s=r.xAxisTicksPositions[e]-r.dataPointsDividedWidth/2));if(n.globals.isBarHorizontal?c-=r.tooltipRect.ttHeight:n.config.tooltip.followCursor?c=r.e.clientY-d.top-r.tooltipRect.ttHeight/2:c+r.tooltipRect.ttHeight+15>n.layout.gridHeight&&(c=n.layout.gridHeight),n.globals.isBarHorizontal||this.moveXCrosshairs(s),!r.fixedTooltip){if(n.globals.isBarHorizontal&&!n.config.tooltip.followCursor&&this.placeHorizontalSharedTooltip(e))return;this.moveTooltip(s,c||n.layout.gridHeight)}}_datapointCenterXFromBars(e,t){var n;let r=this.w,i=r.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${e}'],.apexcharts-rangebar-series path[j='${e}']`);if(!i.length)return null;let a=1/0,o=-1/0;for(let e of i){if(((n=e.parentNode?.classList)?.contains)?.call(n,`apexcharts-series-collapsed`))continue;let t=e.getBoundingClientRect();(t.width!==0||t.height!==0)&&(t.left<a&&(a=t.left),t.right>o&&(o=t.right))}return isFinite(a)?(a+o)/2-t.left-(r.globals.barPadForNumericAxis||
660):null}placeHorizontalSharedTooltip(e){var t;let n=this.w,r=this.ttCtx,i=r.getElTooltip();if(!i)return!1;let a=r.getElGrid();if(!a)return!1;let o=a.getBoundingClientRect(),s=n.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${e}'],.apexcharts-rangebar-series path[j='${e}'],.apexcharts-boxPlot-series path[j='${e}']`);if(!s.length)return!1;let c=1/0,l=-1/0,u=1/0,d=-1/0;for(let e of s){if(((t=e.parentNode?.classList)?.contains)?.call(t,`apexcharts-series-collapsed`))continue;let n=e.getBoundingClientRect();(n.width!==0||n.height!==0)&&(n.left<c&&(c=n.left),n.right>l&&(l=n.right),n.top<u&&(u=n.top),n.bottom>d&&(d=n.bottom))}if(!isFinite(c))return!1;let f=r.tooltipRect.ttWidth||0,p=r.tooltipRect.ttHeight||0,m=(c+l)/2-o.left+n.layout.translateX,h=u-o.top+n.layout.translateY,g=d-o.top+n.layout.translateY,_=n.layout.translateY,v=n.layout.translateY+n.layout.gridHeight,y=n.layout.translateX,b=n.layout.translateX+n.layout.gridWidth,x=`top`,S=h-p-7;if(S<_){let e=g+7;e+p<=v&&(x=`bottom`,S=e)}let C=m-f/2;C<y&&(C=y),C+f>b&&(C=b-f);let w=Math.max(10,Math.min(f-10,m-C));return this.applyTooltipPosition(i,{x:C,y:S,placement:x,arrowY:null,arrowX:w}),!0}};function Vy(e){let t=e=>`<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${e}</svg>`;switch(e){case`square`:case`rect`:return t(`<rect x="1" y="1" width="10" height="10" rx="1" fill="currentColor"/>`);case`line`:return t(`<rect x="0" y="5" width="12" height="2" rx="1" fill="currentColor"/>`);case`diamond`:return t(`<path d="M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z" fill="currentColor"/>`);case`triangle`:return t(`<path d="M6 1 L11.2 10.5 L0.8 10.5 Z" fill="currentColor"/>`);case`cross`:return t(`<path d="M2 2 L10 10 M10 2 L2 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>`);case`plus`:return t(`<path d="M6 1 L6 11 M1 6 L11 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>`);case`star`:return t(`<path d="M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z" fill="currentColor"/>`);case`sparkle`:return t(`<path d="M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z" fill="currentColor"/>`);default:return t(`<circle cx="6" cy="6" r="5" fill="currentColor"/>`)}}var Hy=class{constructor(e){this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new By(e)}drawDynamicPoints(){let e=this.w,t=new Q(this.w),n=new Jv(this.w,this.ctx),r=[...e.dom.baseEl.querySelectorAll(`.apexcharts-series`)];e.config.chart.stacked&&r.sort((e,t)=>parseFloat(e.getAttribute(`data:realIndex`))-parseFloat(t.getAttribute(`data:realIndex`)));for(let i=0;i<r.length;i++){let a=r[i].querySelector(`.apexcharts-series-markers-wrap`);if(a!==null){let r=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;(e.config.chart.type===`line`||e.config.chart.type===`area`)&&!e.globals.comboCharts&&!e.config.tooltip.intersect&&(r+=` no-pointer-events`);let i=n.getMarkerConfig({cssClass:r,seriesIndex:Number(a.getAttribute(`data:realIndex`))}),o=t.drawMarker(0,0,i);o.node.setAttribute(`default-marker-size`,0);let s=X.createElementNS($,`g`);s.classList.add(`apexcharts-series-markers`),s.appendChild(o.node),a.appendChild(s)}}}enlargeCurrentPoint(e,t,n=null,r=null){let i=this.w;i.config.chart.type!==`bubble`&&this.newPointSize(e,t);let a=t.getAttribute(`cx`),o=t.getAttribute(`cy`);if(n!==null&&r!==null&&(a=n,o=r),this.tooltipPosition.moveXCrosshairs(a),!this.fixedTooltip){if(i.config.chart.type===`radar`){let e=this.ttCtx.getElGrid();if(!e)return;let t=e.getBoundingClientRect();a=this.ttCtx.e.clientX-t.left}this.tooltipPosition.moveTooltip(a,o,i.config.markers.hover.size)}}enlargePoints(e){let t=this.w,n=this,r=this.ttCtx,i=e,a=t.dom.baseEl.querySelectorAll(`.apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker`),o=t.config.markers.hover.size;for(let e=0;e<a.length;e++){let s=a[e].getAttribute(`rel`),c=a[e].getAttribute(`index`);if(o===void 0&&(o=t.globals.markers.size[c]+t.config.markers.hover.sizeOffset),i===parseInt(s??`0`,10)){n.newPointSize(i,a[e]);let t=a[e].getAttribute(`cx`)??`0`,s=a[e].getAttribute(`cy`)??`0`;n.tooltipPosition.moveXCrosshairs(parseFloat(t)),r.fixedTooltip||n.tooltipPosition.moveTooltip(parseFloat(t),parseFloat(s),o)}else n.oldPointSize(a[e])}}
66newPointSize(e,t){let n=this.w,r=n.config.markers.hover.size,i=e===0?t.parentNode.firstChild:t.parentNode.lastChild;if(i.getAttribute(`default-marker-size`)!==`0`){let e=parseInt(i.getAttribute(`index`),10);r===void 0&&(r=n.globals.markers.size[e]+n.config.markers.hover.sizeOffset),r<0&&(r=0);let a=this.ttCtx.tooltipUtil.getPathFromPoint(t,r);t.setAttribute(`d`,a)}}oldPointSize(e){let t=parseFloat(e.getAttribute(`default-marker-size`)),n=this.ttCtx.tooltipUtil.getPathFromPoint(e,t);e.setAttribute(`d`,n)}resetPointsSize(){let e=this.w.dom.baseEl.querySelectorAll(`.apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker`);for(let t=0;t<e.length;t++){let n=parseFloat(e[t].getAttribute(`default-marker-size`)??`0`);if(Z.isNumber(n)&&n>0){let r=this.ttCtx.tooltipUtil.getPathFromPoint(e[t],n);e[t].setAttribute(`d`,r)}else e[t].setAttribute(`d`,`M0,0`)}}},Uy=class{constructor(e){this.w=e.w;let t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.config.chart.type===`rangeBar`&&t.config.plotOptions.bar.rangeBarGroupRows}getAttr(e,t){return parseFloat(e.target.getAttribute(t)??``)}handleHeatTreeTooltip({e,opt:t,x:n,y:r,type:i}){let a=this.ttCtx,o=this.w;if(e.target.classList.contains(`apexcharts-${i}-rect`)){let i=this.getAttr(e,`i`),s=this.getAttr(e,`j`),c=this.getAttr(e,`cx`),l=this.getAttr(e,`cy`),u=this.getAttr(e,`width`),d=this.getAttr(e,`height`);if(a.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i,j:s,shared:!1,e}),o.interact.capturedSeriesIndex=i,o.interact.capturedDataPointIndex=s,n=c+a.tooltipRect.ttWidth/2+u,r=l+a.tooltipRect.ttHeight/2-d/2,a.tooltipPosition.moveXCrosshairs(c+u/2),n>o.layout.gridWidth/2&&(n=c-a.tooltipRect.ttWidth/2+u),a.w.config.tooltip.followCursor){let e=o.dom.elWrap.getBoundingClientRect();n=(o.interact.clientX??0)-e.left-(n>o.layout.gridWidth/2?a.tooltipRect.ttWidth:0),r=(o.interact.clientY??0)-e.top-(r>o.layout.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:n,y:r}}handleMarkerTooltip({e,opt:t,x:n,y:r}){let i=this.w,a=this.ttCtx,o,s;if(e.target.classList.contains(`apexcharts-marker`)){let c=parseInt(t.paths.getAttribute(`cx`),10),l=parseInt(t.paths.getAttribute(`cy`),10),u=parseFloat(t.paths.getAttribute(`val`));if(s=parseInt(t.paths.getAttribute(`rel`),10),o=parseInt(t.paths.parentNode.parentNode.parentNode.getAttribute(`rel`),10)-1,a.intersect){let e=Z.findAnce
66stor(t.paths,`apexcharts-series`);e&&(o=parseInt(e.getAttribute(`data:realIndex`),10))}a.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:o,j:s,shared:!a.showOnIntersect&&i.config.tooltip.shared,e}),e.type===`mouseup`&&a.markerClick(e,o,s),i.interact.capturedSeriesIndex=o,i.interact.capturedDataPointIndex=s;let d=!!i.config.tooltip.arrow;if(n=c,d?r=l:(r=l+i.layout.translateY-a.tooltipRect.ttHeight*1.4,u<0&&(r=l)),a.w.config.tooltip.followCursor){let e=a.getElGrid();if(!e)return{x:n,y:r};let t=e.getBoundingClientRect();r=a.e.clientY+i.layout.translateY-t.top}a.marker.enlargeCurrentPoint(s,t.paths,n,r)}return{x:n,y:r}}handleBarTooltip({e,opt:t}){let n=this.w,r=this.ttCtx,i=r.getElTooltip(),a=0,o=0,s=0,c=0,l,u=this.getBarTooltipXY({e,opt:t});if(u.j===null&&u.barHeight===0&&u.barWidth===0)return;c=u.i;let d=u.j;if(n.interact.capturedSeriesIndex=c,n.interact.capturedDataPointIndex=d===null?n.interact.capturedDataPointIndex:d,n.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||!n.config.tooltip.shared?(o=u.x,s=u.y,l=Array.isArray(n.config.stroke.width)?n.config.stroke.width[c]:n.config.stroke.width,a=o):!n.globals.comboCharts&&!n.config.tooltip.shared&&(a/=2),isNaN(s)&&(s=n.globals.svgHeight-r.tooltipRect.ttHeight),o+r.tooltipRect.ttWidth>n.layout.gridWidth?o-=r.tooltipRect.ttWidth:o<0&&(o=0),(!r.w.config.tooltip.followCursor||r.getElGrid())&&(r.tooltip===null&&(r.tooltip=n.dom.baseEl.querySelector(`.apexcharts-tooltip`)),n.config.tooltip.shared||(n.globals.comboBarCount>0?r.tooltipPosition.moveXCrosshairs(a+l/2):r.tooltipPosition.moveXCrosshairs(a)),!r.fixedTooltip&&(!n.config.tooltip.shared||n.globals.isBarHorizontal&&r.tooltipUtil.hasBars())&&(s=s+n.layout.translateY-r.tooltipRect.ttHeight/2,i))){let e=r.tooltipRect.ttWidth||0,t=r.tooltipRect.ttHeight||0,a=!!n.config.tooltip.arrow,{barAnchorXInGrid:c,barAnchorYInGrid:l,barRectInGrid:d}=u,f=r.getElGrid()?.getBoundingClientRect(),p=n.dom.elWrap.getBoundingClientRect(),m=f?f.left-p.left:n.layout.translateX,h,g=null,_=null,v=o+m,y=s;if(a&&n.globals.isBarHorizontal&&d!=null){let r=n.layout.translateY,i=n.layout.translateY+n.layout.gridHeight,a=m,o=m+n.layout.gridWidth,s=(d.left+d.right)/2+m,c=d.top+n.layout.translateY,l=d.bottom+n.layout.translateY,u=c-t-7;if(h=`top`,u<r){let e=l+7;e+t<=i&&(h=`bottom`,u=e)}y=u,v=s-e/2,v<a&&(v=a),v+e>o&&(v=o-e),_=Math.max(10,Math.min(e-10,s-v))}else if(a&&c!=null&&l!=null){let r=c+m,i=m+n.layout.gridWidth/2,a=(d?.left??c)+m,o=(d?.right??c)+m;if(r<i?(h=`right`,v=o+7):(h=`left`,v=a-e-7),d){y=(d.top+d.bottom)/2+n.layout.translateY-t/2;let e=n.layout.translateY,r=n.layout.translateY+n.layout.gridHeight;y<e&&(y=e),y+t>r&&(y=r-t)}if(t>0&&d){let e=(d.top+d.bottom)/2+n.layout.translateY;g=Math.max(10,Math.min(t-10,e-y))}}r.tooltipPosition.applyTooltipPosition(i,{x:v,y,placement:h,arrowY:g,arrowX:_})}}getBarTooltipXY({e,opt:t}){let n=this.w,r=null,i=this.ttCtx,a=0,o=0,s=0,c=0,l=0,u=null,d=null,f=null,p=null,m=null,h=e.target.classList;if(h.contains(`apexcharts-bar-area`)||h.contains(`apexcharts-candlestick-area`)||h.contains(`apexcharts-boxPlot-area`)||h.contains(`apexcharts-rangebar-area`)){let h=e.target,g=h.getBoundingClientRect(),_=t.elGrid.getBoundingClientRect(),v=g.height;l=g.height;let y=g.width,b=parseInt(h.getAttribute(`cx`),10),x=parseInt(h.getAttribute(`cy`),10);u=b,d=x,c=parseFloat(h.getAttribute(`barWidth`));let S=g.left-_.left,C=g.top-_.top,w=S+y/2,T=C+v/2;f=w,p=n.globals.isBarHorizontal?T:C,m={left:S,top:C,right:S+y,bottom:C+v};let E=e.type===`touchmove`?e.touches[0].clientX:e.clientX;r=parseInt(h.getAttribute(`j`),10),a=parseInt(h.parentNode.getAttribute(`rel`),10)-1;let D=h.getAttribute(`data-range-y1`),O=h.getAttribute(`data-range-y2`);n.globals.comboCharts&&(a=parseInt(h.parentNode.getAttribute(`data:realIndex`),10));let k=e=>(e=n.axisFlags.isXNumeric?b-y/2:this.isVerticalGroupedRangeBar?b+y/2:b-i.dataPointsDividedWidth+y/2,e),A=()=>x-i.dataPointsDividedHeight+v/2-i.tooltipRect.ttHeight/2;i.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:a,j:r,y1:D?parseInt(D,10):null,y2:O?parseInt(O,10):null,shared:!i.showOnIntersect&&n.config.tooltip.shared,e}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(o=E-_.left+15,s=A()):(o=k(o),s=e.clientY-_.top-i.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?(o=b,i.xyRatios&&o<i.xyRatios.baseLineInvertedY&&(o=b-i.tooltipRect.ttWidth),s=A()):(o=k(o),s=x)}return{x:o,y:s,barHeight:l,barWidth:c,i:a,j:r,barCx:u,barCy:d,barAnchorXInGrid:f,barAnchorYInGri
66d:p,barRectInGrid:m}}},Wy=class{constructor(e){this.w=e.w,this.ttCtx=e}drawXaxisTooltip(){let e=this.w,t=this.ttCtx,n=e.config.xaxis.position===`bottom`;t.xaxisOffY=n?e.layout.gridHeight+1:-e.layout.xAxisHeight-e.config.xaxis.axisTicks.height+3;let r=n?`apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom`:`apexcharts-xaxistooltip apexcharts-xaxistooltip-top`,i=e.dom.elWrap;t.isXAxisTooltipEnabled&&e.dom.baseEl.querySelector(`.apexcharts-xaxistooltip`)===null&&(t.xaxisTooltip=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.xaxisTooltip.setAttribute(`class`,r+` apexcharts-theme-`+e.config.tooltip.theme),i.appendChild(t.xaxisTooltip),t.xaxisTooltipText=X.createElementNS(`http://www.w3.org/1999/xhtml`,`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))}drawYaxisTooltip(){let e=this.w,t=this.ttCtx;for(let n=0;n<e.config.yaxis.length;n++){let r=e.config.yaxis[n].opposite||e.config.yaxis[n].crosshairs.opposite;t.yaxisOffX=r?e.layout.gridWidth+1:1;let i=r?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${n} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${n} apexcharts-yaxistooltip-left`,a=e.dom.elWrap;e.dom.baseEl.querySelector(`.apexcharts-yaxistooltip apexcharts-yaxistooltip-${n}`)===null&&(t.yaxisTooltip=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.yaxisTooltip.setAttribute(`class`,i+` apexcharts-theme-`+e.config.tooltip.theme),a.appendChild(t.yaxisTooltip),n===0&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[n]=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),t.yaxisTooltipText[n].classList.add(`apexcharts-yaxistooltip-text`),t.yaxisTooltip.appendChild(t.yaxisTooltipText[n]))}}setXCrosshairWidth(){let e=this.w,t=this.ttCtx,n=t.getElXCrosshairs();if(t.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){let n=e.dom.baseEl.querySelector(`.apexcharts-bar-area`);if(n!==null&&e.config.xaxis.crosshairs.width===`barWidth`)t.xcrosshairsWidth=parseFloat(n.getAttribute(`barWidth`)??`0`);else if(e.config.xaxis.crosshairs.width===`tickWidth`){let n=e.labelData.labels.length;t.xcrosshairsWidth=e.layout.gridWidth/n}}else if(e.config.xaxis.crosshairs.width===`tickWidth`){let n=e.labelData.labels.length;t.xcrosshairsWidth=e.layout.gridWidth/n}else if(e.config.xaxis.crosshairs.width===`barWidth`){let n=e.dom.baseEl.querySelector(`.apexcharts-bar-area`);t.xcrosshairsWidth=n===null?1:parseFloat(n.getAttribute(`barWidth`)??`0`)}e.globals.isBarHorizontal&&(t.xcrosshairsWidth=0),n!==null&&t.xcrosshairsWidth>0&&n.setAttribute(`width`,String(t.xcrosshairsWidth))}handleYCrosshair(){let e=this.w,t=this.ttCtx;t.ycrosshairs=e.dom.baseEl.querySelector(`.apexcharts-ycrosshairs`),t.ycrosshairsHidden=e.dom.baseEl.querySelector(`.apexcharts-ycrosshairs-hidden`)}drawYaxisTooltipText(e,t,n){let r=this.ttCtx,i=this.w,a=i.globals,o=a.seriesYAxisMap[e];if(r.yaxisTooltips[e]&&o.length>0){let s=i.formatters.yLabelFormatters[e],c=r.getElGrid();if(!c)return;let l=c.getBoundingClientRect(),u=o[0],d=0;n.yRatio.length>1&&(d=u);let f=(t-l.top)*n.yRatio[d],p=a.maxYArr[u]-a.minYArr[u],m=a.minYArr[u]+(p-f);i.config.yaxis[e].reversed&&(m=a.maxYArr[u]-(p-f)),r.tooltipPosition.moveYCrosshairs(t-l.top),r.yaxisTooltipText[e].innerHTML=s(m),r.tooltipPosition.moveYAxisTooltip(e)}}},Gy=class{constructor(e,t){this.w=e,this.ctx=t,this.tConfig=e.config.tooltip,this.tooltipUtil=new Ry(this),this.tooltipLabels=new zy(this),this.tooltipPosition=new By(this),this.marker=new Hy(this),this.intersect=new Uy(this),this.axesTooltip=new Wy(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.tooltip=null,this.e=null,this.isBarShared=!e.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1,this.xyRatios=null,this.isXAxisTooltipEnabled=!1,this.yaxisTooltips=[],this.allTooltipSeriesGroups=[],this.xAxisTicksPositions=null,this.dataPointsDividedHeight=0,this.dataPointsDividedWidth=0,this.tooltipTitle=null,this.legendLabels=null,this.ttItems=null,this.seriesBound=null,this.seriesHoverTimeout=void 0,this.clientX=0,this.clientY=0,this.barSeriesHeight=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}setupDimensionCache(){let e=this.w,t=this.getElTooltip();t&&(this.updateDimensionCache(),typeof ResizeObserver<`u`&&!e.globals.resizeObserver&&(e.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),e.globals.resizeObserver.observe(t)))}updateDimensionCache(){let e=this.w,t=this.getElTooltip();if(!t)return;let n=t.getBoundingClientRect();e.globals.dimensionCache.tooltip={width:n.width,height:n.height,lastUpdate:Date.now()}}getCachedDimensions(){let e=this.w;if(e.globals.dimensionCache.tooltip){let t=e.globals.dimensionCache.tooltip;if(Date.now()-t.lastUpdate<1e3)return{ttWidth:t.width,ttHeight:t.height}}this.updateDimensionCache();let t=e.globals.dimensionCache.tooltip;return t?{ttWidth:t.width,ttHeight:t.height}:{ttWidth:0,ttHeight:0}}getElTooltip(e){return e||=this,e.w.dom.baseEl?e.w.dom.baseEl.querySelector(`.apexcharts-tooltip`):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(`.apexcharts-xcrosshairs`)}getElGrid(){return this.w.dom.baseEl.querySelector(`.apexcharts-grid`)}drawTooltip(e){let t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(e=>!!(e.show&&e.tooltip.enabled&&t.globals.axisCharts)),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);let n=this.getElTooltip();n?.parentNode&&n.parentNode.removeChild(n),this.tooltipTitle=null;let r=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);r.classList.add(`apexcharts-tooltip`),t.config.tooltip.cssClass&&r.classList.add(t.config.tooltip.cssClass),r.classList.add(`apexcharts-theme-${this.tConfig.theme||`light`}`),this.tConfig.fillSeriesColor&&r.classList.add(`apexcharts-tooltip-fill-series`),this.tConfig.style&&this.tConfig.style.background&&r.style.setProperty(`--apx-tt-bg`,this.tConfig.style.background);let i=this.tConfig.shared&&t.config.series.length>1&&!t.globals.isBarHorizontal;if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!i&&!this.tConfig.fillSeriesColor&&t.globals.axisCharts){let e=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);e.classList.add(`apexcharts-tooltip-arrow`),r.appendChild(e)}if(t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&(r.setAttribute(`role`,`tooltip`),r.setAttribute(`aria-live`,`polite`),r.setAttribute(`aria-atomic`,`true`),r.setAttribute(`aria-hidden`,`true`)),t.dom.elWrap.appendChild(r),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();let e=new $v(this.w,this.ctx,void 0);this.xAxisTicksPositions=e.getXAxisTicksPositions()}if((t.globals.comboCharts||this.tConfig.intersect||t.config.chart.type===`rangeBar`)&&!this.tConfig.shared&&(this.showOnIntersect=!0),(t.config.markers.size===0||t.globals.markers.largestSize===0)&&this.marker.drawDynamicPoints(),t.globals.collapsedSeries.length===t.seriesData.series.length)return;this.dataPointsDividedHeight=t.layout.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.layout.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=X.createElementNS(`http://www.w3.org/1999/xhtml`,`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,r.appendChild(this.tooltipTitle));let a=t.seriesData.series.length;
66(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(a=this.showOnIntersect?1:t.seriesData.series.length),this.legendLabels=t.dom.baseEl.querySelectorAll(`.apexcharts-legend-text`),this.ttItems=this.createTTElements(a),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(e){let t=this.w,n=[],r=this.getElTooltip();if(!r)return n;for(let i=0;i<e;i++){let a=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);a.classList.add(`apexcharts-tooltip-series-group`,`apexcharts-tooltip-series-group-${i}`),a.style.order=String(t.config.tooltip.inverseOrder?e-i:i+1);let o=X.createElementNS(`http://www.w3.org/1999/xhtml`,`span`);o.classList.add(`apexcharts-tooltip-marker`),t.config.tooltip.fillSeriesColor?o.style.backgroundColor=t.globals.colors[i]:o.style.color=t.globals.colors[i];let s=t.config.markers.shape,c=s;Array.isArray(s)&&(c=s[i]),o.setAttribute(`shape`,c),o.innerHTML=Vy(c),a.appendChild(o);let l=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);l.classList.add(`apexcharts-tooltip-text`),l.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,l.style.fontSize=this.tConfig.style.fontSize,[`y`,`goals`,`z`].forEach(e=>{let t=X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`);t.classList.add(`apexcharts-tooltip-${e}-group`);let n=X.createElementNS(`http://www.w3.org/1999/xhtml`,`span`);n.classList.add(`apexcharts-tooltip-text-${e}-label`),t.appendChild(n);let r=X.createElementNS(`http://www.w3.org/1999/xhtml`,`span`);r.classList.add(`apexcharts-tooltip-text-${e}-value`),t.appendChild(r),l.appendChild(t)}),a.appendChild(l),r.appendChild(a),n.push(a)}return n}addSVGEvents(){let e=this.w,t=e.config.chart.type,n=this.getElTooltip();if(!n)return;let r=t===`bar`||t===`candlestick`||t===`boxPlot`||t===`violin`||t===`rangeBar`,i=t===`area`||t===`line`||t===`scatter`||t===`bubble`||t===`radar`,a=e.dom.Paper.node,o=this.getElGrid();o&&(this.seriesBound=o.getBoundingClientRect());let s=[],c=[],l={hoverArea:a,elGrid:o,tooltipEl:n,tooltipY:s,tooltipX:c,ttItems:this.ttItems},u;if(e.globals.axisCharts&&(i?u=e.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker`):r?u=e.dom.baseEl.querySelectorAll(`.apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-violin-area, .apexcharts-series .apexcharts-rangebar-area`):(t===`heatmap`||t===`treemap`)&&(u=e.dom.baseEl.querySelectorAll(`.apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap`)),u&&u.length))for(let e=0;e<u.length;e++)s.push(u[e].getAttribute(`cy`)),c.push(u[e].getAttribute(`cx`));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||r&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([a],l);else if(r&&!e.globals.comboCharts||i&&this.showOnIntersect)this.addDatapointEventsListeners(l);else if(!e.globals.axisCharts||t===`heatmap`||t===`treemap`){let t=e.dom.baseEl.querySelectorAll(`.apexcharts-series`);this.addPathsEventListeners(t,l)}if(this.showOnIntersect){let t=e.dom.baseEl.querySelectorAll(`.apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker`);t.length>0&&this.addPathsEventListeners(t,l),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(l)}}drawFixedTooltipRect(){let e=this.w,t=this.getElTooltip();if(!t)return{x:0,y:0,ttWidth:0,ttHeight:0};let n=t.getBoundingClientRect(),r=n.width+10,i=n.height+10,a=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf(`right`)>-1&&(a=a+e.globals.svgWidth-r+10),s.indexOf(`bottom`)>-1&&(o=o+e.globals.svgHeight-i-10),this.tooltipPosition.applyTooltipPosition(t,{x:a,y:o}),{x:a,y:o,ttWidth:r,ttHeight:i}}addDatapointEventsListeners(e){let t=this.w.dom.baseEl.querySelectorAll(`.apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area`);this.addPathsEventListeners(t,e)}addPathsEventListeners(e,t){let n=this;for(let r=0;r<e.length;r++){let i={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(t=>
66e[r].addEventListener(t,n.onSeriesHover.bind(n,i),{capture:!1,passive:!0}))}}onSeriesHover(e,t){let n=Date.now()-this.lastHoverTime;n>=20?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(e,t)},20-n))}seriesHover(e,t){this.lastHoverTime=Date.now();let n=[],r=this.w;r.config.chart.group&&(n=this.ctx.getGroupedCharts()),!(r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||r.globals.dataPoints===0))&&(n.length?n.forEach(n=>{let r=this.getElTooltip(n),i={paths:e.paths,tooltipEl:r,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:n.w.globals.tooltip.ttItems};n.w.globals.minX===this.w.globals.minX&&n.w.globals.maxX===this.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:i,e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}seriesHoverByContext({chartCtx:e,ttCtx:t,opt:n,e:r}){let i=e.w;if(!this.getElTooltip(e))return;let a=t.getCachedDimensions();t.tooltipRect={x:0,y:0,ttWidth:a.ttWidth,ttHeight:a.ttHeight},t.e=r,t.tooltipUtil.hasBars()&&!i.globals.comboCharts&&!t.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new dy(e.w).toggleSeriesOnHover(r,r.target.parentNode),i.globals.axisCharts?t.axisChartsTooltips({e:r,opt:n,tooltipRect:t.tooltipRect}):t.nonAxisChartsTooltips({e:r,opt:n,tooltipRect:t.tooltipRect}),t.fixedTooltip&&t.drawFixedTooltipRect()}axisChartsTooltips({e,opt:t}){let n=this.w,r,i,a=t.elGrid.getBoundingClientRect(),o=e.type===`touchmove`?e.touches[0].clientX:e.clientX,s=e.type===`touchmove`?e.touches[0].clientY:e.clientY;if(this.clientY=s,this.clientX=o,n.interact.capturedSeriesIndex=-1,n.interact.capturedDataPointIndex=-1,s<a.top||s>a.top+a.height){this.handleMouseOut(t);return}if(Array.isArray(this.tConfig.enabledOnSeries)&&!n.config.tooltip.shared){let e=parseInt(t.paths.getAttribute(`index`),10);if(this.tConfig.enabledOnSeries.indexOf(e)<0){this.handleMouseOut(t);return}}let c=this.getElTooltip();if(!c)return;let l=this.getElXCrosshairs(),u=[];n.config.chart.group&&(u=this.ctx.getSyncedCharts());let d=n.globals.xyCharts||n.config.chart.type===`bar`&&!n.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||n.globals.comboCharts&&this.tooltipUtil.hasBars();if(e.type===`mousemove`||e.type===`touchmove`||e.type===`mouseup`){if(n.globals.collapsedSeries.length+n.globals.ancillaryCollapsedSeries.length===n.seriesData.series.length)return;l!==null&&l.classList.add(`apexcharts-active`);let a=this.yaxisTooltips?.filter(e=>e===!0),f=this.ycrosshairs;if(f!==null&&a?.length&&f.classList.add(`apexcharts-active`),d&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(e,o,s,t);else if(n.config.chart.type===`heatmap`||n.config.chart.type===`treemap`){let a=this.intersect.handleHeatTreeTooltip({e,opt:t,x:r,y:i,type:n.config.chart.type});r=a.x,i=a.y,c.style.left=r+`px`,c.style.top=i+`px`}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e,opt:t}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e,opt:t,x:r,y:i});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let e=0;e<n.config.yaxis.length;e++)this.axesTooltip.drawYaxisTooltipText(e,s,this.xyRatios);n.dom.baseEl.classList.add(`apexcharts-tooltip-active`),t.tooltipEl.classList.add(`apexcharts-active`),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&t.tooltipEl.removeAttribute(`aria-hidden`)}else(e.type===`mouseout`||e.type===`touchend`)&&this.handleMouseOut(t)}nonAxisChartsTooltips({e,opt:t,tooltipRect:n}){var r;let i=this.w,a=t.paths.getAttribute(`rel`),o=this.getElTooltip();if(!o)return;let s=i.dom.elWrap.getBoundingClientRect();if(e.type===`mousemove`||e.type===`touchmove`){i.dom.baseEl.classList.add(`apexcharts-tooltip-active`),o.classList.add(`apexcharts-active`),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&o.removeAttribute(`aria-hidden`),this.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:parseInt(a,10)-1,shared:!1});let e,r,c=t.paths.querySelector(`path[data\\:cx]`)||t.paths;if(i.config.tooltip.intersect&&c.hasAttribute(`data:cx`)&&c.hasAttribute(`data:cy`)){let t=i.dom.Paper.node.getBoundingClientRect();
66e=t.left-s.left+parseFloat(c.getAttribute(`data:cx`))-n.ttWidth/2,r=t.top-s.top+parseFloat(c.getAttribute(`data:cy`))-n.ttHeight-10}else e=(i.interact.clientX??0)-s.left-n.ttWidth/2,r=(i.interact.clientY??0)-s.top-n.ttHeight-10;if(o.style.left=e+`px`,o.style.top=r+`px`,i.config.legend.tooltipHoverFormatter){let e=i.config.legend.tooltipHoverFormatter,t=a-1,n=this.legendLabels?.[t];if(!n)return;n.innerHTML=e(n.getAttribute(`data:default-text`),{seriesIndex:t,dataPointIndex:t,w:i})}}else(e.type===`mouseout`||e.type===`touchend`)&&(o.classList.remove(`apexcharts-active`),i.dom.baseEl.classList.remove(`apexcharts-tooltip-active`),i.config.legend.tooltipHoverFormatter&&((r=this.legendLabels)==null||r.forEach(e=>{let t=e.getAttribute(`data:default-text`);e.innerHTML=decodeURIComponent(t??``)})))}handleStickyTooltip(e,t,n,r){let i=this.w,a=this.tooltipUtil.getNearestValues({context:this,hoverArea:r.hoverArea,elGrid:r.elGrid,clientX:t,clientY:n}),o=a.j,s=a.capturedSeries;s!==null&&i.globals.collapsedSeriesIndices.includes(s??-1)&&(s=null);let c=r.elGrid.getBoundingClientRect();if(a.hoverX<0||a.hoverX>c.width){this.handleMouseOut(r);return}if(s!==null)this.handleStickyCapturedSeries(e,s??-1,r,o??0);else if(this.tooltipUtil.isXoverlap(o??0)||i.globals.isBarHorizontal){let t=i.seriesData.series.findIndex((e,t)=>!i.globals.collapsedSeriesIndices.includes(t));this.create(e,this,t,o??0,r.ttItems)}}handleStickyCapturedSeries(e,t,n,r){let i=this.w;if(!this.tConfig.shared&&i.seriesData.series[t][r]===null){this.handleMouseOut(n);return}if(i.seriesData.series[t][r]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(r)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,r,n.ttItems):this.create(e,this,t,r,n.ttItems,!1);else if(this.tooltipUtil.isXoverlap(r)){let t=i.seriesData.series.findIndex((e,t)=>!i.globals.collapsedSeriesIndices.includes(t));this.create(e,this,t,r,n.ttItems)}}deactivateHoverFilter(){let e=this.w,t=new Q(this.w,this.ctx),n=e.dom.Paper.find(`.apexcharts-bar-area`);for(let e=0;e<n.length;e++)t.pathMouseLeave(n[e],void 0)}handleMouseOut(e){var t,n;let r=this.w,i=this.getElXCrosshairs();r.dom.baseEl.classList.remove(`apexcharts-tooltip-active`),e.tooltipEl.classList.remove(`apexcharts-active`),delete e.tooltipEl.dataset.positioned,r.config.chart.accessibility.enabled&&r.config.chart.accessibility.announcements.enabled&&e.tooltipEl.setAttribute(`aria-hidden`,`true`),this.deactivateHoverFilter(),r.config.chart.type!==`bubble`&&this.marker.resetPointsSize(),i!==null&&i.classList.remove(`apexcharts-active`);let a=this.ycrosshairs;if(a!==null&&a.classList.remove(`apexcharts-active`),this.isXAxisTooltipEnabled&&((t=this.xaxisTooltip)==null||t.classList.remove(`apexcharts-active`)),this.yaxisTooltips&&this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=[...r.dom.baseEl.querySelectorAll(`.apexcharts-yaxistooltip`)]);for(let e=0;e<this.yaxisTTEls.length;e++)this.yaxisTTEls[e].classList.remove(`apexcharts-active`)}r.config.legend.tooltipHoverFormatter&&((n=this.legendLabels)==null||n.forEach(e=>{let t=e.getAttribute(`data:default-text`);e.innerHTML=decodeURIComponent(t??``)}))}markerClick(e,t,n){let r=this.w;typeof r.config.chart.events.markerClick==`function`&&r.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:n,w:r}),this.ctx.events.fireEvent(`markerClick`,[e,this.ctx,{seriesIndex:t,dataPointIndex:n,w:r}])}create(e,t,n,r,i,a=null){let o=this.w,s=t;e.type===`mouseup`&&this.markerClick(e,n,r),a===null&&(a=this.tConfig.shared);let c=this.tooltipUtil.hasMarkers(n),l=this.tooltipUtil.getElBars(),u=()=>{o.globals.markers.largestSize>0?s.marker.enlargePoints(r):s.tooltipPosition.moveDynamicPointsOnHover(r)};if(o.config.legend.tooltipHoverFormatter){let e=o.config.legend.tooltipHoverFormatter,t=Array.from(this.legendLabels??[]);t.forEach(e=>{let t=e.getAttribute(`data:default-text`);e.innerHTML=decodeURIComponent(t??``)});for(let i=0;i<t.length;i++){let s=t[i],c=parseInt(s.getAttribute(`i`)??``,10),l=decodeURIComponent(s.getAttribute(`data:default-text`)??``),u=e(l,{seriesIndex:a?c:n,dataPointIndex:r,w:o});if(a)s.innerHTML=o.globals.collapsedSeriesIndices.indexOf(c)<0?u:l;else if(s.innerHTML=c===n?u:l,n===c)break}}let d=o.rangeData,f=K(K({ttItems:i,i:n,j:r},(d.seriesRange?.[n]?.[r])?.y[0]?.y1!==void 0&&{y1:(d.seriesRange?.[n]?.[r])?.y[0]?.y1}),(d.seriesRange?.[n]?.[r])?.y[0]?.y2!==void 0&&{y2:(d.seriesRange?.[n]?.[r])?.y[0]?.y2});if(a){if(s.tooltipLabels.drawSeriesTexts(q(K({},f),{shared:!this.showOnIntersect&&this.tConfig.shared})),c)u();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...l]),this.barSeriesHeight>0)){let e=new Q(this.w,this.ctx),t=o.dom.Paper.find(`.apexcharts-bar-area[j='${r}']`);this.deactivateHoverFilter(),s.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&u(),s.tooltipPosition.moveStickyTooltipOverBars(r,n);for(let n=0;n<t.length;n++)e.pathMouseEnter(t[n],void 0)}}else s.tooltipLabels.drawSeriesTexts(K({shared:!1},f)),this.tooltipUtil.hasBars()&&s.tooltipPosition.moveStickyTooltipOverBars(r,n),c&&s.tooltipPosition.moveMarkers(n,r)}},Ky=class e{constructor(e){this.node=e,e&&(e.instance=this),this._listeners=[],this._filter=null}attr(e,t){if(typeof e==`string`&&t===void 0)return this.node.getAttribute(e);let n=typeof e==`string`?{[e]:t}:e;for(let e in n){let t=n[e];t===null?this.node.removeAttribute(e):t!==void 0&&(typeof t==`number`&&isNaN(t)&&(t=0),this.node.setAttribute(e,t))}if(this.node.nodeName===`text`&&n.x!=null){let e=this.node.querySelectorAll(`tspan[data-newline]`);for(let t=0;t<e.length;t++)e[t].setAttribute(`x`,n.x)}return this}css(e){for(let t in e)this.node.style[t]=e[t];return this}fill(e){return typeof e==`object`?this.attr(e):this.attr(`fill`,e)}stroke(e){return typeof e==`object`?(e.color!==void 0&&this.attr(`stroke`,e.color),e.width!==void 0&&this.attr(`stroke-width`,e.width),e.dasharray!==void 0&&this.attr(`stroke-dasharray`,e.dasharray),e.linecap!==void 0&&this.attr(`stroke-linecap`,e.linecap),e.opacity!==void 0&&this.attr(`stroke-opacity`,e.opacity),this):this.attr(`stroke`,e)}size(e,t){return this.attr({width:e,height:t})}move(e,t){return this.attr({x:e,y:t})}center(e,t){if(this.node.nodeName===`g`){let n=this.bbox(),r=e-(n.x+n.width/2),i=t-(n.y+n.height/2);return this.attr(`transform`,`translate(${r}, ${i})`)}return this.attr({cx:e,cy:t})}add(e){return this.node.appendChild(e.node||e),this}addTo(e){return(e.node||e).appendChild(this.node),this}remove(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this}clear(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this}find(t){return Array.from(this.node.querySelectorAll(t)).map(t=>t.instance||new e(t))}findOne(t){let n=this.node.querySelector(t);return n?n.instance||new e(n):null}on(e,t){let n=e.split(`.`)[0];return this._listeners.push({event:e,eventType:n,handler:t}),this.node.addEventListener(n,t),this}
66off(e,t){if(!e&&!t)this._listeners.forEach(e=>{this.node.removeEventListener(e.eventType,e.handler)}),this._listeners=[];else if(e&&!t){let t=e.split(`.`)[0];this._listeners=this._listeners.filter(e=>e.eventType!==t||(this.node.removeEventListener(e.eventType,e.handler),!1))}else{let n=e.split(`.`)[0];this._listeners=this._listeners.filter(e=>e.eventType===n&&e.handler===t?(this.node.removeEventListener(e.eventType,e.handler),!1):!0)}return this}each(t,n){return Array.from(this.node.children).forEach(r=>{let i=r.instance||new e(r);t.call(i),n&&i.each(t,n)}),this}removeClass(e){return e===`*`?this.node.removeAttribute(`class`):this.node.classList.remove(e),this}children(){return Array.from(this.node.childNodes).filter(e=>e.nodeType===1).map(t=>t.instance||new e(t))}hide(){return this.node.style.display=`none`,this}show(){return this.node.style.display=``,this}bbox(){if(typeof this.node.getBBox==`function`)try{return this.node.getBBox()}catch{}return{x:0,y:0,width:0,height:0}}tspan(t){let n=X.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);return n.textContent=t,this.node.appendChild(n),new e(n)}plot(e){return typeof e==`string`&&this.attr(`d`,e),this}animate(){throw Error(`Animation module not loaded`)}filterWith(){throw Error(`Filter module not loaded`)}unfilter(e){return this._filter&&=(this.node.removeAttribute(`filter`),e&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),null),this}filterer(){return this._filter}},qy=0,Jy=class extends Ky{constructor(e,t,n){let r=t===`radial`?`radialGradient`:`linearGradient`,i=X.createElementNS($,r);super(i),this._id=`SvgjsGradient`+ ++qy,this.attr(`id`,this._id),typeof n==`function`&&n(new Yy(this));let a=e.node.querySelector(`defs`);a||(a=X.createElementNS($,`defs`),e.node.appendChild(a)),a.appendChild(this.node)}stop(e,t,n){let r=X.createElementNS($,`stop`);return r.setAttribute(`offset`,e),r.setAttribute(`stop-color`,t),n!==void 0&&r.setAttribute(`stop-opacity`,String(n)),this.node.appendChild(r),this}from(e,t){return this.attr({x1:e,y1:t})}to(e,t){return this.attr({x2:e,y2:t})}url(){return`url(#`+this._id+`)`}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}},Yy=class{constructor(e){this.gradient=e}stop(e,t,n){return this.gradient.stop(e,t,n),this}},Xy=0,Zy=class extends Ky{constructor(e,t,n,r){let i=X.createElementNS($,`pattern`);super(i),this._id=`SvgjsPattern`+ ++Xy,this.attr({id:this._id,width:t,height:n,patternUnits:`userSpaceOnUse`}),typeof r==`function`&&r(new Qy(this.node));let a=e.node.querySelector(`defs`);a||(a=X.createElementNS($,`defs`),e.node.appendChild(a)),a.appendChild(this.node)}url(){return`url(#`+this._id+`)`}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}},Qy=class e extends Ky{line(e,t,n,r){let i=this._make(`line`);return e!==void 0&&i.attr({x1:e,y1:t,x2:n,y2:r}),i}rect(e,t){let n=this._make(`rect`);return e!==void 0&&n.attr({width:e,height:t}),n}circle(e){let t=this._make(`circle`);return e!==void 0&&t.attr({r:e/2,cx:e/2,cy:e/2}),t}path(e){let t=this._make(`path`);return e&&t.attr(`d`,e),t}polygon(e){let t=this._make(`polygon`);return e&&t.attr(`points`,e),t}group(){return this._makeContainer(`g`)}defs(){return this._makeContainer(`defs`)}plain(e){let t=X.createElementNS($,`text`);t.textContent=e;let n=new Ky(t);return this.node.appendChild(t),n}text(e){let t=X.createElementNS($,`text`),n=new Ky(t);return this.node.appendChild(t),typeof e==`function`&&e(new $y(t)),n}image(e,t){let n=X.createElementNS($,`image`);n.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,e);let r=new Ky(n);if(this.node.appendChild(n),typeof t==`function`){let n=new Image;n.onload=function(){r.size(n.width,n.height),t.call(r,{width:n.width,height:n.height})},n.src=e}return r}gradient(e,t){return new Jy(this,e,t)}pattern(e,t,n){return new Zy(this,e,t,n)}_make(e){let t=X.createElementNS($,e);return this.node.appendChild(t),new Ky(t)}_makeContainer(t){let n=X.createElementNS($,t);return this.node.appendChild(n),new e(n)}},$y=class{constructor(e){this.textNode=e}tspan(e){let t=X.createElementNS($,`tspan`);return t.textContent=e,this.textNode.appendChild(t),new eb(t,this.textNode)}},eb=class{constructor(e,t){this.node=e,this.textNode=t}newLine(){return this.node.setAttribute(`dy`,`1.1em`),this.node.dataset.newline=`1`,this}},tb=0,nb=class extends Ky{constructor(){let e=X.createElementNS($,`filter`);super(e),this._id=`SvgjsFilter`+ ++tb,this.attr(`id`,this._id)}size(e,t,n,r){return this.attr({width:e,height:t,x:n,y:r})}},rb=class{constructor(e){this.filter=e}colorMatrix(e){return this._primitive(`feColorMatrix`,e)}offset(e){return this._primitive(`feOffset`,e)}gaussianBlur(e){return this._primitive(`feGaussianBlur`,e)}flood(e){return this._primitive(`feFlood`,e)}composite(e){return this._primitive(`feComposite`,e)}merge(e){let t=X.createElementNS($,`feMerge`);
66return e.forEach(e=>{let n=X.createElementNS($,`feMergeNode`);n.setAttribute(`in`,e),t.appendChild(n)}),this.filter.node.appendChild(t),new Ky(t)}_primitive(e,t){let n=X.createElementNS($,e);for(let e in t)n.setAttribute(e,t[e]);return this.filter.node.appendChild(n),new Ky(n)}};function ib(e){e.prototype.filterWith=function(e){let t=new nb;this._filter=t;let n=this.node;for(;n&&n.nodeName!==`svg`;)n=n.parentNode;if(n){let e=n.querySelector(`defs`);e||(e=X.createElementNS($,`defs`),n.insertBefore(e,n.firstChild)),e.appendChild(t.node)}return e(new rb(t)),this.attr(`filter`,`url(#`+t._id+`)`),this},e.prototype.unfilter=function(e){return this._filter&&=(this.node.removeAttribute(`filter`),e&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),null),this},e.prototype.filterer=function(){return this._filter}}function ab(e){if(!e||typeof e!=`string`)return[[`M`,0,0]];let t=[],n=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,r=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,i,a=[],o=[];for(;(i=n.exec(e))!==null;)a.push(i[1]),o.push(i.index);for(let n=0;n<a.length;n++){let i=o[n]+a[n].length,s=n+1<o.length?o[n+1]:e.length,c=e.substring(i,s),l=[],u;for(r.lastIndex=0;(u=r.exec(c))!==null;)l.push(parseFloat(u[0]));let d=a[n].toUpperCase();if(d===`Z`)t.push([`Z`]);else if(d===`M`||d===`L`||d===`T`)for(let e=0;e<l.length;e+=2)t.push([d,l[e],l[e+1]]);else if(d===`H`)for(let e=0;e<l.length;e++)t.push([d,l[e]]);else if(d===`V`)for(let e=0;e<l.length;e++)t.push([d,l[e]]);else if(d===`C`)for(let e=0;e<l.length;e+=6)t.push([d,l[e],l[e+1],l[e+2],l[e+3],l[e+4],l[e+5]]);else if(d===`S`||d===`Q`)for(let e=0;e<l.length;e+=4)t.push([d,l[e],l[e+1],l[e+2],l[e+3]]);else if(d===`A`)for(let e=0;e<l.length;e+=7)t.push([d,l[e],l[e+1],l[e+2],l[e+3],l[e+4],l[e+5],l[e+6]])}return t.length===0&&t.push([`M`,0,0]),t}function ob(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;return e.forEach(e=>{for(let a=1;a<e.length;a+=2)if(a+1<=e.length){let o=e[a],s=e[a+1];typeof o==`number`&&typeof s==`number`&&(o<t&&(t=o),o>r&&(r=o),s<n&&(n=s),s>i&&(i=s))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:n,width:r-t,height:i-n}}function sb(e){return e.map(e=>e.join(` `)).join(` `)}function cb(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 lb(e){var t=e.length;return this.pos=[e[t-2],e[t-1]],`SCQT`.indexOf(e[0])!=-1&&(this.reflection=[2*this.pos[0]-e[t-4],2*this.pos[1]-e[t-3]]),e}function ub(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]=e[4]*1/3+e[2]*2/3,e[3]=e[3]*1/3+e[1]*2/3,e[2]=this.pos[1]*1/3+e[2]*2/3,e[1]=this.pos[0]*1/3+e[1]*2/3;break;case`A`:t=fb(this.pos??[],e),e=t[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 db(e,t){if(t===!1)return!1;for(var n=t,r=e.length;n<r;++n)if(e[n][0]==`M`)return n;return!1}function fb(e,t){var n=Math.abs(t[1]),r=Math.abs(t[2]),i=t[3]%360,a=t[4],o=t[5],s=t[6],c=t[7],l=new Wv(e[0],e[1]),u=new Wv(s,c),d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N=[],ee,te,ne,re;if(n===0||r===0||l.x===u.x&&l.y===u.y)return[[`C`,l.x,l.y,u.x,u.y,u.x,u.y]];for(d=new Wv((l.x-u.x)/2,(l.y-u.y)/2).transform(new Gv().rotate(i)),f=d.x*d.x/(n*n)+d.y*d.y/(r*r),f>1&&(f=Math.sqrt(f),n=f*n,r=f*r),p=new Gv().rotate(i).scale(1/n,1/r).rotate(-i),l=l.transform(p),u=u.transform(p),m=[u.x-l.x,u.y-l.y],g=m[0]*m[0]+m[1]*m[1],h=Math.sqrt(g),m[0]/=h,m[1]/=h,_=g<4?Math.sqrt(1-g/4):0,a===o&&(_*=-1),v=new Wv((u.x+l.x)/2+_*-m[1],(u.y+l.y)/2+_*m[0]),y=new Wv(l.x-v.x,l.y-v.y),b=new Wv(u.x-v.x,u.y-v.y),x=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(x*=-1),S=Math.acos(b.x/Math.sqrt(b.x*b.x+b.y*b.y)),b.y<0&&(S*=-1),o&&x>S&&(S+=2*Math.PI),!o&&x<S&&(S-=2*Math.PI),w=Math.ceil(Math.abs(x-S)*2/Math.PI),E=[],D=x,C=(S-x)/w,T=4*Math.tan(C/4)/3,j=0;j<=w;j++)k=Math.cos(D),O=Math.sin(D),A=new Wv(v.x+k,v.y+O),E[j]=[new Wv(A.x+T*O,A.y-T*k),A,new Wv(A.x-T*O,A.y+T*k)],D+=C;for(E[0][0]=E[0][1].clone(),E[E.length-1][2]=E[E.length-1][1].clone(),p=new Gv().rotate(i).scale(n,r).rotate(-i),j=0,M=E.length;j<M;j++)E[j][0]=E[j][0].transform(p),E[j][1]=E[j][1].transform(p),E[j][2]=E[j][2].transform(p);for(j=1,M=E.length;j<M;j++)A=E[j-1][2],ee=A.x,te=A.y,A=E[j][0],ne=A.x,re=A.y,A=E[j][1],s=A.x,c=A.y,N.push([`C`,ee,te,ne,re,s,c]);return N}function pb(e,t,n,r,i,a){for(var o=e.slice(t,n||void 0),s=r.slice(i,a||void 0),c=0,l={pos:[0,0],start:[0,0]},u={pos:[0,0],start:[0,0]};o[c]=cb.call(l,o[c]),s[c]=cb.call(u,s[c]),o[c][0]!=s[c][0]||o[c][0]==`M`||o[c][0]==`A`&&(o[c][4]!=s[c][4]||o[c][5]!=s[c][5])?(Array.prototype.splice.apply(o,[c,1].concat(ub.call(l,o[c]))),Array.prototype.splice.apply(s,[c,1].concat(ub.call(u,s[c])))):(o[c]=lb.call(l,o[c]),s[c]=lb.call(u,s[c])),++c!=o.length||c!=s.length;)c==o.length&&o.push([`C`,l.pos[0],l.pos[1],l.pos[0],l.pos[1],l.pos[0],l.pos[1]]),c==s.length&&s.push([`C`,u.pos[0],u.pos[1],u.pos[0],u.pos[1],u.pos[0],u.pos[1]]);return{start:o,dest:s}}
66function mb(e,t){for(var n=ab(e),r=ab(t),i=0,a=0,o=!1,s=!1,c;i!==!1||a!==!1;){if(o=db(n,i!==!1&&i+1),s=db(r,a!==!1&&a+1),i===!1){let e=ob(c.start);i=e.height==0||e.width==0?n.push(n[0])-1:n.push([`M`,e.x+e.width/2,e.y+e.height/2])-1}if(a===!1){let e=ob(c.dest);a=e.height==0||e.width==0?r.push(r[0])-1:r.push([`M`,e.x+e.width/2,e.y+e.height/2])-1}c=pb(n,i,o,r,a,s),n=n.slice(0,i).concat(c.start,o===!1?[]:n.slice(o)),r=r.slice(0,a).concat(c.dest,s===!1?[]:r.slice(s)),i=o!==!1&&i+c.start.length,a=s!==!1&&a+c.dest.length}return{start:n,dest:r}}function hb(e,t){var n=mb(e,t),r=n.start,i=n.dest;return function(e){return sb(r.map(function(t,n){return i[n].map(function(r,a){return a===0?r:t[a]+(i[n][a]-t[a])*e})}))}}var gb=null,_b=null;function vb(e,t){let n=Array(t);if(!Y.isBrowser()){let r=ob(ab(e)),i=r.x+r.width/2,a=r.y+r.height/2;for(let e=0;e<t;e++)n[e]={x:i,y:a};return n}gb||(gb=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),gb.setAttribute(`width`,`0`),gb.setAttribute(`height`,`0`),gb.setAttribute(`style`,`position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;`),_b=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),gb.appendChild(_b),document.body.appendChild(gb)),_b.setAttribute(`d`,e||`M0 0`);let r=0;try{r=_b.getTotalLength()}catch{r=0}if(!r||!isFinite(r)){let r=ob(ab(e)),i=r.x+r.width/2,a=r.y+r.height/2;for(let e=0;e<t;e++)n[e]={x:i,y:a};return n}for(let e=0;e<t;e++)try{let i=_b.getPointAtLength(e/t*r);n[e]={x:i.x,y:i.y}}catch{n[e]={x:0,y:0}}return n}function yb(e,t,n=96){let r=vb(e,n),i=vb(t,n),a=0,o=1/0;for(let e=0;e<n;e++){let t=0;for(let a=0;a<n;a++){let s=r[(a+e)%n],c=i[a],l=s.x-c.x,u=s.y-c.y;if(t+=l*l+u*u,t>=o)break}t<o&&(o=t,a=e)}let s=Array(n);for(let e=0;e<n;e++)s[e]=r[(e+a)%n];return function(e){let t=``;for(let r=0;r<n;r++){let n=s[r],a=i[r],o=n.x+(a.x-n.x)*e,c=n.y+(a.y-n.y)*e;t+=(r===0?`M`:`L`)+o.toFixed(3)+` `+c.toFixed(3)+` `}return t+`Z`}}function bb(e){return-Math.cos(e*Math.PI)/2+.5}function xb(e){if(!e||typeof e!=`string`)return null;if(e[0]===`#`){let t=e.slice(1);t.length===3&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]);let n=parseInt(t,16);return[n>>16&255,n>>8&255,n&255,1]}let t=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],t[4]===void 0?1:+t[4]]:null}function Sb(e,t,n){return`rgba(${Math.round(e[0]+(t[0]-e[0])*n)},${Math.round(e[1]+(t[1]-e[1])*n)},${Math.round(e[2]+(t[2]-e[2])*n)},${e[3]+(t[3]-e[3])*n})`}var Cb=class e{constructor(e,t,n){this.el=e,this.duration=t??300,this.delay=n||0,this._attrTarget=null,this._plotTarget=null,this._plotAlgorithm=`commands`,this._afterCb=null,this._duringCb=null,this._next=null,this._root=null,this._scheduled=!1}attr(e){return this._attrTarget=e,this._schedule(),this}plot(e,t){return this._plotTarget=e,t&&(this._plotAlgorithm=t),this._schedule(),this}after(e){return this._afterCb=e,this._schedule(),this}during(e){return this._duringCb=e,this._schedule(),this}animate(t,n){let r=new e(this.el,t,n);return this._next=r,r._root=this._root||this,r}_schedule(){let e=this._root||this;e._scheduled||(e._scheduled=!0,queueMicrotask(()=>e._executeChain()))}_executeChain(){let e=[],t=this;for(;t;)e.push(t),t=t._next;let n=0;e.forEach(e=>{n+=e.delay,e._execute(n),n+=e.duration})}_execute(e){let t=this.el,n=this.duration;if(n<=1){let n=()=>{this._attrTarget&&t.attr(this._attrTarget),this._plotTarget&&t.plot(this._plotTarget),this._afterCb&&this._afterCb.call(t)};e>0?setTimeout(n,e):n();return}let r=()=>{let e={},r={},i={};if(this._attrTarget)for(let n of Object.keys(this._attrTarget)){let a=t.attr(n);e[n]=a;let o=xb(a),s=xb(String(this._attrTarget[n]));o&&s&&(r[n]=o,i[n]=s)}let a=null;if(this._plotTarget){let e=t.attr(`d`)||``;try{a=this._plotAlgorithm===`polygons`?yb(e,this._plotTarget):hb(e,this._plotTarget)}catch{a=null}}let o=performance.now(),s=c=>{let l=c-o,u=Math.min(l/n,1),d=bb(u);if(this._attrTarget){if(u>=1)t.attr(this._attrTarget);else{let n={};for(let t of Object.keys(this._attrTarget))if(r[t]&&i[t])n[t]=Sb(r[t],i[t],d);else{let r=parseFloat(e[t]),i=parseFloat(this._attrTarget[t]);!isNaN(r)&&!isNaN(i)&&(n[t]=r+(i-r)*d)}t.attr(n)}}a&&u<1&&t.attr(`d`,a(d)),this._duringCb&&this._duringCb(d),u<1?X.requestAnimationFrame(s):(this._plotTarget&&t.attr(`d`,this._plotTarget),this._afterCb&&this._afterCb.call(t))};X.requestAnimationFrame(s)};e>0?setTimeout(r,e):r()}};function wb(e){e.prototype.animate=function(e,t){return new Cb(this,e,t)}}function Tb(e){e.prototype.draggable=function(e){if(e===!1)return this._dragCleanup&&=(this._dragCleanup(),null),this;let t=this,n=e||{},r=e=>{if(e.button&&e.button!==0)return;e.stopPropagation();let r=e.type===`touchstart`?e.touches[0]:e,i=t.node,a=parseFloat(i.getAttribute(`x`))||0,o=parseFloat(i.getAttribute(`y`))||0,s=r.clientX,c=r.clientY,l=i.ownerSVGElement,u=null;l&&(u=l.getScreenCTM());let d=e=>{let t=e.type===`touchmove`?e.touches[0]:e,r=t.clientX-s,l=t.clientY-c;u&&(r/=u.a,l/=u.d);let d=a+r,f=o+l,p=parseFloat(i.getAttribute(`width`))||0,m=parseFloat(i.getAttribute(`height`))||0;n.minX!==void 0&&d<n.minX&&(d=n.minX),n.minY!==void 0&&f<n.minY&&(f=n.minY),n.maxX!==void 0&&d+p>n.maxX&&(d=n.maxX-p),n.maxY!==void 0&&f+m>n.maxY&&(f=n.maxY-m);let h={x:d,y:f,w:p,h:m,x2:d+p,y2:f+m},g=new CustomEvent(`dragmove`,{detail:{handler:{move:function(e,t){i.setAttribute(`x`,e),i.setAttribute(`y`,t)}},box:h}});i.dispatchEvent(g)},f=()=>{Y.isBrowser()&&(document.removeEventListener(`mousemove`,d),document.removeEventListener(`touchmove`,d),document.removeEventListener(`mouseup`,f),document.removeEventListener(`touchend`,f))};Y.isBrowser()&&(document.addEventListener(`mousemove`,d),document.addEventListener(`touchmove`,d),document.addEventListener(`mouseup`,f),document.addEventListener(`touchend`,f))};return t.node.addEventListener(`mousedown`,r),t.node.addEventListener(`touchstart`,r),t._dragCleanup=()=>{t.node.removeEventListener(`mousedown`,r),t.node.removeEventListener(`touchstart`,r)},t}}function Eb(e){e.prototype.select=function(e){if(e===!1)return this._selectCleanup&&=(this._selectCleanup(),null),this;let t=this,{createHandle:n,updateHandle:r}=e,i=document.createElementNS($,`g`);i.setAttribute(`class`,`svg_select_points`);let a=t.node.parentNode;a&&a.appendChild(i);let o={},s=[`t`,`b`,`l`,`r`,`lt`,`rt`,`lb`,`rb`];
66s.forEach((e,t)=>{let r=new Qy(document.createElementNS($,`g`));i.appendChild(r.node);let a=n(r,[0,0],t,[],e);o[e]={group:r,handle:a}});let c=()=>{let e=parseFloat(t.attr(`x`))||0,n=parseFloat(t.attr(`y`))||0,a=parseFloat(t.attr(`width`))||0,c=parseFloat(t.attr(`height`))||0,l=t.node.getAttribute(`transform`);l?i.setAttribute(`transform`,l):i.removeAttribute(`transform`);let u={t:[e+a/2,n],b:[e+a/2,n+c],l:[e,n+c/2],r:[e+a,n+c/2],lt:[e,n],rt:[e+a,n],lb:[e,n+c],rb:[e+a,n+c]};s.forEach(e=>{o[e]&&u[e]&&r(o[e].group,u[e])})};return c(),t._selectHandles=i,t._selectHandlesMap=o,t._updateSelectPositions=c,t._selectCleanup=()=>{i.parentNode&&i.parentNode.removeChild(i),t._selectHandles=null,t._selectHandlesMap=null,t._updateSelectPositions=null},t},e.prototype.resize=function(e){if(e===!1)return this._resizeCleanup&&=(this._resizeCleanup(),null),this;let t=this,n=t._selectHandlesMap;if(!n)return t;let r=[],i=e=>{let i=n[e];if(!i||!i.group||!i.group.node)return;let a=i.group.node,o=n=>{if(n.button&&n.button!==0)return;n.stopPropagation();let r=(n.type===`touchstart`?n.touches[0]:n).clientX,i=t.node.ownerSVGElement,a=null;i&&(a=i.getScreenCTM());let o=parseFloat(t.attr(`x`))||0,s=parseFloat(t.attr(`width`))||0,c=n=>{let i=(n.type===`touchmove`?n.touches[0]:n).clientX-r;a&&(i/=a.a);let c=o,l=s;e===`l`?(c=o+i,l=s-i):e===`r`&&(l=s+i),l<0&&(l=0),t.attr({x:c,width:l}),t._updateSelectPositions&&t._updateSelectPositions();let u=new CustomEvent(`resize`,{detail:{el:t}});t.node.dispatchEvent(u)},l=()=>{Y.isBrowser()&&(document.removeEventListener(`mousemove`,c),document.removeEventListener(`touchmove`,c),document.removeEventListener(`mouseup`,l),document.removeEventListener(`touchend`,l));let e=new CustomEvent(`resize`,{detail:{el:t}});t.node.dispatchEvent(e)};Y.isBrowser()&&(document.addEventListener(`mousemove`,c),document.addEventListener(`touchmove`,c),document.addEventListener(`mouseup`,l),document.addEventListener(`touchend`,l))};a.addEventListener(`mousedown`,o),a.addEventListener(`touchstart`,o),r.push(()=>{a.removeEventListener(`mousedown`,o),a.removeEventListener(`touchstart`,o)})};return i(`l`),i(`r`),t._resizeCleanup=()=>{r.forEach(e=>e())},t}}ib(Ky),wb(Ky),Tb(Ky),Eb(Ky);function Db(){let e=new Qy(X.createElementNS($,`svg`));return e.attr({xmlns:$}),e}Db.xlink=`http://www.w3.org/1999/xlink`,Y.isBrowser()&&window.SVG===void 0&&(window.SVG=Db),Y.isBrowser()?(window.SVG===void 0&&(window.SVG=Db),window.Apex===void 0&&(window.Apex={})):typeof global<`u`&&(global.Apex===void 0&&(global.Apex={}),global.SVG===void 0&&(global.SVG=Db));var Ob=class e{static registerFeatures(t){for(let[n,r]of Object.entries(t))e._featureRegistry.set(n,r)}constructor(e){this.ctx=e,this.w=e.w}initModules(){this.ctx.publicMethods=[`updateOptions`,`updateSeries`,`appendData`,`appendSeries`,`isSeriesHidden`,`highlightSeries`,`toggleSeries`,`showSeries`,`hideSeries`,`setLocale`,`resetSeries`,`zoomX`,`toggleDataPointSelection`,`dataURI`,`exportToCSV`,`addXaxisAnnotation`,`addYaxisAnnotation`,`addPointAnnotation`,`clearAnnotations`,`removeAnnotation`,`drillDown`,`drillUp`,`drillToRoot`,`paper`,`destroy`],this.ctx.eventList=[`click`,`mousedown`,`mousemove`,`mouseleave`,`touchstart`,`touchmove`,`touchleave`,`mouseup`,`touchend`,`keydown`,`keyup`],this.ctx.animations=new Hv(this.w,this.ctx),this.ctx.axes=new sy(this.w,this.ctx),this.ctx.core=new Fy(this.ctx.el,this.w,this.ctx),this.ctx.config=new Dv({}),this.ctx.data=new Iy(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new ey(this.w,this.ctx),this.ctx.graphics=new Q(this.w,this.ctx),this.ctx.coreUtils=new Nv(this.w),this.ctx.crosshairs=new cy(this.w),this.ctx.events=new ay(this.w,this.ctx),this.ctx.fill=new qv(this.w),this.ctx.localization=new oy(this.w),this.ctx.options=new Ev,this.ctx.responsive=new uy(this.w),this.ctx.series=new dy(this.w,{toggleDataSeries:(...e)=>this.ctx.legend?.legendHelpers.toggleDataSeries(...e),revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...e)=>this.ctx.updateHelpers._updateSeries(...e)}),this.ctx.theme=new fy(this.w),this.ctx.formatters=new xv(this.w),this.ctx.titleSubtitle=new py(this.w),this.ctx.dimensions=new vy(this.w,this.ctx),this.ctx.updateHelpers=new Ly(this.w,this.ctx);let e=new Gy(this.w,this.ctx);this.w.globals.tooltip=e,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){let t=e._featureRegistry,n=this.w,r=this.ctx,i=t.get(`exports`);r.exports=i?new i(n,r):null;let a=t.get(`legend`);r.legend=a?new a(n,r):null;let o=t.get(`morphTypeChange`);r.morphTypeChange=o?new o(n,r):null;let s=t.get(`drilldown`);r.drilldown=s?new s(n,r):null;
66let c=t.get(`toolbar`);Object.defineProperty(r,"toolbar",{get(){return!this._toolbar&&c&&(this._toolbar=new c(n,this)),this._toolbar??null},configurable:!0});let l=t.get(`zoomPanSelection`);Object.defineProperty(r,"zoomPanSelection",{get(){return!this._zoomPanSelection&&l&&(this._zoomPanSelection=new l(n,this)),this._zoomPanSelection??null},configurable:!0});let u=t.get(`keyboardNavigation`);Object.defineProperty(r,"keyboardNavigation",{get(){return!this._keyboardNavigation&&u&&(this._keyboardNavigation=new u(n,this)),this._keyboardNavigation??null},configurable:!0})}};J(Ob,`_featureRegistry`,new Map);var kb=Ob,Ab=class{constructor(e){this.ctx=e,this.w=e.w}clear({isUpdating:e}){e||(this.w.globals.isDestroyed=!0),this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&typeof this.w.globals.resizeObserver.disconnect==`function`&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),Zv.invalidateAll(this.w),e?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,this.ctx._keyboardNavigation=null):(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._keyboardNavigation=null,this.ctx.w.globals.tooltip=null),this.clearDomElements({isUpdating:e})}killSVG(e){e.each(function(){this.removeClass(`*`),this.off()},!0),e.clear()}clearDomElements({isUpdating:e}){let t=this.w.dom;if(Y.isBrowser()&&t.Paper){let n=t.Paper.node;n.parentNode&&n.parentNode.parentNode&&!e&&(n.parentNode.parentNode.style.minHeight=`unset`);let r=t.baseEl;if(r&&this.ctx.eventList.forEach(e=>{r.removeEventListener(e,this.ctx.events.documentEvent)}),this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(t.Paper),t.Paper.remove()}t.elWrap=null,t.elGraphical=null,t.elLegendWrap=null,t.elLegendForeign=null,t.baseEl=null,t.elGridRect=null,t.elGridRectMask=null,t.elGridRectBarMask=null,t.elGridRectMarkerMask=null,t.elForecastMask=null,t.elNonForecastMask=null,t.elDefs=null}},jb=new WeakMap;function Mb(e,t){if(Y.isSSR())return;let n=!1;if(e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){let t=e.getBoundingClientRect();(e.style.display===`none`||t.width===0)&&(n=!0)}let r=new ResizeObserver(r=>{n&&t.call(e,r),n=!0});e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(e.children).forEach(e=>r.observe(e)):r.observe(e),jb.set(t,r)}function Nb(e,t){if(Y.isSSR())return;let n=jb.get(t);n&&(n.disconnect(),jb.delete(t))}var Pb=`@keyframes opaque { 67 0% { 68 opacity: 0 69 } 70 71 to { 72 opacity: 1 73 } 74} 75 76@keyframes resizeanim { 77 78 0%, 79 to { 80 opacity: 0 81 } 82} 83 84.apexcharts-canvas { 85 position: relative; 86 direction: ltr !important; 87 user-select: none; 88 /* Focus indicator colour. Themes override below. */ 89 --apexcharts-focus-color: #008FFB; 90} 91 92/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */ 93.apexcharts-canvas .apexcharts-theme-dark, 94.apexcharts-theme-dark.apexcharts-canvas { 95 --apexcharts-focus-color: #FFD500; 96} 97.apexcharts-canvas.apexcharts-high-contrast, 98.apexcharts-high-contrast.apexcharts-canvas { 99 --apexcharts-focus-color: #FFFF00; 100} 101 102/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */ 103.apexcharts-sr-status { 104 position: absolute; 105 width: 1px; 106 height: 1px; 107 padding: 0; 108 margin: -1px; 109 overflow: hidden; 110 clip: rect(0, 0, 0, 0); 111 white-space: nowrap; 112 border: 0; 113} 114 115/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */ 116@media (prefers-reduced-motion: reduce) { 117 .apexcharts-canvas *, 118 .apexcharts-canvas *::before, 119 .apexcharts-canvas *::after { 120 animation-duration: 0.01ms !important; 121 animation-iteration-count: 1 !important; 122 transition-duration: 0.01ms !important; 123 } 124} 125 126.apexcharts-canvas ::-webkit-scrollbar {
127 -webkit-appearance: none; 128 width: 6px 129} 130 131.apexcharts-canvas ::-webkit-scrollbar-thumb { 132 border-radius: 4px; 133 background-color: rgba(0, 0, 0, .5); 134 box-shadow: 0 0 1px rgba(255, 255, 255, .5); 135 -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5) 136} 137 138.apexcharts-inner { 139 position: relative 140} 141 142.apexcharts-text tspan { 143 font-family: inherit 144} 145 146rect.legend-mouseover-inactive, 147.legend-mouseover-inactive rect, 148.legend-mouseover-inactive path, 149.legend-mouseover-inactive circle, 150.legend-mouseover-inactive line, 151.legend-mouseover-inactive text.apexcharts-yaxis-title-text, 152.legend-mouseover-inactive text.apexcharts-yaxis-label { 153 transition: .15s ease all; 154 opacity: .2 155} 156 157.apexcharts-legend-text { 158 padding-left: 15px; 159 margin-left: -15px; 160} 161 162.apexcharts-legend-series[role="button"]:focus { 163 outline: 2px solid var(--apexcharts-focus-color, #008FFB); 164 outline-offset: 2px; 165} 166 167.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) { 168 outline: none; 169} 170 171.apexcharts-legend-series[role="button"]:focus-visible { 172 outline: 2px solid var(--apexcharts-focus-color, #008FFB); 173 outline-offset: 2px; 174} 175 176.apexcharts-series-collapsed { 177 opacity: 0 178} 179 180.apexcharts-canvas svg:focus:not(:focus-visible) { 181 outline: none; 182} 183 184/* Keyboard navigation focus indicator on SVG data elements. 185 SVG elements don't support CSS outline, so we use stroke. */ 186.apexcharts-bar-area.apexcharts-keyboard-focused, 187.apexcharts-candlestick-area.apexcharts-keyboard-focused, 188.apexcharts-boxPlot-area.apexcharts-keyboard-focused, 189.apexcharts-rangebar-area.apexcharts-keyboard-focused, 190.apexcharts-pie-area.apexcharts-keyboard-focused, 191.apexcharts-heatmap-rect.apexcharts-keyboard-focused, 192.apexcharts-treemap-rect.apexcharts-keyboard-focused { 193 stroke: var(--apexcharts-focus-color, #008FFB); 194 stroke-width: 2; 195 stroke-opacity: 1; 196} 197 198.apexcharts-tooltip { 199 --apx-tt-bg: #ffffff; 200 --apx-tt-border: rgba(15, 23, 42, 0.06); 201 /* Layered shadow: tight inner contact + soft outer drop. The two Y 202 * offsets are exposed as variables so they flip in sync with the 203 * arrow when the tooltip is below the data point â see the 204 * \`[data-placement="bottom"]\` rule further down. */ 205 --apx-tt-shadow-y-mid: 8px; 206 --apx-tt-shadow-y-far: 16px; 207 --apx-tt-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(15, 23, 42, 0.12), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(15, 23, 42, 0.18); 208 --apx-tt-arrow-bg: var(--apx-tt-bg); 209 /* Two stacked drop-shadows: the first is a tight contact halo for 210 * edge definition against light chart backgrounds; the second is a 211 * softer directional drop that lifts the arrow off the surface. 212 * \`--apx-tt-arrow-drop-y\` is the Y offset of the directional drop; 213 * a per-placement rule below flips it to negative when the tooltip 214 * is below the data point (arrow on top) so the shadow always 215 * casts outward instead of into the tooltip body. */ 216 --apx-tt-arrow-drop-y: 2px; 217 --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(15, 23, 42, 0.2)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(15, 23, 42, 0.2)); 218 --apx-tt-color: #0f172a; 219 --apx-tt-color-muted: rgba(15, 23, 42, 0.55); 220 border-radius: 8px; 221 background: var(--apx-tt-bg); 222 border: 1px solid var(--apx-tt-border); 223 box-shadow: var(--apx-tt-shadow); 224 color: var(--apx-tt-color); 225 cursor: default; 226 font-size: 13px; 227 left: 0; 228 top: 0; 229 opacity: 0; 230 pointer-events: none; 231 position: absolute; 232 display: flex; 233 flex-direction: column; 234 padding: 2px 0; 235 white-space: nowrap; 236 z-index: 12; 237 transition: opacity .12s ease 238} 239 240/* While the tooltip is visible, smoothly animate position changes 241 * between data points. Kept short (160 ms) and ease-out so it stays 242 * responsive â too long would feel laggy when sweeping across many 243 * points fast. The position transition is only attached after the 244 * first paint (Position.applyTooltipPosition flips \`data-positioned\` 245 * once the tooltip has been placed) so the *first* show doesn't slide 246 * the tooltip in from the previously-stale (0,0) coordinates. */ 247.apexcharts-tooltip.apexcharts-active { 248 opacity: 1; 249 transition: opacity .12s ease 250} 251.apexcharts-tooltip.apexcharts-active[data-positioned="true"] { 252 transition: opacity .12s ease, left .16s ease-out, top .16s ease-out 253} 254 255.apexcharts-tooltip.apexcharts-theme-light { 256 /* defaults already set above; class kept for backward-compat selectors */ 257} 258 259.apexcharts-tooltip.apexcharts-theme-dark { 260 --apx-tt-bg: #1c1c1f; 261 --apx-tt-border: rgba(255, 255, 255, 0.08); 262 --apx-tt-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(0, 0, 0, 0.45), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(0, 0, 0, 0.55); 263 --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.55)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(0, 0, 0, 0.45)); 264 --apx-tt-color: #f3f4f6; 265 --apx-tt-color-muted: rgba(243, 244, 246, 0.55); 266} 267 268.apexcharts-tooltip * { 269 font-family: inherit 270} 271 272.apexcharts-tooltip-title { 273 padding: 8px 12px 4px; 274 font-size: 12px; 275 font-weight: 600; 276 letter-spacing: 0.01em; 277 color: var(--apx-tt-color-muted); 278 background: transparent; 279 border-bottom: none; 280 margin-bottom: 0 281} 282 283.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title, 284.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title { 285 background: transparent; 286 border-bottom: none 287} 288 289/* \`fillSeriesColor\`: each series-group already paints itself with the 290 * series colour. Drop the glass body entirely (transparent bg, no 291 * border, no backdrop-filter, no padding) and clip the coloured 292 * series-group(s) to the tooltip's rounded corners so they fill the 293 * shell edge-to-edge. Text inside the coloured group is forced to 294 * white for contrast. */ 295.apexcharts-tooltip.apexcharts-tooltip-fill-series { 296 background: transparent; 297 -webkit-backdrop-filter: none; 298 backdrop-filter: none; 299 border: none; 300 padding: 0; 301 overflow: hidden; 302 color: #fff 303} 304 305.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title { 306 background: rgba(0, 0, 0, 0.22); 307 color: #fff; 308 opacity: 1; 309 padding: 6px 12px 310} 311 312.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group { 313 color: #fff 314} 315 316/* Arrow connector â sits *entirely outside* the tooltip body. Shares 317 * the body's solid fill so it reads as a single shape. \`filter: 318 * drop-shadow\` traces the clipped triangle outline (a regular
319 * \`box-shadow\` would be erased by the \`clip-path\`). */ 320.apexcharts-tooltip-arrow { 321 position: absolute; 322 width: 7px; 323 height: 14px; 324 background: var(--apx-tt-arrow-bg); 325 /* The variable already contains the full \`drop-shadow(...) ...\` filter 326 * chain (stacked shadows) so it's applied raw. */ 327 -webkit-filter: var(--apx-tt-arrow-shadow); 328 filter: var(--apx-tt-arrow-shadow); 329 pointer-events: none; 330 top: calc(var(--apx-tt-arrow-y, 50%) - 7px) 331} 332 333.apexcharts-tooltip[data-placement="right"] .apexcharts-tooltip-arrow { 334 left: -7px; 335 clip-path: polygon(0 50%, 100% 0, 100% 100%) 336} 337 338.apexcharts-tooltip[data-placement="left"] .apexcharts-tooltip-arrow { 339 right: -7px; 340 clip-path: polygon(100% 50%, 0 0, 0 100%) 341} 342 343/* Vertical arrow variants: tooltip is above/below the data point and the 344 * arrow points down/up. The base rule above uses \`--apx-tt-arrow-y\` for 345 * left/right placement; for top/bottom we re-orient the rectangle and 346 * use \`--apx-tt-arrow-x\` (set by applyTooltipPosition). */ 347.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow, 348.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow { 349 width: 14px; 350 height: 7px; 351 top: auto; 352 left: calc(var(--apx-tt-arrow-x, 50%) - 7px) 353} 354 355.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow { 356 bottom: -7px; 357 clip-path: polygon(50% 100%, 0 0, 100% 0) 358} 359 360.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow { 361 top: -7px; 362 clip-path: polygon(50% 0, 0 100%, 100% 100%) 363} 364 365/* When the tooltip is flipped below the data point (arrow on top 366 * pointing up), the default downward-biased shadows leave the top 367 * edge of both the body *and* the arrow undefined. Flipping every 368 * Y offset to negative casts the entire elevation upward so the 369 * shadow falls between the tooltip and the bar above. */ 370.apexcharts-tooltip[data-placement="bottom"] { 371 --apx-tt-shadow-y-mid: -8px; 372 --apx-tt-shadow-y-far: -16px; 373 --apx-tt-arrow-drop-y: -2px 374} 375 376.apexcharts-tooltip-text-goals-value, 377.apexcharts-tooltip-text-y-value, 378.apexcharts-tooltip-text-z-value { 379 display: inline-block; 380 margin-left: 5px; 381 font-weight: 600 382} 383 384.apexcharts-tooltip-text-goals-label:empty, 385.apexcharts-tooltip-text-goals-value:empty, 386.apexcharts-tooltip-text-y-label:empty, 387.apexcharts-tooltip-text-y-value:empty, 388.apexcharts-tooltip-text-z-value:empty, 389.apexcharts-tooltip-title:empty { 390 display: none 391} 392 393.apexcharts-tooltip-text-goals-label, 394.apexcharts-tooltip-text-goals-value { 395 padding: 6px 0 5px 396} 397 398.apexcharts-tooltip-goals-group, 399.apexcharts-tooltip-text-goals-label, 400.apexcharts-tooltip-text-goals-value { 401 display: flex 402} 403 404.apexcharts-tooltip-text-goals-label:not(:empty), 405.apexcharts-tooltip-text-goals-value:not(:empty) { 406 margin-top: -6px 407} 408 409.apexcharts-tooltip-marker { 410 display: inline-flex; 411 align-items: center; 412 justify-content: center; 413 position: relative; 414 width: 12px; 415 height: 12px; 416 margin-right: 6px; 417 vertical-align: middle; 418 color: inherit; 419} 420 421.apexcharts-tooltip-marker svg { 422 width: 100%; 423 height: 100%; 424 display: block; 425} 426 427.apexcharts-tooltip-series-group { 428 padding: 4px 12px; 429 display: none; 430 gap: 8px; 431 text-align: left; 432 justify-content: left; 433 align-items: center 434} 435 436.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker { 437 opacity: 1 438} 439 440.apexcharts-tooltip-series-group.apexcharts-active:last-child, 441.apexcharts-tooltip-series-group:last-child { 442 padding-bottom: 8px 443} 444 445.apexcharts-tooltip-y-group { 446 padding: 6px 0 5px 447} 448 449.apexcharts-custom-tooltip, 450.apexcharts-tooltip-box { 451 padding: 4px 8px 452} 453 454.apexcharts-tooltip-boxPlot { 455 display: flex; 456 flex-direction: column-reverse 457} 458 459.apexcharts-tooltip-box>div { 460 margin: 4px 0 461} 462 463.apexcharts-tooltip-box span.value { 464 font-weight: 700 465} 466 467.apexcharts-tooltip-rangebar { 468 padding: 5px 8px 469} 470 471.apexcharts-tooltip-rangebar .category { 472 font-weight: 600; 473 color: #777 474} 475 476.apexcharts-tooltip-rangebar .series-name { 477 font-weight: 700; 478 display: block; 479 margin-bottom: 5px 480} 481 482/* X/Y axis tooltips â small popovers that label the crosshair on the 483 * axes. Restyled to match the modern data-tooltip palette: solid white 484 * body with a subtle border + soft drop-shadow, smaller font, rounded 485 * corners. The arrows still use the CSS border-triangle technique 486 * (cheap, crisp at small sizes); their colours flow from CSS variables 487 * so light/dark themes only need one override per axis. */ 488.apexcharts-xaxistooltip, 489.apexcharts-yaxistooltip { 490 --apx-axt-bg: #ffffff; 491 --apx-axt-border: rgba(15, 23, 42, 0.08); 492 --apx-axt-color: #0f172a; 493 --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12); 494 opacity: 0; 495 pointer-events: none; 496 color: var(--apx-axt-color); 497 font-size: 12px; 498 font-weight: 500; 499 text-align: center; 500 border-radius: 6px; 501 position: absolute; 502 z-index: 10; 503 background: var(--apx-axt-bg); 504 border: 1px solid var(--apx-axt-border); 505 box-shadow: var(--apx-axt-shadow) 506} 507 508.apexcharts-xaxistooltip.apexcharts-theme-dark, 509.apexcharts-yaxistooltip.apexcharts-theme-dark { 510 --apx-axt-bg: #1c1c1f; 511 --apx-axt-border: rgba(255, 255, 255, 0.1); 512 --apx-axt-color: #f3f4f6; 513 --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45) 514} 515 516.apexcharts-xaxistooltip { 517 padding: 4px 8px; 518 transition: .15s ease all 519} 520 521.apexcharts-xaxistooltip:after, 522.apexcharts-xaxistooltip:before { 523 left: 50%; 524 border: solid transparent; 525 content: " "; 526 height: 0; 527 width: 0; 528 position: absolute; 529 pointer-events: none 530} 531 532/* :before paints the 1px border outline of the triangle (slightly larger 533 * than :after); :after sits inside and paints the fill â leaves a 1px 534 * ring of :before visible at the edges. */ 535.apexcharts-xaxistooltip:after { 536 border-color: transparent; 537 border-width: 5px; 538 margin-left: -5px 539} 540 541.apexcharts-xaxistooltip:before { 542 border-color: transparent; 543 border-width: 6px; 544 margin-left: -6px 545} 546 547.apexcharts-xaxistooltip-bottom:after, 548.apexcharts-xaxistooltip-bottom:before { 549 bottom: 100% 550} 551 552.apexcharts-xaxistooltip-top:after, 553.apexcharts-xaxistooltip-top:before { 554 top: 100% 555} 556 557.apexcharts-xaxistooltip-bottom:after { 558 border-bottom-color: var(--apx-axt-bg) 559} 560 561.apexcharts-xaxistooltip-bottom:before { 562 border-bottom-color: var(--apx-axt-border) 563} 564 565.apexcharts-xaxistooltip-top:after { 566 border-top-color: var(--apx-axt-bg) 567} 568 569.apexcharts-xaxistooltip-top:before { 570 border-top-color: var(--apx-axt-border) 571} 572 573.apexcharts-xaxistooltip.apexcharts-active { 574 opacity: 1; 575 transition: .15s ease all 576} 577 578.apexcharts-yaxistooltip { 579 padding: 3px 8px 580} 581 582.apexcharts-yaxistooltip:after, 583.apexcharts-yaxistooltip:before { 584 top: 50%; 585 border: solid transparent; 586 content: " "; 587 height: 0; 588 width: 0; 589 position: absolute; 590 pointer-events: none 591} 592 593.apexcharts-yaxistooltip:after { 594 border-color: transparent; 595 border-width: 5px; 596 margin-top: -5px 597} 598 599.apexcharts-yaxistooltip:before { 600 border-color: transparent; 601 border-width: 6px; 602 margin-top: -6px 603} 604 605.apexcharts-yaxistooltip-left:after, 606.apexcharts-yaxistooltip-left:before { 607 left: 100% 608} 609 610.apexcharts-yaxistooltip-right:after, 611.apexcharts-yaxistooltip-right:before { 612 right: 100% 613}
613 614 615.apexcharts-yaxistooltip-left:after { 616 border-left-color: var(--apx-axt-bg) 617} 618 619.apexcharts-yaxistooltip-left:before { 620 border-left-color: var(--apx-axt-border) 621} 622 623.apexcharts-yaxistooltip-right:after { 624 border-right-color: var(--apx-axt-bg) 625} 626 627.apexcharts-yaxistooltip-right:before { 628 border-right-color: var(--apx-axt-border) 629} 630 631.apexcharts-yaxistooltip.apexcharts-active { 632 opacity: 1 633} 634 635.apexcharts-yaxistooltip-hidden { 636 display: none 637} 638 639.apexcharts-xcrosshairs, 640.apexcharts-ycrosshairs { 641 pointer-events: none; 642 opacity: 0; 643 transition: .15s ease all 644} 645 646.apexcharts-xcrosshairs.apexcharts-active, 647.apexcharts-ycrosshairs.apexcharts-active { 648 opacity: 1; 649 transition: .15s ease all 650} 651 652.apexcharts-ycrosshairs-hidden { 653 opacity: 0 654} 655 656.apexcharts-selection-rect { 657 cursor: move 658} 659 660.svg_select_shape { 661 stroke-width: 1; 662 stroke-dasharray: 10 10; 663 stroke: black; 664 stroke-opacity: 0.1; 665 pointer-events: none; 666 fill: none; 667} 668 669.svg_select_handle { 670 stroke-width: 3; 671 stroke: black; 672 fill: none; 673} 674 675.svg_select_handle_r { 676 cursor: e-resize; 677} 678 679.svg_select_handle_l { 680 cursor: w-resize; 681} 682 683.apexcharts-svg.apexcharts-zoomable.hovering-zoom { 684 cursor: crosshair 685} 686 687.apexcharts-svg.apexcharts-zoomable.hovering-pan { 688 cursor: move 689} 690 691.apexcharts-menu-icon, 692.apexcharts-pan-icon, 693.apexcharts-reset-icon, 694.apexcharts-selection-icon, 695.apexcharts-toolbar-custom-icon, 696.apexcharts-zoom-icon, 697.apexcharts-zoomin-icon, 698.apexcharts-zoomout-icon { 699 cursor: pointer; 700 /* WCAG 2.5.8 Target Size (Minimum): 24Ã24 CSS px hit target. */ 701 width: 26px; 702 height: 24px; 703 line-height: 24px; 704 color: #6e8192; 705 text-align: center; 706 /* Reset native <button> chrome â these are styled via SVG icons. */ 707 padding: 0; 708 margin: 0; 709 background: transparent; 710 border: 0; 711 border-radius: 5px; 712 display: inline-flex; 713 align-items: center; 714 justify-content: center; 715 transition: background-color .12s ease, color .12s ease; 716} 717 718.apexcharts-menu-icon svg, 719.apexcharts-pan-icon svg, 720.apexcharts-reset-icon svg, 721.apexcharts-selection-icon svg, 722.apexcharts-zoom-icon svg, 723.apexcharts-zoomin-icon svg, 724.apexcharts-zoomout-icon svg { 725 width: 18px; 726 height: 18px; 727 fill: none; 728 stroke: currentColor; 729 stroke-width: 2; 730 stroke-linecap: round; 731 stroke-linejoin: round 732} 733 734.apexcharts-theme-dark .apexcharts-menu-icon, 735.apexcharts-theme-dark .apexcharts-pan-icon, 736.apexcharts-theme-dark .apexcharts-reset-icon, 737.apexcharts-theme-dark .apexcharts-selection-icon, 738.apexcharts-theme-dark .apexcharts-toolbar-custom-icon, 739.apexcharts-theme-dark .apexcharts-zoom-icon, 740.apexcharts-theme-dark .apexcharts-zoomin-icon, 741.apexcharts-theme-dark .apexcharts-zoomout-icon { 742 color: #d4d6dc 743} 744 745.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected, 746.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected, 747.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected, 748.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected { 749 background: rgba(0, 143, 251, 0.12); 750 color: #008ffb 751} 752 753.apexcharts-theme-light .apexcharts-menu-icon:hover, 754.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover, 755.apexcharts-theme-light .apexcharts-reset-icon:hover, 756.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover, 757.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover, 758.apexcharts-theme-light .apexcharts-zoomin-icon:hover, 759.apexcharts-theme-light .apexcharts-zoomout-icon:hover { 760 background: rgba(15, 23, 42, 0.06); 761 color: #1f2937 762} 763 764.apexcharts-theme-dark .apexcharts-menu-icon:hover, 765.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover, 766.apexcharts-theme-dark .apexcharts-reset-icon:hover, 767.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover, 768.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover, 769.apexcharts-theme-dark .apexcharts-zoomin-icon:hover, 770.apexcharts-theme-dark .apexcharts-zoomout-icon:hover { 771 background: rgba(255, 255, 255, 0.08); 772 color: #fff 773} 774 775.apexcharts-menu-icon, 776.apexcharts-selection-icon { 777 position: relative 778} 779 780.apexcharts-toolbar { 781 position: absolute; 782 z-index: 11; 783 display: inline-flex; 784 align-items: center; 785 gap: 1px; 786 padding: 3px; 787 border-radius: 8px; 788 background: rgba(255, 255, 255, 0.85); 789 backdrop-filter: blur(8px); 790 -webkit-backdrop-filter: blur(8px); 791} 792 793.apexcharts-theme-dark .apexcharts-toolbar { 794 background: rgba(28, 28, 31, 0.82); 795} 796 797.apexcharts-menu { 798 background: rgba(255, 255, 255, 0.95); 799 backdrop-filter: blur(8px); 800 -webkit-backdrop-filter: blur(8px); 801 position: absolute; 802 top: calc(100% + 4px); 803 border: 1px solid rgba(15, 23, 42, 0.08); 804 border-radius: 8px; 805 padding: 4px; 806 right: 0; 807 opacity: 0; 808 min-width: 120px; 809 transition: opacity .15s ease, transform .15s ease; 810 transform: translateY(-2px); 811 pointer-events: none; 812 box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06) 813} 814 815.apexcharts-menu.apexcharts-menu-open { 816 opacity: 1; 817 transform: translateY(0); 818 pointer-events: all 819} 820 821.apexcharts-menu-item { 822 padding: 6px 9px; 823 font-size: 12px; 824 border-radius: 5px; 825 cursor: pointer 826} 827 828.apexcharts-theme-light .apexcharts-menu-item:hover { 829 background: rgba(15, 23, 42, 0.06) 830} 831 832.apexcharts-theme-dark .apexcharts-menu { 833 background: rgba(28, 28, 31, 0.92); 834 border-color: rgba(255, 255, 255, 0.08); 835 color: #f3f4f6; 836 box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4) 837} 838 839.apexcharts-theme-dark .apexcharts-menu-item:hover { 840 background: rgba(255, 255, 255, 0.08) 841} 842 843@media screen and (min-width:768px) { 844 .apexcharts-canvas:hover .apexcharts-toolbar { 845 opacity: 1 846 } 847} 848 849/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */ 850.apexcharts-toolbar:focus-within { 851 opacity: 1 852} 853 854/* Focus indicator for toolbar icon buttons */ 855.apexcharts-menu-icon:focus-visible, 856.apexcharts-pan-icon:focus-visible, 857.apexcharts-reset-icon:focus-visible, 858.apexcharts-selection-icon:focus-visible, 859.apexcharts-toolbar-custom-icon:focus-visible, 860.apexcharts-zoom-icon:focus-visible, 861.apexcharts-zoomin-icon:focus-visible, 862.apexcharts-zoomout-icon:focus-visible { 863 outline: 2px solid var(--apexcharts-focus-color, #008FFB); 864 outline-offset: 1px; 865 border-radius: 5px 866} 867 868/* Focus indicator for hamburger menu items */ 869.apexcharts-menu-item:focus-visible { 870 outline: 2px solid var(--apexcharts-focus-color, #008FFB); 871 outline-offset: -2px; 872 background: #eee 873} 874 875.apexcharts-canvas .apexcharts-element-hidden, 876.apexcharts-datalabel.apexcharts-element-hidden, 877.apexcharts-hide .apexcharts-series-points { 878 opacity: 0; 879} 880 881.apexcharts-hidden-element-shown { 882 opacity: 1; 883 transition: 0.25s ease all; 884} 885 886.apexcharts-datalabel, 887.apexcharts-datalabel-label, 888.apexcharts-datalabel-value, 889.apexcharts-datalabels, 890.apexcharts-pie-label, 891.apexcharts-pie-name-label, 892.apexcharts-pie-name-label-group, 893.apexcharts-pie-label-connector { 894 cursor: default; 895 pointer-events: none 896} 897 898.apexcharts-pie-label-connector { 899 fill: none 900} 901 902.apexcharts-pie-label-delay { 903 opacity: 0; 904 animation-name: opaque; 905 animation-duration: .3s; 906 animation-fill-mode: forwards; 907 animation-timing-function: ease 908} 909 910.apexcharts-radialbar-label { 911 cursor: pointer; 912} 913 914.apexcharts-annotation-rect, 915.apexcharts-area-series .apexcharts-area, 916.apexcharts-gridline, 917.apexcharts-line, 918.apexcharts-point-annotation-label, 919.apexcharts-radar-series path:not(.apexcharts-marker), 920.apexcharts-radar-series polygon, 921.apexcharts-toolbar svg, 922.apexcharts-tooltip .apexcharts-marker, 923.apexcharts-xaxis-annotation-label, 924.apexcharts-yaxis-annotation-label, 925.apexcharts-zoom-rect, 926.no-pointer-events { 927 pointer-events: none 928} 929 930.apexcharts-tooltip-active .apexcharts-marker { 931 transition: .15s ease all 932} 933 934.apexcharts-radar-series .apexcharts-yaxis { 935 pointer-events: none; 936} 937 938.resize-triggers { 939 animation: 1ms resizeanim; 940 visibility: hidden; 941 opacity: 0; 942 height: 100%; 943 width: 100%; 944 overflow: hidden 945} 946 947.contract-trigger:before, 948.resize-triggers, 949.resize-triggers>div {
950 content: " "; 951 display: block; 952 position: absolute; 953 top: 0; 954 left: 0 955} 956 957.resize-triggers>div { 958 height: 100%; 959 width: 100%; 960 background: #eee; 961 overflow: auto 962} 963 964.contract-trigger:before { 965 overflow: hidden; 966 width: 200%; 967 height: 200% 968} 969 970.apexcharts-bar-goals-markers { 971 pointer-events: none 972} 973 974.apexcharts-bar-shadows { 975 pointer-events: none 976} 977 978.apexcharts-rangebar-goals-markers { 979 pointer-events: none 980} 981 982.apexcharts-drilldown-target { 983 cursor: pointer 984} 985 986.apexcharts-breadcrumb { 987 position: absolute; 988 z-index: 11; 989 display: inline-flex; 990 align-items: center; 991 gap: 2px; 992 font-size: 12px; 993 font-family: inherit; 994 padding: 2px 4px 995} 996 997.apexcharts-breadcrumb-item { 998 background: transparent; 999 border: none; 1000 padding: 2px 6px; 1001 border-radius: 3px; 1002 font: inherit; 1003 color: inherit; 1004 cursor: pointer; 1005 line-height: 1.2 1006} 1007 1008.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) { 1009 background: rgba(0, 0, 0, 0.08) 1010} 1011 1012.apexcharts-breadcrumb-arrow { 1013 margin-right: 4px; 1014 font-weight: 600; 1015 user-select: none 1016} 1017 1018.apexcharts-breadcrumb-current { 1019 cursor: default; 1020 font-weight: 600; 1021 opacity: 0.85 1022} 1023 1024.apexcharts-breadcrumb-separator { 1025 opacity: 0.5; 1026 user-select: none 1027} 1028 1029.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) { 1030 background: rgba(255, 255, 255, 0.12) 1031} 1032 1033.apexcharts-disable-transitions * { 1034 transition: none !important; 1035}`,Fb=class e{constructor(e,t){J(this,`core`),J(this,`responsive`),J(this,`axes`),J(this,`grid`),J(this,`graphics`),J(this,`coreUtils`),J(this,`crosshairs`),J(this,`events`),J(this,`fill`),J(this,`localization`),J(this,`options`),J(this,`series`),J(this,`theme`),J(this,`formatters`),J(this,`titleSubtitle`),J(this,`dimensions`),J(this,`updateHelpers`),J(this,`tooltip`),J(this,`data`),J(this,`animations`),J(this,`exports`),J(this,`legend`),J(this,`toolbar`),J(this,`zoomPanSelection`),J(this,`keyboardNavigation`),J(this,`annotations`),J(this,`morphTypeChange`),J(this,`timeScale`),J(this,`_keyboardNavigation`),J(this,`windowResizeHandler`),J(this,`parentResizeHandler`),J(this,`publicMethods`,[]),J(this,`eventList`,[]),J(this,`config`),this.opts=t,this.ctx=this,this.w=new Mv(t).init(),this.el=e,this.w.globals.cuid=Z.randomId(),this.w.globals.chartID=this.w.config.chart.id?Z.escapeString(this.w.config.chart.id):this.w.globals.cuid,Bv(this.w),new kb(this).initModules(),this.lastUpdateOptions=null,this.create=this.create.bind(this),Y.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}render(){return this.w?.config?.chart?new Promise((e,t)=>{if(Z.elementExists(this.el)){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.setLocale(this.w.config.chart.defaultLocale);let n=this.w.config.chart.events.beforeMount;if(typeof n==`function`&&n(this,this.w),this.events.fireEvent(`beforeMount`,[this,this.w]),Y.isBrowser()){window.addEventListener(`resize`,this.windowResizeHandler),Mb(this.el.parentNode,this.parentResizeHandler);let e=this.el.getRootNode&&this.el.getRootNode(),t=Z.is(`ShadowRoot`,e),n=this.el.ownerDocument,r=t?e.getElementById(`apexcharts-css`):n.getElementById(`apexcharts-css`);if(!r){r=X.createElementNS(`http://www.w3.org/1999/xhtml`,`style`),r.id=`apexcharts-css`,r.textContent=Pb;let i=this.opts.chart?.nonce||this.w.config.chart.nonce;i&&r.setAttribute(`nonce`,i),t?e.prepend(r):this.w.config.chart.injectStyleSheet!==!1&&n.head.appendChild(r)}}let r=this.create(this.w.config.series,{});if(!r)return e(this);this.mount(r).then(()=>{typeof this.w.config.chart.events.mounted==`function`&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent(`mounted`,[this,this.w]),e(r)}).catch(e=>{let n=e instanceof Error?e:Error(String(e)),r=n;r.chartId=this.w?.globals?.chartID,r.el=this.el,t(n)})}else t(Error(`Element not found`))}):Promise.reject(Error("ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property."))}create(e,t){var n,r;let i=this.w;this.core||new kb(this).initModules();let a=this.w.globals;if(a.noData=!1,a.animationEnded=!1,!Z.elementExists(this.el)||(this.responsive.checkResponsiveConfig(t),i.config.xaxis.convertedCatToNumeric&&new wv(i.config).convertCatToNumericXaxis(i.config,this.ctx),this.core.setupElements(),i.config.chart.type===`treemap`&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),a.svgWidth===0))return a.animationEnded=!0,null;let o=e;e.forEach((e,t)=>{e.hidden&&(o=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:t}))});let s=Nv.checkComboSeries(o,i.config.chart.type);a.comboCharts=s.comboCharts,a.comboBarCount=s.comboBarCount;let c=o.every(e=>e.data&&e.data.length===0);(o.length===0||c&&a.collapsedSeries.length<1)&&this.series.handleNoData(),Y.isBrowser()&&this.events.setupEventHandlers();let l=this.data.parseData(o);
1035this._writeParsedSeriesData(l.seriesData),this._writeParsedRangeData(l.rangeData),this._writeParsedCandleData(l.candleData),this._writeParsedLabelData(l.labelData),this._writeParsedAxisFlags(l.axisFlags),this.theme.init(),new Jv(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),(!a.noData||a.collapsedSeries.length===i.seriesData.series.length||i.config.legend.showForSingleSeries)&&((n=this.legend)==null||n.init()),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),i.config.xaxis.type!==`category`&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX)),this.formatters.heatmapLabelFormatters(),new Nv(this.w).getLargestMarkerSize();let u=this.dimensions.plotCoords();this._writeLayoutCoords(u.layout);let d=this.core.xySettings();this.grid.createGridMask();let f=this.core.plotChartType(o,d),p=new Xv(this.w,this);return p.bringForward(),i.config.dataLabels.background.enabled&&p.dataLabelsBackground(),this.core.shiftGraphPosition(),(r=this.legend?.heatmapGradientLegend)==null||r.repositionToPlot(),i.globals.dataPoints>50&&i.dom.elWrap.classList.add(`apexcharts-disable-transitions`),{elGraph:f,xyRatios:d,dimensions:{plot:{left:i.layout.translateX,top:i.layout.translateY,width:i.layout.gridWidth,height:i.layout.gridHeight}}}}mount(e=null){let t=this,n=t.w;return new Promise((r,i)=>{var a,o,s,c,l,u,d;if(t.el===null)return i(Error(`Not enough data to display or target element not found`));(e===null||n.globals.allSeriesCollapsed)&&t.series.handleNoData(),t.grid=new ey(t.w,t);let f=t.grid.drawGrid(),p=kb._featureRegistry.get(`annotations`);if(t.annotations=p?new p(t.w,{theme:t.theme,timeScale:t.timeScale}):null,(a=t.annotations)==null||a.drawImageAnnos(),(o=t.annotations)==null||o.drawTextAnnos(),n.config.grid.position===`back`&&(f&&n.dom.elGraphical.add(f.el),f?.elGridBorders?.node&&n.dom.elGraphical.add(f.elGridBorders)),Array.isArray(e.elGraph))for(let t=0;t<e.elGraph.length;t++)n.dom.elGraphical.add(e.elGraph[t]);else n.dom.elGraphical.add(e.elGraph);n.config.grid.position===`front`&&(f&&n.dom.elGraphical.add(f.el),f?.elGridBorders?.node&&n.dom.elGraphical.add(f.elGridBorders)),n.config.xaxis.crosshairs.position===`front`&&t.crosshairs.drawXCrosshairs(),n.config.yaxis[0].crosshairs.position===`front`&&t.crosshairs.drawYCrosshairs(),n.config.chart.type!==`treemap`&&t.axes.drawAxis(n.config.chart.type,f);let m=new $v(this.w,this.ctx,f),h=new iy(this.w,{theme:this.theme,timeScale:this.timeScale},f);if(f!==null&&(m.xAxisLabelCorrections(),h.setYAxisTextAlignments(),n.config.yaxis.map((e,t)=>{n.globals.ignoreYAxisIndexes.indexOf(t)===-1&&h.yAxisTitleRotate(t,e.opposite)})),(s=t.annotations)==null||s.drawAxesAnnotations(),!n.globals.noData){if(Y.isBrowser()&&n.config.tooltip.enabled&&!n.globals.noData&&((c=t.w.globals.tooltip)==null||c.drawTooltip(e.xyRatios)),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.keyboard.enabled&&n.config.chart.accessibility.keyboard.navigation.enabled&&((l=t.keyboardNavigation)==null||l.init()),Y.isBrowser()&&n.globals.axisCharts&&(n.axisFlags.isXNumeric||n.config.xaxis.convertedCatToNumeric||n.axisFlags.isRangeBar))(n.config.chart.zoom.enabled||n.config.chart.selection&&n.config.chart.selection.enabled||n.config.chart.pan&&n.config.chart.pan.enabled)&&((u=t.zoomPanSelection)==null||u.init({xyRatios:e.xyRatios}));else{let e=n.config.chart.toolbar.tools;[`zoom`,`zoomin`,`zoomout`,`selection`,`pan`,`reset`].forEach(t=>{e[t]=!1})}n.config.chart.toolbar.show&&!n.globals.allSeriesCollapsed&&((d=t.toolbar)==null||d.createToolbar())}n.globals.memory.methodsToExec.length>0&&n.globals.memory.methodsToExec.forEach(e=>{e.method(e.params,!1,e.context)}),!n.globals.axisCharts&&!n.globals.noData&&t.core.resizeNonAxisCharts(),r(t)})}destroy(){Y.isBrowser()&&(window.removeEventListener(`resize`,this.windowResizeHandler),Nb(this.el.parentNode,this.parentResizeHandler),clearTimeout(this.w.globals.resizeTimer??void 0));let e=this.w.config.chart.id;e&&Array.isArray(Apex._chartInstances)&&Apex._chartInstances.forEac
1035h((t,n)=>{t.id===Z.escapeString(e)&&Apex._chartInstances.splice(n,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),new Ab(this.ctx).clear({isUpdating:!1})}updateOptions(e,t=!1,n=!0,r=!0,i=!0){let a=this.w;if(a.interact.selection=void 0,this.lastUpdateOptions){if(Z.shallowEqual(this.lastUpdateOptions,e))return Promise.resolve(this);if(e.series&&this.lastUpdateOptions.series&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(e.series)){let t=K({},e),n=K({},this.lastUpdateOptions);if(delete t.series,delete n.series,Z.shallowEqual(t,n))return Promise.resolve(this)}}return e.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((e,t)=>this.updateHelpers._extendSeries(e,t))),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,t,n,r,i)}updateSeries(e=[],t=!0,n=!0){return this.data.resetParsingFlags(),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,n)}appendSeries(e,t=!0,n=!0){this.data.resetParsingFlags();let r=this.w.config.series.slice();return r.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(r,t,n)}appendData(e,t=!0){let n=this;n.data.resetParsingFlags(),n.w.globals.dataChanged=!0,n.series.getPreviousPaths();let r=n.w.config.series.slice();for(let t=0;t<r.length;t++)if(e[t]!==null&&e[t]!==void 0){let n=e[t],i=r[t];for(let e=0;e<n.data.length;e++)i.data.push(n.data[e])}return n.w.config.series=r,t&&(n.w.globals.initialSeries=Z.clone(n.w.config.series)),this.update()}update(e){return new Promise((t,n)=>{if(this.lastUpdateOptions&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(e))return t(this);this.lastUpdateOptions=Z.clone(e),new Ab(this.ctx).clear({isUpdating:!0});let r=this.create(this.w.config.series,e??{});if(!r)return t(this);this.mount(r).then(()=>{var e;(e=this.morphTypeChange)==null||e.applyChromeFade(),typeof this.w.config.chart.events.updated==`function`&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent(`updated`,[this,this.w]),this.w.globals.isDirty=!0,t(this)}).catch(e=>{n(e)})})}fastUpdate(e){return new Promise((t,n)=>{var r;try{let n=this.w,i=n.globals;i.shouldAnimate=e,i.dataChanged=!0,i.animationEnded=!1,Zv.invalidateSelectors(n);let a=n.globals;a.maxY=-Number.MAX_VALUE,a.minY=Number.MIN_VALUE,a.minYArr=[],a.maxYArr=[],a.maxX=-Number.MAX_VALUE,a.minX=Number.MAX_VALUE,a.initialMaxX=-Number.MAX_VALUE,a.initialMinX=Number.MAX_VALUE,a.yAxisScale=[],a.xAxisScale=null,a.xAxisTicksPositions=[],a.xRange=0,a.yRange=[],a.zRange=0,a.xTickAmount=0,a.multiAxisTickAmount=0,a.pointsArray=[],a.dataLabelsRects=[],a.lastDrawnDataLabelsIndexes=[],a.textRectsCache=new Map,a.domCache=new Map,a.cachedSelectors={},a.disableZoomIn=!1,a.disableZoomOut=!1,i.axisCharts&&(this.core.coreCalculations(),n.config.xaxis.type!==`category`&&this.formatters.setLabelFormatters());let o=this.core.xySettings(),s=n.dom.elGraphical.node;s.querySelectorAll(`.apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background`).forEach(e=>e.parentNode?.removeChild(e));let c=this.core.plotChartType(n.config.series,o),l=s.querySelector(`.apexcharts-grid`),u=Array.isArray(c)?c:[c];l&&n.config.grid.position===`front`?u.forEach(e=>{let t=e&&e.node?e.node:e;t&&s.insertBefore(t,l)}):u.forEach(e=>{n.dom.elGraphical.add(e)});let d=new Xv(n,this);d.bringForward(),n.config.dataLabels.background.enabled&&d.dataLabelsBackground(),Y.isBrowser()&&n.config.tooltip.enabled&&!i.noData&&((r=n.globals.tooltip)==null||r.drawTooltip(o)),typeof n.config.chart.events.updated==`function`&&n.config.chart.events.updated(this,n),this.events.fireEvent(`updated`,[this,n]),i.isDirty=!0,t(this)}catch(e){n(e)}})}getSyncedCharts(){let e=this.getGroupedCharts(),t=[this];
1035return e.length&&(t=[],e.forEach(e=>{t.push(e)})),t}getGroupedCharts(){return Apex._chartInstances.filter(e=>{if(e.group)return!0}).map(e=>this.w.config.chart.group===e.group?e.chart:this)}static getChartByID(e){let t=Z.escapeString(e);if(!Apex._chartInstances)return;let n=Apex._chartInstances.filter(e=>e.id===t)[0];return n&&n.chart}static initOnLoad(){let t=document.querySelectorAll(`[data-apexcharts]`);for(let n=0;n<t.length;n++){let r=t[n],i=JSON.parse(t[n].getAttribute(`data-options`)??``);new e(r,i).render()}}static exec(e,t,...n){let r=this.getChartByID(e);if(!r)return;r.w.globals.isExecCalled=!0;let i=null;return r.publicMethods.indexOf(t)!==-1&&(i=r[t](...n)),i}static merge(e,t){return Z.extend(e,t)}static getThemePalettes(){return ry()}static use(e){Ny(e)}static registerFeatures(e){kb.registerFeatures(e)}toggleSeries(e){return this.series.toggleSeries(e)}highlightSeriesOnLegendHover(e,t){return this.series.toggleSeriesOnHover(e,t)}showSeries(e){this.series.showSeries(e)}hideSeries(e){this.series.hideSeries(e)}highlightSeries(e){this.series.highlightSeries(e)}isSeriesHidden(e){return this.series.isSeriesHidden(e)}resetSeries(e=!0,t=!0){this.series.resetSeries(e,t)}addEventListener(e,t){this.events.addEventListener(e,t)}removeEventListener(e,t){this.events.removeEventListener(e,t)}addXaxisAnnotation(e,t=!0,n=void 0){var r;let i=this;n&&(i=n),(r=i.annotations)==null||r.addXaxisAnnotationExternal(e,t,i)}addYaxisAnnotation(e,t=!0,n=void 0){var r;let i=this;n&&(i=n),(r=i.annotations)==null||r.addYaxisAnnotationExternal(e,t,i)}addPointAnnotation(e,t=!0,n=void 0){var r;let i=this;n&&(i=n),(r=i.annotations)==null||r.addPointAnnotationExternal(e,t,i)}clearAnnotations(e=void 0){var t;let n=this;e&&(n=e),(t=n.annotations)==null||t.clearAnnotations(n)}removeAnnotation(e,t=void 0){var n;let r=this;t&&(r=t),(n=r.annotations)==null||n.removeAnnotation(r,e)}getChartArea(){return this.w.dom.baseEl.querySelector(`.apexcharts-inner`)}getSeriesTotalXRange(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}getHighestValueInSeries(e=0){return new ny(this.w).getMinYMaxY(e).highestY}getLowestValueInSeries(e=0){return new ny(this.w).getMinYMaxY(e).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){let e=this.w,t=e.globals;return{series:e.seriesData.series,seriesNames:e.seriesData.seriesNames,colors:t.colors,labels:e.labelData.labels,seriesTotals:t.seriesTotals,seriesPercent:t.seriesPercent,seriesXvalues:t.seriesXvalues,seriesYvalues:t.seriesYvalues,minX:t.minX,maxX:t.maxX,minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,minXDiff:t.minXDiff,dataPoints:t.dataPoints,xAxisScale:t.xAxisScale,yAxisScale:t.yAxisScale,xTickAmount:t.xTickAmount,isXNumeric:e.axisFlags.isXNumeric,seriesYAxisMap:t.seriesYAxisMap,seriesYAxisReverseMap:t.seriesYAxisReverseMap,svgWidth:t.svgWidth,svgHeight:t.svgHeight,gridWidth:e.layout.gridWidth,gridHeight:e.layout.gridHeight,selectedDataPoints:e.interact.selectedDataPoints,collapsedSeriesIndices:t.collapsedSeriesIndices,zoomed:e.interact.zoomed,seriesX:e.seriesData.seriesX,seriesZ:e.seriesData.seriesZ,seriesCandleO:e.candleData.seriesCandleO,seriesCandleH:e.candleData.seriesCandleH,seriesCandleM:e.candleData.seriesCandleM,seriesCandleL:e.candleData.seriesCandleL,seriesCandleC:e.candleData.seriesCandleC,seriesRangeStart:e.rangeData.seriesRangeStart,seriesRangeEnd:e.rangeData.seriesRangeEnd,seriesGoals:e.seriesData.seriesGoals}}toggleDataPointSelection(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}zoomX(e,t){var n;(n=this.ctx.toolbar)==null||n.zoomUpdateOptions(e,t)}setLocale(e){this.localization.setCurrentLocaleValues(e)}dataURI(e){if(!this.ctx.exports)throw Error(`apexcharts: Exports feature is not registered. Import apexcharts/features/exports.`);return this.ctx.exports.dataURI(e)}getSvgString(e){if(!this.ctx.exports)throw Error(`apexcharts: Exports feature is not registered. Import apexcharts/features/exports.`);return this.ctx.exports.getSvgString(e)}exportToCSV(e={}){if(!this.ctx.exports)throw Error(`apexcharts: Exports feature is not registered. Import apexcharts/features/exports.`);return this.ctx.exports.exportToCSV(e)}paper(){return this.w.dom.Paper}drillDown(e){if(!this.ctx.drilldown)throw Error(`apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.`);return this.ctx.drilldown.drillDown(e)}drillUp(){if(!this.ctx.drilldown)throw Error(`apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.`);return this.ctx.drilldown.drillUp()}drillToRoot(){if(!this.ctx.drilldown)throw Error(`apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.`);return this.ctx.drilldown.drillToRoot()}
1035_writeParsedSeriesData(e){Object.assign(this.w.seriesData,e)}_writeParsedRangeData(e){Object.assign(this.w.rangeData,e)}_writeParsedCandleData(e){Object.assign(this.w.candleData,e)}_writeParsedLabelData(e){Object.assign(this.w.labelData,e)}_writeParsedAxisFlags(e){Object.assign(this.w.axisFlags,e)}_writeLayoutCoords(e){Object.assign(this.w.layout,e)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){this.w.globals.resizeTimer=window.setTimeout(()=>{this.w.globals.resized=!0,this.w.globals.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){clearTimeout(this.w.globals.resizeTimer??void 0);let{redrawOnWindowResize:e}=this.w.config.chart;typeof e==`function`&&(e=e()),e&&this._windowResize()}},Ib=`.apexcharts-flip-y { 1036 transform: scaleY(-1) translateY(-100%); 1037 transform-origin: top; 1038 transform-box: fill-box; 1039} 1040.apexcharts-flip-x { 1041 transform: scaleX(-1); 1042 transform-origin: center; 1043 transform-box: fill-box; 1044} 1045.apexcharts-legend { 1046 display: flex; 1047 overflow: auto; 1048 padding: 0 10px; 1049} 1050.apexcharts-legend.apexcharts-legend-group-horizontal { 1051 flex-direction: column; 1052} 1053.apexcharts-legend-group { 1054 display: flex; 1055} 1056.apexcharts-legend-group-vertical { 1057 flex-direction: column-reverse; 1058} 1059.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top { 1060 flex-wrap: wrap 1061} 1062.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left { 1063 flex-direction: column; 1064 bottom: 0; 1065} 1066.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 { 1067 justify-content: flex-start; 1068 align-items: flex-start; 1069} 1070.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center { 1071 justify-content: center; 1072 align-items: center; 1073} 1074.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right { 1075 justify-content: flex-end; 1076 align-items: flex-end; 1077} 1078.apexcharts-legend-series { 1079 cursor: pointer; 1080 line-height: normal; 1081 display: flex; 1082 align-items: center; 1083} 1084.apexcharts-legend-text { 1085 position: relative; 1086 font-size: 14px; 1087} 1088.apexcharts-legend-text *, .apexcharts-legend-marker * { 1089 pointer-events: none; 1090} 1091.apexcharts-legend-marker { 1092 position: relative; 1093 display: flex; 1094 align-items: center; 1095 justify-content: center; 1096 cursor: pointer; 1097 margin-right: 1px; 1098} 1099 1100.apexcharts-legend-series.apexcharts-no-click { 1101 cursor: auto; 1102} 1103.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series { 1104 display: none !important; 1105} 1106.apexcharts-inactive-legend { 1107 opacity: 0.45; 1108} `,Lb=class{constructor(e,t){this.w=e,this.ctx=t}svgStringToNode(e){return new DOMParser().parseFromString(e,`image/svg+xml`).documentElement}scaleSvgNode(e,t){let n=parseFloat(e.getAttributeNS(null,`width`)),r=parseFloat(e.getAttributeNS(null,`height`));e.setAttributeNS(null,`width`,n*t),e.setAttributeNS(null,`height`,r*t),e.setAttributeNS(null,`viewBox`,`0 0 `+n+` `+r)}getSvgString(e){return new Promise(t=>{let n=this.w,r=e||n.config.chart.toolbar.export.scale||n.config.chart.toolbar.export.width/n.globals.svgWidth;r||=1;let i=n.globals.svgWidth*r,a=n.globals.svgHeight*r,o=n.dom.elWrap.cloneNode(!0);o.style.width=i+`px`,o.style.height=a+`px`;let s=new XMLSerializer().serializeToString(o),c=n.config.legend.show&&n.dom.elLegendWrap&&n.dom.elLegendWrap.children.length>0,l=` 1109 .apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect { 1110 display: none; 1111 } 1112 `;c&&(l+=Ib);let u=` 1113 <svg xmlns="http://www.w3.org/2000/svg" 1114 version="1.1" 1115 xmlns:xlink="http://www.w3.org/1999/xlink" 1116 class="apexcharts-svg" 1117 xmlns:data="ApexChartsNS" 1118 transform="translate(0, 0)" 1119 width="${n.globals.svgWidth}px" height="${n.globals.svgHeight}px"> 1120 <foreignObject width="100%" height="100%"> 1121 <div xmlns="http://www.w3.org/1999/xhtml" style="width:${i}px; height:${a}px;"> 1122 <style type="text/css"> 1123 ${l} 1124 </style> 1125 ${s} 1126 </div> 1127 </foreignObject> 1128 </svg> 1129 `,d=this.svgStringToNode(u);r!==1&&this.scaleSvgNode(d,r),this.convertImagesToBase64(d).then(()=>{u=new XMLSerializer().serializeToString(d),t(u.replace(/ /g,` `))})})}convertImagesToBase64(e){let t=e.getElementsByTagName(`image`),n=Array.from(t).map(e=>{let t=e.getAttributeNS(`http://www.w3.org/1999/xlink`,`href`);return t&&!t.startsWith(`data:`)?this.getBase64FromUrl(t).then(t=>{e.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,t)}).catch(e=>
1129{console.error(`Error converting image to base64:`,e)}):Promise.resolve()});return Promise.all(n)}getBase64FromUrl(e){return Y.isSSR()?Promise.resolve(e):new Promise((t,n)=>{let r=new Image;r.crossOrigin=`Anonymous`,r.onload=()=>{let e=document.createElement(`canvas`);e.width=r.width,e.height=r.height;let n=e.getContext(`2d`);n&&n.drawImage(r,0,0),t(e.toDataURL())},r.onerror=n,r.src=e})}svgUrl(){return new Promise(e=>{this.getSvgString().then(t=>{let n=new Blob([t],{type:`image/svg+xml;charset=utf-8`});e(URL.createObjectURL(n))})})}dataURI(e){return Y.isSSR()?Promise.resolve({imgURI:``}):new Promise(t=>{let n=this.w,r=e?e.scale||e.width/n.globals.svgWidth:1,i=document.createElement(`canvas`);i.width=n.globals.svgWidth*r,i.height=parseInt(n.dom.elWrap.style.height,10)*r;let a=n.config.chart.background===`transparent`||!n.config.chart.background?`#fff`:n.config.chart.background,o=i.getContext(`2d`);o&&(o.fillStyle=a,o.fillRect(0,0,i.width*r,i.height*r),this.getSvgString(r).then(e=>{let n=`data:image/svg+xml,`+encodeURIComponent(e),r=new Image;r.crossOrigin=`anonymous`,r.onload=()=>{o.drawImage(r,0,0);let e=i;e.msToBlob?t({blob:e.msToBlob()}):t({imgURI:i.toDataURL(`image/png`)})},r.src=n}))})}exportToSVG(){this.svgUrl().then(e=>{this.triggerDownload(e,this.w.config.chart.toolbar.export.svg.filename,`.svg`)})}exportToPng(){let e=this.w.config.chart.toolbar.export.scale,t=this.w.config.chart.toolbar.export.width,n=e?{scale:e}:t?{width:t}:void 0;this.dataURI(n).then(({imgURI:e,blob:t})=>{t?navigator.msSaveOrOpenBlob(t,this.w.globals.chartID+`.png`):this.triggerDownload(e,this.w.config.chart.toolbar.export.png.filename,`.png`)})}exportToCSV({series:e,fileName:t,columnDelimiter:n=`,`,lineDelimiter:r=` 1130`}){let i=this.w;e||=i.config.series;let a=[],o=[],s=``,c=i.seriesData.series.map((e,t)=>i.globals.collapsedSeriesIndices.indexOf(t)===-1?e:[]),l=e=>typeof i.config.chart.toolbar.export.csv.categoryFormatter==`function`?i.config.chart.toolbar.export.csv.categoryFormatter(e):i.config.xaxis.type===`datetime`&&String(e).length>=10?new Date(e).toDateString():Z.isNumber(e)?e:e.split(n).join(``),u=e=>typeof i.config.chart.toolbar.export.csv.valueFormatter==`function`?i.config.chart.toolbar.export.csv.valueFormatter(e):e,d=Math.max(...e.map(e=>e.data?e.data.length:0)),f=new Iy(this.w),p=new Qv(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),m=e=>{let t=``;if(!i.globals.axisCharts)t=i.config.labels[e];else{if(i.config.xaxis.type===`category`||i.config.xaxis.convertedCatToNumeric){if(i.globals.isBarHorizontal){let n=i.formatters.yLabelFormatters[0],r=new dy(this.ctx.w).getActiveConfigSeriesIndex();t=n(i.labelData.labels[e],{seriesIndex:r,dataPointIndex:e,w:i})}else t=p.getLabel(i.labelData.labels,i.labelData.timescaleLabels,0,e).text}i.config.xaxis.type===`datetime`&&(i.config.xaxis.categories.length?t=i.config.xaxis.categories[e]:i.config.labels.length&&(t=i.config.labels[e]))}return t===null?`nullvalue`:(Array.isArray(t)&&(t=t.join(` `)),Z.isNumber(t)?t:t.split(n).join(``))},h=()=>[...Array(d)].map(()=>``),g=(t,r)=>{if(a.length&&r===0&&o.push(a.join(n)),t.data){t.data=t.data.length&&t.data||h();for(let s=0;s<t.data.length;s++){a=[];let d=m(s);if(d!==`nullvalue`){if(d||(f.isFormatXY()?d=e[r].data[s].x:f.isFormat2DArray()&&(d=e[r].data[s]?e[r].data[s][0]:``)),r===0){a.push(l(d));for(let t=0;t<i.seriesData.series.length;t++){let n=f.isFormatXY()?e[t].data[s]?.y:c[t][s];a.push(u(n))}}(i.config.chart.type===`candlestick`||t.type&&t.type===`candlestick`)&&(a.pop(),a.push(i.candleData.seriesCandleO[r][s]),a.push(i.candleData.seriesCandleH[r][s]),a.push(i.candleData.seriesCandleL[r][s]),a.push(i.candleData.seriesCandleC[r][s])),(i.config.chart.type===`boxPlot`||t.type&&t.type===`boxPlot`)&&(a.pop(),a.push(i.candleData.seriesCandleO[r][s]),a.push(i.candleData.seriesCandleH[r][s]),a.push(i.candleData.seriesCandleM[r][s]),a.push(i.candleData.seriesCandleL[r][s]),a.push(i.candleData.seriesCandleC[r][s])),i.config.chart.type===`rangeBar`&&(a.pop(),a.push(i.rangeData.seriesRangeStart[r][s]),a.push(i.rangeData.seriesRangeEnd[r][s])),(i.config.chart.type===`violin`||t.type&&t.type===`violin`)&&(a.pop(),a.push(i.violinData.seriesViolinMin[r]?.[s]),a.push(i.violinData.seriesViolinMax[r]?.[s]),a.push(i.violinData.seriesViolinPoints[r]?.[s]?.length??0)),a.length&&o.push(a.join(n))}}}};a.push(i.config.chart.toolbar.export.csv.headerCategory),i.config.chart.type===`boxPlot`?(a.push(`minimum`),a.push(`q1`),a.push(`median`),a.push(`q3`),a.push(`maximum`)):i.config.chart.type===`candlestick`?(a.push(`open`),a.push(`high`),a.push(`low`),a.push(`close`)):i.config.chart.type===`rangeBar`?(a.push(`minimum`),a.push(`maximum`)):i.config.chart.type===`violin`?(a.push(`minimum`),a.push(`maximum`),a.push(`observations`)):e.map((e,t)=>{let r=(e.name?e.name:`series-${t}`)+``;i.globals.axisCharts&&a.push(r.split(n).join(``)?r.split(n).join(``):`series-${t}`)}),i.globals.axisCharts||(a.push(i.config.chart.toolbar.export.csv.headerValue),o.push(a.join(n))
1130),!i.globals.allSeriesHasEqualX&&i.globals.axisCharts&&!i.config.xaxis.categories.length&&!i.config.labels.length?(()=>{let t=new Set,r={};e.forEach((n,i)=>{n?.data.forEach(n=>{let a,o;if(f.isFormatXY())a=n.x,o=n.y;else if(f.isFormat2DArray())a=n[0],o=n[1];else return;r[a]||(r[a]=Array(e.length).fill(``)),r[a][i]=u(o),t.add(a)})}),a.length&&o.push(a.join(n)),Array.from(t).sort().forEach(e=>{o.push([l(e),r[e].join(n)])})})():e.map((e,t)=>{i.globals.axisCharts?g(e,t):(a=[],a.push(l(i.labelData.labels[t])),a.push(u(c[t])),o.push(a.join(n)))}),s+=o.join(r),this.triggerDownload(`data:text/csv; charset=utf-8,`+encodeURIComponent(``+s),t||i.config.chart.toolbar.export.csv.filename,`.csv`)}triggerDownload(e,t,n){if(Y.isSSR())return;let r=document.createElement(`a`);r.href=e,r.download=(t||this.w.globals.chartID)+n,document.body.appendChild(r),r.click(),document.body.removeChild(r)}};Fb.registerFeatures({exports:Lb});var Rb=class{constructor(e){this.w=e.w,this.lgCtx=e}getLegendStyles(){if(Y.isSSR())return null;let e=document.createElement(`style`);e.setAttribute(`type`,`text/css`);let t=this.w.config.chart.nonce;t&&e.setAttribute(`nonce`,t);let n=document.createTextNode(Ib);return e.appendChild(n),e}getLegendDimensions(){let e=this.w.dom.baseEl.querySelector(`.apexcharts-legend`);if(!e)return{clwh:0,clww:0};let{width:t,height:n}=e.getBoundingClientRect();return{clwh:n,clww:t}}appendToForeignObject(){var e;let t=this.getLegendStyles();this.w.config.chart.injectStyleSheet!==!1&&t&&((e=this.w.dom.elLegendForeign)==null||e.appendChild(t))}toggleDataSeries(e,t){let n=this.w;if(n.globals.axisCharts||n.config.chart.type===`radialBar`){n.globals.resized=!0;let r=null,i=null;if(n.globals.risingSeries=[],n.globals.axisCharts){if(r=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}']`),!r)return;i=parseInt(r.getAttribute(`data:realIndex`)??``,10)}else{if(r=n.dom.baseEl.querySelector(`.apexcharts-series[rel='${e+1}']`),!r)return;i=parseInt(r.getAttribute(`rel`)??``,10)-1}if(t?[{cs:n.globals.collapsedSeries,csi:n.globals.collapsedSeriesIndices},{cs:n.globals.ancillaryCollapsedSeries,csi:n.globals.ancillaryCollapsedSeriesIndices}].forEach(e=>{let t=e.cs,n=e.csi;this.riseCollapsedSeries(t,n,i)}):this.hideSeries({seriesEl:r,realIndex:i}),n.config.chart.accessibility.enabled){let t=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${e+1}"]`);if(t){let r=n.globals.collapsedSeriesIndices.includes(i)||n.globals.ancillaryCollapsedSeriesIndices.includes(i);t.setAttribute(`aria-pressed`,r?`true`:`false`);let a=t.querySelector(`.apexcharts-legend-text`),o=a?a.textContent:n.seriesData.seriesNames[e],s=r?`hidden`:`visible`;t.setAttribute(`aria-label`,`${o}, ${s}. Press Enter or Space to toggle.`)}}}else{let t=n.dom.Paper.findOne(` .apexcharts-series[rel='${e+1}'] path`),r=n.config.chart.type;if(r===`pie`||r===`polarArea`||r===`donut`){let e=n.config.plotOptions.pie.donut.labels;new Q(this.w).pathMouseDown(t,null),this.lgCtx.printDataLabelsInner(t.node,e)}if(n.config.chart.accessibility.enabled){let t=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${e+1}"]`);if(t){let r=n.globals.collapsedSeriesIndices.includes(e);t.setAttribute(`aria-pressed`,r?`true`:`false`);let i=t.querySelector(`.apexcharts-legend-text`),a=i?i.textContent:n.seriesData.seriesNames[e],o=r?`hidden`:`visible`;t.setAttribute(`aria-label`,`${a}, ${o}. Press Enter or Space to toggle.`)}}}}getSeriesAfterCollapsing({realIndex:e}){let t=this.w,n=t.globals,r=Z.clone(t.config.series);if(n.axisCharts){let i=t.config.yaxis[n.seriesYAxisReverseMap[e]],a={index:e,data:r[e].data.slice(),type:r[e].type||t.config.chart.type};if(i&&i.show&&i.showAlways)n.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(n.ancillaryCollapsedSeries.push(a),n.ancillaryCollapsedSeriesIndices.push(e));else if(n.collapsedSeriesIndices.indexOf(e)<0){n.collapsedSeries.push(a),n.collapsedSeriesIndices.push(e);let t=n.risingSeries.indexOf(e);n.risingSeries.splice(t,1)}}else n.collapsedSeries.push({index:e,data:r[e],type:t.config.series[e].type??`line`}),n.collapsedSeriesIndices.push(e);return n.allSeriesCollapsed=n.collapsedSeries.length+n.ancillaryCollapsedSeries.length===t.config.series.length,this._getSeriesBasedOnCollapsedState(r)}hideSeries({seriesEl:e,realIndex:t}){let n=this.w,r=this.getSeriesAfterCollapsing({realIndex:t}),i=e.childNodes;for(let e=0;e<i.length;e++)i[e].classList.contains(`apexcharts-series-markers-wrap`)&&(i[e].classList.contains(`apexcharts-hide`)?i[e].classList.remove(`apexcharts-hide`):i[e].classList.add(`apexcharts-hide`));this.lgCtx.updateSeries(r,n.config.chart.animations.dynamicAnimation.enabled)}riseCollapsedSeries(e,t,n){let r=this.w,i=Z.clone(r.config.series);if(e.length>0){for(let a=0;a<e.length;a++)e[a].index===n&&(r.globals.axisCharts?i[n].data=e[a].data.slice():i[n]=e[a].data,typeof i[n]!=`number`&&(i[n].hidden=!1),e.splice(a,1),t.splice(a,1),r.globals.risingSeries.push(n),a--);i=this._getSeriesBasedOnCollapsedState(i),this.lgCtx.updateSeries(i,r.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(e){let t=this.w,n=0;return t.globals.axisCharts?e.forEach((r,i)=>{t.globals.collapsedSeriesIndices.indexOf(i)<0&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0||(e[i].data=[],n++)}):e.forEach((r,i)=>{t.globals.collapsedSeriesIndices.indexOf(i)<0||(e[i]=0,n++)}),t.globals.allSeriesCollapsed=n===e.length,e}},zb=`http://www.w3.org/2000/svg`,Bb=class{constructor(e,t){this.w=e,this.ctx=t,this.svgEl=null,this.arrowEl=null,this.hoverValueEl=null,this._min=0,this._max=0,this._geom=null,this._bandHitEls=[],this._activeBandIndex=-1,this._onCellEnter=this._onCellEnter.bind(this),this._onCellLeave=this._onCellLeave.bind(this),this._onBandEnter=this._onBandEnter.bind(this),this._onBandLeave=this._onBandLeave.bind(this)}_getFormatter(){let e=this.w.config.plotOptions.heatmap.colorScale.gradientLegend;return typeof e.formatter==`function`?e.formatter:e=>{if(!Number.isFinite(e))return String(e);let t=Math.abs(e);return t>=1e3?e.toFixed(0):t>=10?e.toFixed(1):e.toFixed(2)}}static isEnabled(e){let t=e?.config?.plotOptions?.heatmap?.colorScale?.gradientLegend;return!!(t&&t.enabled)}draw(){let e=this.w,t=e.dom.elLegendWrap;if(!t)return;let n=e.config.plotOptions.heatmap.colorScale.gradientLegend,r=e.config.legend.position,i=r===`left`||r===`right`,a=n.arrow?.size??8,o=a+4,s=n.showLabels?28:4,c=n.showLabels?20:4,l=n.showLabels?44:0,u=this._resolveStripLength(i?n.height:n.width,i),d=n.thickness,f=i?Math.max(d+o+4,l):u+s*2,p=i?u+c*2:d+o+4,m=(f-(d+o))/2,h=i?r===`left`?m:m+o:s,g=i?c:r===`top`?o:4,_=X.createElementNS(zb,`svg`);_.setAttribute(`class`,`apexcharts-heatmap-gradient-legend`),_.setAttribute(`width`,String(f)),_.setAttribute(`height`,String(p)),_.setAttribute(`overflow`,`visible`);let v=X.createElementNS(zb,`defs`),y=`apexcharts-heatmap-gradient-${e.globals.cuid}`,b=X.createElementNS(zb,`linearGradient`);b.setAttribute(`id`,y),i?(b.setAttribute(`x1`,`0`),b.setAttribute(`y1`,`1`),b.setAttribute(`x2`,`0`),b.setAttribute(`y2`,`0`)):(b.setAttribute(`x1`,`0`),b.setAttribute(`y1`,`0`),b.setAttribute(`x2`,`1`),b.setAttribute(`y2`,`0`));let{min:x,max:S,stops:C,bands:w}=this._computeStops();
1130this._min=x,this._max=S,C.forEach(e=>{let t=X.createElementNS(zb,`stop`);t.setAttribute(`offset`,`${(e.percent*100).toFixed(2)}%`),t.setAttribute(`stop-color`,e.color),b.appendChild(t)}),v.appendChild(b),_.appendChild(v);let T=X.createElementNS(zb,`rect`);if(T.setAttribute(`x`,String(h)),T.setAttribute(`y`,String(g)),T.setAttribute(`width`,String(i?d:u)),T.setAttribute(`height`,String(i?u:d)),T.setAttribute(`rx`,`2`),T.setAttribute(`fill`,`url(#${y})`),_.appendChild(T),n.showLabels){let t=n.labelStyle?.colors||(Array.isArray(e.config.legend.labels.colors)?e.config.legend.labels.colors[0]:e.config.legend.labels.colors)||e.config.chart.foreColor,r=n.labelStyle?.fontSize||`11px`,a=n.labelStyle?.fontFamily||e.config.chart.fontFamily,o=this._getFormatter(),s=(e,n,i,o)=>{let s=X.createElementNS(zb,`text`);return s.setAttribute(`x`,String(n)),s.setAttribute(`y`,String(i)),s.setAttribute(`text-anchor`,o),s.setAttribute(`dominant-baseline`,`middle`),s.setAttribute(`fill`,t),s.setAttribute(`font-size`,r),a&&s.setAttribute(`font-family`,a),s.textContent=String(e),s};if(i){let e=h+d/2;_.appendChild(s(o(x),e,g+u+10,`middle`)),_.appendChild(s(o(S),e,g-10,`middle`))}else{let e=g+d/2;_.appendChild(s(o(x),h-6,e,`end`)),_.appendChild(s(o(S),h+u+6,e,`start`))}}let E=n.arrow?.color||e.config.chart.foreColor,D=this._buildArrow(a,E,r);if(_.appendChild(D),this.arrowEl=D,this._bandHitEls=[],e.config.legend.onItemHover.highlightDataSeries&&w.length>0&&w.forEach(e=>{let t=X.createElementNS(zb,`rect`);if(i){let n=g+u-e.p2*u,r=g+u-e.p1*u;t.setAttribute(`x`,String(h)),t.setAttribute(`y`,String(n)),t.setAttribute(`width`,String(d)),t.setAttribute(`height`,String(Math.max(0,r-n)))}else t.setAttribute(`x`,String(h+e.p1*u)),t.setAttribute(`y`,String(g)),t.setAttribute(`width`,String(Math.max(0,(e.p2-e.p1)*u))),t.setAttribute(`height`,String(d));t.setAttribute(`fill`,`transparent`),t.setAttribute(`class`,`apexcharts-heatmap-gradient-band`),t.setAttribute(`data:range-index`,String(e.index)),t.style.cursor=`pointer`,_.appendChild(t),this._bandHitEls.push(t)}),this._geom={isVertical:i,position:r,stripX:h,stripY:g,stripLength:u,stripThickness:d,arrowSize:a,svgWidth:f,svgHeight:p},n.showHoverValue){let t=X.createElement(`div`);t.classList.add(`apexcharts-heatmap-gradient-legend-value`),t.style.position=`absolute`,t.style.fontSize=n.labelStyle?.fontSize||`11px`,t.style.fontFamily=n.labelStyle?.fontFamily||e.config.chart.fontFamily||``,t.style.color=e.config.chart.foreColor,t.style.background=`rgba(0,0,0,0.65)`,t.style.color=`#fff`,t.style.padding=`2px 6px`,t.style.borderRadius=`3px`,t.style.pointerEvents=`none`,t.style.whiteSpace=`nowrap`,t.style.opacity=`0`,t.style.transition=`opacity 120ms ease`,this.hoverValueEl=t}t.classList.add(`apexcharts-heatmap-gradient-legend-wrap`),t.classList.add(`apx-legend-position-`+r),t.appendChild(_),this.hoverValueEl&&t.appendChild(this.hoverValueEl),this.svgEl=_,this._applyWrapAlignment(t,r,i,f,p),this._attachHoverListeners(),this._attachBandHoverListeners()}_resolveStripLength(e,t){let n=this.w,r=t?n.globals.svgHeight||n.config.chart.height||300:n.globals.svgWidth||n.config.chart.width||600;if(typeof e==`string`){let t=e.trim();if(t.endsWith(`%`))return Math.max(20,r*(parseFloat(t)||0)/100);let n=parseFloat(t);return Number.isFinite(n)?n:200}return typeof e==`number`&&Number.isFinite(e)?e:200}_applyWrapAlignment(e,t,n,r,i){let a=this.w,o=a.config.plotOptions.heatmap.colorScale.gradientLegend.align||`center`,s=a.globals.svgWidth||a.config.chart.width||600,c=a.globals.svgHeight||a.config.chart.height||300,l=a.config.legend.offsetX||0,u=a.config.legend.offsetY||0;if(e.style.position=`absolute`,e.style.display=`block`,e.style.overflow=`visible`,e.style.padding=`0`,e.style.width=r+`px`,e.style.height=i+`px`,e.style.right=`auto`,e.style.bottom=`auto`,n){let n=c-i-24,a;a=o===`start`?12:o===`end`?12+Math.max(0,n):12+Math.max(0,n)/2,e.style.top=a+u+`px`,t===`left`?e.style.left=12+l+`px`:e.style.left=s-r-12+l+`px`}else{let n=s-r-24,a;a=o===`start`?12:o===`end`?12+Math.max(0,n):12+Math.max(0,n)/2,e.style.left=a+l+`px`,t===`top`?e.style.top=12+u+`px`:e.style.top=c-i-12+u+`px`}}repositionToPlot(){if(!Y.isBrowser())return;let e=this.w,t=e.globals,n=e.dom.elLegendWrap;if(!n||!this._geom||!Number.isFinite(t.gridWidth)||!Number.isFinite(t.gridHeight))return;let{isVertical:r,position:i,svgWidth:a,svgHeight:o,stripX:s,stripY:c,stripThickness:l}=this._geom,u=e.config.plotOptions.heatmap.colorScale.gradientLegend.align||`center`,d=e.config.legend.offsetX||0,f=e.config.legend.offsetY||0,p=this.ctx?.dimensions?.dimHelpers,m=p?p.getTitleSubtitleCoords(`title`).height+p.getTitleSubtitleCoords(`subtitle`).height:0,h=e.layout.xAxisHeight||0,g=(e,t)=>{let n=Math.max(0,e-t);return u===`start`?0:u===`end`?n:n/2};if(r){n.style.top=t.translateY+g(t.gridHeight,o)+f+`px`;let e=((i===`left`?0:t.translateX+t.gridWidth)+(i===`left`?t.translateX:t.svgWidth))/2;n.style.left=e-s-l/2+d+`px`}else{n.style.left=t.translateX+g(t.gridWidth,a)+d+`px`;let e=((i===`top`?m:t.translateY+t.gridHeight+h)+(i===`top`?t.translateY:t.svgHeight))/2;n.style.top=e-c-l/2+f+`px`}X.requestAnimationFrame(()=>this._enforceMinPlotGap())}_enforceMinPlotGap(){let e=this.w,t=e.dom.elLegendWrap,n=this.svgEl&&this.svgEl.querySelector(`rect`),r=e.dom.baseEl.querySelector(`.apexcharts-grid`);if(!t||!n||!r||!this._geom)return;let i=n.getBoundingClientRect(),a=r.getBoundingClientRect();if(!i.width||!i.height||!a.width||!a.height)return;let{isVertical:o,position:s}=this._geom;if(o){let e=s===`left`?a.left-i.right:i.left-a.right;if(e<16){let n=parseFloat(t.style.left)||0,r=16-e;t.style.left=n+(s===`left`?-r:r)+`px`}}else{let e=s===`top`?a.top-i.bottom:i.top-a.bottom;if(e<16){let n=parseFloat(t.style.top)||0,r=16-e;t.style.top=n+(s===`top`?-r:r)+`px`}}}destroy(){var e,t,n,r,i,a;for(let n=0;n<this._bandHitEls.length;n++){let r=this._bandHitEls[n];(e=r.removeEventListener)==null||e.call(r,`mousemove`,this._onBandEnter),(t=r.removeEventListener)==null||t.call(r,`mouseout`,this._onBandLeave)}if(this._bandHitEls=[],this._activeBandIndex=-1,this.ctx?.events)try{(r=(n=this.ctx.events).removeEventListener)==null||r.call(n,`dataPointMouseEnter`,this._onCellEnter),(a=(i=this.ctx.events).removeEventListener)==null||a.call(i,`dataPointMouseLeave`,this._onCellLeave)}catch{}}_attachBandHoverListeners(){if(Y.isBrowser())for(let e=0;e<this._bandHitEls.length;e++){let t=this._bandHitEls[e];t.addEventListener(`mousemove`,this._onBandEnter),t.addEventListener(`mouseout`,this._onBandLeave)}}_onBandEnter(e){var t,n;let r=this.w,i=e.currentTarget,a=parseInt(i.getAttribute(`data:range-index`)??`-1`,10);a<0||a===this._activeBandIndex||(this._activeBandIndex=a,(n=(t=this.ctx?.events)?.fireEvent)==null||n.call(t,`legendHover`,[this.ctx,a,r]),new dy(r).highlightRangeInSeries(a,`highlight`))}_onBandLeave(){if(this._activeBandIndex<0)return;let e=this._activeBandIndex;this._activeBandIndex=-1,new dy(this.w).highlightRangeInSeries(e,`reset`)}_attachHoverListeners(){Y.isBrowser()&&this.ctx?.events?.addEventListener&&(this.ctx.events.addEventListener(`dataPointMouseEnter`,this._onCellEnter),this.ctx.events.addEventListener(`dataPointMouseLeave`,this._onCellLeave))}_onCellEnter(...e){let t=this.w;if(!this.arrowEl)return;let n=e[e.length-1];if(!n||typeof n!=`object`)return;let r=n.seriesIndex,i=n.dataPointIndex;if(typeof r!=`number`||typeof i!=`number`||t.config.chart.type!==`heatmap`)return;let a=t.seriesData?.series?.[r]?.[i];a==null||Number.isNaN(a)||this._positionArrow(a)}_onCellLeave(){this.arrowEl&&(this.arrowEl.setAttribute(`opacity`,`0`),this.hoverValueEl&&(this.hoverValueEl.style.opacity=`0`))}_positionArrow(e){if(!this.arrowEl||!this._geom)return;
1130let{isVertical:t,position:n,stripX:r,stripY:i,stripLength:a,stripThickness:o,arrowSize:s}=this._geom,c=this._min,l=this._max-c,u;if(u=l===0?.5:(e-c)/l,u<0&&(u=0),u>1&&(u=1),t){let e=i+a-u*a,t,c;n===`left`?(t=r+o,c=t+s):(t=r,c=t-s);let l=[`${t},${e}`,`${c},${e-s/2}`,`${c},${e+s/2}`].join(` `);this.arrowEl.setAttribute(`points`,l)}else{let e=r+u*a,t,c;n===`top`?(t=i+o,c=t+s):(t=i,c=t-s);let l=[`${e},${t}`,`${e-s/2},${c}`,`${e+s/2},${c}`].join(` `);this.arrowEl.setAttribute(`points`,l)}if(this.arrowEl.setAttribute(`opacity`,`1`),this.hoverValueEl){let c=this._getFormatter();if(this.hoverValueEl.textContent=c(e),t){let e=i+a-u*a;n===`left`?this.hoverValueEl.style.left=`${r+o+s+8}px`:(this.hoverValueEl.style.left=`${r-s-8}px`,this.hoverValueEl.style.transform=`translateX(-100%)`),this.hoverValueEl.style.top=`${e-9}px`}else{let e=r+u*a;this.hoverValueEl.style.left=`${e}px`,this.hoverValueEl.style.transform=`translateX(-50%)`,n===`top`?this.hoverValueEl.style.top=`${i+o+s+8}px`:this.hoverValueEl.style.top=`${i-s-18}px`}this.hoverValueEl.style.opacity=`1`}}_buildArrow(e,t,n){let r=X.createElementNS(zb,`polygon`);return r.setAttribute(`fill`,t),r.setAttribute(`opacity`,`0`),r.setAttribute(`class`,`apexcharts-heatmap-gradient-arrow`),r.setAttribute(`points`,`0,0 0,0 0,0`),r.setAttribute(`pointer-events`,`none`),r}_computeStops(){let e=this.w,t=e.config.plotOptions.heatmap.colorScale,n=t.gradientLegend,r=1/0,i=-1/0,a=e.seriesData?.series||[];for(let e=0;e<a.length;e++){let t=a[e];if(t)for(let e=0;e<t.length;e++){let n=t[e];n==null||Number.isNaN(n)||(n<r&&(r=n),n>i&&(i=n))}}Number.isFinite(r)||(r=0),Number.isFinite(i)||(i=0);let o=r,s=i;t.min!==void 0&&(o=t.min<r?t.min:r),t.max!==void 0&&(s=t.max>i?t.max:i);let c=[],l=[];if(t.ranges&&t.ranges.length>0){let e=t.ranges.map((e,t)=>q(K({},e),{_originalIndex:t})).sort((e,t)=>e.from-t.from),n=e[0].from,r=e[e.length-1].to;o=n,s=r;let i=r-n||1;e.forEach(e=>{let t=(e.from-n)/i,r=(e.to-n)/i;c.push({percent:(t+r)/2,color:e.color}),l.push({index:e._originalIndex,p1:t,p2:r})})}else{let t=e.globals.colors[0]||`#008FFB`,r=new Z,i=e.config.plotOptions.heatmap.shadeIntensity??.5,a=e.globals.hasNegs,l=Math.max(2,n.stops||16);for(let n=0;n<l;n++){let u=n/(l-1),d=o+u*(s-o),f=Math.abs(s)+Math.abs(o),p=f===0?0:100*d/f,m;m=a?e.config.plotOptions.heatmap.reverseNegativeShade?p<0?p/100*(i*1.25):(1-p/100)*(i*1.25):p<=0?1-(1+p/100)*i:(1-p/100)*i:1-p/100,m>1&&(m=1),m<-1&&(m=-1);let h=e.config.plotOptions.heatmap.enableShades?r.shadeColor(e.config.theme.mode===`dark`?m*-1:m,t):t;c.push({percent:u,color:h})}}return{min:o,max:s,stops:c,bands:l}}},Vb=class{constructor(e,t){this.w=e,this.ctx=t,this.printDataLabelsInner=(...e)=>t.pie?.printDataLabelsInner(...e),this.updateSeries=(...e)=>t.updateHelpers._updateSeries(...e),this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type===`bar`&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new Rb(this)}init(){let e=this.w,t=e.globals,n=e.config;this.isBarsDistributed=n.chart.type===`bar`&&n.plotOptions.bar.distributed&&n.series.length===1;let r=n.legend.showForSingleSeries&&this.w.seriesData.series.length===1||this.isBarsDistributed||n.chart.type===`heatmap`||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(r||!t.axisCharts)&&n.legend.show){let t=e.dom.elLegendWrap;for(;t.firstChild;)t.removeChild(t.firstChild);this.heatmapGradientLegend&&=(this.heatmapGradientLegend.destroy(),null),n.chart.type===`heatmap`&&Bb.isEnabled(e)?(this.heatmapGradientLegend=new Bb(e,this.ctx),this.heatmapGradientLegend.draw()):(this.drawLegends(),n.legend.position===`bottom`||n.legend.position===`top`?this.legendAlignHorizontal():(n.legend.position===`right`||n.legend.position===`left`)&&this.legendAlignVertical())}}createLegendMarker({i:e,fillcolor:t}){let n=this.w,r=X.createElement(`span`);r.classList.add(`apexcharts-legend-marker`);let i=n.config.legend.markers.shape||n.config.markers.shape,a=i;Array.isArray(i)&&(a=i[e]);let o=Array.isArray(n.config.legend.markers.size)?parseFloat(n.config.legend.markers.size[e]):parseFloat(n.config.legend.markers.size),s=Array.isArray(n.config.legend.markers.offsetX)?parseFloat(n.config.legend.markers.offsetX[e]):parseFloat(n.config.legend.markers.offsetX),c=Array.isArray(n.config.legend.markers.offsetY)?parseFloat(n.config.legend.markers.offsetY[e]):parseFloat(n.config.legend.markers.offsetY),l=Array.isArray(n.config.legend.markers.strokeWidth)?parseFloat(n.config.legend.markers.strokeWidth[e]):parseFloat(n.config.legend.markers.strokeWidth),u=r.style;if(u.height=(o+l)*2+`px`,u.width=(o+l)*2+`px`,u.left=s+`px`,u.top=c+`px`,n.config.legend.markers.customHTML)u.background=`transparent`,u.color=t[e],Array.isArray(n.config.legend.markers.customHTML)?n.config.legend.markers.customHTML[e]&&(r.innerHTML=n.config.legend.markers.customHTML[e]()):r.innerHTML=n.config.legend.markers.customHTML();else{let i=new Jv(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${a}`,seriesIndex:e,strokeWidth:l,size:o}),s=(Y.isBrowser()?window.SVG:global.SVG)().addTo(r).size(`100%`,`100%`),c=new Q(this.w).drawMarker(0,0,q(K({},i),{pointFillColor:Array.isArray(t)?t[e]:i.pointFillColor,shape:a}));n.dom.Paper.find(`.apexcharts-legend-marker.apexcharts-marker`).forEach(e
1130=>{e.node.classList.contains(`apexcharts-marker-triangle`)?e.node.style.transform=`translate(50%, 45%)`:e.node.style.transform=`translate(50%, 50%)`}),s.add(c)}return r}drawLegends(){let e=this,t=this.w,n=t.dom.elLegendWrap,r=t.config.legend.fontFamily,i=t.seriesData.seriesNames,a=t.config.legend.markers.fillColors?t.config.legend.markers.fillColors.slice():t.globals.colors.slice();if(t.config.chart.type===`heatmap`){let e=t.config.plotOptions.heatmap.colorScale.ranges;i=e.map(e=>e.name?e.name:e.from+` - `+e.to),a=e.map(e=>e.color)}else this.isBarsDistributed&&(i=t.labelData.labels.slice());t.config.legend.customLegendItems.length&&(i=t.config.legend.customLegendItems);let o=t.formatters.legendFormatter,s=t.config.legend.inverseOrder,c=[];t.labelData.seriesGroups.length>1&&t.config.legend.clusterGroupedSeries&&t.labelData.seriesGroups.forEach((e,r)=>{c[r]=X.createElement(`div`),c[r].classList.add(`apexcharts-legend-group`,`apexcharts-legend-group-${r}`),t.config.legend.clusterGroupedSeriesOrientation===`horizontal`?n.classList.add(`apexcharts-legend-group-horizontal`):c[r].classList.add(`apexcharts-legend-group-vertical`)});for(let e=s?i.length-1:0;s?e>=0:e<=i.length-1;s?e--:e++){let s=o(i[e],{seriesIndex:e,w:t}),l=!1,u=!1;if(t.globals.collapsedSeries.length>0)for(let n=0;n<t.globals.collapsedSeries.length;n++)t.globals.collapsedSeries[n].index===e&&(l=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(let n=0;n<t.globals.ancillaryCollapsedSeriesIndices.length;n++)t.globals.ancillaryCollapsedSeriesIndices[n]===e&&(u=!0);let d=this.createLegendMarker({i:e,fillcolor:a});Q.setAttrs(d,{rel:e+1,"data:collapsed":l||u}),(l||u)&&d.classList.add(`apexcharts-inactive-legend`);let f=X.createElement(`div`);if(t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled){f.setAttribute(`role`,`button`),f.setAttribute(`tabindex`,`0`);let e=Array.isArray(s)?s.join(` `):s,t=l||u,n=t?`hidden`:`visible`;f.setAttribute(`aria-label`,`${e}, ${n}. Press Enter or Space to toggle.`),f.setAttribute(`aria-pressed`,t?`true`:`false`)}let p=X.createElement(`span`);p.classList.add(`apexcharts-legend-text`),p.innerHTML=Array.isArray(s)?s.join(` `):s;let m=t.config.legend.labels.useSeriesColors?t.globals.colors[e]:Array.isArray(t.config.legend.labels.colors)?t.config.legend.labels.colors?.[e]:t.config.legend.labels.colors;m||=t.config.chart.foreColor,p.style.color=m,p.style.fontSize=t.config.legend.fontSize,p.style.fontWeight=t.config.legend.fontWeight,p.style.fontFamily=r||t.config.chart.fontFamily,Q.setAttrs(p,{rel:e+1,i:e,"data:default-text":encodeURIComponent(s),"data:collapsed":l||u}),f.appendChild(d),f.appendChild(p);let h=new Nv(this.w);t.config.legend.showForZeroSeries||h.getSeriesTotalByIndex(e)===0&&h.seriesHaveSameValues(e)&&!h.isSeriesNull(e)&&t.globals.collapsedSeriesIndices.indexOf(e)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1&&f.classList.add(`apexcharts-hidden-zero-series`),t.config.legend.showForNullSeries||h.isSeriesNull(e)&&t.globals.collapsedSeriesIndices.indexOf(e)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(e)===-1&&f.classList.add(`apexcharts-hidden-null-series`),c.length?t.labelData.seriesGroups.forEach((r,i)=>{r.includes(t.config.series[e]?.name??``)&&(n.appendChild(c[i]),c[i].appendChild(f))}):n.appendChild(f),n.classList.add(`apexcharts-align-${t.config.legend.horizontalAlign}`),n.classList.add(`apx-legend-position-`+t.config.legend.position),f.classList.add(`apexcharts-legend-series`),f.style.margin=`${t.config.legend.itemMargin.vertical}px ${t.config.legend.itemMargin.horizontal}px`,n.style.width=t.config.legend.width?t.config.legend.width+`px`:``,n.style.height=t.config.legend.height?t.config.legend.height+`px`:``,Q.setAttrs(f,{rel:e+1,seriesName:Z.escapeString(i[e]),"data:collapsed":l||u}),(l||u)&&f.classList.add(`apexcharts-inactive-legend`),t.config.legend.onItemClick.toggleDataSeries||f.classList.add(`apexcharts-no-click`)}t.dom.elWrap.addEventListener(`click`,e.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&t.config.legend.customLegendItems.length===0&&(t.dom.elWrap.addEventListener(`mousemove`,e.onLegendHovered,!0),t.dom.elWrap.addEventListener(`mouseout`,e.onLegendHovered,!0)),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&t.dom.elWrap.addEventListener(`ke
1130ydown`,e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(e,t){let n=this.w,r=n.dom.elLegendWrap,i=r.clientHeight,a=0,o=0;if(n.config.legend.position===`bottom`)o=n.globals.svgHeight-Math.min(i,n.globals.svgHeight/2)-5;else if(n.config.legend.position===`top`){let e=new vy(this.w,this.ctx),t=e.dimHelpers.getTitleSubtitleCoords(`title`).height,n=e.dimHelpers.getTitleSubtitleCoords(`subtitle`).height;o=(t>0?t-10:0)+(n>0?n-10:0)}r.style.position=`absolute`,a=a+e+n.config.legend.offsetX,o=o+t+n.config.legend.offsetY,r.style.left=a+`px`,r.style.top=o+`px`,n.config.legend.position===`right`&&(r.style.left=`auto`,r.style.right=25+n.config.legend.offsetX+`px`),[`width`,`height`].forEach(e=>{r&&r.style[e]&&(r.style[e]=parseInt(String(n.config.legend[e]),10)+`px`)})}legendAlignHorizontal(){let e=this.w,t=e.dom.elLegendWrap;t.style.right=`0`;let n=new vy(this.w,this.ctx),r=n.dimHelpers.getTitleSubtitleCoords(`title`),i=n.dimHelpers.getTitleSubtitleCoords(`subtitle`),a=0;e.config.legend.position===`top`&&(a=r.height+i.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,a)}legendAlignVertical(){let e=this.w,t=this.legendHelpers.getLegendDimensions(),n=0;e.config.legend.position===`left`&&(n=20),e.config.legend.position===`right`&&(n=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(n,20)}onLegendHovered(e){let t=this.w,n=e.target,r=n.classList.contains(`apexcharts-legend-series`)||n.classList.contains(`apexcharts-legend-text`)||n.classList.contains(`apexcharts-legend-marker`);if(t.config.chart.type!==`heatmap`&&!this.isBarsDistributed)!n.classList.contains(`apexcharts-inactive-legend`)&&r&&new dy(this.ctx.w).toggleSeriesOnHover(e,n);else if(r){let t=parseInt(n.getAttribute(`rel`)??`0`,10)-1;this.ctx.events.fireEvent(`legendHover`,[this.ctx,t,this.w]);let r=new dy(this.ctx.w);e.type===`mousemove`?r.highlightRangeInSeries(t,`highlight`):e.type===`mouseout`&&r.highlightRangeInSeries(t,`reset`)}}onLegendKeyDown(e){let t=this,n=this.w,r=e.target;if((r.classList.contains(`apexcharts-legend-series`)||r.classList.contains(`apexcharts-legend-text`)||r.classList.contains(`apexcharts-legend-marker`))&&(e.key===`Enter`||e.key===` `)){e.preventDefault();let i=r.getAttribute(`rel`);t.onLegendClick(e),i!==null&&n.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame(()=>{let e=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${i}"]`);e&&e.focus()})}}onLegendClick(e){let t=this.w,n=e.target;if(!t.config.legend.customLegendItems.length&&(n.classList.contains(`apexcharts-legend-series`)||n.classList.contains(`apexcharts-legend-text`)||n.classList.contains(`apexcharts-legend-marker`))){let e=parseInt(n.getAttribute(`rel`)??`0`,10)-1,r=n.getAttribute(`data:collapsed`)===`true`,i=this.w.config.chart.events.legendClick;typeof i==`function`&&i(this.ctx,e,this.w),this.ctx.events.fireEvent(`legendClick`,[this.ctx,e,this.w]);let a=this.w.config.legend.markers.onClick;typeof a==`function`&&n.classList.contains(`apexcharts-legend-marker`)&&(a(this.ctx,e,this.w),this.ctx.events.fireEvent(`legendMarkerClick`,[this.ctx,e,this.w])),t.config.chart.type!==`treemap`&&t.config.chart.type!==`heatmap`&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(e,r)}}};Fb.registerFeatures({legend:Vb});var Hb=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1131 <path d="M5 9 2 12l3 3"/> 1132 <path d="M9 5l3-3 3 3"/> 1133 <path d="M15 19l-3 3-3-3"/> 1134 <path d="M19 9l3 3-3 3"/> 1135 <path d="M2 12h20"/> 1136 <path d="M12 2v20"/> 1137</svg> 1138`,Ub=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1139 <circle cx="11" cy="11" r="7"/> 1140 <path d="m21 21-4.3-4.3M8 11h6M11 8v6"/> 1141</svg> 1142`,Wb=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1143 <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/> 1144 <path d="M3 3v5h5"/> 1145</svg> 1146`,Gb=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1147 <path d="M12 5v14M5 12h14"/> 1148</svg> 1149`,Kb=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1150 <path d="M5 12h14"/> 1151</svg> 1152`,qb=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1153 <path d="M5 3a2 2 0 0 0-2 2"/> 1154 <path d="M19 3a2 2 0 0 1 2 2"/> 1155 <path d="M21 19a2 2 0 0 1-2 2"/> 1156 <path d="M5 21a2 2 0 0 1-2-2"/> 1157 <path d="M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1"/> 1158</svg> 1159`,Jb=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> 1160 <path d="M4 6h16M4 12h16M4 18h16"/> 1161</svg> 1162`,Yb=class{constructor(e,t){this.w=e,this.ctx=t,this.ev=this.w.config.chart.events,this.selectedClass=`apexcharts-selected`,this.localeValues=this.w.globals.locale.toolbar,this.minX=e.globals.minX,this.maxX=e.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){let e=this.w,t=()=>X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`),n=()=>{let e=X.createElementNS(`http://www.w3.org/1999/xhtml`,`button`);return e.setAttribute(`type`,`button`),e},r=t();if(r.setAttribute(`class`,`apexcharts-toolbar`),r.style.top=e.config.chart.toolbar.offsetY+`px`,r.style.right=-e.config.chart.toolbar.offsetX+3+`px`,e.dom.elWrap.appendChild(r),this.elZoom=n(),this.elZoomIn=n(),this.elZoomOut=n(),this.elPan=n(),this.elSelection=n(),this.elZoomReset=n(),this.elMenuIcon=n(),this.elMenu=t(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons.push(n());let i=[],a=(t,n,r)=>{let a=t.toLowerCase();this.t[a]&&e.config.chart.zoom.enabled&&i.push({el:n,icon:typeof this.t[a]==`string`?this.t[a]:r,title:this.localeValues[t],class:`apexcharts-${a}-icon`})};a(`zoomIn`,this.elZoomIn,Gb),a(`zoomOut`,this.elZoomOut,Kb);let o=t=>{this.t[t]&&e.config.chart[t].enabled&&i.push({el:t===`zoom`?this.elZoom:this.elSelection,icon:typeof this.t[t]==`string`?this.t[t]:t===`zoom`?Ub:qb,title:this.localeValues[t===`zoom`?`selectionZoom`:`selection`],class:`apexcharts-${t}-icon`})};o(`zoom`),o(`selection`),this.t.pan&&e.config.chart.zoom.enabled&&i.push({el:this.elPan,icon:typeof this.t.pan==`string`?this.t.pan:Hb,title:this.localeValues.pan,class:`apexcharts-pan-icon`}),a(`reset`,this.elZoomReset,Wb),this.t.download&&i.push({el:this.elMenuIcon,icon:typeof this.t.download==`string`?this.t.download:Jb,title:this.localeValues.menu,class:`apexcharts-menu-icon`});for(let e=0;e<this.elCustomIcons.length;e++)i.push({el:this.elCustomIcons[e],icon:this.t.customIcons[e].icon,title:this.t.customIcons[e].title,index:this.t.customIcons[e].index,class:`apexcharts-toolbar-custom-icon `+this.t.customIcons[e].class});
1162i.forEach((e,t)=>{e.index&&Z.moveIndexInArray(i,t,e.index)});for(let e=0;e<i.length;e++)Q.setAttrs(i[e].el,{class:i[e].class,title:i[e].title,"aria-label":i[e].title}),i[e].el.innerHTML=i[e].icon,r.appendChild(i[e].el);this.elZoom.parentNode&&this.elZoom.setAttribute(`aria-pressed`,String(!!e.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute(`aria-pressed`,String(!!e.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute(`aria-pressed`,String(!!e.interact.panEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute(`aria-haspopup`,`true`),this.elMenuIcon.setAttribute(`aria-expanded`,`false`)),this._createHamburgerMenu(r),e.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):e.interact.panEnabled?this.elPan.classList.add(this.selectedClass):e.interact.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}_createHamburgerMenu(e){this.elMenuItems=[],e.appendChild(this.elMenu),Q.setAttrs(this.elMenu,{class:`apexcharts-menu`,role:`menu`});let t=[{name:`exportSVG`,title:this.localeValues.exportToSVG},{name:`exportPNG`,title:this.localeValues.exportToPNG},{name:`exportCSV`,title:this.localeValues.exportToCSV}];for(let e=0;e<t.length;e++)this.elMenuItems.push(X.createElementNS(`http://www.w3.org/1999/xhtml`,`div`)),this.elMenuItems[e].innerHTML=t[e].title,Q.setAttrs(this.elMenuItems[e],{class:`apexcharts-menu-item ${t[e].name}`,title:t[e].title,role:`menuitem`,tabindex:`-1`}),this.elMenu.appendChild(this.elMenuItems[e])}addToolbarEventListeners(){var e,t,n,r,i,a,o,s;(e=this.elZoomReset)==null||e.addEventListener(`click`,this.handleZoomReset.bind(this)),(t=this.elSelection)==null||t.addEventListener(`click`,this.toggleZoomSelection.bind(this,`selection`)),(n=this.elZoom)==null||n.addEventListener(`click`,this.toggleZoomSelection.bind(this,`zoom`)),(r=this.elZoomIn)==null||r.addEventListener(`click`,this.handleZoomIn.bind(this)),(i=this.elZoomOut)==null||i.addEventListener(`click`,this.handleZoomOut.bind(this)),(a=this.elPan)==null||a.addEventListener(`click`,this.togglePanning.bind(this)),(o=this.elMenuIcon)==null||o.addEventListener(`click`,this.toggleMenu.bind(this)),this.elMenuItems.forEach(e=>{e.classList.contains(`exportSVG`)?e.addEventListener(`click`,this.handleDownload.bind(this,`svg`)):e.classList.contains(`exportPNG`)?e.addEventListener(`click`,this.handleDownload.bind(this,`png`)):e.classList.contains(`exportCSV`)&&e.addEventListener(`click`,this.handleDownload.bind(this,`csv`))});for(let e=0;e<this.t.customIcons.length;e++)this.elCustomIcons[e].addEventListener(`click`,this.t.customIcons[e].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMenuIcon,...this.elCustomIcons].forEach(e=>{e.addEventListener(`keydown`,t=>{if(t.key===`Enter`||t.key===` `){t.preventDefault();let n=e.className;e.click(),requestAnimationFrame(()=>{let e=this.w.dom.baseEl;if(!e)return;let t=n.split(` `).find(e=>e.startsWith(`apexcharts-`));if(!t)return;let r=e.querySelector(`.${t}`);r&&r.focus()})}})}),(s=this.elMenuIcon)==null||s.addEventListener(`keydown`,e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),this.elMenu?.classList.contains(`apexcharts-menu-open`)||this.toggleMenu(),window.setTimeout(()=>{let t=e.key===`ArrowDown`?0:this.elMenuItems.length-1;this.elMenuItems[t]&&this.elMenuItems[t].focus()},20))}),this.elMenuItems.forEach((e,t)=>{e.addEventListener(`keydown`,n=>{var r;n.key===`ArrowDown`?(n.preventDefault(),(this.elMenuItems[t+1]||this.elMenuItems[0]).focus()):n.key===`ArrowUp`?(n.preventDefault(),(this.elMenuItems[t-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):n.key===`Escape`||n.key===`Tab`?(this._closeMenu(),(r=this.elMenuIcon)==null||r.focus(),n.key===`Tab`||n.preventDefault()):(n.key===`Enter`||n.key===` `)&&(n.preventDefault(),e.click())})})}toggleZoomSelection(e){this.ctx.getSyncedCharts().forEach(t=>{t.ctx.toolbar.toggleOtherControls();let n=e===`selection`?t.ctx.toolbar.elSelection:t.ctx.toolbar.elZoom,r=e===`selection`?`selectionEnabled`:`zoomEnabled`;t.w.globals[r]=!t.w.globals[r],n.classList.contains(t.ctx.toolbar.selectedClass)?n.classList.remove(t.ctx.toolbar.selectedClass):n.classList.add(t.ctx.toolbar.selectedClass),n.setAttribute(`aria-pressed`,String(t.w.globals[r]))})}getToolbarIconsReference(){let e=this.w;this.elZoom||=e.dom.baseEl.querySelector(`.apexcharts-zoom-icon`),this.elPan||=e.dom.baseEl.querySelector(`.apexcharts-pan-icon`),this.elSelection||=e.dom.baseEl.querySelector(`.apexcharts-selection-icon`)}enableZoomPanFromToolbar(e){this.toggleOtherControls(),e===`pan`?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;let t=e===`pan`?this.elPan:this.elZoom,n=e===`pan`?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),n&&n.classList.remove(this.selectedClass)}
1162togglePanning(){this.ctx.getSyncedCharts().forEach(e=>{e.ctx.toolbar.toggleOtherControls(),e.w.interact.panEnabled=!e.w.interact.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),e.ctx.toolbar.elPan.setAttribute(`aria-pressed`,String(e.w.interact.panEnabled))})}toggleOtherControls(){let e=this.w;e.interact.panEnabled=!1,e.interact.zoomEnabled=!1,e.interact.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(e=>{e&&e.classList.remove(this.selectedClass)})}_currentXRange(){let e=this.w;return e.axisFlags.isRangeBar?{minX:e.globals.minY,maxX:e.globals.maxY}:{minX:e.globals.minX,maxX:e.globals.maxX}}handleZoomIn(){let e=this.w,{minX:t,maxX:n}=this._currentXRange();this.minX=t,this.maxX=n;let r=(t+n)/2,i=(t+r)/2,a=(n+r)/2,o=this._getNewMinXMaxX(i,a);e.interact.disableZoomIn||this.zoomUpdateOptions(o.minX,o.maxX)}handleZoomOut(){let e=this.w,{minX:t,maxX:n}=this._currentXRange();if(this.minX=t,this.maxX=n,e.config.xaxis.type===`datetime`&&new Date(t).getUTCFullYear()<1e3)return;let r=(t+n)/2,i=t-(r-t),a=n-(r-n),o=this._getNewMinXMaxX(i,a);e.interact.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}_getNewMinXMaxX(e,t){let n=this.w.config.xaxis.convertedCatToNumeric;return{minX:n?Math.floor(e):e,maxX:n?Math.floor(t):t}}zoomUpdateOptions(e,t){let n=this.w;if(e===void 0&&t===void 0){this.handleZoomReset();return}if(n.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=n.globals.dataPoints),t-e<2))return;let r={min:e,max:t},i=this.getBeforeZoomRange(r,void 0);i&&(r=i.xaxis);let a={xaxis:r};if(!n.globals.initialConfig)return;let o=Z.clone(n.globals.initialConfig.yaxis);n.config.chart.group||(a.yaxis=o),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(a,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(r,o)}zoomCallback(e,t){typeof this.ev.zoomed==`function`&&(this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t}),this.ctx.events.fireEvent(`zoomed`,{xaxis:e,yaxis:t}))}getBeforeZoomRange(e,t){let n=null;return typeof this.ev.beforeZoom==`function`&&(n=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),n}toggleMenu(){window.setTimeout(()=>{var e,t;this.elMenu?.classList.contains(`apexcharts-menu-open`)?this._closeMenu():((e=this.elMenu)==null||e.classList.add(`apexcharts-menu-open`),(t=this.elMenuIcon)==null||t.setAttribute(`aria-expanded`,`true`))},0)}_closeMenu(){var e,t;(e=this.elMenu)==null||e.classList.remove(`apexcharts-menu-open`),(t=this.elMenuIcon)==null||t.setAttribute(`aria-expanded`,`false`)}handleDownload(e){let t=this.w,n=new Lb(this.w,this.ctx);switch(e){case`svg`:n.exportToSVG();break;case`png`:n.exportToPng();break;case`csv`:n.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter})}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{let t=e.w;if(!t.interact.zoomed)return;if(t.globals.lastXAxis.min=t.globals.initialConfig.xaxis.min,t.globals.lastXAxis.max=t.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),typeof t.config.chart.events.beforeResetZoom==`function`){let n=t.config.chart.events.beforeResetZoom(e,t);n&&e.updateHelpers.revertDefaultAxisMinMax(n)}typeof t.config.chart.events.zoomed==`function`&&e.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max});let n=e.ctx.series.emptyCollapsedSeries(Z.clone(t.globals.initialSeries));e.updateHelpers._updateSeries(n,t.config.chart.animations.dynamicAnimation.enabled),t.interact.zoomed=!1})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}},Xb=class extends Yb{constructor(e,t){super(e,t),this.w=e,this.ctx=t,this.dragged=!1,this.graphics=new Q(this.w),this.eventList=[`mousedown`,`mouseleave`,`mousemove`,`touchstart`,`touchmove`,`mouseup`,`touchend`,`wheel`],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection=`none`,this.debounceTimer=null,this.debounceDelay=100,this.wheelDelay=400}init({xyRatios:e}){let t=this.w,n=this;this.xyRatios=e,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=t.dom.baseEl.querySelector(`.apexcharts-grid`),this.constraints=new Kv(0,0,t.layout.gridWidth,t.layout.gridHeight),this.zoomRect.node.classList.add(`apexcharts-zoom-rect`),this.selectionRect.node.classList.add(`apexcharts-selection-rect`),t.dom.Paper.add(this.zoomRect),t.dom.Paper.add(this.selectionRect),this.slDraggableRect=t.config.chart.selection.type===`x`?this.selectionRect.draggable({minX:0,minY:0,maxX:t.layout.gridWidth,maxY:t.layout.gridHeight}).on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)):t.config.chart.selection.type===`y`?this.selectionRect.draggable({minX:0,maxX:t.layout.gridWidth}).on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)):this.selectionRect.draggable().on(`dragmove.namespace`,this.selectionDragging.bind(this,`dragging`)),this.preselectedSelection(),this.hoverArea=t.dom.baseEl.querySelector(`${t.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add(`apexcharts-zoomable`),this.eventList.forEach(t=>{var r;(r=this.hoverArea)==null||r.addEventListener(t,n.svgMouseEvents.bind(n,e),{capture:!1,passive:!0})}),t.config.chart.zoom.enabled&&t.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener(`wheel`,n.mouseWheelEvent.bind(n),{capture:!1,passive:!1}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}svgMouseEvents(e,t){let n=this.w,r=this.ctx.toolbar,i=n.interact.zoomEnabled?n.config.chart.zoom.type:n.config.chart.selection.type,a=n.config.chart.toolbar.autoSelected;if(t.shiftKey?(this.shiftWasPressed=!0,r.enableZoomPanFromToolbar(a===`pan`?`zoom`:`pan`)):this.shiftWasPressed&&=(r.enableZoomPanFromToolbar(a),!1),!t.target)return;
1162let o=t.target.classList,s;if(t.target.parentNode&&t.target.parentNode!==null&&(s=t.target.parentNode.classList),!(o.contains(`apexcharts-legend-marker`)||o.contains(`apexcharts-legend-text`)||s&&s.contains(`apexcharts-toolbar`))){if(this.clientX=t.type===`touchmove`||t.type===`touchstart`?t.touches[0].clientX:t.type===`touchend`?t.changedTouches[0].clientX:t.clientX,this.clientY=t.type===`touchmove`||t.type===`touchstart`?t.touches[0].clientY:t.type===`touchend`?t.changedTouches[0].clientY:t.clientY,t.type===`mousedown`&&t.which===1||t.type===`touchstart`){let e=this.gridRect?.getBoundingClientRect();if(!e)return;this.startX=this.clientX-e.left-n.globals.barPadForNumericAxis,this.startY=this.clientY-e.top,this.dragged=!1,this.w.interact.mousedown=!0}(t.type===`mousemove`&&t.which===1||t.type===`touchmove`)&&(this.dragged=!0,n.interact.panEnabled?(n.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:i,xyRatios:e})):(this.w.interact.mousedown&&n.interact.zoomEnabled||this.w.interact.mousedown&&n.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:i}))),(t.type===`mouseup`||t.type===`touchend`||t.type===`mouseleave`)&&this.handleMouseUp({zoomtype:i}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:e,isResized:t}){let n=this.w,r=this.gridRect?.getBoundingClientRect();r&&(this.w.interact.mousedown||t)&&(this.endX=this.clientX-r.left-n.globals.barPadForNumericAxis,this.endY=this.clientY-r.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(n.interact.zoomEnabled||n.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:e})),n.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}mouseWheelEvent(e){let t=this.w;e.preventDefault();let n=Date.now();n-t.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(e),t.interact.lastWheelExecution=n),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{n-t.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(e),t.interact.lastWheelExecution=n)},this.debounceDelay)}executeMouseWheelZoom(e){let t=this.w;this.minX=t.axisFlags.isRangeBar?t.globals.minY:t.globals.minX,this.maxX=t.axisFlags.isRangeBar?t.globals.maxY:t.globals.maxX;let n=this.gridRect?.getBoundingClientRect();if(!n)return;let r=(e.clientX-n.left)/n.width,i=this.minX,a=this.maxX,o=a-i,s,c,l;if(e.deltaY<0){s=.5*o;let e=i+r*o;c=e-s/2,l=e+s/2}else s=1.5*o,c=i-s/2,l=a+s/2;if(!t.axisFlags.isRangeBar){let e=t.globals.dataReducerRawMinX??t.globals.initialMinX,n=t.globals.dataReducerRawMaxX??t.globals.initialMaxX;c=Math.max(c,e),l=Math.min(l,n);let r=t.globals.minXDiff>0&&isFinite(t.globals.minXDiff)?t.globals.minXDiff:0,i=Math.max(r*2,(n-e)*1e-6);if(l-c<i){let e=(c+l)/2;c=e-i/2,l=e+i/2}}let u=this._getNewMinXMaxX(c,l);!isNaN(u.minX)&&!isNaN(u.maxX)&&this.zoomUpdateOptions(u.minX,u.maxX)}makeSelectionRectDraggable(){let e=this.w;if(!this.selectionRect)return;let t=this.selectionRect.node.getBoundingClientRect();t.width>0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(e,t,n,r,i)=>i===`l`||i===`r`?e.circle(8).css({"stroke-width":1,stroke:`#333`,fill:`#fff`}):e.circle(0),updateHandle:(e,t)=>e.center(t[0],t[1])}).resize().on(`resize`,()=>{let t=e.interact.zoomEnabled?e.config.chart.zoom.type:e.config.chart.selection.type;this.handleMouseUp({zoomtype:t,isResized:!0})}))}preselectedSelection(){let e=this.w,t=this.xyRatios;if(!e.interact.zoomEnabled){if(e.interact.selection!==void 0&&e.interact.selection!==null)this.drawSelectionRect(q(K({},e.interact.selection),{translateX:e.layout.translateX,translateY:e.layout.translateY}));else if(e.config.chart.selection.xaxis.min!==void 0&&e.config.chart.selection.xaxis.max!==void 0){let n=(e.config.chart.selection.xaxis.min-e.globals.minX)/t.xRatio,r=e.layout.gridWidth-(e.globals.maxX-e.config.chart.selection.xaxis.max)/t.xRatio-n;e.axisFlags.isRangeBar&&(n=(e.config.chart.selection.xaxis.min-e.globals.yAxisScale[0].niceMin)/t.invertedYRatio,r=(e.config.chart.selection.xaxis.max-e.config.chart.selection.xaxis.min)/t.invertedYRatio);let i={x:n,y:0,width:r,height:e.layout.gridHeight,translateX:e.layout.translateX,translateY:e.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(i),this.makeSelectionRectDraggable(),typeof e.config.chart.events.selection==`function`&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}}drawSelectionRect({x:e,y:t,width:n,height:r,translateX:i=0,translateY:a=0}){let o=this.w,s=this.zoomRect,c=this.selectionRect;if(this.dragged||o.interact.selection!==null){let l={transform:`translate(`+i+`, `+a+`)`};o.interact.zoomEnabled&&this.dragged&&(n<0&&(n=1),s.attr({x:e,y:t,width:n,height:r,fill:o.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":o.config.chart.zoom.zoomedArea.fill.opacity,stroke:o.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":o.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":o.config.chart.zoom.zoomedArea.stroke.opacity}),Q.setAttrs(s.node,l)),o.interact.selectionEnabled&&(c.attr({x:e,y:t,width:n>
11620?n:0,height:r>0?r:0,fill:o.config.chart.selection.fill.color,"fill-opacity":o.config.chart.selection.fill.opacity,stroke:o.config.chart.selection.stroke.color,"stroke-width":o.config.chart.selection.stroke.width,"stroke-dasharray":o.config.chart.selection.stroke.dashArray,"stroke-opacity":o.config.chart.selection.stroke.opacity}),Q.setAttrs(c.node,l))}}hideSelectionRect(e){e&&e.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:e,zoomtype:t}){let n=this.w,r=e,i=this.gridRect?.getBoundingClientRect();if(!i)return;let a=r.startX-1,o=r.startY,s=!1,c=!1,l=r.clientX-i.left-n.globals.barPadForNumericAxis,u=r.clientY-i.top,d=l-a,f=u-o,p={translateX:n.layout.translateX,translateY:n.layout.translateY};return Math.abs(d+a)>n.layout.gridWidth?d=n.layout.gridWidth-a:l<0&&(d=a),a>l&&(s=!0,d=Math.abs(d)),o>u&&(c=!0,f=Math.abs(f)),p=t===`x`?{x:s?a-d:a,y:0,width:d,height:n.layout.gridHeight}:t===`y`?{x:0,y:c?o-f:o,width:n.layout.gridWidth,height:f}:{x:s?a-d:a,y:c?o-f:o,width:d,height:f},p=q(K({},p),{translateX:n.layout.translateX,translateY:n.layout.translateY}),r.drawSelectionRect(p),r.selectionDragging(`resizing`),p}selectionDragging(e,t){let n=this.w;if(!t)return;t.preventDefault();let{handler:r,box:i}=t.detail,a=this.constraints,{x:o,y:s}=i;o<a.x&&(o=a.x),s<a.y&&(s=a.y),i.x2>a.x2&&(o=a.x2-i.w),i.y2>a.y2&&(s=a.y2-i.h),r.move(o,s);let c=this.xyRatios,l=this.selectionRect,u=0;e===`resizing`&&(u=30);let d=e=>parseFloat(l.node.getAttribute(e)),f={x:d(`x`),y:d(`y`),width:d(`width`),height:d(`height`)};n.interact.selection=f,typeof n.config.chart.events.selection==`function`&&n.interact.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer??void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{let e=this.gridRect?.getBoundingClientRect();if(!e)return;let t=l.node.getBoundingClientRect(),r,i,a,o;if(n.axisFlags.isRangeBar)r=n.globals.yAxisScale[0].niceMin+(t.left-e.left)*c.invertedYRatio,i=n.globals.yAxisScale[0].niceMin+(t.right-e.left)*c.invertedYRatio,a=0,o=1;else{if(!n.globals.xAxisScale)return;r=n.globals.xAxisScale.niceMin+(t.left-e.left)*c.xRatio,i=n.globals.xAxisScale.niceMin+(t.right-e.left)*c.xRatio,a=n.globals.yAxisScale[0].niceMin+(e.bottom-t.bottom)*c.yRatio[0],o=n.globals.yAxisScale[0].niceMax-(t.top-e.top)*c.yRatio[0]}let s={xaxis:{min:r,max:i},yaxis:{min:a,max:o}};n.config.chart.events.selection(this.ctx,s),n.config.chart.brush.enabled&&n.config.chart.events.brushScrolled!==void 0&&n.config.chart.events.brushScrolled(this.ctx,s)},u))}selectionDrawn({context:e,zoomtype:t}){let n=this.w,r=e,i=this.xyRatios,a=this.ctx.toolbar,o=n.interact.zoomEnabled?r.zoomRect.node.getBoundingClientRect():r.selectionRect.node.getBoundingClientRect(),s=r.gridRect.getBoundingClientRect(),c=o.left-s.left-n.globals.barPadForNumericAxis,l=o.right-s.left-n.globals.barPadForNumericAxis,u=o.top-s.top,d=o.bottom-s.top,f,p;if(n.axisFlags.isRangeBar)f=n.globals.yAxisScale[0].niceMin+c*i.invertedYRatio,p=n.globals.yAxisScale[0].niceMin+l*i.invertedYRatio;else{let e=n.globals.xAxisScale?.niceMin??0;f=e+c*i.xRatio,p=e+l*i.xRatio}let m=[],h=[];if(n.config.yaxis.forEach((e,t)=>{let r=n.globals.seriesYAxisMap[t][0],a=n.globals.yAxisScale[t].niceMax-i.yRatio[r]*u,o=n.globals.yAxisScale[t].niceMax-i.yRatio[r]*d;m.push(a),h.push(o)}),r.dragged&&(r.dragX>10||r.dragY>10)&&f!==p){if(n.interact.zoomEnabled){if(!n.globals.initialConfig)return;let e=Z.clone(n.globals.initialConfig.yaxis),i=Z.clone(n.globals.initialConfig.xaxis);if(n.interact.zoomed=!0,n.config.xaxis.convertedCatToNumeric&&(f=Math.floor(f),p=Math.floor(p),f<1&&(f=1,p=n.globals.dataPoints),p-f<2&&(p=f+1)),(t===`xy`||t===`x`)&&(i={min:f,max:p}),(t===`xy`||t===`y`)&&e.forEach((t,n)=>{e[n].min=h[n],e[n].max=m[n]}),a){let t=a.getBeforeZoomRange(i,e);t&&(i=t.xaxis?t.xaxis:i,e=t.yaxis?t.yaxis:e)}let o={xaxis:i};n.config.chart.group||(o.yaxis=e),r.ctx.updateHelpers._updateOptions(o,!1,r.w.config.chart.animations.dynamicAnimation.enabled),typeof n.config.chart.events.zoomed==`function`&&a.zoomCallback(i,e)}else if(n.interact.selectionEnabled){let e=null,i=null;if(i={min:f,max:p},t===`xy`||t===`y`){let t=Z.clone(n.config.yaxis);e=t,t.forEach((e,n)=>{t[n].min=h[n],t[n].max=m[n]})}n.interact.selection=r.selection,typeof n.config.chart.events.selection==`function`&&n.config.chart.events.selection(r.ctx,{xaxis:i,yaxis:e})}}}panDragging({context:e}){let t=this.w,n=e;if(t.interact.lastClientPosition.x!==void 0){let e=t.interact.lastClientPosition.x-n.clientX,r=(t.interact.lastClientPosition.y??0)-n.clientY;Math.abs(e)>Math.abs(r)&&e>0?this.moveDirection=`left`:Math.abs(e)>Math.abs(r)&&e<0?this.moveDirection=`right`:Math.abs(r)>Math.abs(e)&&r>0?this.moveDirection=`up`:Math.abs(r)>Math.abs(e)&&r<0&&(this.moveDirection=`down`)}t.interact.lastClientPosition={x:n.clientX,y:n.clientY};let r=t.axisFlags.isRangeBar?t.globals.minY:t.globals.minX,i=t.axisFlags.isRangeBar?t.globals.maxY:t.globals.maxX;n.panScrolled(r,i)}panScrolled(e,t){let n=this.w,r=this.xyRatios;if(!n.globals.initialConfig)return;let i=Z.clone(n.globals.initialConfig.yaxis),a=r.xRatio,o=n.globals.minX,s=n.globals.maxX;if(n.axisFlags.isRangeBar&&(a=r.invertedYRatio,o=n.globals.minY,s=n.globals.maxY),this.moveDirection===`left`?(e=o+n.layout.gridWidth/15*a,t=s+n.layout.gridWidth/15*a):this.moveDirection===`right`&&(e=o-n.layout.gridWidth/15*a,t=s-n.layout.gridWidth/15*a),!n.axisFlags.isRangeBar){let r=n.globals.dataReducerRawMinX??n.globals.initialMinX,i=n.globals.dataReducerRawMaxX??n.globals.initialMaxX;(e<r||t>i)&&(e=o,t=s)}let c={xaxis:{min:e,max:t}};n.config.chart.group||(c.yaxis=i),this.updateScrolledChart(c,e,t)}updateScrolledChart(e,t,n){let r=this.w;if(this.ctx.updateHelpers._updateOptions(e,!1,!1),typeof r.config.chart.events.scrolled==`function`){let e={xaxis:{min:t,max:n}};r.config.chart.events.scrolled(this.ctx,e),this.ctx.events.fireEvent(`scrolled`,e)}}};Fb.registerFeatures({toolbar:Yb,zoomPanSelection:Xb});var Zb=class{constructor(e){this.w=e.w,this.annoCtx=e}setOrientations(e,t=null){let n=this.w;if(e.label.orientation===`vertical`){let r=t===null?0:t,i=n.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${r}']`);if(i!==null){let t=i.getBBox();i.setAttribute(`x`,String(parseFloat(i.getAttribute(`x`)??`0`)-t.height+4));let n=e.label.position===`top`?t.width:-t.width;i.setAttribute(`y`,String(parseFloat(i.getAttribute(`y`)??`0`)+n));let{x:r,y:a}
1162=this.annoCtx.graphics.rotateAroundCenter(i);i.setAttribute(`transform`,`rotate(-90 ${r} ${a})`)}}}addBackgroundToAnno(e,t){let n=this.w;if(!e||!t.label.text||!String(t.label.text).trim())return null;let r=n.dom.baseEl.querySelector(`.apexcharts-grid`);if(!r)return null;let i=r.getBoundingClientRect(),a=r.getBBox(),o=i.width/a.width||1,s=e.getBoundingClientRect(),{left:c,right:l,top:u,bottom:d}=t.label.style.padding;t.label.orientation===`vertical`&&([u,d,c,l]=[c,l,u,d]);let f=(s.left-i.left)/o-c,p=(s.top-i.top)/o-u,m=this.annoCtx.graphics.drawRect(f-n.globals.barPadForNumericAxis,p,s.width/o+c+l,s.height/o+u+d,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&m.node.classList.add(t.id),m}annotationsBackground(){let e=this.w,t=(t,n,r)=>{let i=e.dom.baseEl.querySelector(`.apexcharts-${r}-annotations .apexcharts-${r}-annotation-label[rel='${n}']`);if(i){let n=i.parentNode,r=this.addBackgroundToAnno(i,t);if(r){n?.insertBefore(r.node,i);let a=i.getAttribute(`x`);a!==null&&zv(r,parseFloat(a),e),t.label.mouseEnter&&r.node.addEventListener(`mouseenter`,t.label.mouseEnter.bind(this,t)),t.label.mouseLeave&&r.node.addEventListener(`mouseleave`,t.label.mouseLeave.bind(this,t)),t.label.click&&r.node.addEventListener(`click`,t.label.click.bind(this,t))}}};e.config.annotations.xaxis.forEach((e,n)=>t(e,n,`xaxis`)),e.config.annotations.yaxis.forEach((e,n)=>t(e,n,`yaxis`)),e.config.annotations.points.forEach((e,n)=>t(e,n,`point`))}getY1Y2(e,t){let n=this.w,r=e===`y1`?t.y:t.y2,i,a=!1;if(this.annoCtx.invertAxis){let e=n.config.xaxis.convertedCatToNumeric?n.labelData.categoryLabels:n.labelData.labels,a=e.indexOf(r),o=n.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${a+1})`);i=o?parseFloat(o.getAttribute(`y`)??`0`):(n.layout.gridHeight/e.length-1)*(a+1)-n.globals.barHeight,t.seriesIndex!==void 0&&n.globals.barHeight&&(i-=n.globals.barHeight/2*(n.seriesData.series.length-1)-n.globals.barHeight*t.seriesIndex)}else{let e=n.globals.seriesYAxisMap[t.yAxisIndex][0],o=n.config.yaxis[t.yAxisIndex].logarithmic?new Nv(this.w).getLogVal(n.config.yaxis[t.yAxisIndex].logBase,r,e)/n.globals.yLogRatio[e]:(r-n.globals.minYArr[e])/(n.globals.yRange[e]/n.layout.gridHeight);i=n.layout.gridHeight-Math.min(Math.max(o,0),n.layout.gridHeight),a=o>n.layout.gridHeight||o<0,t.marker&&(t.y===void 0||t.y===null)&&(i=0),n.config.yaxis[t.yAxisIndex]?.reversed&&(i=o)}return typeof r==`string`&&r.includes(`px`)&&(i=parseFloat(r)),{yP:i,clipped:a}}getX1X2(e,t){let n=this.w,r=e===`x1`?t.x:t.x2,i=this.annoCtx.invertAxis?n.globals.minY:n.globals.minX,a=this.annoCtx.invertAxis?n.globals.maxY:n.globals.maxX,o=this.annoCtx.invertAxis?n.globals.yRange[0]:n.globals.xRange,s=!1,c=this.annoCtx.inversedReversedAxis?(a-r)/(o/n.layout.gridWidth):(r-i)/(o/n.layout.gridWidth);return(n.config.xaxis.type===`category`||n.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!n.axisFlags.dataFormatXNumeric&&(n.config.chart.sparkline.enabled||(c=this.getStringX(r))),typeof r==`string`&&r.includes(`px`)&&(c=parseFloat(r)),r==null&&t.marker&&(c=n.layout.gridWidth),t.seriesIndex!==void 0&&n.globals.barWidth&&!this.annoCtx.invertAxis&&(c-=n.globals.barWidth/2*(n.seriesData.series.length-1)-n.globals.barWidth*t.seriesIndex),typeof c!=`number`&&(c=0,s=!0),parseFloat(c.toFixed(10))>parseFloat(n.layout.gridWidth.toFixed(10))?(c=n.layout.gridWidth,s=!0):c<0&&(c=0,s=!0),{x:c,clipped:s}}getStringX(e){let t=this.w,n=e;if(t.config.xaxis.convertedCatToNumeric&&t.labelData.categoryLabels.length){let n=String(e);e=t.labelData.categoryLabels.findIndex(e=>String(e)===n)+1}let r=t.labelData.labels.map(e=>Array.isArray(e)?e.join(` `):e).indexOf(e),i=t.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${r+1})`);return i&&(n=parseFloat(i.getAttribute(`x`)??`0`)),n}},Qb=class{constructor(e){this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Zb(this.annoCtx)}addXaxisAnnotation(e,t,n){let r=this.w,i=this.helpers.getX1X2(`x1`,e),a=i.x,o=i.clipped,s=!0,c,l=e.label.text,u=e.strokeDashArray;if(Z.isNumber(a)){if(e.x2===null||e.x2===void 0){if(!o){let n=this.annoCtx.graphics.drawLine(a+e.offsetX,0+e.offsetY,a+e.offsetX,r.layout.gridHeight+e.offsetY,e.borderColor,u,e.borderWidth);t.appendChild(n.node),e.id&&n.node.classList.add(e.id),zv(n,a+e.offsetX,r)}}else{let n=this.helpers.getX1X2(`x2`,e);if(c=n.x,s=n.clipped,c<a){let e=a;a=c,c=e}let i=this.annoCtx.graphics.drawRect(a+e.offsetX,0+e.offsetY,c-a,r.layout.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,u);i.node.classList.add(`apexcharts-annotation-rect`),i.attr(`clip-path`,`url(#gridRectMask${r.globals.cuid})`),t.appendChild(i.node),e.id&&i.node.classList.add(e.id),zv(i,a+e.offsetX,r)}if(!(o&&s)){let i=this.annoCtx.graphics.getTextRects(l,e.label.style.fontSize),o=e.label.position===`top`?4:e.label.position===`center`?r.layout.gridHeight/2+(e.label.orientation===`vertical`?i.width/2:0):r.layout.gridHeight,s=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:o+e.label.offsetY-(e.label.orientation===`vertical`?e.label.position===`top`?i.width/2-12:-i.width/2:0),text:l,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 ${e.label.style.cssClass} ${e.id?e.id:``}`});s.attr({rel:n}),t.appendChild(s.node),zv(s,a+e.label.offsetX,r),this.annoCtx.helpers.setOrientations(e,n)}}}drawXAxisAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-xaxis-annotations`});return e.config.annotations.xaxis.map((e,n)=>{this.addXaxisAnnotation(e,t.node,n)}),t}},$b=class{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new Zb(this.annoCtx),this.axesUtils=new Qv(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(e,t,n){let r=this.w,i=e.strokeDashArray,a=this.helpers.getY1Y2(`y1`,e),o=a.yP,s=a.clipped,c,l=!0,u=!1,d=e.label.text;if(e.y2===null||e.y2===void 0){if(!s){u=!0;let n=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,i,e.borderWidth);t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}else{if(a=this.helpers.getY1Y2(`y2`,e),c=a.yP,l=a.clipped,c>o){let e=o;o=c,c=e}if(!(s&&l)){u=!0;let n=this.annoCtx.graphics.drawRect(0+e.offsetX,c+e.offsetY,this._getYAxisAnnotationWidth(e),o-c,0,e.fillColor,e.opacity,1,e.borderColor,i);n.node.classList.add(`apexcharts-annotation-rect`),n.attr(`clip-path`,`url(#gridRectMask${r.globals.cuid})`),t.appendChild(n.node),e.id&&n.node.classList.add(e.id)}}if(u){let i=e.label.position===`right`?r.layout.gridWidth:e.label.position===`center`?r.layout.gridWidth/2:0,a=this.annoCtx.graphics.drawText({x:i+e.label.offsetX,y:(c??o)+e.label.offsetY-3,text:d,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 ${e.label.style.cssClass} ${e.id?e.id:``}`});a.attr({rel:n}),t.appendChild(a.node)}}_getYAxisAnnotationWidth(e){let t=this.w,n=t.layout.gridWidth;return n=e.width.indexOf(`%`)>-1?t.layout.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10),n+e.offsetX}drawYAxisAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-yaxis-annotations`});return e.config.annotations.yaxis.forEach((e,n)=>{e.yAxisIndex=this.axesUtils.translateYAxisIndex(e.yAxisIndex),this.axesUtils.isYAxisHidden(e.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||this.addYaxisAnnotation(e,t.node,n)}),t}},ex=class{constructor(e){this.w=e.w,this.annoCtx=e,this.helpers=new Zb(this.annoCtx)}addPointAnnotation(e,t,n){let r=this.w;if(r.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)return;let i=this.helpers.getX1X2(`x1`,e),a=i.x,o=i.clipped,s=this.helpers.getY1Y2(`y1`,e),c=s.yP,l=s.clipped;if(Z.isNumber(a)&&!(l||o)){let i={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radiu
1162s,class:`apexcharts-point-annotation-marker ${e.marker.cssClass} ${e.id?e.id:``}`},o=this.annoCtx.graphics.drawMarker(a+e.marker.offsetX,c+e.marker.offsetY,i);t.appendChild(o.node),zv(o,a,r);let s=e.label.text?e.label.text:``,l=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:c+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:s,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 ${e.label.style.cssClass} ${e.id?e.id:``}`});if(l.attr({rel:n}),t.appendChild(l.node),zv(l,a,r),e.customSVG.SVG){let n=this.annoCtx.graphics.group({class:`apexcharts-point-annotations-custom-svg `+e.customSVG.cssClass});n.attr({transform:`translate(${a+e.customSVG.offsetX}, ${c+e.customSVG.offsetY})`}),n.node.innerHTML=e.customSVG.SVG,t.appendChild(n.node)}if(e.image.path){let t=e.image.width?e.image.width:20,n=e.image.height?e.image.height:20;o=this.annoCtx.addImage({x:a+e.image.offsetX-t/2,y:c+e.image.offsetY-n/2,width:t,height:n,path:e.image.path,appendTo:`.apexcharts-point-annotations`})}e.mouseEnter&&o.node.addEventListener(`mouseenter`,e.mouseEnter.bind(this,e)),e.mouseLeave&&o.node.addEventListener(`mouseleave`,e.mouseLeave.bind(this,e)),e.click&&o.node.addEventListener(`click`,e.click.bind(this,e))}}drawPointAnnotations(){let e=this.w,t=this.annoCtx.graphics.group({class:`apexcharts-point-annotations`});return e.config.annotations.points.map((e,n)=>{this.addPointAnnotation(e,t.node,n)}),t}},tx=class{constructor(e,{theme:t=null,timeScale:n=null}={}){this.w=e,this.theme=t,this.timeScale=n,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new Q(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Zb(this),this.xAxisAnnotations=new Qb(this),this.yAxisAnnotations=new $b(this),this.pointsAnnotations=new ex(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){let e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){let t=this.yAxisAnnotations.drawYAxisAnnotations(),n=this.xAxisAnnotations.drawXAxisAnnotations(),r=this.pointsAnnotations.drawPointAnnotations(),i=e.config.chart.animations.enabled,a=[t,n,r],o=[n.node,t.node,r.node],s=e.config.chart.type===`line`||e.config.chart.type===`area`||e.config.chart.type===`rangeArea`,c=[s,!1,s];for(let t=0;t<3;t++)e.dom.elGraphical.add(a[t]),i&&!e.globals.resized&&!e.globals.dataChanged&&e.config.chart.type!==`scatter`&&e.config.chart.type!==`bubble`&&e.globals.dataPoints>1&&!c[t]&&o[t].classList.add(`apexcharts-element-hidden`),e.globals.delayedElements.push({el:o[t],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map(e=>{this.addImage(e)})}drawTextAnnos(){this.w.config.annotations.texts.map(e=>{this.addText(e)})}addXaxisAnnotation(e,t,n){this.xAxisAnnotations.addXaxisAnnotation(e,t,n)}addYaxisAnnotation(e,t,n){this.yAxisAnnotations.addYaxisAnnotation(e,t,n)}addPointAnnotation(e,t,n){this.pointsAnnotations.addPointAnnotation(e,t,n)}addText(e){let{x:t,y:n,text:r,textAnchor:i,foreColor:a,fontSize:o,fontFamily:s,fontWeight:c,cssClass:l,backgroundColor:u,borderWidth:d,strokeDashArray:f,borderRadius:p,borderColor:m,appendTo:h=`.apexcharts-svg`,paddingLeft:g=4,paddingRight:_=4,paddingBottom:v=2,paddingTop:y=2}=e,b=this.w,x=this.graphics.drawText({x:t,y:n,text:r,textAnchor:i||`start`,fontSize:o||`12px`,fontWeight:c||`regular`,fontFamily:s||b.config.chart.fontFamily,foreColor:a||b.config.chart.foreColor,cssClass:`apexcharts-text `+l?l:``}),S=b.dom.baseEl.querySelector(h);S&&S.appendChild(x.node);let C=x.bbox();if(r){let e=this.graphics.drawRect(C.x-g,C.y-y,C.width+g+_,C.height+v+y,p,u||`transparent`,1,d,m,f);S.insertBefore(e.node,x.node)}}addImage(e){let t=this.w,{path:n,x:r=0,y:i=0,width:a=20,height:o=20,appendTo:s=`.apexcharts-svg`}=e,c=t.dom.Paper.image(n);c.size(a,o).move(r,i);let l=t.dom.baseEl.querySelector(s);return l&&l.appendChild(c.node),c}addXaxisAnnotationExternal(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`xaxis`,contextMethod:n.addXaxisAnnotation}),n}addYaxisAnnotationExternal(e,t,n){return this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`yaxis`,contextMethod:n.addYaxisAnnotation}),n}addPointAnnotationExternal(e,t,n){return this.invertAxis===void 0&&(this.invertAxis=n.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:n,type:`point`,contextMethod:n.addPointAnnotation}),n}addAnnotationExternal({params:e,pushToMemory:t,context:n,type:r,contextMethod:i}){let a=n,o=a.w,s=o.dom.baseEl.querySelector(`.apexcharts-${r}-annotations`),c=s.childNodes.length+1,l=new Ev,u=Object.assign({},r===`xaxis`?l.xAxisAnnotation:r===`yaxis`?l.yAxisAnnotation:l.pointAnnotation),d=Z.extend(u,e);switch(r){case`xaxis`:this.addXaxisAnnotation(d,s,c);break;case`yaxis`:this.addYaxisAnnotation(d,s,c);break;case`point`:this.addPointAnnotation(d,s,c)}let f=o.dom.baseEl.querySelector(`.apexcharts-${r}-annotations .apexcharts-${r}-annotation-label[rel='${c}
1162']`),p=this.helpers.addBackgroundToAnno(f,d);return p&&s.insertBefore(p.node,f),t&&o.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:Z.randomId(),method:i,label:`addAnnotation`,params:e}),n}clearAnnotations(e){let t=e.w,n=t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations`);for(let e=t.globals.memory.methodsToExec.length-1;e>=0;e--)(t.globals.memory.methodsToExec[e].label===`addText`||t.globals.memory.methodsToExec[e].label===`addAnnotation`)&&t.globals.memory.methodsToExec.splice(e,1);Array.prototype.forEach.call(n,e=>{for(;e.firstChild;)e.removeChild(e.firstChild)})}removeAnnotation(e,t){let n=e.w,r=n.dom.baseEl.querySelectorAll(`.${t}`);r&&(n.globals.memory.methodsToExec.map((e,r)=>{e.id===t&&n.globals.memory.methodsToExec.splice(r,1)}),Object.keys(n.config.annotations).forEach(e=>{let r=n.config.annotations[e];Array.isArray(r)&&(n.config.annotations[e]=r.filter(e=>e.id!==t))}),Array.prototype.forEach.call(r,e=>{e.parentElement.removeChild(e)}))}};Fb.registerFeatures({annotations:tx});var nx=class{constructor(e,t){this.w=e,this.ctx=t,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._tooltipDismissed=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._lastPointerDownAt=0}init(){let e=this.w.dom.Paper.node;e&&(e.setAttribute(`tabindex`,`0`),e.addEventListener(`focus`,this._onFocus),e.addEventListener(`blur`,this._onBlur),e.addEventListener(`mousedown`,this._onPointerDown,{capture:!0}),e.addEventListener(`pointerdown`,this._onPointerDown,{capture:!0}),e.addEventListener(`touchstart`,this._onPointerDown,{capture:!0,passive:!0}),e.addEventListener(`keydown`,this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener(`legendClick`,this._onLegendClick))}destroy(){let e=this.w,t=e.dom.Paper&&e.dom.Paper.node;t&&(t.removeEventListener(`focus`,this._onFocus),t.removeEventListener(`blur`,this._onBlur),t.removeEventListener(`keydown`,this._onKeyDown),t.removeEventListener(`mousedown`,this._onPointerDown,{capture:!0}),t.removeEventListener(`pointerdown`,this._onPointerDown,{capture:!0}),t.removeEventListener(`touchstart`,this._onPointerDown,{capture:!0}),this.ctx.events.removeEventListener(`legendClick`,this._onLegendClick))}_onPointerDown(){this._lastPointerDownAt=Date.now()}handleKey(e){}_onFocus(){this._isNavEnabled()&&(Date.now()-this._lastPointerDownAt<100||(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint()))}_onBlur(){this.active=!1,this._tooltipDismissed=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(e){var t,n,r;if(this._isNavEnabled()&&this.active){if(e.shiftKey&&(e.key===`ArrowRight`||e.key===`ArrowLeft`)&&this._canPan()){e.preventDefault(),this._panBy(e.key===`ArrowRight`?1:-1);return}switch(e.key){case`ArrowRight`:e.preventDefault(),this._move(0,1);break;case`ArrowLeft`:e.preventDefault(),this._move(0,-1);break;case`ArrowUp`:e.preventDefault(),this._move(-1,0);break;case`ArrowDown`:e.preventDefault(),this._move(1,0);break;case`Home`:e.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case`End`:e.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case`Enter`:case` `:e.preventDefault(),this._fireClick();break;case`+`:case`=`:this._canZoom()&&(e.preventDefault(),(t=this.ctx.toolbar)==null||t.handleZoomIn(),this._announce(`Zoomed in`));break;case`-`:case`_`:this._canZoom()&&(e.preventDefault(),(n=this.ctx.toolbar)==null||n.handleZoomOut(),this._announce(`Zoomed out`));break;case`0`:this._canZoom()&&this.w.interact.zoomed&&(e.preventDefault(),(r=this.ctx.toolbar)==null||r.handleZoomReset(),this._announce(`Zoom reset`));break;case`Escape`:e.preventDefault(),this._tooltipDismissed?(this.active=!1,this._tooltipDismissed=!1,this._hideFocus()):(this._tooltipDismissed=!0,this._hideFocus())}}}_canZoom(){let e=this.w;return!!(e.globals.axisCharts&&e.config.chart.zoom&&e.config.chart.zoom.enabled)}_canPan(){return this._canZoom()}_panBy(e){let t=this.w,n=this.ctx.toolbar;if(!n)return;let r=Number(t.globals.minX),i=Number(t.globals.maxX);if(!isFinite(r)||!isFinite(i)||r===i)return;let a=(i-r)*.1*e;n.zoomUpdateOptions(r+a,i+a),this._announce(e>0?`Panned right`:`Panned left`)}_move(e,t){let n=this.w,r=n.config.chart.accessibility.keyboard.navigation.wrapAround;if(e!==0){let t=this.w.globals.tooltip;if(t&&t.tConfig&&t.tConfig.shared){let e=this.dataPointIndex;if(t.tooltipUtil&&t.tooltipUtil.isXoverlap(e)&&t.tooltipUtil.isInitialSeriesSameLen())return}let i=this._getSeriesCount(),a=this.seriesIndex+e,o=0;for(;o<i&&(a<0&&(a=r?i-1:0),a>=i&&(a=r?0:i-1),n.globals.collapsedSeriesIndices.includes(a));)a+=e,o++;this.seriesIndex=a;let s=this._getDataPointCount(a);this.dataPointIndex>=s&&(this.dataPointIndex=s-1)}if(t!==0){let e=this._getDataPointCount(this.seriesIndex),n=this.dataPointIndex+t;n<0&&(n=r?e-1:0),n>=e&&(n=r?0:e-1),this.dataPointIndex=n,t>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(t)}this._showCurrentPoint()}_skipNullForward(){let e=this.w,t=this.seriesIndex,n=this._getDataPointCount(t),r=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<n&&e.seriesData.series[t][r]===null;)r=(r+1)%n,i++;this.dataPointIndex=r}}_skipNullBackward(){let e=this.w,t=this.seriesIndex,n=this._getDataPointCount(t),r=this.dataPointIndex,i=0;if(Array.isArray(e.seriesData.series[t])){for(;i<n&&e.seriesData.series[t][r]===null;)r=(r-1+n)%n,i++;this.dataPointIndex=r}}_showCurrentPoint(){let{seriesIndex:e,dataPointIndex:t}=this,n=this.w,r=n.globals.tooltip;r&&r.ttItems&&(n.interact.capturedSeriesIndex=e,n.interact.capturedDataPointIndex=t,this._applyFocusClass(e,t),this._showTooltip(e,t,r))}_hideFocus(){let e=this.w,t=e.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!t)return;t.marker&&t.marker.resetPointsSize(),this._enlargedScatterMarker=null;let n=t.getElTooltip();n&&(n.classList.remove(`apexcharts-active`),e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&n.setAttribute(`aria-hidden`,`true`)),e.dom.baseEl.classList.remove(`apexcharts-tooltip-active`);let r=t.getElXCrosshairs();r&&r.classList.remove(`apexcharts-active`)}
1162_showTooltip(e,t,n){let r=this.w,i=r.config.chart.type,a=n.getElTooltip();if(!a)return;let o=n.getCachedDimensions();n.tooltipRect={x:0,y:0,ttWidth:o.ttWidth||0,ttHeight:o.ttHeight||0},this._setSyntheticEvent(e,t,n),r.dom.baseEl.classList.add(`apexcharts-tooltip-active`),a.classList.add(`apexcharts-active`),r.config.chart.accessibility.enabled&&r.config.chart.accessibility.announcements.enabled&&a.removeAttribute(`aria-hidden`),i===`pie`||i===`donut`||i===`polarArea`?this._showTooltipNonAxis(e,t,n,a):i===`radialBar`?this._showTooltipRadialBar(e,t,n,a):i===`heatmap`||i===`treemap`?this._showTooltipHeatTree(e,t,n,a,i):i===`bar`||i===`candlestick`||i===`boxPlot`||i===`violin`||i===`rangeBar`?this._showTooltipBar(e,t,n):this._showTooltipAxisLine(e,t,n)}_setSyntheticEvent(e,t,n){let r=this.w,i=r.config.chart.type,a=0,o=0,s=this._getFocusableElement(e,t);if(s){let e=s.getBoundingClientRect();a=e.left+e.width/2,o=e.top+e.height/2}else if(r.globals.pointsArray&&r.globals.pointsArray[e]&&r.globals.pointsArray[e][t]){let i=r.globals.pointsArray[e][t],s=n.getElGrid&&n.getElGrid();if(s){let e=s.getBoundingClientRect();a=e.left+(i[0]||0),o=e.top+(i[1]||0)}}else{let e=r.dom.Paper&&r.dom.Paper.node;if(e){let t=e.getBoundingClientRect();a=t.left+t.width/2,o=t.top+t.height/2}}if((i===`line`||i===`area`||i===`rangeArea`||i===`scatter`||i===`bubble`||i===`radar`)&&r.globals.pointsArray&&r.globals.pointsArray[e]&&r.globals.pointsArray[e][t]){let i=r.globals.pointsArray[e][t],s=n.getElGrid&&n.getElGrid();if(s){let e=s.getBoundingClientRect();a=e.left+(i[0]||0),o=e.top+(i[1]||0)}}n.e={type:`mousemove`,clientX:a,clientY:o}}_showTooltipBar(e,t,n){let r=this.w,i=n.tConfig.shared&&(n.tooltipUtil.isXoverlap(t)||r.globals.isBarHorizontal)&&n.tooltipUtil.isInitialSeriesSameLen(),a=r.rangeData.seriesRange?.[e]?.[t]?.y?.[0];n.tooltipLabels.drawSeriesTexts(q(K(K({ttItems:n.ttItems,i:e,j:t},a?.y1!==void 0&&{y1:a.y1}),a?.y2!==void 0&&{y2:a.y2}),{shared:i}));let o=`.apexcharts-series[data\\:realIndex='${e}']`,s=r.dom.Paper.findOne(`${o} path[j='${t}'], ${o} circle[j='${t}'], ${o} rect[j='${t}']`);if(s&&(this._leaveHoveredBar(),new Q(this.w,this.ctx).pathMouseEnter(s,null),this._hoveredBarEl=s),r.globals.isBarHorizontal){let e=s&&s.node;if(e){let t=r.dom.elWrap.getBoundingClientRect(),i=e.getBoundingClientRect(),a=i.left-t.left,o=i.top-t.top,s=i.height,c=i.width,l=n.tooltipRect.ttWidth||0,u=n.tooltipRect.ttHeight||0,d=o+s/2-u/2,f=a+c;a<(n.xyRatios&&n.xyRatios.baseLineInvertedY!=null?n.xyRatios.baseLineInvertedY:t.width/2)&&(f=a-l);let p=n.getElTooltip();p&&(p.style.left=f+`px`,p.style.top=d+`px`)}}else n.tooltipPosition.moveStickyTooltipOverBars(t,e)}_showTooltipAxisLine(e,t,n){let r=this.w,i=r.config.chart.type,a=n.tConfig.shared&&n.tooltipUtil.isXoverlap(t)&&n.tooltipUtil.isInitialSeriesSameLen();n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:t,shared:a});let o=i===`scatter`||i===`bubble`,s=r.globals.markers.largestSize>0;o?this._showScatterBubblePoint(e,t,n):s?a?n.marker.enlargePoints(t):n.tooltipPosition.moveDynamicPointOnHover(t,e):a?n.tooltipPosition.moveDynamicPointsOnHover(t):n.tooltipPosition.moveDynamicPointOnHover(t,e)}_showScatterBubblePoint(e,t,n){let r=this.w.dom.baseEl;this._enlargedScatterMarker&&=(n.marker.oldPointSize(this._enlargedScatterMarker),null);let i=r.querySelector(`.apexcharts-series[data\\:realIndex='${e}']`);if(!i)return;let a=i.querySelector(`.apexcharts-marker[rel='${t}']`);a&&(n.marker.enlargeCurrentPoint(t,a),this._enlargedScatterMarker=a)}_showTooltipNonAxis(e,t,n,r){let i=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:t,shared:!1});let a=r.getBoundingClientRect(),o=a.width||n.tooltipRect.ttWidth||0,s=a.height||n.tooltipRect.ttHeight||0,c=i.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${t}']`);if(c){let e=parseFloat(c.getAttribute(`data:cx`)??``),t=parseFloat(c.getAttribute(`data:cy`)??``);if(!isNaN(e)&&!isNaN(t)){let n=i.dom.Paper.node.getBoundingClientRect(),a=i.dom.elWrap.getBoundingClientRect(),c=n.left-a.left,l=n.top-a.top;r.style.left=c+e-o/2+`px`,r.style.top=l+t-s-10+`px`}}}_showTooltipRadialBar(e,t,n,r){let i=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,shared:!1});let{ttWidth:a=0,ttHeight:o=0}=n.getCachedDimensions(),s=i.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`);if(s){let t=parseFloat(s.getAttribute(`data:angle`)??``)||0,n=(i.config.plotOptions.radialBar.startAngle||0)+t/2,c=i.layout.gridWidth/2,l=i.layout.gridHeight/2,u=i.globals.radialSize||Math.min(i.layout.gridWidth,i.layout.gridHeight)/2,d=i.seriesData.series.length,f=u/Math.max(d,1),p=u-e*f,m=(p+(p-f))/2,h=Z.polarToCartesian(c,l,m,n),g=h.x+(i.layout.translateX||0),_=h.y+(i.layout.translateY||0);r.style.left=g-a/2+`px`,r.style.top=_-o-10+`px`}}_showTooltipHeatTree(e,t,n,r,i){let a=this.w;n.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:t,shared:!1});let o=r.getBoundingClientRect(),s=o.width||n.tooltipRect.ttWidth||0,c=o.height||n.tooltipRect.ttHeight||0,l=i===`heatmap`?`apexcharts-heatmap-rect`:`apexcharts-treemap-rect`,u=a.dom.baseEl.querySelector(`.${l}[i='${e}'][j='${t}']`);if(u){let e=a.dom.elWrap.getBoundingClientRect(),t=u.getBoundingClientRect(),i=t.left-e.left,o=t.top-e.top,l=t.width,d=t.height,f=parseFloat(u.getAttribute(`cx`)??``),p=parseFloat(u.getAttribute(`width`)??``);n.tooltipPosition.moveXCrosshairs(f+p/2);let m=i+l+s/2,h=o+d/2-c/2;i+l>a.layout.gridWidth/2&&(m=i-s/2),r.style.left=m+`px`,r.style.top=h+`px`}}_applyFocusClass(e,t){this._removeFocusClass();let n=this._getFocusableElement(e,t);if(n){n.classList.add(`apexcharts-keyboard-focused`),n.setAttribute(`role`,`img`);let r=this._buildPointLabel(e,t);r&&n.setAttribute(`aria-label`,r),this._focusedEl=n}}_removeFocusClass(){this._focusedEl&&=(this._focusedEl.classList.remove(`apexcharts-keyboard-focused`),this._focusedEl.removeAttribute(`role`),this._focusedEl.removeAttribute(`aria-label`),null)}_buildPointLabel(e,t){let n=this.w,r=n.config.chart.type,i=n.seriesData.seriesNames||[],a=n.seriesData.series||[];
1162if(r===`pie`||r===`donut`||r===`polarArea`){let e=(n.labelData?.labels&&n.labelData.labels[t])??``,r=Array.isArray(a)?a[t]:``;return e?`${e}: ${r}`:`${r}`}if(r===`radialBar`)return`${i[e]||`Series ${e+1}`}: ${Array.isArray(a)?a[e]:``}`;let o=i[e]||`Series ${e+1}`,s=(Array.isArray(a[e])?a[e]:[])[t],c=s==null?``:String(s),l=n.formatters?.yLabelFormatters?.[e];if(typeof l==`function`)try{c=l(s,{seriesIndex:e,dataPointIndex:t,w:n})}catch{}let u=``,d=n.labelData?.categoryLabels,f=n.seriesData?.seriesX?.[e];if(Array.isArray(d)&&d[t]!=null)u=String(d[t]);else if(Array.isArray(f)&&f[t]!=null){let r=n.formatters?.xLabelFormatter;if(typeof r==`function`)try{u=String(r(f[t],{seriesIndex:e,dataPointIndex:t,w:n}))}catch{u=String(f[t])}else u=String(f[t])}return u?`${o}: ${c}, ${u}`:`${o}: ${c}`}_leaveHoveredBar(){this._hoveredBarEl&&=(new Q(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),null)}_getFocusableElement(e,t){let n=this.w,r=n.config.chart.type,i=n.dom.baseEl;return r===`pie`||r===`donut`||r===`polarArea`?i.querySelector(`.apexcharts-pie-area[j='${t}']`):r===`heatmap`?i.querySelector(`.apexcharts-heatmap-rect[i='${e}'][j='${t}']`):r===`treemap`?i.querySelector(`.apexcharts-treemap-rect[i='${e}'][j='${t}']`):r===`radialBar`?i.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${e}'] path`):r===`bar`||r===`candlestick`||r===`boxPlot`||r===`violin`||r===`rangeBar`?i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`):i.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker[rel='${t}']`)||null}_fireClick(){let e=this.w.globals.tooltip;e&&e.markerClick({type:`mouseup`,clientX:0,clientY:0},this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){let e=this.w.config.chart.accessibility;return e.enabled&&e.keyboard.enabled&&e.keyboard.navigation.enabled}_getSeriesCount(){let e=this.w,t=e.config.chart.type;return t===`pie`||t===`donut`||t===`polarArea`?1:e.seriesData.series.length}_getDataPointCount(e){let t=this.w,n=t.config.chart.type;if(n===`pie`||n===`donut`||n===`polarArea`)return t.seriesData.series.length;let r=t.seriesData.series;return r[e]&&Array.isArray(r[e])?r[e].length:0}_clampCursor(){let e=this._getSeriesCount();this.seriesIndex>=e&&(this.seriesIndex=e-1),this.seriesIndex<0&&(this.seriesIndex=0);let t=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=t&&(this.dataPointIndex=t-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){let e=this.w,t=e.globals,n=this.seriesIndex;if(!e.interact.zoomed)return;let r=e.seriesData.seriesX&&e.seriesData.seriesX[n];if(!r||!r.length)return;let i=t.minX,a=t.maxX;if(i===void 0||a===void 0)return;let o=r[this.dataPointIndex];if(o>=i&&o<=a)return;let s=r.length;for(let e=0;e<s;e++)if(r[e]>=i&&r[e]<=a){this.dataPointIndex=e;return}}_snapToVisibleRangeInDirection(e){let t=this.w,n=t.globals,r=this.seriesIndex,i=t.seriesData.seriesX&&t.seriesData.seriesX[r];if(!i||!i.length)return;let a=n.minX,o=n.maxX;if(a===void 0||o===void 0)return;let s=i.length;if(e>=0){for(let e=0;e<s;e++)if(i[e]>=a&&i[e]<=o){this.dataPointIndex=e;return}}else for(let e=s-1;e>=0;e--)if(i[e]>=a&&i[e]<=o){this.dataPointIndex=e;return}}_isDataPointVisible(e,t){let n=this.w,r=n.globals;if(!n.interact.zoomed)return!0;let i=n.seriesData.seriesX&&n.seriesData.seriesX[e];if(!i)return!0;let a=i[t];return a===void 0||a>=r.minX&&a<=r.maxX}_announce(e){let t=this.w;if(!t.config.chart.accessibility.announcements.enabled)return;let n=t.dom.baseEl;if(!n)return;let r=n.querySelector(`.apexcharts-sr-status`);r&&(r.textContent=``,setTimeout(()=>{r.textContent=e},0))}};Fb.registerFeatures({keyboardNavigation:nx});var rx=new Set([`bar`,`funnel`,`pyramid`]),ix=new Set([`pie`,`donut`,`polarArea`,`radialBar`,`gauge`]);function ax(e){return rx.has(e)?`bar`:ix.has(e)?`radial`:null}var ox=class{constructor(e,t){this.w=e,this.ctx=t,this._snapshot=null}canMorphTypes(e,t){if(e===t)return!1;let n=ax(e),r=ax(t);return!(!n||!r)}isCompatibleSeriesShape(e,t,n){if(!Array.isArray(n)||n.length===0)return!1;let r=ax(e),i=ax(t);return i===`radial`?n.every(e=>typeof e==`number`)?!0:n.length===1&&n[0]&&typeof n[0]==`object`&&Array.isArray(n[0].data):i===`bar`?n.every(e=>e&&typeof e==`object`&&Array.isArray(e.data)):r!==null&&i!==null}captureBeforeDestroy({fromType:e,toType:t,newSeries:n}){if(this._snapshot=null,!Y.isBrowser())return!1;let r=this.w.config.chart.animations;if(!r||r.enabled===!1||r.chartTypeMorph&&r.chartTypeMorph.enabled===!1||r.respectReducedMotion&&Rv()||!this.canMorphTypes(e,t)||!this.isCompatibleSeriesShape(e,t,n))return!1;let i=this._captureFromDOM(e);if(!i.length)return!1;let a=this._buildMapping(i,e,t,n);return a.size!==0&&(this._snapshot={fromType:e,toType:t,mapping:a,oldLayout:{translateX:this.w.layout.translateX||0,translateY:this.w.layout.translateY||0}},this.w.globals.previousPaths=[],!0)}_captureFromDOM(e){let t=this.w.globals.dom?.baseEl;if(!t)return[];let n=[],r=ax(e);if(r===`bar`)t.querySelectorAll(`.apexcharts-bar-series .apexcharts-series`).forEach(e
1162=>{let t=parseInt(e.getAttribute(`data:realIndex`)??`0`,10);e.querySelectorAll(`path[pathTo]`).forEach((e,r)=>{let i=e.getAttribute(`pathTo`)||e.getAttribute(`d`);i&&n.push({realIndex:t,j:r,d:i,fill:e.getAttribute(`fill`)})})});else if(r===`radial`){if(e===`radialBar`||e===`gauge`){let e=this.w.layout.gridWidth/2,r=Math.min(this.w.layout.gridWidth,this.w.layout.gridHeight)/2;t.querySelectorAll(`.apexcharts-radial-series .apexcharts-radialbar-area`).forEach(t=>{let i=t.parentElement,a=parseInt(i?.getAttribute(`data:realIndex`)??`0`,10),o=t.getAttribute(`d`);if(!o)return;let s=parseFloat(t.getAttribute(`stroke-width`)||`0`),c=s>1&&this._radialArcToFilledSegment(o,s,e,r)||o;n.push({realIndex:a,j:0,d:c,fill:t.getAttribute(`stroke`)})})}else t.querySelectorAll(`.apexcharts-pie-series .apexcharts-pie-area`).forEach((e,t)=>{let r=e.getAttribute(`d`);r&&n.push({realIndex:t,j:0,d:r,fill:e.getAttribute(`fill`)})})}return n}_radialArcToFilledSegment(e,t,n,r){let i=e.match(/M\s*(-?[\d.]+)\s+(-?[\d.]+)\s+A\s*(-?[\d.]+)\s+(?:-?[\d.]+)\s+(?:-?[\d.]+)\s+(\d)\s+(\d)\s+(-?[\d.]+)\s+(-?[\d.]+)/);if(!i)return null;let a=parseFloat(i[1]),o=parseFloat(i[2]),s=parseFloat(i[3]),c=parseInt(i[4],10),l=parseInt(i[5],10),u=parseFloat(i[6]),d=parseFloat(i[7]);if(!isFinite(s)||s<=0)return null;let f=t/2,p=s+f,m=Math.max(0,s-f),h=(e,t,i)=>{let a=e-n,o=t-r,s=Math.sqrt(a*a+o*o);if(s===0)return{x:n,y:r};let c=i/s;return{x:n+a*c,y:r+o*c}},g=h(a,o,p),_=h(u,d,p),v=h(a,o,m),y=h(u,d,m),b=+!l;return`M ${g.x} ${g.y} A ${p} ${p} 0 ${c} ${l} ${_.x} ${_.y} L ${y.x} ${y.y} A ${m} ${m} 0 ${c} ${b} ${v.x} ${v.y} Z`}buildRingSegmentPath(e,t,n,r,i,a){let o=r/2,s=n+o,c=Math.max(0,n-o),l=(i-90)*Math.PI/180,u=(a-90)*Math.PI/180,d={x:e+s*Math.cos(l),y:t+s*Math.sin(l)},f={x:e+s*Math.cos(u),y:t+s*Math.sin(u)},p={x:e+c*Math.cos(l),y:t+c*Math.sin(l)},m={x:e+c*Math.cos(u),y:t+c*Math.sin(u)},h=+(a>i),g=+(Math.abs(a-i)>180);return`M ${d.x} ${d.y} A ${s} ${s} 0 ${g} ${h} ${f.x} ${f.y} L ${m.x} ${m.y} A ${c} ${c} 0 ${g} ${1-h} ${p.x} ${p.y} Z`}getFromType(){return this._snapshot?this._snapshot.fromType:null}_buildMapping(e,t,n,r){let i=new Map,a=ax(n),o=e.slice().sort((e,t)=>e.realIndex-t.realIndex||e.j-t.j);if(a===`radial`)return o.forEach((e,t)=>{i.set(`${t}:0`,{d:e.d,fill:e.fill})}),i;if(a===`bar`){let e=[];return(Array.isArray(r)?r:[]).forEach((t,n)=>{let r=t&&Array.isArray(t.data)?t.data:[];for(let t=0;t<r.length;t++)e.push({realIndex:n,j:t})}),o.forEach((t,n)=>{let r=e[n];r&&i.set(`${r.realIndex}:${r.j}`,{d:t.d,fill:t.fill})}),i}return i}isActive(){return this._snapshot!==null}getInitialPathFor(e,t){if(!this._snapshot)return null;let n=this._snapshot.mapping.get(`${e}:${t}`);if(!n)return null;let r=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),i=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return r===0&&i===0?n.d:this._translatePathD(n.d,r,i)}_translatePathD(e,t,n){return t===0&&n===0?e:ab(e).map(e=>{let r=e[0];return r===`Z`?`Z`:r===`M`||r===`L`||r===`T`?`${r} ${e[1]+t} ${e[2]+n}`:r===`H`?`${r} ${e[1]+t}`:r===`V`?`${r} ${e[1]+n}`:r===`C`?`${r} ${e[1]+t} ${e[2]+n} ${e[3]+t} ${e[4]+n} ${e[5]+t} ${e[6]+n}`:r===`S`||r===`Q`?`${r} ${e[1]+t} ${e[2]+n} ${e[3]+t} ${e[4]+n}`:r===`A`?`${r} ${e[1]} ${e[2]} ${e[3]} ${e[4]} ${e[5]} ${e[6]+t} ${e[7]+n}`:e.join(` `)}).join(` `)}getInitialFillFor(e,t){if(!this._snapshot)return null;let n=this._snapshot.mapping.get(`${e}:${t}`);return n?n.fill:null}getSpeed(){let e=this.w.config.chart.animations;return e.chartTypeMorph&&e.chartTypeMorph.speed||e.speed||600}applyChromeFade(){if(!this._snapshot||!Y.isBrowser())return;let e=this.w.globals.dom?.baseEl;if(!e)return;let t=this.getSpeed();[`.apexcharts-xaxis`,`.apexcharts-yaxis`,`.apexcharts-grid`,`.apexcharts-gridlines-horizontal`,`.apexcharts-gridlines-vertical`,`.apexcharts-legend`,`.apexcharts-title-text`,`.apexcharts-subtitle-text`].forEach(n=>{e.querySelectorAll(n).forEach(e=>{e.style&&(e.style.opacity=`0`,e.style.transition=`opacity ${t}ms ease-out`,X.requestAnimationFrame(()=>{e.style.opacity=`1`}),setTimeout(()=>{e.style.transition=``,e.style.opacity=``},t+80))})}),setTimeout(()=>this.cleanup(),t+100)}cleanup(){this._snapshot=null}};Fb.registerFeatures({morphTypeChange:ox});var sx=`http://www.w3.org/1999/xhtml`,cx=class{constructor(e,t,n){this.w=e,this.ctx=t,this.drilldown=n}render(e){if(!Y.isBrowser())return;let t=this.w,n=t.dom.elWrap;if(!n)return;let r=n.querySelector(`.apexcharts-breadcrumb`);r&&r.parentNode&&r.parentNode.removeChild(r);let i=t.config.drilldown&&t.config.drilldown.breadcrumb;if(!i||i.show===!1||this.drilldown.depth===0)return;let a=X.createElementNS(sx,`nav`);a.setAttribute(`class`,`apexcharts-breadcrumb`),a.setAttribute(`aria-label`,`Drilldown breadcrumb`),this._position(a,i);let o=i.separator==null?` / `:i.separator;e.forEach((t,n)=>{if(n>0){let e=X.createElementNS(sx,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-separator`),e.setAttribute(`aria-hidden`,`true`),e.textContent=o,a.appendChild(e)}let r=this._label(t,n);if(n===e.length-1){let e=X.createElementNS(sx,`span`);e.setAttribute(`class`,`apexcharts-breadcrumb-item apexcharts-breadcrumb-current`),e.setAttribute(`aria-current`,`page`),e.textContent=r,a.appendChild(e)}else{let e=X.createElementNS(sx,`button`);if(e.setAttribute(`type`,`button`),e.setAttribute(`class`,`apexcharts-breadcrumb-item`),n===0){let t=X.createElementNS(sx,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-arrow`),t.setAttribute(`aria-hidden`,`true`),t.textContent=`â`,e.appendChild(t)}let t=X.createElementNS(sx,`span`);t.setAttribute(`class`,`apexcharts-breadcrumb-label`),t.textContent=r,e.appendChild(t),e.addEventListener(`click`,()=>this.drilldown.drillToLevel(n)),a.appendChild(e)}}),n.appendChild(a)}_label(e,t){let n=this.w.config.drilldown.breadcrumb,r;if(t===0)r=n.rootLabel==null?`All`:n.rootLabel;else{let t=(this.w.config.drilldown.series||[]).find(t=>t&&t.id===e);r=t&&t.name||String(e)}return typeof n.formatter==`function`?n.formatter(r,{index:t,depth:this.drilldown.depth}):r}_position(e,t){let n=t.offsetX||0,r=t.offsetY||0;e.style.position=`absolute`,e.style.top=r+`px`,t.position===`top-right`?e.style.right=-n+3+`px`:e.style.left=n+`px`}},lx=32,ux=class{constructor(e,t){this.w=e,this.ctx=t,this.stack=[],this.rootSnapshot=null,this._wired=!1,this.breadcrumb=new cx(e,t,this),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this.init()}init(){let e=this.w;e.config.drilldown&&e.config.drilldown.enabled&&(this._wired||(this._wired=!0,this.ctx.addEventListener(`dataPointSelection`,this._onPointSelect),this.ctx.addEventListener(`mounted`,this._afterRender),this.ctx.addEventListener(`updated`,this._afterRender)))}get path(){return[`root`,...this.stack.map(e=>e.id)]}get depth(){return this.stack.length}drillDown(e,t,n){let r=this._resolveChild(e);return r?this._drillInto(r,t,n):typeof this.w.config.drilldown.onDrillDown==`function`?this._drillDownAsync(e,t,n):(console.warn(`ApexCharts: drilldown id "${e}" not found in chart.drilldown.series, and no onDrillDown resolver is set.`),Promise.resolve(this.ctx))}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(e){let t=this.stack.length;if(e<0||e>=t)return Promise.resolve(this.ctx);let n=this.path[this.path.length-1],r=e===0?this.rootSnapshot:this.stack[e].restore;this.stack=this.stack.slice(0,e);let i=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(r),`up`,{from:n,to:i})}
1162_resolveChild(e){let t=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(t)&&t.find(t=>t&&t.id===e)||null}_drillInto(e,t,n){if(this.stack.length>=lx)return console.warn(`ApexCharts: drilldown max depth (${lx}) reached.`),Promise.resolve(this.ctx);this.rootSnapshot||=this._snapshot();let r=this.path[this.path.length-1];return this.stack.push({id:e.id,name:e.name,restore:this._snapshot()}),this._apply(this._viewFromChild(e),`down`,{from:r,to:e.id,point:t,seriesIndex:n&&n.seriesIndex,dataPointIndex:n&&n.dataPointIndex})}_drillDownAsync(e,t,n){let r=this.w.config.drilldown.onDrillDown,i;try{i=r({point:t,seriesIndex:n&&n.seriesIndex,dataPointIndex:n&&n.dataPointIndex})}catch(t){return this._fire(`drillDownError`,{id:e,error:t}),Promise.resolve(this.ctx)}return Promise.resolve(i).then(e=>!e||!e.data?this.ctx:this._drillInto(e,t,n),t=>(this._fire(`drillDownError`,{id:e,error:t}),this.ctx))}_snapshot(){let e=this.w.config,t=this._overrideFields(),n={series:Z.clone(e.series)};return Array.isArray(e.labels)&&e.labels.length&&(n.labels=Z.clone(e.labels)),n.chart={type:e.chart.type,stacked:e.chart.stacked},t.has(`xaxis`)&&(n.xaxis=Z.clone(e.xaxis)),t.has(`yaxis`)&&(n.yaxis=Z.clone(e.yaxis)),t.has(`colors`)&&(n.colors=e.colors?Z.clone(e.colors):void 0),t.has(`plotOptions`)&&(n.plotOptions=Z.clone(e.plotOptions)),t.has(`fill`)&&(n.fill=Z.clone(e.fill)),t.has(`legend`)&&(n.legend=Z.clone(e.legend)),n}_overrideFields(){let e=new Set,t=this.w.config.drilldown&&this.w.config.drilldown.series||[];for(let n of t)n&&(n.xaxis&&e.add(`xaxis`),n.yaxis&&e.add(`yaxis`),n.colors&&e.add(`colors`),n.plotOptions&&e.add(`plotOptions`),n.fill&&e.add(`fill`),n.legend&&e.add(`legend`));return e}_viewFromChild(e){let t={};t.series=Array.isArray(e.series)?e.series:[{name:e.name||``,data:e.data}];let n={};return e.chart&&e.chart.type&&(n.type=e.chart.type),e.chart&&e.chart.stacked!=null&&(n.stacked=e.chart.stacked),Object.keys(n).length&&(t.chart=n),e.xaxis&&(t.xaxis=e.xaxis),e.yaxis&&(t.yaxis=e.yaxis),e.colors&&(t.colors=e.colors),e.plotOptions&&(t.plotOptions=e.plotOptions),e.fill&&(t.fill=e.fill),e.legend&&(t.legend=e.legend),t}_viewFromSnapshot(e){let t={series:e.series,chart:e.chart};return e.labels&&e.labels.length&&(t.labels=e.labels),e.xaxis&&(t.xaxis=e.xaxis),e.yaxis&&(t.yaxis=e.yaxis),e.colors&&(t.colors=e.colors),e.plotOptions&&(t.plotOptions=e.plotOptions),e.fill&&(t.fill=e.fill),e.legend&&(t.legend=e.legend),t}_apply(e,t,n){let r=this.w;r.interact.selectedDataPoints=[],r.globals.collapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeries=[],r.globals.ancillaryCollapsedSeriesIndices=[],r.globals.allSeriesCollapsed=!1,r.globals.risingSeries=[];let i=(!r.config.drilldown.animation||r.config.drilldown.animation.enabled!==!1)&&r.config.chart.animations.enabled!==!1;t===`down`&&this._fire(`drillDownStart`,n);let a=t=>this.ctx.updateOptions(e,!1,t,!1,!1),o=()=>(this._fire(t===`down`?`drillDownEnd`:`drillUp`,n),this.ctx);if(i&&this._zoomEnabled()){let e=this._triggerOrigin(n);if(e)return this._zoomDrill(e,t,()=>a(!1)).then(o)}return a(i).then(o)}_zoomEnabled(){let e=this.w.config.drilldown&&this.w.config.drilldown.animation;return!!(e&&e.zoomFromPoint)}_svgNode(){let e=this.w.dom&&this.w.dom.Paper;return e&&e.node?e.node:null}_markGroup(){let e=this._svgNode();return!e||typeof e.querySelector!=`function`?null:e.querySelector(`.apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap`)}_triggerOrigin(e){if(!Y.isBrowser())return null;let t=this._svgNode(),n=this._markGroup();if(!t||!n||typeof n.animate!=`function`||typeof t.getBoundingClientRect!=`function`)return null;let r=t.getBoundingClientRect(),i=null;if(e&&e.seriesIndex!=null&&e.dataPointIndex!=null&&this.w.dom.baseEl&&(i=this.w.dom.baseEl.querySelector(`[index="${e.seriesIndex}"][j="${e.dataPointIndex}"]`)),i&&typeof i.getBoundingClientRect==`function`){let e=i.getBoundingClientRect();return{x:e.left+e.width/2-r.left,y:e.top+e.height/2-r.top}}let a=n.getBoundingClientRect();return{x:a.left+a.width/2-r.left,y:a.top+a.height/2-r.top}}_zoomDrill(e,t,n){return pv(this,null,function*(){let r=this._zoomDuration(),i=t===`down`,a=Math.round(r*.55),o=i?`scale(1.03)`:`scale(0.97)`,s=i?`scaleX(0.55) scaleY(0.85)`:`scale(1.04)`,c=t=>{t.style.transformBox=`view-box`,t.style.transformOrigin=`${e.x}px ${e.y}px`},l=e=>{e.style.transform=``,e.style.opacity=``,e.style.transformOrigin=``,e.
1162style.transformBox=``},u=this._markGroup(),d=null;if(u){c(u),d=u.animate([{transform:`scale(1)`,opacity:1},{transform:o,opacity:0}],{duration:a,easing:`ease-in`,fill:`forwards`});try{yield d.finished}catch{}}yield n();let f=this._markGroup();if(f){c(f),f.style.opacity=`0`,f.style.transform=s,d&&u===f&&d.cancel();let e=f.animate([{transform:s,opacity:0},{transform:`scale(1)`,opacity:1}],{duration:r,easing:`cubic-bezier(0.16, 1, 0.3, 1)`,fill:`forwards`});try{yield e.finished}catch{}l(f),e.cancel()}})}_zoomDuration(){let e=this.w.config.drilldown&&this.w.config.drilldown.animation,t=e&&typeof e.speed==`number`?e.speed:260;return Math.max(80,t)}_fire(e,t){let n=this.w.config.chart.events&&this.w.config.chart.events[e];typeof n==`function`&&n(t,this.ctx,this.w),this.ctx.events.fireEvent(e,[t,this.ctx,this.w])}_onPointSelect(e,t,n){if(!n)return;let r=this._pointAt(n.seriesIndex,n.dataPointIndex);if(r&&typeof r==`object`&&r.drilldown!=null)return this.drillDown(r.drilldown,r,n);if(typeof this.w.config.drilldown.onDrillDown==`function`)return this._drillDownAsync(null,r,n)}_pointAt(e,t){let n=this.w.config.series;if(!Array.isArray(n)||e==null||t==null)return null;let r=n[e];return!r||!Array.isArray(r.data)||r.data[t]==null?null:r.data[t]}_afterRender(){this.w.config.drilldown&&this.w.config.drilldown.enabled&&(this._markDrillableTargets(),this.breadcrumb.render(this.path))}_markDrillableTargets(){if(!Y.isBrowser())return;let e=this.w,t=e.dom.baseEl,n=e.config.series;t&&Array.isArray(n)&&n.forEach((e,n)=>{let r=e&&Array.isArray(e.data)?e.data:null;r&&r.forEach((e,r)=>{e&&typeof e==`object`&&e.drilldown!=null&&t.querySelectorAll(`[index="${n}"][j="${r}"]`).forEach(e=>e.classList.add(`apexcharts-drilldown-target`))})})}};Fb.registerFeatures({drilldown:ux});var dx=class{constructor(e){this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||=this.w.config.dataLabels.formatter}handleBarDataLabels(e){let{x:t,y:n,y1:r,y2:i,i:a,j:o,realIndex:s,columnGroupIndex:c,series:l,barHeight:u,barWidth:d,barXPosition:f,barYPosition:p,visibleSeries:m}=e,h=this.w,g=new Q(this.barCtx.w),_=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth,v,y;h.axisFlags.isXNumeric&&!h.globals.isBarHorizontal?(v=t+d*(m+1),y=n+u*(m+1)-_):(v=t+d*m,y=n+u*m);let b=null,x=null,S=t,C=n,w={},T=h.config.dataLabels,E=this.barCtx.barOptions.dataLabels,D=this.barCtx.barOptions.dataLabels.total;p!==void 0&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(y=p,C=p),f!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(v=f,S=f);let O=T.offsetX,k=T.offsetY,A={width:0,height:0};if(h.config.dataLabels.enabled){let e=h.seriesData.series[a][o];A=g.getTextRects(h.config.dataLabels.formatter?h.config.dataLabels.formatter(e,q(K({},h),{seriesIndex:a,dataPointIndex:o,w:h})):h.formatters.yLabelFormatters[0](e),parseFloat(T.style.fontSize).toString())}let j={x:t,y:n,i:a,j:o,realIndex:s,columnGroupIndex:c,bcx:v,bcy:y,barHeight:u,barWidth:d,textRects:A,strokeWidth:_,dataLabelsX:S,dataLabelsY:C,dataLabelsConfig:T,barDataLabelsConfig:E,barTotalDataLabelsConfig:D,offX:O,offY:k};return w=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(j):this.calculateColumnsDataLabelsPosition(j),b=this.drawCalculatedDataLabels({x:w.dataLabelsX,y:w.dataLabelsY,val:this.barCtx.isRangeBar?[r,i]:h.config.chart.stackType===`100%`?l[s][o]:h.seriesData.series[s][o],i:s,j:o,barWidth:d,barHeight:u,textRects:A,dataLabelsConfig:T}),h.config.chart.stacked&&D.enabled&&(x=this.drawTotalDataLabels({x:w.totalDataLabelsX,y:w.totalDataLabelsY,barWidth:d,barHeight:u,realIndex:s,textAnchor:w.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:s,j:o}),dataLabelsConfig:T,barTotalDataLabelsConfig:D})),{dataLabelsPos:w,dataLabels:b,totalDataLabels:x}}getStackedTotalDataLabel({realIndex:e,j:t}){let n=this.w,r=this.barCtx.stackedSeriesTotals[t];return this.totalFormatter&&(r=this.totalFormatter(r,q(K({},n),{seriesIndex:e,dataPointIndex:t,w:n}))),r}calculateColumnsDataLabelsPosition(e){let t=this.w,{i:n,j:r,realIndex:i,y:a,bcx:o,barWidth:s,barHeight:c,textRects:l,dataLabelsX:u,dataLabelsY:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,strokeWidth:h,offX:g,offY:_}=e,v,y,b=o;c=Math.abs(c);let x=t.config.plotOptions.bar.dataLabels.orientation===`vertical`,{zeroEncounters:S}=this.barCtx.barHelpers.getZeroValueEncounters({i:n,j:r});o-=h/2;let C=t.layout.gridWidth/t.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?u+=s/2:(u=t.axisFlags.isXNumeric?o-s/2+g:o-C+s/2+g,!t.config.chart.stacked&&S>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=s*S)),x&&(u=u+l.height/2-h/2-2);let w=t.seriesData.series[n][r]<0,T=a;switch(this.barCtx.isReversed&&(T=a+(w?c:-c)),p.position){case`center`:d=x?w?T-c/2+_:T+c/2-_:w?T-c/2+l.height/2+_:T+c/2+l.height/2-_;break;case`bottom`:d=x?w?T-c+_:T+c-_:w?T-c+l.height+h+_:T+c-l.height/2+h-_;break;case`top`:d=x?w?T+_:T-_:w?T-l.height/2-_:T+l.height+_}let E=T;
1162if(t.labelData.seriesGroups.forEach(e=>{var t;(t=this.barCtx[e.join(`,`)])==null||t.prevY.forEach(e=>{E=w?Math.max(e[r],E):Math.min(e[r],E)})}),this.barCtx.lastActiveBarSerieIndex===i&&m.enabled){let e=new Q(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:i,j:r}),f.fontSize);v=w?E-e.height/2-_-m.offsetY+18:E+e.height+_+m.offsetY-18;let n=C;y=b+(t.axisFlags.isXNumeric?-s*t.globals.barGroups.length/2:t.globals.barGroups.length*s/2-(t.globals.barGroups.length-1)*s-n)+m.offsetX}return t.config.chart.stacked||(d<0?d=0+h:d+l.height/3>t.layout.gridHeight&&(d=t.layout.gridHeight-h)),{bcx:o,bcy:a,dataLabelsX:u,dataLabelsY:d,totalDataLabelsX:y,totalDataLabelsY:v,totalDataLabelsAnchor:`middle`}}calculateBarsDataLabelsPosition(e){let t=this.w,{x:n,i:r,j:i,realIndex:a,bcy:o,barHeight:s,barWidth:c,textRects:l,dataLabelsX:u,strokeWidth:d,dataLabelsConfig:f,barDataLabelsConfig:p,barTotalDataLabelsConfig:m,offX:h,offY:g}=e,_=t.layout.gridHeight/t.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:i});c=Math.abs(c);let y;if(this.barCtx.isPyramid){let e=l.centerOffset??0;y=o+s/2+g-e}else y=o-(this.barCtx.isRangeBar?0:_)+s/2+l.height/2+g-3;!t.config.chart.stacked&&v>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=s*v);let b,x,S=`start`,C=t.seriesData.series[r][i]<0,w=n;if(this.barCtx.isReversed&&(w=n+(C?-c:c),S=C?`start`:`end`),this.barCtx.isPyramid)u=t.layout.gridWidth/2+h;else switch(p.position){case`center`:u=C?w+c/2-h:Math.max(l.width/2,w-c/2)+h;break;case`bottom`:u=C?w+c-d-h:w-c+d+h;break;case`top`:u=C?w-d-h:w-d+h}let T=w;if(t.labelData.seriesGroups.forEach(e=>{var t;(t=this.barCtx[e.join(`,`)])==null||t.prevX.forEach(e=>{T=C?Math.min(e[i],T):Math.max(e[i],T)})}),this.barCtx.lastActiveBarSerieIndex===a&&m.enabled){let e=new Q(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:i}),f.fontSize);C?(b=T-d-h-m.offsetX,S=`end`):b=T+h+m.offsetX+(this.barCtx.isReversed?-(c+d):d),x=y-l.height/2+e.height/2+m.offsetY+d,t.globals.barGroups.length>1&&(x-=t.globals.barGroups.length/2*(s/2))}return t.config.chart.stacked||(f.textAnchor===`start`?u-l.width<0?u=C?l.width+d:d:u+l.width>t.layout.gridWidth&&(u=C?t.layout.gridWidth-d:t.layout.gridWidth-l.width-d):f.textAnchor===`middle`?u-l.width/2<0?u=l.width/2+d:u+l.width/2>t.layout.gridWidth&&(u=t.layout.gridWidth-l.width/2-d):f.textAnchor===`end`&&(u<1?u=l.width+d:u+1>t.layout.gridWidth&&(u=t.layout.gridWidth-l.width-d))),{bcx:n,bcy:o,dataLabelsX:u,dataLabelsY:y,totalDataLabelsX:b,totalDataLabelsY:x,totalDataLabelsAnchor:S}}drawCalculatedDataLabels({x:e,y:t,val:n,i:r,j:i,textRects:a,barHeight:o,barWidth:s,dataLabelsConfig:c}){let l=this.w,u=`rotate(0)`;l.config.plotOptions.bar.dataLabels.orientation===`vertical`&&(u=`rotate(-90, ${e}, ${t})`);let d=new Xv(this.barCtx.w,this.barCtx.ctx),f=new Q(this.barCtx.w),p=c.formatter,m=null,h=l.globals.collapsedSeriesIndices.indexOf(r)>-1;if(c.enabled&&!h){m=f.group({class:`apexcharts-data-labels`,transform:u});let h=``;n!==void 0&&(h=p(n,q(K({},l),{seriesIndex:r,dataPointIndex:i,w:l}))),!n&&l.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(h=``);let g=l.seriesData.series[r][i]<0,_=l.config.plotOptions.bar.dataLabels.position;l.config.plotOptions.bar.dataLabels.orientation===`vertical`&&(_===`top`&&(c.textAnchor=g?`end`:`start`),_===`center`&&(c.textAnchor=`middle`),_===`bottom`&&(c.textAnchor=g?`end`:`start`)),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&s<f.getTextRects(h,parseFloat(c.style.fontSize).toString()).width&&(h=``),l.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(s)&&(h=``):a.height/1.6>Math.abs(o)&&(h=``));let v=K({},c);this.barCtx.isHorizontal&&n<0&&(c.textAnchor===`start`?v.textAnchor=`end`:c.textAnchor===`end`&&(v.textAnchor=`start`)),d.plotDataLabelsText({x:e,y:t,text:h,i:r,j:i,parent:m,dataLabelsConfig:v,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}drawTotalDataLabels({x:e,y:t,val:n,realIndex:r,textAnchor:i,barTotalDataLabelsConfig:a}){let o=new Q(this.barCtx.w),s;return a.enabled&&e!==void 0&&t!==void 0&&this.barCtx.lastActiveBarSerieIndex===r&&(s=o.drawText({x:e,y:t,foreColor:a.style.color,text:n,textAnchor:i,fontFamily:a.style.fontFamily,fontSize:a.style.fontSize,fontWeight:a.style.fontWeight})),s}},fx=class{constructor(e){this.w=e.w,this.barCtx=e}initVariables(e){let t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let n=0;n<e.length;n++)if(e[n].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[n].length),t.axisFlags.isXNumeric)for(let r=0;r<e[n].length;r++)t.seriesData.seriesX[n][r]>t.globals.minX&&t.seriesData.seriesX[n][r]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(t.seriesData.series),Z.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(e=>e.map(e=>
1162`none`))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],t.globals.comboCharts||this.checkZeroSeries({series:e})}initialPositions(e){let t=this.w,n,r,i,a,o,s,c,l,u=t.globals.dataPoints;this.barCtx.isRangeBar&&(u=t.labelData.labels.length);let d=this.barCtx.seriesLen;if(t.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)i=t.layout.gridHeight/u,o=i/d,t.axisFlags.isXNumeric&&(i=t.layout.gridHeight/this.barCtx.totalItems,o=i/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf(`%`)===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+t.globals.padHorizontal+(this.barCtx.isReversed?t.layout.gridWidth:0)-(this.barCtx.isReversed?this.barCtx.baseLineInvertedY*2:0),this.barCtx.isFunnel&&(l=t.layout.gridWidth/2),r=(i-o*this.barCtx.seriesLen)/2;else{if(a=t.layout.gridWidth/this.barCtx.visibleItems,t.config.xaxis.convertedCatToNumeric&&(a=t.layout.gridWidth/t.globals.dataPoints),s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,t.axisFlags.isXNumeric){let e=this.barCtx.xRatio;t.globals.minXDiff&&t.globals.minXDiff!==.5&&t.globals.minXDiff/e>0&&(a=t.globals.minXDiff/e),s=a/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,s<1&&(s=1)}String(this.barCtx.barOptions.columnWidth).indexOf(`%`)===-1&&(s=parseInt(this.barCtx.barOptions.columnWidth,10)),c=t.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?t.layout.gridHeight:0)+(this.barCtx.isReversed?this.barCtx.baseLineY[this.barCtx.translationsIndex]*2:0),n=t.axisFlags.isXNumeric?this.barCtx.getBarXForNumericXAxis({x:n,j:0,realIndex:e,barWidth:s}).x:t.globals.padHorizontal+Z.noExponents(a-s*this.barCtx.seriesLen)/2}return t.globals.barHeight=o,t.globals.barWidth=s,{x:n,y:r,yDivision:i,xDivision:a,barHeight:o,barWidth:s,zeroH:c,zeroW:l}}initializeStackedPrevVars(e){e.w.labelData.seriesGroups.forEach(t=>{e[t]||(e[t]={}),e[t].prevY=[],e[t].prevX=[],e[t].prevYF=[],e[t].prevXF=[],e[t].prevYVal=[],e[t].prevXVal=[]})}initializeStackedXYVars(e){e.w.labelData.seriesGroups.forEach(t=>{e[t]||(e[t]={}),e[t].xArrj=[],e[t].xArrjF=[],e[t].xArrjVal=[],e[t].yArrj=[],e[t].yArrjF=[],e[t].yArrjVal=[]})}getPathFillColor(e,t,n,r){let i=this.w,a=new qv(this.barCtx.w),o=null,s=this.barCtx.barOptions.distributed?n:t,c=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(r=>{e[t][n]>=r.from&&e[t][n]<=r.to&&(o=r.color,c=!0)}),{color:a.fillPath({seriesNumber:this.barCtx.barOptions.distributed?s:r,dataPointIndex:n,color:o,value:e[t][n],fillConfig:i.config.series[t].data[n]?.fill,fillType:i.config.series[t].data[n]?.fill?.type?i.config.series[t].data[n]?.fill.type:Array.isArray(i.config.fill.type)?i.config.fill.type[r]:i.config.fill.type}),useRangeColor:c}}getStrokeWidth(e,t,n){let r=0,i=this.w;return this.barCtx.series[e][t]===void 0||this.barCtx.series[e][t]===null||i.config.chart.type===`bar`&&!this.barCtx.series[e][t]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(r=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[n]:this.barCtx.strokeWidth)),r}createBorderRadiusArr(e){let t=this.w,n=!this.w.config.chart.stacked||t.config.plotOptions.bar.borderRadius<=0,r=e.length,i=e[0]?.length|0,a=Array.from({length:r},()=>Array(i).fill(n?`top`:`none`));if(n)return a;let o=this.w.config.chart.type;for(let t=0;t<i;t++){let n=[],s=[],c=0;for(let i=0;i<r;i++){let r=e[i][t];r>0?(n.push(i),c++):r<0&&(s.push(i),c++)}if(n.length>0&&s.length===0){if(n.length===1)a[n[0]][t]=o===`bar`&&i===1?`top`:`both`;else{let e=n[0],r=n[n.length-1];for(let s of n)s===e?a[s][t]=o===`bar`&&i===1?`top`:`bottom`:s===r?a[s][t]=`top`:a[s][t]=`none`}}else if(s.length>0&&n.length===0){if(s.length===1)a[s[0]][t]=`both`;else{let e=Math.max(...s),n=Math.min(...s);for(let r of s)r===e?a[r][t]=`bottom`:r===n?a[r][t]=`top`:a[r][t]=`none`}}else if(n.length>0&&s.length>0){let e=n[n.length-1];for(let r of n)r===e?a[r][t]=`top`:a[r][t]=`none`;let r=Math.max(...s);
1162for(let e of s)e===r?a[e][t]=`bottom`:a[e][t]=`none`}else if(c===1){let e=n[0]||s[0];a[e][t]=`both`}}return a}barBackground({j:e,i:t,x1:n,x2:r,y1:i,y2:a,elSeries:o}){let s=this.w,c=new Q(this.barCtx.w),l=new dy(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&l===t){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);let t=this.barCtx.barOptions.colors.backgroundBarColors[e],l=c.drawRect(n===void 0?0:n,i===void 0?0:i,r===void 0?s.layout.gridWidth:r,a===void 0?s.layout.gridHeight:a,this.barCtx.barOptions.colors.backgroundBarRadius,t,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(l),l.node.classList.add(`apexcharts-backgroundBar`)}}getColumnPaths({barWidth:e,barXPosition:t,y1:n,y2:r,strokeWidth:i,isReversed:a,series:o,seriesGroup:s,realIndex:c,i:l,j:u,w:d}){let f=new Q(this.barCtx.w);i=Array.isArray(i)?i[c]:i,i||=0;let p=e,m=t;d.config.series[c].data[u]?.columnWidthOffset&&(m=t-d.config.series[c].data[u].columnWidthOffset/2,p=e+d.config.series[c].data[u].columnWidthOffset);let h=i/2,g=m+h,_=m+p-h,v=(o[l][u]>=0?1:-1)*(a?-1:1);n+=.001-h*v,r+=.001+h*v;let y=f.line(_,n),b=d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`,x=f.move(g,n)+f.line(g,r)+f.line(_,r)+y+b;this.arrBorderRadius[c][u]!==`none`&&(x=f.roundPathCorners(x,d.config.plotOptions.bar.borderRadius));let S;if(S=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(c,u)||(d.globals.previousPaths.length>0?this.barCtx.getPreviousPath(c,u,x):f.move(g,n)+f.line(g,n)+y+y+y+y+y+f.line(g,n)+b),d.config.chart.stacked){let e=this.barCtx;e=this.barCtx[s],e.yArrj.push(r-h*v),e.yArrjF.push(Math.abs(n-r+i*v)),e.yArrjVal.push(this.barCtx.series[l][u])}return{pathTo:x,pathFrom:S}}getFunnelTrapezoidPaths({barYPosition:e,barHeight:t,series:n,i:r,j:i,realIndex:a,strokeWidth:o,w:s}){let c=new Q(this.barCtx.w),l=s.layout.gridWidth/2,u=e=>Math.abs(e/this.barCtx.invertedYRatio)/2,d=u(n[r][i]),f=i===n[r].length-1,p=s.config.plotOptions.funnel.lastShape===`taper`?`taper`:`flat`,m;m=f?p===`taper`?0:d:u(n[r][i+1]);let h=o/2,g=e+h,_=e+t-h,v=l-d,y=l+d,b=l-m,x=l+m,S=c.move(v,g)+c.line(y,g)+c.line(x,_)+c.line(b,_)+` Z`,C;return C=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(a,i)||(s.globals.previousPaths.length>0?this.barCtx.getPreviousPath(a,i,S):c.move(l,g)+c.line(l,g)+c.line(l,_)+c.line(l,_)+` Z`),{pathTo:S,pathFrom:C,x:y,x1:v,barXPosition:l}}computePyramidLayout(e){let t=this.w,n=t.layout.gridHeight,r=t.layout.gridWidth,i=e.map(e=>Math.abs(Number(e)||0)),a=i.reduce((e,t)=>e+t,0);if(a===0||n<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));let o=r/2,s=0,c=[];for(let e=0;e<i.length;e++){let t=s/a;s+=i[e];let r=s/a,l=t*n,u=r*n;c.push({y:l,height:u-l,topHalf:t*o,bottomHalf:r*o})}return c}getPyramidPaths({barYPosition:e,barHeight:t,topHalf:n,bottomHalf:r,realIndex:i,j:a,strokeWidth:o,w:s}){let c=new Q(this.barCtx.w),l=s.layout.gridWidth/2,u=o/2,d=e+u,f=e+t-u,p=l-n,m=l+n,h=l-r,g=l+r,_=c.move(p,d)+c.line(m,d)+c.line(g,f)+c.line(h,f)+` Z`,v;return v=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(i,a)||(s.globals.previousPaths.length>0?this.barCtx.getPreviousPath(i,a,_):c.move(l,d)+c.line(l,d)+c.line(l,f)+c.line(l,f)+` Z`),{pathTo:_,pathFrom:v,x:m,x1:p,barXPosition:l}}getBarpaths({barYPosition:e,barHeight:t,x1:n,x2:r,strokeWidth:i,isReversed:a,series:o,seriesGroup:s,realIndex:c,i:l,j:u,w:d}){let f=new Q(this.barCtx.w);i=Array.isArray(i)?i[c]:i,i||=0;let p=e,m=t;d.config.series[c].data[u]?.barHeightOffset&&(p=e-d.config.series[c].data[u].barHeightOffset/2,m=t+d.config.series[c].data[u].barHeightOffset);let h=i/2,g=p+h,_=p+m-h,v=(o[l][u]>=0?1:-1)*(a?-1:1);n+=.001+h*v,r+=.001-h*v;let y=this.barCtx.isFunnel,b=y?(n+r)/2:n,x=f.line(n,_),S=d.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[c][u]===`both`?` Z`:` z`,C=f.move(n,g)+f.line(r,g)+f.line(r,_)+x+S;this.arrBorderRadius[c][u]!==`none`&&(C=f.roundPathCorners(C,d.config.plotOptions.bar.borderRadius));let w,T=(this.barCtx.ctx?.morphTypeChange)?.getInitialPathFor(c,u);if(T)w=T;else if(d.globals.previousPaths.length>0)w=this.barCtx.getPreviousPath(c,u,C);else{let e=y?f.line(b,_):x;w=f.move(b,g)+f.line(b,g)+e+e+e+e+e+f.line(b,g)+S}if(d.config.chart.stacked){let e=this.barCtx;e=this.barCtx[s],e.xArrj.push(r+h*v),e.xArrjF.push(Math.abs(n-r-i*v)),e.xArrjVal.push(this.barCtx.series[l][u])}return{pathTo:C,pathFrom:w}}checkZeroSeries({series:e}){let t=this.w;for(let n=0;n<e.length;n++){let r=0;for(let i=0;i<e[t.globals.maxValsInArrayIndex].length;i++)r+=e[n][i];r===0&&this.barCtx.zeroSerieses.push(n)}}getXForValue(e,t,n=!0){let r=n?t:null;return e!=null&&(r=t+e/this.barCtx.invertedYRatio-(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)*2),r}getYForValue(e,t,n,r=!0){let i=r?t:null;return e!=null&&(i=t-e/this.barCtx.yRatio[n]+(this.barCtx.isReversed?e/this.barCtx.yRatio[n]:0)*2),i}getGoalValues(e,t,n,r,i,a){let o=this.w,s=[],c=(r,i)=>{s.push({[e]:e===`x`?this.getXForValue(r,t,!1):this.getYForValue(r,n,a,!1),attrs:i})};if(o.seriesData.seriesGoals[r]&&o.seriesData.seriesGoals[r][i]&&Array.isArray(o.seriesData.seriesGoals[r][i])&&o.seriesData.seriesGoals[r][i].forEac
1162h(e=>{c(e.value,e)}),this.barCtx.barOptions.isDumbbell&&o.rangeData.seriesRange.length){let t=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,n={strokeHeight:e===`x`?0:o.globals.markers.size[r],strokeWidth:e===`x`?o.globals.markers.size[r]:0,strokeDashArray:0,strokeLineCap:`round`,strokeColor:Array.isArray(t[r])?t[r][0]:t[r]};c(o.rangeData.seriesRangeStart[r][i],n),c(o.rangeData.seriesRangeEnd[r][i],q(K({},n),{strokeColor:Array.isArray(t[r])?t[r][1]:t[r]}))}return s}drawGoalLine({barXPosition:e,barYPosition:t,goalX:n,goalY:r,barWidth:i,barHeight:a}){let o=new Q(this.barCtx.w),s=o.group({className:`apexcharts-bar-goals-groups`});s.node.classList.add(`apexcharts-element-hidden`),this.barCtx.w.globals.delayedElements.push({el:s.node}),s.attr(`clip-path`,`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let c=null;return this.barCtx.isHorizontal?Array.isArray(n)&&n.forEach(e=>{if(e.x>=-1&&e.x<=o.w.layout.gridWidth+1){let n=e.attrs.strokeHeight===void 0?a/2:e.attrs.strokeHeight,r=t+n+a/2;c=o.drawLine(e.x,r-n*2,e.x,r,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeWidth?e.attrs.strokeWidth:2,e.attrs.strokeLineCap),s.add(c)}}):Array.isArray(r)&&r.forEach(t=>{if(t.y>=-1&&t.y<=o.w.layout.gridHeight+1){let n=t.attrs.strokeWidth===void 0?i/2:t.attrs.strokeWidth,r=e+n+i/2;c=o.drawLine(r-n*2,t.y,r,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),s.add(c)}}),s}drawBarShadow({prevPaths:e,currPaths:t,color:n,realIndex:r,j:i}){let a=this.w,{x:o,x1:s,barYPosition:c}=e,{x:l,x1:u,barYPosition:d}=t,f=c+t.barHeight,p=new Q(this.barCtx.w),m=new Z,h=p.move(s,f)+p.line(o,f)+p.line(l,d)+p.line(u,d)+p.line(s,f)+(a.config.plotOptions.bar.borderRadiusApplication===`around`||this.arrBorderRadius[r][i]===`both`?` Z`:` z`);return p.drawPath({d:h,fill:m.shadeColor(.5,Z.rgb2hex(n)),stroke:`none`,strokeWidth:0,fillOpacity:1,classes:`apexcharts-bar-shadow apexcharts-decoration-element`})}getZeroValueEncounters({i:e,j:t}){let n=this.w,r=0,i=0;return(n.config.plotOptions.bar.horizontal?n.seriesData.series.map((e,t)=>t):n.globals.columnSeries?.i.map(e=>e)||[]).forEach(a=>{let o=n.globals.seriesPercent[a][t];o&&r++,a<e&&o===0&&i++}),{nonZeroColumns:r,zeroEncounters:i}}getGroupIndex(e){let t=this.w,n=t.labelData.seriesGroups.findIndex(n=>n.indexOf(t.seriesData.seriesNames[e])>-1),r=this.barCtx.columnGroupIndices,i=r.indexOf(n);return i<0&&(r.push(n),i=r.length-1),{groupIndex:n,columnGroupIndex:i}}},px=class e{constructor(e,t,n){this.ctx=t,this.w=e,this.barOptions=e.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=e.config.stroke.width,this.isNullValue=!1,this.isRangeBar=e.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.rangeData.seriesRange.length&&e.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=n,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,this.xyRatios!==null&&(this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;let r=new dy(this.w);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex(`desc`,[`bar`,`column`]),this.columnGroupIndices=[];let i=r.getBarSeriesIndices(),a=new Nv(this.w);this.stackedSeriesTotals=a.getStackedSeriesTotals(this.w.config.series.map((e,t)=>i.indexOf(t)===-1?t:-1).filter(e=>e!==-1)),this.barHelpers=new fx(this)}draw(e,t){let n=this.w,r=new Q(this.w),i=new Nv(this.w);e=i.getLogSeries(e),this.series=e,this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let a=r.group({class:`apexcharts-bar-series apexcharts-plot-series`});n.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 - ApexCharts`);for(let i=0,o=0;i<e.length;i++,o++){let s,c,l=[],u=[],d=n.globals.comboCharts?t[i]:i,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=r.group({class:`apexcharts-series`,rel:i+1,seriesName:Z.escapeString(n.seriesData.seriesNames[d]),"data:realIndex":d});dy.addCollapsedClassToSeries(this.w,p,d),e[i].length>0&&(this.visibleI+=1),this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[d],this.translationsIndex=d);let m=this.translationsIndex;this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computeP
1162yramidLayout(e[i]));let h=this.barHelpers.initialPositions(d),{y:g,yDivision:_,zeroW:v,x:y,xDivision:b,zeroH:x}=h,S=h.barHeight,C=h.barWidth;c=g,s=y,this.isHorizontal||u.push(s+(C??0)/2);let w=r.group({class:`apexcharts-datalabels`,"data:realIndex":d});n.globals.delayedElements.push({el:w.node}),w.node.classList.add(`apexcharts-element-hidden`);let T=r.group({class:`apexcharts-bar-goals-markers`}),E=r.group({class:`apexcharts-bar-shadows`});n.globals.delayedElements.push({el:E.node}),E.node.classList.add(`apexcharts-element-hidden`);for(let t=0;t<e[i].length;t++){let r=this.barHelpers.getStrokeWidth(i,t,d),a=null,h={indexes:{i,j:t,realIndex:d,translationsIndex:m,bc:o},x:s,y:c,strokeWidth:r,elSeries:p};this.isHorizontal?(a=this.drawBarPaths(q(K({},h),{barHeight:S,zeroW:v,yDivision:_})),C=this.series[i][t]/this.invertedYRatio):(a=this.drawColumnPaths(q(K({},h),{xDivision:b,barWidth:C,zeroH:x})),S=this.series[i][t]/this.yRatio[m]);let g=this.barHelpers.getPathFillColor(e,i,t,d);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&n.config.plotOptions.funnel?.shape!==`trapezoid`&&this.pathArr.length&&t>0){let e=this.barHelpers.drawBarShadow({color:typeof g.color==`string`&&g.color?.indexOf(`url`)===-1?g.color:Z.hexToRgba(n.globals.colors[i]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:a,realIndex:d,j:t});E.add(e),n.config.chart.dropShadow.enabled&&new Uv(this.w).dropShadow(e,n.config.chart.dropShadow,d)}this.pathArr.push(a);let y=this.barHelpers.drawGoalLine({barXPosition:a.barXPosition,barYPosition:a.barYPosition,goalX:a.goalX,goalY:a.goalY,barHeight:S,barWidth:C});y&&T.add(y),c=a.y,s=a.x,t>0&&u.push(s+(C??0)/2),l.push(c),this.renderSeries(q(K({realIndex:d,pathFill:g.color},g.useRangeColor?{lineFill:g.color}:{}),{j:t,i,columnGroupIndex:f,pathFrom:a.pathFrom,pathTo:a.pathTo,strokeWidth:r,elSeries:p,x:s,y:c,series:e,barHeight:Math.abs(a.barHeight?a.barHeight:S),barWidth:Math.abs(a.barWidth?a.barWidth:C),elDataLabelsWrap:w,elGoalsMarkers:T,elBarShadows:E,visibleSeries:this.visibleI,type:`bar`}))}n.globals.seriesXvalues[d]=u,n.globals.seriesYvalues[d]=l,a.add(p)}return a}renderSeries({realIndex:e,pathFill:t,lineFill:n,j:r,i,columnGroupIndex:a,pathFrom:o,pathTo:s,strokeWidth:c,elSeries:l,x:u,y:d,y1:f,y2:p,series:m,barHeight:h,barWidth:g,barXPosition:_,barYPosition:v,elDataLabelsWrap:y,elGoalsMarkers:b,elBarShadows:x,visibleSeries:S,type:C,classes:w}){let T=this.w,E=new Q(this.w,this.ctx),D=!1;if(l._bindingsDelegated||(l._bindingsDelegated=!0,E.setupEventDelegation(l,`.apexcharts-${C}-area`)),!n){let t=typeof T.globals.stroke.colors[e]==`function`?function(e){let t=T.config.stroke.colors,n;return Array.isArray(t)&&t.length>0&&(n=t[e],n||=``,typeof n==`function`)?n({value:T.seriesData.series[e][r],dataPointIndex:r,w:T}):n}(e):T.globals.stroke.colors[e];n=this.barOptions.distributed?T.globals.stroke.colors[r]:t}let O=new dx(this).handleBarDataLabels({x:u,y:d,y1:f,y2:p,i,j:r,series:m,realIndex:e,columnGroupIndex:a,barHeight:h,barWidth:g,barXPosition:_,barYPosition:v,visibleSeries:S});T.globals.isBarHorizontal||(O.dataLabelsPos.dataLabelsX+Math.max(g,T.globals.barPadForNumericAxis)<0||O.dataLabelsPos.dataLabelsX-Math.max(g,T.globals.barPadForNumericAxis)>T.layout.gridWidth)&&(D=!0),T.config.series[i].data[r]&&T.config.series[i].data[r].strokeColor&&(n=T.config.series[i].data[r].strokeColor),this.isNullValue&&(t=`none`);let k=T.config.chart.animations,A=k.animateGradually,j=A&&A.enabled!==!1,M=0;if(j){let e=T.globals.dataPoints||1,t=A.delay||0,n=Math.min(t,k.speed*.5/Math.max(1,e)),a=Vv({style:`sequential`,index:r,baseDelay:n});T.config.chart.stacked&&(a+=i*n*.5),M=a/(t||1)}if(!D){let a=this.ctx.morphTypeChange?.isActive()===!0?this.ctx.morphTypeChange.getSpeed():T.config.chart.animations.dynamicAnimation.speed,u=E.renderPaths({i,j:r,realIndex:e,pathFrom:o,pathTo:s,stroke:n,strokeWidth:c,strokeLineCap:T.config.stroke.lineCap,fill:t,animationDelay:M,initialSpeed:T.config.chart.animations.speed,dataChangeSpeed:a,className:`apexcharts-${C}-area ${w}`,chartType:C,bindEventsOnPaths:!1});u.attr(`clip-path`,`url(#gridRectBarMask${T.globals.cuid})`);let d=T.config.forecastDataPoints;d.count>0&&r>=T.globals.dataPoints-d.count&&(u.node.setAttribute(`stroke-dasharray`,d.dashArray),u.node.setAttribute(`stroke-width`,d.strokeWidth),u.node.setAttribute(`fill-opacity`,d.fillOpacity)),f!==void 0&&p!==void 0&&(u.attr(`data-range-y1`,f),u.attr(`data-range-y2`,p)),new Uv(this.w).setSelectionFilter(u,e,r),l.add(u),u.attr({cy:O.dataLabelsPos.bcy,cx:O.dataLabelsPos.bcx,j:r,val:T.seriesData.series[i][r],barHeight:h,barWidth:g}),O.dataLabels!==null&&y.add(O.dataLabels),O.totalDataLabels&&y.add(O.totalDataLabels),l.add(y),b&&l.add(b),x&&l.add(x)}return l}drawBarPaths({indexes:e,barHeight:t,strokeWidth:n,zeroW:r,x:i,y:a,yDivision:o,elSeries:s}){let c=this.w,l=e.i,u=e.j,d;if(c.axisFlags.isXNumeric)a=(c.seriesData.seriesX[l][u]-c.globals.minX)/this.invertedXRatio-t,d=a+t*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:e,zeroEncounters:n}=this.barHelpers.getZeroValueEncounters({i:l,j:u});e>0&&(t=this.seriesLen*t/e),d=a+t*this.visibleI,d-=t*n}else d=a+t*this.visibleI;let f=this.isFunnel&&c.config.plotOptions.funnel.shape===`trapezoid`,p=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[u]:null,m=!!p;if(p)d=p.y,t=p.height;else if(this.isFunnel&&!f){let e=r??0;r=e-(this.barHelpers.getXForValue(this.series[l][u],e)-e)/2}i=this.barHelpers.getXForValue(this.series[l][u],r??0);let h;return h=p?this.barHelpers.getPyramidPaths({barYPosition:d,barHeight:t,topHalf:p.topHalf,bottomHalf:p.bottomHalf,realIndex:e.realIndex,j:u,strokeWidth:n,w:c}):f?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:d,barHeight:t,series:this.series,i:l,j:u,realIndex:e.realIndex,strokeWidth:n,w:c}):this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:r,x2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,i:l,j:u,w:c}),(f||m)&&(r=h.x1,i=h.x),!c.axisFlags.isXNumeric&&!m&&(a+=o),m&&(a=d),this.barHelpers.barBackgroun
1162d({j:u,i:l,y1:d-t*this.visibleI,y2:t*this.seriesLen,elSeries:s}),{pathTo:h.pathTo,pathFrom:h.pathFrom,x1:r,x:i,y:a,goalX:this.barHelpers.getGoalValues(`x`,r,null,l,u,0),barYPosition:d,barHeight:t}}drawColumnPaths({indexes:e,x:t,y:n,xDivision:r,barWidth:i,zeroH:a,strokeWidth:o,elSeries:s}){let c=this.w,l=e.realIndex,u=e.translationsIndex,d=e.i,f=e.j,p=e.bc,m;if(c.axisFlags.isXNumeric){let e=this.getBarXForNumericXAxis({x:t,j:f,realIndex:l,barWidth:i});t=e.x,m=e.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){let{nonZeroColumns:e,zeroEncounters:n}=this.barHelpers.getZeroValueEncounters({i:d,j:f});e>0&&(i=this.seriesLen*i/e),m=t+i*this.visibleI,m-=i*n}else m=t+i*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][f],a,u);let h=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:i,y1:a,y2:n,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:l,i:d,j:f,w:c});return c.axisFlags.isXNumeric||(t+=r),this.barHelpers.barBackground({bc:p,j:f,i:d,x1:m-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:s}),{pathTo:h.pathTo,pathFrom:h.pathFrom,x:t,y:n,goalY:this.barHelpers.getGoalValues(`y`,null,a,d,f,u),barXPosition:m,barWidth:i}}getBarXForNumericXAxis({x:e,barWidth:t,realIndex:n,j:r}){let i=this.w,a=n;return i.seriesData.seriesX[n].length||(a=i.globals.maxValsInArrayIndex),Z.isNumber(i.seriesData.seriesX[a][r])&&(e=(i.seriesData.seriesX[a][r]-i.globals.minX)/this.xRatio-t*this.seriesLen/2),{barXPosition:e+t*this.visibleI,x:e}}getPreviousPath(t,n,r){let i=this.w,a=null;for(let e=0;e<i.globals.previousPaths.length;e++){let r=i.globals.previousPaths[e];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(String(t),10)&&r.paths[n]!==void 0&&(a=r.paths[n].d)}return a&&e.pathCommandCount(a)===e.pathCommandCount(r)?a:r}static pathCommandCount(e){if(!e)return 0;let t=e.match(/[A-Za-z]/g);return t?t.length:0}},mx=class extends px{draw(e,t){let n=this.w;this.graphics=new Q(this.w),this.bar=new px(this.w,this.ctx,this.xyRatios);let r=new Nv(this.w);e=r.getLogSeries(e),this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e),n.config.chart.stackType===`100%`&&(e=n.globals.comboCharts?t.map(e=>n.globals.seriesPercent[e]):n.globals.seriesPercent.slice()),this.series=e,this.barHelpers.initializeStackedPrevVars(this);let i=this.graphics.group({class:`apexcharts-bar-series apexcharts-plot-series`}),a=0,o=0;for(let r=0,s=0;r<e.length;r++,s++){let c=n.globals.comboCharts?t[r]:r,{groupIndex:l,columnGroupIndex:u}=this.barHelpers.getGroupIndex(c);this.groupCtx=this[n.labelData.seriesGroups[l]];let d=[],f=[],p=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[c][0],p=c),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed;let m=this.graphics.group({class:`apexcharts-series`,seriesName:Z.escapeString(n.seriesData.seriesNames[c]),rel:r+1,"data:realIndex":c});dy.addCollapsedClassToSeries(this.w,m,c);let h=this.graphics.group({class:`apexcharts-datalabels`,"data:realIndex":c}),g=this.graphics.group({class:`apexcharts-bar-goals-markers`}),_=this.initialPositions(a,o,void 0,void 0,void 0,void 0,p),{xDivision:v,yDivision:y,zeroH:b,zeroW:x}=_,S=_.barHeight,C=_.barWidth;o=_.y,a=_.x,n.globals.barHeight=S,n.globals.barWidth=C,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(e=>isNaN(e))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>b),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let t=0;t<n.globals.dataPoints;t++){let i=this.barHelpers.getStrokeWidth(r,t,c),_={indexes:{i:r,j:t,realIndex:c,translationsIndex:p,bc:s},strokeWidth:i,x:a,y:o,elSeries:m,columnGroupIndex:u,seriesGroup:n.labelData.seriesGroups[l]},w=null;this.isHorizontal?(w=this.drawStackedBarPaths(q(K({},_),{zeroW:x,barHeight:S,yDivision:y})),C=this.series[r][t]/this.invertedYRatio):(w=this.drawStackedColumnPaths(q(K({},_),{xDivision:v,barWidth:C,zeroH:b})),S=this.series[r][t]/this.yRatio[p]);let T=this.barHelpers.drawGoalLine({barXPosition:w.barXPosition,barYPosition:w.barYPosition,goalX:w.goalX,goalY:w.goalY,barHeight:S,barWidth:C});T&&g.add(T),o=w.y,a=w.x,d.push(a),f.push(o);let E=this.barHelpers.getPathFillColor(e,r,t,c),D=``,O=n.globals.isBarHorizontal?`apexcharts-flip-x`:`apexcharts-flip-y`;(this.barHelpers.arrBorderRadius[c][t]===`bottom`&&n.seriesData.series[c][t]>0||this.barHelpers.arrBorderRadius[c][t]===`top`&&n.seriesData.series[c][t]<0)&&(D=O),m=this.renderSeries(q(K({realIndex:c,pathFill:E.color},E.useRangeColor?{lineFill:E.color}:{}),{j:t,i:r,columnGroupIndex:u,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:i,elSeries:m,x:a,y:o,series:e,barHeight:S,barWidth:C,elDataLabelsWrap:h,elGoalsMarkers:g,type:`bar`,visibleSeries:u,classes:D}))}n.globals.seriesXvalues[c]=d,n.globals.seriesYvalues[c]=f,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),i.add(m)}return i}initialPositions(e,t,n,r,i,a,o){let s=this.w,c,l;if(this.isHorizontal){r=s.layout.gridHeight/s.globals.dataPoints;let e=s.config.plotOptions.bar.barHeight;c=String(e).indexOf(`%`)===-1?parseInt(e,10):r*parseInt(e,10)/100,a=s.globals.padHorizontal+(this.isReversed?s.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),t=(r-c)/2}else{n=s.layout.gridWidth/s.globals.dataPoints,l=n;let t=s.config.plotOptions.bar.columnWidth;s.axisFlags.isXNumeric&&s.globals.dataPoints>1?(n=s.globals.minXDiff/this.xRatio,l=n*parseInt(this.barOptions.columnWidth,10)/100):String(t).indexOf(`%`)===-1?l=parseInt(t,10):l*=parseInt(t,10)/100,i=this.isReversed?this.baseLineY[o]:s.layout.gridHeight-this.baseLineY[o],e=s.globals.padHorizontal+(n-l)/2}let u=s.globals.barGroups.length||1;return{x:e,y:t,yDivision:r,xDivision:n,barHeight:(c??0)/u,barWidth:(l??0)/u,zeroH:i,zeroW:a}}drawStackedBarPaths({indexes:e,barHeight:t,strokeWidth:n,zeroW:r,x:i,y:a,columnGroupIndex:o,seriesGroup:s,yDivision:c,elSeries:l}){let u=this.w,d=a+o*t,f,p=e.i,m=e.j,h=e.realIndex,g=e.translationsIndex,_=0;for(let e=0;e<this.groupCtx.prevXF.length;e++)_+=this.groupCtx.prevXF[e][m];let v=p;if(u.config.series[h].name&&(v=s.indexOf(u.config.series[h].name)),v>0){let e=r;this.groupCtx.prevXVal[v-1][m]<0?e=this.series[p]?.[m]>=0?this.groupCtx.prevX[v-1][m]+_-(this.isReversed?_:0)*2:this.groupCtx.prevX[v-1][m]:this.groupCtx.prevXVal[v-1][m]>=0&&(e=this.series[p]?.[m]>=0?this.groupCtx.prevX[v-1][m]:this.groupCtx.prevX[v-1][m]-_+(this.isReversed?_:0)*2),f=e}else f=r;i=this.series[p]?.[m]===null?f:f+this.series[p]?.[m]/this.invertedYRatio-(this.isReversed?this.series[p]?.[m]/this.invertedYRatio:0)*2;let y=this.barHelpers.getBarpaths({barYPosition:d,barHeight:t,x1:f,x2:i,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:e.realIndex,seriesGroup:s,i:p,j:m,w:u});
1162return this.barHelpers.barBackground({j:m,i:p,y1:d,y2:t,elSeries:l}),a+=c,{pathTo:y.pathTo,pathFrom:y.pathFrom,goalX:this.barHelpers.getGoalValues(`x`,r,null,p,m,g),barXPosition:f,barYPosition:d,x:i,y:a}}drawStackedColumnPaths({indexes:e,x:t,y:n,xDivision:r,barWidth:i,zeroH:a,columnGroupIndex:o,seriesGroup:s,elSeries:c}){let l=this.w,u=e.i,d=e.j,f=e.bc,p=e.realIndex,m=e.translationsIndex;if(l.axisFlags.isXNumeric){let e=l.seriesData.seriesX[p][d];e||=0,t=(e-l.globals.minX)/this.xRatio-i/2*l.globals.barGroups.length}let h=t+o*i,g,_=0;for(let e=0;e<this.groupCtx.prevYF.length;e++)_+=isNaN(this.groupCtx.prevYF[e][d])?0:this.groupCtx.prevYF[e][d];let v=u;if(s&&(v=s.indexOf(l.seriesData.seriesNames[p])),v>0&&!l.axisFlags.isXNumeric||v>0&&l.axisFlags.isXNumeric&&l.seriesData.seriesX[p-1][d]===l.seriesData.seriesX[p][d]){let e,t,n=Math.min(this.yRatio.length+1,p+1);if(this.groupCtx.prevY[v-1]!==void 0&&this.groupCtx.prevY[v-1].length){for(let e=1;e<n;e++)if(!isNaN(this.groupCtx.prevY[v-e]?.[d])){t=this.groupCtx.prevY[v-e][d];break}}for(let r=1;r<n;r++)if(this.groupCtx.prevYVal[v-r]?.[d]<0){e=this.series[u]?.[d]>=0?t-_+(this.isReversed?_:0)*2:t;break}else if(this.groupCtx.prevYVal[v-r]?.[d]>=0){e=this.series[u]?.[d]>=0?t:t+_-(this.isReversed?_:0)*2;break}e===void 0&&(e=l.layout.gridHeight),g=this.groupCtx.prevYF[0]?.every(e=>e===0)&&this.groupCtx.prevYF.slice(1,v).every(e=>e.every(e=>isNaN(e)))?a:e}else g=a;n=this.series[u]?.[d]?g-this.series[u]?.[d]/this.yRatio[m]+(this.isReversed?this.series[u]?.[d]/this.yRatio[m]:0)*2:g;let y=this.barHelpers.getColumnPaths({barXPosition:h,barWidth:i,y1:g,y2:n,yRatio:this.yRatio[m],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:s,realIndex:e.realIndex,i:u,j:d,w:l});return this.barHelpers.barBackground({bc:f,j:d,i:u,x1:h,x2:i,elSeries:c}),{pathTo:y.pathTo,pathFrom:y.pathFrom,goalY:this.barHelpers.getGoalValues(`y`,null,a,u,d,0),barXPosition:h,x:l.axisFlags.isXNumeric?t:t+r,y:n}}};function hx({w:e,points:t,seedA:n,seedB:r,center:i,halfExtent:a,alongFn:o,isHorizontal:s,options:c,clampAt:l}){let u=c;if(!u||u.show===!1||!t||!t.length)return[];let d=u.maxPoints||3e3,f=t.length>d?Math.ceil(t.length/d):1,p=u.size==null?2.5:u.size,m=a*(u.jitter==null?.5:u.jitter),h=u.constrainToViolin!==!1&&typeof l==`function`,g=u.shape===`square`,_=u.colorScale,v=_&&Array.isArray(_.colors)&&_.colors.length>0,y=v?Math.max(2,_.steps||24):1,b=v&&_.min!=null?_.min:e.globals.minY,x=(v&&_.max!=null?_.max:e.globals.maxY)-b||1,S=v?Array(y).fill(``):[``];for(let e=0;e<t.length;e+=f){let a=t[e],c=o(a),u=(yx(n*7919+r*100003+e)-.5)*2*m;if(h){let e=l(a);u>e&&(u=e),u<-e&&(u=-e)}let d=s?c:i+u,f=s?i+u:c,_=g?xx(d,f,p):bx(d,f,p);if(v){let e=(a-b)/x;e<0&&(e=0),e>1&&(e=1),S[Math.round(e*(y-1))]+=_}else S[0]+=_}if(!v)return S[0]?[{fill:null,d:S[0]}]:[];let C=[];for(let e=0;e<y;e++)S[e]&&C.push({fill:vx(_.colors,e/(y-1)),d:S[e]});return C}function gx({graphics:e,w:t,elSeries:n,pointsByCat:r,options:i,distributed:a,realIndex:o,wrapClass:s,pointClass:c}){if(!i||i.show===!1||!r.length)return;let l=i.opacity==null?.9:i.opacity,u=i.strokeColor==null?`#fff`:i.strokeColor,d=i.strokeWidth==null?1:i.strokeWidth,f=t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged,p=e.group({class:f?`${s} apexcharts-element-hidden`:s});f&&t.globals.delayedElements.push({el:p.node}),r.forEach(({groups:n,j:r})=>{let s=a?t.globals.colors[r]:t.globals.colors[o],f=i.fillColor,m=f===`series`?s:f===`series-dark`?_x(s,.45):f||_x(s,.45);n.forEach(n=>{let i=e.drawPath({d:n.d,fill:n.fill==null?m:n.fill,stroke:d>0?u:`none`,strokeWidth:d,fillOpacity:l,classes:c});i.attr(`data:realIndex`,o),i.attr(`j`,r),i.attr(`clip-path`,`url(#gridRectBarMask${t.globals.cuid})`),i.node.style.pointerEvents=`none`,p.add(i)})}),n.add(p)}function _x(e,t){let n=Z.parseHex(e);if(!n)return e;let r=Math.max(0,1-t);return`rgb(${Math.round(n[0]*r)},${Math.round(n[1]*r)},${Math.round(n[2]*r)})`}function vx(e,t){if(!e.length)return`#000`;if(e.length===1)return e[0];let n=Math.max(0,Math.min(1,t))*(e.length-1),r=Math.floor(n),i=n-r,a=Z.parseHex(e[r])||[0,0,0],o=Z.parseHex(e[Math.min(r+1,e.length-1)])||a,s=(e,t)=>Math.round(e+(t-e)*i);return`rgb(${s(a[0],o[0])},${s(a[1],o[1])},${s(a[2],o[2])})`}function yx(e){let t=(e^2654435769)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}function bx(e,t,n){return`M ${e-n} ${t} a ${n} ${n} 0 1 0 ${2*n} 0 a ${n} ${n} 0 1 0 ${-2*n} 0 `}
1162function xx(e,t,n){return`M ${e-n} ${t-n} h ${2*n} v ${2*n} h ${-2*n} z `}var Sx=class extends px{draw(e,t,n){let r=this.w,i=new Q(this.w),a=r.globals.comboCharts?t:r.config.chart.type,o=new qv(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=r.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type===`ohlc`,this.coreUtils=new Nv(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let s=i.group({class:`apexcharts-${a}-series apexcharts-plot-series`});for(let t=0;t<e.length;t++){this.isBoxPlot=r.config.chart.type===`boxPlot`||r.config.series[t].type===`boxPlot`;let a,c,l=[],u=[],d=r.globals.comboCharts?n[t]:t,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=i.group({class:`apexcharts-series`,seriesName:Z.escapeString(r.seriesData.seriesNames[d]),rel:t+1,"data:realIndex":d});dy.addCollapsedClassToSeries(this.w,p,d),e[t].length>0&&(this.visibleI+=1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],m=d);let{y:h,barHeight:g,yDivision:_,zeroW:v,x:y,barWidth:b,xDivision:x,zeroH:S}=this.barHelpers.initialPositions(d);c=h,a=y,u.push(a+(b??0)/2);let C=i.group({class:`apexcharts-datalabels`,"data:realIndex":d}),w=i.group({class:`apexcharts-bar-goals-markers`}),T=this.isBoxPlot?this.boxOptions.points:null,E=[],D=r.layout.gridWidth,O=b??0;for(let n=0;n<r.globals.dataPoints;n++){let i=this.barHelpers.getStrokeWidth(t,n,d),s=null,h={indexes:{i:t,j:n,realIndex:d,translationsIndex:m},x:a,y:c,strokeWidth:i,elSeries:p};if(s=this.isHorizontal?this.drawHorizontalBoxPaths(q(K({},h),{yDivision:_,barHeight:g,zeroW:v})):this.drawVerticalBoxPaths(q(K({},h),{xDivision:x,barWidth:b,zeroH:S,cullBounds:{lo:-O,hi:D+O}})),c=s.y,a=s.x,n>0&&u.push(a+(b??0)/2),l.push(c),s.culled)continue;let y=this.barHelpers.drawGoalLine({barXPosition:s.barXPosition,barYPosition:s.barYPosition,goalX:s.goalX,goalY:s.goalY,barHeight:g,barWidth:b});if(y&&w.add(y),s.pathTo.forEach((l,u)=>{let m=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?s.color[u]:r.globals.stroke.colors[t],h=o.fillPath({seriesNumber:d,dataPointIndex:n,color:s.color[u],value:e[t][n]});this.renderSeries({realIndex:d,pathFill:h,lineFill:m,j:n,i:t,pathFrom:s.pathFrom,pathTo:l,strokeWidth:i,elSeries:p,x:a,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,elGoalsMarkers:w,visibleSeries:this.visibleI,type:r.config.chart.type})}),T&&T.show!==!1){let e=r.candleData.seriesBoxPoints[d]?.[n];if(e&&e.length){let t=e=>this.coreUtils.getLogValAtSeriesIndex(e,d),i,a,o;if(this.isHorizontal){let e=this.invertedYRatio,n=g??0,r=v??0;i=s.barYPosition+n/2,a=n/2,o=n=>r+t(n)/e}else{let e=this.yRatio[m],n=b??0,r=S??0;i=s.barXPosition+n/2,a=n/2,o=n=>r-t(n)/e}let c=hx({w:r,points:e,seedA:d,seedB:n,center:i,halfExtent:a,alongFn:o,isHorizontal:this.isHorizontal,options:T});c.length&&E.push({groups:c,j:n})}}}
1162T&&gx({graphics:i,w:r,elSeries:p,pointsByCat:E,options:T,distributed:r.config.plotOptions.bar.distributed,realIndex:d,wrapClass:`apexcharts-boxPlot-points-wrap`,pointClass:`apexcharts-boxPlot-points`}),r.globals.seriesXvalues[d]=u,r.globals.seriesYvalues[d]=l,s.add(p)}return s}drawVerticalBoxPaths({indexes:e,x:t,xDivision:n,barWidth:r,zeroH:i,strokeWidth:a,cullBounds:o=null}){let s=this.w,c=new Q(this.w),l=e.i,u=e.j,{colors:d}=s.config.plotOptions.candlestick,{colors:f}=this.boxOptions,p=e.realIndex,m=e=>Array.isArray(e)?e[p]:e,h=m(d.upward),g=m(d.downward),_=this.yRatio[e.translationsIndex],v=this.getOHLCValue(p,u),y=i,b=i,x=v.o<v.c?[h]:[g];this.isBoxPlot&&(x=[m(f.lower),m(f.upper)]);let S=Math.min(v.o,v.c),C=Math.max(v.o,v.c),w=v.m;s.axisFlags.isXNumeric&&(t=(s.seriesData.seriesX[p][u]-s.globals.minX)/this.xRatio-r/2);let T=t+r*this.visibleI;if(this.series[l]?.[u]===void 0||this.series[l]?.[u]===null?(S=i,C=i):(S=i-S/_,C=i-C/_,y=i-v.h/_,b=i-v.l/_,w=i-v.m/_),o&&(T+r<o.lo||T>o.hi))return{pathTo:null,pathFrom:null,x:s.axisFlags.isXNumeric?t:t+n,y:C,barXPosition:T,color:x,culled:!0};let E;if(this.isOHLC){let e=T+r/2,t=i-v.o/_,n=i-v.c/_;E=[c.move(e,y)+c.line(e,b)+c.move(e,t)+c.line(T,t)+c.move(e,n)+c.line(T+r,n)]}else E=this.isBoxPlot?[c.move(T,S)+c.line(T+r/2,S)+c.line(T+r/2,y)+c.line(T+r/4,y)+c.line(T+r-r/4,y)+c.line(T+r/2,y)+c.line(T+r/2,S)+c.line(T+r,S)+c.line(T+r,w)+c.line(T,w)+c.line(T,S+a/2),c.move(T,w)+c.line(T+r,w)+c.line(T+r,C)+c.line(T+r/2,C)+c.line(T+r/2,b)+c.line(T+r-r/4,b)+c.line(T+r/4,b)+c.line(T+r/2,b)+c.line(T+r/2,C)+c.line(T,C)+c.line(T,w)+`z`]:[c.move(T,C)+c.line(T+r/2,C)+c.line(T+r/2,y)+c.line(T+r/2,C)+c.line(T+r,C)+c.line(T+r,S)+c.line(T+r/2,S)+c.line(T+r/2,b)+c.line(T+r/2,S)+c.line(T,S)+c.line(T,C-a/2)];let D;return D=s.globals.previousPaths.length>0?this.getPreviousPath(p,u,E[0]):c.move(T+r/2,S)+c.move(T,S),s.axisFlags.isXNumeric||(t+=n),{pathTo:E,pathFrom:D,x:t,y:C,goalY:this.barHelpers.getGoalValues(`y`,null,i,l,u,e.translationsIndex),barXPosition:T,color:x}}drawHorizontalBoxPaths({indexes:e,y:t,yDivision:n,barHeight:r,zeroW:i,strokeWidth:a}){let o=this.w,s=new Q(this.w),c=e.i,l=e.j,u=e.realIndex,{colors:d}=o.config.plotOptions.candlestick,{colors:f}=this.boxOptions,p=e=>Array.isArray(e)?e[u]:e,m=this.invertedYRatio,h=this.getOHLCValue(u,l),g=h.o<h.c?[p(d.upward)]:[p(d.downward)];this.isBoxPlot&&(g=[p(f.lower),p(f.upper)]);let _=i,v=i,y=Math.min(h.o,h.c),b=Math.max(h.o,h.c),x=h.m;o.axisFlags.isXNumeric&&(t=(o.seriesData.seriesX[u][l]-o.globals.minX)/this.invertedXRatio-r/2);let S=t+r*this.visibleI;this.series[c]?.[l]===void 0||this.series[c]?.[l]===null?(y=i,b=i):(y=i+y/m,b=i+b/m,_=i+h.h/m,v=i+h.l/m,x=i+h.m/m);let C=[s.move(y,S)+s.line(y,S+r/2)+s.line(_,S+r/2)+s.line(_,S+r/2-r/4)+s.line(_,S+r/2+r/4)+s.line(_,S+r/2)+s.line(y,S+r/2)+s.line(y,S+r)+s.line(x,S+r)+s.line(x,S)+s.line(y+a/2,S),s.move(x,S)+s.line(x,S+r)+s.line(b,S+r)+s.line(b,S+r/2)+s.line(v,S+r/2)+s.line(v,S+r-r/4)+s.line(v,S+r/4)+s.line(v,S+r/2)+s.line(b,S+r/2)+s.line(b,S)+s.line(x,S)+`z`],w;return w=o.globals.previousPaths.length>0?this.getPreviousPath(u,l,C[0]):s.move(y,S+r/2)+s.move(y,S),o.axisFlags.isXNumeric||(t+=n),{pathTo:C,pathFrom:w,x:b,y:t,goalX:this.barHelpers.getGoalValues(`x`,i,null,c,l,0),barYPosition:S,color:g}}getOHLCValue(e,t){let n=this.w,r=this.coreUtils,i=n=>n[e]&&n[e][t]!=null?r.getLogValAtSeriesIndex(n[e][t],e):0,a=i(n.candleData.seriesCandleH),o=i(n.candleData.seriesCandleO),s=i(n.candleData.seriesCandleM),c=i(n.candleData.seriesCandleC),l=i(n.candleData.seriesCandleL);return{o:this.isBoxPlot?a:o,h:this.isBoxPlot?o:a,m:s,l:this.isBoxPlot?c:l,c:this.isBoxPlot?l:c}}},Cx=e=>{let t=Dx(e),n=e.length-1,r=[],i,a,o,s;for(let r=0;r<n;r++)o=Ex(e[r],e[r+1]),Math.abs(o)<1e-6?t[r]=t[r+1]=0:(i=t[r]/o,a=t[r+1]/o,s=i*i+a*a,s>9&&(s=o*3/Math.sqrt(s),t[r]=s*i,t[r+1]=s*a));for(let i=0;i<=n;i++)s=(e[Math.min(n,i+1)][0]-e[Math.max(0,i-1)][0])/(6*(1+t[i]*t[i])),r.push([s||0,t[i]*s||0]);return r},wx=e=>{let t=``;for(let n=0;n<e.length;n++){let r=e[n],i=r.length;i>4?(t+=`C${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`,t+=`, ${r[4]}, ${r[5]}`):i>2&&(t+=`S${r[0]}, ${r[1]}`,t+=`, ${r[2]}, ${r[3]}`)}return t},Tx={points(e){let t=Cx(e),n=e[1],r=e[0],i=[],a=t[1],o=t[0];i.push(r,[r[0]+o[0],r[1]+o[1],n[0]-a[0],n[1]-a[1],n[0],n[1]]);for(let n=2,r=t.length;n<r;n++){let r=e[n],a=t[n];i.push([r[0]-a[0],r[1]-a[1],r[0],r[1]])}return i},slice(e,t,n){let r=e.slice(t,n);if(t){if(n-t>1&&r[1].length<6){let e=r[0].length;r[1]=[r[0][e-2]*2-r[0][e-4],r[0][e-1]*2-r[0][e-3]].concat(r[1])}r[0]=r[0].slice(-2)}return r}};function Ex(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Dx(e){let t=[],n=e[0],r=e[1],i=t[0]=Ex(n,r),a=1;for(let o=e.length-1;a<o;a++)n=r,r=e[a+1],t[a]=(i+(i=Ex(n,r)))*.5;return t[a]=i,t}var Ox=class extends px{draw(e,t,n){let r=this.w,i=new Q(this.w),a=new qv(this.w);this.violinOptions=r.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||`individual`,this.distributed=r.config.plotOptions.bar.distributed,this.isHorizontal=r.config.plotOptions.bar.horizontal,this.coreUtils=new Nv(this.w),e=this.coreUtils.getLogSeries(e),this.series=e,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);let o=i.group({class:`apexcharts-violin-series apexcharts-plot-series`});for(let t=0;t<e.length;t++){let s,c,l=[],u=[],d=r.globals.comboCharts?n[t]:t,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(d),p=i.group({class:`apexcharts-series`,seriesName:Z.escapeString(r.seriesData.seriesNames[d]),rel:t+1,"data:realIndex":d});dy.addCollapsedClassToSeries(this.w,p,d),e[t].length>0&&(this.visibleI+=1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],m=d);let{y:h,barHeight:g,yDivision:_,zeroW:v,x:y,barWidth:b,xDivision:x,zeroH:S}=this.barHelpers.initialPositions(d);c=h,s=y,u.push(s+(b??0)/2);let C=i.group({class:`apexcharts-datalabels`,"data:realIndex":d});this.seriesMaxWeight=0,this.normalize===`group`&&(r.violinData.seriesViolinDensity[d]||[]).forEac
1162h(e=>{e&&e.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=e.maxWeight)});let w=[];for(let n=0;n<r.globals.dataPoints;n++){let i=this.barHelpers.getStrokeWidth(t,n,d),o=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:t,j:n,realIndex:d,translationsIndex:m},y:c,yDivision:_,barHeight:g,zeroW:v}):this.drawVerticalViolin({indexes:{i:t,j:n,realIndex:d,translationsIndex:m},x:s,xDivision:x,barWidth:b,zeroH:S});s=o.x,c=o.y,n>0&&u.push(o.center),l.push(o.alongRepresentative);let h=this.buildPointsSubPath({realIndex:d,j:n,center:o.center,halfExtent:o.halfExtent,alongFn:o.alongFn,density:o.density,maxWeight:o.maxWeight});h.length&&w.push({groups:h,j:n});let y=a.fillPath({seriesNumber:this.distributed?n:d,dataPointIndex:n,color:this.distributed?r.globals.colors[n]:void 0,value:e[t][n]});this.renderSeries({realIndex:d,pathFill:y,lineFill:r.globals.stroke.colors[d],j:n,i:t,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:i,elSeries:p,x:s,y:c,series:e,columnGroupIndex:f,barHeight:g,barWidth:b,elDataLabelsWrap:C,visibleSeries:this.visibleI,type:`violin`});let T=p.node.querySelector(`path.apexcharts-violin-area[j='${n}']`);T&&isFinite(o.alongRepresentative)&&T.setAttribute(this.isHorizontal?`cx`:`cy`,`${o.alongRepresentative}`)}
1162gx({graphics:i,w:r,elSeries:p,pointsByCat:w,options:this.pointsOptions,distributed:this.distributed,realIndex:d,wrapClass:`apexcharts-violin-points-wrap`,pointClass:`apexcharts-violin-points`}),r.globals.seriesXvalues[d]=u,r.globals.seriesYvalues[d]=l,o.add(p)}return o}drawVerticalViolin({indexes:e,x:t,xDivision:n,barWidth:r,zeroH:i}){let a=this.w,{realIndex:o,j:s,translationsIndex:c}=e,l=this.yRatio[c];a.axisFlags.isXNumeric&&(t=(a.seriesData.seriesX[o][s]-a.globals.minX)/this.xRatio-r/2);let u=t+r*this.visibleI+r/2,d=r/2,f=this.getDensity(o,s),p=this.effectiveMaxWeight(f),m=e=>i-this.logVal(e,o)/l,h=this.buildBodyPath({nodes:f.nodes,center:u,halfExtent:d,maxWeight:p,vertical:!0,alongFn:m,collapsed:!1}),g;return g=a.globals.previousPaths.length>0?this.getPreviousPath(o,s,h):this.buildBodyPath({nodes:f.nodes,center:u,halfExtent:d,maxWeight:p,vertical:!0,alongFn:m,collapsed:!0}),a.axisFlags.isXNumeric||(t+=n),{pathTo:h,pathFrom:g,x:t,y:i,center:u,halfExtent:d,alongFn:m,density:f,maxWeight:p,alongRepresentative:m(this.series[e.i][s]??0)}}drawHorizontalViolin({indexes:e,y:t,yDivision:n,barHeight:r,zeroW:i}){let a=this.w,{realIndex:o,j:s}=e,c=this.invertedYRatio;a.axisFlags.isXNumeric&&(t=(a.seriesData.seriesX[o][s]-a.globals.minX)/this.invertedXRatio-r/2);let l=t+r*this.visibleI+r/2,u=r/2,d=this.getDensity(o,s),f=this.effectiveMaxWeight(d),p=e=>i+this.logVal(e,o)/c,m=this.buildBodyPath({nodes:d.nodes,center:l,halfExtent:u,maxWeight:f,vertical:!1,alongFn:p,collapsed:!1}),h;return h=a.globals.previousPaths.length>0?this.getPreviousPath(o,s,m):this.buildBodyPath({nodes:d.nodes,center:l,halfExtent:u,maxWeight:f,vertical:!1,alongFn:p,collapsed:!0}),a.axisFlags.isXNumeric||(t+=n),{pathTo:m,pathFrom:h,x:i,y:t,center:l,halfExtent:u,alongFn:p,maxWeight:f,density:d,alongRepresentative:p(this.series[e.i][s]??0)}}getDensity(e,t){let n=this.w.violinData.seriesViolinDensity[e]?.[t];if(!n||!n.values.length)return{nodes:[],maxWeight:0};let r=n.values.map((e,t)=>t);r.sort((e,t)=>n.values[e]-n.values[t]);let i=[],a=null;for(let e of r){let t=n.values[e];(a===null||t!==a)&&(i.push({v:t,w:n.weights[e]}),a=t)}return{nodes:i,maxWeight:n.maxWeight}}effectiveMaxWeight(e){return this.normalize===`group`&&this.seriesMaxWeight>0?this.seriesMaxWeight:e.maxWeight}buildBodyPath({nodes:e,center:t,halfExtent:n,maxWeight:r,vertical:i,alongFn:a,collapsed:o}){let s=new Q(this.w);if(e.length===0){let e=a(0);return i?s.move(t,e)+s.line(t,e):s.move(e,t)+s.line(e,t)}let c=e=>{if(o||r<=0)return 0;let t=e/r*n*this.bandwidthScale;return Math.min(n,Math.max(0,t))},l=[],u=[];for(let n=0;n<e.length;n++){let r=a(e[n].v),o=c(e[n].w);i?(l.push([t+o,r]),u.push([t-o,r])):(l.push([r,t+o]),u.push([r,t-o]))}return u.reverse(),this.smoothSegment(l,i,!1)+this.smoothSegment(u,i,!0)+`z`}smoothSegment(e,t,n){let r=new Q(this.w),i=e[0],a=n?r.line(i[0],i[1]):r.move(i[0],i[1]);if(e.length<3||!this.strictlyMonotonic(e,t)){for(let t=1;t<e.length;t++)a+=r.line(e[t][0],e[t][1]);return a}let o=e.map(([e,n])=>t?[n,e]:[e,n]),s=Tx.points(o),c=t?s.map(kx):s;return a+=wx(c),a}strictlyMonotonic(e,t){let n=+!!t;for(let t=1;t<e.length;t++)if(e[t][n]===e[t-1][n])return!1;return!0}buildPointsSubPath({realIndex:e,j:t,center:n,halfExtent:r,alongFn:i,density:a,maxWeight:o}){return hx({w:this.w,points:this.w.violinData.seriesViolinPoints[e]?.[t],seedA:e,seedB:t,center:n,halfExtent:r,alongFn:i,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:e=>this.halfWidthAtValue(e,a,r,o)})}halfWidthAtValue(e,t,n,r){let{nodes:i}=t,a=r??t.maxWeight;if(!i.length||a<=0)return 0;let o=e=>Math.min(n,e/a*n*this.bandwidthScale);if(e<=i[0].v)return o(i[0].w);if(e>=i[i.length-1].v)return o(i[i.length-1].w);for(let t=1;t<i.length;t++)if(e<=i[t].v){let n=i[t-1],r=i[t],a=r.v===n.v?0:(e-n.v)/(r.v-n.v);return o(n.w+(r.w-n.w)*a)}return 0}logVal(e,t){return this.coreUtils.getLogValAtSeriesIndex(e,t)}};function kx(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(e[n+1],e[n]);return t}var Ax=class{constructor(e,t){this.ctx=t,this.w=e}checkColorRange(){let e=this.w,t=!1,n=e.config.plotOptions[e.config.chart.type];return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(e=>{e.from<=0&&(t=!0)}),t}getShadeColor(e,t,n,r){let i=this.w,a=1,o=i.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,n);i.globals.hasNegs||r?a=i.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(o*1.25):(1-s.percent/100)*(o*1.25):s.percent<=0?1-(1+s.percent/100)*o:(1-s.percent/100)*o:(a=1-s.percent/100,e===`treemap`&&(a=(1-s.percent/100)*(o*1.25)));
1162let c=s.color,l=new Z;if(i.config.plotOptions[e].enableShades){if(this.w.config.theme.mode===`dark`){let e=l.shadeColor(a*-1,s.color);c=Z.hexToRgba(Z.isColorHex(e)?e:Z.rgb2hex(e),i.config.fill.opacity)}else{let e=l.shadeColor(a,s.color);c=Z.hexToRgba(Z.isColorHex(e)?e:Z.rgb2hex(e),i.config.fill.opacity)}}return{color:c,colorProps:s}}determineColor(e,t,n){let r=this.w,i=r.seriesData.series[t][n],a=r.config.plotOptions[e],o=a.colorScale.inverse?n:t;a.distributed&&r.config.chart.type===`treemap`&&(o=n);let s=r.globals.colors[o],c=null,l=Math.min(...r.seriesData.series[t]),u=Math.max(...r.seriesData.series[t]);!a.distributed&&e===`heatmap`&&(l=r.globals.minY,u=r.globals.maxY),a.colorScale.min!==void 0&&(l=a.colorScale.min<r.globals.minY?a.colorScale.min:r.globals.minY,u=a.colorScale.max>r.globals.maxY?a.colorScale.max:r.globals.maxY);let d=Math.abs(u)+Math.abs(l),f=d===0?0:100*i/d;return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(e=>{if(i>=e.from&&i<=e.to){s=e.color,c=e.foreColor?e.foreColor:null,l=e.from,u=e.to;let t=Math.abs(u)+Math.abs(l);f=t===0?0:100*i/t}}),{color:s,foreColor:c,percent:f}}calculateDataLabels({text:e,x:t,y:n,i:r,j:i,colorProps:a,fontSize:o}){let s=this.w.config.dataLabels,c=new Q(this.w),l=new Xv(this.w,this.ctx),u=null;if(s.enabled){u=c.group({class:`apexcharts-data-labels`});let d=s.offsetX,f=s.offsetY,p=t+d,m=n+parseFloat(s.style.fontSize)/3+f;l.plotDataLabelsText({x:p,y:m,text:e,i:r,j:i,color:a.foreColor,parent:u,fontSize:o,dataLabelsConfig:s})}return u}},jx=class{constructor(e,t,n){this.ctx=t,this.w=e,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Ax(e,t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(e){let t=this.w,n=new Q(this.w,this.ctx),r=n.group({class:`apexcharts-heatmap`});r.attr(`clip-path`,`url(#gridRectMask${t.globals.cuid})`);let i=t.layout.gridWidth/t.globals.dataPoints,a=t.layout.gridHeight/t.seriesData.series.length,o=0,s=!1;this.negRange=this.helpers.checkColorRange();let c=e.slice();t.config.yaxis[0].reversed&&(s=!0,c.reverse());for(let l=s?0:c.length-1;s?l<c.length:l>=0;s?l++:l--){let s=n.group({class:`apexcharts-series apexcharts-heatmap-series`,seriesName:Z.escapeString(t.seriesData.seriesNames[l]),rel:l+1,"data:realIndex":l});if(dy.addCollapsedClassToSeries(this.w,s,l),n.setupEventDelegation(s,`.apexcharts-heatmap-rect`),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;new Uv(this.w).dropShadow(s,e,l)}let u=0,d=t.config.plotOptions.heatmap.shadeIntensity,f=0;for(let r=0;r<t.globals.dataPoints;r++){if(t.seriesData.seriesX.length&&!t.globals.allSeriesHasEqualX&&t.globals.minX+t.globals.minXDiff*r<t.seriesData.seriesX[l][f]){u+=i;continue}if(f>=c[l].length)break;let p=this.helpers.getShadeColor(t.config.chart.type,l,f,this.negRange),m=p.color,h=p.colorProps;t.config.fill.type===`image`&&(m=new qv(this.w).fillPath({seriesNumber:l,dataPointIndex:f,opacity:t.globals.hasNegs?h.percent<0?1-(1+h.percent/100):d+h.percent/100:h.percent/100,patternID:Z.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:i,height:t.config.fill.image.height?t.config.fill.image.height:a}));let g=this.rectRadius,_=n.drawRect(u,o,i,a,g);if(_.attr({cx:u,cy:o}),_.node.classList.add(`apexcharts-heatmap-rect`),s.add(_),_.attr({fill:m,i:l,index:l,j:f,val:e[l][f],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?m:t.globals.stroke.colors[0],color:m}),t.config.chart.animations.enabled&&!t.globals.dataChanged){let e=1;t.globals.resized||(e=t.config.chart.animations.speed),this.animateHeatMap(_,u,o,i,a,e,l,f)}if(t.globals.dataChanged){let e=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){e=this.dynamicAnim.speed;let n=t.globals.previousPaths[l]&&t.globals.previousPaths[l][f]&&t.globals.previousPaths[l][f].color;n||=`rgba(255, 255, 255, 0)`,this.animateHeatColor(_,Z.isColorHex(n)?n:Z.rgb2hex(n),Z.isColorHex(m)?m:Z.rgb2hex(m),e)}}let v=t.config.dataLabels.formatter,y=v(t.seriesData.series[l][f],{value:t.seriesData.series[l][f],seriesIndex:l,dataPointIndex:f,w:t}),b=this.helpers.calculateDataLabels({text:y,x:u+i/2,y:o+a/2,i:l,j:f,colorProps:h,series:c});b!==null&&s.add(b),u+=i,f++}o+=a,r.add(s)}let l=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?l.unshift(``):l.push(``),t.globals.yAxisScale[0].result=l,r}animateHeatMap(e,t,n,r,i,a,o=0,s=0){let c=this.w,l=new Hv(this.w),u=c.config.chart.animations.animateGradually,d=u&&u.enabled!==!1,f=0;if(d){let e=((c.seriesData.series||[]).length||1)+(c.globals.dataPoints||1)-2;f=Vv({style:`diagonal`,index:s,row:o,col:s,baseDelay:Math.min(u.delay||0,a*.5/Math.max(1,e))})}
1162l.animateRect(e,{x:t+r/2,y:n+i/2,width:0,height:0},{x:t,y:n,width:r,height:i},a,()=>{l.animationCompleted(e)},f)}animateHeatColor(e,t,n,r){e.attr({fill:t}).animate(r).attr({fill:n})}},Mx=class{constructor(e){this.w=e.w,this.lineCtx=e}sameValueSeriesFix(e,t){let n=this.w;if((n.config.fill.type===`gradient`||n.config.fill.type[e]===`gradient`)&&new Nv(this.lineCtx.w).seriesHaveSameValues(e)){let n=t[e].slice();n[n.length-1]=n[n.length-1]+1e-6,t[e]=n}return t}calculatePoints({series:e,realIndex:t,x:n,y:r,i,j:a,prevY:o}){let s=this.w,c=[],l=[],u=this.lineCtx.categoryAxisCorrection+s.config.markers.offsetX;return s.axisFlags.isXNumeric&&(u=(s.seriesData.seriesX[t][0]-s.globals.minX)/this.lineCtx.xRatio+s.config.markers.offsetX),a===0&&(c.push(u),l.push(Z.isNumber(e[i][0])?o+s.config.markers.offsetY:null)),c.push(n+s.config.markers.offsetX),l.push(Z.isNumber(e[i][a+1])?r+s.config.markers.offsetY:null),{x:c,y:l}}checkPreviousPaths({pathFromLine:e,pathFromArea:t,realIndex:n}){let r=this.w;for(let i=0;i<r.globals.previousPaths.length;i++){let a=r.globals.previousPaths[i];(a.type===`line`||a.type===`area`)&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(n,10)&&(a.type===`line`?(this.lineCtx.appendPathFrom=!1,e=r.globals.previousPaths[i].paths[0].d):a.type===`area`&&(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[i].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[i].paths[1]&&(e=r.globals.previousPaths[i].paths[1].d)))}return{pathFromLine:e,pathFromArea:t}}determineFirstPrevY({i:e,realIndex:t,series:n,prevY:r,lineYPosition:i,translationsIndex:a}){let o=this.w,s=o.config.chart.stacked&&!o.globals.comboCharts||o.config.chart.stacked&&o.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series[t]?.type===`bar`||this.w.config.series[t]?.type===`column`);if(n[e]?.[0]!==void 0)i=s&&e>0?this.lineCtx.prevSeriesY[e-1][0]:this.lineCtx.zeroY,r=i-n[e][0]/this.lineCtx.yRatio[a]+(this.lineCtx.isReversed?n[e][0]/this.lineCtx.yRatio[a]:0)*2;else if(s&&e>0&&n[e][0]===void 0){for(let t=e-1;t>=0;t--)if(n[t][0]!==null&&n[t][0]!==void 0){i=this.lineCtx.prevSeriesY[t][0],r=i;break}}return{prevY:r,lineYPosition:i}}},Nx=class{constructor(e,t,n,r){this.ctx=t,this.w=e,this.xyRatios=n,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=this.w.config.chart.type===`bubble`||this.w.config.chart.type===`scatter`||r,this.scatter=new Yv(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Mx(this),this.markers=new Jv(this.w,this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null}draw(e,t,n,r){let i=this.w,a=new Q(this.w),o=i.globals.comboCharts?t:i.config.chart.type,s=a.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),c=new Nv(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=c.getLogSeries(e),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[];let l=[];for(let t=0;t<e.length;t++){e=this.lineHelpers.sameValueSeriesFix(t,e);let a=i.globals.comboCharts?n[t]:t,s=this.yRatio.length>1?a:0;this._initSerieVariables(e,t,a);let c=[],u=[],d=[],f=i.globals.padHorizontal+this.categoryAxisCorrection,p=[],m=[];dy.addCollapsedClassToSeries(this.w,this.elSeries,a),i.axisFlags.isXNumeric&&i.seriesData.seriesX.length>0&&(f=(i.seriesData.seriesX[a][0]-i.globals.minX)/this.xRatio),d.push(f);let h=f,g,_=h,v=this.zeroY,y=this.zeroY;v=this.lineHelpers.determineFirstPrevY({i:t,realIndex:a,series:e,prevY:v,lineYPosition:0,translationsIndex:s}).prevY,i.config.stroke.curve===`monotoneCubic`&&e[t][0]===null?c.push(null):c.push(v);let b=v,x;o===`rangeArea`&&(x=this.lineHelpers.determineFirstPrevY({i:t,realIndex:a,series:r,prevY:y,lineYPosition:0,translationsIndex:s}),y=x.prevY,g=y,u.push(c[0]===null?null:y));let S=this._calculatePathsFrom({type:o,series:e,i:t,realIndex:a,translationsIndex:s,prevX:_,prevY:v,prevY2:y}),C=[c[0]],w=[u[0]],T={type:o,series:e,realIndex:a,translationsIndex:s,i:t,x:f,y:1,pX:h,pY:b,pathsFrom:S,linePaths:
1162p,areaPaths:m,seriesIndex:n,lineYPosition:0,xArrj:d,yArrj:c,y2Arrj:u,seriesRangeEnd:r},E=this._iterateOverDataPoints(q(K({},T),{iterations:o===`rangeArea`?e[t].length-1:void 0,isRangeStart:!0}));if(o===`rangeArea`){let e=this._calculatePathsFrom({series:r,i:t,realIndex:a,prevX:_,prevY:y}),n=this._iterateOverDataPoints(q(K({},T),{series:r,xArrj:[f],yArrj:C,y2Arrj:w,pY:g,areaPaths:E.areaPaths,pathsFrom:e,iterations:r[t].length-1,isRangeStart:!1})),i=E.linePaths.length/2;for(let e=0;e<i;e++)E.linePaths[e]=n.linePaths[e+i]+E.linePaths[e];E.linePaths.splice(i),E.pathFromLine=n.pathFromLine+E.pathFromLine}else E.pathFromArea+=`z`;this._handlePaths({type:o,realIndex:a,i:t,paths:E}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(i.config.series[0]?.zIndex!==void 0&&l.sort((e,t)=>Number(e.node.getAttribute(`zIndex`))-Number(t.node.getAttribute(`zIndex`))),i.config.chart.stacked)for(let e=l.length-1;e>=0;e--)s.add(l[e]);else for(let e=0;e<l.length;e++)s.add(l[e]);return s}_initSerieVariables(e,t,n){let r=this.w,i=new Q(this.w);this.xDivision=r.layout.gridWidth/(r.globals.dataPoints-+(r.config.xaxis.tickPlacement===`on`)),this.strokeWidth=Array.isArray(r.config.stroke.width)?r.config.stroke.width[n]:r.config.stroke.width;let a=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[n],a=n),this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.zeroY=r.layout.gridHeight-this.baseLineY[a]-(this.isReversed?r.layout.gridHeight:0)+(this.isReversed?this.baseLineY[a]*2:0),this.areaBottomY=this.zeroY,(this.zeroY>r.layout.gridHeight||r.config.plotOptions.area.fillTo===`end`)&&(this.areaBottomY=r.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;let o=r.config.series[n];if(this.elSeries=i.group({class:`apexcharts-series`,zIndex:o.zIndex===void 0?n:o.zIndex,seriesName:Z.escapeString(r.seriesData.seriesNames[n])}),this.elPointsMain=i.group({class:`apexcharts-series-markers-wrap`,"data:realIndex":n}),r.globals.hasNullValues){let e=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[r.layout.gridHeight+r.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});e!==null&&this.elPointsMain.add(e)}this.elDataLabelsWrap=i.group({class:`apexcharts-datalabels`,"data:realIndex":n});let s=e[t].length===r.globals.dataPoints;this.elSeries.attr({"data:longestSeries":s,rel:t+1,"data:realIndex":n}),this.appendPathFrom=!0}_calculatePathsFrom({type:e,series:t,i:n,realIndex:r,translationsIndex:i,prevX:a,prevY:o,prevY2:s}){let c=this.w,l=new Q(this.w),u,d,f,p;if(t[n][0]===null){for(let e=0;e<t[n].length;e++)if(t[n][e]!==null){a=this.xDivision*e,o=this.zeroY-t[n][e]/this.yRatio[i],u=l.move(a,o),d=l.move(a,this.areaBottomY);break}}else u=l.move(a,o),e===`rangeArea`&&(u=l.move(a,s)+l.line(a,o)),d=l.move(a,this.areaBottomY)+l.line(a,o);if(f=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),p=l.move(0,this.areaBottomY)+l.line(0,this.areaBottomY),c.globals.previousPaths.length>0){let e=this.lineHelpers.checkPreviousPaths({pathFromLine:f,pathFromArea:p,realIndex:r});f=e.pathFromLine,p=e.pathFromArea}return{prevX:a,prevY:o,linePath:u,areaPath:d,pathFromLine:f,pathFromArea:p}}_handlePaths({type:e,realIndex:t,i:n,paths:r}){let i=this.w,a=new Q(this.w),o=new qv(this.w);this.prevSeriesY.push(r.yArrj),i.globals.seriesXvalues[t]=r.xArrj,i.globals.seriesYvalues[t]=r.yArrj;let s=i.config.forecastDataPoints;if(s.count>0&&e!==`rangeArea`){let e=i.globals.seriesXvalues[t][i.globals.seriesXvalues[t].length-s.count-1],n=a.drawRect(e,0,i.layout.gridWidth,i.layout.gridHeight,0);i.dom.elForecastMask.appendChild(n.node);let r=a.drawRect(0,0,e,i.layout.gridHeight,0);i.dom.elNonForecastMask.appendChild(r.node)}this.pointsChart||i.globals.delayedElements.push({el:this.elPointsMain.node,index:t});let c={i:n,realIndex:t,animationDelay:n,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${e}`};if(e===`area`){let e=o.fillPath({seriesNumber:t});for(let t=0;t<r.areaPaths.length;t++){let n=a.renderPaths(q(K({},c),{pathFrom:r.pathFromArea,pathTo:r.areaPaths[t],stroke:`none`,strokeWidth:0,strokeLineCap:null,fill:e}));this.elSeries.add(n)}}if(i.config.stroke.show&&!this.pointsChart){let l=null;if(e===`line`)l=o.fillPath({seriesNumber:t,i:n});else if(i.config.stroke.fill.type===`solid`)l=i.globals.stroke.colors[t];else{let e=i.config.fill;i.config.fill=i.config.stroke.fill,l=o.fillPath({seriesNumber:t,i:n}),i.config.fill=e}for(let n=0;n<r.linePaths.length;n++){let u=l;
1162e===`rangeArea`&&(u=o.fillPath({seriesNumber:t}));let d=q(K({},c),{pathFrom:r.pathFromLine,pathTo:r.linePaths[n],stroke:l,strokeWidth:this.strokeWidth,strokeLineCap:i.config.stroke.lineCap,fill:e===`rangeArea`?u:`none`}),f=a.renderPaths(d);if(this.elSeries.add(f),f.attr(`fill-rule`,`evenodd`),s.count>0&&e!==`rangeArea`){let e=a.renderPaths(d);e.node.setAttribute(`stroke-dasharray`,s.dashArray),s.strokeWidth&&e.node.setAttribute(`stroke-width`,s.strokeWidth),this.elSeries.add(e),e.attr(`clip-path`,`url(#forecastMask${i.globals.cuid})`),f.attr(`clip-path`,`url(#nonForecastMask${i.globals.cuid})`)}}}}_iterateOverDataPoints({type:e,series:t,iterations:n,realIndex:r,translationsIndex:i,i:a,x:o,y:s,pX:c,pY:l,pathsFrom:u,linePaths:d,areaPaths:f,seriesIndex:p,lineYPosition:m,xArrj:h,yArrj:g,y2Arrj:_,isRangeStart:v,seriesRangeEnd:y}){let b=this.w,x=new Q(this.w),S=this.yRatio,{prevY:C,linePath:w,areaPath:T,pathFromLine:E,pathFromArea:D}=u,O=Z.isNumber(b.globals.minYArr[r])?b.globals.minYArr[r]:b.globals.minY;n||=b.globals.dataPoints>1?b.globals.dataPoints-1:b.globals.dataPoints;let k=(e,t)=>t-e/S[i]+(this.isReversed?e/S[i]:0)*2,A=s,j=b.config.chart.stacked&&!b.globals.comboCharts||b.config.chart.stacked&&b.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||this.w.config.series[r]?.type===`bar`||this.w.config.series[r]?.type===`column`),M=b.config.stroke.curve;Array.isArray(M)&&(M=Array.isArray(p)?M[p[a]]:M[a]);let N=0,ee,te=this.pointsChart?this._scatterJitterPx(r):null;for(let i=0;i<n&&t[a].length!==0;i++){let u=t[a][i+1]===void 0||t[a][i+1]===null;if(b.axisFlags.isXNumeric){let e=b.seriesData.seriesX[r][i+1];b.seriesData.seriesX[r][i+1]===void 0&&(e=b.seriesData.seriesX[r][n-1]),o=(e-b.globals.minX)/this.xRatio}else o+=this.xDivision;m=j&&a>0&&b.globals.collapsedSeries.length<b.config.series.length-1?this.prevSeriesY[(e=>{for(let t=e;t>0;t--)if(b.globals.collapsedSeriesIndices.indexOf(p?.[t]||t)>-1)t--;else return t;return 0})(a-1)][i+1]:this.zeroY,u?s=k(O,m):(s=k(t[a][i+1],m),e===`rangeArea`&&(A=k(y[a][i+1],m)));let S=o,ne=s;if(te){let e=r*100003+(i+1);te.x&&(S=o+(yx(e*7919+13)-.5)*2*te.x),te.y&&(ne=s+(yx(e*6271+97)-.5)*2*te.y)}h.push(t[a][i+1]===null?null:S),u&&(b.config.stroke.curve===`smooth`||b.config.stroke.curve===`monotoneCubic`)?(g.push(null),_.push(null)):(g.push(ne),_.push(A));let re=this.lineHelpers.calculatePoints({series:t,x:S,y:ne,realIndex:r,i:a,j:i,prevY:C}),ie=this._createPaths({type:e,series:t,i:a,j:i,x:o,y:s,y2:A,xArrj:h,yArrj:g,y2Arrj:_,pX:c,pY:l,pathState:N,segmentStartX:ee,linePath:w,areaPath:T,linePaths:d,areaPaths:f,curve:M,isRangeStart:v});f=ie.areaPaths,d=ie.linePaths,c=ie.pX,l=ie.pY,N=ie.pathState,ee=ie.segmentStartX,T=ie.areaPath,w=ie.linePath,this.appendPathFrom&&!b.globals.hasNullValues&&(M!==`monotoneCubic`||e!==`rangeArea`)&&(E+=x.line(o,this.areaBottomY),D+=x.line(o,this.areaBottomY)),this.handleNullDataPoints(t,re,a,i,r),this._handleMarkersAndLabels({type:e,pointsPos:re,i:a,j:i,realIndex:r,isRangeStart:v})}return{yArrj:g,xArrj:h,pathFromArea:D,areaPaths:f,pathFromLine:E,linePaths:d,linePath:w,areaPath:T}}_handleMarkersAndLabels({type:e,pointsPos:t,isRangeStart:n,i:r,j:i,realIndex:a}){let o=this.w,s=new Xv(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,i,{realIndex:a,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{(o.globals.dataChanged||o.globals.resized)&&o.seriesData.series[r].length>1&&this.elPointsMain.node.classList.add(`apexcharts-element-hidden`);let e=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:a,j:i+1});e!==null&&this.elPointsMain.add(e)}let c=s.drawDataLabel({type:e,isRangeStart:n,pos:t,i:a,j:i+1});c!==null&&this.elDataLabelsWrap.add(c)}_scatterJitterPx(e){let t=this.w,n=t.config.plotOptions.scatter?.jitter;if(!n||!n.enabled||!n.x&&!n.y)return null;let r=t.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,i=this.yRatio.length>1?e:0,a=this.yRatio[i]?1/this.yRatio[i]:0;return{x:(n.x||0)*r,y:(n.y||0)*a}}_createPaths({type:e,series:t,i:n,j:r,x:i,y:a,xArrj:o,yArrj:s,y2:c,y2Arrj:l,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:m,areaPath:h,linePaths:g,areaPaths:_,curve:v,isRangeStart:y}){let b=new Q(this.w),x=this.areaBottomY,S=e===`rangeArea`,C=e===`rangeArea`&&y;switch(v){case`monotoneCubic`:{let e=y?s:l,i=(e,t)=>e.map((e,n)=>[e,t[n]]).filter(e=>e[1]!==null),a=e=>{let t=[],n=0;
1162return e.forEach(e=>{e===null?n>0&&(t.push(n),n=0):n++}),n>0&&t.push(n),t},c=(e,t)=>{let n=a(e),r=[];for(let e=0,i=0;e<n.length;i+=n[e++])r[e]=Tx.slice(t,i,i+n[e]);return r};switch(f){case 0:if(e[r+1]===null)break;f=1;case 1:if(!(S?o.length===t[n].length:r===t[n].length-2))break;case 2:{let t=y?o:o.slice().reverse(),n=y?e:e.slice().reverse(),r=i(t,n),a=r.length>1?Tx.points(r):r,s=[];S&&(C?_=r:s=_.reverse());let l=0,u=0;if(c(n,a).forEach(e=>{l++;let t=wx(e),n=u;u+=e.length;let i=u-1;C?m=b.move(r[n][0],r[n][1])+t:S?m=b.move(s[n][0],s[n][1])+b.line(r[n][0],r[n][1])+t+b.line(s[i][0],s[i][1]):(m=b.move(r[n][0],r[n][1])+t,h=m+b.line(r[i][0],x)+b.line(r[n][0],x)+`z`,_.push(h)),g.push(m)}),S&&l>1&&!C){let e=g.slice(l).reverse();g.splice(l),e.forEach(e=>g.push(e))}f=0;break}}break}case`smooth`:{let e=(i-u)*.35;if(t[n][r]===null)f=0;else switch(f){case 0:if(p=u,m=C?b.move(u,l[r])+b.line(u,d):b.move(u,d),h=b.move(u,d),t[n][r+1]===null||t[n][r+1]===void 0){g.push(m),_.push(h);break}if(f=1,r<t[n].length-2){let t=b.curve(u+e,d,i-e,a,i,a);m+=t,h+=t;break}case 1:if(t[n][r+1]===null)m+=C?b.line(u,c):b.move(u,d),h+=b.line(u,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1;else{let o=b.curve(u+e,d,i-e,a,i,a);m+=o,h+=o,r>=t[n].length-2&&(C&&(m+=b.curve(i,a,i,a,i,c)+b.move(i,c)),h+=b.curve(i,a,i,a,i,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1)}}u=i,d=a;break}default:{let e=(e,t,n)=>{let r=``;switch(e){case`stepline`:r=b.line(t,null,`H`)+b.line(null,n,`V`);break;case`linestep`:r=b.line(null,n,`V`)+b.line(t,null,`H`);break;case`straight`:r=b.line(t,n)}return r};if(t[n][r]===null)f=0;else switch(f){case 0:if(p=u,m=C?b.move(u,l[r])+b.line(u,d):b.move(u,d),h=b.move(u,d),t[n][r+1]===null||t[n][r+1]===void 0){g.push(m),_.push(h);break}if(f=1,r<t[n].length-2){let t=e(v,i,a);m+=t,h+=t;break}case 1:if(t[n][r+1]===null)m+=C?b.line(u,c):b.move(u,d),h+=b.line(u,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1;else{let o=e(v,i,a);m+=o,h+=o,r>=t[n].length-2&&(C&&(m+=b.line(i,c)),h+=b.line(i,x)+b.line(p,x)+`z`,g.push(m),_.push(h),f=-1)}}u=i,d=a;break}}return{linePaths:g,areaPaths:_,pX:u,pY:d,pathState:f,segmentStartX:p,linePath:m,areaPath:h}}handleNullDataPoints(e,t,n,r,i){let a=this.w;if(e[n][r]===null&&a.config.markers.showNullDataPoints||e[n].length===1){let e=this.strokeWidth-a.config.markers.strokeWidth/2;e>0||(e=0);let n=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:i,j:r+1,pSize:e,alwaysDrawMarker:!0});n!==null&&this.elPointsMain.add(n)}}},Px=class{constructor(e){this.w=e}drawYAxisTexts(e,t,n,r){let i=this.w,a=i.config.yaxis[0],o=i.formatters.yLabelFormatters[0];return new Q(this.w).drawText({x:e+a.labels.offsetX,y:t+a.labels.offsetY,text:o(r,n),textAnchor:`middle`,fontSize:a.labels.style.fontSize,fontFamily:a.labels.style.fontFamily,foreColor:Array.isArray(a.labels.style.colors)?a.labels.style.colors[n]:a.labels.style.colors})}getMaxLabelWidth(e,{fontSize:t,fontFamily:n}={}){let r=new Q(this.w),i=0;return e.forEach(e=>{if(e==null||e===``)return;let a=r.getTextRects(`${e}`,t||`12px`,n,``);i=Math.max(i,a.width)}),i}drawExternalLabel({lines:e,lineHeight:t,anchor:n,elbow:r,labelX:i,labelY:a,side:o,connector:s,style:c,foreColor:l}){let u=new Q(this.w),d=u.group({class:`apexcharts-pie-name-label-group`});if(s.show){let e=`M ${n.x} ${n.y} L ${r.x} ${r.y} L ${i} ${a}`,t=u.drawPath({d:e,stroke:s.color,strokeWidth:s.width,fill:`none`,strokeLinecap:`round`});t.node.classList.add(`apexcharts-pie-label-connector`),d.add(t)}let f=o===`right`?i+4:i-4,p=e.length,m=a-(p-1)*t/2,h=u.drawText({x:f,y:m,text:p===1?e[0]:e,textAnchor:o===`right`?`start`:`end`,fontSize:c.fontSize,fontFamily:c.fontFamily,fontWeight:c.fontWeight,foreColor:l,dominantBaseline:`central`,cssClass:`apexcharts-pie-name-label`});if(p>1){let e=h.node.getElementsByTagName(`tspan`);for(let n=0;n<e.length;n++)e[n].setAttribute(`x`,`${f}`),e[n].setAttribute(`dy`,n===0?`0`:`${t}`)}return d.add(h),d}},Fx=class{constructor(e,t){this.ctx=t,this.w=e,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=e.globals.stroke.colors===void 0?e.globals.colors:e.globals.stroke.colors,this.defaultSize=Math.min(e.layout.gridWidth,e.layout.gridHeight),this.centerY=this.defaultSize/2,this.centerX=e.layout.gridWidth/2,this.fullAngle=e.config.chart.type===`radialBar`?360:Math.abs(e.config.plotOptions.pie.endAngle-e.config.plotOptions.pie.startAngle),this.initialAngle=e.config.plotOptions.pie.startAngle%this.fullAngle,e.globals.radialSize=this.defaultSize/2.05-e.config.stroke.width-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.externalCfg=e.config.plotOptions.pie.dataLabels.external;let n=e.config.dataLabels.style;this.externalLabelStyle={fontSize:this.externalCfg.fontSize||n.fontSize,fontFamily:this.externalCfg.fontFamily||n.fontFamily,fontWeight:this.externalCfg.fontWeight||n.fontWeight},this.externalLabels=[],this.externalLabelMaxLines=1,this.externalLabelLineH=parseFloat(this.externalLabelStyle.fontSize)||12,e.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&this.chartType!==`polarArea`,this.showExternalLabels&&!e.globals.noData&&this.reserveExter
1162nalLabelSpace(),this.donutSize=e.globals.radialSize*parseInt(e.config.plotOptions.pie.donut.size,10)/100;let r=e.config.plotOptions.pie.customScale,i=e.layout.gridWidth/2,a=e.layout.gridHeight/2;this.translateX=i-i*r,this.translateY=a-a*r,this.dataLabelsGroup=new Q(this.w).group({class:`apexcharts-datalabels-group`,transform:`translate(${this.translateX}, ${this.translateY}) scale(${r})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}getExternalLabelText(e){let t=this.w,n=t.seriesData.seriesNames[e],r=this.externalCfg.formatter;return typeof r==`function`?r(n,{seriesIndex:e,percent:t.globals.seriesPercent?.[e]?.[0],value:t.globals.seriesTotals?.[e],w:t}):n==null?``:`${n}`}getExternalLabelLines(e){let t=this.getExternalLabelText(e);return(Array.isArray(t)?t:`${t??``}`.split(` 1163`)).map(e=>e==null?``:`${e}`)}reserveExternalLabelSpace(){let e=this.w,t=new Px(e),n=(e.seriesData.seriesNames||[]).map((e,t)=>this.getExternalLabelLines(t)),r=t.getMaxLabelWidth(n.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=n.reduce((e,t)=>Math.max(e,t.length),1),this.externalLabelLineH=Math.round((parseFloat(this.externalLabelStyle.fontSize)||12)*1.35);let i=this.externalCfg.connector,a=this.externalLabelMaxLines*this.externalLabelLineH,o=r+(i.length||0)+(i.gap||0)+12,s=a/2+(i.gap||0)+6,c=Math.min(e.globals.radialSize,e.layout.gridWidth/2-o,e.layout.gridHeight/2-s);e.globals.radialSize=Math.max(c,this.defaultSize*.15),e.globals.pieExternalLabelMarginY=s;let l=e.config.chart.height?String(e.config.chart.height):``,u=l!==``&&l!==`auto`;this.centerY=u?e.layout.gridHeight/2:e.globals.radialSize+s}draw(e){let t=this,n=this.w,r=new Q(this.w),i=r.group({class:`apexcharts-pie`});if(n.globals.noData)return i;let a=0;for(let t=0;t<e.length;t++)a+=Z.negToZero(e[t]);let o=[],s=r.group();a===0&&(a=1e-5),e.forEach(e=>{this.maxY=Math.max(this.maxY,e)}),n.config.yaxis[0].max&&(this.maxY=n.config.yaxis[0].max),n.config.grid.position===`back`&&this.chartType===`polarArea`&&this.drawPolarElements(i);for(let t=0;t<e.length;t++){let r=this.fullAngle*Z.negToZero(e[t])/a;o.push(r),this.chartType===`polarArea`?(o[t]=this.fullAngle/e.length,this.sliceSizes.push(n.globals.radialSize*e[t]/this.maxY)):this.sliceSizes.push(n.globals.radialSize)}let c=this.ctx.morphTypeChange?.isActive()===!0;if(n.globals.dataChanged&&!c){let e=0;for(let t=0;t<n.globals.previousPaths.length;t++)e+=Z.negToZero(n.globals.previousPaths[t]);let t;for(let r=0;r<n.globals.previousPaths.length;r++)t=this.fullAngle*Z.negToZero(n.globals.previousPaths[r])/e,this.prevSectorAngleArr.push(t)}if(this.donutSize<0&&(this.donutSize=0),this.chartType===`donut`){let e=r.drawCircle(this.donutSize);e.attr({cx:this.centerX,cy:this.centerY,fill:n.config.plotOptions.pie.donut.background?n.config.plotOptions.pie.donut.background:`transparent`}),s.add(e)}let l=t.drawArcs(o,e);
1163if(this.sliceLabels.forEach(e=>{l.add(e)}),s.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${n.config.plotOptions.pie.customScale})`}),s.add(l),i.add(s),this.donutDataLabels.show){let e=this.initialAnim&&!n.globals.resized&&!n.globals.dataChanged&&this.animDur>0,t=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:e?0:this.donutDataLabels.show});if(e){let e=this.dataLabelsGroup.node;e.style.transition=`opacity 280ms ease-out`,setTimeout(()=>{e.style.opacity=`1`},this.animDur)}i.add(t)}return n.config.grid.position===`front`&&this.chartType===`polarArea`&&this.drawPolarElements(i),i}drawArcs(e,t){let n=this.w,r=new Uv(this.w),i=new Q(this.w),a=new qv(this.w),o=i.group({class:`apexcharts-slices`}),s=this.initialAngle,c=this.initialAngle,l=this.initialAngle,u=this.initialAngle;this.strokeWidth=n.config.stroke.show?n.config.stroke.width:0;let d=this.ctx.morphTypeChange?.isActive()===!0;for(let f=0;f<e.length;f++){let p=i.group({class:`apexcharts-series apexcharts-pie-series`,seriesName:Z.escapeString(n.seriesData.seriesNames[f]),rel:f+1,"data:realIndex":f});o.add(p),s=l,c=u,l=s+e[f],u=c+this.prevSectorAngleArr[f];let m=l<s?this.fullAngle+l-s:l-s,h=a.fillPath({seriesNumber:f,size:this.sliceSizes[f],value:t[f]}),g=d?this.ctx.morphTypeChange.getInitialPathFor(f,0):null,_=g||this.getChangedPath(c,u),v=i.drawPath({d:_,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[f]??this.lineColorArr[f%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:h,fillOpacity:n.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${f}`});if(v.attr({index:0,j:f}),r.setSelectionFilter(v,0,f),n.config.chart.dropShadow.enabled){let e=n.config.chart.dropShadow;r.dropShadow(v,e,f)}this.addListeners(v,this.donutDataLabels);let y={x:0,y:0},b=(s+m/2)%this.fullAngle,x={x:this.centerX,y:this.centerY};this.chartType===`pie`||this.chartType===`polarArea`?(y=Z.polarToCartesian(this.centerX,this.centerY,n.globals.radialSize/1.25+n.config.plotOptions.pie.dataLabels.offset,b),x=Z.polarToCartesian(this.centerX,this.centerY,n.globals.radialSize/2,b)):this.chartType===`donut`&&(y=Z.polarToCartesian(this.centerX,this.centerY,(n.globals.radialSize+this.donutSize)/2+n.config.plotOptions.pie.dataLabels.offset,b),x=Z.polarToCartesian(this.centerX,this.centerY,(n.globals.radialSize+this.donutSize)/2,b)),Q.setAttrs(v.node,{"data:angle":m,"data:startAngle":s,"data:strokeWidth":this.strokeWidth,"data:value":t[f],"data:cx":x.x,"data:cy":x.y}),p.add(v);let S=0;if(this.initialAnim&&!n.globals.resized&&!n.globals.dataChanged?(S=m/this.fullAngle*n.config.chart.animations.speed,S===0&&(S=1),this.animDur=S+this.animDur,this.animBeginArr.push(this.animDur)):this.animBeginArr.push(0),d&&g){let e=this.getPiePath({me:this,startAngle:s,angle:m,size:this.sliceSizes[f]}),t=this.ctx.morphTypeChange.getSpeed(),n=this.ctx.animations;v.node.setAttribute(`data:pathOrig`,e);let r=v.animate(t).plot(e,`polygons`).attr({"stroke-width":this.strokeWidth});r&&typeof r.after==`function`?r.after(()=>n.animationCompleted(v)):n.animationCompleted(v)}else this.dynamicAnim&&n.globals.dataChanged?this.animatePaths(v,{size:this.sliceSizes[f],endAngle:l,startAngle:s,prevStartAngle:c,prevEndAngle:u,animateStartingPos:!0,i:f,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:n.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(v,{size:this.sliceSizes[f],endAngle:l,startAngle:s,i:f,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:S});if(n.config.plotOptions.pie.expandOnClick&&this.chartType!==`polarArea`&&v.node.addEventListener(`mouseup`,this.pieClicked.bind(this,f)),n.interact.selectedDataPoints[0]!==void 0&&n.interact.selectedDataPoints[0].indexOf(f)>-1){if(this.initialAnim&&!n.globals.resized&&!n.globals.dataChanged&&this.animDur>0){let e=this,t=f;setTimeout(()=>e.pieClicked(t),this.animDur)}else this.pieClicked(f)}if(n.config.dataLabels.enabled){let t=y.x,a=y.y,o=100*m/this.fullAngle+`%`;if(m!==0&&n.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[f]){let e=n.config.dataLabels.formatter;e!==void 0&&(o=e(n.globals.seriesPercent[f][0],{seriesIndex:f,w:n}));let s=n.globals.dataLabels.style.colors[f],c=i.group({class:`apexcharts-datalabels`}),l=i.drawText({x:t,y:a,text:o,textAnchor:`middle`,fontSize:n.config.dataLabels.style.fontSize,fontFamily:n.
1163config.dataLabels.style.fontFamily,fontWeight:n.config.dataLabels.style.fontWeight,foreColor:s});if(c.add(l),n.config.dataLabels.dropShadow.enabled){let e=n.config.dataLabels.dropShadow;r.dropShadow(l,e)}l.node.classList.add(`apexcharts-pie-label`),n.config.chart.animations.animate&&n.globals.resized===!1&&(l.node.classList.add(`apexcharts-pie-label-delay`),l.node.style.animationDelay=n.config.chart.animations.speed/940+`s`),this.sliceLabels.push(c)}}if(this.showExternalLabels&&m!==0){let e=this.getExternalLabelLines(f);if(e.some(e=>e!==``)){let t=Z.polarToCartesian(this.centerX,this.centerY,n.globals.radialSize,b),r=Z.polarToCartesian(this.centerX,this.centerY,n.globals.radialSize+(this.externalCfg.connector.gap||0),b),i=r.x>=this.centerX,a=i?r.x+(this.externalCfg.connector.length||0):r.x-(this.externalCfg.connector.length||0);this.externalLabels.push({lines:e,anchor:t,elbow:r,side:i?`right`:`left`,labelX:a+parseFloat(this.externalCfg.offsetX||0),idealY:r.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||n.globals.colors[f],foreColor:this.externalCfg.color||n.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();let e=Y.isBrowser()&&(d||this.dynamicAnim&&n.globals.dataChanged||this.initialAnim&&!n.globals.resized&&!n.globals.dataChanged);
1163this.externalLabels.forEach(t=>{let r=new Px(n).drawExternalLabel({lines:t.lines,lineHeight:this.externalLabelLineH,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:t.connectorColor},style:this.externalLabelStyle,foreColor:t.foreColor});e&&(r.node.classList.add(`apexcharts-element-hidden`),n.globals.delayedElements.push({el:r.node})),o.add(r)})}return o}placeExternalLabels(){let e=this.w,t=this.externalLabelMaxLines*this.externalLabelLineH+2,n=this.centerY+e.globals.radialSize+e.globals.pieExternalLabelMarginY;[`left`,`right`].forEach(e=>{let r=this.externalLabels.filter(t=>t.side===e).sort((e,t)=>e.idealY-t.idealY);r.forEach(e=>{e.labelY=e.idealY});for(let e=1;e<r.length;e++)r[e].labelY-r[e-1].labelY<t&&(r[e].labelY=r[e-1].labelY+t);let i=r[r.length-1],a=i?i.labelY-n:0;if(a>0)for(let e=r.length-1;e>=0;e--)r[e].labelY-=a,e<r.length-1&&r[e+1].labelY-r[e].labelY<t&&(r[e].labelY=r[e+1].labelY-t)})}addListeners(e,t){let n=new Q(this.w);e.node.addEventListener(`mouseenter`,n.pathMouseEnter.bind(this,e)),e.node.addEventListener(`mouseleave`,n.pathMouseLeave.bind(this,e)),e.node.addEventListener(`mouseleave`,this.revertDataLabelsInner.bind(this)),e.node.addEventListener(`mousedown`,n.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)))}animatePaths(e,t){let n=this.w,r=this,i=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,a=i,o=t.startAngle,s=t.startAngle;t.prevStartAngle!==void 0&&t.prevEndAngle!==void 0&&(o=t.prevEndAngle,a=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===n.config.series.length-1&&(i+s>this.fullAngle?t.endAngle-=i+s:i+s<this.fullAngle&&(t.endAngle+=this.fullAngle-(i+s))),i===this.fullAngle&&(i=this.fullAngle-.01),r.animateArc(e,o,s,i,a,t)}animateArc(e,t,n,r,i,a){let o=this,s=this.w,c=new Hv(this.w),l=a.size,u;(isNaN(t)||isNaN(i))&&(t=n,i=r,a.dur=0);let d=r,f=n,p=t<n?this.fullAngle+t-n:t-n;s.globals.dataChanged&&a.shouldSetPrevPaths&&a.prevEndAngle&&(u=o.getPiePath({me:o,startAngle:a.prevStartAngle,angle:a.prevEndAngle<a.prevStartAngle?this.fullAngle+a.prevEndAngle-a.prevStartAngle:a.prevEndAngle-a.prevStartAngle,size:l}),e.attr({d:u})),a.dur===0?(u=o.getPiePath({me:o,startAngle:f,angle:r,size:l}),a.isTrack||(s.globals.animationEnded=!0),e.node.setAttribute(`data:pathOrig`,u),e.attr({d:u,"stroke-width":o.strokeWidth})):e.animate(a.dur,a.animBeginArr[a.i]).after(function(){(o.chartType===`pie`||o.chartType===`donut`||o.chartType===`polarArea`)&&this.animate(s.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),a.i===s.config.series.length-1&&c.animationCompleted(e)}).during(s=>{d=p+(r-p)*s,a.animateStartingPos&&(d=i+(r-i)*s,f=t-i+(n-(t-i))*s),u=o.getPiePath({me:o,startAngle:f,angle:d,size:l}),e.node.setAttribute(`data:pathOrig`,u),e.attr({d:u})})}pieClicked(e){let t=this.w,n=this,r=n.sliceSizes[e]+(t.config.plotOptions.pie.expandOnClick?4:0),i=t.dom.Paper.findOne(`.apexcharts-${n.chartType.toLowerCase()}-slice-${e}`);if(i.attr(`data:pieClicked`)===`true`){i.attr({"data:pieClicked":`false`}),this.revertDataLabelsInner();let e=i.attr(`data:pathOrig`);i.attr({d:e});return}{let n=t.dom.baseEl.getElementsByClassName(`apexcharts-pie-area`);Array.prototype.forEach.call(n,e=>{e.setAttribute(`data:pieClicked`,`false`);let t=e.getAttribute(`data:pathOrig`);t&&e.setAttribute(`d`,t)}),t.interact.capturedDataPointIndex=e,i.attr(`data:pieClicked`,`true`)}let a=parseInt(i.attr(`data:startAngle`),10),o=parseInt(i.attr(`data:angle`),10),s=n.getPiePath({me:n,startAngle:a,angle:o,size:r});o!==360&&i.plot(s)}getChangedPath(e,t){let n=``;return this.dynamicAnim&&this.w.globals.dataChanged&&(n=this.getPiePath({me:this,startAngle:e,angle:t-e,size:this.size})),n}getPiePath({me:e,startAngle:t,angle:n,size:r}){let i,a=new Q(this.w),o=t,s=Math.PI*(o-90)/180,c=n+t;Math.ceil(c)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);let l=Math.PI*(c-90)/180,u=e.centerX+r*Math.cos(s),d=e.centerY+r*Math.sin(s),f=e.centerX+r*Math.cos(l),p=e.centerY+r*Math.sin(l),m=Z.polarToCartesian(e.centerX,e.centerY,e.donutSize,c),h=Z.polarToCartesian(e.centerX,e.centerY,e.donutSize,o),g=+(n>180),_=[`M`,u,d,`A`,r,r,0,g,1,f,p];return i=e.chartType===`donut`?[..._,`L`,m.x,m.y,`A`,e.donutSize,e.donutSize,0,g,0,h.x,h.y,`L`,u,d,`z`].join(` `):e.chartType===`pie`||e.chartType===`polarArea`?[..._,`L`,e.centerX,e.centerY,`L`,u,d].join(` `):[..._].join(` `),a.roundPathCorners(i,this.strokeWidth*2)}drawPolarElements(e){let t=this.w,n=new ty(this.w),r=new Q(this.w),i=new Px(this.w),a=r.group(),o=r.group(),s=n.niceScale(0,Math.ceil(this.maxY),0),c=s.result.reverse(),l=s.result.length;this.maxY=s.niceMax;let u=t.globals.radialSize,d=u/(l-1);for(let e=0;e<l-1;e++){let n=r.drawCircle(u);if(n.attr({cx:this.centerX,cy:this.centerY,fill:`none`,"stroke-width":t.config.plotOptions.polarArea.r
1163ings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){let n=i.drawYAxisTexts(this.centerX,this.centerY-u+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,e,c[e]);o.add(n)}a.add(n),u-=d}this.drawSpokes(e),e.add(a),e.add(o)}renderInnerDataLabels(e,t,n){let r=this.w,i=new Q(this.w),a=t.total.show;e.node.innerHTML=``,e.node.style.opacity=n.opacity;let o=n.centerX,s=this.donutDataLabels.total.label?n.centerY:n.centerY-n.centerY/6,c,l;c=t.name.color===void 0?r.globals.colors[0]:t.name.color;let u=t.name.fontSize,d=t.name.fontFamily,f=t.name.fontWeight;l=t.value.color===void 0?r.config.chart.foreColor:t.value.color;let p=t.value.formatter,m=``,h=``;if(a?(c=t.total.color,u=t.total.fontSize,d=t.total.fontFamily,f=t.total.fontWeight,h=this.donutDataLabels.total.label?t.total.label:``,m=t.total.formatter(r)):r.seriesData.series.length===1&&(m=p(r.seriesData.series[0],r),h=r.seriesData.seriesNames[0]),h&&=t.name.formatter(h,t.total.show,r),t.name.show){let n=i.drawText({x:o,y:s+parseFloat(t.name.offsetY),text:h,textAnchor:`middle`,foreColor:c,fontSize:u,fontWeight:f,fontFamily:d});n.node.classList.add(`apexcharts-datalabel-label`),e.add(n)}if(t.value.show){let n=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,r=i.drawText({x:o,y:s+n,text:m,textAnchor:`middle`,foreColor:l,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});r.node.classList.add(`apexcharts-datalabel-value`),e.add(r)}return e}printInnerLabels(e,t,n,r){let i=this.w,a;r?a=e.name.color===void 0?i.globals.colors[parseInt(r.parentNode.getAttribute(`rel`),10)-1]:e.name.color:i.seriesData.series.length>1&&e.total.show&&(a=e.total.color);let o=i.dom.baseEl.querySelector(`.apexcharts-datalabel-label`),s=i.dom.baseEl.querySelector(`.apexcharts-datalabel-value`),c=e.value.formatter;n=c(n,i),!r&&typeof e.total.formatter==`function`&&(n=e.total.formatter(i));let l=t===e.total.label;if(t=this.donutDataLabels.total.label?e.name.formatter(t,l,i):``,o!==null&&(o.textContent=t),s!==null&&(s.textContent=n),o!==null){let e=o;e.style.fill=a}}printDataLabelsInner(e,t){let n=this.w,r=e.getAttribute(`data:value`),i=n.seriesData.seriesNames[parseInt(e.parentNode.getAttribute(`rel`),10)-1];n.seriesData.series.length>1&&this.printInnerLabels(t,i,r,e);let a=n.dom.baseEl.querySelector(`.apexcharts-datalabels-group`);if(a!==null){let e=a;e.style.opacity=`1`}}drawSpokes(e){let t=this.w,n=new Q(this.w),r=t.config.plotOptions.polarArea.spokes;if(r.strokeWidth===0)return;let i=[],a=360/t.seriesData.series.length;for(let e=0;e<t.seriesData.series.length;e++)i.push(Z.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize,t.config.plotOptions.pie.startAngle+a*e));i.forEach((t,i)=>{let a=n.drawLine(t.x,t.y,this.centerX,this.centerY,Array.isArray(r.connectorColors)?r.connectorColors[i]:r.connectorColors);e.add(a)})}revertDataLabelsInner(){let e=this.w;if(this.donutDataLabels.show){let t=e.dom.Paper.findOne(`.apexcharts-datalabels-group`),n=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.dom.Paper.findOne(`.apexcharts-radialbar, .apexcharts-pie`).add(n)}}},Ix=class{constructor(e,t){this.ctx=t,this.w=e,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,this.graphics=new Q(this.w),this.lineColorArr=e.globals.stroke.colors===void 0?e.globals.colors:e.globals.stroke.colors,this.defaultSize=e.globals.svgHeight<e.globals.svgWidth?e.layout.gridHeight:e.layout.gridWidth,this.isLog=e.config.yaxis[0].logarithmic,this.logBase=e.config.yaxis[0].logBase,this.coreUtils=new Nv(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,e.globals.maxY,0):e.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):e.globals.minY,this.polygons=e.config.plotOptions.radar.polygons,this.strokeWidth=e.config.stroke.show?e.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-e.config.chart.dropShadow.blur,e.config.xaxis.labels.show&&(this.size-=e.layout.xAxisLabelsWidth/1.75),e.config.plotOptions.radar.size!==void 0&&(this.size=e.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(e){let t=this.w,n=new qv(this.w),r=[],i=new Xv(this.w,this.ctx);e.length&&(this.dataPointsLen=e[t.globals.maxValsInArrayIndex].length),this.disAngle=Math.PI*2/this.dataPointsLen;let a=t.layout.gridWidth/2,o=t.layout.gridHeight/2,s=a+t.config.plotOptions.radar.offsetX,c=o+t.config.plotOptions.radar.offsetY,l=this.graphics.group({class:`apexcharts-radar-series apexcharts-plot-series`,transform:`translate(${s||0}, ${c||0})`}),u=[],d=null,f=null;if(this.yaxisLabels=this.graphics.group({class:`apexcharts-yaxis`}),e.forEach((e,a)=>{let o=e.length===t.globals.dataPoints,s=this.graphics.group().attr({class:`apexcharts-series`,"data:longestSeries":o,seriesName:Z.escapeString(t.seriesData.seriesNames[a]),rel:a+1,"data:realIndex":a});this.dataRadiusOfPercent[a]=[],this.dataRadius[a]=[],this.angleArr[a]=[],e.forEach((e,t)=>{let n=Math.abs(this.maxValue-this.minValue);e-=this.minValue,this.isLog&&(e=this.coreUtils.getLogVal(this.logBase,e,0)),this.dataRadiusOfPercent[a][t]=e/n,this.dataRadius[a][t]=this.dataRadiusOfPercent[a][t]*this.size,this.angleArr[a][t]=t*this.disAngle}),u=this.getDataPointsPos(this.dataRadius[a],this.angleArr[a]);let c=this.createPaths(u,{x:0,y:0});d=this.graphics.group({class:`apexcharts-series-markers-wrap apexcharts-element-hidden`}),f=this.graphics.group({class:`apexcharts-datalabels`,"data:realIndex":a}),t.globals.delayedElements.push({el:d.node,index:a});let l={i:a,realIndex:a,animationDelay:a,initialSpeed:t.config.chart.animations.speed,dataChangeSpeed:t.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-radar`,shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:t.globals.stroke.colors[a],strokeLineCap:t.config.stroke.lineCap},p=null;t.globals.previousPaths.length>0&&(p=this.getPreviousPath(a));for(let e=0;e<c.linePathsTo.length;e++){let r=this.graphics.renderPaths(q(K({},l),{pathFrom:p===null?c.linePathsFrom[e]:p,pathTo:c.linePathsTo[e],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[a]:this.strokeWidth,fill:`none`,drawShadow:!1}));s.add(r);let i=n.fillPath({seriesNumber:a}),o=this.graphics.renderPaths(q(K({},l),{pathFrom:p===null?c.areaPathsFrom[e]:p,pathTo:c.areaPathsTo[e],strokeWidth:0,fill:i,drawShadow:!1,drawMask:{type:`radial`,cx:0,cy:0,r:this.size}}));if(t.config.chart.dropShadow.enabled){let e=new Uv(this.w),n=t.config.chart.dropShadow;e.dropShadow(o,Object.assign({},n,{noUserSpaceOnUse:!0}),a)}s.add(o)}e.forEach((e,n)=>{let r=new Jv(this.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-marker`,seriesIndex:a,dataPointIndex:n}),o=this.graphics.drawMarker(u[n].x,u[n].y,r);o.attr(`rel`,n),o.attr(`j`,n),o.attr(`index`,a),o.node.setAttribute(`default-marker-size`,r.pSize);let c=this.graphics.group({class:`apexcharts-series-markers`});c&&c.add(o),d.add(c),s.add(d);let l=t.config.dataLabels;if(l.enabled){let e=l.formatter(t.seriesData.series[a][n],{seriesIndex:a,dataPointIndex:n,w:t});i.plotDataLabelsText({x:u[n].x,y:u[n].y,text:e,textAnchor:`middle`,i:a,j:a,parent:f,offsetCorrection:!1,dataLabelsConfig:K({},l)})}s.add(f)}),r.push(s)}),this.drawPolygons({parent:l}),t.config.xaxis.labels.show){let e=this.drawXAxisTexts();l.add(e)}
1163return r.forEach(e=>{l.add(e)}),l.add(this.yaxisLabels),l}drawPolygons(e){let t=this.w,{parent:n}=e,r=new Px(this.w),i=t.globals.yAxisScale[0].result.reverse(),a=i.length,o=[],s=this.size/(a-1);for(let e=0;e<a;e++)o[e]=s*e;o.reverse();let c=[],l=[];o.forEach((e,t)=>{let n=Z.getPolygonPos(e,this.dataPointsLen),r=``;n.forEach((e,n)=>{if(t===0){let t=this.graphics.drawLine(e.x,e.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[n]:this.polygons.connectorColors);l.push(t)}n===0&&this.yaxisLabelsTextsPos.push({x:e.x,y:e.y}),r+=e.x+`,`+e.y+` `}),c.push(r)}),c.forEach((e,r)=>{let i=this.polygons.strokeColors,a=this.polygons.strokeWidth,o=this.graphics.drawPolygon(e,Array.isArray(i)?i[r]:i,Array.isArray(a)?a[r]:a,t.globals.radarPolygons.fill.colors[r]);n.add(o)}),l.forEach(e=>{n.add(e)}),t.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((e,t)=>{let n=r.drawYAxisTexts(e.x,e.y,t,i[t]);this.yaxisLabels.add(n)})}drawXAxisTexts(){let e=this.w,t=e.config.xaxis.labels,n=this.graphics.group({class:`apexcharts-xaxis`}),r=Z.getPolygonPos(this.size,this.dataPointsLen);return e.labelData.labels.forEach((i,a)=>{let o=e.config.xaxis.labels.formatter,s=new Xv(this.w,this.ctx);if(r[a]){let c=this.getTextPos(r[a],this.size),l=o(i,{seriesIndex:-1,dataPointIndex:a,w:e});s.plotDataLabelsText({x:c.newX,y:c.newY,text:l,textAnchor:c.textAnchor,i:a,j:a,parent:n,className:`apexcharts-xaxis-label`,color:Array.isArray(t.style.colors)&&t.style.colors[a]?t.style.colors[a]:`#a8a8a8`,dataLabelsConfig:K({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},t),offsetCorrection:!1}).on(`click`,t=>{if(typeof e.config.chart.events.xAxisLabelClick==`function`){let n=Object.assign({},e,{labelIndex:a});e.config.chart.events.xAxisLabelClick(t,this.ctx,n)}})}}),n}createPaths(e,t){let n=[],r=[],i=[],a=[];if(e.length){r=[this.graphics.move(t.x,t.y)],a=[this.graphics.move(t.x,t.y)];let o=this.graphics.move(e[0].x,e[0].y),s=this.graphics.move(e[0].x,e[0].y);e.forEach((t,n)=>{o+=this.graphics.line(t.x,t.y),s+=this.graphics.line(t.x,t.y),n===e.length-1&&(o+=`Z`,s+=`Z`)}),n.push(o),i.push(s)}return{linePathsFrom:r,linePathsTo:n,areaPathsFrom:a,areaPathsTo:i}}getTextPos(e,t){let n=`middle`,r=e.x,i=e.y;return Math.abs(e.x)>=10?e.x>0?(n=`start`,r+=10):e.x<0&&(n=`end`,r-=10):n=`middle`,Math.abs(e.y)>=t-10&&(e.y<0?i-=10:e.y>0&&(i+=10)),{textAnchor:n,newX:r,newY:i}}getPreviousPath(e){let t=this.w,n=null;for(let r=0;r<t.globals.previousPaths.length;r++){let i=t.globals.previousPaths[r];i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(e),10)&&t.globals.previousPaths[r].paths[0]!==void 0&&(n=t.globals.previousPaths[r].paths[0].d)}return n}getDataPointsPos(e,t,n=this.dataPointsLen){e||=[],t||=[];let r=[];for(let i=0;i<n;i++){let n={};n.x=e[i]*Math.sin(t[i]),n.y=-e[i]*Math.cos(t[i]),r.push(n)}return r}},Lx=class extends Fx{constructor(e,t){super(e,t),this.ctx=t,this.w=e,this.animBeginArr=[0],this.animDur=0,this.startAngle=e.config.plotOptions.radialBar.startAngle,this.endAngle=e.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(e.config.plotOptions.radialBar.endAngle-e.config.plotOptions.radialBar.startAngle),this.trackStartAngle=e.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=e.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||=this.startAngle,this.trackEndAngle||=this.endAngle,this.endAngle===360&&(this.endAngle=359.99),this.margin=parseInt(e.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(e){let t=this.w,n=new Q(this.w),r=n.group({class:`apexcharts-radialbar`});if(t.globals.noData)return r;let i=n.group(),a=this.defaultSize/2,o=t.layout.gridWidth/2,s=this.defaultSize/2.05;t.config.chart.sparkline.enabled||(s=s-t.config.stroke.width-t.config.chart.dropShadow.blur);let c=t.globals.fill.colors,l=t.config.plotOptions.radialBar,u=Array.isArray(l.bands)&&l.bands.length>
11630,d=u&&l.bandsStyle&&l.bandsStyle.hideTrackWhenPresent,f=l.shape===`needle`;if(l.track.show&&!d){let t=this.drawTracks({size:s,centerX:o,centerY:a,colorArr:c,series:e});i.add(t)}if(u){let t=this.drawBands({size:s,centerX:o,centerY:a,series:e});i.add(t)}let p=this.drawArcs({size:s,centerX:o,centerY:a,colorArr:c,series:e,skipValueArc:f&&!l.needle?.showValueArc});if(l.ticks&&l.ticks.show){let n=this.drawTicks({size:s,centerX:o,centerY:a,series:e});if(this.initialAnim&&!t.globals.dataChanged&&!t.globals.resized&&Y.isBrowser()&&t.globals.shouldAnimate){let e=n.node;e.style.opacity=`0`,e.style.transition=`opacity 280ms ease-out`;let r=t.config.chart.animations.speed||800;setTimeout(()=>{e.style.opacity=`1`},r)}i.add(n)}if(f){let t=this.drawNeedle({size:s,centerX:o,centerY:a,series:e});i.add(t)}let m=360;t.config.plotOptions.radialBar.startAngle<0&&(m=this.totalAngle);let h=(360-m)/360;if(t.globals.radialSize=s-s*h,this.radialDataLabels.value.show){let e=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);t.globals.radialSize+=e*h}return i.add(p.g),t.config.plotOptions.radialBar.hollow.position===`front`&&(p.g.add(p.elHollow),p.dataLabels&&p.g.add(p.dataLabels)),r.add(i),r}drawTracks(e){let t=this.w,n=new Q(this.w),r=n.group({class:`apexcharts-tracks`}),i=new Uv(this.w),a=new qv(this.w),o=this.getStrokeWidth(e);e.size-=o/2;for(let s=0;s<e.series.length;s++){let c=n.group({class:`apexcharts-radialbar-track apexcharts-track`});r.add(c),c.attr({rel:s+1}),e.size=e.size-o-this.margin;let l=t.config.plotOptions.radialBar.track,u=a.fillPath({seriesNumber:0,size:e.size,fillColors:Array.isArray(l.background)?l.background[s]:l.background,solid:!0}),d=this.trackStartAngle,f=this.trackEndAngle;Math.abs(f)+Math.abs(d)>=360&&(f=360-Math.abs(this.startAngle)-.1);let p=n.drawPath({d:``,stroke:u,strokeWidth:o*parseInt(l.strokeWidth,10)/100,fill:`none`,strokeOpacity:l.opacity,classes:`apexcharts-radialbar-area`});if(l.dropShadow.enabled){let e=l.dropShadow;i.dropShadow(p,e)}c.add(p),p.attr(`id`,`apexcharts-radialbarTrack-`+s),this.animatePaths(p,{centerX:e.centerX,centerY:e.centerY,endAngle:f,startAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}drawArcs(e){let t=this.w,n=new Q(this.w),r=new qv(this.w),i=new Uv(this.w),a=n.group(),o=this.getStrokeWidth(e);e.size-=o/2;let s=t.config.plotOptions.radialBar.hollow.background,c=e.size-o*e.series.length-this.margin*e.series.length-o*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,l=c-t.config.plotOptions.radialBar.hollow.margin;t.config.plotOptions.radialBar.hollow.image!==void 0&&(s=this.drawHollowImage(e,a,c,s));let u=this.drawHollow({size:l,centerX:e.centerX,centerY:e.centerY,fill:s||`transparent`});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){let e=t.config.plotOptions.radialBar.hollow.dropShadow;i.dropShadow(u,e)}let d=1;!this.radialDataLabels.total.show&&t.seriesData.series.length>1&&(d=0);let f=null;if(this.radialDataLabels.show){let n=t.dom.Paper.findOne(`.apexcharts-datalabels-group`);f=this.renderInnerDataLabels(n,this.radialDataLabels,{hollowSize:c,centerX:e.centerX,centerY:e.centerY,opacity:d})}t.config.plotOptions.radialBar.hollow.position===`back`&&(a.add(u),f&&a.add(f));let p=!1;t.config.plotOptions.radialBar.inverseOrder&&(p=!0);let m=this.ctx.morphTypeChange?.isActive()===!0;for(let s=p?e.series.length-1:0;p?s>=0:s<e.series.length;p?s--:s++){let c=n.group({class:`apexcharts-series apexcharts-radial-series`,seriesName:Z.escapeString(t.seriesData.seriesNames[s])});a.add(c),c.attr({rel:s+1,"data:realIndex":s}),dy.addCollapsedClassToSeries(this.w,c,s),e.size=e.size-o-this.margin;let l=r.fillPath({seriesNumber:s,size:e.size,value:e.series[s]}),u=this.startAngle,d,f=t.config.plotOptions.radialBar,p=typeof f.min==`number`?f.min:0,h=typeof f.max==`number`?f.max:100,g=h===p?1:h-p,_=e=>Math.max(0,(Math.min(Math.max(e,p),h)-p)/g),v=_(Z.negToZero(e.series[s])),y=Math.round(this.totalAngle*v)+this.startAngle,b;t.globals.dataChanged&&(d=this.startAngle,b=Math.round(this.totalAngle*_(Z.negToZero(t.globals.previousPaths[s])))+d),Math.abs(y)+Math.abs(u)>360&&(y-=.01),Math.abs(b)+Math.abs(d)>360&&(b-=.01);let x=y-u,S=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[s]:t.config.stroke.dashArray,C=m?this.ctx.morphTypeChange.getInitialPathFor(s,0):null,w=m?this.ctx.morphTypeChange.getFromType():null,T=!!C&&(w===`bar`||w===`funnel`||w===`pyramid`||w===`pie`||w===`donut`||w===`polarArea`),E=n.drawPath({d:C||``,stroke:T||e.skipValueArc?`transparent`:l,strokeWidth:T||e.skipValueArc?0:o,fill:T?l:`none`,fillOpacity:t.config.fill.opacity,classes:`apexcharts-radialbar-area apexcharts-radialbar-slice-`+s,strokeDashArray:S}),D=u+x/2,O=Z.polarToCartesian(e.centerX,e.centerY,e.size,D);if(Q.setAttrs(E.node,{"data:angle":x,"data:value":e.series[s],"data:cx":O.x,"data:cy":O.y}),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;i.dropShadow(E,e,s)}if(i.setSelectionFilter(E,0,s),this.addListeners(E,this.radialDataLabels),c.add(E),E.attr({index:0,j:s}),this.barLabels.enabled){let r=Z.polarToCartesian(e.centerX,e.centerY,e.size,u),i=this.barLabels.formatter(t.seriesData.seriesNames[s],{seriesIndex:s,w:t}),a=[`apexcharts-radialbar-label`];this.barLabels.onClick||a.push(`apexcharts-no-click`);let o=this.barLabels.useSeriesColors?t.globals.colors[s]:t.config.chart.foreColor;o||=t.config.chart.foreColor;let l=r.x+this.barLabels.offsetX,d=r.y+this.barLabels.offsetY,f=n.drawText({x:l,y:d,text:i,textAnchor:`end`,dominantBaseline:`middle`,fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:o,cssClass:a.join(` `)});f.on(`click`,this.onBarLabelClick),f.attr({rel:s+1}),u!==0&&f.attr({"transform-origin":`${l} ${d}`,transform:`rotate(${u} 0 0)`}),c.add(f)}let k=0;if(this.initialAnim&&!t.globals.resized&&!t.globals.dataChanged&&(k=t.config.chart.animations.speed),t.globals.dataChanged&&(k=t.config.chart.animations.dynamicAnimation.speed),this.animDur=k/(e.series.length*1.2)+this.animDur,this.animBeginArr.push(this.animDur),m&&C){let t=this.ctx.morphTypeChange.getSpeed(),n=this.getPiePath({me:this,startAngle:u,angle:x,size:e.size});if(T){let r=this.ctx.morphTypeChange.buildRingSegmentPath(e.centerX,e.centerY,e.size,o,u,u+x);E.animate(t).plot(r,`polygons`).after(function(){this.attr({d:n,fill:`none`,stroke:e.skipValueArc?`transparent`:l,"stroke-width":e.skipValueArc?0:o})})}else E.animate(t).plot(n,`polygons`).attr({"stroke-width":o})}else this.animatePaths(E,{centerX:e.centerX,centerY:e.centerY,endAngle:y,startAngle:u,prevEndAngle:b,prevStartAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:this.animBeginArr,dur:k,shouldSetPrevPaths:!0})}return{g:a,elHollow:u,dataLabels:f}}_angleAtValue(e){let t=this.w.config.plotOptions.radialBar,n=typeof t.min==`number`?t.min:0,r=typeof t.max==`number`?t.max:100,i=r===n?n+1:r,a=(Math.max(n,Math.min(i,Number(e)))-n)/(i-n);return this.startAngle+a*(this.endAngle-this.startAngle)}_describeArc(e,t,n,r,i){let a=Z.polarToCartesian(e,t,n,i),o=Z.polarToCartesian(e,t,n,r),s=i-r,c=+(Math.abs(s)>180);return`M ${a.x} ${a.y} A ${n} ${n} 0 ${c} 0 ${o.x} ${o.y}`}drawBands(e){let t=this.w,n=new Q(this.w),r=t.config.plotOptions.radialBar,i=r.bands||[],a=n.group({class:`apexcharts-gauge-bands`}),o=this.getStrokeWidth(e),s=e.size-o/2-o-this.margin,c=o*parseInt(r.bandsStyle.strokeWidth,10)/100,l=typeof r.min==`number`?r.min:0,u=typeof r.max==`number`?r.max:100,d=u===l?0:(r.bandsStyle.gap||0)*((this.endAngle-this.startAngle)/(u-l));for(let t=0;t<i.length;t++){let o=i[t];if(o.from===void 0||o.to===void 0)continue;let l=this._angleAtValue(o.from),u=this._angleAtValue(o.to),f=Math.min(l,u)+d/2,p=Math.max(l,u)-d/2;if(p-f<=0)continue;let m=n.drawPath({d:this._describeArc(e.centerX,e.centerY,s,f,p),stroke:o.color||`#ccc`,strokeWidth:c,fill:`none`,strokeLinecap:r.bandsStyle.linecap||`butt`,classes:`apexcharts-gauge-band`});m.node.setAttribute(`data-band-index`,String(t)),a.add(m)}return a}drawTicks(e){let t=this.w,n=new Q(this.w),r=t.config.plotOptions.radialBar,i=r.ticks,a=n.group({class:`apexcharts-gauge-ticks`}),o=this.getStrokeWidth(e),s=e.size-o/2-o-this.margin,c=typeof r.min==`number`?r.min:0,l=typeof r.max==`number`?r.max:100,u=Math.max(2,i.major?.count??11),d=Math.max(0,i.minor?.count??0),f=(t,r,o)=>{let c=this._angleAtValue(t),l=r.length??8,u=r.placement===`inside`?s-l:s,d=r.placement===`inside`?s:s+l,f=Z.polarToCartesian(e.centerX,e.centerY,u,c),p=Z.polarToCartesian(e.centerX,e.centerY,d,c),m=n.drawLine(f.x,f.y,p.x,p.y,r.color||(o?`#666`:`#999`),0,r.width||(o?2:1));if(a.add(m),o&&i.labels?.show){let o=(r.placement===`inside`?u:d)+(r.placement===`inside`?-1:1)*(i.labels.offset??6),s=Z.polarToCartesian(e.centerX,e.centerY,o,c),l=typeof i.labels.formatter==`function`?i.labels.formatter(t):String(t),f=n.drawText({x:s.x,y:s.y,text:l,textAnchor:`middle`,dominantBaseline:`middle`,fontFamily:i.labels.fontFamily,fontSize:i.labels.fontSize,fontWeight:i.labels.fontWeight,foreColor:i.labels.color,cssClass:`apexcharts-gauge-tick-label`});a.add(f)}};for(let e=0;e<u;e++)if(f(c+e/(u-1)*(l-c),i.major||{},!0),e<u-1&&d>0)for(let t=1;t<=d;t++)f(c+(e+t/(d+1))/(u-1)*(l-c),i.minor||{},!1);return a}drawNeedle(e){let t=this.w,n=new Q(this.w),r=t.config.plotOptions.radialBar.needle||{},i=n.group({class:`apexcharts-gauge-needle`});if(!e.series||e.series.length===0)return i;let a=this.getStrokeWidth(e),o=e.size-a/2-a-this.margin,s=typeof r.length==`string`&&r.length.endsWith(`%`)?o*parseInt(r.length,10)/100:Number(r.length||o*.85),c=r.baseWi
1163dth??4,l=r.tipWidth??1,u=r.color||`#333`,d=e.centerX,f=Number(r.offsetY??0),p=e.centerY+f,m=`M ${d+c/2} ${p} A ${c/2} ${c/2} 0 0 1 ${d-c/2} ${p} L ${d-l/2} ${p-s} L ${d+l/2} ${p-s} Z`,h=n.drawPath({d:m,stroke:u,strokeWidth:0,fill:u,classes:`apexcharts-gauge-needle-shape`});i.add(h);let g=Number(e.series[0]),_=this._angleAtValue(g),v=this.initialAnim&&!t.globals.dataChanged&&!t.globals.resized,y=this.ctx,b=typeof y._lastNeedleAngle==`number`?y._lastNeedleAngle:this.startAngle;if(y._lastNeedleAngle=_,Y.isBrowser()&&t.globals.shouldAnimate&&(v||t.globals.dataChanged)&&b!==_){let e=i.node;e.setAttribute(`transform-origin`,`${d} ${p}`),e.setAttribute(`transform`,`rotate(${b})`);let n=r.animation?.duration&&Number(r.animation.duration)||r.animationSpeed&&Number(r.animationSpeed)||t.config.chart.animations.dynamicAnimation?.speed||t.config.chart.animations.speed||800,a=v?e=>1+2.70158*(e-1)**3+1.70158*(e-1)**2:e=>1-(1-e)**3,o=performance.now(),s=t=>{let r=Math.max(0,Math.min(1,(t-o)/n)),i=b+(_-b)*a(r);e.setAttribute(`transform`,`rotate(${i})`),r<1&&X.requestAnimationFrame(s)};X.requestAnimationFrame(s)}else i.attr({"transform-origin":`${d} ${p}`,transform:`rotate(${_})`});return i}drawHollow(e){let t=new Q(this.w),n=this.w.config.plotOptions.radialBar.hollow,r=t.drawCircle(e.size*2),i={class:`apexcharts-radialbar-hollow`,cx:e.centerX,cy:e.centerY,r:e.size,fill:e.fill};return(n.stroke||n.strokeDasharray)&&(i.stroke=n.stroke||`transparent`,i[`stroke-width`]=n.strokeWidth??1,n.strokeDasharray&&(i[`stroke-dasharray`]=n.strokeDasharray)),r.attr(i),r}drawHollowImage(e,t,n,r){let i=this.w,a=new qv(this.w),o=Z.randomId(),s=i.config.plotOptions.radialBar.hollow.image;if(i.config.plotOptions.radialBar.hollow.imageClipped)a.clippedImgArea({width:n,height:n,image:s,patternID:`pattern${i.globals.cuid}${o}`}),r=`url(#pattern${i.globals.cuid}${o})`;else{let n=i.config.plotOptions.radialBar.hollow.imageWidth,r=i.config.plotOptions.radialBar.hollow.imageHeight;if(n===void 0&&r===void 0){let n=i.dom.Paper.image(s,function(t){this.move(e.centerX-t.width/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-t.height/2+i.config.plotOptions.radialBar.hollow.imageOffsetY)});t.add(n)}else{let a=i.dom.Paper.image(s,function(){this.move(e.centerX-n/2+i.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-r/2+i.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(n,r)});t.add(a)}}return r}getStrokeWidth(e){let t=this.w;return e.size*(100-parseInt(t.config.plotOptions.radialBar.hollow.size,10))/100/(e.series.length+1)-this.margin}onBarLabelClick(e){let t=e.target,n=parseInt(t.getAttribute(`rel`)??``,10)-1,r=this.barLabels.onClick,i=this.w;r&&r(i.seriesData.seriesNames[n],{w:i,seriesIndex:n})}},Rx=class extends px{draw(e,t){let n=this.w,r=new Q(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=e,this.seriesRangeStart=n.rangeData.seriesRangeStart,this.seriesRangeEnd=n.rangeData.seriesRangeEnd,this.barHelpers.initVariables(e);let i=r.group({class:`apexcharts-rangebar-series apexcharts-plot-series`});for(let a=0;a<e.length;a++){let o,s,c=n.globals.comboCharts?t[a]:a,{columnGroupIndex:l}=this.barHelpers.getGroupIndex(c),u=r.group({class:`apexcharts-series`,seriesName:Z.escapeString(n.seriesData.seriesNames[c]),rel:a+1,"data:realIndex":c});dy.addCollapsedClassToSeries(this.w,u,c),e[a].length>0&&(this.visibleI+=1);let d=0;this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[c][0],d=c);let f=this.barHelpers.initialPositions(c),{y:p,zeroW:m,x:h,zeroH:g}=f,_=f.barWidth??0,v=f.barHeight??0,y=f.yDivision??0,b=f.xDivision??0;s=p,o=h;let x=r.group({class:`apexcharts-datalabels`,"data:realIndex":c}),S=r.group({class:`apexcharts-rangebar-goals-markers`});for(let t=0;t<n.globals.dataPoints;t++){let r=this.barHelpers.getStrokeWidth(a,t,c),i=this.seriesRangeStart[a][t],p=this.seriesRangeEnd[a][t],h=null,C=null,w=null,T={x:o,y:s,strokeWidth:r,elSeries:u},E=this.seriesLen;if(n.config.plotOptions.bar.rangeBarGroupRows&&(E=1),n.config.series[a].data?.[t]===void 0)break;if(this.isHorizontal){w=s+v*this.visibleI;let e=(y-v*E)/2;if(n.config.series[a].data?.[t]?.x){let n=this.detectOverlappingBars({i:a,j:t,barYPosition:w,srty:e,barHeight:v,yDivision:y,initPositions:f});v=n.barHeight,w=n.barYPosition}h=this.drawRangeBarPaths(K({indexes:{i:a,j:t,realIndex:c},barHeight:v,barYPosition:w,zeroW:m,yDivision:y,y1:i,y2:p},T)),_=h.barWidth}else{n.axisFlags.isXNumeric&&(o=(n.seriesData.seriesX[a][t]-n.globals.minX)/this.xRatio-_/2),C=o+_*this.visibleI;let e=(b-_*E)/2;if(n.config.series[a].data?.[t]?.x){let n=this.detectOverlappingBars({i:a,j:t,barXPosition:C,srtx:e,barWidth:_,xDivision:b,initPositions:f});_=n.barWidth,C=n.barXPosition}h=this.drawRangeColumnPaths(K({indexes:{i:a,j:t,realIndex:c,translationsIndex:d},barWidth:_,barXPosition:C,zeroH:g,xDivision:b},T)),v=h.barHeight}let D=this.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:w,goalX:h.goalX,goalY:h.goalY,barHeight:v,barWidth:_});D&&S.add(D),s=h.y,o=h.x;let O=this.barHelpers.getPathFillColor(e,a,t,c);this.renderSeries({realIndex:c,pathFill:O.color,lineFill:O.useRangeColor?O.color:n.globals.stroke.colors[c],j:t,i:a,x:o,y:s,y1:i,y2:p,pathFrom:h.pathFrom,pathTo:h.pathTo,strokeWidth:r,elSeries:u,series:e,barHeight:v,barWidth:_,barXPosition:C,barYPosition:w,columnGroupIndex:l,elDataLabelsWrap:x,elGoalsMarkers:S,visibleSeries:this.visibleI,type:`rangebar`})}i.add(u)}return i}detectOverlappingBars({i:e,j:t,barYPosition:n,barXPosition:r,srty:i,srtx:a,barHeight:o,barWidth:s,yDivision:c,xDivision:l,initPositions:u}){let d=this.w,f=[],p=d.config.series[e].data?.[t]?.rangeName,m=d.config.series[e].data?.[t]?.x,h=Array.isArray(m)?m.join(` `):m,g=d.labelData.labels.map(e=>Array.isArray(e)?e.join(` `):e).indexOf(h),_=d.rangeData.seriesRange[e].findIndex(e=>e.x===h&&e.overlaps?.size>0);return this.isHorizontal?(n=d.config.plotOptions.bar.rangeBarGroupRows?i+c*g:i+o*this.visibleI+c*g,_>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(f=Array.from(d.rangeData.seriesRange[e][_].overlaps),f.indexOf(p)>-1&&(o=u.barHeight/f.length,n=o*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+f.indexOf(p))+c*g))):(g>-1&&!d.labelData.timescaleLabels.length&&(r=d.config.plotOptions.bar.rangeBarGroupRows?a+l*g:a+s*this.visibleI+l*g),_>-1&&!d.config.plotOptions.bar.rangeBarOverlap&&(f=Array.from(d.rangeData.seriesRange[e][_].overlaps),f.indexOf(p)>-1&&(s=u.barWidth/f.length,r=s*this.visibleI+l*(100-parseInt(this.barOptions.barWidth,10))/100/2+s*(this.visibleI+f.indexOf(p))+l*g))),{barYPosition:n,barXPosition:r,barHeight:o,barWidth:s}}drawRangeColumnPaths({indexes:e,x:t,xDivision:n,barWidth:r,barXPosition:i,zeroH:a}){let o=this.w,{i:s,j:c,realIndex:l,translationsIndex:u}=e,d=this.yRatio[u],f=this.getRangeValue(l,c),p=Math.min(f.start,f.end),m=Math.max(f.start,f.end);this.series[s]?.[c]===void 0||this.series[s]?.[c]===null?p=a:(p=a-p/d,m=a-m/d);let h=Math.abs(m-p),g=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:r,y1:p,y2:m,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:l,i:l,j:c,w:o});if(!o.axisFlags.isXNumeric)t+=n;else{let e=this.getBarXForNumericXAxis({x:t,j:c,realIndex:l,barWidth:r});t=e.x,i=e.barXPosition}return{pathTo:g.pathTo,pathFrom:g.pathFrom,barHeight:h,x:t,y:f.start<0&&f.end<0?p:m,goalY:this.barHelpers.getGoalValues(`y`,null,a,s,c,u),barXPosition:i}}preventBarOverflow(e){let t=this.w;return e<0&&(e=0),e>t.layout.gridWidth&&(e=t.layout.gridWidth),e}drawRangeBarPaths({indexes:e,y:t,y1:n,y2:r,yDivision:i,barHeight:a,barYPosition:o,zeroW:s}){let c=this.w,{realIndex:l,j:u}=e,d=this.preventBarOverflow(s+n/this.invertedYRatio),f=this.preventBarOverflow(s+r/this.invertedYRatio),p=this.getRangeValue(l,u),m=Math.abs(f-d),h=this.barHelpers.getBarpaths({barYPosition:o,barHeight:a,x1:d,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:l,realIndex:l,j:u,w:c});return c.axisFlags.isXNumeric||(t+=i),{pathTo:h.pathTo,pathFrom:h.pathFrom,barWidth:m,x:p.start<0&&p.end<0?d:f,goalX:this.barHelpers.getGoalValues(`x`,s,null,l,u,0),y:t}}getRangeValue(e,t){let n=this.w;return{start:n.rangeData.seriesRangeStart[e][t],end:n.rangeData.seriesRangeEnd[e][t]}}};function zx(e,t){let n=0;for(let t=0;t<e.length;t++)n+=e[t];let r=t/n,i=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]*r;return i}function Bx(e,t,n,r){let i=r*r,a=n*n;return Math.max(i*t/a,a/(i*e))}function Vx(e,t,n,r,i,a){return e===0||Bx(t,n,r,a)>=Bx(Math.min(t,i),Math.max(n,i),r+i,a)}
1163function Hx(e,t,n,r,i,a,o,s){if(o>=s){let o=r/s,c=a;for(let r=0;r<n;r++){let n=t[r]/o;e.push([i,c,i+o,c+n]),c+=n}}else{let s=r/o,c=i;for(let r=0;r<n;r++){let n=t[r]/s;e.push([c,a,c+n,a+s]),c+=n}}}function Ux(e,t,n,r,i){let a=[],o=e.length;if(o===0)return a;let s=Array(o),c=0,l=0,u=1/0,d=-1/0,f=0;for(;f<o;){let o=Math.min(r,i),p=e[f];if(Vx(c,u,d,l,p,o))s[c]=p,c++,l+=p,p<u&&(u=p),p>d&&(d=p),f++;else{if(Hx(a,s,c,l,t,n,r,i),r>=i){let e=l/i;t+=e,r-=e}else{let e=l/r;n+=e,i-=e}c=0,l=0,u=1/0,d=-1/0}}return c>0&&Hx(a,s,c,l,t,n,r,i),a}function Wx(e,t,n){let r=e.length,i=Array(r);for(let t=0;t<r;t++){let n=0,r=e[t];for(let e=0;e<r.length;e++)n+=r[e];i[t]=n}let a=Ux(zx(i,t*n),0,0,t,n),o=Array(r);for(let t=0;t<r;t++){let n=a[t],r=n[0],i=n[1],s=n[2]-r,c=n[3]-i;o[t]=Ux(zx(e[t],s*c),r,i,s,c)}return o}var Gx={generate:Wx},Kx=class{constructor(e,t){this.ctx=t,this.w=e,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Ax(e,t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}draw(e){let t=this.w,n=new Q(this.w,this.ctx),r=new qv(this.w),i=n.group({class:`apexcharts-treemap`});if(t.globals.noData)return i;let a=[];return e.forEach(e=>{let t=e.map(e=>Math.abs(e));a.push(t)}),this.negRange=this.helpers.checkColorRange(),t.config.series.forEach((e,t)=>{e.data.forEach(e=>{Array.isArray(this.labels[t])||(this.labels[t]=[]),this.labels[t].push(e.x)})}),Gx.generate(a,t.layout.gridWidth,t.layout.gridHeight).forEach((a,o)=>{let s=n.group({class:`apexcharts-series apexcharts-treemap-series`,seriesName:Z.escapeString(t.seriesData.seriesNames[o]),rel:o+1,"data:realIndex":o});if(n.setupEventDelegation(s,`.apexcharts-treemap-rect`),t.config.chart.dropShadow.enabled){let e=t.config.chart.dropShadow;new Uv(this.w).dropShadow(i,e,o)}let c=n.group({class:`apexcharts-data-labels`}),l={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},u=t.config.chart.animations,d=u.animateGradually,f=d&&d.enabled!==!1,p=Array(a.length).fill(0);if(f){let e=a.length||1,t=Math.min(d.delay||0,u.speed*.5/e);a.map((e,t)=>({j:t,area:(e[2]-e[0])*(e[3]-e[1])})).sort((e,t)=>t.area-e.area).forEach((e,n)=>{p[e.j]=n*t})}a.forEach((i,a)=>{let c=i[0],u=i[1],d=i[2],f=i[3];l.xMin=Math.min(l.xMin,c),l.yMin=Math.min(l.yMin,u),l.xMax=Math.max(l.xMax,d),l.yMax=Math.max(l.yMax,f);let m=this.helpers.getShadeColor(t.config.chart.type,o,a,this.negRange),h=m.color,g=r.fillPath({color:h,seriesNumber:o,dataPointIndex:a}),_=n.drawRect(c,u,d-c,f-u,t.config.plotOptions.treemap.borderRadius,`#fff`,1,this.strokeWidth,t.config.plotOptions.treemap.useFillColorAsStroke?h:t.globals.stroke.colors[o]);_.attr({cx:c,cy:u,index:o,i:o,j:a,width:d-c,height:f-u,fill:g}),_.node.classList.add(`apexcharts-treemap-rect`);let v={x:c+(d-c)/2,y:u+(f-u)/2,width:0,height:0},y={x:c,y:u,width:d-c,height:f-u};if(t.config.chart.animations.enabled&&!t.globals.dataChanged){let e=1;t.globals.resized||(e=t.config.chart.animations.speed),this.animateTreemap(_,v,y,e,p[a]||0)}if(t.globals.dataChanged){let e=1;this.dynamicAnim.enabled&&t.globals.shouldAnimate&&(e=this.dynamicAnim.speed,t.globals.previousPaths[o]&&t.globals.previousPaths[o][a]&&t.globals.previousPaths[o][a].rect&&(v=t.globals.previousPaths[o][a].rect),this.animateTreemap(_,v,y,e))}let b=this.getFontSize(i),x=t.config.dataLabels.formatter(this.labels[o][a],{value:t.seriesData.series[o][a],seriesIndex:o,dataPointIndex:a,w:t});t.config.plotOptions.treemap.dataLabels.format===`truncate`&&(b=parseInt(String(t.config.dataLabels.style.fontSize),10),x=this.truncateLabels(String(x),b,c,u,d,f));let S=null;t.seriesData.series[o][a]&&(S=this.helpers.calculateDataLabels({text:x,x:(c+d)/2,y:(u+f)/2+this.strokeWidth/2+b/3,i:o,j:a,colorProps:m,fontSize:b,series:e})),t.config.dataLabels.enabled&&S&&this.rotateToFitLabel(S,b,x,c,u,d,f),s.add(_),S!==null&&s.add(S)});let m=t.config.plotOptions.treemap.seriesTitle;if(t.config.series.length>1&&m&&m.show){let e=t.config.series[o].name||``;if(e&&l.xMin<1/0&&l.yMin<1/0){let{offsetX:r,offsetY:i,borderColor:a,borderWidth:o,borderRadius:c,style:u}=m,d=u.color||t.config.chart.foreColor,f={left:u.padding.left,right:u.padding.right,top:u.padding.top,bottom:u.padding.bottom},p=n.getTextRects(e,u.fontSize,u.fontFamily),h=p.width+f.left+f.right,g
1163=p.height+f.top+f.bottom,_=l.xMin+(r||0),v=l.yMin+(i||0),y=n.drawRect(_,v,h,g,c,u.background,1,o,a),b=n.drawText({x:_+f.left,y:v+f.top+(p?.height??0)*.75,text:e,fontSize:u.fontSize,fontFamily:u.fontFamily,fontWeight:u.fontWeight,foreColor:d,cssClass:u.cssClass||``});s.add(y),s.add(b)}}s.add(c),i.add(s)}),i}getFontSize(e){let t=this.w;function n(e){let t,r=0;if(Array.isArray(e[0]))for(t=0;t<e.length;t++)r+=n(e[t]);else for(t=0;t<e.length;t++)r+=e[t].length;return r}function r(e){let t,n=0;if(Array.isArray(e[0]))for(t=0;t<e.length;t++)n+=r(e[t]);else for(t=0;t<e.length;t++)n+=1;return n}let i=n(this.labels)/r(this.labels);function a(e,n){let r=e*n;return Math.min(r**.5/i,parseInt(t.config.dataLabels.style.fontSize,10))}return a(e[2]-e[0],e[3]-e[1])}rotateToFitLabel(e,t,n,r,i,a,o){let s=new Q(this.w),c=s.getTextRects(n,String(t));if(c.width+this.w.config.stroke.width+5>a-r&&c.width<=o-i){let t=s.rotateAroundCenter(e.node);e.node.setAttribute(`transform`,`rotate(-90 ${t.x} ${t.y}) translate(${c.height/3})`)}}truncateLabels(e,t,n,r,i,a){let o=new Q(this.w),s=o.getTextRects(e,String(t)).width+this.w.config.stroke.width+5>i-n&&a-r>i-n?a-r:i-n,c=o.getTextBasedOnMaxWidth({text:e,maxWidth:s,fontSize:t});return e.length!==c.length&&s/t<5?``:c}animateTreemap(e,t,n,r,i=0){let a=new Hv(this.w);a.animateRect(e,t,n,r,()=>{a.animationCompleted(e)},i)}};Fb.use({line:Nx,area:Nx,scatter:Nx,bubble:Nx,rangeArea:Nx,bar:px,column:px,barStacked:mx,rangeBar:Rx,candlestick:Sx,boxPlot:Sx,violin:Ox,pie:Fx,donut:Fx,polarArea:Fx,radialBar:Lx,radar:Ix,heatmap:jx,treemap:Kx});var qx=[`animationEnd`,`beforeMount`,`mounted`,`updated`,`click`,`mouseMove`,`mouseLeave`,`legendClick`,`markerClick`,`selection`,`dataPointSelection`,`dataPointMouseEnter`,`dataPointMouseLeave`,`beforeZoom`,`beforeResetZoom`,`zoomed`,`scrolled`,`brushScrolled`],Jx=Ee({name:`apexchart`,props:{options:{type:Object},type:{type:String},series:{type:Array,required:!0},width:{default:`100%`},height:{default:`auto`}},emits:qx,setup(e,{emit:t}){let n=I(null),r=I(null),i=e=>e&&typeof e==`object`&&!Array.isArray(e)&&e!=null,a=(e,t)=>{typeof Object.assign!=`function`&&function(){Object.assign=function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);let t=Object(e);for(let e=1;e<arguments.length;e++){let n=arguments[e];if(n!=null)for(let e in n)n.hasOwnProperty(e)&&(t[e]=n[e])}return t}}();let n=Object.assign({},e);return i(e)&&i(t)&&Object.keys(t).forEach(r=>{i(t[r])&&r in e?n[r]=a(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n},o=e=>JSON.parse(JSON.stringify(e)),s=async()=>{if(await _e(),r.value)return;let i={chart:{type:e.type||e.options.chart&&e.options.chart.type||`line`,height:e.height,width:e.width,events:{}},series:o(e.series)},s=e.options.chart?e.options.chart.events:null;qx.forEach(e=>{let n=(...n)=>t(e,...n);i.chart.events[e]=(...t)=>{n(...t),s&&s.hasOwnProperty(e)&&s[e](...t)}});let c=a(e.options,i);return r.value=new Fb(n.value,c),r.value.render()},c=()=>(l(),s()),l=()=>{r.value.destroy(),r.value=null},u=(e,t)=>r.value.updateSeries(e,t),d=(e,t,n,i)=>r.value.updateOptions(e,t,n,i),f=e=>r.value.toggleSeries(e),p=e=>{r.value.showSeries(e)},m=e=>{r.value.hideSeries(e)},h=(e,t)=>r.value.appendSeries(e,t),g=()=>{r.value.resetSeries()},_=(e,t)=>{r.value.toggleDataPointSelection(e,t)},v=e=>r.value.appendData(e),y=(e,t)=>r.value.zoomX(e,t),b=e=>r.value.dataURI(e),x=e=>r.value.setLocale(e),S=(e,t)=>{r.value.addXaxisAnnotation(e,t)},C=(e,t)=>{r.value.addYaxisAnnotation(e,t)},w=(e,t)=>{r.value.addPointAnnotation(e,t)},E=(e,t)=>{r.value.removeAnnotation(e,t)},O=()=>{r.value.clearAnnotations()};D(()=>{window.ApexCharts=Fb}),T(()=>{n.value=M().proxy.$el,s()}),A(()=>{r.value&&l()});let k=Oe(e),j=null,N=t=>{j||(j={options:!1,series:!1},_e(()=>{let t=j;if(j=null,!r.value){s();return}if(t.options&&t.series){let t=o(e.options);t.series=o(e.series),r.value.updateOptions(t)}else t.options?r.value.updateOptions(o(e.options)):t.series&&r.value.updateSeries(o(e.series))})),j[t]=!0};return Ce(k.options,()=>{N(`options`)}),Ce(k.series,()=>{N(`series`)},{deep:!0}),Ce(k.type,()=>{c()}),Ce(k.width,()=>{c()}),Ce(k.height,()=>{c()}
1163),{chart:r,init:s,refresh:c,destroy:l,updateOptions:d,updateSeries:u,toggleSeries:f,showSeries:p,hideSeries:m,resetSeries:g,zoomX:y,toggleDataPointSelection:_,appendData:v,appendSeries:h,addXaxisAnnotation:S,addYaxisAnnotation:C,addPointAnnotation:w,removeAnnotation:E,clearAnnotations:O,setLocale:x,dataURI:b}},render(){return N(`div`,{class:`vue-apexcharts`})}}),Yx=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Xx=Ee({name:`apexchart-server`,props:{type:{type:String,default:`line`},width:{type:[Number,String],default:400},height:{type:[Number,String],default:300},series:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})},className:{type:String,default:``}},setup(e){return{chartHTML:I(``)}}}),Zx=[`innerHTML`];function Qx(e,t,n,r,i,a){return _(),F(`div`,{innerHTML:e.chartHTML,class:S(e.className)},null,10,Zx)}var $x=Yx(Xx,[[`render`,Qx]]),eS=Ee({name:`apexchart-hydrate`,props:{clientOptions:{type:Object,default:()=>({})},selector:{type:String,default:`[data-apexcharts-hydrate]`}},setup(e){let t=[];T(async()=>{try{let{default:n}=await B(async()=>{let{default:e}=await import(`./EtAvBWZz.js`);return{default:e}},[],import.meta.url);t=n.hydrateAll(e.selector,e.clientOptions)}catch(e){console.error(`Failed to hydrate ApexCharts:`,e)}}),A(()=>{t.forEach(e=>{e&&e.destroy&&e.destroy()}),t=[]})},render(){return null}});Jx.install=e=>{e.component(Jx.name,Jx),e.component($x.name,$x),e.component(eS.name,eS)};var tS=d(e=>{e.vueApp.component(`VueApexCharts`,Jx)}),nS=d(e=>{let n=t();{let e=n.public.matomoUrl,t=n.public.matomoSiteId;if(!e||!t)return;window._paq=window._paq||[];let r=window._paq;r.push([`enableLinkTracking`]),r.push([`setTrackerUrl`,`${e}/matomo.php`]),r.push([`setSiteId`,t]);let i=document.createElement(`script`);i.async=!0,i.src=`${e}/matomo.js`,document.head.appendChild(i)}let r=Xe(),i=!1,a;function o(e){let t=e.query.utm_source||e.query.mtm_source;if(t)return String(t);let n=typeof document<`u`?document.referrer:``;if(!n)return`direct`;try{let e=new URL(n).hostname.replace(/^www\./,``);return e.endsWith(`science-fitness.de`)?`internal`:e}catch{return`direct`}}function s(){return new Date().toLocaleString(`de-DE`,{month:`long`,year:`numeric`})}function c(e){let t=window?._paq;t&&a!==e.fullPath&&(a=e.fullPath,i||=(t.push([`setCustomDimension`,1,o(e)]),!0),(e.path===`/magazin`||e.path.startsWith(`/magazin/`))&&t.push([`setCustomDimension`,3,s()]),t.push([`setCustomUrl`,e.fullPath]),t.push([`setDocumentTitle`,document.title]),t.push([`trackPageView`]))}e.hook(`app:mounted`,()=>c(r.currentRoute.value)),r.afterEach(async(e,t,n)=>{n||(await _e(),c(e))})}),rS=()=>o().$supabase.client;function iS(){return ot(`sf-auth-ready`,()=>!1)}var aS=[Ua,to,Sc,dh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Yh,Zh,G_,q_,Y_,av,tS,nS,d(()=>{let e=rS(),t=uh(),n=lh(),r=iS(),i=!1;function a(e){return e instanceof Error&&e.message.includes(`Invalid Refresh Token`)}async function o(){if(!i){i=!0;try{await e.auth.signOut({scope:`local`})}finally{n.value=null,t.value=null,r.value=!0,i=!1}}}let s=e.auth.getClaims.bind(e.auth);e.auth.getClaims=(async(...e)=>{let t=await s(...e);return a(t.error)&&await o(),t});async function c(){let n=await e.auth.getClaims();a(n.error)||(t.value=n.data?.claims??null,r.value=!0)}c(),e.auth.onAuthStateChange((e,i)=>{if(!i){n.value=null,t.value=null,r.value=!0;return}r.value=!1,c()})}),d({enforce:`post`,env:{islands:!1},setup(){let{tagPriority:e}=t().public[`seo-utils`],n=ot(`nuxt-seo-utils:routeRules`,()=>null);if(n.value){let{head:t,seoMeta:r}=n.value;t&&ti(t),r&&ni(r,{tagPriority:e})}}})];function oS(e,t){let n=t/e*100;return 2/Math.PI*100*Math.atan(n/50)}function sS(e={}){let{duration:t=2e3,throttle:n=200,hideDelay:r=500,resetDelay:i=400}=e,a=e.estimatedProgress||oS,s=o(),c=pe(0),l=pe(!1),u=pe(!1),d=!1,f,p,m,h,g=(e={})=>{b(),u.value=!1,_(0,e)};function _(e=0,t={}){if(s.isHydrating)return;if(e>=100)return y({force:t.force});b(),x(),c.value=e<0?0:e;let r=t.force?0:n;r?p=setTimeout(()=>{l.value=!0,S()},r):(l.value=!0,S())}function v(){m=setTimeout(()=>{l.value=!1,h=setTimeout(()=>{c.value=0},i)},r)}function y(e={}){c.value=100,d=!0,x(),b(),e.error&&(u.value=!0),e.force?(c.value=0,l.value=!1):v()}function b(){clearTimeout(m),clearTimeout(h)}function x(){clearTimeout(p),cancelAnimationFrame(f)}function S(){d=!1;let e;function n(r){if(d)return;e??=r;let i=r-e;c.value=Math.max(0,Math.min(100,a(t,i))),f=requestAnimationFrame(n)}f=requestAnimationFrame(n)}let C=()=>{};{let e=s.hook(`page:loading:start`,()=>{g()}),t=s.hook(`page:loading:end`,()=>{y()}),n=s.hook(`vue:error`,()=>y({error:!0}));C=()=>{n(),e(),t(),x(),b()}}return{_cleanup:C,progress:me(c),isLoading:me(l),error:me(u),start:g,set:_,finish:y,clear:x}}function cS(e={}
1163){let t=o(),n=t._loadingIndicator||=sS(e);return Se()&&(t._loadingIndicatorDeps||=0,t._loadingIndicatorDeps++,we(()=>{t._loadingIndicatorDeps--,t._loadingIndicatorDeps===0&&(n._cleanup(),delete t._loadingIndicator)})),n}var lS=Ee({name:`NuxtLoadingIndicator`,props:{throttle:{type:Number,default:200},duration:{type:Number,default:2e3},hideDelay:{type:Number,default:500},resetDelay:{type:Number,default:400},height:{type:Number,default:3},color:{type:[String,Boolean],default:`repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)`},errorColor:{type:String,default:`repeating-linear-gradient(to right,#f87171 0%,#ef4444 100%)`},estimatedProgress:{type:Function,required:!1}},setup(e,{slots:t,expose:n}){let{progress:r,isLoading:i,error:a,start:o,finish:s,clear:c}=cS({duration:e.duration,throttle:e.throttle,hideDelay:e.hideDelay,resetDelay:e.resetDelay,estimatedProgress:e.estimatedProgress});return n({progress:r,isLoading:i,error:a,start:o,finish:s,clear:c}),()=>N(`div`,{class:`nuxt-loading-indicator`,style:{position:`fixed`,top:0,right:0,left:0,pointerEvents:`none`,width:`auto`,height:`${e.height}px`,opacity:+!!i.value,background:a.value?e.errorColor:e.color||void 0,backgroundSize:`${r.value>0?100/r.value*100:0}% auto`,transform:`scaleX(${r.value}%)`,transformOrigin:`left`,transition:`transform 0.1s, height 0.4s, opacity 0.4s`,zIndex:999999}},t)}}),uS=(e=`RouteProvider`)=>Ee({name:e,props:{route:{type:Object,required:!0},vnode:Object,vnodeRef:Object,renderKey:String,trackRootNodes:Boolean,routeRecord:Object},setup(e){let t=e.renderKey,n=e.route,r={};for(let i in e.route)Object.defineProperty(r,i,{get:()=>t===e.renderKey?e.route[i]:n[i],enumerable:!0});return ne(Fe,ye(r)),()=>e.vnode?N(e.vnode,{ref:e.vnodeRef}):e.vnode}}),dS=uS(),fS=new WeakMap,pS=Ee({name:`NuxtPage`,inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(e,{attrs:t,slots:n,expose:r}){let i=o(),a=I(),s=v(Fe,null),c=new Set,l;r({pageRef:a});let u=v(Ne,null),d,f=i.deferHydration(),p=!1,m=!1,h,g=0;if(i.isHydrating){let e=i.hooks.hookOnce(`app:error`,f),t=Xe().beforeEach(()=>{e(),t()})}e.pageKey&&Ce(()=>e.pageKey,(e,t)=>{e!==t&&i.callHook(`page:loading:start`)});let _=!1;{let e=Xe().beforeResolve(()=>{_=!1});A(()=>{e(),f()})}return()=>N(Vi,{name:e.name,route:e.route,...t},{default:gS(t=>{let r=mS(s,t.route,t.Component),o=s&&s.matched.length===t.route.matched.length;if(!t.Component){if(d&&!o&&!vS(d))return d;f();return}if(d&&u&&!vS(d)&&!u.isCurrent(t.route))return d;if(r&&s&&(!u||u?.isCurrent(s)))return(o||d)&&!vS(d)?d:null;let v=oo(t,e.pageKey),y=hS(s,t.route,t.Component);!i.isHydrating&&l===v&&!y&&_e(()=>{_||(_=!0,i.callHook(`page:loading:end`))}),p&&l!==v&&m&&g++,l=v;let b=!!(e.transition??t.route.meta.pageTransition??!1),x=b&&Ft([e.transition,t.route.meta.pageTransition,!1,{onAfterLeave(){i[`~transitionFinish`]?.(),delete i[`~transitionFinish`],delete i[`~transitionPromise`],i.callHook(`page:transition:finish`,t.Component)}}]),S=e.keepalive??t.route.meta.keepalive??!1,C=t.Component.type,w=C.name||C.__name;t.route.meta.keepalive&&w&&c.add(w);let T;if(c.size>0&&e.keepalive==null&&(!S||typeof S==`object`&&S&&S.include)){let e=typeof S==`object`&&S?{...S}:{},t=e.include?Array.isArray(e.include)?e.include:[e.include]:[];T={...e,include:Array.from(new Set([...t,...c]))}}else T=S;return d=kt(b&&x,so(T,N(oe,{key:g,suspensible:!0,onPending:()=>{p=!0,b&&!i[`~transitionPromise`]&&(i[`~transitionPromise`]=new Promise(e=>{i[`~transitionFinish`]=e})),h=i.callHook(`page:start`,t.Component)}
1163,onResolve:async()=>{p=!1,m=!0,i.isHydrating&&i[`~restoreDeferredRoute`]?.();try{await _e(),i._route.sync?.(),await h,await i.callHook(`page:finish`,t.Component),!_&&!y&&(_=!0,await i.callHook(`page:loading:end`))}finally{f()}}},{default:()=>{let e={key:v||void 0,vnode:n.default?_S(n.default,t):t.Component,route:t.route,renderKey:v||void 0,trackRootNodes:b,vnodeRef:a,routeRecord:void 0};if(!T)return N(dS,e);let r=C,i=fS.get(r);return i||(i=uS(w),fS.set(r,i)),N(i,e)}}))).default(),d})})}});function mS(e,t,n){if(!e)return!1;let r=t.matched.findIndex(e=>e.components?.default===n?.type);if(r===-1)return!1;let i=t.matched.slice(0,r).filter(e=>e.components?.default);if(!i.length)return!1;let a=e.matched.filter(e=>e.components?.default);return i.some((e,t)=>e.components?.default!==a[t]?.components?.default)||n&&oo({route:t,Component:n})!==oo({route:e,Component:n})}function hS(e,t,n){return e?t.matched.findIndex(e=>e.components?.default===n?.type)<t.matched.length-1:!1}function gS(e){let t=(t=>{let n=e(t);return Array.isArray(n)?n:n==null||!k(n)?[fe()]:[n]});return t._n=!0,t}function _S(e,t){let n=e(t);return n.length===1?N(n[0]):N(xe,void 0,n)}function vS(e){return!!e&&(!!e.suspense?.isUnmounted||!!e.component?.isUnmounted)}var yS=Ee({name:`LayoutLoader`,inheritAttrs:!1,props:{name:String,layoutProps:Object},setup(e,t){return()=>N(Xh[e.name],e.layoutProps,t.slots)}}),bS=Ee({name:`NuxtLayout`,inheritAttrs:!1,props:{name:{type:[String,Boolean,Object],default:null},fallback:{type:[String,Object],default:null}},setup(e,t){let n=o(),r=v(Fe),i=!r||r===Ue()?Vt():r,a=P(()=>{let t=Bh(i,e.name);return t&&!(t in Xh)&&e.fallback&&(t=R(e.fallback)),t});ne(Pe,a);let s=pe();t.expose({layoutRef:s});let c=n.deferHydration();if(n.isHydrating){let e=n.hooks.hookOnce(`app:error`,c),t=Xe().beforeEach(()=>{e(),t()})}let l;return()=>{let r=!!a.value&&a.value in Xh&&!!(i?.meta.layoutTransition??!1),o=r&&Ft([i?.meta.layoutTransition,!1,{onBeforeLeave(){n[`~transitionPromise`]=new Promise(e=>{n[`~transitionFinish`]=e})},onAfterLeave(){n[`~transitionFinish`]?.(),delete n[`~transitionFinish`],delete n[`~transitionPromise`]}}]),u=l;return l=a.value,kt(o,{default:()=>N(oe,{suspensible:!0,onResolve:async()=>{await _e(c)}},{default:()=>N(xS,{layoutProps:g(t.attrs,i.meta.layoutProps??{},{ref:s}),key:a.value||void 0,name:a.value,shouldProvide:!e.name,isRenderingNewLayout:e=>e!==u&&e===a.value,hasTransition:r},t.slots)})}).default()}}}),xS=Ee({name:`NuxtLayoutProvider`,inheritAttrs:!1,props:{name:{type:[String,Boolean]},layoutProps:{type:Object},hasTransition:{type:Boolean},shouldProvide:{type:Boolean},isRenderingNewLayout:{type:Function,required:!0}},setup(e,t){let n=e.name;e.shouldProvide&&ne(Ne,{isCurrent:e=>n===!1||n===Bh(e)});let r=v(Fe),i=r&&r===Ue(),a=v(Ne,null);if(i){let t=Vt(),n={};for(let i in t){let o=i;Object.defineProperty(n,o,{enumerable:!0,get:()=>e.isRenderingNewLayout(e.name)&&(!a||a.isCurrent(t))?t[o]:r[o]})}ne(Fe,ye(n))}return()=>!n||typeof n==`string`&&!(n in Xh)?t.slots.default?.():N(yS,{key:n,layoutProps:e.layoutProps,name:n},t.slots)}});function SS(){ti({script:[{type:`application/ld+json`,innerHTML:JSON.stringify({"@context":`https://schema.org`,"@type":`Organization`,"@id":`https://science-fitness.de/#organization`,name:`Science-Fitness.de`,url:`https://science-fitness.de`,foundingDate:`2010`,areaServed:`DE`,specialty:`Evidence-based fitness and nutrition`,description:`Deutschlands führende Plattform für evidenzbasierte Fitness- und Ernährungsinformationen`,knowsAbout:[`Strength Training`,`Muscle Building`,`Nutrition`,`Weight Loss`,`Fitness`],founder:{"@type":`Person`,name:`Johannes Steinhart`,description:`Biomediziner (M.Sc.) und Trainer der Deutschen Fitnesslehrer-Vereinigung`},logo:{"@type":`ImageObject`,url:`https://science-fitness.de/images/sf_logo_square.png`},sameAs:[`https://www.facebook.com/SCIENCEFITNESSde`,`https://www.instagram.com/johannes.steinhart`,`https://www.youtube.com/@fitnessexperts6961`,`https://forum.science-fitness.de`]})}]})}var CS=1,wS=new class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)});publish=e=>
1163{this.subscribers.forEach(t=>t(e))};addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]};create=e=>{let{message:t,...n}=e,r=typeof e.id==`number`||e.id&&e.id?.length>0?e.id:CS++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0||e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r};dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e);message=(e,t)=>this.create({...t,message:e,type:`default`});error=(e,t)=>this.create({...t,type:`error`,message:e});success=(e,t)=>this.create({...t,type:`success`,message:e});info=(e,t)=>this.create({...t,type:`info`,message:e});warning=(e,t)=>this.create({...t,type:`warning`,message:e});loading=(e,t)=>this.create({...t,type:`loading`,message:e});promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],k(e))i=!1,this.create({id:n,type:`default`,message:e});else if(ES(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!k(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!k(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!k(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!k(r)?r:{message:r||``,id:n||``};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})};custom=(e,t)=>{let n=t?.id||CS++,r=this.toasts.find(e=>e.id===n),i=t?.dismissible===void 0||t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(r=>r.id===n?(this.publish({...r,component:e,dismissible:i,id:n,...t}),{...r,component:e,dismissible:i,id:n,...t}):r):this.addToast({component:e,dismissible:i,id:n,...t}),n};getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id))};function TS(e,t){let n=t?.id||CS++;return wS.create({message:e,id:n,type:`default`,...t}),n}var ES=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,DS=Object.assign(TS,{success:wS.success,info:wS.info,warning:wS.warning,error:wS.error,custom:wS.custom,message:wS.message,promise:wS.promise,dismiss:wS.dismiss,loading:wS.loading},{getHistory:()=>wS.toasts,getToasts:()=>wS.getActiveToasts()});function OS(e){return e.label!==void 0}var kS=3,AS=`24px`,jS=`16px`,MS=4e3,NS=356,PS=14,FS=45,IS=200;function LS(){let e=I(!1);return be(()=>{let t=()=>{e.value=document.hidden};return document.addEventListener(`visibilitychange`,t),()=>window.removeEventListener(`visibilitychange`,t)}),{isDocumentHidden:e}}function RS(...e){return e.filter(Boolean).join(` `)}function zS(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}function BS(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?jS:AS;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var VS=[`data-rich-colors`,`data-styled`,`data-mounted`,`data-promise`,`data-swiped`,`data-removed`,`data-visible`,`data-y-position`,`data-x-position`,`data-index`,`data-front`,`data-swiping`,`data-dismissible`,`data-type`,`data-invert`,`data-swipe-out`,`data-swipe-direction`,`data-expanded`,`data-testid`],HS=[`aria-label`,`data-disabled`,`data-close-button-position`],US=Ee({__name:`Toast`,props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:[`update:heights`,`update:height`,`removeToast`],setup(e,{emit:t}){let n=e,r=t,i=I(null),a=I(null),o=I(!1),s=I(!1),c=I(!1),l=I(!1),u=I(!1),d=I(0),f=I(0),p=I(n.toast.duration||n.duration||MS),m=I(null),h=I(null),v=P(()=>n.index===0),y=P(()=>n.index+1<=n.visibleToasts),b=P(()=>n.toast.type),C=P(()=>n.toast.dismissible!==!1),E=P(()=>n.toast.class||``),D=P(()=>n.descriptionClass||``),O=P(()=>{let e=n.toast.position||n.position,t=n.heights.filter(t=>t.position===e).findIndex(e=>e.toastId===n.toast.id);return t>=0?t:0}),k=P(()=>{let e=n.toast.position||n.position;return n.heights.filter(t=>
1163t.position===e).reduce((e,t,n)=>n>=O.value?e:e+t.height,0)}),j=P(()=>O.value*n.gap+k.value||0),M=P(()=>n.toast.closeButton??n.closeButton),N=P(()=>n.toast.duration||n.duration||MS),ee=I(0),ne=I(0),ae=I(null),oe=P(()=>n.position.split(`-`)),se=P(()=>oe.value[0]),ce=P(()=>oe.value[1]),le=P(()=>typeof n.toast.title!=`string`),de=P(()=>typeof n.toast.description!=`string`),{isDocumentHidden:pe}=LS(),me=P(()=>b.value&&b.value===`loading`);T(()=>{o.value=!0,p.value=N.value}),be(async()=>{if(!o.value||!h.value)return;await _e();let e=h.value,t=e.style.height;e.style.height=`auto`;let i=e.getBoundingClientRect().height;e.style.height=t,f.value=i,r(`update:height`,{toastId:n.toast.id,height:i,position:n.toast.position||n.position})});function he(){s.value=!0,d.value=j.value,setTimeout(()=>{r(`removeToast`,n.toast)},IS)}function ge(){if(me.value||!C.value)return{};he(),n.toast.onDismiss?.(n.toast)}function ve(e){e.button!==2&&!me.value&&C.value&&(m.value=new Date,d.value=j.value,e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(c.value=!0,ae.value={x:e.clientX,y:e.clientY}))}function ye(){if(l.value||!C.value)return;ae.value=null;let e=Number(h.value?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(h.value?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-(m.value?.getTime()||0),o=i.value===`x`?e:t,s=Math.abs(o)/r;if(Math.abs(o)>=FS||s>.11){d.value=j.value,n.toast.onDismiss?.(n.toast),i.value===`x`?a.value=e>0?`right`:`left`:a.value=t>0?`down`:`up`,he(),l.value=!0;return}h.value?.style.setProperty(`--swipe-amount-x`,`0px`),h.value?.style.setProperty(`--swipe-amount-y`,`0px`),u.value=!1,c.value=!1,i.value=null}function Se(e){if(!ae.value||!C.value||(window?.getSelection()?.toString()?.length??!1))return;let t=e.clientY-ae.value.y,r=e.clientX-ae.value.x,a=n.swipeDirections??zS(n.position);!i.value&&(Math.abs(r)>1||Math.abs(t)>1)&&(i.value=Math.abs(r)>Math.abs(t)?`x`:`y`);let o={x:0,y:0},s=e=>1/(1.5+Math.abs(e)/20);if(i.value===`y`){if(a.includes(`top`)||a.includes(`bottom`)){if(a.includes(`top`)&&t<0||a.includes(`bottom`)&&t>0)o.y=t;else{let e=t*s(t);o.y=Math.abs(e)<Math.abs(t)?e:t}}}else if(i.value===`x`&&(a.includes(`left`)||a.includes(`right`))){if(a.includes(`left`)&&r<0||a.includes(`right`)&&r>0)o.x=r;else{let e=r*s(r);o.x=Math.abs(e)<Math.abs(r)?e:r}}(Math.abs(o.x)>0||Math.abs(o.y)>0)&&(u.value=!0),h.value?.style.setProperty(`--swipe-amount-x`,`${o.x}px`),h.value?.style.setProperty(`--swipe-amount-y`,`${o.y}px`)}T(()=>{if(o.value=!0,!h.value)return;let e=h.value.getBoundingClientRect().height;f.value=e;let t=[{toastId:n.toast.id,height:e,position:n.toast.position},...n.heights];r(`update:heights`,t)}),A(()=>{h.value&&r(`removeToast`,n.toast)}),be(e=>{if(n.toast.promise&&b.value===`loading`||n.toast.duration===1/0||n.toast.type===`loading`)return;let t;n.expanded||n.interacting||pe.value?(()=>{if(ne.value<ee.value){let e=new Date().getTime()-ee.value;p.value-=e}ne.value=new Date().getTime()})():p.value!==1/0&&(ee.value=new Date().getTime(),t=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),he()},p.value)),e(()=>{clearTimeout(t)})}),Ce(()=>n.toast.delete,e=>{e!==void 0&&e&&(he(),n.toast.onDismiss?.(n.toast))},{deep:!0});function we(){c.value=!1,i.value=null,ae.value=null}return(e,t)=>(_(),F(`li`,{tabindex:`0`,ref_key:`toastRef`,ref:h,class:S(R(RS)(n.class,E.value,e.classes?.toast,e.toast.classes?.toast,e.classes?.[b.value],e.toast?.classes?.[b.value])),"data-sonner-toast":``,"data-rich-colors":e.toast.richColors??e.defaultRichColors,"data-styled":!(e.toast.component||e.toast?.unstyled||e.unstyled),"data-mounted":o.value,"data-promise":!!e.toast.promise,"data-swiped":u.value,"data-removed":s.value,"data-visible":y.value,"data-y-position":se.value,"data-x-position":ce.value,"data-index":e.index,"data-front":v.value,"data-swiping":c.value,"data-dismissible":C.value,"data-type":b.value,"data-invert":e.toast.invert||e.invert,"data-swipe-out":l.value,"data-swipe-direction":a.value,"data-expanded":!!(e.expanded||e.expandByDefault&&o.value),"data-testid":e.toast.testId,style:ie({"--index":e.index,"--toasts-before":e.index,"--z-index":e.toasts.length-e.index,"--offset":`${s.value?d.value:j.value}px`,"--initial-height":e.expandByDefault?`auto`:`${f.value}px`,...e.style,...n.toast.style}),onDragend:we,onPointerdown:ve,onPointerup:ye,onPointermove:Se},[M.value&&!e.toast.component&&b.value!==`loading`?(_(),F(`button`,{key:0,"aria-label":e.closeButtonAriaLabel||`Close toast`,"data-disabled":me.value,"data-close-button":`true`,"data-close-button-position":e.closeButtonPosition,class:S(R(RS)(e.classes?.closeButton,e.toast?.classes?.closeButton)),onClick:ge},[e.icons?.close?(_(),ue(w(e.icons?.close),{key:0})):re(e.$slots,`close-icon`,{key:1})],10,HS)):fe(`v-if`,!0),e.toast.component?(_(),ue(w(e.toast.component),g({key:1},e.toast.componentProps,{onCloseToast:ge,isPaused:e.$props.expanded||e.$props.interacting||R(pe)}),null,16,[`isPaused`])):(_(),F(xe,{key:2},[b.value!=="default"||e.toast.icon||e.toast.promise?(_(),F(`div`,{key:0,"data-icon":``,class:S(R(RS)(e.classes?.icon,e.toast?.classes?.icon))},[e.toast.icon?(_(),ue(w(e.toast.icon),{key:0})):(_(),F(xe,{key:1},[b.value===`loading`?re(e.$slots,`loading-icon`,{key:0}):b.value===`success`?re(e.$slots,`success-icon`,{key:1}):b.value===`error`?re(e.$slots,`error-icon`,{key:2}):b.value===`warning`?re(e.$slots,`warning-icon`,{key:3}):b.value===`info`?re(e.$slots,`info-icon`,{key:4}):fe(`v-if`,!0)],64))],2)):fe(`v-if`,!0),L(`div`,{"data-content":``,class:S(R(RS)(e.classes?.content,e.toast?.classes?.content))},[L(`div`,{"data-title":``,class:S(R(RS)(e.classes?.title,e.toast.classes?.title))},[le.value?(_(),ue(w(e.toast.title),te(g({key:0},e.toast.componentProps)),null,16)):(_(),F(xe,{key:1}
1163,[Te(x(e.toast.title),1)],64))],2),e.toast.description?(_(),F(`div`,{key:0,"data-description":``,class:S(R(RS)(e.descriptionClass,D.value,e.classes?.description,e.toast.classes?.description))},[de.value?(_(),ue(w(e.toast.description),te(g({key:0},e.toast.componentProps)),null,16)):(_(),F(xe,{key:1},[Te(x(e.toast.description),1)],64))],2)):fe(`v-if`,!0)],2),e.toast.cancel?(_(),F(`button`,{key:1,style:ie(e.toast.cancelButtonStyle||e.cancelButtonStyle),class:S(R(RS)(e.classes?.cancelButton,e.toast.classes?.cancelButton)),"data-button":``,"data-cancel":``,onClick:t[0]||=t=>{R(OS)(e.toast.cancel)&&C.value&&(e.toast.cancel.onClick?.(t),he())}},x(R(OS)(e.toast.cancel)?e.toast.cancel?.label:e.toast.cancel),7)):fe(`v-if`,!0),e.toast.action?(_(),F(`button`,{key:2,style:ie(e.toast.actionButtonStyle||e.actionButtonStyle),class:S(R(RS)(e.classes?.actionButton,e.toast.classes?.actionButton)),"data-button":``,"data-action":``,onClick:t[1]||=t=>{R(OS)(e.toast.action)&&(e.toast.action.onClick?.(t),!t.defaultPrevented&&he())}},x(R(OS)(e.toast.action)?e.toast.action?.label:e.toast.action),7)):fe(`v-if`,!0)],64))],46,VS))}}),WS=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},GS={},KS={xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stoke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`};function qS(e,t){return _(),F(`svg`,KS,t[0]||=[L(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`},null,-1),L(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`},null,-1)])}var JS=WS(GS,[[`render`,qS]]),YS=[`data-visible`],XS={class:`sonner-spinner`},ZS=Ee({__name:`Loader`,props:{visible:{type:Boolean}},setup(e){let t=Array(12).fill(0);return(e,n)=>(_(),F(`div`,{class:`sonner-loading-wrapper`,"data-visible":e.visible},[L(`div`,XS,[(_(!0),F(xe,null,ee(R(t),e=>(_(),F(`div`,{key:`spinner-bar-${e}`,class:`sonner-loading-bar`}))),128))])],8,YS))}}),QS={},$S={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function eC(e,t){return _(),F(`svg`,$S,t[0]||=[L(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,"clip-rule":`evenodd`},null,-1)])}var tC=WS(QS,[[`render`,eC]]),nC={},rC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function iC(e,t){return _(),F(`svg`,rC,t[0]||=[L(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,"clip-rule":`evenodd`},null,-1)])}var aC=WS(nC,[[`render`,iC]]),oC={},sC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`};function cC(e,t){return _(),F(`svg`,sC,t[0]||=[L(`path`,{"fill-rule":`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,"clip-rule":`evenodd`},null,-1)])}var lC=WS(oC,[[`render`,cC]]),uC={},dC={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`};function fC(e,t){return _(),F(`svg`,dC,t[0]||=[L(`path`,{"fill-rule":`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,"clip-rule":`evenodd`},null,-1)])}var pC=WS(uC,[[`render`,fC]]),mC=[`aria-label`],hC=[`data-sonner-theme`,`dir`,`data-theme`,`data-rich-colors`,`data-y-position`,`data-x-position`],gC=typeof window<`u`&&typeof document<`u`;function _C(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}var vC=Ee({name:`Toaster`,inheritAttrs:!1,__name:`Toaster`,props:{id:{},invert:{type:Boolean,default:!1},theme:{default:`light`},position:{default:`bottom-right`},closeButtonPosition:{default:`top-left`},hotkey:{default:()=>[`altKey`,`KeyT`]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:PS},visibleToasts:{default:kS},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:``},style:{},offset:{default:AS},mobileOffset:{default:jS},dir:{default:`auto`},swipeDirections:{},icons:{},containerAriaLabel:{default:`Notifications`}}
1163,setup(e){let t=e,n=ae(),r=I([]),i=P(()=>t.id?r.value.filter(e=>e.toasterId===t.id):r.value.filter(e=>!e.toasterId));function a(e,t){return i.value.filter(n=>!n.position&&t===0||n.position===e)}let o=P(()=>{let e=i.value.filter(e=>e.position).map(e=>e.position);return e.length>0?Array.from(new Set([t.position].concat(e))):[t.position]}),s=P(()=>{let e={};return o.value.forEach(t=>{e[t]=r.value.filter(e=>e.position===t)}),e}),c=I([]),l=I({}),u=I(!1);be(()=>{o.value.forEach(e=>{e in l.value||(l.value[e]=!1)})});let d=I(t.theme===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:t.theme),f=I(null),p=I(null),m=I(!1),h=t.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``);function v(e){r.value.find(t=>t.id===e.id)?.delete||wS.dismiss(e.id),r.value=r.value.filter(({id:t})=>t!==e.id),setTimeout(()=>{r.value.find(t=>t.id===e.id)||(c.value=c.value.filter(t=>t.toastId!==e.id))},250)}function y(e){m.value&&!e.currentTarget?.contains?.(e.relatedTarget)&&(m.value=!1,p.value&&=(p.value.focus({preventScroll:!0}),null))}function b(e){e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||m.value||(m.value=!0,p.value=e.relatedTarget)}function x(e){e.target&&e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||(u.value=!0)}be(e=>{e(wS.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{r.value=r.value.map(t=>t.id===e.id?{...t,delete:!0}:t)});return}_e(()=>{let t=r.value.findIndex(t=>t.id===e.id);t===-1?r.value=[e,...r.value]:r.value=[...r.value.slice(0,t),{...r.value[t],...e},...r.value.slice(t+1)]})}))}),be(e=>{if(typeof window>`u`)return;if(t.theme!==`system`){d.value=t.theme;return}let n=window.matchMedia(`(prefers-color-scheme: dark)`),r=e=>{d.value=e?`dark`:`light`};r(n.matches);let i=e=>{r(e.matches)};try{n.addEventListener(`change`,i)}catch{n.addListener(i)}e(()=>{try{n.removeEventListener(`change`,i)}catch{n.removeListener(i)}})}),be(()=>{f.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,m.value=!1)}),be(()=>{r.value.length<=1&&Object.keys(l.value).forEach(e=>{l.value[e]=!1})}),be(e=>{function n(e){let n=t.hotkey.every(t=>e[t]||e.code===t),r=Array.isArray(f.value)?f.value[0]:f.value;n&&(o.value.forEach(e=>{l.value[e]=!0}),r?.focus());let i=document.activeElement===f.value||r?.contains(document.activeElement);e.code===`Escape`&&i&&o.value.forEach(e=>{l.value[e]=!1})}gC&&(document.addEventListener(`keydown`,n),e(()=>{document.removeEventListener(`keydown`,n)}))});function C(e){let t=e.currentTarget,n=t.getAttribute(`data-y-position`)+`-`+t.getAttribute(`data-x-position`);l.value[n]=!0}function w(e){if(!u.value){let t=e.currentTarget,n=t.getAttribute(`data-y-position`)+`-`+t.getAttribute(`data-x-position`);l.value[n]=!1}}function T(){Object.keys(l.value).forEach(e=>{l.value[e]=!1})}function E(){u.value=!1}function D(e){c.value=e}function O(e){let t=c.value.findIndex(t=>t.toastId===e.toastId);if(t!==-1)c.value[t]=e;else{let t=c.value.findIndex(t=>t.position===e.position);t===-1?c.value.unshift(e):c.value.splice(t,0,e)}}return(e,r)=>(_(),F(xe,null,[fe(` Remove item from normal navigation flow, only available via hotkey `),L(`section`,{"aria-label":`${e.containerAriaLabel} ${R(h)}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`},[(_(!0),F(xe,null,ee(o.value,(r,i)=>(_(),F(`ol`,g({key:r,ref_for:!0,ref_key:`listRef`,ref:f,"data-sonner-toaster":``,"data-sonner-theme":d.value,class:t.class,dir:e.dir===`auto`?_C():e.dir,tabIndex:-1,"data-theme":e.theme,"data-rich-colors":e.richColors,"data-y-position":r.split(`-`)[0],"data-x-position":r.split(`-`)[1],style:{"--front-toast-height":`${c.value[0]?.height||0}px`,"--width":`${R(NS)}px`,"--gap":`${e.gap}px`,...e.style,...R(n).style,...R(BS)(e.offset,e.mobileOffset)}},{ref_for:!0},e.$attrs,{onBlur:y,onFocus:b,onMouseenter:C,onMousemove:C,onMouseleave:w,onDragend:T,onPointerdown:x,onPointerup:E}),[(_(!0),F(xe,null,ee(a(r,i),(n,i)=>(_(),ue(US,{key:n.id,heights:c.value,icons:e.icons,index:i,toast:n,defaultRichColors:e.richColors,duration:e.toastOptions?.duration??e.duration,class:S(e.toastOptions?.class??``),descriptionClass:e.toastOptions?.descriptionClass,invert:e.invert,visibleToasts:e.visibleToasts,closeButton:e.toastOptions?.closeButton??e.closeButton,interacting:u.value,position:r,closeButtonPosition:e.toastOptions?.closeButtonPosition??e.closeButtonPosition,style:ie(e.toastOptions?.style),unstyled:e.toastOptions?.unstyled,classes:e.toastOptions?.classes,cancelButtonStyle:e.toastOptions?.cancelButtonStyle,actionButtonStyle:e.toastOptions?.actionButtonStyle,"close-button-aria-label":e.toastOptions?.closeButtonAriaLabel,toasts:s.value[r],expandByDefault:e.expand,gap:e.gap,expanded:l.value[r]||!1,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":O,onRemoveToast:v},{"close-icon":ge(()=>[re(e.$slots,`close-icon`,{},()=>[De(JS)])]),"loading-icon":ge(()=>[re(e.$slots,`loading-icon`,{},()=>[De(ZS,{visible:n.type===`loading`},null,8,[`visible`])])]),"success-icon":ge(()=>[re(e.$slots,`success-icon`,{},()=>[De(tC)])]),"error-icon":ge(()=>[re(e.$slots,`error-icon`,{},()=>[De(pC)])]),"warning-icon":ge(()=>[re(e.$slots,`warning-icon`,{},()=>[De(lC)])]),"info-icon":ge(()=>[re(e.$slots,`info-icon`,{},()=>[De(aC)])]),_:2},1032,[`heights`,`icons`,`index`,`toast`,`defaultRichColors`,`duration`,`class`,`descriptionClass`,`invert`,`visibleToasts`,`closeButton`,`interacting`,`position`,`closeButtonPosition`,`style`,`unstyled`,`classes`,`cancelButtonStyle`,`actionButtonStyle`,`close-button-aria-label`,`toasts`,`expandByDefault`,`gap`,`expanded`,`swipeDirections`]))),128))],16,hC))),128))],8,mC)],2112))}}),yC=Ee({__name:`app`,setup(e){SS(),ti({titleTemplate:e=>e?`${e} - Science Fitness`:`Science Fitness`}),ti({meta:[{name:`description`,content:`Evidenzbasierte Fitness, Ernährung und Gesundheit ab 40 â verständlich eingeordnet.`,tagPriority:1e3}]});let t=Ue(),n=Xe(),r=P(()=>`https://science-fitness.de${t.path===`/`?`/`:t.path.replace(/\/+$/,``)}`);return ti({link:[{rel:`canonical`,href:()=>r.value,tagPriority:1e3}],meta:[{property:`og:url`,content:()=>r.value,tagPriority:1e3}]}),Ce(()=>t.query.login,e=>{if(e!==`1`)return;DS.success(`Willkommen zurück!`);let{login:r,...i}=t.query;n.replace({path:t.path,query:i,hash:t.hash})},{immediate:!0}),(e,t)=>{let n=lS,r=pS,i=bS,a=en;return _(),F(xe,null,[De(n,{throttle:150,height:2,color:`#2563eb`}),De(i,null,{default:ge(()=>[De(r)]),_:1}),De(a,null,{default:ge(()=>[De(R(vC),{position:`top-right`,"rich-colors":``})]),_:1})],64)}}}),bC=Object.freeze({left:0,top:0,width:16,height:16}),xC=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),SC=Object.freeze({...bC,...xC});Object.freeze({...SC,body:``,hidden:!1});function CC(e){let[t,n,r,i]=e;
1163if(r!==i){let e=Math.max(r,i);return[t-(e-r)/2,n-(e-i)/2,e,e]}return e}var wC=/(-?[0-9.]*[0-9]+[0-9.]*)/g,TC=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function EC(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(wC);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=TC.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}var DC=Object.freeze({width:null,height:null}),OC=Object.freeze({...DC,...xC});function kC(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function AC(e,t){return e?`<defs>`+e+`</defs>`+t:t}function jC(e,t,n){let r=kC(e);return AC(r.defs,t+r.content+n)}var MC=e=>e===`unset`||e===`undefined`||e===`none`;function NC(e,t){let n={...SC,...e},r={...OC,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=jC(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=EC(d,c/l)):(u=o===`auto`?c:o,d=s===null?EC(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{MC(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}function PC(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function FC(e){return`data:image/svg+xml,`+PC(e)}function IC(e){return`url("`+FC(e)+`")`}function LC(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function RC(e){let t=Object.create(null);Object.assign(t,{display:`inline-block`,width:`1em`,height:`1em`});let n=e.varName;switch(e.pseudoSelector&&(t.content=`''`),e.mode){case`background`:n&&(t[`background-image`]=`var(--`+n+`)`),t[`background-repeat`]=`no-repeat`,t[`background-size`]=`100% 100%`;break;case`mask`:t[`background-color`]=`currentColor`,n&&(t[`mask-image`]=t[`-webkit-mask-image`]=`var(--`+n+`)`),t[`mask-repeat`]=t[`-webkit-mask-repeat`]=`no-repeat`,t[`mask-size`]=t[`-webkit-mask-size`]=`100% 100%`}return t}function zC(e,t){let n=Object.create(null),r=t.varName,i=NC(e),a=i.viewBox;a[2]!==a[3]&&(t.forceSquare?a=CC(a):n.width=EC(`1em`,a[2]/a[3]));let o=IC(LC(i.body.replace(/currentColor/g,t.color||`black`),{viewBox:`${a[0]} ${a[1]} ${a[2]} ${a[3]}`,width:`${a[2]}`,height:`${a[3]}`}));if(r)n[`--`+r]=o;else switch(t.mode){case`background`:n[`background-image`]=o;break;case`mask`:n[`mask-image`]=n[`-webkit-mask-image`]=o}return n}var BC={selectorStart:{compressed:`{`,compact:` {`,expanded:` {`},selectorEnd:{compressed:`}`,compact:`; } 1164`,expanded:`; 1165} 1166`},rule:{compressed:`{key}:`,compact:` {key}: `,expanded:` 1167 {key}: `}};function VC(e,t=`expanded`){let n=[];for(let r=0;r<e.length;r++){let{selector:i,rules:a}=e[r],o=(i instanceof Array?i.join(t===`compressed`?`,`:`, `):i)+BC.selectorStart[t],s=!0;for(let e in a)s||(o+=`;`),o+=BC.rule[t].replace(`{key}`,e)+a[e],s=!1;o+=BC.selectorEnd[t],n.push(o)}return n.join(t===`compressed`?``:` 1168`)}function HC(e,t={}){let n=t.customise?t.customise(e.body):e.body,r=t.mode||(t.color||!n.includes(`currentColor`)?`background`:`mask`),i=t.varName;i===void 0&&r===`mask`&&(i=`svg`);let a={...t,mode:r,varName:i};r===`background`&&delete a.varName;let o=Object.create(null);return Object.assign(o,t.rules,RC(a),zC({...SC,...e,body:n},a)),VC([{selector:t.iconSelector||`.icon`,rules:o}],a.format)}async function UC(e,t){if(!e)return null;let n=Cg(e);if(n)return n;let r,i=S_(e).catch(()=>(console.warn(`[Icon] failed to load icon \`${e}\``),null));return t>0?await Promise.race([i,new Promise(n=>{r=setTimeout(()=>{console.warn(`[Icon] loading icon \`${e}\` timed out after ${t}ms`),n()},t)})]).finally(()=>clearTimeout(r)):await i,Cg(e)}function WC(e){let t=gh().icon,n=(t.collections||[]).sort((e,t)=>
1168t.length-e.length);return P(()=>{let r=e(),i=r.startsWith(t.cssSelectorPrefix)?r.slice(t.cssSelectorPrefix.length):r,a=t.aliases?.[i]||i;if(!a.includes(`:`)){let e=n.find(e=>a.startsWith(e+`-`));return e?e+`:`+a.slice(e.length+1):a}return a})}function GC(e,t){if(e!==!1)return e===!0||e===null?t:e}var KC;function qC(e){return e.replace(/([^\w-])/g,`\\$1`)}function JC(){if(KC)return KC;KC=new Set;let e=e=>{if(e=e.replace(/^:where\((.*)\)$/,`$1`).trim(),e.startsWith(`.`))return e},t=n=>{if(n?.length)for(let r of n){r?.cssRules&&t(r.cssRules);let n=r?.selectorText;if(typeof n==`string`){let t=e(n);t&&KC.add(t)}}};if(typeof document<`u`)for(let e of document.styleSheets)try{t(e.cssRules||e.rules)}catch{}return KC}var YC=Ee({name:`NuxtIconCss`,props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e){let t=o(),n=gh().icon,r=P(()=>{if(!e.name)return``;let t=n.cssSelectorPrefix+e.name;return typeof e.customize==`function`?t+`--customized-`+Lh(e.customize.toString()):t});function i(e){if(!e)return;let n=Cg(e);if(n)return n;let r=t.payload?.data?.[e];if(r)return xg(e,r),r}let a=P(()=>`.`+qC(r.value));function s(t,r=!0){let i=a.value;n.cssWherePseudo&&(i=`:where(${i})`);let o=HC(t,{iconSelector:i,format:`compressed`,customise:GC(e.customize,n.customize)});return n.cssLayer&&r?`@layer ${n.cssLayer} { ${o} }`:o}{let t=JC();async function n(e){if(t.has(a.value)||typeof document>`u`)return;let n=document.createElement(`style`);n.textContent=s(e);let r=document.head.querySelector(`style, link[rel="stylesheet"]`);r?document.head.insertBefore(n,r):document.head.appendChild(n),t.add(a.value)}Ce(()=>e.name,()=>{if(t.has(a.value))return;let r=i(e.name);r?n(r):UC(e.name,-1).then(e=>{e&&n(e)}).catch(()=>null)},{immediate:!0})}return()=>N(`span`,{class:[`iconify`,r.value]})}}),XC=Ee({name:`NuxtIconSvg`,props:{name:{type:String,required:!0},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:t}){let n=o(),r=gh().icon,i=WC(()=>e.name),a=`i-`+i.value;if(i.value){let e=n.payload.data[a];e&&xg(i.value,e)}return()=>N(U_,{icon:i.value,ssr:!0,customise:GC(e.customize,r.customize)},t)}}),ZC=fn({default:()=>QC}),QC=Ee({name:`NuxtIcon`,props:{name:{type:String,required:!0},mode:{type:String,required:!1,default:null},size:{type:[Number,String],required:!1,default:null},customize:{type:[Function,Boolean,null],default:null,required:!1}},setup(e,{slots:t}){let n=o(),r=gh().icon,i=WC(()=>e.name),a=P(()=>n.vueApp?.component(i.value)||((e.mode||r.mode)===`svg`?XC:YC)),s=P(()=>{let t=e.size||r.size;return t?{fontSize:Number.isNaN(+t)?t:t+`px`}:null});return()=>N(a.value,{...r.attrs,name:i.value,class:r.class,style:s.value,customize:e.customize},t)}}),$C={class:`bg-gradient-to-b from-gray-50 to-white min-h-screen`},ew={class:`max-w-7xl mx-auto px-4 py-20`},tw={class:`max-w-2xl mx-auto text-center`},nw={class:`text-4xl md:text-5xl font-bold text-gray-900 mb-4`},rw={class:`text-xl text-gray-600 mb-10`},iw={class:`grid grid-cols-1 sm:grid-cols-2 gap-4 mb-10`},aw={class:`max-w-md mx-auto`},ow={class:`relative`},sw={class:`absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-blue-600`},cw=Ee({__name:`error`,props:{error:{}},setup(e){let t=e,n=P(()=>t.error?.statusCode===404),r=P(()=>n.value?`Seite nicht gefunden`:`Ein Fehler ist aufgetreten`),i=P(()=>n.value?`Die gesuchte Seite existiert leider nicht oder wurde verschoben.`:`Etwas ist schiefgelaufen. Bitte versuche es später erneut oder nutze die Suche.`);return ti({title:()=>`${t.error?.statusCode??500} - ${r.value}`}),(e,t)=>{let n=QC,a=Qt,o=bS;return _(),ue(o,null,{default:ge(()=>[L(`div`,$C,[L(`div`,ew,[L(`div`,tw,[De(n,{name:`fa6-solid:triangle-exclamation`,class:`text-6xl text-gray-400 mb-6`}),L(`h1`,nw,x(R(r)),1),L(`p`,rw,x(R(i)),1),L(`div`,iw,[De(a,{to:`/`,class:`flex items-center gap-3 p-4 bg-white border border-gray-200 rounded-lg hover:border-blue-300 hover:shadow-md transition-all`},{default:ge(()=>[De(n,{name:`fa6-solid:house`,class:`text-blue-600`}),t[0]||=L(`span`,{class:`text-sm font-medium text-gray-900`},`Startseite`,-1)]),_:1}),De(a,{to:`/artikel`,class:`flex items-center gap-3 p-4 bg-white border border-gray-200 rounded-lg hover:border-blue-300 hover:shadow-md transition-all`},{default:ge(()=>[De(n,{name:`fa6-solid:newspaper`,class:`text-blue-600`}),t[1]||=L(`span`,{class:`text-sm font-medium text-gray-900`},`Artikelübersicht`,-1)]),_:1}),De(a,{to:`/kontakt`,class:`flex items-center gap-3 p-4 bg-white border border-gray-200 rounded-lg hover:border-blue-300 hover:shadow-md transition-all`},{default:ge(()=>[De(n,{name:`fa6-solid:envelope`,class:`text-blue-600`}),t[2]||=L(`span`,{class:`text-sm font-medium text-gray-900`},`Kontakt`,-1)]),_:1}),De(a,{to:`/programme`,class:`flex items-center gap-3 p-4 bg-white border border-gray-200 rounded-lg hover:border-blue-300 hover:shadow-md transition-all`},{default:ge(()=>[De(n,{name:`fa6-solid:dumbbell`,class:`text-blue-600`}),t[3]||=L(`span`,{class:`text-sm font-medium text-gray-900`},`Programme`,-1)]),_:1})]),L(`div`,aw,[t[5]||=L(`p`,{class:`text-sm text-gray-500 mb-3`},`Oder versuche die Suche:`,-1),L(`div`,ow,[t[4]||=L(`input`,{type:`text`,placeholder:`Suche auf Science Fitness...`,class:`w-full px-4 py-3 pr-12 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none`},null,-1),L(`button`,sw,[De(n,{name:`fa6-solid:magnifying-glass`})])])])])])])]),_:1})}}}),lw=()=>null,uw={key:0},dw={__name:`nuxt-root`,setup(e){let t=o(),n=t.deferHydration();if(t.isHydrating){let e=t.hooks.hookOnce(`app:error`,n),r=Xe().beforeEach(()=>{e(),r()})}window.location.pathname,ne(Fe,Ue()),t.hooks.callHookWith(e=>e.map(e=>e()),`vue:setup`,[]);let r=Qe();function i(e,n,r){let i=t.vueApp.config.errorHandler;if(i&&!i.__nuxt_default)try{i(e,n,r)}
1168catch(e){console.error("[nuxt] Error in `app.config.errorHandler`",e)}}return C((e,n,r)=>{if(t.hooks.callHook(`vue:error`,e,n,r)?.catch(e=>console.error("[nuxt] Error in `vue:error` hook",e)),ze(navigator.userAgent))return $e(t,e),!1;if(Be(e)&&(e.fatal||e.unhandled))return t.runWithContext(()=>Ye(e)),i(e,n,r),!1}),(e,t)=>(_(),ue(oe,{onResolve:R(n)},{default:ge(()=>[R(!1)?(_(),F(`div`,uw)):R(r)?(_(),ue(R(cw),{key:1,error:R(r)},null,8,[`error`])):R(!1)?(_(),ue(R(lw),{key:2,context:R(!1)},null,8,[`context`])):R(!1)?(_(),ue(w(R(!1)),{key:3})):(_(),ue(R(yC),{key:4}))]),_:1},8,[`onResolve`]))}},fw;{let e;fw=async function(){if(e)return e;let t=!!(window.__NUXT__?.serverRendered??document.getElementById(`__NUXT_DATA__`)?.dataset.ssr===`true`),r=t?ke(dw):Ae(dw),i=c({vueApp:r});async function a(e){await i.callHook(`app:error`,e),i.payload.error||=Ke(e)}a.__nuxt_default=!0,r.config.errorHandler=a,i.hook(`app:suspense:resolve`,()=>{r.config.errorHandler===a&&(r.config.errorHandler=void 0)}),!t&&n.id&&i.hook(`app:suspense:resolve`,()=>{document.getElementById(n.id)?.remove()});try{await f(i,aS)}catch(e){a(e)}try{await i.hooks.callHook(`app:created`,r),await i.hooks.callHook(`app:beforeMount`,r),r.mount(u),await i.hooks.callHook(`app:mounted`,r),await _e()}catch(e){a(e)}return r},e=fw().catch(e=>{throw i.NUXT_E1009({cause:e}),e})}export{ti as _,wh as a,fn as b,uh as c,mc as d,_c as f,B as g,mo as h,rS as i,lh as l,pc as m,bS as n,vh as o,gc as p,iS as r,yh as s,QC as t,vc as u,ni as v,mn as x,dn as y};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.