UNPKG

cal-heatmap

Version:

Cal-Heatmap is a javascript module to create calendar heatmap to visualize time series data

2 lines (1 loc) 38.4 kB
import{createPopper as t}from"@popperjs/core";function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=r.key,i=void 0,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(o,"string"))?i:String(i)),r)}var o,i}function n(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i=function(t){return t&&t.Math===Math&&t},c=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof o&&o)||i("object"==typeof o&&o)||function(){return this}()||Function("return this")(),u={},a=function(t){try{return!!t()}catch(t){return!0}},f=!a((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),s=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),l=s,p=Function.prototype.call,h=l?p.bind(p):function(){return p.apply(p,arguments)},v={},d={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,b=y&&!d.call({1:2},1);v.f=b?function(t){var e=y(this,t);return!!e&&e.enumerable}:d;var m,g,w=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},O=s,S=Function.prototype,j=S.call,T=O&&S.bind.bind(j,j),E=O?T:function(t){return function(){return j.apply(t,arguments)}},P=E,A=P({}.toString),C=P("".slice),I=function(t){return C(A(t),8,-1)},x=a,L=I,R=Object,k=E("".split),M=x((function(){return!R("z").propertyIsEnumerable(0)}))?function(t){return"String"===L(t)?k(t,""):R(t)}:R,N=function(t){return null==t},_=N,D=TypeError,F=function(t){if(_(t))throw new D("Can't call method on "+t);return t},B=M,G=F,U=function(t){return B(G(t))},z="object"==typeof document&&document.all,W={all:z,IS_HTMLDDA:void 0===z&&void 0!==z},H=W.all,V=W.IS_HTMLDDA?function(t){return"function"==typeof t||t===H}:function(t){return"function"==typeof t},q=V,J=W.all,K=W.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:q(t)||t===J}:function(t){return"object"==typeof t?null!==t:q(t)},X=c,Y=V,$=function(t,e){return arguments.length<2?(n=X[t],Y(n)?n:void 0):X[t]&&X[t][e];var n},Q=E({}.isPrototypeOf),Z="undefined"!=typeof navigator&&String(navigator.userAgent)||"",tt=c,et=Z,nt=tt.process,rt=tt.Deno,ot=nt&&nt.versions||rt&&rt.version,it=ot&&ot.v8;it&&(g=(m=it.split("."))[0]>0&&m[0]<4?1:+(m[0]+m[1])),!g&&et&&(!(m=et.match(/Edge\/(\d+)/))||m[1]>=74)&&(m=et.match(/Chrome\/(\d+)/))&&(g=+m[1]);var ct=g,ut=ct,at=a,ft=c.String,st=!!Object.getOwnPropertySymbols&&!at((function(){var t=Symbol("symbol detection");return!ft(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ut&&ut<41})),lt=st&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,pt=$,ht=V,vt=Q,dt=Object,yt=lt?function(t){return"symbol"==typeof t}:function(t){var e=pt("Symbol");return ht(e)&&vt(e.prototype,dt(t))},bt=String,mt=function(t){try{return bt(t)}catch(t){return"Object"}},gt=V,wt=mt,Ot=TypeError,St=function(t){if(gt(t))return t;throw new Ot(wt(t)+" is not a function")},jt=St,Tt=N,Et=function(t,e){var n=t[e];return Tt(n)?void 0:jt(n)},Pt=h,At=V,Ct=K,It=TypeError,xt={exports:{}},Lt=c,Rt=Object.defineProperty,kt=function(t,e){try{Rt(Lt,t,{value:e,configurable:!0,writable:!0})}catch(n){Lt[t]=e}return e},Mt=kt,Nt="__core-js_shared__",_t=c[Nt]||Mt(Nt,{}),Dt=_t;(xt.exports=function(t,e){return Dt[t]||(Dt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.34.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.34.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Ft=xt.exports,Bt=F,Gt=Object,Ut=function(t){return Gt(Bt(t))},zt=Ut,Wt=E({}.hasOwnProperty),Ht=Object.hasOwn||function(t,e){return Wt(zt(t),e)},Vt=E,qt=0,Jt=Math.random(),Kt=Vt(1..toString),Xt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Kt(++qt+Jt,36)},Yt=Ft,$t=Ht,Qt=Xt,Zt=st,te=lt,ee=c.Symbol,ne=Yt("wks"),re=te?ee.for||ee:ee&&ee.withoutSetter||Qt,oe=function(t){return $t(ne,t)||(ne[t]=Zt&&$t(ee,t)?ee[t]:re("Symbol."+t)),ne[t]},ie=h,ce=K,ue=yt,ae=Et,fe=function(t,e){var n,r;if("string"===e&&At(n=t.toString)&&!Ct(r=Pt(n,t)))return r;if(At(n=t.valueOf)&&!Ct(r=Pt(n,t)))return r;if("string"!==e&&At(n=t.toString)&&!Ct(r=Pt(n,t)))return r;throw new It("Can't convert object to primitive value")},se=TypeError,le=oe("toPrimitive"),pe=function(t,e){if(!ce(t)||ue(t))return t;var n,r=ae(t,le);if(r){if(void 0===e&&(e="default"),n=ie(r,t,e),!ce(n)||ue(n))return n;throw new se("Can't convert object to primitive value")}return void 0===e&&(e="number"),fe(t,e)},he=yt,ve=function(t){var e=pe(t,"string");return he(e)?e:e+""},de=K,ye=c.document,be=de(ye)&&de(ye.createElement),me=function(t){return be?ye.createElement(t):{}},ge=me,we=!f&&!a((function(){return 7!==Object.defineProperty(ge("div"),"a",{get:function(){return 7}}).a})),Oe=f,Se=h,je=v,Te=w,Ee=U,Pe=ve,Ae=Ht,Ce=we,Ie=Object.getOwnPropertyDescriptor;u.f=Oe?Ie:function(t,e){if(t=Ee(t),e=Pe(e),Ce)try{return Ie(t,e)}catch(t){}if(Ae(t,e))return Te(!Se(je.f,t,e),t[e])};var xe={},Le=f&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Re=K,ke=String,Me=TypeError,Ne=function(t){if(Re(t))return t;throw new Me(ke(t)+" is not an object")},_e=f,De=we,Fe=Le,Be=Ne,Ge=ve,Ue=TypeError,ze=Object.defineProperty,We=Object.getOwnPropertyDescriptor,He="enumerable",Ve="configurable",qe="writable";xe.f=_e?Fe?function(t,e,n){if(Be(t),e=Ge(e),Be(n),"function"==typeof t&&"prototype"===e&&"value"in n&&qe in n&&!n[qe]){var r=We(t,e);r&&r[qe]&&(t[e]=n.value,n={configurable:Ve in n?n[Ve]:r[Ve],enumerable:He in n?n[He]:r[He],writable:!1})}return ze(t,e,n)}:ze:function(t,e,n){if(Be(t),e=Ge(e),Be(n),De)try{return ze(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Ue("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var Je=xe,Ke=w,Xe=f?function(t,e,n){return Je.f(t,e,Ke(1,n))}:function(t,e,n){return t[e]=n,t},Ye={exports:{}},$e=f,Qe=Ht,Ze=Function.prototype,tn=$e&&Object.getOwnPropertyDescriptor,en=Qe(Ze,"name"),nn={EXISTS:en,PROPER:en&&"something"===function(){}.name,CONFIGURABLE:en&&(!$e||$e&&tn(Ze,"name").configurable)},rn=V,on=_t,cn=E(Function.toString);rn(on.inspectSource)||(on.inspectSource=function(t){return cn(t)});var un,an,fn,sn=on.inspectSource,ln=V,pn=c.WeakMap,hn=ln(pn)&&/native code/.test(String(pn)),vn=Xt,dn=Ft("keys"),yn=function(t){return dn[t]||(dn[t]=vn(t))},bn={},mn=hn,gn=c,wn=K,On=Xe,Sn=Ht,jn=_t,Tn=yn,En=bn,Pn="Object already initialized",An=gn.TypeError,Cn=gn.WeakMap;if(mn||jn.state){var In=jn.state||(jn.state=new Cn);In.get=In.get,In.has=In.has,In.set=In.set,un=function(t,e){if(In.has(t))throw new An(Pn);return e.facade=t,In.set(t,e),e},an=function(t){return In.get(t)||{}},fn=function(t){return In.has(t)}}else{var xn=Tn("state");En[xn]=!0,un=function(t,e){if(Sn(t,xn))throw new An(Pn);return e.facade=t,On(t,xn,e),e},an=function(t){return Sn(t,xn)?t[xn]:{}},fn=function(t){return Sn(t,xn)}}var Ln={set:un,get:an,has:fn,enforce:function(t){return fn(t)?an(t):un(t,{})},getterFor:function(t){return function(e){var n;if(!wn(e)||(n=an(e)).type!==t)throw new An("Incompatible receiver, "+t+" required");return n}}},Rn=E,kn=a,Mn=V,Nn=Ht,_n=f,Dn=nn.CONFIGURABLE,Fn=sn,Bn=Ln.enforce,Gn=Ln.get,Un=String,zn=Object.defineProperty,Wn=Rn("".slice),Hn=Rn("".replace),Vn=Rn([].join),qn=_n&&!kn((function(){return 8!==zn((function(){}),"length",{value:8}).length})),Jn=String(String).split("String"),Kn=Ye.exports=function(t,e,n){"Symbol("===Wn(Un(e),0,7)&&(e="["+Hn(Un(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!Nn(t,"name")||Dn&&t.name!==e)&&(_n?zn(t,"name",{value:e,configurable:!0}):t.name=e),qn&&n&&Nn(n,"arity")&&t.length!==n.arity&&zn(t,"length",{value:n.arity});try{n&&Nn(n,"constructor")&&n.constructor?_n&&zn(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=Bn(t);return Nn(r,"source")||(r.source=Vn(Jn,"string"==typeof e?e:"")),t};Function.prototype.toString=Kn((function(){return Mn(this)&&Gn(this).source||Fn(this)}),"toString");var Xn=Ye.exports,Yn=V,$n=xe,Qn=Xn,Zn=kt,tr=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(Yn(n)&&Qn(n,i,r),r.global)o?t[e]=n:Zn(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:$n.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},er={},nr=Math.ceil,rr=Math.floor,or=Math.trunc||function(t){var e=+t;return(e>0?rr:nr)(e)},ir=function(t){var e=+t;return e!=e||0===e?0:or(e)},cr=ir,ur=Math.max,ar=Math.min,fr=function(t,e){var n=cr(t);return n<0?ur(n+e,0):ar(n,e)},sr=ir,lr=Math.min,pr=function(t){return t>0?lr(sr(t),9007199254740991):0},hr=function(t){return pr(t.length)},vr=U,dr=fr,yr=hr,br=function(t){return function(e,n,r){var o,i=vr(e),c=yr(i),u=dr(r,c);if(t&&n!=n){for(;c>u;)if((o=i[u++])!=o)return!0}else for(;c>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},mr={includes:br(!0),indexOf:br(!1)},gr=Ht,wr=U,Or=mr.indexOf,Sr=bn,jr=E([].push),Tr=function(t,e){var n,r=wr(t),o=0,i=[];for(n in r)!gr(Sr,n)&&gr(r,n)&&jr(i,n);for(;e.length>o;)gr(r,n=e[o++])&&(~Or(i,n)||jr(i,n));return i},Er=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Pr=Tr,Ar=Er.concat("length","prototype");er.f=Object.getOwnPropertyNames||function(t){return Pr(t,Ar)};var Cr={};Cr.f=Object.getOwnPropertySymbols;var Ir=$,xr=er,Lr=Cr,Rr=Ne,kr=E([].concat),Mr=Ir("Reflect","ownKeys")||function(t){var e=xr.f(Rr(t)),n=Lr.f;return n?kr(e,n(t)):e},Nr=Ht,_r=Mr,Dr=u,Fr=xe,Br=a,Gr=V,Ur=/#|\.prototype\./,zr=function(t,e){var n=Hr[Wr(t)];return n===qr||n!==Vr&&(Gr(e)?Br(e):!!e)},Wr=zr.normalize=function(t){return String(t).replace(Ur,".").toLowerCase()},Hr=zr.data={},Vr=zr.NATIVE="N",qr=zr.POLYFILL="P",Jr=zr,Kr=c,Xr=u.f,Yr=Xe,$r=tr,Qr=kt,Zr=function(t,e,n){for(var r=_r(e),o=Fr.f,i=Dr.f,c=0;c<r.length;c++){var u=r[c];Nr(t,u)||n&&Nr(n,u)||o(t,u,i(e,u))}},to=Jr,eo=function(t,e){var n,r,o,i,c,u=t.target,a=t.global,f=t.stat;if(n=a?Kr:f?Kr[u]||Qr(u,{}):(Kr[u]||{}).prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(c=Xr(n,r))&&c.value:n[r],!to(a?r:u+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Zr(i,o)}(t.sham||o&&o.sham)&&Yr(i,"sham",!0),$r(n,r,i,t)}},no=I,ro=Array.isArray||function(t){return"Array"===no(t)},oo=TypeError,io=ve,co=xe,uo=w,ao=function(t,e,n){var r=io(e);r in t?co.f(t,r,uo(0,n)):t[r]=n},fo={};fo[oe("toStringTag")]="z";var so="[object z]"===String(fo),lo=so,po=V,ho=I,vo=oe("toStringTag"),yo=Object,bo="Arguments"===ho(function(){return arguments}()),mo=lo?ho:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=yo(t),vo))?n:bo?ho(e):"Object"===(r=ho(e))&&po(e.callee)?"Arguments":r},go=E,wo=a,Oo=V,So=mo,jo=sn,To=function(){},Eo=[],Po=$("Reflect","construct"),Ao=/^\s*(?:class|function)\b/,Co=go(Ao.exec),Io=!Ao.test(To),xo=function(t){if(!Oo(t))return!1;try{return Po(To,Eo,t),!0}catch(t){return!1}},Lo=function(t){if(!Oo(t))return!1;switch(So(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Io||!!Co(Ao,jo(t))}catch(t){return!0}};Lo.sham=!0;var Ro=!Po||wo((function(){var t;return xo(xo.call)||!xo(Object)||!xo((function(){t=!0}))||t}))?Lo:xo,ko=ro,Mo=Ro,No=K,_o=oe("species"),Do=Array,Fo=function(t){var e;return ko(t)&&(e=t.constructor,(Mo(e)&&(e===Do||ko(e.prototype))||No(e)&&null===(e=e[_o]))&&(e=void 0)),void 0===e?Do:e},Bo=function(t,e){return new(Fo(t))(0===e?0:e)},Go=a,Uo=ct,zo=oe("species"),Wo=eo,Ho=a,Vo=ro,qo=K,Jo=Ut,Ko=hr,Xo=function(t){if(t>9007199254740991)throw oo("Maximum allowed index exceeded");return t},Yo=ao,$o=Bo,Qo=function(t){return Uo>=51||!Go((function(){var e=[];return(e.constructor={})[zo]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Zo=ct,ti=oe("isConcatSpreadable"),ei=Zo>=51||!Ho((function(){var t=[];return t[ti]=!1,t.concat()[0]!==t})),ni=function(t){if(!qo(t))return!1;var e=t[ti];return void 0!==e?!!e:Vo(t)};Wo({target:"Array",proto:!0,arity:1,forced:!ei||!Qo("concat")},{concat:function(t){var e,n,r,o,i,c=Jo(this),u=$o(c,0),a=0;for(e=-1,r=arguments.length;e<r;e++)if(ni(i=-1===e?c:arguments[e]))for(o=Ko(i),Xo(a+o),n=0;n<o;n++,a++)n in i&&Yo(u,a,i[n]);else Xo(a+1),Yo(u,a++,i);return u.length=a,u}});var ri=Xn,oi=xe,ii=function(t,e,n){return n.get&&ri(n.get,e,{getter:!0}),n.set&&ri(n.set,e,{setter:!0}),oi.f(t,e,n)},ci=f,ui=nn.EXISTS,ai=E,fi=ii,si=Function.prototype,li=ai(si.toString),pi=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,hi=ai(pi.exec);ci&&!ui&&fi(si,"name",{configurable:!0,get:function(){try{return hi(pi,li(this))[1]}catch(t){return""}}});var vi=Tr,di=Er,yi=Object.keys||function(t){return vi(t,di)},bi=f,mi=E,gi=h,wi=a,Oi=yi,Si=Cr,ji=v,Ti=Ut,Ei=M,Pi=Object.assign,Ai=Object.defineProperty,Ci=mi([].concat),Ii=!Pi||wi((function(){if(bi&&1!==Pi({b:1},Pi(Ai({},"a",{enumerable:!0,get:function(){Ai(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!==Pi({},t)[n]||Oi(Pi({},e)).join("")!==r}))?function(t,e){for(var n=Ti(t),r=arguments.length,o=1,i=Si.f,c=ji.f;r>o;)for(var u,a=Ei(arguments[o++]),f=i?Ci(Oi(a),i(a)):Oi(a),s=f.length,l=0;s>l;)u=f[l++],bi&&!gi(c,a,u)||(n[u]=a[u]);return n}:Pi,xi=Ii;eo({target:"Object",stat:!0,arity:2,forced:Object.assign!==xi},{assign:xi});var Li=mo,Ri=so?{}.toString:function(){return"[object "+Li(this)+"]"};so||tr(Object.prototype,"toString",Ri,{unsafe:!0});var ki,Mi,Ni,_i,Di="process"===I(c.process),Fi=E,Bi=St,Gi=V,Ui=String,zi=TypeError,Wi=function(t,e,n){try{return Fi(Bi(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}},Hi=Ne,Vi=function(t){if("object"==typeof t||Gi(t))return t;throw new zi("Can't set "+Ui(t)+" as a prototype")},qi=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Wi(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Hi(n),Vi(r),e?t(n,r):n.__proto__=r,n}}():void 0),Ji=xe.f,Ki=Ht,Xi=oe("toStringTag"),Yi=function(t,e,n){t&&!n&&(t=t.prototype),t&&!Ki(t,Xi)&&Ji(t,Xi,{configurable:!0,value:e})},$i=$,Qi=ii,Zi=f,tc=oe("species"),ec=Q,nc=TypeError,rc=function(t,e){if(ec(e,t))return t;throw new nc("Incorrect invocation")},oc=Ro,ic=mt,cc=TypeError,uc=Ne,ac=function(t){if(oc(t))return t;throw new cc(ic(t)+" is not a constructor")},fc=N,sc=oe("species"),lc=s,pc=Function.prototype,hc=pc.apply,vc=pc.call,dc="object"==typeof Reflect&&Reflect.apply||(lc?vc.bind(hc):function(){return vc.apply(hc,arguments)}),yc=I,bc=E,mc=function(t){if("Function"===yc(t))return bc(t)},gc=St,wc=s,Oc=mc(mc.bind),Sc=function(t,e){return gc(t),void 0===e?t:wc?Oc(t,e):function(){return t.apply(e,arguments)}},jc=$("document","documentElement"),Tc=E([].slice),Ec=TypeError,Pc=/(?:ipad|iphone|ipod).*applewebkit/i.test(Z),Ac=c,Cc=dc,Ic=Sc,xc=V,Lc=Ht,Rc=a,kc=jc,Mc=Tc,Nc=me,_c=function(t,e){if(t<e)throw new Ec("Not enough arguments");return t},Dc=Pc,Fc=Di,Bc=Ac.setImmediate,Gc=Ac.clearImmediate,Uc=Ac.process,zc=Ac.Dispatch,Wc=Ac.Function,Hc=Ac.MessageChannel,Vc=Ac.String,qc=0,Jc={},Kc="onreadystatechange";Rc((function(){ki=Ac.location}));var Xc=function(t){if(Lc(Jc,t)){var e=Jc[t];delete Jc[t],e()}},Yc=function(t){return function(){Xc(t)}},$c=function(t){Xc(t.data)},Qc=function(t){Ac.postMessage(Vc(t),ki.protocol+"//"+ki.host)};Bc&&Gc||(Bc=function(t){_c(arguments.length,1);var e=xc(t)?t:Wc(t),n=Mc(arguments,1);return Jc[++qc]=function(){Cc(e,void 0,n)},Mi(qc),qc},Gc=function(t){delete Jc[t]},Fc?Mi=function(t){Uc.nextTick(Yc(t))}:zc&&zc.now?Mi=function(t){zc.now(Yc(t))}:Hc&&!Dc?(_i=(Ni=new Hc).port2,Ni.port1.onmessage=$c,Mi=Ic(_i.postMessage,_i)):Ac.addEventListener&&xc(Ac.postMessage)&&!Ac.importScripts&&ki&&"file:"!==ki.protocol&&!Rc(Qc)?(Mi=Qc,Ac.addEventListener("message",$c,!1)):Mi=Kc in Nc("script")?function(t){kc.appendChild(Nc("script"))[Kc]=function(){kc.removeChild(this),Xc(t)}}:function(t){setTimeout(Yc(t),0)});var Zc={set:Bc,clear:Gc},tu=function(){this.head=null,this.tail=null};tu.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var eu,nu,ru,ou,iu,cu=tu,uu=/ipad|iphone|ipod/i.test(Z)&&"undefined"!=typeof Pebble,au=/web0s(?!.*chrome)/i.test(Z),fu=c,su=Sc,lu=u.f,pu=Zc.set,hu=cu,vu=Pc,du=uu,yu=au,bu=Di,mu=fu.MutationObserver||fu.WebKitMutationObserver,gu=fu.document,wu=fu.process,Ou=fu.Promise,Su=lu(fu,"queueMicrotask"),ju=Su&&Su.value;if(!ju){var Tu=new hu,Eu=function(){var t,e;for(bu&&(t=wu.domain)&&t.exit();e=Tu.get();)try{e()}catch(t){throw Tu.head&&eu(),t}t&&t.enter()};vu||bu||yu||!mu||!gu?!du&&Ou&&Ou.resolve?((ou=Ou.resolve(void 0)).constructor=Ou,iu=su(ou.then,ou),eu=function(){iu(Eu)}):bu?eu=function(){wu.nextTick(Eu)}:(pu=su(pu,fu),eu=function(){pu(Eu)}):(nu=!0,ru=gu.createTextNode(""),new mu(Eu).observe(ru,{characterData:!0}),eu=function(){ru.data=nu=!nu}),ju=function(t){Tu.head||eu(),Tu.add(t)}}var Pu=ju,Au=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Cu=c.Promise,Iu="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,xu=!Iu&&!Di&&"object"==typeof window&&"object"==typeof document,Lu=c,Ru=Cu,ku=V,Mu=Jr,Nu=sn,_u=oe,Du=xu,Fu=Iu,Bu=ct;Ru&&Ru.prototype;var Gu=_u("species"),Uu=!1,zu=ku(Lu.PromiseRejectionEvent),Wu=Mu("Promise",(function(){var t=Nu(Ru),e=t!==String(Ru);if(!e&&66===Bu)return!0;if(!Bu||Bu<51||!/native code/.test(t)){var n=new Ru((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Gu]=r,!(Uu=n.then((function(){}))instanceof r))return!0}return!e&&(Du||Fu)&&!zu})),Hu={CONSTRUCTOR:Wu,REJECTION_EVENT:zu,SUBCLASSING:Uu},Vu={},qu=St,Ju=TypeError,Ku=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new Ju("Bad Promise constructor");e=t,n=r})),this.resolve=qu(e),this.reject=qu(n)};Vu.f=function(t){return new Ku(t)};var Xu,Yu,$u,Qu=eo,Zu=Di,ta=c,ea=h,na=tr,ra=qi,oa=Yi,ia=function(t){var e=$i(t);Zi&&e&&!e[tc]&&Qi(e,tc,{configurable:!0,get:function(){return this}})},ca=St,ua=V,aa=K,fa=rc,sa=function(t,e){var n,r=uc(t).constructor;return void 0===r||fc(n=uc(r)[sc])?e:ac(n)},la=Zc.set,pa=Pu,ha=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}},va=Au,da=cu,ya=Ln,ba=Cu,ma=Vu,ga="Promise",wa=Hu.CONSTRUCTOR,Oa=Hu.REJECTION_EVENT,Sa=Hu.SUBCLASSING,ja=ya.getterFor(ga),Ta=ya.set,Ea=ba&&ba.prototype,Pa=ba,Aa=Ea,Ca=ta.TypeError,Ia=ta.document,xa=ta.process,La=ma.f,Ra=La,ka=!!(Ia&&Ia.createEvent&&ta.dispatchEvent),Ma="unhandledrejection",Na=function(t){var e;return!(!aa(t)||!ua(e=t.then))&&e},_a=function(t,e){var n,r,o,i=e.value,c=1===e.state,u=c?t.ok:t.fail,a=t.resolve,f=t.reject,s=t.domain;try{u?(c||(2===e.rejection&&Ua(e),e.rejection=1),!0===u?n=i:(s&&s.enter(),n=u(i),s&&(s.exit(),o=!0)),n===t.promise?f(new Ca("Promise-chain cycle")):(r=Na(n))?ea(r,n,a,f):a(n)):f(i)}catch(t){s&&!o&&s.exit(),f(t)}},Da=function(t,e){t.notified||(t.notified=!0,pa((function(){for(var n,r=t.reactions;n=r.get();)_a(n,t);t.notified=!1,e&&!t.rejection&&Ba(t)})))},Fa=function(t,e,n){var r,o;ka?((r=Ia.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),ta.dispatchEvent(r)):r={promise:e,reason:n},!Oa&&(o=ta["on"+t])?o(r):t===Ma&&ha("Unhandled promise rejection",n)},Ba=function(t){ea(la,ta,(function(){var e,n=t.facade,r=t.value;if(Ga(t)&&(e=va((function(){Zu?xa.emit("unhandledRejection",r,n):Fa(Ma,n,r)})),t.rejection=Zu||Ga(t)?2:1,e.error))throw e.value}))},Ga=function(t){return 1!==t.rejection&&!t.parent},Ua=function(t){ea(la,ta,(function(){var e=t.facade;Zu?xa.emit("rejectionHandled",e):Fa("rejectionhandled",e,t.value)}))},za=function(t,e,n){return function(r){t(e,r,n)}},Wa=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,Da(t,!0))},Ha=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new Ca("Promise can't be resolved itself");var r=Na(e);r?pa((function(){var n={done:!1};try{ea(r,e,za(Ha,n,t),za(Wa,n,t))}catch(e){Wa(n,e,t)}})):(t.value=e,t.state=1,Da(t,!1))}catch(e){Wa({done:!1},e,t)}}};if(wa&&(Aa=(Pa=function(t){fa(this,Aa),ca(t),ea(Xu,this);var e=ja(this);try{t(za(Ha,e),za(Wa,e))}catch(t){Wa(e,t)}}).prototype,(Xu=function(t){Ta(this,{type:ga,done:!1,notified:!1,parent:!1,reactions:new da,rejection:!1,state:0,value:void 0})}).prototype=na(Aa,"then",(function(t,e){var n=ja(this),r=La(sa(this,Pa));return n.parent=!0,r.ok=!ua(t)||t,r.fail=ua(e)&&e,r.domain=Zu?xa.domain:void 0,0===n.state?n.reactions.add(r):pa((function(){_a(r,n)})),r.promise})),Yu=function(){var t=new Xu,e=ja(t);this.promise=t,this.resolve=za(Ha,e),this.reject=za(Wa,e)},ma.f=La=function(t){return t===Pa||undefined===t?new Yu(t):Ra(t)},ua(ba)&&Ea!==Object.prototype)){$u=Ea.then,Sa||na(Ea,"then",(function(t,e){var n=this;return new Pa((function(t,e){ea($u,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Ea.constructor}catch(t){}ra&&ra(Ea,Aa)}Qu({global:!0,constructor:!0,wrap:!0,forced:wa},{Promise:Pa}),oa(Pa,ga,!1),ia(ga);var Va={},qa=Va,Ja=oe("iterator"),Ka=Array.prototype,Xa=mo,Ya=Et,$a=N,Qa=Va,Za=oe("iterator"),tf=function(t){if(!$a(t))return Ya(t,Za)||Ya(t,"@@iterator")||Qa[Xa(t)]},ef=h,nf=St,rf=Ne,of=mt,cf=tf,uf=TypeError,af=h,ff=Ne,sf=Et,lf=Sc,pf=h,hf=Ne,vf=mt,df=function(t){return void 0!==t&&(qa.Array===t||Ka[Ja]===t)},yf=hr,bf=Q,mf=function(t,e){var n=arguments.length<2?cf(t):e;if(nf(n))return rf(ef(n,t));throw new uf(of(t)+" is not iterable")},gf=tf,wf=function(t,e,n){var r,o;ff(t);try{if(!(r=sf(t,"return"))){if("throw"===e)throw n;return n}r=af(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return ff(r),n},Of=TypeError,Sf=function(t,e){this.stopped=t,this.result=e},jf=Sf.prototype,Tf=function(t,e,n){var r,o,i,c,u,a,f,s=n&&n.that,l=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),d=lf(e,s),y=function(t){return r&&wf(r,"normal",t),new Sf(!0,t)},b=function(t){return l?(hf(t),v?d(t[0],t[1],y):d(t[0],t[1])):v?d(t,y):d(t)};if(p)r=t.iterator;else if(h)r=t;else{if(!(o=gf(t)))throw new Of(vf(t)+" is not iterable");if(df(o)){for(i=0,c=yf(t);c>i;i++)if((u=b(t[i]))&&bf(jf,u))return u;return new Sf(!1)}r=mf(t,o)}for(a=p?t.next:r.next;!(f=pf(a,r)).done;){try{u=b(f.value)}catch(t){wf(r,"throw",t)}if("object"==typeof u&&u&&bf(jf,u))return u}return new Sf(!1)},Ef=oe("iterator"),Pf=!1;try{var Af=0,Cf={next:function(){return{done:!!Af++}},return:function(){Pf=!0}};Cf[Ef]=function(){return this},Array.from(Cf,(function(){throw 2}))}catch(t){}var If=function(t,e){try{if(!e&&!Pf)return!1}catch(t){return!1}var n=!1;try{var r={};r[Ef]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},xf=Cu,Lf=Hu.CONSTRUCTOR||!If((function(t){xf.all(t).then(void 0,(function(){}))})),Rf=h,kf=St,Mf=Vu,Nf=Au,_f=Tf;eo({target:"Promise",stat:!0,forced:Lf},{all:function(t){var e=this,n=Mf.f(e),r=n.resolve,o=n.reject,i=Nf((function(){var n=kf(e.resolve),i=[],c=0,u=1;_f(t,(function(t){var a=c++,f=!1;u++,Rf(n,e,t).then((function(t){f||(f=!0,i[a]=t,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise}});var Df=eo,Ff=Hu.CONSTRUCTOR,Bf=Cu,Gf=$,Uf=V,zf=tr,Wf=Bf&&Bf.prototype;if(Df({target:"Promise",proto:!0,forced:Ff,real:!0},{catch:function(t){return this.then(void 0,t)}}),Uf(Bf)){var Hf=Gf("Promise").prototype.catch;Wf.catch!==Hf&&zf(Wf,"catch",Hf,{unsafe:!0})}var Vf=h,qf=St,Jf=Vu,Kf=Au,Xf=Tf;eo({target:"Promise",stat:!0,forced:Lf},{race:function(t){var e=this,n=Jf.f(e),r=n.reject,o=Kf((function(){var o=qf(e.resolve);Xf(t,(function(t){Vf(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var Yf=h,$f=Vu;eo({target:"Promise",stat:!0,forced:Hu.CONSTRUCTOR},{reject:function(t){var e=$f.f(this);return Yf(e.reject,void 0,t),e.promise}});var Qf=Ne,Zf=K,ts=Vu,es=eo,ns=Hu.CONSTRUCTOR,rs=function(t,e){if(Qf(t),Zf(e)&&e.constructor===t)return e;var n=ts.f(t);return(0,n.resolve)(e),n.promise};$("Promise"),es({target:"Promise",stat:!0,forced:ns},{resolve:function(t){return rs(this,t)}});var os={},is=f,cs=Le,us=xe,as=Ne,fs=U,ss=yi;os.f=is&&!cs?Object.defineProperties:function(t,e){as(t);for(var n,r=fs(e),o=ss(e),i=o.length,c=0;i>c;)us.f(t,n=o[c++],r[n]);return t};var ls,ps=Ne,hs=os,vs=Er,ds=bn,ys=jc,bs=me,ms="prototype",gs="script",ws=yn("IE_PROTO"),Os=function(){},Ss=function(t){return"<"+gs+">"+t+"</"+gs+">"},js=function(t){t.write(Ss("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ts=function(){try{ls=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Ts="undefined"!=typeof document?document.domain&&ls?js(ls):(e=bs("iframe"),n="java"+gs+":",e.style.display="none",ys.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(Ss("document.F=Object")),t.close(),t.F):js(ls);for(var r=vs.length;r--;)delete Ts[ms][vs[r]];return Ts()};ds[ws]=!0;var Es=Object.create||function(t,e){var n;return null!==t?(Os[ms]=ps(t),n=new Os,Os[ms]=null,n[ws]=t):n=Ts(),void 0===e?n:hs.f(n,e)},Ps=oe,As=Es,Cs=xe.f,Is=Ps("unscopables"),xs=Array.prototype;void 0===xs[Is]&&Cs(xs,Is,{configurable:!0,value:As(null)});var Ls,Rs,ks,Ms=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Ns=Ht,_s=V,Ds=Ut,Fs=Ms,Bs=yn("IE_PROTO"),Gs=Object,Us=Gs.prototype,zs=Fs?Gs.getPrototypeOf:function(t){var e=Ds(t);if(Ns(e,Bs))return e[Bs];var n=e.constructor;return _s(n)&&e instanceof n?n.prototype:e instanceof Gs?Us:null},Ws=a,Hs=V,Vs=K,qs=zs,Js=tr,Ks=oe("iterator"),Xs=!1;[].keys&&("next"in(ks=[].keys())?(Rs=qs(qs(ks)))!==Object.prototype&&(Ls=Rs):Xs=!0);var Ys=!Vs(Ls)||Ws((function(){var t={};return Ls[Ks].call(t)!==t}));Ys&&(Ls={}),Hs(Ls[Ks])||Js(Ls,Ks,(function(){return this}));var $s={IteratorPrototype:Ls,BUGGY_SAFARI_ITERATORS:Xs},Qs=$s.IteratorPrototype,Zs=Es,tl=w,el=Yi,nl=Va,rl=function(){return this},ol=eo,il=h,cl=V,ul=function(t,e,n,r){var o=e+" Iterator";return t.prototype=Zs(Qs,{next:tl(+!r,n)}),el(t,o,!1),nl[o]=rl,t},al=zs,fl=qi,sl=Yi,ll=Xe,pl=tr,hl=Va,vl=nn.PROPER,dl=nn.CONFIGURABLE,yl=$s.IteratorPrototype,bl=$s.BUGGY_SAFARI_ITERATORS,ml=oe("iterator"),gl="keys",wl="values",Ol="entries",Sl=function(){return this},jl=function(t,e,n,r,o,i,c){ul(n,e,r);var u,a,f,s=function(t){if(t===o&&d)return d;if(!bl&&t&&t in h)return h[t];switch(t){case gl:case wl:case Ol:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,h=t.prototype,v=h[ml]||h["@@iterator"]||o&&h[o],d=!bl&&v||s(o),y="Array"===e&&h.entries||v;if(y&&(u=al(y.call(new t)))!==Object.prototype&&u.next&&(al(u)!==yl&&(fl?fl(u,yl):cl(u[ml])||pl(u,ml,Sl)),sl(u,l,!0)),vl&&o===wl&&v&&v.name!==wl&&(dl?ll(h,"name",wl):(p=!0,d=function(){return il(v,this)})),o)if(a={values:s(wl),keys:i?d:s(gl),entries:s(Ol)},c)for(f in a)(bl||p||!(f in h))&&pl(h,f,a[f]);else ol({target:e,proto:!0,forced:bl||p},a);return h[ml]!==d&&pl(h,ml,d,{name:o}),hl[e]=d,a},Tl=function(t,e){return{value:t,done:e}},El=U,Pl=function(t){xs[Is][t]=!0},Al=Va,Cl=Ln,Il=xe.f,xl=jl,Ll=Tl,Rl=f,kl="Array Iterator",Ml=Cl.set,Nl=Cl.getterFor(kl),_l=xl(Array,"Array",(function(t,e){Ml(this,{type:kl,target:El(t),index:0,kind:e})}),(function(){var t=Nl(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,Ll(void 0,!0);switch(t.kind){case"keys":return Ll(n,!1);case"values":return Ll(e[n],!1)}return Ll([n,e[n]],!1)}),"values"),Dl=Al.Arguments=Al.Array;if(Pl("keys"),Pl("values"),Pl("entries"),Rl&&"values"!==Dl.name)try{Il(Dl,"name",{value:"values"})}catch(t){}var Fl=mo,Bl=String,Gl=function(t){if("Symbol"===Fl(t))throw new TypeError("Cannot convert a Symbol value to a string");return Bl(t)},Ul=E,zl=ir,Wl=Gl,Hl=F,Vl=Ul("".charAt),ql=Ul("".charCodeAt),Jl=Ul("".slice),Kl=function(t){return function(e,n){var r,o,i=Wl(Hl(e)),c=zl(n),u=i.length;return c<0||c>=u?t?"":void 0:(r=ql(i,c))<55296||r>56319||c+1===u||(o=ql(i,c+1))<56320||o>57343?t?Vl(i,c):r:t?Jl(i,c,c+2):o-56320+(r-55296<<10)+65536}},Xl={codeAt:Kl(!1),charAt:Kl(!0)}.charAt,Yl=Gl,$l=Ln,Ql=jl,Zl=Tl,tp="String Iterator",ep=$l.set,np=$l.getterFor(tp);Ql(String,"String",(function(t){ep(this,{type:tp,string:Yl(t),index:0})}),(function(){var t,e=np(this),n=e.string,r=e.index;return r>=n.length?Zl(void 0,!0):(t=Xl(n,r),e.index+=t.length,Zl(t,!1))}));var rp={exports:{}},op={},ip=fr,cp=hr,up=ao,ap=Array,fp=Math.max,sp=I,lp=U,pp=er.f,hp=function(t,e,n){for(var r=cp(t),o=ip(e,r),i=ip(void 0===n?r:n,r),c=ap(fp(i-o,0)),u=0;o<i;o++,u++)up(c,u,t[o]);return c.length=u,c},vp="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];op.f=function(t){return vp&&"Window"===sp(t)?function(t){try{return pp(t)}catch(t){return hp(vp)}}(t):pp(lp(t))};var dp=a((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),yp=a,bp=K,mp=I,gp=dp,wp=Object.isExtensible,Op=yp((function(){wp(1)}))||gp?function(t){return!!bp(t)&&((!gp||"ArrayBuffer"!==mp(t))&&(!wp||wp(t)))}:wp,Sp=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),jp=eo,Tp=E,Ep=bn,Pp=K,Ap=Ht,Cp=xe.f,Ip=er,xp=op,Lp=Op,Rp=Sp,kp=!1,Mp=Xt("meta"),Np=0,_p=function(t){Cp(t,Mp,{value:{objectID:"O"+Np++,weakData:{}}})},Dp=rp.exports={enable:function(){Dp.enable=function(){},kp=!0;var t=Ip.f,e=Tp([].splice),n={};n[Mp]=1,t(n).length&&(Ip.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===Mp){e(r,o,1);break}return r},jp({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:xp.f}))},fastKey:function(t,e){if(!Pp(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Ap(t,Mp)){if(!Lp(t))return"F";if(!e)return"E";_p(t)}return t[Mp].objectID},getWeakData:function(t,e){if(!Ap(t,Mp)){if(!Lp(t))return!0;if(!e)return!1;_p(t)}return t[Mp].weakData},onFreeze:function(t){return Rp&&kp&&Lp(t)&&!Ap(t,Mp)&&_p(t),t}};Ep[Mp]=!0;var Fp=rp.exports,Bp=V,Gp=K,Up=qi,zp=eo,Wp=c,Hp=E,Vp=Jr,qp=tr,Jp=Fp,Kp=Tf,Xp=rc,Yp=V,$p=N,Qp=K,Zp=a,th=If,eh=Yi,nh=function(t,e,n){var r,o;return Up&&Bp(r=e.constructor)&&r!==n&&Gp(o=r.prototype)&&o!==n.prototype&&Up(t,o),t},rh=tr,oh=Sc,ih=M,ch=Ut,uh=hr,ah=Bo,fh=E([].push),sh=function(t){var e=1===t,n=2===t,r=3===t,o=4===t,i=6===t,c=7===t,u=5===t||i;return function(a,f,s,l){for(var p,h,v=ch(a),d=ih(v),y=uh(d),b=oh(f,s),m=0,g=l||ah,w=e?g(a,y):n||c?g(a,0):void 0;y>m;m++)if((u||m in d)&&(h=b(p=d[m],m,v),t))if(e)w[m]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:fh(w,p)}else switch(t){case 4:return!1;case 7:fh(w,p)}return i?-1:r||o?o:w}},lh={forEach:sh(0),map:sh(1),filter:sh(2),some:sh(3),every:sh(4),find:sh(5),findIndex:sh(6),filterReject:sh(7)},ph=E,hh=function(t,e,n){for(var r in e)rh(t,r,e[r],n);return t},vh=Fp.getWeakData,dh=rc,yh=Ne,bh=N,mh=K,gh=Tf,wh=Ht,Oh=Ln.set,Sh=Ln.getterFor,jh=lh.find,Th=lh.findIndex,Eh=ph([].splice),Ph=0,Ah=function(t){return t.frozen||(t.frozen=new Ch)},Ch=function(){this.entries=[]},Ih=function(t,e){return jh(t.entries,(function(t){return t[0]===e}))};Ch.prototype={get:function(t){var e=Ih(this,t);if(e)return e[1]},has:function(t){return!!Ih(this,t)},set:function(t,e){var n=Ih(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Th(this.entries,(function(e){return e[0]===t}));return~e&&Eh(this.entries,e,1),!!~e}};var xh={getConstructor:function(t,e,n,r){var o=t((function(t,o){dh(t,i),Oh(t,{type:e,id:Ph++,frozen:void 0}),bh(o)||gh(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,c=Sh(e),u=function(t,e,n){var r=c(t),o=vh(yh(e),!0);return!0===o?Ah(r).set(e,n):o[r.id]=n,t};return hh(i,{delete:function(t){var e=c(this);if(!mh(t))return!1;var n=vh(t);return!0===n?Ah(e).delete(t):n&&wh(n,e.id)&&delete n[e.id]},has:function(t){var e=c(this);if(!mh(t))return!1;var n=vh(t);return!0===n?Ah(e).has(t):n&&wh(n,e.id)}}),hh(i,n?{get:function(t){var e=c(this);if(mh(t)){var n=vh(t);return!0===n?Ah(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return u(this,t,e)}}:{add:function(t){return u(this,t,!0)}}),o}};(function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",c=Wp[t],u=c&&c.prototype,a=c,f={},s=function(t){var e=Hp(u[t]);qp(u,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!Qp(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!Qp(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!Qp(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(Vp(t,!Yp(c)||!(o||u.forEach&&!Zp((function(){(new c).entries().next()})))))a=n.getConstructor(e,t,r,i),Jp.enable();else if(Vp(t,!0)){var l=new a,p=l[i](o?{}:-0,1)!==l,h=Zp((function(){l.has(1)})),v=th((function(t){new c(t)})),d=!o&&Zp((function(){for(var t=new c,e=5;e--;)t[i](e,e);return!t.has(-0)}));v||((a=e((function(t,e){Xp(t,u);var n=nh(new c,t,a);return $p(e)||Kp(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=u,u.constructor=a),(h||d)&&(s("delete"),s("has"),r&&s("get")),(d||p)&&s(i),o&&u.clear&&delete u.clear}f[t]=a,zp({global:!0,constructor:!0,forced:a!==c},f),eh(a,t),o||n.setStrong(a,t,r)})("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),xh);var Lh,Rh,kh,Mh=me("span").classList,Nh=Mh&&Mh.constructor&&Mh.constructor.prototype,_h=Nh===Object.prototype?void 0:Nh,Dh=c,Fh={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Bh=_h,Gh=_l,Uh=Xe,zh=Yi,Wh=oe("iterator"),Hh=Gh.values,Vh=function(t,e){if(t){if(t[Wh]!==Hh)try{Uh(t,Wh,Hh)}catch(e){t[Wh]=Hh}if(zh(t,e,!0),Fh[e])for(var n in Gh)if(t[n]!==Gh[n])try{Uh(t,n,Gh[n])}catch(e){t[n]=Gh[n]}}};for(var qh in Fh)Vh(Dh[qh]&&Dh[qh].prototype,qh);function Jh(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}Vh(Bh,"DOMTokenList");var Kh="#ch-tooltip",Xh={enabled:!0,text:function(t,e,n){return"".concat(e," - ").concat(n.format("LLLL"))}},Yh={placement:"top",modifiers:[{name:"offset",options:{offset:[0,8]}}]},$h={getBoundingClientRect:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{width:0,height:0,top:e,right:t,bottom:e,left:t,x:t,y:e,toJSON:function(){}}}},Qh=function(){function n(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),Lh.add(this),this.name="Tooltip",this.calendar=t,this.root=null,this.popperInstance=null,this.options=Xh,this.listenerAttached=!1}var r,o,i;return r=n,(o=[{key:"setup",value:function(e){this.options=Object.assign(Object.assign({},Xh),e);var n=this.calendar.eventEmitter;if(!this.options.enabled)return this.listenerAttached&&(n.off("mouseover",this.mouseOverCallback,this),n.off("mouseout",this.mouseOutCallback,this),this.listenerAttached=!1),void this.destroy();if(this.popperOptions=Object.assign(Object.assign({},Yh),this.options),this.root=document.getElementById(Kh.slice(1)),!this.root){var r=document.createElement("div");r.setAttribute("id",Kh.slice(1)),r.setAttribute("role","tooltip"),r.innerHTML='<div id="'.concat(Kh.slice(1),'-arrow" data-popper-arrow="true"></div>')+'<span id="'.concat(Kh.slice(1),'-body"></span>'),this.root=document.body.appendChild(r)}this.root.setAttribute("data-theme",this.calendar.options.options.theme),this.popperInstance=t($h,this.root,this.popperOptions),this.listenerAttached||(n.on("mouseover",this.mouseOverCallback,this),n.on("mouseout",this.mouseOutCallback,this),this.listenerAttached=!0)}},{key:"mouseOverCallback",value:function(t,e,n){Jh(this,Lh,"m",Rh).call(this,t.target,e,n)}},{key:"mouseOutCallback",value:function(){Jh(this,Lh,"m",kh).call(this)}},{key:"paint",value:function(){return Promise.resolve()}},{key:"destroy",value:function(){return this.root&&this.root.remove(),Promise.resolve()}}])&&e(r.prototype,o),i&&e(r,i),Object.defineProperty(r,"prototype",{writable:!1}),n}();Lh=new WeakSet,Rh=function(t,e,r){var o=this,i=this.options.text,c=i?i(e,r,this.calendar.dateHelper.date(e)):null;c&&($h.getBoundingClientRect=function(){return t.getBoundingClientRect()},document.getElementById("".concat(Kh.slice(1),"-body")).innerHTML=c,this.popperInstance.setOptions((function(){return Object.assign(Object.assign({},o.popperOptions),{modifiers:[].concat(n(o.popperOptions.modifiers),[{name:"eventListeners",enabled:!0}])})})),this.popperInstance.update(),this.root.setAttribute("data-show","1"))},kh=function(){var t=this;this.root.removeAttribute("data-show"),this.popperInstance.setOptions((function(){return Object.assign(Object.assign({},t.popperOptions),{modifiers:[].concat(n(t.popperOptions.modifiers),[{name:"eventListeners",enabled:!1}])})}))};export{Qh as default};//# sourceMappingURL=Tooltip.min.esm.js.map