Files
espocrm/client/modules/crm/lib/vis-timeline.js
2026-01-19 17:46:06 +01:00

8 lines
417 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
((t,e)=>{"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("moment"),require("vis-data/peer/umd/vis-data.js")):"function"==typeof define&&define.amd?define(["exports","moment","vis-data/peer/umd/vis-data.js"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,e(t.vis=t.vis||{},t.moment,t.vis))})(this,function(L,j,B){var z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function H(t){return t&&t.Math==Math&&t}function e(t){try{return!!t()}catch(t){return!0}}function G(t){return ot(nt(t),8,-1)}function W(t){if("Function"===rt(t))return st(t)}function Y(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}function V(t){return null==t}function U(t){if(bt(t))throw wt("Can't call method on "+t);return t}function X(t){return kt(xt(t))}function q(t){return Tt(t)?t:void 0}function K(t,e){return arguments.length<2?q(St[t])||q(Dt[t]):St[t]&&St[t][e]||Dt[t]&&Dt[t][e]}var $={},Z={get exports(){return $},set exports(t){$=t}},z=H("object"==typeof globalThis&&globalThis)||H("object"==typeof window&&window)||H("object"==typeof self&&self)||H("object"==typeof z&&z)||function(){return this}()||Function("return this")(),n=e,n=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),o=n,Q=Function.prototype,J=Q.apply,tt=Q.call,Q="object"==typeof Reflect&&Reflect.apply||(o?tt.bind(J):function(){return tt.apply(J,arguments)}),o=n,et=Function.prototype,it=et.call,et=o&&et.bind.bind(it,it),o=o?et:function(t){return function(){return it.apply(t,arguments)}},et=o,nt=et({}.toString),ot=et("".slice),rt=G,st=o,et="object"==typeof document&&document.all,at=void 0===et&&void 0!==et,et={all:et,IS_HTMLDDA:at},at=et,lt=at.all,at=at.IS_HTMLDDA?function(t){return"function"==typeof t||t===lt}:function(t){return"function"==typeof t},ht={},ut=e,ut=!ut(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),ct=n,dt=Function.prototype.call,ct=ct?dt.bind(dt):function(){return dt.apply(dt,arguments)},pt={},r={}.propertyIsEnumerable,ft=Object.getOwnPropertyDescriptor,mt=ft&&!r.call({1:2},1),mt=(pt.f=mt?function(t){var e=ft(this,t);return!!e&&e.enumerable}:r,o),r=e,gt=G,vt=Object,yt=mt("".split),mt=r(function(){return!vt("z").propertyIsEnumerable(0)})?function(t){return"String"==gt(t)?yt(t,""):vt(t)}:vt,bt=V,wt=TypeError,kt=mt,xt=U,_t=at,r=et,Ct=r.all,et=r.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:_t(t)||t===Ct}:function(t){return"object"==typeof t?null!==t:_t(t)},r={},St=r,Dt=z,Tt=at,Et=o,Et=Et({}.isPrototypeOf),s="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Ot=z,a=s,At=Ot.process,Ot=Ot.Deno,At=At&&At.versions||Ot&&Ot.version,Ot=At&&At.v8;if(Ot){h=Ot.split(".");ie=0<h[0]&&h[0]<4?1:+(h[0]+h[1])}if(!ie&&a){h=a.match(/Edge\/(\d+)/);if(!h||74<=h[1]){h=a.match(/Chrome\/(\d+)/);h&&(ie=+h[1])}}function It(t){try{return ae(t)}catch(t){return"Object"}}function Pt(t){if(le(t))return t;throw ue(he(t)+" is not a function")}function Mt(t,e){var i=t[e];return de(i)?void 0:ce(i)}function Nt(t){return Ce(_e(t))}function Ft(t){return"Symbol("+(void 0===t?"":t)+")_"+Oe(++Te+Ee,36)}function Rt(t){Ae(Ne,t)||(Ne[t]=Pe&&Ae(Me,t)?Me[t]:Fe("Symbol."+t));return Ne[t]}function Lt(t){var e=We(t,"string");return Ye(e)?e:e+""}function jt(t){return Ue?Ve.createElement(t):{}}function Bt(t,e){var i=si[ri(t)];return i==li||i!=ai&&(ni(e)?ii(e):!!e)}function zt(t,e){hi(t);return void 0===e?t:ui?ci(t,e):function(){return t.apply(e,arguments)}}function Ht(t){if(di(t))return t;throw fi(pi(t)+" is not an object")}function Gt(n){function o(t,e,i){if(this instanceof o){switch(arguments.length){case 0:return new n;case 1:return new n(t);case 2:return new n(t,e)}return new n(t,e,i)}return Ti(n,this,arguments)}o.prototype=n.prototype;return o}function l(t,e){var i,n,o,r,s,a,l=t.target,h=t.global,u=t.stat,c=t.proto,d=h?Di:u?Di[l]:(Di[l]||{}).prototype,p=h?Pi:Pi[l]||Ni(Pi,l,{})[l],f=p.prototype;for(n in e){i=Ii(h?n:l+(u?".":"#")+n,t.forced);s=!i&&d&&Fi(d,n);r=p[n];if(s)if(t.dontCallGetSet){a=Ai(d,n);a=a&&a.value}else a=d[n];o=s&&a?a:e[n];if(!s||typeof r!=typeof o){s=t.bind&&s?Mi(o,Di):t.wrap&&s?Gt(o):c&&Oi(o)?Ei(o):o;(t.sham||o&&o.sham||r&&r.sham)&&Ni(s,"sham",!0);Ni(p,n,s);if(c){r=l+"Prototype";Fi(Pi,r)||Ni(Pi,r,{});Ni(Pi[r],n,o);t.real&&f&&(i||!f[n])&&Ni(f,n,o)}}}}function Wt(){}function Yt(t){if(!Qi(t))return!1;try{on(Wt,nn,t);return!0}catch(t){return!1}}function Vt(t){if(!Qi(t))return!1;switch(Ji(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return an||!!sn(rn,en(t))}catch(t){return!0}}function Ut(t){var e=+t;return e!=e||0==e?0:pn(e)}function Xt(t,e){var i=fn(t);return i<0?mn(i+e,0):gn(i,e)}function qt(t){return bn(t.length)}function Kt(a){return function(t,e,i){var n,o=wn(t),r=xn(o),s=kn(i,r);if(a&&e!=e)for(;s<r;){n=o[s++];if(n!=n)return!0}else for(;s<r;s++)if((a||s in o)&&o[s]===e)return a||s||0;return!a&&-1}}function $t(t,e){var i,n=Sn(t),o=0,r=[];for(i in n)!Cn(Tn,i)&&Cn(n,i)&&En(r,i);for(;e.length>o;)!Cn(n,i=e[o++])||~Dn(r,i)||En(r,i);return r}function Zt(t){return Ln[t]||(Ln[t]=Rn(t))}function Qt(){}function Jt(t){t.write(qn(""));t.close();var e=t.parentWindow.Object;t=null;return e}var te,At=ie,ee=At,Ot=e,a=!!Object.getOwnPropertySymbols&&!Ot(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ee&&ee<41}),h=a,ie=h&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ne=K,oe=at,re=Et,Ot=ie,se=Object,h=Ot?function(t){return"symbol"==typeof t}:function(t){var e=ne("Symbol");return oe(e)&&re(e.prototype,se(t))},ae=String,le=at,he=It,ue=TypeError,ce=Pt,de=V,pe=ct,fe=at,me=et,ge=TypeError,ve={},Ot={get exports(){return ve},set exports(t){ve=t}},ye=z,be=Object.defineProperty,u=z,we=function(e,i){try{be(ye,e,{value:i,configurable:!0,writable:!0})}catch(t){ye[e]=i}return i},ke="__core-js_shared__",u=u[ke]||we(ke,{}),we=u,xe=we,_e=((Ot.exports=function(t,e){return xe[t]||(xe[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"}),U),Ce=Object,ke=o,Se=Nt,De=ke({}.hasOwnProperty),u=Object.hasOwn||function(t,e){return De(Se(t),e)},Ot=o,Te=0,Ee=Math.random(),Oe=Ot(1..toString),ke=z,Ot=ve,Ae=u,Ie=Ft,Pe=a,Me=ke.Symbol,Ne=Ot("wks"),Fe=ie?Me.for||Me:Me&&Me.withoutSetter||Ie,Re=ct,Le=et,je=h,Be=Mt,ze=function(t,e){var i,n;if("string"===e&&fe(i=t.toString)&&!me(n=pe(i,t)))return n;if(fe(i=t.valueOf)&&!me(n=pe(i,t)))return n;if("string"!==e&&fe(i=t.toString)&&!me(n=pe(i,t)))return n;throw ge("Can't convert object to primitive value")},ke=Rt,He=TypeError,Ge=ke("toPrimitive"),We=function(t,e){if(!Le(t)||je(t))return t;var i=Be(t,Ge);if(i){void 0===e&&(e="default");i=Re(i,t,e);if(!Le(i)||je(i))return i;throw He("Can't convert object to primitive value")}void 0===e&&(e="number");return ze(t,e)},Ye=h,Ot=z,ie=et,Ve=Ot.document,Ue=ie(Ve)&&ie(Ve.createElement),Ie=ut,ke=e,Xe=jt,Ot=!Ie&&!ke(function(){return 7!=Object.defineProperty(Xe("div"),"a",{get:function(){return 7}}).a}),ie=ut,qe=ct,Ke=pt,$e=Y,Ze=X,Qe=Lt,Je=u,ti=Ot,ei=Object.getOwnPropertyDescriptor,ii=(ht.f=ie?ei:function(t,e){t=Ze(t);e=Qe(e);if(ti)try{return ei(t,e)}catch(t){}if(Je(t,e))return $e(!qe(Ke.f,t,e),t[e])},e),ni=at,oi=/#|\.prototype\./,ri=Bt.normalize=function(t){return String(t).replace(oi,".").toLowerCase()},si=Bt.data={},ai=Bt.NATIVE="N",li=Bt.POLYFILL="P",Ie=Bt,ke=W,hi=Pt,ui=n,ci=ke(ke.bind),ie={},ke=ut,c=e,ke=ke&&c(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),di=et,pi=String,fi=TypeError,c=ut,mi=Ot,Ot=ke,gi=Ht,vi=Lt,yi=TypeError,bi=Object.defineProperty,wi=Object.getOwnPropertyDescriptor,ki="enumerable",xi="configurable",_i="writable",c=(ie.f=c?Ot?function(t,e,i){gi(t);e=vi(e);gi(i);if("function"==typeof t&&"prototype"===e&&"value"in i&&_i in i&&!i[_i]){var n=wi(t,e);if(n&&n[_i]){t[e]=i.value;i={configurable:(xi in i?i:n)[xi],enumerable:(ki in i?i:n)[ki],writable:!1}}}return bi(t,e,i)}:bi:function(t,e,i){gi(t);e=vi(e);gi(i);if(mi)try{return bi(t,e,i)}catch(t){}if("get"in i||"set"in i)throw yi("Accessors not supported");"value"in i&&(t[e]=i.value);return t},ut),Ci=ie,Si=Y,Ot=c?function(t,e,i){return Ci.f(t,e,Si(1,i))}:function(t,e,i){t[e]=i;return t},Di=z,Ti=Q,Ei=W,Oi=at,Ai=ht.f,Ii=Ie,Pi=r,Mi=zt,Ni=Ot,Fi=u,c=o,Ie=c([].slice),c=o,Ri=Pt,Li=et,ji=u,Bi=Ie,zi=Function,Hi=c([].concat),Gi=c([].join),Wi={},c=n?zi.bind:function(s){var a=Ri(this),t=a.prototype,l=Bi(arguments,1),h=function(){var t=Hi(l,Bi(arguments));if(this instanceof h){var e=a,i=t.length,n=t;if(!ji(Wi,i)){for(var o=[],r=0;r<i;r++)o[r]="a["+r+"]";Wi[i]=zi("C,a","return new C("+Gi(o,",")+")")}return Wi[i](e,n)}return a.apply(s,t)};Li(t)&&(h.prototype=t);return h},n=Rt,n=n("toStringTag"),d={},n=(d[n]="z","[object z]"===String(d)),d=n,Yi=at,Vi=G,Ui=Rt,Xi=Ui("toStringTag"),qi=Object,Ki="Arguments"==Vi(function(){return arguments}()),Ui=d?Vi:function(t){var e,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=((t,e)=>{try{return t[e]}catch(t){}})(e=qi(t),Xi))?i:Ki?Vi(e):"Object"==(i=Vi(e))&&Yi(e.callee)?"Arguments":i},d=o,p=at,$i=we,Zi=d(Function.toString),d=(p($i.inspectSource)||($i.inspectSource=function(t){return Zi(t)}),$i.inspectSource),p=o,$i=e,Qi=at,Ji=Ui,tn=K,en=d,nn=[],on=tn("Reflect","construct"),rn=/^\s*(?:class|function)\b/,sn=p(rn.exec),an=!rn.exec(Wt),d=(Vt.sham=!0,!on||$i(function(){var t;return Yt(Yt.call)||!Yt(Object)||!Yt(function(){t=!0})||t})?Vt:Yt),ln=d,hn=It,un=TypeError,tn={},cn=Math.ceil,dn=Math.floor,p=Math.trunc||function(t){var e=+t;return(0<e?dn:cn)(e)},pn=p,fn=Ut,mn=Math.max,gn=Math.min,vn=Ut,yn=Math.min,bn=function(t){return 0<t?yn(vn(t),9007199254740991):0},wn=X,kn=Xt,xn=qt,$i={includes:Kt(!0),indexOf:Kt(!1)},p={},_n=o,Cn=u,Sn=X,Dn=$i.indexOf,Tn=p,En=_n([].push),_n=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],On=$t,An=_n,In=Object.keys||function(t){return On(t,An)},f=ut,Pn=ie,Mn=Ht,Nn=X,Fn=In,f=(tn.f=f&&!ke?Object.defineProperties:function(t,e){Mn(t);for(var i,n=Nn(e),o=Fn(e),r=o.length,s=0;s<r;)Pn.f(t,i=o[s++],n[i]);return t},K),ke=f("document","documentElement"),f=ve,Rn=Ft,Ln=f("keys"),jn=Ht,Bn=tn,zn=_n,f=p,Hn=ke,Gn=jt,ke=Zt,Wn=">",Yn="<",Vn="prototype",Un="script",Xn=ke("IE_PROTO"),qn=function(t){return Yn+Un+Wn+t+Yn+"/"+Un+Wn},Kn=function(){try{te=new ActiveXObject("htmlfile")}catch(t){}Kn="undefined"==typeof document||document.domain&&te?Jt(te):(()=>{var t=Gn("iframe"),e="java"+Un+":";t.style.display="none";Hn.appendChild(t);t.src=String(e);e=t.contentWindow.document;e.open();e.write(qn("document.F=Object"));e.close();return e.F})();for(var t=zn.length;t--;)delete Kn[Vn][zn[t]];return Kn()},ke=(f[Xn]=!0,Object.create||function(t,e){var i;if(null!==t){Qt[Vn]=jn(t);i=new Qt;Qt[Vn]=null;i[Xn]=t}else i=Kn();return void 0===e?i:Bn.f(i,e)}),f=l,$n=K,Zn=Q,Qn=c,Jn=function(t){if(ln(t))return t;throw un(hn(t)+" is not a constructor")},to=Ht,eo=et,io=ke,no=e,oo=$n("Reflect","construct"),ro=Object.prototype,so=[].push,ao=no(function(){function t(){}return!(oo(function(){},[],t)instanceof t)}),lo=!no(function(){oo(function(){})}),$n=ao||lo,no=(f({target:"Reflect",stat:!0,forced:$n,sham:$n},{construct:function(t,e){Jn(t);to(e);var i=arguments.length<3?t:Jn(arguments[2]);if(lo&&!ao)return oo(t,e,i);if(t==i){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];Zn(so,n,e);return new(Zn(Qn,t,n))}n=i.prototype,i=io(eo(n)?n:ro),n=Zn(t,i,e);return eo(n)?n:i}}),r),f=no.Reflect.construct,$n=f,no=$n,m=(N=Z,N.exports=no,t($));function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ho={},f={get exports(){return ho},set exports(t){ho=t}},uo={},$n={get exports(){return uo},set exports(t){uo=t}},co={},Z={get exports(){return co},set exports(t){co=t}},no=l,po=ut,v=ie.f,no=(no({target:"Object",stat:!0,forced:Object.defineProperty!==v,sham:!po},{defineProperty:v}),r),fo=no.Object,po=Z.exports=function(t,e,i){return fo.defineProperty(t,e,i)},v=(fo.defineProperty.sham&&(po.sham=!0),co),no=v,Z=no,po=Z,v=po,Z=v;N=$n,N.exports=Z;N=f,N.exports=uo;function mo(t){if(9007199254740991<t)throw Mo("Maximum allowed index exceeded");return t}function go(t,e,i){var n=No(e);n in t?Fo.f(t,n,Ro(0,i)):t[n]=i}function vo(t,e){return new(Go(t))(0===e?0:e)}function yo(i){return 51<=Yo||!Wo(function(){var t=[],e=t.constructor={};e[Vo]=function(){return{foo:1}};return 1!==t[i](Boolean).foo})}function bo(t){if("Symbol"===ir(t))throw TypeError("Cannot convert a Symbol value to a string");return nr(t)}function wo(t,e,i){for(var n=ar(t),o=sr(e,n),r=sr(void 0===i?n:i,n),s=hr(ur(r-o,0)),a=0;o<r;o++,a++)lr(s,a,t[o]);s.length=a;return s}function ko(t,e,i,n){n&&n.enumerable?t[e]=i:gr(t,e,i);return t}function xo(t,e,i){return vr.f(t,e,i)}function _o(t){var e=yr.Symbol||(yr.Symbol={});br(e,t)||kr(e,t,{value:wr.f(t)})}function Co(){var t=_r("Symbol"),t=t&&t.prototype,e=t&&t.valueOf,i=Cr("toPrimitive");t&&!t[i]&&Sr(t,i,function(t){return xr(e,this)},{arity:1})}function So(t,e,i,n){if(t){var o=i?t:t.prototype;Ar(o,Pr)||Er(o,Pr,{configurable:!0,value:e});n&&!Tr&&Or(o,"toString",Ir)}}var Do,To,Eo,Oo=t(ho),Ao={},po={get exports(){return Ao},set exports(t){Ao=t}},Io={},v={get exports(){return Io},set exports(t){Io=t}},Po=G,$n=Array.isArray||function(t){return"Array"==Po(t)},Mo=TypeError,No=Lt,Fo=ie,Ro=Y,Lo=$n,jo=d,Bo=et,Z=Rt,zo=Z("species"),Ho=Array,Go=function(t){var e;if(Lo(t)){e=t.constructor;if(jo(e)&&(e===Ho||Lo(e.prototype)))e=void 0;else if(Bo(e)){e=e[zo];null===e&&(e=void 0)}}return void 0===e?Ho:e},Wo=e,f=Rt,Yo=At,Vo=f("species"),Z=l,f=e,Uo=$n,Xo=et,qo=Nt,Ko=qt,$o=mo,Zo=go,Qo=vo,Jo=yo,tr=Rt,y=At,er=tr("isConcatSpreadable"),tr=51<=y||!f(function(){var t=[];t[er]=!1;return t.concat()[0]!==t}),y=!tr||!Jo("concat"),ir=(Z({target:"Array",proto:!0,arity:1,forced:y},{concat:function(t){for(var e,i,n,o,r,s=qo(this),a=Qo(s,0),l=0,h=-1,u=arguments.length;h<u;h++){n=-1===h?s:arguments[h];if(o=n,r=void 0,!Xo(o)||(r=o[er],void 0!==r?!r:!Uo(o))){$o(l+1);Zo(a,l++,n)}else{i=Ko(n);$o(l+i);for(e=0;e<i;e++,l++)e in n&&Zo(a,l,n[e])}}a.length=l;return a}}),Ui),nr=String,f={},or=$t,tr=_n,rr=tr.concat("length","prototype"),Jo=(f.f=Object.getOwnPropertyNames||function(t){return or(t,rr)},{}),sr=Xt,ar=qt,lr=go,hr=Array,ur=Math.max,cr=G,dr=X,pr=f.f,fr=wo,mr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Z=(Jo.f=function(t){if(!mr||"Window"!=cr(t))return pr(dr(t));try{return pr(t)}catch(t){return fr(mr)}},{}),gr=(Z.f=Object.getOwnPropertySymbols,Ot),vr=ie,y={},_n=Rt,yr=(y.f=_n,r),br=u,wr=y,kr=ie.f,xr=ct,_r=K,Cr=Rt,Sr=ko,tr=n,Dr=Ui,_n=tr?{}.toString:function(){return"[object "+Dr(this)+"]"},Tr=n,Er=ie.f,Or=Ot,Ar=u,Ir=_n,tr=Rt,Pr=tr("toStringTag"),n=z,_n=at,tr=n.WeakMap,n=_n(tr)&&/native code/.test(String(tr)),_n=n,tr=z,Mr=et,Nr=Ot,Fr=u,n=we,we=Zt,b=p,Rr="Object already initialized",Lr=tr.TypeError,tr=tr.WeakMap;if(_n||n.state){var jr=n.state||(n.state=new tr);jr.get=jr.get;jr.has=jr.has;jr.set=jr.set;Do=function(t,e){if(jr.has(t))throw Lr(Rr);e.facade=t;jr.set(t,e);return e};To=function(t){return jr.get(t)||{}};Eo=function(t){return jr.has(t)}}else{var Br=we("state");b[Br]=!0;Do=function(t,e){if(Fr(t,Br))throw Lr(Rr);e.facade=t;Nr(t,Br,e);return e};To=function(t){return Fr(t,Br)?t[Br]:{}};Eo=function(t){return Fr(t,Br)}}function zr(p){var f=1==p,m=2==p,g=3==p,v=4==p,y=6==p,b=7==p,w=5==p||y;return function(t,e,i,n){for(var o,r,s=$r(t),a=Kr(s),l=qr(e,i),h=Zr(a),u=0,c=n||Qr,d=f?c(t,h):m||b?c(t,0):void 0;u<h;u++)if(w||u in a){o=a[u];r=l(o,u,s);if(p)if(f)d[u]=r;else if(r)switch(p){case 3:return!0;case 5:return o;case 6:return u;case 2:Jr(d,o)}else switch(p){case 4:return!1;case 7:Jr(d,o)}}return y?-1:g||v?v:d}}function Hr(t,e){var i=Rs[t]=cs(Os);Ds(i,{type:Ss,tag:t,description:e});es||(i.description=e);return i}function Gr(t,e,i){t===Es&&Gr(Ls,e,i);ss(t);var n=ls(e);ss(i);if(os(Rs,n)){if(i.enumerable){os(t,Cs)&&t[Cs][n]&&(t[Cs][n]=!1);i=cs(i,{enumerable:us(0,!1)})}else{os(t,Cs)||Ps(t,Cs,us(1,{}));t[Cs][n]=!0}return Bs(t,n,i)}return Ps(t,n,i)}function Wr(e,t){ss(e);var i=as(t),n=ds(i).concat(Xr(i));_s(n,function(t){es&&!ts(Yr,i,t)||Gr(e,t,i[t])});return e}function Yr(t){var e=ls(t),i=ts(Ns,this,e);return!(this===Es&&os(Rs,e)&&!os(Ls,e))&&(!(i||!os(this,e)||!os(Rs,e)||os(this,Cs)&&this[Cs][e])||i)}function Vr(t,e){var i=as(t),n=ls(e);if(i!==Es||!os(Rs,n)||os(Ls,n)){var o=Is(i,n);!o||!os(Rs,n)||os(i,Cs)&&i[Cs][n]||(o.enumerable=!0);return o}}function Ur(t){var e=Ms(as(t)),i=[];_s(e,function(t){os(Rs,t)||os(ys,t)||Fs(i,t)});return i}function Xr(t){var e=t===Es,i=Ms(e?Ls:as(t)),n=[];_s(i,function(t){!os(Rs,t)||e&&!os(Es,t)||Fs(n,Rs[t])});return n}var _n={set:Do,get:To,has:Eo,enforce:function(t){return Eo(t)?To(t):Do(t,{})},getterFor:function(i){return function(t){var e;if(Mr(t)&&(e=To(t)).type===i)return e;throw Lr("Incompatible receiver, "+i+" required")}}},qr=zt,n=o,Kr=mt,$r=Nt,Zr=qt,Qr=vo,Jr=n([].push),tr={forEach:zr(0),map:zr(1),filter:zr(2),some:zr(3),every:zr(4),find:zr(5),findIndex:zr(6),filterReject:zr(7)},we=l,b=z,ts=ct,n=o,es=ut,is=a,ns=e,os=u,rs=Et,ss=Ht,as=X,ls=Lt,hs=bo,us=Y,cs=ke,ds=In,ps=f,w=Jo,k=Z,fs=ht,x=ie,ms=tn,gs=pt,_=ko,vs=xo,C=ve,S=Zt,ys=p,bs=Ft,ws=Rt,D=y,ks=_o,T=Co,xs=So,E=_n,_s=tr.forEach,Cs=S("hidden"),Ss="Symbol",S="prototype",Ds=E.set,Ts=E.getterFor(Ss),Es=Object[S],E=b.Symbol,Os=E&&E[S],As=b.TypeError,b=b.QObject,Is=fs.f,Ps=x.f,Ms=w.f,Ns=gs.f,Fs=n([].push),Rs=C("symbols"),Ls=C("op-symbols"),n=C("wks"),js=!b||!b[S]||!b[S].findChild,Bs=es&&ns(function(){return 7!=cs(Ps({},"a",{get:function(){return Ps(this,"a",{value:7}).a}})).a})?function(t,e,i){var n=Is(Es,e);n&&delete Es[e];Ps(t,e,i);n&&t!==Es&&Ps(Es,e,n)}:Ps;if(!is){E=function(){if(rs(Os,this))throw As("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?hs(arguments[0]):void 0,e=bs(t),i=function(t){this===Es&&ts(i,Ls,t);os(this,Cs)&&os(this[Cs],e)&&(this[Cs][e]=!1);Bs(this,e,us(1,t))};es&&js&&Bs(Es,e,{configurable:!0,set:i});return Hr(e,t)};Os=E[S];_(Os,"toString",function(){return Ts(this).tag});_(E,"withoutSetter",function(t){return Hr(bs(t),t)});gs.f=Yr;x.f=Gr;ms.f=Wr;fs.f=Vr;ps.f=w.f=Ur;k.f=Xr;D.f=function(t){return Hr(ws(t),t)};es&&vs(Os,"description",{configurable:!0,get:function(){return Ts(this).description}})}we({global:!0,constructor:!0,wrap:!0,forced:!is,sham:!is},{Symbol:E});_s(ds(n),function(t){ks(t)});we({target:Ss,stat:!0,forced:!is},{useSetter:function(){js=!0},useSimple:function(){js=!1}});we({target:"Object",stat:!0,forced:!is,sham:!es},{create:function(t,e){return void 0===e?cs(t):Wr(cs(t),e)},defineProperty:Gr,defineProperties:Wr,getOwnPropertyDescriptor:Vr});we({target:"Object",stat:!0,forced:!is},{getOwnPropertyNames:Ur});T();xs(E,Ss);ys[Cs]=!0;function zs(t,e){var i=aa(arguments),n=la(e);if(ra(n)||void 0!==t&&!sa(t))return i[1]=function(t,e){ra(n)&&(e=oa(n,this,ha(t),e));if(!sa(e))return e},na(ua,null,i)}function Hs(t,e,i){var n=da(i,e-1),o=da(i,e+1);return ca(va,t)&&!ca(ya,o)||ca(ya,t)&&!ca(va,n)?"\\u"+ma(pa(t,0),16):t}var C=a,b=C&&!!Symbol.for&&!!Symbol.keyFor,ns=l,Gs=K,Ws=u,Ys=bo,S=ve,_=b,Vs=S("string-to-symbol-registry"),Us=S("symbol-to-string-registry"),gs=(ns({target:"Symbol",stat:!0,forced:!_},{for:function(t){var e=Ys(t);if(Ws(Vs,e))return Vs[e];var i=Gs("Symbol")(e);Vs[e]=i;Us[i]=e;return i}}),l),Xs=u,qs=h,Ks=It,x=ve,ms=b,$s=x("symbol-to-string-registry"),fs=(gs({target:"Symbol",stat:!0,forced:!ms},{keyFor:function(t){if(!qs(t))throw TypeError(Ks(t)+" is not a symbol");if(Xs($s,t))return $s[t]}}),o),Zs=$n,Qs=at,Js=G,ta=bo,ea=fs([].push),ps=l,ia=K,na=Q,oa=ct,w=o,k=e,ra=at,sa=h,aa=Ie,la=function(t){if(Qs(t))return t;if(Zs(t)){for(var e=t.length,n=[],i=0;i<e;i++){var o=t[i];"string"==typeof o?ea(n,o):"number"!=typeof o&&"Number"!=Js(o)&&"String"!=Js(o)||ea(n,ta(o))}var r=n.length,s=!0;return function(t,e){if(s)return s=!1,e;if(Zs(this))return e;for(var i=0;i<r;i++)if(n[i]===t)return e}}},D=a,ha=String,ua=ia("JSON","stringify"),ca=w(/./.exec),da=w("".charAt),pa=w("".charCodeAt),fa=w("".replace),ma=w(1..toString),ga=/[\uD800-\uDFFF]/g,va=/^[\uD800-\uDBFF]$/,ya=/^[\uDC00-\uDFFF]$/,ba=!D||k(function(){var t=ia("Symbol")();return"[null]"!=ua([t])||"{}"!=ua({a:t})||"{}"!=ua(Object(t))}),wa=k(function(){return'"\\udf06\\ud834"'!==ua("\udf06\ud834")||'"\\udead"'!==ua("\udead")}),vs=(ua&&ps({target:"JSON",stat:!0,arity:3,forced:ba||wa},{stringify:function(t,e,i){var n=aa(arguments),n=na(ba?zs:ua,null,n);return wa&&"string"==typeof n?fa(n,ga,Hs):n}}),l),n=a,we=e,ka=Z,xa=Nt,is=!n||we(function(){ka.f(1)}),T=(vs({target:"Object",stat:!0,forced:is},{getOwnPropertySymbols:function(t){var e=ka.f;return e?e(xa(t)):[]}}),_o),xs=(T("asyncIterator"),_o),E=(xs("hasInstance"),_o),C=(E("isConcatSpreadable"),_o),S=(C("iterator"),_o),ns=(S("match"),_o),_=(ns("matchAll"),_o),b=(_("replace"),_o),x=(b("search"),_o),gs=(x("species"),_o),ms=(gs("split"),_o),fs=Co;ms("toPrimitive");fs();w=K,D=_o,k=So;D("toStringTag");k(w("Symbol"),"Symbol");var ps=_o,a=(ps("unscopables"),z),n=So,we=(n(a.JSON,"JSON",!0),r),vs=we.Symbol,is={},T=ut,xs=u,E=Function.prototype,C=T&&Object.getOwnPropertyDescriptor,S=xs(E,"name"),ns=S&&"something"===function(){}.name,_=S&&(!T||C(E,"name").configurable),b={EXISTS:S,PROPER:ns,CONFIGURABLE:_},x=e,gs=!x(function(){function t(){}t.prototype.constructor=null;return Object.getPrototypeOf(new t)!==t.prototype}),_a=u,Ca=at,Sa=Nt,ms=Zt,fs=gs,Da=ms("IE_PROTO"),Ta=Object,Ea=Ta.prototype,D=fs?Ta.getPrototypeOf:function(t){var e,i=Sa(t);return _a(i,Da)?i[Da]:(e=i.constructor,Ca(e)&&i instanceof e?e.prototype:i instanceof Ta?Ea:null)},k=e,w=at,ps=et,n=ke,a=D,we=ko,xs=Rt,Oa=xs("iterator"),T=!1;if([].keys){C=[].keys();if("next"in C){E=a(a(C));E!==Object.prototype&&(Na=E)}else T=!0}function Aa(){return this}function Ia(){return this}function Pa(t,e,i,n,o,r,s){$a(i,e,n);function a(t){if(t===o&&f)return f;if(!il&&t in d)return d[t];switch(t){case"keys":case ol:case rl:return function(){return new i(this,t)}}return function(){return new i(this)}}var l,h,u=e+" Iterator",c=!1,d=t.prototype,p=d[nl]||d["@@iterator"]||o&&d[o],f=!il&&p||a(o),m="Array"==e&&d.entries||p;if(m){m=Za(m.call(new t));if(m!==Object.prototype&&m.next){Qa(m,u,!0,!0);tl[u]=Ia}}if(el&&o==ol&&p&&p.name!==ol){c=!0;f=function(){return Ka(p,this)}}if(o){l={values:a(ol),keys:r?f:a("keys"),entries:a(rl)};if(s)for(h in l)!il&&!c&&h in d||Ja(d,h,l[h]);else qa({target:e,proto:!0,forced:il||c},l)}s&&d[nl]!==f&&Ja(d,nl,f,{name:o});tl[e]=f;return l}function Ma(t,e){return{value:t,done:e}}var S=!ps(Na)||k(function(){var t={};return Na[Oa].call(t)!==t}),Na=S?{}:n(Na),ns=(w(Na[Oa])||we(Na,Oa,function(){return this}),{IteratorPrototype:Na,BUGGY_SAFARI_ITERATORS:T}),Fa=ns.IteratorPrototype,Ra=ke,La=Y,ja=So,Ba=is,za=o,Ha=Pt,Ga=at,Wa=String,Ya=TypeError,Va=function(t,e,i){try{return za(Ha(Object.getOwnPropertyDescriptor(t,e)[i]))}catch(t){}},Ua=Ht,Xa=function(t){if("object"==typeof t||Ga(t))return t;throw Ya("Can't set "+Wa(t)+" as a prototype")},_=Object.setPrototypeOf||("__proto__"in{}?(()=>{var i,n=!1,t={};try{i=Va(Object.prototype,"__proto__","set");i(t,[]);n=t instanceof Array}catch(t){}return function(t,e){Ua(t);Xa(e);n?i(t,e):t.__proto__=e;return t}})():void 0),qa=l,Ka=ct,x=b,$a=function(t,e,i,n){var o=e+" Iterator";t.prototype=Ra(Fa,{next:La(+!n,i)});ja(t,o,!1,!0);Ba[o]=Aa;return t},Za=D,Qa=So,Ja=ko,ms=Rt,tl=is,fs=ns,el=x.PROPER,il=fs.BUGGY_SAFARI_ITERATORS,nl=ms("iterator"),ol="values",rl="entries",sl=X,xs=is,a=_n,C=Pa,al=Ma,ll="Array Iterator",hl=a.set,ul=a.getterFor(ll);C(Array,"Array",function(t,e){hl(this,{type:ll,target:sl(t),index:0,kind:e})},function(){var t=ul(this),e=t.target,i=t.kind,n=t.index++;if(!e||n>=e.length)return t.target=void 0,al(void 0,!0);return al("keys"==i?n:"values"==i?e[n]:[n,e[n]],!1)},"values");xs.Arguments=xs.Array;var cl,E={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},dl=z,pl=Ui,fl=Ot,ml=is,ps=Rt,gl=ps("toStringTag");for(cl in E){var vl=dl[cl],vl=vl&&vl.prototype;vl&&pl(vl)!==gl&&fl(vl,gl,cl);ml[cl]=ml.Array}for(var k=vs,S=k,n=_o,w=(n("dispose"),S),we=w,T=_o,ns=(T("asyncDispose"),l),x=K,fs=o,ms=x("Symbol"),yl=ms.keyFor,bl=fs(ms.prototype.valueOf),a=(ns({target:"Symbol",stat:!0},{isRegistered:function(t){try{return void 0!==yl(bl(t))}catch(t){return!1}}}),l),C=ve,xs=K,ps=o,wl=h,kl=Rt,xl=xs("Symbol"),_l=xl.isWellKnown,Cl=xs("Object","getOwnPropertyNames"),Sl=ps(xl.prototype.valueOf),Dl=C("wks"),Tl=0,El=Cl(xl),Ol=El.length;Tl<Ol;Tl++)try{var Al=El[Tl];wl(xl[Al])&&kl(Al)}catch(t){}a({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(t){if(_l&&_l(t))return!0;try{for(var e=Sl(t),i=0,n=Cl(Dl),o=n.length;i<o;i++)if(Dl[n[i]]==e)return!0}catch(t){}return!1}});E=_o,vs=(E("matcher"),_o),k=(vs("metadataKey"),_o),n=(k("observable"),_o),w=(n("metadata"),_o),T=(w("patternMatch"),_o),x=(T("replaceAll"),we),fs=x;N=v,N.exports=fs;N=po,N.exports=Io;function Il(s){return function(t,e){var i,n=Rl(Ll(t)),o=Fl(e),r=n.length;if(o<0||r<=o)return s?"":void 0;i=Bl(n,o);return i<55296||56319<i||o+1===r||(r=Bl(n,o+1))<56320||57343<r?s?jl(n,o):i:s?zl(n,o,o+2):r-56320+(i-55296<<10)+65536}}var Pl=t(Ao),Ml={},ms={get exports(){return Ml},set exports(t){Ml=t}},Nl={},ns={get exports(){return Nl},set exports(t){Nl=t}},h=o,Fl=Ut,Rl=bo,Ll=U,jl=h("".charAt),Bl=h("".charCodeAt),zl=h("".slice),xs={codeAt:Il(!1),charAt:Il(!0)},Hl=xs.charAt,Gl=bo,ps=_n,C=Pa,Wl=Ma,Yl="String Iterator",Vl=ps.set,Ul=ps.getterFor(Yl),a=(C(String,"String",function(t){Vl(this,{type:Yl,string:Gl(t),index:0})},function(){var t=Ul(this),e=t.string,i=t.index;if(i>=e.length)return Wl(void 0,!0);e=Hl(e,i);t.index+=e.length;return Wl(e,!1)}),y),E=a.f("iterator"),vs=E,k=vs,n=k,w=n,T=w,we=T;N=ns,N.exports=we;N=ms,N.exports=Nl;var Xl=t(Ml);function O(t){return O="function"==typeof Pl&&"symbol"==typeof Xl?function(t){return typeof t}:function(t){return t&&"function"==typeof Pl&&t.constructor===Pl&&t!==Pl.prototype?"symbol":typeof t},O(t)}var ql={},x={get exports(){return ql},set exports(t){ql=t}},Kl={},v={get exports(){return Kl},set exports(t){Kl=t}},fs=y,po=fs.f("toPrimitive"),h=po,xs=h,ps=xs,C=ps,a=C,E=a;N=v,N.exports=E;N=x,N.exports=Kl;var $l=t(ql);function Zl(t){var e=((t,e)=>{if("object"!==O(t)||null===t)return t;var i=t[$l];if(void 0===i)return("string"===e?String:Number)(t);i=i.call(t,e||"default");if("object"!==O(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"===O(e)?e:String(e)}function Ql(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1;n.configurable=!0;"value"in n&&(n.writable=!0);Oo(t,Zl(n.key),n)}}function Jl(t,e,i){e&&Ql(t.prototype,e);i&&Ql(t,i);Oo(t,"prototype",{writable:!1})}function th(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function eh(t,e){return oh.create(t,e)}var ih={},vs={get exports(){return ih},set exports(t){ih=t}},nh={},k={get exports(){return nh},set exports(t){nh=t}},n=l,w=ut,T=ke,ns=(n({target:"Object",stat:!0,sham:!w},{create:T}),r),oh=ns.Object,we=eh,ms=we,y=ms,fs=y,po=fs;N=k,N.exports=po;N=vs,N.exports=nh;var rh=t(ih),sh={},h={get exports(){return sh},set exports(t){sh=t}},ah={},xs={get exports(){return ah},set exports(t){ah=t}},ps=l,C=_,a=(ps({target:"Object",stat:!0},{setPrototypeOf:C}),r),v=a.Object.setPrototypeOf,E=v,x=E,n=x,w=n,T=w,ns=T;N=xs,N.exports=ns;N=h,N.exports=ah;function lh(t){return ph[t+"Prototype"]}function hh(t){var e=t.bind;return t===gh||fh(gh,t)&&e===gh.bind?mh:e}var uh=t(sh),ch={},ms={get exports(){return ch},set exports(t){ch=t}},dh={},y={get exports(){return dh},set exports(t){dh=t}},fs=l,k=c,ph=(fs({target:"Function",proto:!0,forced:Function.bind!==k},{bind:k}),r),po=lh,vs=po("Function").bind,fh=Et,mh=vs,gh=Function.prototype,_=hh,ps=_,C=ps,a=C,v=a;N=y,N.exports=v;N=ms,N.exports=dh;var vh=t(ch);function yh(t,e){var i;yh=uh?vh(i=uh).call(i):function(t,e){t.__proto__=e;return t};return yh(t,e)}function bh(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=rh(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Oo(t,"prototype",{writable:!1});e&&yh(t,e)}function wh(t,e){if(e&&("object"===O(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return th(t)}var kh={},E={get exports(){return kh},set exports(t){kh=t}},xh={},x={get exports(){return xh},set exports(t){xh=t}},n=l,w=e,_h=Nt,Ch=D,T=gs,xs=w(function(){Ch(1)}),ns=(n({target:"Object",stat:!0,forced:xs,sham:!T},{getPrototypeOf:function(t){return Ch(_h(t))}}),r),h=ns.Object.getPrototypeOf,c=h,fs=c,k=fs,po=k,vs=po,ps=vs;N=x,N.exports=ps;N=E,N.exports=xh;var Sh=t(kh);function Dh(t){var e;Dh=uh?vh(e=Sh).call(e):function(t){return t.__proto__||Sh(t)};return Dh(t)}function Th(r,s){var a=s?2:1;return zh?function(t,e){var i=jh(arguments.length,1)>a,n=Rh(t)?t:Bh(t),o=i?Lh(arguments,a):[],i=i?function(){Fh(n,this,o)}:n;return s?r(i,e):r(i)}:r}function Eh(t,e){var i=[][t];return!!i&&Wh(function(){i.call(null,e||function(){return 1},1)})}function Oh(t){var e=t.forEach;return t===Kh||Xh(Kh,t)&&e===Kh.forEach||Uh($h,Vh(t))?qh:e}function Ah(t){var e=t.filter;return t===ou||iu(ou,t)&&e===ou.filter?nu:e}var Ih={},C={get exports(){return Ih},set exports(t){Ih=t}},a=l,y=$n,v=(a({target:"Array",stat:!0},{isArray:y}),r),ms=v.Array.isArray,D=ms,gs=D,A=(N=C,N.exports=gs,t(Ih)),Ph={},w={get exports(){return Ph},set exports(t){Ph=t}},I=(N=w,N.exports=_,t(Ph)),Mh={},n={get exports(){return Mh},set exports(t){Mh=t}},xs="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,Nh=TypeError,T=z,Fh=Q,Rh=at,ns=xs,h=s,Lh=Ie,jh=function(t,e){if(t<e)throw Nh("Not enough arguments");return t},Bh=T.Function,zh=/MSIE .\./.test(h)||ns&&(c=T.Bun.version.split("."),c.length<3||0==c[0]&&(c[1]<3||3==c[1]&&0==c[2])),k=l,po=z,vs=Th,x=vs(po.setInterval,!0),ps=(k({global:!0,bind:!0,forced:po.setInterval!==x},{setInterval:x}),l),E=z,a=Th,y=a(E.setTimeout,!0),v=(ps({global:!0,bind:!0,forced:E.setTimeout!==y},{setTimeout:y}),r),ms=v.setTimeout,Hh=(N=n,N.exports=ms,t(Mh)),Gh={},D={get exports(){return Gh},set exports(t){Gh=t}},Wh=e,Yh=tr.forEach,C=Eh,w=C("forEach"),_=w?[].forEach:function(t){return Yh(this,t,1<arguments.length?arguments[1]:void 0)},xs=l,h=_,ns=(xs({target:"Array",proto:!0,forced:[].forEach!=h},{forEach:h}),lh),T=ns("Array").forEach,c=T,vs=c,Vh=Ui,Uh=u,Xh=Et,qh=vs,Kh=Array.prototype,$h={DOMTokenList:!0,NodeList:!0},P=(N=D,N.exports=Oh,t(Gh)),Zh="undefined"!=typeof window&&window.moment||j,Qh={},k={get exports(){return Qh},set exports(t){Qh=t}},po=r,x=po.Object.getOwnPropertySymbols,a=x,ps=a,Jh=(N=k,N.exports=ps,t(Qh)),tu={},E={get exports(){return tu},set exports(t){tu=t}},y=l,eu=tr.filter,v=yo,n=v("filter"),ms=(y({target:"Array",proto:!0,forced:!n},{filter:function(t){return eu(this,t,1<arguments.length?arguments[1]:void 0)}}),lh),C=ms("Array").filter,iu=Et,nu=C,ou=Array.prototype,w=Ah,M=(N=E,N.exports=w,t(tu)),ru={},_={get exports(){return ru},set exports(t){ru=t}},su={},xs={get exports(){return su},set exports(t){su=t}},h=l,ns=e,au=X,lu=ht.f,T=ut,c=!T||ns(function(){lu(1)}),vs=(h({target:"Object",stat:!0,forced:c,sham:!T},{getOwnPropertyDescriptor:function(t,e){return lu(au(t),e)}}),r),hu=vs.Object,D=xs.exports=function(t,e){return hu.getOwnPropertyDescriptor(t,e)},po=(hu.getOwnPropertyDescriptor.sham&&(D.sham=!0),su),x=po,uu=(N=_,N.exports=x,t(ru)),cu={},a={get exports(){return cu},set exports(t){cu=t}},k=K,ps=o,du=f,pu=Z,fu=Ht,mu=ps([].concat),v=k("Reflect","ownKeys")||function(t){var e=du.f(fu(t)),i=pu.f;return i?mu(e,i(t)):e},y=l,n=ut,gu=v,vu=X,yu=ht,bu=go,ms=(y({target:"Object",stat:!0,sham:!n},{getOwnPropertyDescriptors:function(t){for(var e,i,n=vu(t),o=yu.f,r=gu(n),s={},a=0;r.length>a;){i=o(n,e=r[a++]);void 0!==i&&bu(s,e,i)}return s}}),r),C=ms.Object.getOwnPropertyDescriptors,E=C,w=E,wu=(N=a,N.exports=w,t(cu)),ku={},ns={get exports(){return ku},set exports(t){ku=t}},xu={},h={get exports(){return xu},set exports(t){xu=t}},c=l,T=ut,vs=tn.f,xs=(c({target:"Object",stat:!0,forced:Object.defineProperties!==vs,sham:!T},{defineProperties:vs}),r),_u=xs.Object,D=h.exports=function(t,e){return _u.defineProperties(t,e)},po=(_u.defineProperties.sham&&(D.sham=!0),xu),_=po,Cu=(N=ns,N.exports=_,t(ku));function Su(t,e,i){e=Zl(e);e in t?Oo(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}function Du(t){var e=t.map;return t===Lu||Fu(Lu,t)&&e===Lu.map?Ru:e}function Tu(h){return function(t,e,i,n){zu(e);var o=Hu(t),r=Gu(o),s=Wu(o),a=h?s-1:0,l=h?-1:1;if(i<2)for(;;){if(a in r){n=r[a];a+=l;break}a+=l;if(h?a<0:s<=a)throw Yu("Reduce of empty array with no initial value")}for(;h?0<=a:a<s;a+=l)a in r&&(n=e(n,r[a],a,o));return n}}function Eu(t){var e=t.reduce;return t===qu||Uu(qu,t)&&e===qu.reduce?Xu:e}function Ou(t,e,i){var n,o;oc(t);try{n=rc(t,"return");if(!n){if("throw"===e)throw i;return i}n=nc(n,t)}catch(t){o=!0;n=t}if("throw"===e)throw i;if(o)throw n;oc(n);return i}function Au(t){return void 0!==t&&(lc.Array===t||uc[hc]===t)}function Iu(t){if(!pc(t))return dc(t,mc)||dc(t,"@@iterator")||fc[cc(t)]}function Pu(t,e){var i=arguments.length<2?wc(t):e;if(vc(i))return yc(gc(i,t));throw kc(bc(t)+" is not iterable")}var Mu={},x={get exports(){return Mu},set exports(t){Mu=t}},ps=l,Nu=tr.map,k=yo,ht=k("map"),y=(ps({target:"Array",proto:!0,forced:!ht},{map:function(t){return Nu(this,t,1<arguments.length?arguments[1]:void 0)}}),lh),n=y("Array").map,Fu=Et,Ru=n,Lu=Array.prototype,ms=Du,ju=(N=x,N.exports=ms,t(Mu)),Bu={},C={get exports(){return Bu},set exports(t){Bu=t}},zu=Pt,Hu=Nt,Gu=mt,Wu=qt,Yu=TypeError,E={left:Tu(!1),right:Tu(!0)},a=G,w="undefined"!=typeof process&&"process"==a(process),tn=l,Vu=E.left,c=Eh,T=At,vs=w,xs=!vs&&79<T&&T<83,h=xs||!c("reduce"),D=(tn({target:"Array",proto:!0,forced:h},{reduce:function(t){var e=arguments.length;return Vu(this,t,e,1<e?arguments[1]:void 0)}}),lh),po=D("Array").reduce,Uu=Et,Xu=po,qu=Array.prototype,ns=Eu,Ku=(N=C,N.exports=ns,t(Bu)),$u={},_={get exports(){return $u},set exports(t){$u=t}},k=l,Zu=Nt,Qu=In,ps=e,ht=ps(function(){Qu(1)}),y=(k({target:"Object",stat:!0,forced:ht},{keys:function(t){return Qu(Zu(t))}}),r),n=y.Object.keys,x=n,ms=x,Ju=(N=_,N.exports=ms,t($u)),tc={},a={get exports(){return tc},set exports(t){tc=t}},ec=(N=a,N.exports=no,t(tc)),ic={},E={get exports(){return ic},set exports(t){ic=t}},nc=ct,oc=Ht,rc=Mt,sc=Ht,ac=Ou,w=Rt,lc=is,hc=w("iterator"),uc=Array.prototype,cc=Ui,dc=Mt,pc=V,fc=is,vs=Rt,mc=vs("iterator"),gc=ct,vc=Pt,yc=Ht,bc=It,wc=Iu,kc=TypeError,xc=zt,_c=ct,Cc=Nt,Sc=function(e,t,i,n){try{return n?t(sc(i)[0],i[1]):t(i)}catch(t){ac(e,"throw",t)}},Dc=Au,Tc=d,Ec=qt,Oc=go,Ac=Pu,Ic=Iu,Pc=Array,T=Rt,Mc=T("iterator"),Nc=!1;try{var Fc=0,Rc={next:function(){return{done:!!Fc++}},return:function(){Nc=!0}};Rc[Mc]=function(){return this};Array.from(Rc,function(){throw 2})}catch(t){}function Lc(t){var e,i,n,o,r,s,a=Cc(t),l=Tc(this),h=arguments.length,u=1<h?arguments[1]:void 0,c=void 0!==u,h=(c&&(u=xc(u,2<h?arguments[2]:void 0)),Ic(a)),d=0;if(!h||this===Pc&&Dc(h)){e=Ec(a);i=l?new this(e):Pc(e);for(;d<e;d++){s=c?u(a[d],d):a[d];Oc(i,d,s)}}else{o=Ac(a,h);r=o.next;i=l?new this:[];for(;!(n=_c(r,o)).done;d++){s=c?Sc(o,u,[n.value,d],!0):n.value;Oc(i,d,s)}}i.length=d;return i}var xs=l,c=function(t,e){if(!e&&!Nc)return!1;var i=!1;try{var n={};n[Mc]=function(){return{next:function(){return{done:i=!0}}}};t(n)}catch(t){}return i},tn=!c(function(t){Array.from(t)}),h=(xs({target:"Array",stat:!0,forced:tn},{from:Lc}),r),D=h.Array.from,po=D,C=po,jc=(N=E,N.exports=C,t(ic)),Bc={},ns={get exports(){return Bc},set exports(t){Bc=t}},zc={},ps={get exports(){return zc},set exports(t){zc=t}},k=Iu,ht=k,y=ht,n=y,x=n,_=x,ms=_,a=ms;N=ps,N.exports=a;N=ns,N.exports=zc;var Hc=t(Bc),Gc={},no={get exports(){return Gc},set exports(t){Gc=t}},Wc={},w={get exports(){return Wc},set exports(t){Wc=t}},Ui=gs,is=Ui,vs=is,T=vs;N=w,N.exports=T;N=no,N.exports=Wc;var Yc=t(Gc);function Vc(t){var e=t.slice;return t===ad||rd(ad,t)&&e===ad.slice?sd:e}var Uc={},Rc={get exports(){return Uc},set exports(t){Uc=t}},Xc={},c={get exports(){return Xc},set exports(t){Xc=t}},xs=l,qc=$n,Kc=d,$c=et,Zc=Xt,Qc=qt,Jc=X,td=go,tn=Rt,h=yo,ed=Ie,D=h("slice"),id=tn("species"),nd=Array,od=Math.max,po=(xs({target:"Array",proto:!0,forced:!D},{slice:function(t,e){var i,n,o,r=Jc(this),s=Qc(r),a=Zc(t,s),l=Zc(void 0===e?s:e,s);if(qc(r)){i=r.constructor;if(Kc(i)&&(i===nd||qc(i.prototype)))i=void 0;else if($c(i)){i=i[id];null===i&&(i=void 0)}if(i===nd||void 0===i)return ed(r,a,l)}n=new(void 0===i?nd:i)(od(l-a,0));for(o=0;a<l;a++,o++)a in r&&td(n,o,r[a]);n.length=o;return n}}),lh),E=po("Array").slice,rd=Et,sd=E,ad=Array.prototype,k=Vc,ht=k,y=ht,n=y,x=n;N=c,N.exports=x;N=Rc,N.exports=Xc;var ld=t(Uc),hd={},_={get exports(){return hd},set exports(t){hd=t}},ud={},ms={get exports(){return ud},set exports(t){ud=t}},ps=C,a=ps,ns=a,gs=ns;N=ms,N.exports=gs;N=_,N.exports=ud;var cd=t(hd);function dd(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function pd(t,e){if(t){if("string"==typeof t)return dd(t,e);var i=ld(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?cd(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?dd(t,e):void 0}}function fd(t,e){return(t=>{if(Yc(t))return t})(t)||((t,e)=>{var i=null==t?null:void 0!==Pl&&Hc(t)||t["@@iterator"];if(null!=i){var n,o,r,s,a=[],l=!0,h=!1;try{if(r=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=r.call(i)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){h=!0,o=t}finally{try{if(!l&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(h)throw o}}return a}})(t,e)||pd(t,e)||(()=>{throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function md(t){return(t=>{if(Yc(t))return dd(t)})(t)||(t=>{if(void 0!==Pl&&null!=Hc(t)||null!=t["@@iterator"])return cd(t)})(t)||pd(t)||(()=>{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 gd(t){var e=t.concat;return t===Md||Id(Md,t)&&e===Md.concat?Pd:e}function vd(t){var e=t.reverse;return t===qd||Ud(qd,t)&&e===qd.reverse?Xd:e}function yd(t,e){if(!delete t[e])throw ep("Cannot delete property "+tp(e)+" of "+tp(t))}function bd(t){var e=t.splice;return t===mp||pp(mp,t)&&e===mp.splice?fp:e}function wd(t){var e=t.includes;return t===Yp||Hp(Yp,t)&&e===Yp.includes?Gp:"string"==typeof t||t===Vp||Hp(Vp,t)&&e===Vp.includes?Wp:e}function kd(a){return function(t){for(var e,i=Qp(t),n=Zp(i),o=n.length,r=0,s=[];r<o;){e=n[r++];$p&&!Jp(i,e)||tf(s,a?[e,i[e]]:i[e])}return s}}function xd(i){return function(t){var e=sf(rf(t));1&i&&(e=af(e,lf,""));2&i&&(e=af(e,hf,"$1"));return e}}function _d(t){var e=t.indexOf;return t===_f||kf(_f,t)&&e===_f.indexOf?xf:e}function Cd(t){var e=t.trim;return"string"==typeof t||t===Pf||Af(Pf,t)&&e===Pf.trim?If:e}function Sd(t,e,i){return jf(Lf.JSON.stringify,null,arguments)}function Dd(t){for(var e=Hf(this),i=Wf(e),n=arguments.length,o=Gf(1<n?arguments[1]:void 0,i),n=2<n?arguments[2]:void 0,r=void 0===n?i:Gf(n,i);o<r;)e[o++]=t;return e}function Td(t){var e=t.fill;return t===Uf||Yf(Uf,t)&&e===Uf.fill?Vf:e}var Ed={},Ui={get exports(){return Ed},set exports(t){Ed=t}},Od=(N=Ui,N.exports=S,t(Ed)),Ad={},is={get exports(){return Ad},set exports(t){Ad=t}},vs=lh,w=vs("Array").concat,Id=Et,Pd=w,Md=Array.prototype,T=gd,Nd=(N=is,N.exports=T,t(Ad)),Fd={},no={get exports(){return Fd},set exports(t){Fd=t}},Rd=(N=no,N.exports=k,t(Fd)),Ld={},d={get exports(){return Ld},set exports(t){Ld=t}},Ie=l,h=v,tn=(Ie({target:"Reflect",stat:!0},{ownKeys:h}),r),xs=tn.Reflect.ownKeys,D=xs,po=D,jd=(N=d,N.exports=po,t(Ld)),Bd={},E={get exports(){return Bd},set exports(t){Bd=t}},ht=l,y=o,zd=Date,Hd=y(zd.prototype.getTime),n=(ht({target:"Date",stat:!0},{now:function(){return Hd(new zd)}}),r),c=n.Date.now,x=c,Rc=x,Gd=(N=E,N.exports=Rc,t(Bd)),Wd={},C={get exports(){return Wd},set exports(t){Wd=t}},ps=l,a=o,Yd=$n,Vd=a([].reverse),ns=[1,2],ms=(ps({target:"Array",proto:!0,forced:String(ns)===String(ns.reverse())},{reverse:function(){Yd(this)&&(this.length=this.length);return Vd(this)}}),lh),gs=ms("Array").reverse,Ud=Et,Xd=gs,qd=Array.prototype,_=vd,Kd=(N=C,N.exports=_,t(Wd)),$d={},Ui={get exports(){return $d},set exports(t){$d=t}},S=ut,Zd=$n,Qd=TypeError,Jd=Object.getOwnPropertyDescriptor,vs=S&&!function(){if(void 0!==this)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),w=vs?function(t,e){if(Zd(t)&&!Jd(t,"length").writable)throw Qd("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},tp=It,ep=TypeError,is=l,ip=Nt,np=Xt,op=Ut,rp=qt,sp=w,ap=mo,lp=vo,hp=go,up=yd,T=yo,no=T("splice"),cp=Math.max,dp=Math.min,k=(is({target:"Array",proto:!0,forced:!no},{splice:function(t,e){var i,n,o,r,s,a,l=ip(this),h=rp(l),u=np(t,h),c=arguments.length;if(0===c)i=n=0;else if(1===c){i=0;n=h-u}else{i=c-2;n=dp(cp(op(e),0),h-u)}ap(h+i-n);o=lp(l,n);for(r=0;r<n;r++){s=u+r;s in l&&hp(o,r,l[s])}o.length=n;if(i<n){for(r=u;r<h-n;r++){s=r+n;a=r+i;s in l?l[a]=l[s]:up(l,a)}for(r=h;h-n+i<r;r--)up(l,r-1)}else if(n<i)for(r=h-n;u<r;r--){s=r+n-1;a=r+i-1;s in l?l[a]=l[s]:up(l,a)}for(r=0;r<i;r++)l[r+u]=arguments[r+2];sp(l,h-n+i);return o}}),lh),v=k("Array").splice,pp=Et,fp=v,mp=Array.prototype,Ie=bd,gp=(N=Ui,N.exports=Ie,t($d)),vp={},h={get exports(){return vp},set exports(t){vp=t}},yp=ut,tn=o,bp=ct,xs=e,wp=In,kp=Z,xp=pt,_p=Nt,Cp=mt,Sp=Object.assign,Dp=Object.defineProperty,Tp=tn([].concat),D=!Sp||xs(function(){if(yp&&1!==Sp({b:1},Sp(Dp({},"a",{enumerable:!0,get:function(){Dp(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol(),n="abcdefghijklmnopqrst";t[i]=7;n.split("").forEach(function(t){e[t]=t});return 7!=Sp({},t)[i]||wp(Sp({},e)).join("")!=n})?function(t,e){for(var i=_p(t),n=arguments.length,o=1,r=kp.f,s=xp.f;o<n;)for(var a,l=Cp(arguments[o++]),h=r?Tp(wp(l),r(l)):wp(l),u=h.length,c=0;c<u;){a=h[c++];yp&&!bp(s,l,a)||(i[a]=l[a])}return i}:Sp,d=l,po=D,y=(d({target:"Object",stat:!0,arity:2,forced:Object.assign!==po},{assign:po}),r),ht=y.Object.assign,n=ht,c=n,Ep=(N=h,N.exports=c,t(vp)),Op={},x={get exports(){return Op},set exports(t){Op=t}},E=l,Ap=$i.includes,a=e,ps=a(function(){return!Array(1).includes()}),ns=(E({target:"Array",proto:!0,forced:ps},{includes:function(t){return Ap(this,t,1<arguments.length?arguments[1]:void 0)}}),lh),ms=ns("Array").includes,Ip=et,Pp=G,gs=Rt,Mp=gs("match"),Np=function(t){var e;return Ip(t)&&(void 0!==(e=t[Mp])?!!e:"RegExp"==Pp(t))},Fp=TypeError,C=Rt,Rp=C("match"),_=l,$n=o,Lp=function(t){if(Np(t))throw Fp("The method doesn't accept regular expressions");return t},jp=U,Bp=bo,S=function(e){var i=/./;try{"/./"[e](i)}catch(t){try{i[Rp]=!1;return"/./"[e](i)}catch(t){}}return!1},zp=$n("".indexOf),vs=(_({target:"String",proto:!0,forced:!S("includes")},{includes:function(t){return!!~zp(Bp(jp(this)),Bp(Lp(t)),1<arguments.length?arguments[1]:void 0)}}),lh),w=vs("String").includes,Hp=Et,Gp=ms,Wp=w,Yp=Array.prototype,Vp=String.prototype,T=wd,Up=(N=x,N.exports=T,t(Op)),Xp={},is={get exports(){return Xp},set exports(t){Xp=t}},qp=(N=is,N.exports=fs,t(Xp)),Kp={},no={get exports(){return Kp},set exports(t){Kp=t}},$p=ut,k=o,Zp=In,Qp=X,v=pt.f,Jp=k(v),tf=k([].push),Ui={entries:kd(!0),values:kd(!1)},Ie=l,ef=Ui.values,Z=(Ie({target:"Object",stat:!0},{values:function(t){return ef(t)}}),r),mt=Z.Object.values,tn=mt,xs=tn,nf=(N=no,N.exports=xs,t(Kp)),of={},D={get exports(){return of},set exports(t){of=t}},d="\t\n\v\f\r    \u2028\u2029\ufeff",po=o,rf=U,sf=bo,y=d,af=po("".replace),lf=RegExp("^["+y+"]+"),hf=RegExp("(^|[^"+y+"])["+y+"]+$"),ht={start:xd(1),end:xd(2),trim:xd(3)},n=z,h=e,c=o,uf=bo,cf=ht.trim,a=d,df=n.parseInt,E=n.Symbol,pf=E&&E.iterator,ff=/^[+-]?0x/i,mf=c(ff.exec),ps=8!==df(a+"08")||22!==df(a+"0x16")||pf&&!h(function(){df(Object(pf))}),ns=ps?function(t,e){var i=cf(uf(t));return df(i,e>>>0||(mf(ff,i)?16:10))}:df,gs=l,C=ns,$n=(gs({global:!0,forced:parseInt!=C},{parseInt:C}),r),_=$n.parseInt,S=_,vs=S,gf=(N=D,N.exports=vs,t(of)),vf={},ms={get exports(){return vf},set exports(t){vf=t}},w=l,x=W,yf=$i.indexOf,T=Eh,bf=x([].indexOf),wf=!!bf&&1/bf([1],1,-0)<0,is=wf||!T("indexOf"),fs=(w({target:"Array",proto:!0,forced:is},{indexOf:function(t){var e=1<arguments.length?arguments[1]:void 0;return wf?bf(this,t,e)||0:yf(this,t,e)}}),lh),In=fs("Array").indexOf,kf=Et,xf=In,_f=Array.prototype,pt=_d,Cf=(N=ms,N.exports=pt,t(vf)),Sf={},v={get exports(){return Sf},set exports(t){Sf=t}},Df=b.PROPER,Tf=e,Ef=d,k=l,Of=ht.trim,Ui=function(t){return Tf(function(){return!!Ef[t]()||"…"!=="…"[t]()||Df&&Ef[t].name!==t})},Ie=(k({target:"String",proto:!0,forced:Ui("trim")},{trim:function(){return Of(this)}}),lh),Z=Ie("String").trim,Af=Et,If=Z,Pf=String.prototype,mt=Cd,Mf=(N=v,N.exports=mt,t(Sf)),Nf={},tn={get exports(){return Nf},set exports(t){Nf=t}},Ff=(N=tn,N.exports=we,t(Nf)),Rf={},no={get exports(){return Rf},set exports(t){Rf=t}},Lf=r,jf=Q,xs=(Lf.JSON||(Lf.JSON={stringify:JSON.stringify}),Sd),Bf=(N=no,N.exports=xs,t(Rf)),zf={},po={get exports(){return zf},set exports(t){zf=t}},Hf=Nt,Gf=Xt,Wf=qt,y=l,n=(y({target:"Array",proto:!0},{fill:Dd}),lh),E=n("Array").fill,Yf=Et,Vf=E,Uf=Array.prototype,c=Td,Xf=(N=po,N.exports=c,t(zf)),qf={},a={get exports(){return qf},set exports(t){qf=t}},N=a;N.exports=Kf;function Kf(t){if(t){var e,i=t;for(e in Kf.prototype)i[e]=Kf.prototype[e];return i}}Kf.prototype.on=Kf.prototype.addEventListener=function(t,e){this._callbacks=this._callbacks||{};(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e);return this};Kf.prototype.once=function(t,e){function i(){this.off(t,i);e.apply(this,arguments)}i.fn=e;this.on(t,i);return this};Kf.prototype.off=Kf.prototype.removeListener=Kf.prototype.removeAllListeners=Kf.prototype.removeEventListener=function(t,e){this._callbacks=this._callbacks||{};if(0==arguments.length)this._callbacks={};else{var i=this._callbacks["$"+t];if(i)if(1==arguments.length)delete this._callbacks["$"+t];else{for(var n,o=0;o<i.length;o++){n=i[o];if(n===e||n.fn===e){i.splice(o,1);break}}0===i.length&&delete this._callbacks["$"+t]}}return this};Kf.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),i=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(i)for(var i=i.slice(0),n=0,o=i.length;n<o;++n)i[n].apply(this,e);return this};Kf.prototype.listeners=function(t){this._callbacks=this._callbacks||{};return this._callbacks["$"+t]||[]};Kf.prototype.hasListeners=function(t){return!!this.listeners(t).length};h=qf;
/*! Hammer.JS - v2.0.17-rc - 2019-12-16
* http://naver.github.io/egjs
*
* Forked By Naver egjs
* Copyright (c) hammerjs
* Licensed under the MIT license */function $f(){$f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i,n=arguments[e];for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};return $f.apply(this,arguments)}function Zf(t,e){t.prototype=Object.create(e.prototype);t.prototype.constructor=t;t.__proto__=e}function Qf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var ps="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}:Object.assign,Jf=ps,tm=["","webkit","Moz","MS","ms","o"],ns="undefined"==typeof document?{style:{}}:document.createElement("div"),em=Math.round,im=Math.abs,nm=Date.now;function om(t,e){for(var i,n=e[0].toUpperCase()+e.slice(1),o=0;o<tm.length;){i=tm[o];i=i?i+n:e;if(i in t)return i;o++}}var rm="undefined"==typeof window?{}:window,sm=om(ns.style,"touchAction"),am=void 0!==sm;var lm="compute",hm="manipulation",um="none",cm="pan-x",dm="pan-y",pm=(()=>{if(!am)return!1;var e={},i=rm.CSS&&rm.CSS.supports;["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return e[t]=!i||rm.CSS.supports("touch-action",t)});return e})(),fm="ontouchstart"in rm,mm=void 0!==om(rm,"PointerEvent"),gm=fm&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),vm="touch",ym="mouse",bm=25,wm=1,km=4,xm=8,_m=1,Cm=2,Sm=4,Dm=8,Tm=16,Em=Cm|Sm,Om=Dm|Tm,Am=Em|Om,Im=["x","y"],Pm=["clientX","clientY"];function Mm(t,e,i){if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length){n=0;for(;n<t.length;){e.call(i,t[n],n,t);n++}}else for(var n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function Nm(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function Fm(t,e){return-1<t.indexOf(e)}var Rm=(()=>{function t(t,e){this.manager=t;this.set(e)}var e=t.prototype;e.set=function(t){t===lm&&(t=this.compute());am&&this.manager.element.style&&pm[t]&&(this.manager.element.style[sm]=t);this.actions=t.toLowerCase().trim()};e.update=function(){this.set(this.manager.options.touchAction)};e.compute=function(){var t,e,i,n=[];Mm(this.manager.recognizers,function(t){Nm(t.options.enable,[t])&&(n=n.concat(t.getTouchAction()))});return t=n.join(" "),Fm(t,um)||(e=Fm(t,cm),i=Fm(t,dm),e&&i)?um:e||i?e?cm:dm:Fm(t,hm)?hm:"auto"};e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(!this.manager.session.prevented){var n=this.actions,o=Fm(n,um)&&!pm[um],r=Fm(n,dm)&&!pm[dm],n=Fm(n,cm)&&!pm[cm];if(o){var s=1===t.pointers.length,a=t.distance<2,l=t.deltaTime<250;if(s&&a&&l)return}return n&&r?void 0:o||r&&i&Em||n&&i&Om?this.preventSrc(e):void 0}e.preventDefault()};e.preventSrc=function(t){this.manager.session.prevented=!0;t.preventDefault()};return t})();function Lm(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function jm(t){var e=t.length;if(1===e)return{x:em(t[0].clientX),y:em(t[0].clientY)};for(var i=0,n=0,o=0;o<e;){i+=t[o].clientX;n+=t[o].clientY;o++}return{x:em(i/e),y:em(n/e)}}function Bm(t){for(var e=[],i=0;i<t.pointers.length;){e[i]={clientX:em(t.pointers[i].clientX),clientY:em(t.pointers[i].clientY)};i++}return{timeStamp:nm(),pointers:e,center:jm(e),deltaX:t.deltaX,deltaY:t.deltaY}}function zm(t,e,i){i=i||Im;var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function Hm(t,e,i){i=i||Im;var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function Gm(t,e){return t===e?_m:im(t)>=im(e)?t<0?Cm:Sm:e<0?Dm:Tm}function Wm(t,e,i){return{x:e/t||0,y:i/t||0}}function Ym(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=Bm(e));1<o&&!i.firstMultiple?i.firstMultiple=Bm(e):1===o&&(i.firstMultiple=!1);var o=i.firstInput,r=i.firstMultiple,s=(r||o).center,a=e.center=jm(n);e.timeStamp=nm();e.deltaTime=e.timeStamp-o.timeStamp;e.angle=Hm(s,a);e.distance=zm(s,a);var l=i,h=e,o=h.center,s=l.offsetDelta||{},a=l.prevDelta||{},u=l.prevInput||{};if(h.eventType===wm||u.eventType===km){a=l.prevDelta={x:u.deltaX||0,y:u.deltaY||0};s=l.offsetDelta={x:o.x,y:o.y}}h.deltaX=a.x+(o.x-s.x);h.deltaY=a.y+(o.y-s.y);e.offsetDirection=Gm(e.deltaX,e.deltaY);u=Wm(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x;e.overallVelocityY=u.y;e.overallVelocity=im(u.x)>im(u.y)?u.x:u.y;e.scale=r?(l=r.pointers,h=n,zm(h[0],h[1],Pm)/zm(l[0],l[1],Pm)):1;e.rotation=r?(h=r.pointers,l=n,Hm(l[1],l[0],Pm)+Hm(h[1],h[0],Pm)):0;e.maxPointers=!i.prevInput||e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers;l=i,h=e,a=l.lastInterval||h,o=h.timeStamp-a.timeStamp;if(h.eventType!==xm&&(bm<o||void 0===a.velocity)){var c=h.deltaX-a.deltaX,s=h.deltaY-a.deltaY,o=Wm(o,c,s),d=o.x,p=o.y,f=im(o.x)>im(o.y)?o.x:o.y,c=Gm(c,s);l.lastInterval=h}else{f=a.velocity;d=a.velocityX;p=a.velocityY;c=a.direction}h.velocity=f;h.velocityX=d;h.velocityY=p;h.direction=c;u=t.element,r=e.srcEvent,n=r.composedPath?r.composedPath()[0]:r.path?r.path[0]:r.target;Lm(n,u)&&(u=n);e.target=u}function Vm(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,r=e&wm&&n-o==0,n=e&(km|xm)&&n-o==0;i.isFirst=!!r;i.isFinal=!!n;r&&(t.session={});i.eventType=e;Ym(t,i);t.emit("hammer.input",i);t.recognize(i);t.session.prevInput=i}function Um(t){return t.trim().split(/\s+/g)}function Xm(e,t,i){Mm(Um(t),function(t){e.addEventListener(t,i,!1)})}function qm(e,t,i){Mm(Um(t),function(t){e.removeEventListener(t,i,!1)})}function Km(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var $m=(()=>{function t(e,t){var i=this;this.manager=e;this.callback=t;this.element=e.element;this.target=e.options.inputTarget;this.domHandler=function(t){Nm(e.options.enable,[e])&&i.handler(t)};this.init()}var e=t.prototype;e.handler=function(){};e.init=function(){this.evEl&&Xm(this.element,this.evEl,this.domHandler);this.evTarget&&Xm(this.target,this.evTarget,this.domHandler);this.evWin&&Xm(Km(this.element),this.evWin,this.domHandler)};e.destroy=function(){this.evEl&&qm(this.element,this.evEl,this.domHandler);this.evTarget&&qm(this.target,this.evTarget,this.domHandler);this.evWin&&qm(Km(this.element),this.evWin,this.domHandler)};return t})();function Zm(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}var Qm={pointerdown:wm,pointermove:2,pointerup:km,pointercancel:xm,pointerout:xm},Jm={2:vm,3:"pen",4:ym,5:"kinect"},tg="pointerdown",eg="pointermove pointerup pointercancel";if(rm.MSPointerEvent&&!rm.PointerEvent){tg="MSPointerDown";eg="MSPointerMove MSPointerUp MSPointerCancel"}var ig=(e=>{Zf(i,e);function i(){var t=i.prototype;t.evEl=tg;t.evWin=eg;t=e.apply(this,arguments)||this;t.store=t.manager.session.pointerEvents=[];return t}var t=i.prototype;t.handler=function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),n=Qm[n],o=Jm[t.pointerType]||t.pointerType,r=o===vm,s=Zm(e,t.pointerId,"pointerId");if(n&wm&&(0===t.button||r)){if(s<0){e.push(t);s=e.length-1}}else n&(km|xm)&&(i=!0);if(!(s<0)){e[s]=t;this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t});i&&e.splice(s,1)}};return i})($m);function ng(t){return Array.prototype.slice.call(t,0)}function og(t,i,e){for(var n=[],o=[],r=0;r<t.length;){var s=i?t[r][i]:t[r];Zm(o,s)<0&&n.push(t[r]);o[r]=s;r++}e&&(n=i?n.sort(function(t,e){return t[i]>e[i]}):n.sort());return n}var rg={touchstart:wm,touchmove:2,touchend:km,touchcancel:xm},sg=(e=>{Zf(i,e);function i(){var t;i.prototype.evTarget="touchstart touchmove touchend touchcancel";t=e.apply(this,arguments)||this;t.targetIds={};return t}var t=i.prototype;t.handler=function(t){var e=rg[t.type],i=function(t,e){var i,n,o=ng(t.touches),r=this.targetIds;if(e&(2|wm)&&1===o.length)return r[o[0].identifier]=!0,[o,o];var s=ng(t.changedTouches),a=[],l=this.target;n=o.filter(function(t){return Lm(t.target,l)});if(e===wm){i=0;for(;i<n.length;){r[n[i].identifier]=!0;i++}}i=0;for(;i<s.length;){r[s[i].identifier]&&a.push(s[i]);e&(km|xm)&&delete r[s[i].identifier];i++}if(a.length)return[og(n.concat(a),"identifier",!0),a]}.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:vm,srcEvent:t})};return i})($m);var ag={mousedown:wm,mousemove:2,mouseup:km},lg=(e=>{Zf(i,e);function i(){var t=i.prototype;t.evEl="mousedown";t.evWin="mousemove mouseup";t=e.apply(this,arguments)||this;t.pressed=!1;return t}var t=i.prototype;t.handler=function(t){var e=ag[t.type];e&wm&&0===t.button&&(this.pressed=!0);2&e&&1!==t.which&&(e=km);if(this.pressed){e&km&&(this.pressed=!1);this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:ym,srcEvent:t})}};return i})($m),hg=2500,ug=25;function cg(t){var e=t.changedPointers,e=e[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(i);setTimeout(function(){var t=n.indexOf(i);-1<t&&n.splice(t,1)},hg)}}var dg=(()=>{var t=(i=>{Zf(t,i);function t(t,e){var r=i.call(this,t,e)||this;r.handler=function(t,e,i){var n=i.pointerType===vm,o=i.pointerType===ym;if(!(o&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)!function(t,e){if(t&wm){this.primaryTouch=e.changedPointers[0].identifier;cg.call(this,e)}else t&(km|xm)&&cg.call(this,e)}.call(Qf(Qf(r)),e,i);else if(o&&function(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],r=Math.abs(e-o.x),o=Math.abs(i-o.y);if(r<=ug&&o<=ug)return!0}return!1}.call(Qf(Qf(r)),i))return;r.callback(t,e,i)}};r.touch=new sg(r.manager,r.handler);r.mouse=new lg(r.manager,r.handler);r.primaryTouch=null;r.lastTouches=[];return r}var e=t.prototype;e.destroy=function(){this.touch.destroy();this.mouse.destroy()};return t})($m);return t})();function pg(t,e,i){if(Array.isArray(t))return Mm(t,i[e],i),1}var fg=1;function mg(t,e){var i=e.manager;return i?i.get(t):t}function gg(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var vg=(()=>{function t(t){void 0===t&&(t={});this.options=$f({enable:!0},t);this.id=fg++;this.manager=null;this.state=1;this.simultaneous={};this.requireFail=[]}var e=t.prototype;e.set=function(t){Jf(this.options,t);this.manager&&this.manager.touchAction.update();return this};e.recognizeWith=function(t){if(!pg(t,"recognizeWith",this)){var e=this.simultaneous;t=mg(t,this);if(!e[t.id]){e[t.id]=t;t.recognizeWith(this)}}return this};e.dropRecognizeWith=function(t){if(!pg(t,"dropRecognizeWith",this)){t=mg(t,this);delete this.simultaneous[t.id]}return this};e.requireFailure=function(t){if(!pg(t,"requireFailure",this)){var e=this.requireFail;t=mg(t,this);if(-1===Zm(e,t)){e.push(t);t.requireFailure(this)}}return this};e.dropRequireFailure=function(t){if(!pg(t,"dropRequireFailure",this)){t=mg(t,this);var e=Zm(this.requireFail,t);-1<e&&this.requireFail.splice(e,1)}return this};e.hasRequireFailures=function(){return 0<this.requireFail.length};e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]};e.emit=function(e){var i=this,t=this.state;function n(t){i.manager.emit(t,e)}t<8&&n(i.options.event+gg(t));n(i.options.event);e.additionalEvent&&n(e.additionalEvent);8<=t&&n(i.options.event+gg(t))};e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=32};e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0};e.recognize=function(t){var e=Jf({},t);if(Nm(this.options.enable,[this,e])){56&this.state&&(this.state=1);this.state=this.process(e);30&this.state&&this.tryEmit(e)}else{this.reset();this.state=32}};e.process=function(t){};e.getTouchAction=function(){};e.reset=function(){};return t})(),yg=(i=>{Zf(t,i);function t(t){var e;void 0===t&&(t={});e=i.call(this,$f({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this;e.pTime=!1;e.pCenter=!1;e._timer=null;e._input=null;e.count=0;return e}var e=t.prototype;e.getTouchAction=function(){return[hm]};e.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime<i.time;this.reset();if(t.eventType&wm&&0===this.count)return this.failTimeout();if(o&&r&&n){if(t.eventType!==km)return this.failTimeout();o=!this.pTime||t.timeStamp-this.pTime<i.interval,r=!this.pCenter||zm(this.pCenter,t.center)<i.posThreshold;this.pTime=t.timeStamp;this.pCenter=t.center;r&&o?this.count+=1:this.count=1;this._input=t;n=this.count%i.taps;if(0==n)return this.hasRequireFailures()?(this._timer=setTimeout(function(){e.state=8;e.tryEmit()},i.interval),2):8}return 32};e.failTimeout=function(){var t=this;this._timer=setTimeout(function(){t.state=32},this.options.interval);return 32};e.reset=function(){clearTimeout(this._timer)};e.emit=function(){if(8===this.state){this._input.tapCount=this.count;this.manager.emit(this.options.event,this._input)}};return t})(vg),bg=(e=>{Zf(t,e);function t(t){void 0===t&&(t={});return e.call(this,$f({pointers:1},t))||this}var i=t.prototype;i.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e};i.process=function(t){var e=this.state,i=t.eventType,n=6&e,o=this.attrTest(t);return n&&(i&xm||!o)?16|e:n||o?i&km?8|e:2&e?4|e:2:32};return t})(vg);function wg(t){return t===Tm?"down":t===Dm?"up":t===Cm?"left":t===Sm?"right":""}var kg=(i=>{Zf(t,i);function t(t){var e;void 0===t&&(t={});e=i.call(this,$f({event:"pan",threshold:10,pointers:1,direction:Am},t))||this;e.pX=null;e.pY=null;return e}var e=t.prototype;e.getTouchAction=function(){var t=this.options.direction,e=[];t&Em&&e.push(dm);t&Om&&e.push(cm);return e};e.directionTest=function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,r=t.deltaX,s=t.deltaY;if(!(o&e.direction))if(e.direction&Em){o=0===r?_m:r<0?Cm:Sm;i=r!==this.pX;n=Math.abs(t.deltaX)}else{o=0===s?_m:s<0?Dm:Tm;i=s!==this.pY;n=Math.abs(t.deltaY)}t.direction=o;return i&&n>e.threshold&&o&e.direction};e.attrTest=function(t){return bg.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))};e.emit=function(t){this.pX=t.deltaX;this.pY=t.deltaY;var e=wg(t.direction);e&&(t.additionalEvent=this.options.event+e);i.prototype.emit.call(this,t)};return t})(bg),xg=(n=>{Zf(t,n);function t(t){void 0===t&&(t={});return n.call(this,$f({event:"swipe",threshold:10,velocity:.3,direction:Em|Om,pointers:1},t))||this}var e=t.prototype;e.getTouchAction=function(){return kg.prototype.getTouchAction.call(this)};e.attrTest=function(t){var e,i=this.options.direction;i&(Em|Om)?e=t.overallVelocity:i&Em?e=t.overallVelocityX:i&Om&&(e=t.overallVelocityY);return n.prototype.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&im(e)>this.options.velocity&&t.eventType&km};e.emit=function(t){var e=wg(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t);this.manager.emit(this.options.event,t)};return t})(bg),_g=(i=>{Zf(t,i);function t(t){void 0===t&&(t={});return i.call(this,$f({event:"pinch",threshold:0,pointers:2},t))||this}var e=t.prototype;e.getTouchAction=function(){return[um]};e.attrTest=function(t){return i.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)};e.emit=function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}i.prototype.emit.call(this,t)};return t})(bg),Cg=(e=>{Zf(t,e);function t(t){void 0===t&&(t={});return e.call(this,$f({event:"rotate",threshold:0,pointers:2},t))||this}var i=t.prototype;i.getTouchAction=function(){return[um]};i.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)};return t})(bg),Sg=(i=>{Zf(t,i);function t(t){var e;void 0===t&&(t={});e=i.call(this,$f({event:"press",pointers:1,time:251,threshold:9},t))||this;e._timer=null;e._input=null;return e}var e=t.prototype;e.getTouchAction=function(){return["auto"]};e.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=i.time<t.deltaTime;this._input=t;if(!o||!n||t.eventType&(km|xm)&&!r)this.reset();else if(t.eventType&wm){this.reset();this._timer=setTimeout(function(){e.state=8;e.tryEmit()},i.time)}else if(t.eventType&km)return 8;return 32};e.reset=function(){clearTimeout(this._timer)};e.emit=function(t){if(8===this.state)if(t&&t.eventType&km)this.manager.emit(this.options.event+"up",t);else{this._input.timeStamp=nm();this.manager.emit(this.options.event,this._input)}};return t})(vg),Dg={domEvents:!1,touchAction:lm,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Tg=[[Cg,{enable:!1}],[_g,{enable:!1},["rotate"]],[xg,{direction:Em}],[kg,{direction:Em},["swipe"]],[yg],[yg,{event:"doubletap",taps:2},["tap"]],[Sg]];function Eg(i,n){var o,r=i.element;if(r.style){Mm(i.options.cssProps,function(t,e){o=om(r.style,e);if(n){i.oldCssProps[o]=r.style[o];r.style[o]=t}else r.style[o]=i.oldCssProps[o]||""});n||(i.oldCssProps={})}}var Og=(()=>{function t(t,e){var i,n=this;this.options=Jf({},Dg,e||{});this.options.inputTarget=this.options.inputTarget||t;this.handlers={};this.session={};this.recognizers=[];this.oldCssProps={};this.element=t;this.input=(e=this,i=e.options.inputClass,i=i||(mm?ig:gm?sg:fm?dg:lg),new i(e,Vm));this.touchAction=new Rm(this,this.options.touchAction);Eg(this,!0);Mm(this.options.recognizers,function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]);t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;e.set=function(t){Jf(this.options,t);t.touchAction&&this.touchAction.update();if(t.inputTarget){this.input.destroy();this.input.target=t.inputTarget;this.input.init()}return this};e.stop=function(t){this.session.stopped=t?2:1};e.recognize=function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var i,n=this.recognizers,o=e.curRecognizer;if(!o||8&o.state){e.curRecognizer=null;o=null}for(var r=0;r<n.length;){i=n[r];2===e.stopped||o&&i!==o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t);if(!o&&14&i.state){e.curRecognizer=i;o=i}r++}}};e.get=function(t){if(t instanceof vg)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event===t)return e[i];return null};e.add=function(t){if(pg(t,"add",this))return this;var e=this.get(t.options.event);e&&this.remove(e);this.recognizers.push(t);t.manager=this;this.touchAction.update();return t};e.remove=function(t){if(!pg(t,"remove",this)){var e=this.get(t);if(t){var i=this.recognizers,e=Zm(i,e);if(-1!==e){i.splice(e,1);this.touchAction.update()}}}return this};e.on=function(t,e){if(void 0!==t&&void 0!==e){var i=this.handlers;Mm(Um(t),function(t){i[t]=i[t]||[];i[t].push(e)})}return this};e.off=function(t,e){if(void 0!==t){var i=this.handlers;Mm(Um(t),function(t){e?i[t]&&i[t].splice(Zm(i[t],e),1):delete i[t]})}return this};e.emit=function(t,e){if(this.options.domEvents){var i=t,n=e,o=document.createEvent("Event");o.initEvent(i,!0,!0);o.gesture=n;n.target.dispatchEvent(o)}var r=this.handlers[t]&&this.handlers[t].slice();if(r&&r.length){e.type=t;e.preventDefault=function(){e.srcEvent.preventDefault()};for(var s=0;s<r.length;){r[s](e);s++}}};e.destroy=function(){this.element&&Eg(this,!1);this.handlers={};this.session={};this.input.destroy();this.element=null};return t})(),Ag={touchstart:wm,touchmove:2,touchend:km,touchcancel:xm},Ig=(e=>{Zf(i,e);function i(){var t=i.prototype;t.evTarget="touchstart";t.evWin="touchstart touchmove touchend touchcancel";t=e.apply(this,arguments)||this;t.started=!1;return t}var t=i.prototype;t.handler=function(t){var e=Ag[t.type];e===wm&&(this.started=!0);if(this.started){var i=function(t,e){var i=ng(t.touches),n=ng(t.changedTouches);e&(km|xm)&&(i=og(i.concat(n),"identifier",!0));return[i,n]}.call(this,t,e);e&(km|xm)&&i[0].length-i[1].length==0&&(this.started=!1);this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:vm,srcEvent:t})}};return i})($m);function Pg(i,t,e){var n="DEPRECATED METHOD: "+t+"\n"+e+" AT \n";return function(){var t=new Error("get-stack-trace"),t=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",e=window.console&&(window.console.warn||window.console.log);e&&e.call(window.console,n,t);return i.apply(this,arguments)}}var Mg=Pg(function(t,e,i){for(var n=Object.keys(e),o=0;o<n.length;){i&&void 0!==t[n[o]]||(t[n[o]]=e[n[o]]);o++}return t},"extend","Use `assign`."),Ng=Pg(function(t,e){return Mg(t,e,!0)},"merge","Use `assign`.");function Fg(t,e,i){var n=e.prototype,o=t.prototype=Object.create(n);o.constructor=t;o._super=n;i&&Jf(o,i)}function Rg(t,e){return function(){return t.apply(e,arguments)}}gs=(()=>{function t(t,e){void 0===e&&(e={});return new Og(t,$f({recognizers:Tg.concat()},e))}t.VERSION="2.0.17-rc";t.DIRECTION_ALL=Am;t.DIRECTION_DOWN=Tm;t.DIRECTION_LEFT=Cm;t.DIRECTION_RIGHT=Sm;t.DIRECTION_UP=Dm;t.DIRECTION_HORIZONTAL=Em;t.DIRECTION_VERTICAL=Om;t.DIRECTION_NONE=_m;t.DIRECTION_DOWN=Tm;t.INPUT_START=wm;t.INPUT_MOVE=2;t.INPUT_END=km;t.INPUT_CANCEL=xm;t.STATE_POSSIBLE=1;t.STATE_BEGAN=2;t.STATE_CHANGED=4;t.STATE_ENDED=8;t.STATE_RECOGNIZED=8;t.STATE_CANCELLED=16;t.STATE_FAILED=32;t.Manager=Og;t.Input=$m;t.TouchAction=Rm;t.TouchInput=sg;t.MouseInput=lg;t.PointerEventInput=ig;t.TouchMouseInput=dg;t.SingleTouchInput=Ig;t.Recognizer=vg;t.AttrRecognizer=bg;t.Tap=yg;t.Pan=kg;t.Swipe=xg;t.Pinch=_g;t.Rotate=Cg;t.Press=Sg;t.on=Xm;t.off=qm;t.each=Mm;t.merge=Ng;t.extend=Mg;t.bindFn=Rg;t.assign=Jf;t.inherit=Fg;t.bindFn=Rg;t.prefixed=om;t.toArray=ng;t.inArray=Zm;t.uniqueArray=og;t.splitStr=Um;t.boolOrFn=Nm;t.hasParent=Lm;t.addEventListeners=Xm;t.removeEventListeners=qm;t.defaults=Jf({},Dg,{preset:Tg});return t})(),C=(gs.defaults,gs);function Lg(e,t){var i=Ju(e);if(Jh){var n=Jh(e);t&&(n=M(n).call(n,function(t){return uu(e,t).enumerable})),i.push.apply(i,n)}return i}function jg(e){for(var t=1;t<arguments.length;t++){var i,n=null!=arguments[t]?arguments[t]:{};t%2?P(i=Lg(Object(n),!0)).call(i,function(t){Su(e,t,n[t])}):wu?Cu(e,wu(n)):P(i=Lg(Object(n))).call(i,function(t){ec(e,t,uu(n,t))})}return e}function Bg(t,e){var i,n,o,r=void 0!==Od&&Hc(t)||t["@@iterator"];if(r)return i=!0,n=!1,{s:function(){r=r.call(t)},n:function(){var t=r.next();i=t.done;return t},e:function(t){n=!0;o=t},f:function(){try{i||null==r.return||r.return()}finally{if(n)throw o}}};if(A(t)||(r=((t,e)=>{if(t){if("string"==typeof t)return zg(t,e);var i=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?jc(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?zg(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,a=function(){};return{s:a,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function zg(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var Hg=Od("DELETE");function Gg(){var t=Wg.apply(void 0,arguments);!function t(e){for(var i=0,n=Ju(e);i<n.length;i++){var o=n[i];e[o]===Hg?delete e[o]:"object"===O(e[o])&&null!==e[o]&&t(e[o])}}(t);return t}function Wg(){for(var t,e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];if(i.length<2)return i[0];if(2<i.length)return Wg.apply(void 0,Nd(t=[Gg(i[0],i[1])]).call(t,md(Rd(i).call(i,2))));var o,r=i[0],s=i[1],a=Bg(jd(s));try{for(a.s();!(o=a.n()).done;){var l=o.value;Object.prototype.propertyIsEnumerable.call(s,l)&&(s[l]===Hg?delete r[l]:null===r[l]||null===s[l]||"object"!==O(r[l])||"object"!==O(s[l])||A(r[l])||A(s[l])?r[l]=function e(t){return A(t)?ju(t).call(t,function(t){return e(t)}):"object"===O(t)&&null!==t?Wg({},t):t}(s[l]):r[l]=Wg(r[l],s[l]))}}catch(t){a.e(t)}finally{a.f()}return r}var Yg="undefined"!=typeof window?window.Hammer||C:function(){return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}};function t(){}};function Vg(e){var i=this;this._cleanupQueue=[];this.active=!1;this._dom={container:e,overlay:document.createElement("div")};this._dom.overlay.classList.add("vis-overlay");this._dom.container.appendChild(this._dom.overlay);this._cleanupQueue.push(function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)});var n=Yg(this._dom.overlay);n.on("tap",I(t=this._onTapOverlay).call(t,this));this._cleanupQueue.push(function(){n.destroy()});var t=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];P(t).call(t,function(t){n.on(t,function(t){t.srcEvent.stopPropagation()})});if(document&&document.body){this._onClick=function(t){((t,e)=>{for(;t;){if(t===e)return 1;t=t.parentNode}})(t.target,e)||i.deactivate()};document.body.addEventListener("click",this._onClick);this._cleanupQueue.push(function(){document.body.removeEventListener("click",i._onClick)})}this._escListener=function(t){("key"in t?"Escape"===t.key:27===t.keyCode)&&i.deactivate()}}h(Vg.prototype);Vg.current=null;Vg.prototype.destroy=function(){this.deactivate();var t,e,i=Bg(Kd(t=gp(t=this._cleanupQueue).call(t,0)).call(t));try{for(i.s();!(e=i.n()).done;){var n=e.value;n()}}catch(t){i.e(t)}finally{i.f()}};Vg.prototype.activate=function(){Vg.current&&Vg.current.deactivate();Vg.current=this;this.active=!0;this._dom.overlay.style.display="none";this._dom.container.classList.add("vis-active");this.emit("change");this.emit("activate");document.body.addEventListener("keydown",this._escListener)};Vg.prototype.deactivate=function(){this.active=!1;this._dom.overlay.style.display="block";this._dom.container.classList.remove("vis-active");document.body.removeEventListener("keydown",this._escListener);this.emit("change");this.emit("deactivate")};Vg.prototype._onTapOverlay=function(t){this.activate();t.srcEvent.stopPropagation()};var Ug=/^\/?Date\((-?\d+)/i,Xg=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,qg=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Kg=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,$g=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function Zg(t){return t instanceof Number||"number"==typeof t}function Qg(t){return t instanceof String||"string"==typeof t}function Jg(t){return"object"===O(t)&&null!==t}function tv(t,e,i,n){var o=!1;!0===n&&(o=null===e[i]&&void 0!==t[i]);o?delete t[i]:t[i]=e[i]}$n=Ep;function ev(t,e){var i,n,o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=3<arguments.length&&void 0!==arguments[3]&&arguments[3];for(i in e)!Object.prototype.hasOwnProperty.call(e,i)&&!0!==o||("object"===O(e[i])&&null!==e[i]&&qp(e[i])===Object.prototype?void 0===t[i]?t[i]=ev({},e[i],o):"object"===O(t[i])&&null!==t[i]&&qp(t[i])===Object.prototype?ev(t[i],e[i],o):tv(t,e,i,r):A(e[i])?t[i]=Rd(n=e[i]).call(n):tv(t,e,i,r));return t}function iv(t){var e=O(t);return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":A(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}function nv(t,e){var i;return Nd(i=[]).call(i,md(t),[e])}function ov(t){return Rd(t).call(t)}_=nf;S={asBoolean:function(t,e){"function"==typeof t&&(t=t());return null!=t?0!=t:e||null},asNumber:function(t,e){"function"==typeof t&&(t=t());return null!=t?Number(t)||e||null:e||null},asString:function(t,e){"function"==typeof t&&(t=t());return null!=t?String(t):e||null},asSize:function(t,e){"function"==typeof t&&(t=t());return Qg(t)?t:Zg(t)?t+"px":e||null},asElement:function(t,e){"function"==typeof t&&(t=t());return t||e||null}};function rv(t){var e;switch(t.length){case 3:case 4:e=qg.exec(t);return e?{r:gf(e[1]+e[1],16),g:gf(e[2]+e[2],16),b:gf(e[3]+e[3],16)}:null;case 6:case 7:e=Xg.exec(t);return e?{r:gf(e[1],16),g:gf(e[2],16),b:gf(e[3],16)}:null;default:return null}}function sv(t,e,i){var n;return"#"+Rd(n=((1<<24)+(t<<16)+(e<<8)+i).toString(16)).call(n,1)}function av(t,e,i){t/=255;e/=255;i/=255;var n,o,r=Math.min(t,Math.min(e,i)),s=Math.max(t,Math.max(e,i));return r===s?{h:0,s:0,v:r}:(o=t===r?e-i:i===r?t-e:i-t,n=t===r?3:i===r?1:5,n=60*(n-o/(s-r))/360,o=(s-r)/s,r=s,{h:n,s:o,v:r})}var lv=function(t){var e,n={};P(e=t.split(";")).call(e,function(t){if(""!=Mf(t).call(t)){var e=t.split(":"),i=Mf(i=e[0]).call(i),e=Mf(e=e[1]).call(e);n[i]=e}});return n},hv=function(e){var t;return ju(t=Ju(e)).call(t,function(t){return t+": "+e[t]}).join("; ")};function uv(t,e,i){var n,o,r,s=Math.floor(6*t),a=6*t-s,l=i*(1-e),h=i*(1-a*e),u=i*(1-(1-a)*e);switch(s%6){case 0:n=i,o=u,r=l;break;case 1:n=h,o=i,r=l;break;case 2:n=l,o=i,r=u;break;case 3:n=l,o=h,r=i;break;case 4:n=u,o=l,r=i;break;case 5:n=i,o=l,r=h}return{r:Math.floor(255*n),g:Math.floor(255*o),b:Math.floor(255*r)}}function cv(t,e,i){var n=uv(t,e,i);return sv(n.r,n.g,n.b)}function dv(t){var e=rv(t);if(e)return av(e.r,e.g,e.b);throw new TypeError("'".concat(t,"' is not a valid color."))}function pv(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e}function fv(t){return Kg.test(t)}function mv(t){return $g.test(t)}function gv(t){if(null===t||"object"!==O(t))return null;if(t instanceof Element)return t;var e,i=Ff(t);for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&"object"==O(t[e])&&(i[e]=gv(t[e]));return i}var vv={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},yv=(()=>{function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1;g(this,e);this.pixelRatio=t;this.generated=!1;this.centerCoordinates={x:144.5,y:144.5};this.r=289*.49;this.color={r:255,g:255,b:255,a:1};this.hueCircle=void 0;this.initialColor={r:255,g:255,b:255,a:1};this.previousColor=void 0;this.applied=!1;this.updateCallback=function(){};this.closeCallback=function(){};this._create()}Jl(e,[{key:"insertTo",value:function(t){if(void 0!==this.hammer){this.hammer.destroy();this.hammer=void 0}this.container=t;this.container.appendChild(this.frame);this._bindHammer();this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return vv[t]}},{key:"setColor",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i=this._isColorString(t);void 0!==i&&(t=i);if(!0===Qg(t)){if(!0===fv(t))var i=t.substr(4).substr(0,t.length-5).split(","),n={r:i[0],g:i[1],b:i[2],a:1};else if(!0===mv(t)){i=t.substr(5).substr(0,t.length-6).split(",");n={r:i[0],g:i[1],b:i[2],a:i[3]}}else if(!0===pv(t)){i=rv(t);n={r:i.r,g:i.g,b:i.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){i=void 0!==t.a?t.a:"1.0";n={r:t.r,g:t.g,b:t.b,a:i}}if(void 0===n)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+Bf(t));this._setColor(n,e)}}},{key:"show",value:function(){if(void 0!==this.closeCallback){this.closeCallback();this.closeCallback=void 0}this.applied=!1;this.frame.style.display="block";this._generateHueCircle()}},{key:"_hide",value:function(){var t=this,e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];!0===e&&(this.previousColor=Ep({},this.color));!0===this.applied&&this.updateCallback(this.initialColor);this.frame.style.display="none";Hh(function(){if(void 0!==t.closeCallback){t.closeCallback();t.closeCallback=void 0}},0)}},{key:"_save",value:function(){this.updateCallback(this.color);this.applied=!1;this._hide()}},{key:"_apply",value:function(){this.applied=!0;this.updateCallback(this.color);this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];!0===e&&(this.initialColor=Ep({},t));this.color=t;var e=av(t.r,t.g,t.b),i=2*Math.PI,n=this.r*e.s,o=this.centerCoordinates.x+n*Math.sin(i*e.h),n=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px";this.colorPickerSelector.style.top=n-.5*this.colorPickerSelector.clientHeight+"px";this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100;this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=av(this.color.r,this.color.g,this.color.b),e=(e.v=t/100,uv(e.h,e.s,e.v));e.a=this.color.a;this.color=e;this._updatePicker()}},{key:"_updatePicker",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.color,e=av(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1));i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o);i.putImageData(this.hueCircle,0,0);i.fillStyle="rgba(0,0,0,"+(1-e.v)+")";i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r);Xf(i).call(i);this.brightnessRange.value=100*e.v;this.opacityRange.value=100*t.a;this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")";this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%";this.colorPickerCanvas.style.height="100%";this.colorPickerCanvas.width=289*this.pixelRatio;this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){this.frame=document.createElement("div");this.frame.className="vis-color-picker";this.colorPickerDiv=document.createElement("div");this.colorPickerSelector=document.createElement("div");this.colorPickerSelector.className="vis-selector";this.colorPickerDiv.appendChild(this.colorPickerSelector);this.colorPickerCanvas=document.createElement("canvas");this.colorPickerDiv.appendChild(this.colorPickerCanvas);if(this.colorPickerCanvas.getContext){var t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1);this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var t=document.createElement("DIV");t.style.color="red";t.style.fontWeight="bold";t.style.padding="10px";t.innerText="Error: your browser does not support HTML canvas";this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color";this.opacityDiv=document.createElement("div");this.opacityDiv.className="vis-opacity";this.brightnessDiv=document.createElement("div");this.brightnessDiv.className="vis-brightness";this.arrowDiv=document.createElement("div");this.arrowDiv.className="vis-arrow";this.opacityRange=document.createElement("input");try{this.opacityRange.type="range";this.opacityRange.min="0";this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100";this.opacityRange.className="vis-range";this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range";this.brightnessRange.min="0";this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100";this.brightnessRange.className="vis-range";this.opacityDiv.appendChild(this.opacityRange);this.brightnessDiv.appendChild(this.brightnessRange);var e=this;this.opacityRange.onchange=function(){e._setOpacity(this.value)};this.opacityRange.oninput=function(){e._setOpacity(this.value)};this.brightnessRange.onchange=function(){e._setBrightness(this.value)};this.brightnessRange.oninput=function(){e._setBrightness(this.value)};this.brightnessLabel=document.createElement("div");this.brightnessLabel.className="vis-label vis-brightness";this.brightnessLabel.innerText="brightness:";this.opacityLabel=document.createElement("div");this.opacityLabel.className="vis-label vis-opacity";this.opacityLabel.innerText="opacity:";this.newColorDiv=document.createElement("div");this.newColorDiv.className="vis-new-color";this.newColorDiv.innerText="new";this.initialColorDiv=document.createElement("div");this.initialColorDiv.className="vis-initial-color";this.initialColorDiv.innerText="initial";this.cancelButton=document.createElement("div");this.cancelButton.className="vis-button vis-cancel";this.cancelButton.innerText="cancel";this.cancelButton.onclick=I(t=this._hide).call(t,this,!1);this.applyButton=document.createElement("div");this.applyButton.className="vis-button vis-apply";this.applyButton.innerText="apply";this.applyButton.onclick=I(t=this._apply).call(t,this);this.saveButton=document.createElement("div");this.saveButton.className="vis-button vis-save";this.saveButton.innerText="save";this.saveButton.onclick=I(t=this._save).call(t,this);this.loadButton=document.createElement("div");this.loadButton.className="vis-button vis-load";this.loadButton.innerText="load last";this.loadButton.onclick=I(t=this._loadLast).call(t,this);this.frame.appendChild(this.colorPickerDiv);this.frame.appendChild(this.arrowDiv);this.frame.appendChild(this.brightnessLabel);this.frame.appendChild(this.brightnessDiv);this.frame.appendChild(this.opacityLabel);this.frame.appendChild(this.opacityDiv);this.frame.appendChild(this.newColorDiv);this.frame.appendChild(this.initialColorDiv);this.frame.appendChild(this.cancelButton);this.frame.appendChild(this.applyButton);this.frame.appendChild(this.saveButton);this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={};this.pinch={};this.hammer=new Yg(this.colorPickerCanvas);this.hammer.get("pinch").set({enable:!0});this.hammer.on("hammer.input",function(t){t.isFirst&&e._moveSelector(t)});this.hammer.on("tap",function(t){e._moveSelector(t)});this.hammer.on("panstart",function(t){e._moveSelector(t)});this.hammer.on("panmove",function(t){e._moveSelector(t)});this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1));t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e,i,n,o=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,o,r);this.centerCoordinates={x:.5*o,y:.5*r};this.r=.49*o;for(var s,a=2*Math.PI/360,l=1/this.r,h=0;h<360;h++)for(n=0;n<this.r;n++){e=this.centerCoordinates.x+n*Math.sin(a*h);i=this.centerCoordinates.y+n*Math.cos(a*h);s=uv(h*(1/360),n*l,1);t.fillStyle="rgb("+s.r+","+s.g+","+s.b+")";t.fillRect(e-.5,i-.5,2,2)}t.strokeStyle="rgba(0,0,0,1)";t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r);t.stroke();this.hueCircle=t.getImageData(0,0,o,r)}this.generated=!0}},{key:"_moveSelector",value:function(t){var e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,e=t.center.y-e.top,n=.5*this.colorPickerDiv.clientHeight,o=.5*this.colorPickerDiv.clientWidth,i=i-o,e=e-n,r=Math.atan2(i,e),i=.98*Math.min(Math.sqrt(i*i+e*e),o),e=Math.cos(r)*i+n,n=Math.sin(r)*i+o;this.colorPickerSelector.style.top=e-.5*this.colorPickerSelector.clientHeight+"px";this.colorPickerSelector.style.left=n-.5*this.colorPickerSelector.clientWidth+"px";o=r/(2*Math.PI),o=o<0?1+o:o,e=i/this.r,n=av(this.color.r,this.color.g,this.color.b);n.h=o;n.s=e;r=uv(n.h,n.s,n.v);r.a=this.color.a;this.color=r;this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")";this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]);return e})();function bv(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(e.length<1)throw new TypeError("Invalid arguments.");if(1===e.length)return document.createTextNode(e[0]);var n=document.createElement(e[0]);n.appendChild(bv.apply(void 0,md(Rd(e).call(e,1))));return n}var wv,D=(()=>{function r(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:function(){return!1};g(this,r);this.parent=t;this.changedOptions=[];this.container=e;this.allowCreation=!1;this.hideOption=o;this.options={};this.initialized=!1;this.popupCounter=0;this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0};Ep(this.options,this.defaultOptions);this.configureOptions=i;this.moduleOptions={};this.domElements=[];this.popupDiv={};this.popupLimit=5;this.popupHistory={};this.colorPicker=new yv(n);this.wrapper=void 0}Jl(r,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={};this._removePopup();var e=!0;if("string"==typeof t)this.options.filter=t;else if(A(t))this.options.filter=t.join();else if("object"===O(t)){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container);void 0!==M(t)&&(this.options.filter=M(t));void 0!==t.showButton&&(this.options.showButton=t.showButton);void 0!==t.enabled&&(e=t.enabled)}else if("boolean"==typeof t){this.options.filter=!0;e=t}else if("function"==typeof t){this.options.filter=t;e=!0}!1===M(this.options)&&(e=!1);this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t;if(!0===this.options.enabled){this._clean();void 0!==this.options.container&&(this.container=this.options.container);this._create()}}},{key:"_create",value:function(){this._clean();this.changedOptions=[];var t,e=M(this.options),i=0,n=!1;for(t in this.configureOptions)if(Object.prototype.hasOwnProperty.call(this.configureOptions,t)){this.allowCreation=!1;n=!1;if("function"==typeof e){n=e(t,[]);n=n||this._handleObject(this.configureOptions[t],[t],!0)}else!0!==e&&-1===Cf(e).call(e,t)||(n=!0);if(!1!==n){this.allowCreation=!0;0<i&&this._makeItem([]);this._makeHeader(t);this._handleObject(this.configureOptions[t],[t])}i++}this._makeButton();this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div");this.wrapper.className="vis-configuration-wrapper";this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);if(void 0!==this.wrapper){this.container.removeChild(this.wrapper);this.wrapper=void 0}this.domElements=[];this._removePopup()}},{key:"_getValue",value:function(t){for(var e=this.moduleOptions,i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}},{key:"_makeItem",value:function(t){if(!0!==this.allowCreation)return 0;var e=document.createElement("div");e.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var i=arguments.length,n=new Array(1<i?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];P(n).call(n,function(t){e.appendChild(t)});this.domElements.push(e);return this.domElements.length}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header";e.innerText=t;this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");n.className="vis-configuration vis-config-label vis-config-s"+e.length;if(!0===i){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(bv("i","b",t))}else n.innerText=t+":";return n}},{key:"_makeDropdown",value:function(t,e,i){var n=document.createElement("select"),o=(n.className="vis-configuration vis-config-select",0);void 0!==e&&-1!==Cf(t).call(t,e)&&(o=Cf(t).call(t,e));for(var r=0;r<t.length;r++){var s=document.createElement("option");s.value=t[r];r===o&&(s.selected="selected");s.innerText=t[r];n.appendChild(s)}var a=this,l=(n.onchange=function(){a._update(this.value,i)},this._makeLabel(i[i.length-1],i));this._makeItem(i,l,n)}},{key:"_makeRange",value:function(t,e,i){var n=t[0],o=t[1],r=t[2],s=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range";a.min=o;a.max=r}catch(t){}a.step=s;var s="",l=0;if(void 0!==e){if(e<0&&1.2*e<o){a.min=Math.ceil(1.2*e);l=a.min;s="range increased"}else if(e/1.2<o){a.min=Math.ceil(e/1.2);l=a.min;s="range increased"}if(r<1.2*e&&1!==r){a.max=Math.ceil(1.2*e);l=a.max;s="range increased"}a.value=e}else a.value=n;var h=document.createElement("input");h.className="vis-configuration vis-config-rangeinput";h.value=a.value;var u=this;a.onchange=function(){h.value=this.value;u._update(Number(this.value),i)};a.oninput=function(){h.value=this.value};o=this._makeLabel(i[i.length-1],i),r=this._makeItem(i,o,a,h);if(""!==s&&this.popupHistory[r]!==l){this.popupHistory[r]=l;this._setupPopup(s,r)}}},{key:"_makeButton",value:function(){var t=this;if(!0===this.options.showButton){var e=document.createElement("div");e.className="vis-configuration vis-config-button";e.innerText="generate options";e.onclick=function(){t._printOptions()};e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"};e.onmouseout=function(){e.className="vis-configuration vis-config-button"};this.optionsContainer=document.createElement("div");this.optionsContainer.className="vis-configuration vis-config-option-container";this.domElements.push(this.optionsContainer);this.domElements.push(e)}}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){var n=document.createElement("div");n.id="vis-configuration-popup";n.className="vis-configuration-popup";n.innerText=t;n.onclick=function(){i._removePopup()};this.popupCounter+=1;this.popupDiv={html:n,index:e}}}},{key:"_removePopup",value:function(){if(void 0!==this.popupDiv.html){this.popupDiv.html.parentNode.removeChild(this.popupDiv.html);clearTimeout(this.popupDiv.hideTimeout);clearTimeout(this.popupDiv.deleteTimeout);this.popupDiv={}}}},{key:"_showPopupIfNeeded",value:function(){var t=this;if(void 0!==this.popupDiv.html){var e=this.domElements[this.popupDiv.index],e=e.getBoundingClientRect();this.popupDiv.html.style.left=e.left+"px";this.popupDiv.html.style.top=e.top-30+"px";document.body.appendChild(this.popupDiv.html);this.popupDiv.hideTimeout=Hh(function(){t.popupDiv.html.style.opacity=0},1500);this.popupDiv.deleteTimeout=Hh(function(){t._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(t,e,i){var n=document.createElement("input");n.type="checkbox";n.className="vis-configuration vis-config-checkbox";n.checked=t;if(void 0!==e){n.checked=e;e===t||"object"===O(t)&&e===t.enabled||this.changedOptions.push({path:i,value:e})}var o=this,r=(n.onchange=function(){o._update(this.checked,i)},this._makeLabel(i[i.length-1],i));this._makeItem(i,r,n)}},{key:"_makeTextInput",value:function(t,e,i){var n=document.createElement("input");n.type="text";n.className="vis-configuration vis-config-text";n.value=e;e!==t&&this.changedOptions.push({path:i,value:e});var o=this,r=(n.onchange=function(){o._update(this.value,i)},this._makeLabel(i[i.length-1],i));this._makeItem(i,r,n)}},{key:"_makeColorField",value:function(t,e,i){var n=this,o=t[1],r=document.createElement("div");e=void 0===e?o:e;if("none"!==e){r.className="vis-configuration vis-config-colorBlock";r.style.backgroundColor=e}else r.className="vis-configuration vis-config-colorBlock none";e=void 0===e?o:e;r.onclick=function(){n._showColorPicker(e,r,i)};o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,r)}},{key:"_showColorPicker",value:function(t,i,n){var o=this;i.onclick=function(){};this.colorPicker.insertTo(i);this.colorPicker.show();this.colorPicker.setColor(t);this.colorPicker.setUpdateCallback(function(t){var e="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";i.style.backgroundColor=e;o._update(e,n)});this.colorPicker.setCloseCallback(function(){i.onclick=function(){o._showColorPicker(t,i,n)}})}},{key:"_handleObject",value:function(t){var e,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o=!1,r=M(this.options),s=!1;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var o=!0,a=t[e],l=nv(i,e);if("function"==typeof r){o=r(e,i);if(!1===o&&!A(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object){this.allowCreation=!1;o=this._handleObject(a,l,!0);this.allowCreation=!1===n}}if(!1!==o){var s=!0,h=this._getValue(l);if(A(a))this._handleArray(a,h,l);else if("string"==typeof a)this._makeTextInput(a,h,l);else if("boolean"==typeof a)this._makeCheckbox(a,h,l);else if(a instanceof Object){if(!this.hideOption(i,e,this.moduleOptions))if(void 0!==a.enabled){h=nv(l,"enabled"),h=this._getValue(h);if(!0===h){var u=this._makeLabel(e,l,!0);this._makeItem(l,u);s=this._handleObject(a,l)||s}else this._makeCheckbox(a,h,l)}else{u=this._makeLabel(e,l,!0);this._makeItem(l,u);s=this._handleObject(a,l)||s}}else console.error("dont know how to handle",a,e,l)}}return s}},{key:"_handleArray",value:function(t,e,i){if("string"==typeof t[0]&&"color"===t[0]){this._makeColorField(t,e,i);t[1]!==e&&this.changedOptions.push({path:i,value:e})}else if("string"==typeof t[0]){this._makeDropdown(t,e,i);t[0]!==e&&this.changedOptions.push({path:i,value:e})}else if("number"==typeof t[0]){this._makeRange(t,e,i);t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)})}}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i);this.initialized=!0;this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=i;t="true"===t||t;t="false"!==t&&t;for(var o=0;o<e.length;o++)if("global"!==e[o]){void 0===n[e[o]]&&(n[e[o]]={});o!==e.length-1?n=n[e[o]]:n[e[o]]=t}return i}},{key:"_printOptions",value:function(){for(var t=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(bv("pre","const options = "+Bf(t,null,2)))}},{key:"getOptions",value:function(){for(var t={},e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}]);return r})(),vs=(()=>{function i(t,e){g(this,i);this.container=t;this.overflowMethod=e||"cap";this.x=0;this.y=0;this.padding=5;this.hidden=!1;this.frame=document.createElement("div");this.frame.className="vis-tooltip";this.container.appendChild(this.frame)}Jl(i,[{key:"setPosition",value:function(t,e){this.x=gf(t);this.y=gf(e)}},{key:"setText",value:function(t){if(t instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(t)}else this.frame.innerText=t}},{key:"show",value:function(t){void 0===t&&(t=!0);if(!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,r=0,s=0;if("flip"==this.overflowMethod){var a=!1,l=!0;this.y-e<this.padding&&(l=!1);this.x+i>o-this.padding&&(a=!0);r=a?this.x-i:this.x;s=l?this.y-e:this.y}else{s=this.y-e;s+e+this.padding>n&&(s=n-e-this.padding);s<this.padding&&(s=this.padding);r=this.x;r+i+this.padding>o&&(r=o-i-this.padding);r<this.padding&&(r=this.padding)}this.frame.style.left=r+"px";this.frame.style.top=s+"px";this.frame.style.visibility="visible";this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0;this.frame.style.left="0";this.frame.style.top="0";this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]);return i})(),kv=!1,xv="background: #FFeeee; color: #dd0000",$i=(()=>{function d(){g(this,d)}Jl(d,null,[{key:"validate",value:function(t,e,i){kv=!1;wv=e;var n=e;void 0!==i&&(n=e[i]);d.parse(t,n,[]);return kv}},{key:"parse",value:function(t,e,i){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&d.check(n,t,e,i)}},{key:"check",value:function(t,e,i,n){if(void 0===i[t]&&void 0===i.__any__)d.getSuggestion(t,i,n);else{var o=t,r=!0;if(void 0===i[t]&&void 0!==i.__any__){o="__any__";r="object"===d.getType(e[t])}var s=i[o];r&&void 0!==s.__type__&&(s=s.__type__);d.checkFields(t,e,i,o,s,n)}}},{key:"checkFields",value:function(e,t,i,n,o,r){function s(t){console.error("%c"+t+d.printLocation(r,e),xv)}var a=d.getType(t[e]),l=o[a];if(void 0!==l){if("array"===d.getType(l)&&-1===Cf(l).call(l,t[e])){s('Invalid option detected in "'+e+'". Allowed values are:'+d.print(l)+' not "'+t[e]+'". ');kv=!0}else if("object"===a&&"__any__"!==n){r=nv(r,e);d.parse(t[e],i[n],r)}}else if(void 0===o.any){s('Invalid type received for "'+e+'". Expected: '+d.print(Ju(o))+". Received ["+a+'] "'+t[e]+'"');kv=!0}}},{key:"getType",value:function(t){var e=O(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":A(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}},{key:"getSuggestion",value:function(t,e,i){var n=d.findInOptions(t,e,i,!1),o=d.findInOptions(t,wv,[],!0),o=void 0!==n.indexMatch?" in "+d.printLocation(n.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+n.indexMatch+'"?\n\n':o.distance<=4&&n.distance>o.distance?" in "+d.printLocation(n.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+d.printLocation(o.path,o.closestMatch,""):n.distance<=8?'. Did you mean "'+n.closestMatch+'"?'+d.printLocation(n.path,t):". Did you mean one of these: "+d.print(Ju(e))+d.printLocation(i,t);console.error('%cUnknown option detected: "'+t+'"'+o,xv);kv=!0}},{key:"findInOptions",value:function(t,e,i){var n,o=3<arguments.length&&void 0!==arguments[3]&&arguments[3],r=1e9,s="",a=[],l=t.toLowerCase(),h=void 0;for(n in e){var u;if(void 0!==e[n].__type__&&!0===o){var c=d.findInOptions(t,e[n],nv(i,n));if(r>c.distance){s=c.closestMatch;a=c.path;r=c.distance;h=c.indexMatch}}else{-1!==Cf(c=n.toLowerCase()).call(c,l)&&(h=n);u=d.levenshteinDistance(t,n);if(u<r){s=n;a=ov(i);r=u}}}return{closestMatch:s,path:a,distance:r,indexMatch:h}}},{key:"printLocation",value:function(t,e){for(var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",n="\n\n"+i+"options = {\n",o=0;o<t.length;o++){for(var r=0;r<o+1;r++)n+=" ";n+=t[o]+": {\n"}for(var s=0;s<t.length+1;s++)n+=" ";n+=e+"\n";for(var a=0;a<t.length+1;a++){for(var l=0;l<t.length-a;l++)n+=" ";n+="}\n"}return n+"\n\n"}},{key:"print",value:function(t){return Bf(t).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}},{key:"levenshteinDistance",value:function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;for(var i,n=[],o=0;o<=e.length;o++)n[o]=[o];for(i=0;i<=t.length;i++)n[0][i]=i;for(o=1;o<=e.length;o++)for(i=1;i<=t.length;i++)e.charAt(o-1)==t.charAt(i-1)?n[o][i]=n[o-1][i-1]:n[o][i]=Math.min(n[o-1][i-1]+1,Math.min(n[o][i-1]+1,n[o-1][i]+1));return n[e.length][t.length]}}]);return d})(),x=Vg,T=yv,w=D,is=Yg,fs=vs,In=$i,ms=Object.freeze({__proto__:null,Activator:x,Alea:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n=e.length?e:[Gd()];function o(){var t=2091639*s+2.3283064365386963e-10*h;s=a;a=l;return l=t-(h=0|t)}var r=function(){for(var t=(()=>{var o=4022871197;return function(t){for(var e=t.toString(),i=0;i<e.length;i++){o+=e.charCodeAt(i);var n=.02519603282416938*o;o=n>>>0;n-=o;n*=o;o=n>>>0;n-=o;o+=4294967296*n}return 2.3283064365386963e-10*(o>>>0)}})(),e=t(" "),i=t(" "),n=t(" "),o=0;o<arguments.length;o++){e-=t(o<0||arguments.length<=o?void 0:arguments[o]);e<0&&(e+=1);i-=t(o<0||arguments.length<=o?void 0:arguments[o]);i<0&&(i+=1);n-=t(o<0||arguments.length<=o?void 0:arguments[o]);n<0&&(n+=1)}return[e,i,n]}(n),r=fd(r,3),s=r[0],a=r[1],l=r[2],h=1;o.uint32=function(){return 4294967296*o()};o.fract53=function(){return o()+11102230246251565e-32*(2097152*o()|0)};o.algorithm="Alea";o.seed=n;o.version="0.9";return o},ColorPicker:T,Configurator:w,DELETE:Hg,HSVToHex:cv,HSVToRGB:uv,Hammer:is,Popup:fs,RGBToHSV:av,RGBToHex:sv,VALIDATOR_PRINT_STYLE:"background: #FFeeee; color: #dd0000",Validator:In,addClassName:function(t,e){var i=t.className.split(" "),n=e.split(" "),i=Nd(i).call(i,M(n).call(n,function(t){return!Up(i).call(i,t)}));t.className=i.join(" ")},addCssText:function(t,e){var i=lv(t.style.cssText),n=lv(e),i=jg(jg({},i),n);t.style.cssText=hv(i)},addEventListener:function(t,e,i,n){if(t.addEventListener){var o;void 0===n&&(n=!1);"mousewheel"===e&&Up(o=navigator.userAgent).call(o,"Firefox")&&(e="DOMMouseScroll");t.addEventListener(e,i,n)}else t.attachEvent("on"+e,i)},binarySearchCustom:function(t,e,i,n){for(var o=0,r=0,s=t.length-1;r<=s&&o<1e4;){var a=Math.floor((r+s)/2),l=t[a],l=void 0===n?l[i]:l[i][n],l=e(l);if(0==l)return a;-1==l?r=a+1:s=a-1;o++}return-1},binarySearchValue:function(t,e,i,n,o){var r,s,a,l,h=0,u=0,c=t.length-1;o=null!=o?o:function(t,e){return t==e?0:t<e?-1:1};for(;u<=c&&h<1e4;){l=Math.floor(.5*(c+u));r=t[Math.max(0,l-1)][i];s=t[l][i];a=t[Math.min(t.length-1,l+1)][i];if(0==o(s,e))return l;if(o(r,e)<0&&0<o(s,e))return"before"==n?Math.max(0,l-1):l;if(o(s,e)<0&&0<o(a,e))return"before"==n?l:Math.min(t.length-1,l+1);o(s,e)<0?u=l+1:c=l-1;h++}return-1},bridgeObject:gv,copyAndExtendArray:nv,copyArray:ov,deepExtend:ev,deepObjectAssign:Gg,easingFunctions:{linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},equalArray:function(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!=e[i])return!1;return!0},extend:$n,fillIfDefined:function t(e,i){var n,o=2<arguments.length&&void 0!==arguments[2]&&arguments[2];for(n in e)if(void 0!==i[n])if(null===i[n]||"object"!==O(i[n]))tv(e,i,n,o);else{var r=e[n],s=i[n];Jg(r)&&Jg(s)&&t(r,s,o)}},forEach:function(t,e){if(A(t))for(var i=t.length,n=0;n<i;n++)e(t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e(t[o],o,t)},getAbsoluteLeft:function(t){return t.getBoundingClientRect().left},getAbsoluteRight:function(t){return t.getBoundingClientRect().right},getAbsoluteTop:function(t){return t.getBoundingClientRect().top},getScrollBarWidth:function(){var t=document.createElement("p");t.style.width="100%";t.style.height="200px";var e=document.createElement("div");e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.visibility="hidden";e.style.width="200px";e.style.height="150px";e.style.overflow="hidden";e.appendChild(t);document.body.appendChild(e);var i=t.offsetWidth,t=(e.style.overflow="scroll",t.offsetWidth);i==t&&(t=e.clientWidth);document.body.removeChild(e);return i-t},getTarget:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:window.event,e=null;t&&(t.target?e=t.target:t.srcElement&&(e=t.srcElement));if(!(e instanceof Element))return null;if(null!=e.nodeType&&3==e.nodeType){e=e.parentNode;if(!(e instanceof Element))return null}return e},getType:iv,hasParent:function(t,e){for(var i=t;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}return!1},hexToHSV:dv,hexToRGB:rv,insertSort:function(t,e){for(var i=0;i<t.length;i++){for(var n=t[i],o=void 0,o=i;0<o&&e(n,t[o-1])<0;o--)t[o]=t[o-1];t[o]=n}return t},isDate:function(t){if(t instanceof Date)return!0;if(Qg(t)){var e=Ug.exec(t);if(e)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:Zg,isObject:Jg,isString:Qg,isValidHex:pv,isValidRGB:fv,isValidRGBA:mv,mergeOptions:function(t,e,i){function n(t){return null!=t}function o(t){return null!==t&&"object"===O(t)}var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};if(!o(t))throw new Error("Parameter mergeTarget must be an object");if(!o(e))throw new Error("Parameter options must be an object");if(!n(i))throw new Error("Parameter option must have a value");if(!o(r))throw new Error("Parameter globalOptions must be an object");var s=e[i],a=o(r)&&!(t=>{for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0})(r),a=a?r[i]:void 0,r=a?a.enabled:void 0;if(void 0!==s)if("boolean"==typeof s){o(t[i])||(t[i]={});t[i].enabled=s}else{if(null===s&&!o(t[i])){if(!n(a))return;t[i]=Ff(a)}if(o(s)){var l=!0,h=(void 0!==s.enabled?l=s.enabled:void 0!==r&&(l=a.enabled),t),u=i;o(h[u])||(h[u]={});var c,d=e[u],p=h[u];for(c in d)Object.prototype.hasOwnProperty.call(d,c)&&(p[c]=d[c]);t[i].enabled=l}}},option:S,overrideOpacity:function(t,e){var i;return Up(t).call(t,"rgba")?t:Up(t).call(t,"rgb")?(i=t.substr(Cf(t).call(t,"(")+1).replace(")","").split(","),"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"):(i=rv(t),null==i?t:"rgba("+i.r+","+i.g+","+i.b+","+e+")")},parseColor:function(t,e){if(Qg(t)){var i,n,o=t;fv(o)&&(i=ju(i=o.substr(4).substr(0,o.length-5).split(",")).call(i,function(t){return gf(t)}),o=sv(i[0],i[1],i[2]));return!0===pv(o)?(i=dv(o),n={h:i.h,s:.8*i.s,v:Math.min(1,1.02*i.v)},i={h:i.h,s:Math.min(1,1.25*i.s),v:.8*i.v},i=cv(i.h,i.s,i.v),n=cv(n.h,n.s,n.v),{background:o,border:i,highlight:{background:n,border:i},hover:{background:n,border:i}}):{background:o,border:o,highlight:{background:o,border:o},hover:{background:o,border:o}}}return e?(n={background:t.background||e.background,border:t.border||e.border,highlight:Qg(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||e.highlight.background,border:t.highlight&&t.highlight.border||e.highlight.border},hover:Qg(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||e.hover.border,background:t.hover&&t.hover.background||e.hover.background}},n):(i={background:t.background||void 0,border:t.border||void 0,highlight:Qg(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||void 0,border:t.highlight&&t.highlight.border||void 0},hover:Qg(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||void 0,background:t.hover&&t.hover.background||void 0}},i)},preventDefault:function(t){t=t||window.event;t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},pureDeepObjectAssign:function(t){for(var e,i=arguments.length,n=new Array(1<i?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return Gg.apply(void 0,Nd(e=[{},t]).call(e,n))},recursiveDOMDelete:function t(e){if(e)for(;!0===e.hasChildNodes();){var i=e.firstChild;if(i){t(i);e.removeChild(i)}}},removeClassName:function(t,e){var i=t.className.split(" "),n=e.split(" "),i=M(i).call(i,function(t){return!Up(n).call(n,t)});t.className=i.join(" ")},removeCssText:function(t,e){var i,n=lv(t.style.cssText),o=lv(e);for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&delete n[i];t.style.cssText=hv(n)},removeEventListener:function(t,e,i,n){if(t.removeEventListener){var o;void 0===n&&(n=!1);"mousewheel"===e&&Up(o=navigator.userAgent).call(o,"Firefox")&&(e="DOMMouseScroll");t.removeEventListener(e,i,n)}else t.detachEvent("on"+e,i)},selectiveBridgeObject:function(t,e){if(null===e||"object"!==O(e))return null;for(var i=Ff(e),n=0;n<t.length;n++)Object.prototype.hasOwnProperty.call(e,t[n])&&"object"==O(e[t[n]])&&(i[t[n]]=gv(e[t[n]]));return i},selectiveDeepExtend:function(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(A(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o=0;o<t.length;o++){var r=t[o];if(Object.prototype.hasOwnProperty.call(i,r))if(i[r]&&i[r].constructor===Object){void 0===e[r]&&(e[r]={});e[r].constructor===Object?ev(e[r],i[r],!1,n):tv(e,i,r,n)}else{if(A(i[r]))throw new TypeError("Arrays are not supported by deepExtend");tv(e,i,r,n)}}return e},selectiveExtend:function(t,e){if(!A(t))throw new Error("Array with property names expected as first argument");for(var i=arguments.length,n=new Array(2<i?i-2:0),o=2;o<i;o++)n[o-2]=arguments[o];for(var r=0,s=n;r<s.length;r++)for(var a=s[r],l=0;l<t.length;l++){var h=t[l];a&&Object.prototype.hasOwnProperty.call(a,h)&&(e[h]=a[h])}return e},selectiveNotDeepExtend:function(t,e,i){var n,o=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(A(i))throw new TypeError("Arrays are not supported by deepExtend");for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&!Up(t).call(t,n))if(i[n]&&i[n].constructor===Object){void 0===e[n]&&(e[n]={});e[n].constructor===Object?ev(e[n],i[n]):tv(e,i,n,o)}else if(A(i[n])){e[n]=[];for(var r=0;r<i[n].length;r++)e[n].push(i[n][r])}else tv(e,i,n,o);return e},throttle:function(t){var e=!1;return function(){if(!e){e=!0;requestAnimationFrame(function(){e=!1;t()})}}},toArray:_,topMost:function(t,e){A(e)||(e=[e]);var i,n=Bg(t);try{for(n.s();!(i=n.n()).done;){var o=i.value;if(o){for(var r=o[e[0]],s=1;s<e.length;s++)r=r&&r[e[s]];if(void 0!==r)break}}}catch(t){n.e(t)}finally{n.f()}return r},updateProperty:function(t,e,i){return t[e]!==i&&(t[e]=i,!0)}}),_v={},pt={get exports(){return _v},set exports(t){_v=t}},b={},Cv={},d={get exports(){return Cv},set exports(t){Cv=t}},k={};function Sv(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var Dv=/javascript\s*\:/gim;k.whiteList=Sv();k.getDefaultWhiteList=Sv;k.onAttr=function(t,e,i){};k.onIgnoreAttr=function(t,e,i){};k.safeAttrValue=function(t,e){return Dv.test(e)?"":e};var Ui={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,o;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}},Tv=Ui;function Ev(n,o){n=Tv.trimRight(n);";"!==n[n.length-1]&&(n+=";");var t=n.length,r=!1,s=0,a=0,l="";function e(){if(!r){var t=Tv.trim(n.slice(s,a)),e=t.indexOf(":");if(-1!==e){var i=Tv.trim(t.slice(0,e)),e=Tv.trim(t.slice(e+1));if(i){i=o(s,l.length,i,e,t);i&&(l+=i+"; ")}}}s=a+1}for(;a<t;a++){var i=n[a];if("/"===i&&"*"===n[a+1]){var h=n.indexOf("*/",a+2);if(-1===h)break;a=h+1;s=a+1;r=!1}else"("===i?r=!0:")"===i?r=!1:";"===i?r||e():"\n"===i&&e()}return Tv.trim(l)}var Ov=k,Av=Ev;function Iv(t){return null==t}function Pv(t){t=(t=>{var e,i={};for(e in t)i[e]=t[e];return i})(t||{});t.whiteList=t.whiteList||Ov.whiteList;t.onAttr=t.onAttr||Ov.onAttr;t.onIgnoreAttr=t.onIgnoreAttr||Ov.onIgnoreAttr;t.safeAttrValue=t.safeAttrValue||Ov.safeAttrValue;this.options=t}Pv.prototype.process=function(t){t=t||"";t=t.toString();var l,h,u,c,e;return t?(e=this.options,l=e.whiteList,h=e.onAttr,u=e.onIgnoreAttr,c=e.safeAttrValue,e=Av(t,function(t,e,i,n,o){var r,s=l[i],a=!1;!0===s?a=s:"function"==typeof s?a=s(n):s instanceof RegExp&&(a=s.test(n));!0!==a&&(a=!1);n=c(i,n);if(n)return s={position:e,sourcePosition:t,source:o,isWhite:a},a?(r=h(i,n,s),Iv(r)?i+":"+n:r):(r=u(i,n,s),Iv(r)?void 0:r)}),e):""};var Mv,Ie=Pv,N=d,Nv=Cv,Fv=k,Rv=Ie;Nv=N.exports=function(t,e){var i=new Rv(e);return i.process(t)};Nv.FilterCSS=Rv;for(Mv in Fv)Nv[Mv]=Fv[Mv];"undefined"!=typeof window&&(window.filterCSS=N.exports);var Z={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,o;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}},v=Cv.FilterCSS,mt=Cv.getDefaultWhiteList,Lv=Z;function jv(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var Bv=new v;function zv(t){return t.replace(Hv,"&lt;").replace(Gv,"&gt;")}var Hv=/</g,Gv=/>/g,Wv=/"/g,Yv=/&quot;/g,Vv=/&#([a-zA-Z0-9]*);?/gim,Uv=/&colon;?/gim,Xv=/&newline;?/gim,qv=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,Kv=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,$v=/u\s*r\s*l\s*\(.*/gi;function Zv(t){return t.replace(Wv,"&quot;")}function Qv(t){return t.replace(Yv,'"')}function Jv(t){return t.replace(Vv,function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))})}function ty(t){return t.replace(Uv,":").replace(Xv," ")}function ey(t){for(var e="",i=0,n=t.length;i<n;i++)e+=t.charCodeAt(i)<32?" ":t.charAt(i);return Lv.trim(e)}function iy(t){t=Qv(t);t=Jv(t);t=ty(t);t=ey(t);return t}function ny(t){t=Zv(t);t=zv(t);return t}b.whiteList=jv();b.getDefaultWhiteList=jv;b.onTag=function(t,e,i){};b.onIgnoreTag=function(t,e,i){};b.onTagAttr=function(t,e,i){};b.onIgnoreTagAttr=function(t,e,i){};b.safeAttrValue=function(t,e,i,n){i=iy(i);if("href"===e||"src"===e){i=Lv.trim(i);if("#"===i)return"#";if("http://"!==i.substr(0,7)&&"https://"!==i.substr(0,8)&&"mailto:"!==i.substr(0,7)&&"tel:"!==i.substr(0,4)&&"data:image/"!==i.substr(0,11)&&"ftp://"!==i.substr(0,6)&&"./"!==i.substr(0,2)&&"../"!==i.substr(0,3)&&"#"!==i[0]&&"/"!==i[0])return""}else if("background"===e){qv.lastIndex=0;if(qv.test(i))return""}else if("style"===e){Kv.lastIndex=0;if(Kv.test(i))return"";$v.lastIndex=0;if($v.test(i)){qv.lastIndex=0;if(qv.test(i))return""}if(!1!==n){n=n||Bv;i=n.process(i)}}i=ny(i);return i};b.escapeHtml=zv;b.escapeQuote=Zv;b.unescapeQuote=Qv;b.escapeHtmlEntities=Jv;b.escapeDangerHtml5Entities=ty;b.clearNonPrintableCharacter=ey;b.friendlyAttrValue=iy;b.escapeAttrValue=ny;b.onIgnoreTagStripAll=function(){return""};b.StripTagBody=function(s,a){"function"!=typeof a&&(a=function(){});var l=!Array.isArray(s),h=[],u=!1;return{onIgnoreTag:function(t,e,i){if(r=t,l||-1!==Lv.indexOf(s,r)){if(i.isClosing){var n="[/removed]",o=i.position+n.length;h.push([!1!==u?u:i.position,o]);u=!1;return n}return u=u||i.position,"[removed]"}return a(t,e,i);var r},remove:function(e){var i="",n=0;Lv.forEach(h,function(t){i+=e.slice(n,t[0]);n=t[1]});i+=e.slice(n);return i}}};b.stripCommentTag=function(t){for(var e="",i=0;i<t.length;){var n=t.indexOf("\x3c!--",i);if(-1===n){e+=t.slice(i);break}e+=t.slice(i,n);n=t.indexOf("--\x3e",n);if(-1===n)break;i=n+3}return e};b.stripBlankChar=function(t){var e=t.split(""),e=e.filter(function(t){var e=t.charCodeAt(0);return!(127===e||e<=31&&10!==e&&13!==e)});return e.join("")};b.cssFilter=Bv;b.getDefaultCSSWhiteList=mt;var tn={},oy=Z;var ry=/[^a-zA-Z0-9\\_:.-]/gim;function sy(t){return(e=t,'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1])?t.substr(1,t.length-2):t;var e}tn.parseTag=function(t,e,i){var n,o,r="",s=0,a=!1,l=!1,h=0,u=t.length;t:for(h=0;h<u;h++){var c=t.charAt(h);if(!1===a)"<"===c&&(a=h);else if(!1===l){if("<"===c){r+=i(t.slice(s,h));a=h;s=h}else if(">"===c||h===u-1){r+=i(t.slice(s,a));o=t.slice(a,h+1);n=(t=>{var e=oy.spaceIndex(t),e=-1===e?t.slice(1,-1):t.slice(1,e+1);e=oy.trim(e).toLowerCase();"/"===e.slice(0,1)&&(e=e.slice(1));"/"===e.slice(-1)&&(e=e.slice(0,-1));return e})(o);r+=e(a,r.length,n,o,"</"===o.slice(0,2));s=h+1;a=!1}else if('"'===c||"'"===c)for(var d=1,p=t.charAt(h-d);""===p.trim()||"="===p;){if("="===p){l=c;continue t}p=t.charAt(h-++d)}}else c===l&&(l=!1)}s<u&&(r+=i(t.substr(s)));return r};tn.parseAttr=function(t,n){var e=0,i=0,o=[],r=!1,s=t.length;function a(t,e){t=oy.trim(t);t=t.replace(ry,"").toLowerCase();if(!(t.length<1)){var i=n(t,e||"");i&&o.push(i)}}for(var l=0;l<s;l++){var h,u,c=t.charAt(l);if(!1===r&&"="===c){r=t.slice(e,l);e=l+1;i='"'===t.charAt(e)||"'"===t.charAt(e)?e:((t,e)=>{for(;e<t.length;e++){var i=t[e];if(" "!==i)return"'"===i||'"'===i?e:-1}})(t,l+1)}else if(!1!==r&&l===i){u=t.indexOf(c,l+1);if(-1===u)break;h=oy.trim(t.slice(i+1,u));a(r,h);r=!1;l=u;e=l+1}else if(/\s|\n|\t/.test(c)){t=t.replace(/\s|\n|\t/g," ");if(!1===r){u=((t,e)=>{for(;e<t.length;e++){var i=t[e];if(" "!==i)return"="===i?e:-1}})(t,l);if(-1!==u)l=u-1;else{h=oy.trim(t.slice(e,l));a(h);r=!1;e=l+1}}else{u=((t,e)=>{for(;0<e;e--){var i=t[e];if(" "!==i)return"="===i?e:-1}})(t,l-1);if(-1===u){h=oy.trim(t.slice(e,l));h=sy(h);a(r,h);r=!1;e=l+1}}}}e<t.length&&(!1===r?a(t.slice(e)):a(r,sy(oy.trim(t.slice(e)))));return oy.trim(o.join(" "))};var ay=Cv.FilterCSS,ly=b,we=tn,hy=we.parseTag,uy=we.parseAttr,cy=Z;function dy(t){return null==t}function py(t){t=(t=>{var e,i={};for(e in t)i[e]=t[e];return i})(t||{});if(t.stripIgnoreTag){t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time');t.onIgnoreTag=ly.onIgnoreTagStripAll}t.whiteList||t.allowList?t.whiteList=(t=>{var e,i={};for(e in t)Array.isArray(t[e])?i[e.toLowerCase()]=t[e].map(function(t){return t.toLowerCase()}):i[e.toLowerCase()]=t[e];return i})(t.whiteList||t.allowList):t.whiteList=ly.whiteList;t.onTag=t.onTag||ly.onTag;t.onTagAttr=t.onTagAttr||ly.onTagAttr;t.onIgnoreTag=t.onIgnoreTag||ly.onIgnoreTag;t.onIgnoreTagAttr=t.onIgnoreTagAttr||ly.onIgnoreTagAttr;t.safeAttrValue=t.safeAttrValue||ly.safeAttrValue;t.escapeHtml=t.escapeHtml||ly.escapeHtml;this.options=t;if(!1===t.css)this.cssFilter=!1;else{t.css=t.css||{};this.cssFilter=new ay(t.css)}}py.prototype.process=function(t){t=t||"";t=t.toString();if(!t)return"";var e=this.options,u=e.whiteList,c=e.onTag,d=e.onIgnoreTag,p=e.onTagAttr,f=e.onIgnoreTagAttr,m=e.safeAttrValue,g=e.escapeHtml,v=this.cssFilter;e.stripBlankChar&&(t=ly.stripBlankChar(t));e.allowCommentTag||(t=ly.stripCommentTag(t));var i=!1;if(e.stripIgnoreTagBody){i=ly.StripTagBody(e.stripIgnoreTagBody,d);d=i.onIgnoreTag}e=hy(t,function(t,e,o,i,n){var r={sourcePosition:t,position:e,isClosing:n,isWhite:Object.prototype.hasOwnProperty.call(u,o)},s=c(o,i,r);if(!dy(s))return s;if(r.isWhite){if(r.isClosing)return"</"+o+">";var a=(t=>{var e=cy.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};t=cy.trim(t.slice(e+1,-1));e="/"===t[t.length-1];e&&(t=cy.trim(t.slice(0,-1)));return{html:t,closing:e}})(i),l=u[o],h=uy(a.html,function(t,e){var i=-1!==cy.indexOf(l,t),n=p(o,t,e,i);if(!dy(n))return n;if(i)return e=m(o,t,e,v),e?t+'="'+e+'"':t;n=f(o,t,e,i);return dy(n)?void 0:n});i="<"+o;h&&(i+=" "+h);a.closing&&(i+=" /");i+=">";return i}return s=d(o,i,r),dy(s)?g(i):s},g);i&&(e=i.remove(e));return e};var fy,my,Q=py,N=pt,gy=_v,vy=b,yy=tn,by=Q;function wy(t,e){var i=new by(e);return i.process(t)}gy=N.exports=wy;gy.filterXSS=wy;gy.FilterXSS=by;for(fy in vy)gy[fy]=vy[fy];for(my in yy)gy[my]=yy[my];"undefined"!=typeof window&&(window.filterXSS=N.exports);"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=N.exports);var ky=_v;let xy,_y=new Uint8Array(16);let Cy=[];for(let t=0;t<256;++t)Cy.push((t+256).toString(16).slice(1));var no="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Sy={randomUUID:no};function Dy(t,e,i){if(Sy.randomUUID&&!e&&!t)return Sy.randomUUID();t=t||{};var n,o=t.random||(t.rng||function(){if(!xy){xy="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto);if(!xy)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}return xy(_y)})();o[6]=15&o[6]|64;o[8]=63&o[8]|128;if(e){i=i||0;for(let t=0;t<16;++t)e[i+t]=o[t];return e}return t=o,n=0,(Cy[t[n+0]]+Cy[t[n+1]]+Cy[t[n+2]]+Cy[t[n+3]]+"-"+Cy[t[n+4]]+Cy[t[n+5]]+"-"+Cy[t[n+6]]+Cy[t[n+7]]+"-"+Cy[t[n+8]]+Cy[t[n+9]]+"-"+Cy[t[n+10]]+Cy[t[n+11]]+Cy[t[n+12]]+Cy[t[n+13]]+Cy[t[n+14]]+Cy[t[n+15]]).toLowerCase()}function Ty(e,t){var i=Ju(e);if(Jh){var n=Jh(e);t&&(n=M(n).call(n,function(t){return uu(e,t).enumerable})),i.push.apply(i,n)}return i}function Ey(e){for(var t=1;t<arguments.length;t++){var i,n=null!=arguments[t]?arguments[t]:{};t%2?P(i=Ty(Object(n),!0)).call(i,function(t){Su(e,t,n[t])}):wu?Cu(e,wu(n)):P(i=Ty(Object(n))).call(i,function(t){ec(e,t,uu(n,t))})}return e}function Oy(t){var e;if(t)return e=null!=(e=t.idProp)?e:t._idProp,e?B.isDataViewLike(e,t):void 0}var Ay=/^\/?Date\((-?\d+)/i,Iy=/^\d+$/;function Py(e,i){var t;if(void 0!==e){if(null===e)return null;if(!i)return e;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(e);case"number":case"Number":return Qg(e)&&!isNaN(Date.parse(e))?j(e).valueOf():Number(e.valueOf());case"string":case"String":return String(e);case"Date":try{return Py(e,"Moment").toDate()}catch(t){throw t instanceof TypeError?new TypeError("Cannot convert object of type "+iv(e)+" to type "+i):t}case"Moment":if(Zg(e))return j(e);if(e instanceof Date)return j(e.valueOf());if(j.isMoment(e))return j(e);if(Qg(e)){t=Ay.exec(e);if(t)return j(Number(t[1]));t=Iy.exec(e);return t?j(Number(e)):j(e)}throw new TypeError("Cannot convert object of type "+iv(e)+" to type "+i);case"ISODate":if(Zg(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(j.isMoment(e))return e.toDate().toISOString();if(Qg(e))return t=Ay.exec(e),t?new Date(Number(t[1])).toISOString():j(e).format();throw new Error("Cannot convert object of type "+iv(e)+" to type ISODate");case"ASPDate":if(Zg(e))return"/Date("+e+")/";if(e instanceof Date||j.isMoment(e))return"/Date("+e.valueOf()+")/";if(Qg(e))return t=Ay.exec(e),t=(t?new Date(Number(t[1])):new Date(e)).valueOf(),"/Date("+t+")/";throw new Error("Cannot convert object of type "+iv(e)+" to type ASPDate");default:throw new Error("Unknown type ".concat(i))}}}function My(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{start:"Date",end:"Date"},i=e._idProp,o=new B.DataSet({fieldId:i}),r=ju(t=B.createNewDataPipeFrom(e)).call(t,function(i){var t;return Ku(t=Ju(i)).call(t,function(t,e){t[e]=Py(i[e],n[e]);return t},{})}).to(o);r.all().start();return{add:function(){var t;return(t=e.getDataSet()).add.apply(t,arguments)},remove:function(){var t;return(t=e.getDataSet()).remove.apply(t,arguments)},update:function(){var t;return(t=e.getDataSet()).update.apply(t,arguments)},updateOnly:function(){var t;return(t=e.getDataSet()).updateOnly.apply(t,arguments)},clear:function(){var t;return(t=e.getDataSet()).clear.apply(t,arguments)},forEach:I(t=P(o)).call(t,o),get:I(t=o.get).call(t,o),getIds:I(t=o.getIds).call(t,o),off:I(t=o.off).call(t,o),on:I(t=o.on).call(t,o),get length(){return o.length},idProp:i,type:n,rawDS:e,coercedDS:o,dispose:function(){return r.stop()}}}function Ny(t){var e=new ky.FilterXSS(t);return function(t){return e.process(t)}}function Fy(t){return t}function Ry(t){var e=$y(Zy(this)),i="",n=Ky(t);if(n<0||n==1/0)throw Qy("Wrong number of repetitions");for(;0<n;(n>>>=1)&&(e+=e))1&n&&(i+=e);return i}function Ly(t){var e=t.repeat;return"string"==typeof t||t===eb||Jy(eb,t)&&e===eb.repeat?tb:e}function jy(t,e){var i=t.length,n=rb(i/2);if(i<8){for(var o,r,s=t,a=e,l=s.length,h=1;h<l;){r=h;o=s[h];for(;r&&0<a(s[r-1],o);)s[r]=s[--r];r!==h++&&(s[r]=o)}return s}for(var u=t,c=jy(ob(t,0,n),e),d=jy(ob(t,n),e),p=e,f=c.length,m=d.length,g=0,v=0;g<f||v<m;)u[g+v]=g<f&&v<m?p(c[g],d[v])<=0?c[g++]:d[v++]:g<f?c[g++]:d[v++];return u}function By(t){var e=t.sort;return t===xb||wb(xb,t)&&e===xb.sort?kb:e}var zy=Ny(),F=Ey(Ey({},ms),{},{convert:Py,setupXSSProtection:function(t){if(t)if(!0===t.disabled){zy=Fy;console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")}else t.filterOptions&&(zy=Ny(t.filterOptions))}}),Hy=(ec(F,"xss",{get:function(){return zy}}),{}),xs={get exports(){return Hy},set exports(t){Hy=t}},y=z,n=e,E=o,Gy=bo,Wy=ht.trim,Yy=E("".charAt),Vy=y.parseFloat,po=y.Symbol,Uy=po&&po.iterator,c=1/Vy("\t\n\v\f\r    \u2028\u2029\ufeff-0")!=-1/0||Uy&&!n(function(){Vy(Object(Uy))}),a=c?function(t){var e=Wy(Gy(t)),i=Vy(e);return 0===i&&"-"==Yy(e,0)?-0:i}:Vy,ps=l,ns=a,gs=(ps({global:!0,forced:parseFloat!=ns},{parseFloat:ns}),r),D=gs.parseFloat,vs=D,$i=vs,Xy=(N=xs,N.exports=$i,t(Hy)),x=(()=>{function i(t,e){g(this,i);this.options=null;this.props=null}Jl(i,[{key:"setOptions",value:function(t){t&&F.extend(this.options,t)}},{key:"redraw",value:function(){return!1}},{key:"destroy",value:function(){}},{key:"_isResized",value:function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;this.props._previousWidth=this.props.width;this.props._previousHeight=this.props.height;return t}}]);return i})(),qy={},T={get exports(){return qy},set exports(t){qy=t}},Ky=Ut,$y=bo,Zy=U,Qy=RangeError,w=l,is=(w({target:"String",proto:!0},{repeat:Ry}),lh),fs=is("String").repeat,Jy=Et,tb=fs,eb=String.prototype,In=Ly,ib=(N=T,N.exports=In,t(qy)),nb={},$n={get exports(){return nb},set exports(t){nb=t}},ob=wo,rb=Math.floor,S=jy,_=s,Ui=_.match(/firefox\/(\d+)/i),d=!!Ui&&+Ui[1],k=s,Ie=/MSIE|Trident/.test(k),v=s,mt=v.match(/AppleWebKit\/(\d+)\./),we=!!mt&&+mt[1],Z=l,pt=o,sb=Pt,ab=Nt,lb=qt,hb=yd,ub=bo,b=e,cb=S,tn=Eh,db=d,pb=Ie,fb=At,mb=we,gb=[],vb=pt(gb.sort),yb=pt(gb.push),Q=b(function(){gb.sort(void 0)}),no=b(function(){gb.sort(null)}),ms=tn("sort"),bb=!b(function(){if(fb)return fb<70;if(!(db&&3<db)){if(pb)return!0;if(mb)return mb<603;for(var t,e,i,n="",o=65;o<76;o++){t=String.fromCharCode(o);switch(o){case 66:case 69:case 70:case 72:e=3;break;case 68:case 71:e=4;break;default:e=2}for(i=0;i<47;i++)gb.push({k:t+i,v:e})}gb.sort(function(t,e){return e.v-t.v});for(i=0;i<gb.length;i++){t=gb[i].k.charAt(0);n.charAt(n.length-1)!==t&&(n+=t)}return"DGBEFHACIJK"!==n}}),ht=Q||!no||!ms||!bb,E=(Z({target:"Array",proto:!0,forced:ht},{sort:function(t){void 0!==t&&sb(t);var e=ab(this);if(bb)return void 0===t?vb(e):vb(e,t);for(var i,n,o=[],r=lb(e),s=0;s<r;s++)s in e&&yb(o,e[s]);cb(o,(n=t,function(t,e){return void 0===e?-1:void 0===t?1:void 0!==n?+n(t,e)||0:ub(t)>ub(e)?1:-1}));i=lb(o);s=0;for(;s<i;)e[s]=o[s++];for(;s<r;)hb(e,s++);return e}}),lh),y=E("Array").sort,wb=Et,kb=y,xb=Array.prototype,po=By,_b=(N=$n,N.exports=po,t(nb));function Cb(t,e,i){if(i&&!A(i))return Cb(t,e,[i]);e.hiddenDates=[];if(i&&1==A(i)){for(var n,o=0;o<i.length;o++)if(void 0===ib(i[o])){var r={};r.start=t(i[o].start).toDate().valueOf();r.end=t(i[o].end).toDate().valueOf();e.hiddenDates.push(r)}_b(n=e.hiddenDates).call(n,function(t,e){return t.start-e.start})}}function Sb(t,e,i){if(i&&!A(i))return Sb(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){Cb(t,e,i);for(var n=t(e.range.start),o=t(e.range.end),r=e.range.end-e.range.start,s=r/e.domProps.centerContainer.width,a=0;a<i.length;a++)if(void 0!==ib(i[a])){var l=t(i[a].start),h=t(i[a].end);if("Invalid Date"==l._d)throw new Error("Supplied start date is not valid: ".concat(i[a].start));if("Invalid Date"==h._d)throw new Error("Supplied end date is not valid: ".concat(i[a].end));var u=h-l;if(4*s<=u){var c=0,d=o.clone();switch(ib(i[a])){case"daily":l.day()!=h.day()&&(c=1);l.dayOfYear(n.dayOfYear());l.year(n.year());l.subtract(7,"days");h.dayOfYear(n.dayOfYear());h.year(n.year());h.subtract(7-c,"days");d.add(1,"weeks");break;case"weekly":var p=h.diff(l,"days"),f=l.day();l.date(n.date());l.month(n.month());l.year(n.year());h=l.clone();l.day(f);h.day(f);h.add(p,"days");l.subtract(1,"weeks");h.subtract(1,"weeks");d.add(1,"weeks");break;case"monthly":l.month()!=h.month()&&(c=1);l.month(n.month());l.year(n.year());l.subtract(1,"months");h.month(n.month());h.year(n.year());h.subtract(1,"months");h.add(c,"months");d.add(1,"months");break;case"yearly":l.year()!=h.year()&&(c=1);l.year(n.year());l.subtract(1,"years");h.year(n.year());h.subtract(1,"years");h.add(c,"years");d.add(1,"years");break;default:console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",ib(i[a]));return}for(;l<d;){e.hiddenDates.push({start:l.valueOf(),end:h.valueOf()});switch(ib(i[a])){case"daily":l.add(1,"days");h.add(1,"days");break;case"weekly":l.add(1,"weeks");h.add(1,"weeks");break;case"monthly":l.add(1,"months");h.add(1,"months");break;case"yearly":l.add(1,"y");h.add(1,"y");break;default:console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",ib(i[a]));return}}e.hiddenDates.push({start:l.valueOf(),end:h.valueOf()})}}Db(e);var r=Rb(e.range.start,e.hiddenDates),m=Rb(e.range.end,e.hiddenDates),g=e.range.start,v=e.range.end;1==r.hidden&&(g=1==e.range.startToFront?r.startDate-1:r.endDate+1);1==m.hidden&&(v=1==e.range.endToFront?m.startDate-1:m.endDate+1);1!=r.hidden&&1!=m.hidden||e.range._applyRange(g,v)}}function Db(t){for(var e,i=t.hiddenDates,n=[],o=0;o<i.length;o++)for(var r=0;r<i.length;r++)if(o!=r&&1!=i[r].remove&&1!=i[o].remove)if(i[r].start>=i[o].start&&i[r].end<=i[o].end)i[r].remove=!0;else if(i[r].start>=i[o].start&&i[r].start<=i[o].end){i[o].end=i[r].end;i[r].remove=!0}else if(i[r].end>=i[o].start&&i[r].end<=i[o].end){i[o].start=i[r].start;i[r].remove=!0}for(o=0;o<i.length;o++)!0!==i[o].remove&&n.push(i[o]);t.hiddenDates=n;_b(e=t.hiddenDates).call(e,function(t,e){return t.start-e.start})}function Tb(t,e,i){for(var n=!1,o=e.current.valueOf(),r=0;r<e.hiddenDates.length;r++){var s=e.hiddenDates[r].start,a=e.hiddenDates[r].end;if(s<=o&&o<a){n=!0;break}}if(1==n&&o<e._end.valueOf()&&o!=i){var l=t(i),h=t(a);l.year()!=h.year()?e.switchedYear=!0:l.month()!=h.month()?e.switchedMonth=!0:l.dayOfYear()!=h.dayOfYear()&&(e.switchedDay=!0);e.current=h}}function Eb(t,e,i){if(0==t.body.hiddenDates.length)o=t.range.conversion(i);else{var n=Rb(e,t.body.hiddenDates),n=(1==n.hidden&&(e=n.startDate),Ab(t.body.hiddenDates,t.range.start,t.range.end));if(e<t.range.start){var o=t.range.conversion(i,n),r=Ib(t.body.hiddenDates,e,o.offset);e=t.options.moment(e).toDate().valueOf();e+=r;return-(o.offset-e.valueOf())*o.scale}if(e>t.range.end){r={start:t.range.start,end:e};e=Pb(t.options.moment,t.body.hiddenDates,r,e)}else e=Pb(t.options.moment,t.body.hiddenDates,t.range,e);o=t.range.conversion(i,n)}return(e.valueOf()-o.offset)*o.scale}function Ob(t,e,i){var n,o;return 0==t.body.hiddenDates.length?(n=t.range.conversion(i),new Date(e/n.scale+n.offset)):(n=Ab(t.body.hiddenDates,t.range.start,t.range.end),n=t.range.end-t.range.start-n,n=n*e/i,o=Nb(t.body.hiddenDates,t.range,n),new Date(o+n+t.range.start))}function Ab(t,e,i){for(var n=0,o=0;o<t.length;o++){var r=t[o].start,s=t[o].end;e<=r&&s<i&&(n+=s-r)}return n}function Ib(t,e,i){for(var n=0,o=0;o<t.length;o++){var r=t[o].start,s=t[o].end;e<=r&&s<=i&&(n+=s-r)}return n}function Pb(t,e,i,n){n=t(n).toDate().valueOf();n-=Mb(t,e,i,n);return n}function Mb(t,e,i,n){var o=0;n=t(n).toDate().valueOf();for(var r=0;r<e.length;r++){var s=e[r].start,a=e[r].end;s>=i.start&&a<i.end&&a<=n&&(o+=a-s)}return o}function Nb(t,e,i){for(var n=0,o=0,r=e.start,s=0;s<t.length;s++){var a=t[s].start,l=t[s].end;if(a>=e.start&&l<e.end){o+=a-r;r=l;if(i<=o)break;n+=l-a}}return n}function Fb(t,e,i,n){var o=Rb(e,t);return 1==o.hidden?i<0?1==n?o.startDate-(o.endDate-e)-1:o.startDate-1:1==n?o.endDate+(e-o.startDate)+1:o.endDate+1:e}function Rb(t,e){for(var i=0;i<e.length;i++){var n=e[i].start,o=e[i].end;if(n<=t&&t<o)return{hidden:!0,startDate:n,endDate:o}}return{hidden:!1,startDate:n,endDate:o}}n=Object.freeze({__proto__:null,convertHiddenOptions:Cb,correctTimeForHidden:Pb,getAccumulatedHiddenDuration:Nb,getHiddenDurationBefore:Mb,getHiddenDurationBeforeStart:Ib,getHiddenDurationBetween:Ab,getIsHidden:Rb,printDates:function(t){for(var e=0;e<t.length;e++)console.log(e,new Date(t[e].start),new Date(t[e].end),t[e].start,t[e].end,t[e].remove)},removeDuplicates:Db,snapAwayFromHidden:Fb,stepOverHiddenDates:Tb,toScreen:Eb,toTime:Ob,updateHiddenDates:Sb});function Lb(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}var jb=(t=>{bh(s,t);var r=Lb(s);function s(t,e){g(this,s);var i=r.call(this),n=Zh().hours(0).minutes(0).seconds(0).milliseconds(0),o=n.clone().add(-3,"days").valueOf(),n=n.clone().add(3,"days").valueOf();i.millisecondsPerPixelCache=void 0;if(void 0===e){i.start=o;i.end=n}else{i.start=e.start||o;i.end=e.end||n}i.rolling=!1;i.body=t;i.deltaDifference=0;i.scaleOffset=0;i.startToFront=!1;i.endToFront=!0;i.defaultOptions={rtl:!1,start:null,end:null,moment:Zh,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}};i.options=F.extend({},i.defaultOptions);i.props={touch:{}};i.animationTimer=null;i.body.emitter.on("panstart",I(o=i._onDragStart).call(o,th(i)));i.body.emitter.on("panmove",I(n=i._onDrag).call(n,th(i)));i.body.emitter.on("panend",I(o=i._onDragEnd).call(o,th(i)));i.body.emitter.on("mousewheel",I(n=i._onMouseWheel).call(n,th(i)));i.body.emitter.on("touch",I(o=i._onTouch).call(o,th(i)));i.body.emitter.on("pinch",I(n=i._onPinch).call(n,th(i)));i.body.dom.rollingModeBtn.addEventListener("click",I(o=i.startRolling).call(o,th(i)));i.setOptions(e);return i}Jl(s,[{key:"setOptions",value:function(t){if(t){F.selectiveExtend(["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","zoomFriction","rtl","showCurrentTime","rollingMode","horizontalScroll"],this.options,t);t.rollingMode&&t.rollingMode.follow&&this.startRolling();("start"in t||"end"in t)&&this.setRange(t.start,t.end)}}},{key:"startRolling",value:function(){var r=this;!function t(){r.stopRolling();r.rolling=!0;var e=r.end-r.start,i=F.convert(new Date,"Date").valueOf(),n=r.options.rollingMode&&r.options.rollingMode.offset||.5,o=i-e*n,i=i+e*(1-n),n=(r.setRange(o,i,{animation:!1}),r.conversion(r.body.domProps.center.width).scale),e=1/n/10;e<30&&(e=30);1e3<e&&(e=1e3);r.body.dom.rollingModeBtn.style.visibility="hidden";r.currentTimeTimer=Hh(t,e)}()}},{key:"stopRolling",value:function(){if(void 0!==this.currentTimeTimer){clearTimeout(this.currentTimeTimer);this.rolling=!1;this.body.dom.rollingModeBtn.style.visibility="visible"}}},{key:"setRange",value:function(t,e,r,s,a){r=r||{};!0!==r.byUser&&(r.byUser=!1);var l=this,h=null!=t?F.convert(t,"Date").valueOf():null,u=null!=e?F.convert(e,"Date").valueOf():null;this._cancelAnimation();this.millisecondsPerPixelCache=void 0;if(r.animation){var c,d,i,p=this.start,f=this.end,m="object"===O(r.animation)&&"duration"in r.animation?r.animation.duration:500,n="object"===O(r.animation)&&"easingFunction"in r.animation?r.animation.easingFunction:"easeInOutQuad",g=F.easingFunctions[n];if(g)return c=Gd(),d=!1,i=function t(){if(!l.props.touch.dragging){var e=Gd(),e=e-c,i=g(e/m),e=m<e,n=e||null===h?h:p+(h-p)*i,o=e||null===u?u:f+(u-f)*i;v=l._applyRange(n,o);Sb(l.options.moment,l.body,l.options.hiddenDates);d=d||v;n={start:new Date(l.start),end:new Date(l.end),byUser:r.byUser,event:r.event};a&&a(i,v,e);v&&l.body.emitter.emit("rangechange",n);if(e){if(d){l.body.emitter.emit("rangechanged",n);if(s)return s()}}else l.animationTimer=Hh(t,20)}},i();throw new Error(Nd(i="Unknown easing function ".concat(Bf(n),". Choose from: ")).call(i,Ju(F.easingFunctions).join(", ")))}var v=this._applyRange(h,u);Sb(this.options.moment,this.body,this.options.hiddenDates);if(v){var o={start:new Date(this.start),end:new Date(this.end),byUser:r.byUser,event:r.event};this.body.emitter.emit("rangechange",o);clearTimeout(l.timeoutID);l.timeoutID=Hh(function(){l.body.emitter.emit("rangechanged",o)},200);if(s)return s()}}},{key:"getMillisecondsPerPixel",value:function(){void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth);return this.millisecondsPerPixelCache}},{key:"_cancelAnimation",value:function(){if(this.animationTimer){clearTimeout(this.animationTimer);this.animationTimer=null}}},{key:"_applyRange",value:function(t,e){var i,n=null!=t?F.convert(t,"Date").valueOf():this.start,o=null!=e?F.convert(e,"Date").valueOf():this.end,r=null!=this.options.max?F.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?F.convert(this.options.min,"Date").valueOf():null;if(isNaN(n)||null===n)throw new Error('Invalid start "'.concat(t,'"'));if(isNaN(o)||null===o)throw new Error('Invalid end "'.concat(e,'"'));o<n&&(o=n);if(null!==s&&n<s){i=s-n;n+=i;o+=i;null!=r&&r<o&&(o=r)}if(null!==r&&r<o){i=o-r;n-=i;o-=i;null!=s&&n<s&&(n=s)}if(null!==this.options.zoomMin){r=Xy(this.options.zoomMin);r<0&&(r=0);if(o-n<r)if(this.end-this.start===r&&n>=this.start-.5&&o<=this.end){n=this.start;o=this.end}else{i=r-(o-n);n-=i/2;o+=i/2}}if(null!==this.options.zoomMax){s=Xy(this.options.zoomMax);s<0&&(s=0);if(s<o-n)if(this.end-this.start===s&&n<this.start&&o>this.end){n=this.start;o=this.end}else{i=o-n-s;n+=i/2;o-=i/2}}r=this.start!=n||this.end!=o;n>=this.start&&n<=this.end||o>=this.start&&o<=this.end||this.start>=n&&this.start<=o||this.end>=n&&this.end<=o||this.body.emitter.emit("checkRangedItems");this.start=n;this.end=o;return r}},{key:"getRange",value:function(){return{start:this.start,end:this.end}}},{key:"conversion",value:function(t,e){return s.conversion(this.start,this.end,t,e)}},{key:"_onDragStart",value:function(t){this.deltaDifference=0;this.previousDelta=0;if(this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging){this.stopRolling();this.props.touch.start=this.start;this.props.touch.end=this.end;this.props.touch.dragging=!0;this.body.dom.root&&(this.body.dom.root.style.cursor="move")}}},{key:"_onDrag",value:function(t){if(t&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction,i=(Bb(e),"horizontal"==e?t.deltaX:t.deltaY),n=(i-=this.deltaDifference,this.props.touch.end-this.props.touch.start),o=Ab(this.body.hiddenDates,this.start,this.end),o=(n-=o,"horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height),e=this.options.rtl?i/o*n:-i/o*n,o=this.props.touch.start+e,n=this.props.touch.end+e,e=Fb(this.body.hiddenDates,o,this.previousDelta-i,!0),r=Fb(this.body.hiddenDates,n,this.previousDelta-i,!0);if(e!=o||r!=n){this.deltaDifference+=i;this.props.touch.start=e;this.props.touch.end=r;this._onDrag(t)}else{this.previousDelta=i;this._applyRange(o,n);e=new Date(this.start),r=new Date(this.end);this.body.emitter.emit("rangechange",{start:e,end:r,byUser:!0,event:t});this.body.emitter.emit("panmove")}}}},{key:"_onDragEnd",value:function(t){if(this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){this.props.touch.dragging=!1;this.body.dom.root&&(this.body.dom.root.style.cursor="auto");this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:t})}}},{key:"_onMouseWheel",value:function(t){var e=0;t.wheelDelta?e=t.wheelDelta/120:t.detail?e=-t.detail/3:t.deltaY&&(e=-t.deltaY/3);if(!(this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){var i=this.options.zoomFriction||5,i=e<0?1-e/i:1/(1+e/i);if(this.rolling)var n=this.options.rollingMode&&this.options.rollingMode.offset||.5,n=this.start+(this.end-this.start)*n;else{var o=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);n=this._pointerToDate(o)}this.zoom(i,n,e,t);t.preventDefault()}}},{key:"_onTouch",value:function(t){this.props.touch.start=this.start;this.props.touch.end=this.end;this.props.touch.allowDragging=!0;this.props.touch.center=null;this.props.touch.centerDate=null;this.scaleOffset=0;this.deltaDifference=0;F.preventDefault(t)}},{key:"_onPinch",value:function(t){if(this.options.zoomable&&this.options.moveable){F.preventDefault(t);this.props.touch.allowDragging=!1;if(!this.props.touch.center){this.props.touch.center=this.getPointer(t.center,this.body.dom.center);this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)}this.stopRolling();var e=1/(t.scale+this.scaleOffset),i=this.props.touch.centerDate,n=Ab(this.body.hiddenDates,this.start,this.end),o=Mb(this.options.moment,this.body.hiddenDates,this,i),n=n-o,o=i-o+(this.props.touch.start-(i-o))*e,i=i+n+(this.props.touch.end-(i+n))*e;this.startToFront=1-e<=0;this.endToFront=e-1<=0;n=Fb(this.body.hiddenDates,o,1-e,!0),e=Fb(this.body.hiddenDates,i,e-1,!0);if(n!=o||e!=i){this.props.touch.start=n;this.props.touch.end=e;this.scaleOffset=1-t.scale;o=n;i=e}n={animation:!1,byUser:!0,event:t};this.setRange(o,i,n);this.startToFront=!1;this.endToFront=!0}}},{key:"_isInsideRange",value:function(t){var e=t.center?t.center.x:t.clientX,i=this.body.dom.centerContainer.getBoundingClientRect(),i=this.options.rtl?e-i.left:i.right-e,e=this.body.util.toTime(i);return e>=this.start&&e<=this.end}},{key:"_pointerToDate",value:function(t){var e=this.options.direction;Bb(e);return"horizontal"==e?this.body.util.toTime(t.x).valueOf():(e=this.body.domProps.center.height,e=this.conversion(e),t.y/e.scale+e.offset)}},{key:"getPointer",value:function(t,e){var i=e.getBoundingClientRect();return this.options.rtl?{x:i.right-t.x,y:t.y-i.top}:{x:t.x-i.left,y:t.y-i.top}}},{key:"zoom",value:function(t,e,i,n){null==e&&(e=(this.start+this.end)/2);var o=Ab(this.body.hiddenDates,this.start,this.end),r=Mb(this.options.moment,this.body.hiddenDates,this,e),o=o-r,r=e-r+(this.start-(e-r))*t,o=e+o+(this.end-(e+o))*t;this.startToFront=!(0<i);this.endToFront=!(0<-i);var s=Fb(this.body.hiddenDates,r,i,!0),a=Fb(this.body.hiddenDates,o,-i,!0);if(s!=r||a!=o){r=s;o=a}s={animation:!1,byUser:!0,event:n};this.setRange(r,o,s);this.startToFront=!1;this.endToFront=!0}},{key:"move",value:function(t){var e=this.end-this.start,i=this.start+e*t,e=this.end+e*t;this.start=i;this.end=e}},{key:"moveTo",value:function(t){var e=(this.start+this.end)/2,e=e-t,i=this.start-e,e=this.end-e;this.setRange(i,e,{animation:!1,byUser:!0,event:null})}}],[{key:"conversion",value:function(t,e,i,n){void 0===n&&(n=0);return 0!=i&&e-t!=0?{offset:t,scale:i/(e-t-n)}:{offset:0,scale:1}}}]);return s})(x);function Bb(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'.concat(t,'". Choose "horizontal" or "vertical".'))}function zb(t){var e=t.some;return t===Vb||Wb(Vb,t)&&e===Vb.some?Yb:e}var Hb={},c={get exports(){return Hb},set exports(t){Hb=t}},a=l,Gb=tr.some,ps=Eh,ns=ps("some"),gs=(a({target:"Array",proto:!0,forced:!ns},{some:function(t){return Gb(this,t,1<arguments.length?arguments[1]:void 0)}}),lh),D=gs("Array").some,Wb=Et,Yb=D,Vb=Array.prototype,vs=zb,Ub=(N=c,N.exports=vs,t(Hb)),Xb={},xs={get exports(){return Xb},set exports(t){Xb=t}},$i=r,w=$i.setInterval,qb=(N=xs,N.exports=w,t(Xb)),Kb=null;fs="undefined"!=typeof window?(is=window.Hammer||C,function n(o,t){var r=t||{preventDefault:!1};if(o.Manager){var s=o,e=function(t,e){var i=Object.create(r);e&&s.assign(i,e);return n(new s(t,i),i)};s.assign(e,s);e.Manager=function(t,e){var i=Object.create(r);e&&s.assign(i,e);return n(new s.Manager(t,i),i)};return e}var a=Object.create(o),e=o.element;e.hammer||(e.hammer=[]);e.hammer.push(a);o.on("hammer.input",function(t){!0!==r.preventDefault&&r.preventDefault!==t.pointerType||t.preventDefault();t.isFirst&&(Kb=t.target)});a._handlers={};a.on=function(t,i){l(t).forEach(function(t){var e=a._handlers[t];if(!e){a._handlers[t]=e=[];o.on(t,h)}e.push(i)});return a};a.off=function(t,i){l(t).forEach(function(t){var e=a._handlers[t];if(e){e=i?e.filter(function(t){return t!==i}):[];if(0<e.length)a._handlers[t]=e;else{o.off(t,h);delete a._handlers[t]}}});return a};a.emit=function(t,e){Kb=e.target;o.emit(t,e)};a.destroy=function(){var t=o.element.hammer,e=t.indexOf(a);-1!==e&&t.splice(e,1);t.length||delete o.element.hammer;a._handlers={};o.destroy()};function l(t){return t.match(/[^ ]+/g)}function h(t){if("hammer.input"!==t.type){t.srcEvent._handled||(t.srcEvent._handled={});if(t.srcEvent._handled[t.type])return;t.srcEvent._handled[t.type]=!0}var e=!1,i=(t.stopPropagation=function(){e=!0},t.srcEvent.stopPropagation.bind(t.srcEvent));"function"==typeof i&&(t.srcEvent.stopPropagation=function(){i();t.stopPropagation()});t.firstTarget=Kb;for(var n=Kb;n&&!e;){var o=n.hammer;if(o)for(var r,s=0;s<o.length;s++){r=o[s]._handlers[t.type];if(r)for(var a=0;a<r.length&&!e;a++)r[a](t)}n=n.parentNode}}return a}(is,{preventDefault:"mouse"})):function(){return{on:e,off:e,destroy:e,emit:e,get:function(t){return{set:e}}};function e(){}};var $b=fs;function Zb(t,e){e.inputHandler=function(t){t.isFirst&&e(t)};t.on("hammer.input",e.inputHandler)}var Qb=(()=>{function r(t,e,i,n,o){g(this,r);this.moment=o&&o.moment||Zh;this.options=o||{};this.current=this.moment();this._start=this.moment();this._end=this.moment();this.autoScale=!0;this.scale="day";this.step=1;this.setRange(t,e,i);this.switchedDay=!1;this.switchedMonth=!1;this.switchedYear=!1;A(n)?this.hiddenDates=n:this.hiddenDates=null!=n?[n]:[];this.format=r.FORMAT}Jl(r,[{key:"setMoment",value:function(t){this.moment=t;this.current=this.moment(this.current.valueOf());this._start=this.moment(this._start.valueOf());this._end=this.moment(this._end.valueOf())}},{key:"setFormat",value:function(t){var e=F.deepExtend({},r.FORMAT);this.format=F.deepExtend(e,t)}},{key:"setRange",value:function(t,e,i){if(!(t instanceof Date&&e instanceof Date))throw"No legal start or end date in method setRange";this._start=null!=t?this.moment(t.valueOf()):Gd();this._end=null!=e?this.moment(e.valueOf()):Gd();this.autoScale&&this.setMinimumStep(i)}},{key:"start",value:function(){this.current=this._start.clone();this.roundToMinor()}},{key:"roundToMinor",value:function(){"week"==this.scale&&this.current.weekday(0);switch(this.scale){case"year":this.current.year(this.step*Math.floor(this.current.year()/this.step));this.current.month(0);case"month":this.current.date(1);case"week":case"day":case"weekday":this.current.hours(0);case"hour":this.current.minutes(0);case"minute":this.current.seconds(0);case"second":this.current.milliseconds(0)}if(1!=this.step){var t=this.current.clone();switch(this.scale){case"millisecond":this.current.subtract(this.current.milliseconds()%this.step,"milliseconds");break;case"second":this.current.subtract(this.current.seconds()%this.step,"seconds");break;case"minute":this.current.subtract(this.current.minutes()%this.step,"minutes");break;case"hour":this.current.subtract(this.current.hours()%this.step,"hours");break;case"weekday":case"day":this.current.subtract((this.current.date()-1)%this.step,"day");break;case"week":this.current.subtract(this.current.week()%this.step,"week");break;case"month":this.current.subtract(this.current.month()%this.step,"month");break;case"year":this.current.subtract(this.current.year()%this.step,"year")}t.isSame(this.current)||(this.current=this.moment(Fb(this.hiddenDates,this.current.valueOf(),-1,!0)))}}},{key:"hasNext",value:function(){return this.current.valueOf()<=this._end.valueOf()}},{key:"next",value:function(){var t=this.current.valueOf();switch(this.scale){case"millisecond":this.current.add(this.step,"millisecond");break;case"second":this.current.add(this.step,"second");break;case"minute":this.current.add(this.step,"minute");break;case"hour":this.current.add(this.step,"hour");this.current.month()<6?this.current.subtract(this.current.hours()%this.step,"hour"):this.current.hours()%this.step!=0&&this.current.add(this.step-this.current.hours()%this.step,"hour");break;case"weekday":case"day":this.current.add(this.step,"day");break;case"week":if(0!==this.current.weekday()){this.current.weekday(0);this.current.add(this.step,"week")}else if(!1===this.options.showMajorLabels)this.current.add(this.step,"week");else{var e=this.current.clone();e.add(1,"week");if(e.isSame(this.current,"month"))this.current.add(this.step,"week");else{this.current.add(this.step,"week");this.current.date(1)}}break;case"month":this.current.add(this.step,"month");break;case"year":this.current.add(this.step,"year")}if(1!=this.step)switch(this.scale){case"millisecond":0<this.current.milliseconds()&&this.current.milliseconds()<this.step&&this.current.milliseconds(0);break;case"second":0<this.current.seconds()&&this.current.seconds()<this.step&&this.current.seconds(0);break;case"minute":0<this.current.minutes()&&this.current.minutes()<this.step&&this.current.minutes(0);break;case"hour":0<this.current.hours()&&this.current.hours()<this.step&&this.current.hours(0);break;case"weekday":case"day":this.current.date()<this.step+1&&this.current.date(1);break;case"week":this.current.week()<this.step&&this.current.week(1);break;case"month":this.current.month()<this.step&&this.current.month(0)}this.current.valueOf()==t&&(this.current=this._end.clone());this.switchedDay=!1;this.switchedMonth=!1;this.switchedYear=!1;Tb(this.moment,this,t)}},{key:"getCurrent",value:function(){return this.current.clone()}},{key:"setScale",value:function(t){if(t&&"string"==typeof t.scale){this.scale=t.scale;this.step=0<t.step?t.step:1;this.autoScale=!1}}},{key:"setAutoScale",value:function(t){this.autoScale=t}},{key:"setMinimumStep",value:function(t){if(null!=t){var e=31104e6;if(t<31104e9){this.scale="year";this.step=1e3}if(t<15552e9){this.scale="year";this.step=500}if(t<31104e8){this.scale="year";this.step=100}if(t<50*e){this.scale="year";this.step=50}if(t<10*e){this.scale="year";this.step=10}if(t<5*e){this.scale="year";this.step=5}if(t<e){this.scale="year";this.step=1}if(t<7776e6){this.scale="month";this.step=3}if(t<2592e6){this.scale="month";this.step=1}if(t<6048e5&&this.options.showWeekScale){this.scale="week";this.step=1}if(t<1728e5){this.scale="day";this.step=2}if(t<864e5){this.scale="day";this.step=1}if(t<432e5){this.scale="weekday";this.step=1}if(t<144e5){this.scale="hour";this.step=4}if(t<36e5){this.scale="hour";this.step=1}if(t<9e5){this.scale="minute";this.step=15}if(t<6e5){this.scale="minute";this.step=10}if(t<3e5){this.scale="minute";this.step=5}if(t<6e4){this.scale="minute";this.step=1}if(t<15e3){this.scale="second";this.step=15}if(t<1e4){this.scale="second";this.step=10}if(t<5e3){this.scale="second";this.step=5}if(t<1e3){this.scale="second";this.step=1}if(t<200){this.scale="millisecond";this.step=200}if(t<100){this.scale="millisecond";this.step=100}if(t<50){this.scale="millisecond";this.step=50}if(t<10){this.scale="millisecond";this.step=10}if(t<5){this.scale="millisecond";this.step=5}if(t<1){this.scale="millisecond";this.step=1}}}},{key:"isMajor",value:function(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return this.options.showWeekScale?1==t.isoWeekday():1==t.date();case"week":return 1==t.date();case"month":return 0==t.month();default:return!1}}},{key:"getLabelMinor",value:function(t){null==t&&(t=this.current);t instanceof Date&&(t=this.moment(t));var e;return"function"==typeof this.format.minorLabels?this.format.minorLabels(t,this.scale,this.step):(e=this.format.minorLabels[this.scale],("week"!==this.scale||1!==t.date()||0===t.weekday())&&e&&0<e.length?this.moment(t).format(e):"")}},{key:"getLabelMajor",value:function(t){null==t&&(t=this.current);t instanceof Date&&(t=this.moment(t));var e;return"function"==typeof this.format.majorLabels?this.format.majorLabels(t,this.scale,this.step):(e=this.format.majorLabels[this.scale],e&&0<e.length?this.moment(t).format(e):"")}},{key:"getClassName",value:function(){var t,e,i=this.moment,n=this.moment(this.current),o=n.locale?n.locale("en"):n.lang("en"),r=this.step,s=[];function a(t){return t/r%2==0?" vis-even":" vis-odd"}function l(t){return t.isSame(Gd(),"day")?" vis-today":t.isSame(i().add(1,"day"),"day")?" vis-tomorrow":t.isSame(i().add(-1,"day"),"day")?" vis-yesterday":""}function h(t){return t.isSame(Gd(),"week")?" vis-current-week":""}function u(t){return t.isSame(Gd(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":s.push(l(o));s.push(a(o.milliseconds()));break;case"second":s.push(l(o));s.push(a(o.seconds()));break;case"minute":s.push(l(o));s.push(a(o.minutes()));break;case"hour":s.push(Nd(t="vis-h".concat(o.hours())).call(t,4==this.step?"-h"+(o.hours()+4):""));s.push(l(o));s.push(a(o.hours()));break;case"weekday":s.push("vis-".concat(o.format("dddd").toLowerCase()));s.push(l(o));s.push(h(o));s.push(a(o.date()));break;case"day":s.push("vis-day".concat(o.date()));s.push("vis-".concat(o.format("MMMM").toLowerCase()));s.push(l(o));s.push(u(o));s.push(this.step<=2?l(o):"");s.push(this.step<=2?"vis-".concat(o.format("dddd").toLowerCase()):"");s.push(a(o.date()-1));break;case"week":s.push("vis-week".concat(o.format("w")));s.push(h(o));s.push(a(o.week()));break;case"month":s.push("vis-".concat(o.format("MMMM").toLowerCase()));s.push(u(o));s.push(a(o.month()));break;case"year":s.push("vis-year".concat(o.year()));s.push((e=o,e.isSame(Gd(),"year")?" vis-current-year":""));s.push(a(o.year()))}return M(s).call(s,String).join(" ")}}],[{key:"snap",value:function(t,e,i){var n=Zh(t);if("year"==e){var o=n.year()+Math.round(n.month()/12);n.year(Math.round(o/i)*i);n.month(0);n.date(0);n.hours(0);n.minutes(0);n.seconds(0);n.milliseconds(0)}else if("month"==e){if(15<n.date()){n.date(1);n.add(1,"month")}else n.date(1);n.hours(0);n.minutes(0);n.seconds(0);n.milliseconds(0)}else if("week"==e){if(2<n.weekday()){n.weekday(0);n.add(1,"week")}else n.weekday(0);n.hours(0);n.minutes(0);n.seconds(0);n.milliseconds(0)}else if("day"==e){switch(i){case 5:case 2:n.hours(24*Math.round(n.hours()/24));break;default:n.hours(12*Math.round(n.hours()/12))}n.minutes(0);n.seconds(0);n.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:n.hours(12*Math.round(n.hours()/12));break;default:n.hours(6*Math.round(n.hours()/6))}n.minutes(0);n.seconds(0);n.milliseconds(0)}else if("hour"==e){4===i?n.minutes(60*Math.round(n.minutes()/60)):n.minutes(30*Math.round(n.minutes()/30));n.seconds(0);n.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:n.minutes(5*Math.round(n.minutes()/5));n.seconds(0);break;case 5:n.seconds(60*Math.round(n.seconds()/60));break;default:n.seconds(30*Math.round(n.seconds()/30))}n.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:n.seconds(5*Math.round(n.seconds()/5));n.milliseconds(0);break;case 5:n.milliseconds(1e3*Math.round(n.milliseconds()/1e3));break;default:n.milliseconds(500*Math.round(n.milliseconds()/500))}else if("millisecond"==e){o=5<i?i/2:1;n.milliseconds(Math.round(n.milliseconds()/o)*o)}return n}}]);return r})();Qb.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}};function Jb(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}var t0=(t=>{bh(o,t);var n=Jb(o);function o(t,e){var i;g(this,o);i=n.call(this);i.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}};i.props={range:{start:0,end:0,minimumStep:0},lineTop:0};i.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:F.extend({},Qb.FORMAT),moment:Zh,timeAxis:null};i.options=F.extend({},i.defaultOptions);i.body=t;i._create();i.setOptions(e);return i}Jl(o,[{key:"setOptions",value:function(t){if(t){F.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t);F.selectiveDeepExtend(["format"],this.options,t);"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===O(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis));"locale"in t&&("function"==typeof Zh.locale?Zh.locale(t.locale):Zh.lang(t.locale))}}},{key:"_create",value:function(){this.dom.foreground=document.createElement("div");this.dom.background=document.createElement("div");this.dom.foreground.className="vis-time-axis vis-foreground";this.dom.background.className="vis-time-axis vis-background"}},{key:"destroy",value:function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground);this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background);this.body=null}},{key:"redraw",value:function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,n="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,o=e.parentNode!==n,r=(this._calculateCharSize(),this.options.showMinorLabels&&"none"!==this.options.orientation.axis),s=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=r?t.minorCharHeight:0;t.majorLabelHeight=s?t.majorCharHeight:0;t.height=t.minorLabelHeight+t.majorLabelHeight;t.width=e.offsetWidth;t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom:this.body.domProps.top).height;t.minorLineWidth=1;t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight;t.majorLineWidth=1;r=e.nextSibling,s=i.nextSibling;e.parentNode&&e.parentNode.removeChild(e);i.parentNode&&i.parentNode.removeChild(i);e.style.height="".concat(this.props.height,"px");this._repaintLabels();r?n.insertBefore(e,r):n.appendChild(e);s?this.body.dom.backgroundVertical.insertBefore(i,s):this.body.dom.backgroundVertical.appendChild(i);return this._isResized()||o}},{key:"_repaintLabels",value:function(){var t=this.options.orientation.axis,e=F.convert(this.body.range.start,"Number"),i=F.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),n=n-Mb(this.options.moment,this.body.hiddenDates,this.body.range,n),o=(n-=this.body.util.toTime(0).valueOf(),new Qb(new Date(e),new Date(i),n,this.body.hiddenDates,this.options));o.setMoment(this.options.moment);this.options.format&&o.setFormat(this.options.format);this.options.timeAxis&&o.setScale(this.options.timeAxis);this.step=o;var r,s,a,l,h,e=this.dom;e.redundant.lines=e.lines;e.redundant.majorTexts=e.majorTexts;e.redundant.minorTexts=e.minorTexts;e.lines=[];e.majorTexts=[];e.minorTexts=[];var u,c,d,p=0,f=void 0,m=0;o.start();s=o.getCurrent();l=this.body.util.toScreen(s);for(;o.hasNext()&&m<1e3;){m++;h=o.isMajor();d=o.getClassName();r=s;a=l;o.next();s=o.getCurrent();l=this.body.util.toScreen(s);u=p;p=l-a;u="week"===o.scale||.4*u<=p;if(this.options.showMinorLabels&&u){var g=this._repaintMinorText(a,o.getLabelMinor(r),t,d);g.style.width="".concat(p,"px")}if(h&&this.options.showMajorLabels){if(0<a){null==f&&(f=a);g=this._repaintMajorText(a,o.getLabelMajor(r),t,d)}c=this._repaintMajorLine(a,p,t,d)}else u?c=this._repaintMinorLine(a,p,t,d):c&&(c.style.width="".concat(gf(c.style.width)+p,"px"))}if(1e3===m&&!e0){console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(1e3," lines."));e0=!0}if(this.options.showMajorLabels){i=this.body.util.toTime(0),n=o.getLabelMajor(i),e=n.length*(this.props.majorCharWidth||10)+10;(null==f||e<f)&&this._repaintMajorText(0,n,t,d)}P(F).call(F,this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})}},{key:"_repaintMinorText",value:function(t,e,i,n){var o=this.dom.redundant.minorTexts.shift();if(!o){var r=document.createTextNode(""),o=document.createElement("div");o.appendChild(r);this.dom.foreground.appendChild(o)}this.dom.minorTexts.push(o);o.innerHTML=F.xss(e);r="top"==i?this.props.majorLabelHeight:0;this._setXY(o,t,r);o.className="vis-text vis-minor ".concat(n);return o}},{key:"_repaintMajorText",value:function(t,e,i,n){var o=this.dom.redundant.majorTexts.shift();if(!o){var r=document.createElement("div"),o=document.createElement("div");o.appendChild(r);this.dom.foreground.appendChild(o)}o.childNodes[0].innerHTML=F.xss(e);o.className="vis-text vis-major ".concat(n);r="top"==i?0:this.props.minorLabelHeight;this._setXY(o,t,r);this.dom.majorTexts.push(o);return o}},{key:"_setXY",value:function(t,e,i){var n=this.options.rtl?-1*e:e;t.style.transform=Nd(n="translate(".concat(n,"px, ")).call(n,i,"px)")}},{key:"_repaintMinorLine",value:function(t,e,i,n){var o=this.dom.redundant.lines.shift();if(!o){o=document.createElement("div");this.dom.background.appendChild(o)}this.dom.lines.push(o);var r=this.props;o.style.width="".concat(e,"px");o.style.height="".concat(r.minorLineHeight,"px");var s="top"==i?r.majorLabelHeight:this.body.domProps.top.height,r=t-r.minorLineWidth/2;this._setXY(o,r,s);o.className=Nd(r="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-minor ")).call(r,n);return o}},{key:"_repaintMajorLine",value:function(t,e,i,n){var o=this.dom.redundant.lines.shift();if(!o){o=document.createElement("div");this.dom.background.appendChild(o)}this.dom.lines.push(o);var r=this.props;o.style.width="".concat(e,"px");o.style.height="".concat(r.majorLineHeight,"px");var s="top"==i?0:this.body.domProps.top.height,r=t-r.majorLineWidth/2;this._setXY(o,r,s);o.className=Nd(r="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-major ")).call(r,n);return o}},{key:"_calculateCharSize",value:function(){if(!this.dom.measureCharMinor){this.dom.measureCharMinor=document.createElement("DIV");this.dom.measureCharMinor.className="vis-text vis-minor vis-measure";this.dom.measureCharMinor.style.position="absolute";this.dom.measureCharMinor.appendChild(document.createTextNode("0"));this.dom.foreground.appendChild(this.dom.measureCharMinor)}this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight;this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth;if(!this.dom.measureCharMajor){this.dom.measureCharMajor=document.createElement("DIV");this.dom.measureCharMajor.className="vis-text vis-major vis-measure";this.dom.measureCharMajor.style.position="absolute";this.dom.measureCharMajor.appendChild(document.createTextNode("0"));this.dom.foreground.appendChild(this.dom.measureCharMajor)}this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight;this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth}}]);return o})(x),e0=!1;function i0(t){for(var o=t&&t.preventDefault||!1,e=t&&t.container||window,n={},s={keydown:{},keyup:{}},a={},i=97;i<=122;i++)a[String.fromCharCode(i)]={code:i-97+65,shift:!1};for(i=65;i<=90;i++)a[String.fromCharCode(i)]={code:i,shift:!0};for(i=0;i<=9;i++)a[""+i]={code:48+i,shift:!1};for(i=1;i<=12;i++)a["F"+i]={code:111+i,shift:!1};for(i=0;i<=9;i++)a["num"+i]={code:96+i,shift:!1};a["num*"]={code:106,shift:!1};a["num+"]={code:107,shift:!1};a["num-"]={code:109,shift:!1};a["num/"]={code:111,shift:!1};a["num."]={code:110,shift:!1};a.left={code:37,shift:!1};a.up={code:38,shift:!1};a.right={code:39,shift:!1};a.down={code:40,shift:!1};a.space={code:32,shift:!1};a.enter={code:13,shift:!1};a.shift={code:16,shift:void 0};a.esc={code:27,shift:!1};a.backspace={code:8,shift:!1};a.tab={code:9,shift:!1};a.ctrl={code:17,shift:!1};a.alt={code:18,shift:!1};a.delete={code:46,shift:!1};a.pageup={code:33,shift:!1};a.pagedown={code:34,shift:!1};a["="]={code:187,shift:!1};a["-"]={code:189,shift:!1};a["]"]={code:221,shift:!1};a["["]={code:219,shift:!1};function r(t){h(t,"keydown")}function l(t){h(t,"keyup")}function h(t,e){if(void 0!==s[e][t.keyCode]){for(var i=s[e][t.keyCode],n=0;n<i.length;n++)(void 0===i[n].shift||1==i[n].shift&&1==t.shiftKey||0==i[n].shift&&0==t.shiftKey)&&i[n].fn(t);1==o&&t.preventDefault()}}n.bind=function(t,e,i){void 0===i&&(i="keydown");if(void 0===a[t])throw new Error("unsupported key: "+t);void 0===s[i][a[t].code]&&(s[i][a[t].code]=[]);s[i][a[t].code].push({fn:e,shift:a[t].shift})};n.bindAll=function(t,e){void 0===e&&(e="keydown");for(var i in a)a.hasOwnProperty(i)&&n.bind(i,t,e)};n.getKey=function(t){for(var e in a)if(a.hasOwnProperty(e)){if(1==t.shiftKey&&1==a[e].shift&&t.keyCode==a[e].code)return e;if(0==t.shiftKey&&0==a[e].shift&&t.keyCode==a[e].code)return e;if(t.keyCode==a[e].code&&"shift"==e)return e}return"unknown key, currently not supported"};n.unbind=function(t,e,i){void 0===i&&(i="keydown");if(void 0===a[t])throw new Error("unsupported key: "+t);if(void 0!==e){var n=[],o=s[i][a[t].code];if(void 0!==o)for(var r=0;r<o.length;r++)o[r].fn==e&&o[r].shift==a[t].shift||n.push(s[i][a[t].code][r]);s[i][a[t].code]=n}else s[i][a[t].code]=[]};n.reset=function(){s={keydown:{},keyup:{}}};n.destroy=function(){s={keydown:{},keyup:{}};e.removeEventListener("keydown",r,!0);e.removeEventListener("keyup",l,!0)};e.addEventListener("keydown",r,!0);e.addEventListener("keyup",l,!0);return n}function n0(e){this.active=!1;this.dom={container:e};this.dom.overlay=document.createElement("div");this.dom.overlay.className="vis-overlay";this.dom.container.appendChild(this.dom.overlay);this.hammer=$b(this.dom.overlay);this.hammer.on("tap",I(t=this._onTapOverlay).call(t,this));var i=this,t=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];P(t).call(t,function(t){i.hammer.on(t,function(t){t.stopPropagation()})});if(document&&document.body){this.onClick=function(t){((t,e)=>{for(;t;){if(t===e)return 1;t=t.parentNode}})(t.target,e)||i.deactivate()};document.body.addEventListener("click",this.onClick)}void 0!==this.keycharm&&this.keycharm.destroy();this.keycharm=i0();this.escListener=I(t=this.deactivate).call(t,this)}h(n0.prototype);n0.current=null;n0.prototype.destroy=function(){this.deactivate();this.dom.overlay.parentNode.removeChild(this.dom.overlay);this.onClick&&document.body.removeEventListener("click",this.onClick);void 0!==this.keycharm&&this.keycharm.destroy();this.keycharm=null;this.hammer.destroy();this.hammer=null};n0.prototype.activate=function(){var t;n0.current&&n0.current.deactivate();n0.current=this;this.active=!0;this.dom.overlay.style.display="none";F.addClassName(this.dom.container,"vis-active");this.emit("change");this.emit("activate");I(t=this.keycharm).call(t,"esc",this.escListener)};n0.prototype.deactivate=function(){n0.current===this&&(n0.current=null);this.active=!1;this.dom.overlay.style.display="";F.removeClassName(this.dom.container,"vis-active");this.keycharm.unbind("esc",this.escListener);this.emit("change");this.emit("deactivate")};n0.prototype._onTapOverlay=function(t){this.activate();t.stopPropagation()};var T={current:"current",time:"time",deleteSelected:"Delete selected"},In=T,_=T,Ui={current:"attuale",time:"tempo",deleteSelected:"Cancella la selezione"},k=Ui,s=Ui,v={current:"huidige",time:"tijd",deleteSelected:"Selectie verwijderen"},mt=v,S=v,d={current:"Aktuelle",time:"Zeit",deleteSelected:"Lösche Auswahl"},Ie=d,At={current:"actuel",time:"heure",deleteSelected:"Effacer la selection"},we=At,pt=At,tn=At,b={current:"corriente",time:"hora",deleteSelected:"Eliminar selección"},Q=b,no={current:"поточний",time:"час",deleteSelected:"Видалити обране"},ms=no,Z={current:"текущее",time:"время",deleteSelected:"Удалить выбранное"},ht=Z,E={current:"aktualny",time:"czas",deleteSelected:"Usuń wybrane"},y=E,$n={current:"atual",time:"data",deleteSelected:"Apagar selecionado"},po=$n,ps=$n,a={current:"現在",time:"時刻",deleteSelected:"選択されたものを削除"},ns=a,gs={current:"nuvarande",time:"tid",deleteSelected:"Radera valda"},D=gs,c={current:"nåværende",time:"tid",deleteSelected:"Slett valgte"},vs=c,$i=c,xs=c,w={current:"einamas",time:"laikas",deleteSelected:"Pašalinti pasirinktą"},C=w,o0={en:T,en_EN:In,en_US:_,it:Ui,it_IT:k,it_CH:s,nl:v,nl_NL:mt,nl_BE:S,de:d,de_DE:Ie,fr:At,fr_FR:we,fr_CA:pt,fr_BE:tn,es:b,es_ES:Q,uk:no,uk_UA:ms,ru:Z,ru_RU:ht,pl:E,pl_PL:y,pt:$n,pt_BR:po,pt_PT:ps,ja:a,ja_JP:ns,lt:w,lt_LT:C,sv:gs,sv_SE:D,nb:c,nn:$i,nb_NO:vs,nn_NO:xs};function r0(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}var s0=(t=>{bh(s,t);var r=r0(s);function s(t,e){var i,n;g(this,s);n=r.call(this);n.body=t;n.defaultOptions={moment:Zh,locales:o0,locale:"en",id:void 0,title:void 0};n.options=F.extend({},n.defaultOptions);n.setOptions(e);n.options.locales=F.extend({},o0,n.options.locales);var o=n.defaultOptions.locales[n.defaultOptions.locale];P(i=Ju(n.options.locales)).call(i,function(t){n.options.locales[t]=F.extend({},o,n.options.locales[t])});e&&null!=e.time?n.customTime=e.time:n.customTime=new Date;n.eventParams={};n._create();return n}Jl(s,[{key:"setOptions",value:function(t){t&&F.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,t)}},{key:"_create",value:function(){var t=document.createElement("div");t["custom-time"]=this;t.className="vis-custom-time ".concat(this.options.id||"");t.style.position="absolute";t.style.top="0px";t.style.height="100%";this.bar=t;var e=document.createElement("div");e.style.position="relative";e.style.top="0px";this.options.rtl?e.style.right="-10px":e.style.left="-10px";e.style.height="100%";e.style.width="20px";function i(t){this.body.range._onMouseWheel(t)}if(e.addEventListener){e.addEventListener("mousewheel",I(i).call(i,this),!1);e.addEventListener("DOMMouseScroll",I(i).call(i,this),!1)}else e.attachEvent("onmousewheel",I(i).call(i,this));t.appendChild(e);this.hammer=new $b(e);this.hammer.on("panstart",I(t=this._onDragStart).call(t,this));this.hammer.on("panmove",I(e=this._onDrag).call(e,this));this.hammer.on("panend",I(t=this._onDragEnd).call(t,this));this.hammer.get("pan").set({threshold:5,direction:$b.DIRECTION_ALL});this.hammer.get("press").set({time:1e4})}},{key:"destroy",value:function(){this.hide();this.hammer.destroy();this.hammer=null;this.body=null}},{key:"redraw",value:function(){var t=this.body.dom.backgroundVertical;if(this.bar.parentNode!=t){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar);t.appendChild(this.bar)}var t=this.body.util.toScreen(this.customTime),e=this.options.locales[this.options.locale];if(!e){if(!this.warned){console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization"));this.warned=!0}e=this.options.locales.en}var i=this.options.title;if(void 0===i){i=Nd(e="".concat(e.time,": ")).call(e,this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss"));i=i.charAt(0).toUpperCase()+i.substring(1)}else"function"==typeof i&&(i=i.call(this,this.customTime));this.options.rtl?this.bar.style.right="".concat(t,"px"):this.bar.style.left="".concat(t,"px");this.bar.title=i;return!1}},{key:"hide",value:function(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}},{key:"setCustomTime",value:function(t){this.customTime=F.convert(t,"Date");this.redraw()}},{key:"getCustomTime",value:function(){return new Date(this.customTime.valueOf())}},{key:"setCustomMarker",value:function(t,e){var i,n=document.createElement("div");n.className="vis-custom-time-marker";n.innerHTML=F.xss(t);n.style.position="absolute";if(e){n.setAttribute("contenteditable","true");n.addEventListener("pointerdown",function(){n.focus()});n.addEventListener("input",I(i=this._onMarkerChange).call(i,this));n.title=t;n.addEventListener("blur",I(i=function(t){if(this.title!=t.target.innerHTML){this._onMarkerChanged(t);this.title=t.target.innerHTML}}).call(i,this))}this.bar.appendChild(n)}},{key:"setCustomTitle",value:function(t){this.options.title=t}},{key:"_onDragStart",value:function(t){this.eventParams.dragging=!0;this.eventParams.customTime=this.customTime;t.stopPropagation()}},{key:"_onDrag",value:function(t){if(this.eventParams.dragging){var e=this.options.rtl?-1*t.deltaX:t.deltaX,e=this.body.util.toScreen(this.eventParams.customTime)+e,e=this.body.util.toTime(e),i=this.body.util.getScale(),n=this.body.util.getStep(),o=this.options.snap,o=o?o(e,i,n):e;this.setCustomTime(o);this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t});t.stopPropagation()}}},{key:"_onDragEnd",value:function(t){if(this.eventParams.dragging){this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t});t.stopPropagation()}}},{key:"_onMarkerChange",value:function(t){this.body.emitter.emit("markerchange",{id:this.options.id,title:t.target.innerHTML,event:t});t.stopPropagation()}},{key:"_onMarkerChanged",value:function(t){this.body.emitter.emit("markerchanged",{id:this.options.id,title:t.target.innerHTML,event:t});t.stopPropagation()}}],[{key:"customTimeFromTarget",value:function(t){for(var e=t.target;e;){if(e.hasOwnProperty("custom-time"))return e["custom-time"];e=e.parentNode}return null}}]);return s})(x),a0=(()=>{function t(){g(this,t)}Jl(t,[{key:"_create",value:function(t){var e=this;this.dom={};this.dom.container=t;this.dom.container.style.position="relative";this.dom.root=document.createElement("div");this.dom.background=document.createElement("div");this.dom.backgroundVertical=document.createElement("div");this.dom.backgroundHorizontal=document.createElement("div");this.dom.centerContainer=document.createElement("div");this.dom.leftContainer=document.createElement("div");this.dom.rightContainer=document.createElement("div");this.dom.center=document.createElement("div");this.dom.left=document.createElement("div");this.dom.right=document.createElement("div");this.dom.top=document.createElement("div");this.dom.bottom=document.createElement("div");this.dom.shadowTop=document.createElement("div");this.dom.shadowBottom=document.createElement("div");this.dom.shadowTopLeft=document.createElement("div");this.dom.shadowBottomLeft=document.createElement("div");this.dom.shadowTopRight=document.createElement("div");this.dom.shadowBottomRight=document.createElement("div");this.dom.rollingModeBtn=document.createElement("div");this.dom.loadingScreen=document.createElement("div");this.dom.root.className="vis-timeline";this.dom.background.className="vis-panel vis-background";this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical";this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal";this.dom.centerContainer.className="vis-panel vis-center";this.dom.leftContainer.className="vis-panel vis-left";this.dom.rightContainer.className="vis-panel vis-right";this.dom.top.className="vis-panel vis-top";this.dom.bottom.className="vis-panel vis-bottom";this.dom.left.className="vis-content";this.dom.center.className="vis-content";this.dom.right.className="vis-content";this.dom.shadowTop.className="vis-shadow vis-top";this.dom.shadowBottom.className="vis-shadow vis-bottom";this.dom.shadowTopLeft.className="vis-shadow vis-top";this.dom.shadowBottomLeft.className="vis-shadow vis-bottom";this.dom.shadowTopRight.className="vis-shadow vis-top";this.dom.shadowBottomRight.className="vis-shadow vis-bottom";this.dom.rollingModeBtn.className="vis-rolling-mode-btn";this.dom.loadingScreen.className="vis-loading-screen";this.dom.root.appendChild(this.dom.background);this.dom.root.appendChild(this.dom.backgroundVertical);this.dom.root.appendChild(this.dom.backgroundHorizontal);this.dom.root.appendChild(this.dom.centerContainer);this.dom.root.appendChild(this.dom.leftContainer);this.dom.root.appendChild(this.dom.rightContainer);this.dom.root.appendChild(this.dom.top);this.dom.root.appendChild(this.dom.bottom);this.dom.root.appendChild(this.dom.rollingModeBtn);this.dom.centerContainer.appendChild(this.dom.center);this.dom.leftContainer.appendChild(this.dom.left);this.dom.rightContainer.appendChild(this.dom.right);this.dom.centerContainer.appendChild(this.dom.shadowTop);this.dom.centerContainer.appendChild(this.dom.shadowBottom);this.dom.leftContainer.appendChild(this.dom.shadowTopLeft);this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft);this.dom.rightContainer.appendChild(this.dom.shadowTopRight);this.dom.rightContainer.appendChild(this.dom.shadowBottomRight);this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0};this.on("rangechange",function(){!0===e.initialDrawDone&&e._redraw()});this.on("rangechanged",function(){e.initialRangeChangeDone||(e.initialRangeChangeDone=!0)});this.on("touch",I(n=this._onTouch).call(n,this));this.on("panmove",I(n=this._onDrag).call(n,this));var i=this;this._origRedraw=I(n=this._redraw).call(n,this);this._redraw=F.throttle(this._origRedraw);this.on("_change",function(t){i.itemSet&&i.itemSet.initialItemSetDrawn&&t&&1==t.queue?i._redraw():i._origRedraw()});this.hammer=new $b(this.dom.root);var n=this.hammer.get("pinch").set({enable:!0});n&&(o=n,o.getTouchAction=function(){return["pan-y"]});this.hammer.get("pan").set({threshold:5,direction:$b.DIRECTION_ALL});this.timelineListeners={};n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];P(n).call(n,function(e){function t(t){i.isActive()&&i.emit(e,t)}i.hammer.on(e,t);i.timelineListeners[e]=t});Zb(this.hammer,function(t){i.emit("touch",t)});var o=this.hammer,r=function(t){i.emit("release",t)};r.inputHandler=function(t){t.isFinal&&r(t)};o.on("hammer.input",r.inputHandler);function s(t){this.isActive()&&this.emit("mousewheel",t);var e=0,i=0;"detail"in t&&(i=-1*t.detail);"wheelDelta"in t&&(i=t.wheelDelta);"wheelDeltaY"in t&&(i=t.wheelDeltaY);"wheelDeltaX"in t&&(e=-1*t.wheelDeltaX);if("axis"in t&&t.axis===t.HORIZONTAL_AXIS){e=-1*i;i=0}"deltaY"in t&&(i=-1*t.deltaY);"deltaX"in t&&(e=t.deltaX);if(t.deltaMode)if(1===t.deltaMode){e*=40;i*=40}else{e*=40;i*=800}if(this.options.preferZoom){if(!this.options.zoomKey||t[this.options.zoomKey])return}else if(this.options.zoomKey&&t[this.options.zoomKey])return;if(this.options.verticalScroll||this.options.horizontalScroll)if(this.options.verticalScroll&&Math.abs(i)>=Math.abs(e)){var n=this.props.scrollTop,o=n+i;if(this.isActive()){o=this._setScrollTop(o);if(o!==n){this._redraw();this.emit("scroll",t);t.preventDefault()}}}else if(this.options.horizontalScroll){o=Math.abs(e)>=Math.abs(i)?e:i,n=o/120*(this.range.end-this.range.start)/20,e=this.range.start+n,i=this.range.end+n,o={animation:!1,byUser:!0,event:t};this.range.setRange(e,i,o);t.preventDefault()}}n="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";this.dom.top.addEventListener;this.dom.bottom.addEventListener;this.dom.centerContainer.addEventListener(n,I(s).call(s,this),!1);this.dom.top.addEventListener(n,I(s).call(s,this),!1);this.dom.bottom.addEventListener(n,I(s).call(s,this),!1);function a(t){if(i.options.verticalScroll){t.preventDefault();if(i.isActive()){var e=-t.target.scrollTop;i._setScrollTop(e);i._redraw();i.emit("scrollSide",t)}}}this.dom.left.parentNode.addEventListener("scroll",I(a).call(a,this));this.dom.right.parentNode.addEventListener("scroll",I(a).call(a,this));var l=!1;function h(t){var e;if(t.preventDefault){i.emit("dragover",i.getEventProperties(t));t.preventDefault()}if(-1<Cf(e=t.target.className).call(e,"timeline")&&!l){t.dataTransfer.dropEffect="move";l=!0;return!1}}function u(t){t.preventDefault&&t.preventDefault();t.stopPropagation&&t.stopPropagation();try{var e=JSON.parse(t.dataTransfer.getData("text"));if(!e||!e.content)return}catch(t){return!1}l=!1;t.center={x:t.clientX,y:t.clientY};"item"!==e.target?i.itemSet._onAddItem(t):i.itemSet._onDropObjectOnItem(t);i.emit("drop",i.getEventProperties(t));return!1}this.dom.center.addEventListener("dragover",I(h).call(h,this),!1);this.dom.center.addEventListener("drop",I(u).call(u,this),!1);this.customTimes=[];this.touch={};this.redrawCount=0;this.initialDrawDone=!1;this.initialRangeChangeDone=!1;if(!t)throw new Error("No container provided");t.appendChild(this.dom.root);t.appendChild(this.dom.loadingScreen)}},{key:"setOptions",value:function(e){if(e){F.selectiveExtend(["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","verticalScroll","longSelectPressTime","snap"],this.options,e);this.dom.rollingModeBtn.style.visibility="hidden";if(this.options.rtl){this.dom.container.style.direction="rtl";this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"}this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll");"object"!==O(this.options.orientation)&&(this.options.orientation={item:void 0,axis:void 0});if("orientation"in e)if("string"==typeof e.orientation)this.options.orientation={item:e.orientation,axis:e.orientation};else if("object"===O(e.orientation)){"item"in e.orientation&&(this.options.orientation.item=e.orientation.item);"axis"in e.orientation&&(this.options.orientation.axis=e.orientation.axis)}if("both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new t0(this.body);i.setOptions=function(t){var e=t?F.extend({},t):{};e.orientation="top";t0.prototype.setOptions.call(i,e)};this.components.push(i)}}else if(this.timeAxis2){var t,n=Cf(n=this.components).call(n,this.timeAxis2);-1!==n&&gp(t=this.components).call(t,n,1);this.timeAxis2.destroy();this.timeAxis2=null}"function"==typeof e.drawPoints&&(e.drawPoints={onRender:e.drawPoints});"hiddenDates"in this.options&&Cb(this.options.moment,this.body,this.options.hiddenDates);if("clickToUse"in e)if(e.clickToUse)this.activator||(this.activator=new n0(this.dom.root));else if(this.activator){this.activator.destroy();delete this.activator}this._initAutoResize()}P(t=this.components).call(t,function(t){return t.setOptions(e)});if("configure"in e){this.configurator||(this.configurator=this._createConfigurator());this.configurator.setOptions(e.configure);var o=F.deepExtend({},this.options);P(n=this.components).call(n,function(t){F.deepExtend(o,t.options)});this.configurator.setModuleOptions({global:o})}this._redraw()}},{key:"isActive",value:function(){return!this.activator||this.activator.active}},{key:"destroy",value:function(){var t,e;this.setItems(null);this.setGroups(null);this.off();this._stopAutoResize();this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root);this.dom=null;if(this.activator){this.activator.destroy();delete this.activator}for(e in this.timelineListeners)this.timelineListeners.hasOwnProperty(e)&&delete this.timelineListeners[e];this.timelineListeners=null;this.hammer&&this.hammer.destroy();this.hammer=null;P(t=this.components).call(t,function(t){return t.destroy()});this.body=null}},{key:"setCustomTime",value:function(t,e){var i=M(i=this.customTimes).call(i,function(t){return e===t.options.id});if(0===i.length)throw new Error("No custom time bar found with id ".concat(Bf(e)));0<i.length&&i[0].setCustomTime(t)}},{key:"getCustomTime",value:function(e){var t=M(t=this.customTimes).call(t,function(t){return t.options.id===e});if(0===t.length)throw new Error("No custom time bar found with id ".concat(Bf(e)));return t[0].getCustomTime()}},{key:"setCustomTimeMarker",value:function(t,e,i){var n=M(n=this.customTimes).call(n,function(t){return t.options.id===e});if(0===n.length)throw new Error("No custom time bar found with id ".concat(Bf(e)));0<n.length&&n[0].setCustomMarker(t,i)}},{key:"setCustomTimeTitle",value:function(t,e){var i=M(i=this.customTimes).call(i,function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id ".concat(Bf(e)));if(0<i.length)return i[0].setCustomTitle(t)}},{key:"getEventProperties",value:function(t){return{event:t}}},{key:"addCustomTime",value:function(t,e){var i=void 0!==t?F.convert(t,"Date"):new Date,n=Ub(n=this.customTimes).call(n,function(t){return t.options.id===e});if(n)throw new Error("A custom time with id ".concat(Bf(e)," already exists"));n=new s0(this.body,F.extend({},this.options,{time:i,id:e,snap:(this.itemSet||this).options.snap}));this.customTimes.push(n);this.components.push(n);this._redraw();return e}},{key:"removeCustomTime",value:function(e){var i=this,t=M(t=this.customTimes).call(t,function(t){return t.options.id===e});if(0===t.length)throw new Error("No custom time bar found with id ".concat(Bf(e)));P(t).call(t,function(t){var e;gp(e=i.customTimes).call(e,Cf(e=i.customTimes).call(e,t),1);gp(e=i.components).call(e,Cf(e=i.components).call(e,t),1);t.destroy()})}},{key:"getVisibleItems",value:function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}},{key:"getItemsAtCurrentTime",value:function(t){this.time=t;return this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}},{key:"getVisibleGroups",value:function(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}},{key:"fit",value:function(t,e){var i=this.getDataRange();if(null!==i.min||null!==i.max){var n=i.max-i.min,o=new Date(i.min.valueOf()-.01*n),i=new Date(i.max.valueOf()+.01*n),n=!t||void 0===t.animation||t.animation;this.range.setRange(o,i,{animation:n},e)}}},{key:"getDataRange",value:function(){throw new Error("Cannot invoke abstract method getDataRange")}},{key:"setWindow",value:function(t,e,i,n){if("function"==typeof arguments[2]){n=arguments[2];i={}}var o,r;if(1==arguments.length){r=t;o=void 0===r.animation||r.animation;this.range.setRange(r.start,r.end,{animation:o})}else if(2==arguments.length&&"function"==typeof e){r=t;n=e;o=void 0===r.animation||r.animation;this.range.setRange(r.start,r.end,{animation:o},n)}else{o=!i||void 0===i.animation||i.animation;this.range.setRange(t,e,{animation:o},n)}}},{key:"moveTo",value:function(t,e,i){if("function"==typeof arguments[1]){i=arguments[1];e={}}var n=this.range.end-this.range.start,o=F.convert(t,"Date").valueOf(),r=o-n/2,o=o+n/2,n=!e||void 0===e.animation||e.animation;this.range.setRange(r,o,{animation:n},i)}},{key:"getWindow",value:function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}}},{key:"zoomIn",value:function(t,e,i){if(!(!t||t<0||1<t)){if("function"==typeof arguments[1]){i=arguments[1];e={}}var n=this.getWindow(),o=n.start.valueOf(),n=n.end.valueOf(),r=n-o,s=r/(1+t),r=(r-s)/2,s=o+r,o=n-r;this.setWindow(s,o,e,i)}}},{key:"zoomOut",value:function(t,e,i){if(!(!t||t<0||1<t)){if("function"==typeof arguments[1]){i=arguments[1];e={}}var n=this.getWindow(),o=n.start.valueOf(),n=n.end.valueOf(),r=n-o,o=o-r*t/2,n=n+r*t/2;this.setWindow(o,n,e,i)}}},{key:"redraw",value:function(){this._redraw()}},{key:"_redraw",value:function(){this.redrawCount++;var t=this.dom;if(t&&t.container&&0!=t.root.offsetWidth){var e=!1,i=this.options,n=this.props;Sb(this.options.moment,this.body,this.options.hiddenDates);if("top"==i.orientation){F.addClassName(t.root,"vis-top");F.removeClassName(t.root,"vis-bottom")}else{F.removeClassName(t.root,"vis-top");F.addClassName(t.root,"vis-bottom")}if(i.rtl){F.addClassName(t.root,"vis-rtl");F.removeClassName(t.root,"vis-ltr")}else{F.addClassName(t.root,"vis-ltr");F.removeClassName(t.root,"vis-rtl")}t.root.style.maxHeight=F.option.asSize(i.maxHeight,"");t.root.style.minHeight=F.option.asSize(i.minHeight,"");t.root.style.width=F.option.asSize(i.width,"");var o=t.root.offsetWidth;n.border.left=1;n.border.right=1;n.border.top=1;n.border.bottom=1;n.center.height=t.center.offsetHeight;n.left.height=t.left.offsetHeight;n.right.height=t.right.offsetHeight;n.top.height=t.top.clientHeight||-n.border.top;n.bottom.height=Math.round(t.bottom.getBoundingClientRect().height)||t.bottom.clientHeight||-n.border.bottom;var r=Math.max(n.left.height,n.center.height,n.right.height),r=n.top.height+r+n.bottom.height+n.border.top+n.border.bottom;t.root.style.height=F.option.asSize(i.height,"".concat(r,"px"));n.root.height=t.root.offsetHeight;n.background.height=n.root.height;r=n.root.height-n.top.height-n.bottom.height;n.centerContainer.height=r;n.leftContainer.height=r;n.rightContainer.height=n.leftContainer.height;n.root.width=o;n.background.width=n.root.width;this.initialDrawDone||(n.scrollbarWidth=F.getScrollBarWidth());r=t.leftContainer.clientWidth,o=t.rightContainer.clientWidth;if(i.verticalScroll)if(i.rtl){n.left.width=r||-n.border.left;n.right.width=o+n.scrollbarWidth||-n.border.right}else{n.left.width=r+n.scrollbarWidth||-n.border.left;n.right.width=o||-n.border.right}else{n.left.width=r||-n.border.left;n.right.width=o||-n.border.right}this._setDOM();var s=this._updateScrollTop();"top"!=i.orientation.item&&(s+=Math.max(n.centerContainer.height-n.center.height-n.border.top-n.border.bottom,0));t.center.style.transform="translateY(".concat(s,"px)");var a=0==n.scrollTop?"hidden":"",l=n.scrollTop==n.scrollTopMin?"hidden":"";t.shadowTop.style.visibility=a;t.shadowBottom.style.visibility=l;t.shadowTopLeft.style.visibility=a;t.shadowBottomLeft.style.visibility=l;t.shadowTopRight.style.visibility=a;t.shadowBottomRight.style.visibility=l;if(i.verticalScroll){t.rightContainer.className="vis-panel vis-right vis-vertical-scroll";t.leftContainer.className="vis-panel vis-left vis-vertical-scroll";t.shadowTopRight.style.visibility="hidden";t.shadowBottomRight.style.visibility="hidden";t.shadowTopLeft.style.visibility="hidden";t.shadowBottomLeft.style.visibility="hidden";t.left.style.top="0px";t.right.style.top="0px"}if(!i.verticalScroll||n.center.height<n.centerContainer.height){t.left.style.top="".concat(s,"px");t.right.style.top="".concat(s,"px");t.rightContainer.className=t.rightContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," ");t.leftContainer.className=t.leftContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," ");n.left.width=r||-n.border.left;n.right.width=o||-n.border.right;this._setDOM()}a=n.center.height>n.centerContainer.height;this.hammer.get("pan").set({direction:a?$b.DIRECTION_ALL:$b.DIRECTION_HORIZONTAL});this.hammer.get("press").set({time:this.options.longSelectPressTime});P(l=this.components).call(l,function(t){e=t.redraw()||e});if(e){if(this.redrawCount<5)return void this.body.emitter.emit("_change");console.log("WARNING: infinite loop in redraw?")}else this.redrawCount=0;this.body.emitter.emit("changed")}}},{key:"_setDOM",value:function(){var t=this.props,e=this.dom;t.leftContainer.width=t.left.width;t.rightContainer.width=t.right.width;var i=t.root.width-t.left.width-t.right.width;t.center.width=i;t.centerContainer.width=i;t.top.width=i;t.bottom.width=i;e.background.style.height="".concat(t.background.height,"px");e.backgroundVertical.style.height="".concat(t.background.height,"px");e.backgroundHorizontal.style.height="".concat(t.centerContainer.height,"px");e.centerContainer.style.height="".concat(t.centerContainer.height,"px");e.leftContainer.style.height="".concat(t.leftContainer.height,"px");e.rightContainer.style.height="".concat(t.rightContainer.height,"px");e.background.style.width="".concat(t.background.width,"px");e.backgroundVertical.style.width="".concat(t.centerContainer.width,"px");e.backgroundHorizontal.style.width="".concat(t.background.width,"px");e.centerContainer.style.width="".concat(t.center.width,"px");e.top.style.width="".concat(t.top.width,"px");e.bottom.style.width="".concat(t.bottom.width,"px");e.background.style.left="0";e.background.style.top="0";e.backgroundVertical.style.left="".concat(t.left.width+t.border.left,"px");e.backgroundVertical.style.top="0";e.backgroundHorizontal.style.left="0";e.backgroundHorizontal.style.top="".concat(t.top.height,"px");e.centerContainer.style.left="".concat(t.left.width,"px");e.centerContainer.style.top="".concat(t.top.height,"px");e.leftContainer.style.left="0";e.leftContainer.style.top="".concat(t.top.height,"px");e.rightContainer.style.left="".concat(t.left.width+t.center.width,"px");e.rightContainer.style.top="".concat(t.top.height,"px");e.top.style.left="".concat(t.left.width,"px");e.top.style.top="0";e.bottom.style.left="".concat(t.left.width,"px");e.bottom.style.top="".concat(t.top.height+t.centerContainer.height,"px");e.center.style.left="0";e.left.style.left="0";e.right.style.left="0"}},{key:"setCurrentTime",value:function(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)}},{key:"getCurrentTime",value:function(){if(this.currentTime)return this.currentTime.getCurrentTime();throw new Error("Option showCurrentTime must be true")}},{key:"_toTime",value:function(t){return Ob(this,t,this.props.center.width)}},{key:"_toGlobalTime",value:function(t){return Ob(this,t,this.props.root.width)}},{key:"_toScreen",value:function(t){return Eb(this,t,this.props.center.width)}},{key:"_toGlobalScreen",value:function(t){return Eb(this,t,this.props.root.width)}},{key:"_initAutoResize",value:function(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()}},{key:"_startAutoResize",value:function(){var i=this;this._stopAutoResize();this._onResize=function(){if(1!=i.options.autoResize)i._stopAutoResize();else if(i.dom.root){var t=i.dom.root.offsetHeight,e=i.dom.root.offsetWidth;if(e!=i.props.lastWidth||t!=i.props.lastHeight){i.props.lastWidth=e;i.props.lastHeight=t;i.props.scrollbarWidth=F.getScrollBarWidth();i.body.emitter.emit("_change")}}};F.addEventListener(window,"resize",this._onResize);if(i.dom.root){i.props.lastWidth=i.dom.root.offsetWidth;i.props.lastHeight=i.dom.root.offsetHeight}this.watchTimer=qb(this._onResize,1e3)}},{key:"_stopAutoResize",value:function(){if(this.watchTimer){clearInterval(this.watchTimer);this.watchTimer=void 0}if(this._onResize){F.removeEventListener(window,"resize",this._onResize);this._onResize=null}}},{key:"_onTouch",value:function(t){this.touch.allowDragging=!0;this.touch.initialScrollTop=this.props.scrollTop}},{key:"_onPinch",value:function(t){this.touch.allowDragging=!1}},{key:"_onDrag",value:function(t){if(t&&this.touch.allowDragging){var e=t.deltaY,i=this._getScrollTop(),e=this._setScrollTop(this.touch.initialScrollTop+e);if(this.options.verticalScroll){this.dom.left.parentNode.scrollTop=-this.props.scrollTop;this.dom.right.parentNode.scrollTop=-this.props.scrollTop}e!=i&&this.emit("verticalDrag")}}},{key:"_setScrollTop",value:function(t){this.props.scrollTop=t;this._updateScrollTop();return this.props.scrollTop}},{key:"_updateScrollTop",value:function(){var t=Math.min(this.props.centerContainer.height-this.props.border.top-this.props.border.bottom-this.props.center.height,0);if(t!=this.props.scrollTopMin){"top"!=this.options.orientation.item&&(this.props.scrollTop+=t-this.props.scrollTopMin);this.props.scrollTopMin=t}0<this.props.scrollTop&&(this.props.scrollTop=0);this.props.scrollTop<t&&(this.props.scrollTop=t);if(this.options.verticalScroll){this.dom.left.parentNode.scrollTop=-this.props.scrollTop;this.dom.right.parentNode.scrollTop=-this.props.scrollTop}return this.props.scrollTop}},{key:"_getScrollTop",value:function(){return this.props.scrollTop}},{key:"_createConfigurator",value:function(){throw new Error("Cannot invoke abstract method _createConfigurator")}}]);return t})();h(a0.prototype);function l0(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}var h0=(t=>{bh(s,t);var r=l0(s);function s(t,e){var i,n;g(this,s);n=r.call(this);n.body=t;n.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:Zh,locales:o0,locale:"en"};n.options=F.extend({},n.defaultOptions);n.setOptions(e);n.options.locales=F.extend({},o0,n.options.locales);var o=n.defaultOptions.locales[n.defaultOptions.locale];P(i=Ju(n.options.locales)).call(i,function(t){n.options.locales[t]=F.extend({},o,n.options.locales[t])});n.offset=0;n._create();return n}Jl(s,[{key:"_create",value:function(){var t=document.createElement("div");t.className="vis-current-time";t.style.position="absolute";t.style.top="0px";t.style.height="100%";this.bar=t}},{key:"destroy",value:function(){this.options.showCurrentTime=!1;this.redraw();this.body=null}},{key:"setOptions",value:function(t){t&&F.selectiveExtend(["rtl","showCurrentTime","alignCurrentTime","moment","locale","locales"],this.options,t)}},{key:"redraw",value:function(){if(this.options.showCurrentTime){var t,e=this.body.dom.backgroundVertical;if(this.bar.parentNode!=e){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar);e.appendChild(this.bar);this.start()}var e=this.options.moment(Gd()+this.offset),i=(this.options.alignCurrentTime&&(e=e.startOf(this.options.alignCurrentTime)),this.body.util.toScreen(e)),n=this.options.locales[this.options.locale];if(!n){if(!this.warned){console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization"));this.warned=!0}n=this.options.locales.en}n=Nd(t=Nd(t="".concat(n.current," ")).call(t,n.time,": ")).call(t,e.format("dddd, MMMM Do YYYY, H:mm:ss")),n=n.charAt(0).toUpperCase()+n.substring(1);this.options.rtl?this.bar.style.transform="translateX(".concat(-1*i,"px)"):this.bar.style.transform="translateX(".concat(i,"px)");this.bar.title=n}else{this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar);this.stop()}return!1}},{key:"start",value:function(){var i=this;!function t(){i.stop();var e=i.body.range.conversion(i.body.domProps.center.width).scale,e=1/e/10;e<30&&(e=30);1e3<e&&(e=1e3);i.redraw();i.body.emitter.emit("currentTimeTick");i.currentTimeTimer=Hh(t,e)}()}},{key:"stop",value:function(){if(void 0!==this.currentTimeTimer){clearTimeout(this.currentTimeTimer);delete this.currentTimeTimer}}},{key:"setCurrentTime",value:function(t){var e=F.convert(t,"Date").valueOf(),i=Gd();this.offset=e-i;this.redraw()}},{key:"getCurrentTime",value:function(){return new Date(Gd()+this.offset)}}]);return s})(x),u0={},is={get exports(){return u0},set exports(t){u0=t}},fs=l,c0=tr.find,d0=!0;"find"in[]&&Array(1).find(function(){d0=!1});fs({target:"Array",proto:!0,forced:d0},{find:function(t){return c0(this,t,1<arguments.length?arguments[1]:void 0)}});function p0(t){var e=t.find;return t===w0||y0(w0,t)&&e===w0.find?b0:e}function f0(t){P0(t,j0,{value:{objectID:"O"+B0++,weakData:{}}})}function m0(t,e){this.stopped=t;this.result=e}function g0(t,e,i){function n(t){r&&$0(r,"normal",t);return new m0(!0,t)}function o(t){return d?(W0(t),m?g(t[0],t[1],n):g(t[0],t[1])):m?g(t,n):g(t)}var r,s,a,l,h,u,c=i&&i.that,d=!(!i||!i.AS_ENTRIES),p=!(!i||!i.IS_RECORD),f=!(!i||!i.IS_ITERATOR),m=!(!i||!i.INTERRUPTED),g=H0(e,c);if(p)r=t.iterator;else if(f)r=t;else{c=K0(t);if(!c)throw Z0(Y0(t)+" is not iterable");if(V0(c)){for(s=0,a=U0(t);s<a;s++){l=o(t[s]);if(l&&X0(Q0,l))return l}return new m0(!1)}r=q0(t,c)}h=(p?t:r).next;for(;!(u=G0(h,r)).done;){try{l=o(u.value)}catch(t){$0(r,"throw",t)}if("object"==typeof l&&l&&X0(Q0,l))return l}return new m0(!1)}function v0(t,e){if(J0(e,t))return t;throw tw("Incorrect invocation")}var T=lh,In=T("Array").find,y0=Et,b0=In,w0=Array.prototype,_=p0,k0=(N=is,N.exports=_,t(u0)),x0={},Ui={get exports(){return x0},set exports(t){x0=t}},_0={},k={get exports(){return _0},set exports(t){_0=t}},s=e,v=s(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),mt=e,C0=et,S0=G,D0=v,T0=Object.isExtensible,S=mt(function(){T0(1)}),d=S||D0?function(t){return!(!C0(t)||D0&&"ArrayBuffer"==S0(t))&&(!T0||T0(t))}:T0,Ie=e,At=!Ie(function(){return Object.isExtensible(Object.preventExtensions({}))}),E0=l,O0=o,we=p,A0=et,I0=u,P0=ie.f,M0=f,N0=Jo,F0=d,pt=Ft,R0=At,L0=!1,j0=pt("meta"),B0=0,z0=k.exports={enable:function(){z0.enable=function(){};L0=!0;var o=M0.f,r=O0([].splice),t={};t[j0]=1;if(o(t).length){M0.f=function(t){for(var e=o(t),i=0,n=e.length;i<n;i++)if(e[i]===j0){r(e,i,1);break}return e};E0({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:N0.f})}},fastKey:function(t,e){if(!A0(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!I0(t,j0)){if(!F0(t))return"F";if(!e)return"E";f0(t)}return t[j0].objectID},getWeakData:function(t,e){if(!I0(t,j0)){if(!F0(t))return!0;if(!e)return!1;f0(t)}return t[j0].weakData},onFreeze:function(t){R0&&L0&&F0(t)&&!I0(t,j0)&&f0(t);return t}},H0=(we[j0]=!0,zt),G0=ct,W0=Ht,Y0=It,V0=Au,U0=qt,X0=Et,q0=Pu,K0=Iu,$0=Ou,Z0=TypeError,Q0=m0.prototype,J0=Et,tw=TypeError,ew=l,iw=z,nw=_0,ow=e,rw=Ot,sw=g0,aw=v0,lw=at,hw=et,uw=So,cw=ie.f,dw=tr.forEach,pw=ut,tn=_n,fw=tn.set,mw=tn.getterFor,gw=ko,vw=K,yw=xo,b=Rt,bw=ut,ww=b("species"),kw=ke,xw=xo,_w=function(t,e,i){for(var n in e)i&&i.unsafe&&t[n]?t[n]=e[n]:gw(t,n,e[n],i);return t},Cw=zt,Sw=v0,Dw=V,Tw=g0,Ew=Pa,Ow=Ma,Aw=function(t){var e=vw(t);bw&&e&&!e[ww]&&yw(e,ww,{configurable:!0,get:function(){return this}})},Iw=ut,Pw=_0.fastKey,Q=_n,Mw=Q.set,Nw=Q.getterFor,no={getConstructor:function(t,i,n,o){function r(t,e,i){var n,o,r=l(t),s=a(t,e);if(s)s.value=i;else{r.last=s={index:o=Pw(e,!0),key:e,value:i,previous:n=r.last,next:void 0,removed:!1};r.first||(r.first=s);n&&(n.next=s);Iw?r.size++:t.size++;"F"!==o&&(r.index[o]=s)}return t}function a(t,e){var i,n=l(t),o=Pw(e);if("F"!==o)return n.index[o];for(i=n.first;i;i=i.next)if(i.key==e)return i}var e=t(function(t,e){Sw(t,s);Mw(t,{type:i,index:kw(null),first:void 0,last:void 0,size:0});Iw||(t.size=0);Dw(e)||Tw(e,t[o],{that:t,AS_ENTRIES:n})}),s=e.prototype,l=Nw(i);_w(s,{clear:function(){for(var t=l(this),e=t.index,i=t.first;i;){i.removed=!0;i.previous&&(i.previous=i.previous.next=void 0);delete e[i.index];i=i.next}t.first=t.last=void 0;Iw?t.size=0:this.size=0},delete:function(t){var e=l(this),i=a(this,t);if(i){var n=i.next,o=i.previous;delete e.index[i.index];i.removed=!0;o&&(o.next=n);n&&(n.previous=o);e.first==i&&(e.first=n);e.last==i&&(e.last=o);Iw?e.size--:this.size--}return!!i},forEach:function(t){for(var e,i=l(this),n=Cw(t,1<arguments.length?arguments[1]:void 0);e=e?e.next:i.first;){n(e.value,e.key,this);for(;e&&e.removed;)e=e.previous}},has:function(t){return!!a(this,t)}});_w(s,n?{get:function(t){var e=a(this,t);return e&&e.value},set:function(t,e){return r(this,0===t?0:t,e)}}:{add:function(t){return r(this,t=0===t?0:t,t)}});Iw&&xw(s,"size",{configurable:!0,get:function(){return l(this).size}});return e},setStrong:function(t,e,i){var n=e+" Iterator",o=Nw(e),r=Nw(n);Ew(t,e,function(t,e){Mw(this,{type:n,target:t,state:o(t),kind:e,last:void 0})},function(){for(var t=r(this),e=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?Ow("keys"==e?i.key:"values"==e?i.value:[i.key,i.value],!1):(t.target=void 0,Ow(void 0,!0))},i?"entries":"values",!i,!0);Aw(e)}},ms=function(i,t,e){var n=-1!==i.indexOf("Map"),r=-1!==i.indexOf("Weak"),o=n?"set":"add",s=iw[i],a=s&&s.prototype,l={};if(pw&&lw(s)&&(r||a.forEach&&!ow(function(){(new s).entries().next()}))){var h=t(function(t,e){fw(aw(t,u),{type:i,collection:new s});null!=e&&sw(e,t[o],{that:t,AS_ENTRIES:n})}),u=h.prototype,c=mw(i);dw(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(n){var o="add"==n||"set"==n;n in a&&(!r||"clear"!=n)&&rw(u,n,function(t,e){var i=c(this).collection;return o||!r||hw(t)?(i=i[n](0===t?0:t,e),o?this:i):"get"==n&&void 0})});r||cw(u,"size",{configurable:!0,get:function(){return c(this).collection.size}})}else{h=e.getConstructor(t,i,n,o);nw.enable()}uw(h,i,!1,!0);l[i]=h;ew({global:!0,forced:!0},l);r||e.setStrong(h,i,n);return h},Z=no,ht=(ms("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Z),r),E=ht.Set,y=E,$n=y,Fw=(N=Ui,N.exports=$n,t(x0)),Rw={},po={get exports(){return Rw},set exports(t){Rw=t}},ps=l,Lw=tr.findIndex,a="findIndex",jw=!0;a in[]&&Array(1)[a](function(){jw=!1});ps({target:"Array",proto:!0,forced:jw},{findIndex:function(t){return Lw(this,t,1<arguments.length?arguments[1]:void 0)}});function Bw(t){var e=t.findIndex;return t===Gw||zw(Gw,t)&&e===Gw.findIndex?Hw:e}var ns=lh,w=ns("Array").findIndex,zw=Et,Hw=w,Gw=Array.prototype,C=Bw,Ww=(N=po,N.exports=C,t(Rw));function Yw(t,e){var i,n,o,r=void 0!==Od&&Hc(t)||t["@@iterator"];if(r)return i=!0,n=!1,{s:function(){r=r.call(t)},n:function(){var t=r.next();i=t.done;return t},e:function(t){n=!0;o=t},f:function(){try{i||null==r.return||r.return()}finally{if(n)throw o}}};if(A(t)||(r=((t,e)=>{if(t){if("string"==typeof t)return Vw(t,e);var i=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?jc(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Vw(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,a=function(){};return{s:a,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Vw(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var Uw=.001;function Xw(t){_b(t).call(t,function(t,e){return t.data.start-e.data.start})}function qw(t){_b(t).call(t,function(t,e){var i="end"in t.data?t.data.end:t.data.start,n="end"in e.data?e.data.end:e.data.start;return i-n})}function Kw(t,e,i,n){var o=t1(t,e.item,!1,function(t){return t.stack&&(i||null===t.top)},function(t){return t.stack},function(t){return e.axis},n);return null===o}function $w(t,e,i){var n=t1(t,e.item,!1,function(t){return t.stack},function(t){return 1},function(t){return t.baseTop});i.height=n-i.top+.5*e.item.vertical}function Zw(t,e,i,n){for(var o=0;o<t.length;o++)if(null==t[o].data.subgroup)t[o].top=e.item.vertical;else if(void 0!==t[o].data.subgroup&&n){var r,s=0;for(r in i)if(i.hasOwnProperty(r)&&1==i[r].visible&&i[r].index<i[t[o].data.subgroup].index){s+=i[r].height;i[t[o].data.subgroup].top=s}t[o].top=s+.5*e.item.vertical}n||Qw(t,e,i)}function Qw(t,e,i){var n;t1(_b(n=nf(i)).call(n,function(t,e){return t.index>e.index?1:t.index<e.index?-1:0}),{vertical:0},!0,function(t){return 1},function(t){return 1},function(t){return 0});for(var o=0;o<t.length;o++)void 0!==t[o].data.subgroup&&(t[o].top=i[t[o].data.subgroup].top+.5*e.item.vertical)}function Jw(t,e,i){var n,o=!1,r=[];for(n in i)i[n].hasOwnProperty("index")?r[i[n].index]=n:r.push(n);for(var s=0;s<r.length;s++){n=r[s];if(i.hasOwnProperty(n)){o=o||i[n].stack;i[n].top=0;for(var a in i)i[a].visible&&i[n].index>i[a].index&&(i[n].top+=i[a].height);for(var l=t[n],h=0;h<l.length;h++)if(void 0!==l[h].data.subgroup){l[h].top=i[l[h].data.subgroup].top+.5*e.item.vertical;i[n].stack&&(l[h].baseTop=l[h].top)}o&&i[n].stack&&$w(t[n],e,i[n])}}}function t1(t,c,e,n,d,p,f){var o,r,m=function(t){return t.start},g=function(t){return t.end},v=(e||(o=!(!t[0]||!t[0].options.rtl),m=o?function(t){return t.right}:function(t){return t.left},g=function(t){return m(t)+t.width+c.horizontal}),[]),y=[],b=null,w=0,s=Yw(t);try{for(s.s();!(r=s.n()).done;)(()=>{var t=r.value;if(n(t))v.push(t);else if(d(t)){var e=m(t);null!==b&&e<b-Uw&&(w=0);b=e;w=e1(y,function(t){return m(t)-Uw>e},w);gp(y).call(y,w,0,t);w++}})()}catch(t){s.e(t)}finally{s.f()}for(var b=null,k=null,w=0,x=0,_=0,C=0,a=function(){var t=v.shift(),e=(t.top=p(t),m(t)),n=g(t);if(null!==b&&e<b-Uw){x=0;_=0;w=0;k=null}b=e;x=e1(y,function(t){return e<g(t)-Uw},x);(null===k||k<n-Uw)&&(_=e1(y,function(t){return n<m(t)-Uw},Math.max(x,_)));null!==k&&n<k-Uw&&(_=((t,e,n,o)=>{n=n||0;o=o||t.length;for(i=o-1;i>=n;i--)if(e(t[i]))return i;return n-1})(y,function(t){return n+Uw>=m(t)},x,horizontalOVerlapEndIndex)+1);for(var o,r,s,a=_b(u=M(u=Rd(y).call(y,x,_)).call(u,function(t){return e<g(t)-Uw&&n-Uw>m(t)})).call(u,function(t,e){return t.top-e.top}),l=0;l<a.length;l++){var h=a[l];(o=t,r=h,s=c,o.top-s.vertical+Uw<r.top+r.height&&o.top+o.height+s.vertical-Uw>r.top)&&(t.top=h.top+h.height+c.vertical)}if(d(t)){w=e1(y,function(t){return m(t)-Uw>e},w);gp(y).call(y,w,0,t);w++}var u=t.top+t.height;C<u&&(C=u);if(f&&f())return{v:null}};0<v.length;){var l=a();if("object"===O(l))return l.v}return C}function e1(t,e,i){i=i||0;var n=Ww(n=Rd(t).call(t,i)).call(n,e);return-1===n?t.length:n+i}var gs=Object.freeze({__proto__:null,nostack:Zw,orderByEnd:qw,orderByStart:Xw,stack:Kw,stackSubgroups:Qw,stackSubgroupsWithInnerStack:Jw,substack:$w}),i1="__background__",n1=(()=>{function s(t,e,i){var n=this;g(this,s);this.groupId=t;this.subgroups={};this.subgroupStack={};this.subgroupStackAll=!1;this.subgroupVisibility={};this.doInnerStack=!1;this.shouldBailStackItems=!1;this.subgroupIndex=0;this.subgroupOrderer=e&&e.subgroupOrder;this.itemSet=i;this.isVisible=null;this.stackDirty=!0;this._disposeCallbacks=[];if(e&&e.nestedGroups){this.nestedGroups=e.nestedGroups;this.showNested=0!=e.showNested}if(e&&e.subgroupStack)if("boolean"==typeof e.subgroupStack){this.doInnerStack=e.subgroupStack;this.subgroupStackAll=e.subgroupStack}else for(var o in e.subgroupStack){this.subgroupStack[o]=e.subgroupStack[o];this.doInnerStack=this.doInnerStack||e.subgroupStack[o]}e&&e.heightMode?this.heightMode=e.heightMode:this.heightMode=i.options.groupHeightMode;this.nestedInGroup=null;this.dom={};this.props={label:{width:0,height:0}};this.className=null;this.items={};this.visibleItems=[];this.itemsInRange=[];this.orderedItems={byStart:[],byEnd:[]};this.checkRangedItems=!1;function r(){n.checkRangedItems=!0}this.itemSet.body.emitter.on("checkRangedItems",r);this._disposeCallbacks.push(function(){n.itemSet.body.emitter.off("checkRangedItems",r)});this._create();this.setData(e)}Jl(s,[{key:"_create",value:function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label";this.dom.label=t;var e=document.createElement("div");e.className="vis-inner";t.appendChild(e);this.dom.inner=e;t=document.createElement("div");t.className="vis-group";t["vis-group"]=this;this.dom.foreground=t;this.dom.background=document.createElement("div");this.dom.background.className="vis-group";this.dom.axis=document.createElement("div");this.dom.axis.className="vis-group";this.dom.marker=document.createElement("div");this.dom.marker.style.visibility="hidden";this.dom.marker.style.position="absolute";this.dom.marker.innerHTML="";this.dom.background.appendChild(this.dom.marker)}},{key:"setData",value:function(t){if(!this.itemSet.groupTouchParams.isDragging){var e;if(t&&t.subgroupVisibility)for(var i in t.subgroupVisibility)this.subgroupVisibility[i]=t.subgroupVisibility[i];e=this.itemSet.options&&this.itemSet.options.groupTemplate?(n=I(n=this.itemSet.options.groupTemplate).call(n,this),n(t,this.dom.inner)):t&&t.content;if(e instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object&&e.isReactComponent||(e instanceof Object?n(t,this.dom.inner):this.dom.inner.innerHTML=null!=e?F.xss(e):F.xss(this.groupId||""));this.dom.label.title=t&&t.title||"";this.dom.inner.firstChild?F.removeClassName(this.dom.inner,"vis-hidden"):F.addClassName(this.dom.inner,"vis-hidden");if(t&&t.nestedGroups){this.nestedGroups&&this.nestedGroups==t.nestedGroups||(this.nestedGroups=t.nestedGroups);void 0===t.showNested&&void 0!==this.showNested||(0==t.showNested?this.showNested=!1:this.showNested=!0);F.addClassName(this.dom.label,"vis-nesting-group");if(this.showNested){F.removeClassName(this.dom.label,"collapsed");F.addClassName(this.dom.label,"expanded")}else{F.removeClassName(this.dom.label,"expanded");F.addClassName(this.dom.label,"collapsed")}}else if(this.nestedGroups){this.nestedGroups=null;F.removeClassName(this.dom.label,"collapsed");F.removeClassName(this.dom.label,"expanded");F.removeClassName(this.dom.label,"vis-nesting-group")}if(t&&(t.treeLevel||t.nestedInGroup)){F.addClassName(this.dom.label,"vis-nested-group");t.treeLevel?F.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):F.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")}else F.addClassName(this.dom.label,"vis-group-level-0");var n=t&&t.className||null;if(n!=this.className){if(this.className){F.removeClassName(this.dom.label,this.className);F.removeClassName(this.dom.foreground,this.className);F.removeClassName(this.dom.background,this.className);F.removeClassName(this.dom.axis,this.className)}F.addClassName(this.dom.label,n);F.addClassName(this.dom.foreground,n);F.addClassName(this.dom.background,n);F.addClassName(this.dom.axis,n);this.className=n}if(this.style){F.removeCssText(this.dom.label,this.style);this.style=null}if(t&&t.style){F.addCssText(this.dom.label,t.style);this.style=t.style}}}},{key:"getLabelWidth",value:function(){return this.props.label.width}},{key:"_didMarkerHeightChange",value:function(){var t=this.dom.marker.clientHeight;if(t==this.lastMarkerHeight)return!1;this.lastMarkerHeight=t;var i={},n=0,t=(P(F).call(F,this.items,function(t,e){t.dirty=!0;if(t.displayed){i[e]=t.redraw(!0);n=i[e].length}}),0<n);if(t)for(var e=0;e<n;e++)(e=>{P(F).call(F,i,function(t){t[e]()})})(e);return!0}},{key:"_calculateGroupSizeAndPosition",value:function(){var t=this.dom.foreground,e=t.offsetTop,i=t.offsetLeft,t=t.offsetWidth;this.top=e;this.right=i;this.width=t}},{key:"_shouldBailItemsRedraw",value:function(){var e=this,t=this.itemSet.options.onTimeout,t={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:t&&t.timeoutMs,userBailFunction:t&&t.callback,shouldBailStackItems:this.shouldBailStackItems},i=null;if(!this.itemSet.initialDrawDone){if(t.shouldBailStackItems)return!0;Math.abs(Gd()-new Date(t.relativeBailingTime))>t.bailTimeMs&&(t.userBailFunction&&null==this.itemSet.userContinueNotBail?t.userBailFunction(function(t){e.itemSet.userContinueNotBail=t;i=!t}):i=0==e.itemSet.userContinueNotBail)}return i}},{key:"_redrawItems",value:function(t,e,i,n){var o=this,r=t||this.stackDirty||this.isVisible&&!e;if(r){var s={byEnd:M(r=this.orderedItems.byEnd).call(r,function(t){return!t.isCluster}),byStart:M(r=this.orderedItems.byStart).call(r,function(t){return!t.isCluster})},a={byEnd:md(new Fw(M(r=ju(r=this.orderedItems.byEnd).call(r,function(t){return t.cluster})).call(r,function(t){return!!t}))),byStart:md(new Fw(M(r=ju(r=this.orderedItems.byStart).call(r,function(t){return t.cluster})).call(r,function(t){return!!t})))},r=function(){var t,e=o._updateItemsInRange(s,M(e=o.visibleItems).call(e,function(t){return!t.isCluster}),n),i=o._updateClustersInRange(a,M(i=o.visibleItems).call(i,function(t){return t.isCluster}),n);return Nd(t=[]).call(t,md(e),md(i))},l=function(i){var t,n={};for(t in o.subgroups)(e=>{var t=M(t=o.visibleItems).call(t,function(t){return t.data.subgroup===e});n[e]=i?_b(t).call(t,function(t,e){return i(t.data,e.data)}):t})(t);return n};if("function"==typeof this.itemSet.options.order){var h=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){var u=l(this.itemSet.options.order);Jw(u,i,this.subgroups);this.visibleItems=r();this._updateSubGroupHeights(i)}else{this.visibleItems=r();this._updateSubGroupHeights(i);var u=_b(u=M(u=Rd(u=this.visibleItems).call(u)).call(u,function(t){return t.isCluster||!t.isCluster&&!t.cluster})).call(u,function(t,e){return h.itemSet.options.order(t.data,e.data)});this.shouldBailStackItems=Kw(u,i,!0,I(u=this._shouldBailItemsRedraw).call(u,this))}}else{this.visibleItems=r();this._updateSubGroupHeights(i);if(this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){u=l();Jw(u,i,this.subgroups)}else this.shouldBailStackItems=Kw(this.visibleItems,i,!0,I(r=this._shouldBailItemsRedraw).call(r,this));else Zw(this.visibleItems,i,this.subgroups,this.itemSet.options.stackSubgroups)}for(var c=0;c<this.visibleItems.length;c++){this.visibleItems[c].repositionX();void 0===this.subgroupVisibility[this.visibleItems[c].data.subgroup]||this.subgroupVisibility[this.visibleItems[c].data.subgroup]||this.visibleItems[c].hide()}this.itemSet.options.cluster&&P(F).call(F,this.items,function(t){t.cluster&&t.displayed&&t.hide()});this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline");this.stackDirty=!1}}},{key:"_didResize",value:function(t,e){t=F.updateProperty(this,"height",e)||t;var i=this.dom.inner.clientWidth,n=this.dom.inner.clientHeight;t=F.updateProperty(this.props.label,"width",i)||t;t=F.updateProperty(this.props.label,"height",n)||t;return t}},{key:"_applyGroupHeight",value:function(t){this.dom.background.style.height="".concat(t,"px");this.dom.foreground.style.height="".concat(t,"px");this.dom.label.style.height="".concat(t,"px")}},{key:"_updateItemsVerticalPosition",value:function(t){for(var e=0,i=this.visibleItems.length;e<i;e++){var n=this.visibleItems[e];n.repositionY(t);this.isVisible||this.groupId==i1||n.displayed&&n.hide()}}},{key:"redraw",value:function(e,i,n,t){var o,r,s=this,a=!1,l=this.isVisible,h=[function(){n=s._didMarkerHeightChange.call(s)||n},I(h=this._updateSubGroupHeights).call(h,this,i),I(h=this._calculateGroupSizeAndPosition).call(h,this),function(){var t;s.isVisible=I(t=s._isGroupVisible).call(t,s)(e,i)},function(){var t;I(t=s._redrawItems).call(t,s)(n,l,i,e)},I(h=this._updateSubgroupsSizes).call(h,this),function(){var t;o=I(t=s._calculateHeight).call(t,s)(i)},I(h=this._calculateGroupSizeAndPosition).call(h,this),function(){var t;a=I(t=s._didResize).call(t,s)(a,o)},function(){var t;I(t=s._applyGroupHeight).call(t,s)(o)},function(){var t;I(t=s._updateItemsVerticalPosition).call(t,s)(i)},I(h=function(){!s.isVisible&&s.height&&(a=!1);return a}).call(h,this)];return t?h:(P(h).call(h,function(t){r=t()}),r)}},{key:"_updateSubGroupHeights",value:function(e){var i=this;if(0<Ju(this.subgroups).length){var n=this;this._resetSubgroups();P(F).call(F,this.visibleItems,function(t){if(void 0!==t.data.subgroup){n.subgroups[t.data.subgroup].height=Math.max(n.subgroups[t.data.subgroup].height,t.height+e.item.vertical);n.subgroups[t.data.subgroup].visible=void 0===i.subgroupVisibility[t.data.subgroup]||Boolean(i.subgroupVisibility[t.data.subgroup])}})}}},{key:"_isGroupVisible",value:function(t,e){return this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop}},{key:"_calculateHeight",value:function(t){var e,i="fixed"===this.heightMode?F.toArray(this.items):this.visibleItems;if(0<i.length){var n=i[0].top,o=i[0].top+i[0].height;P(F).call(F,i,function(t){n=Math.min(n,t.top);o=Math.max(o,t.top+t.height)});if(n>t.axis){var r=n-t.axis;o-=r;P(F).call(F,i,function(t){t.top-=r})}e=Math.ceil(o+t.item.vertical/2);"fitItems"!==this.heightMode&&(e=Math.max(e,this.props.label.height))}else e=this.props.label.height;return e}},{key:"show",value:function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label);this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground);this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background);this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)}},{key:"hide",value:function(){var t=this.dom.label,t=(t.parentNode&&t.parentNode.removeChild(t),this.dom.foreground),t=(t.parentNode&&t.parentNode.removeChild(t),this.dom.background),t=(t.parentNode&&t.parentNode.removeChild(t),this.dom.axis);t.parentNode&&t.parentNode.removeChild(t)}},{key:"add",value:function(t){this.items[t.id]=t;t.setParent(this);this.stackDirty=!0;if(void 0!==t.data.subgroup){this._addToSubgroup(t);this.orderSubgroups()}if(!Up(e=this.visibleItems).call(e,t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}}},{key:"_addToSubgroup",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;if(null!=e&&void 0===this.subgroups[e]){this.subgroups[e]={height:0,top:0,start:t.data.start,end:t.data.end||t.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[e]||!1};this.subgroupIndex++}new Date(t.data.start)<new Date(this.subgroups[e].start)&&(this.subgroups[e].start=t.data.start);var i=t.data.end||t.data.start;new Date(i)>new Date(this.subgroups[e].end)&&(this.subgroups[e].end=i);this.subgroups[e].items.push(t)}},{key:"_updateSubgroupsSizes",value:function(){var e=this;if(e.subgroups)for(var o in e.subgroups)(()=>{var t=e.subgroups[o].items[0].data.end||e.subgroups[o].items[0].data.start,i=e.subgroups[o].items[0].data.start,n=t-1;P(t=e.subgroups[o].items).call(t,function(t){new Date(t.data.start)<new Date(i)&&(i=t.data.start);var e=t.data.end||t.data.start;new Date(e)>new Date(n)&&(n=e)});e.subgroups[o].start=i;e.subgroups[o].end=new Date(n-1)})()}},{key:"orderSubgroups",value:function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});_b(t).call(t,function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var i in this.subgroups)t.push(this.subgroups[i].items[0].data);_b(t).call(t,this.subgroupOrderer)}if(0<t.length)for(var n=0;n<t.length;n++)this.subgroups[t[n].subgroup].index=n}}},{key:"_resetSubgroups",value:function(){for(var t in this.subgroups)if(this.subgroups.hasOwnProperty(t)){this.subgroups[t].visible=!1;this.subgroups[t].height=0}}},{key:"remove",value:function(t){var e;delete this.items[t.id];t.setParent(null);this.stackDirty=!0;var i=Cf(i=this.visibleItems).call(i,t);-1!=i&&gp(e=this.visibleItems).call(e,i,1);if(void 0!==t.data.subgroup){this._removeFromSubgroup(t);this.orderSubgroups()}}},{key:"_removeFromSubgroup",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;if(null!=e){var i=this.subgroups[e];if(i){var n,o=Cf(o=i.items).call(o,t);if(0<=o){gp(n=i.items).call(n,o,1);i.items.length?this._updateSubgroupsSizes():delete this.subgroups[e]}}}}},{key:"removeFromDataSet",value:function(t){this.itemSet.removeItem(t.id)}},{key:"order",value:function(){for(var t=F.toArray(this.items),e=[],i=[],n=0;n<t.length;n++){void 0!==t[n].data.end&&i.push(t[n]);e.push(t[n])}this.orderedItems={byStart:e,byEnd:i};Xw(this.orderedItems.byStart);qw(this.orderedItems.byEnd)}},{key:"_updateItemsInRange",value:function(t,e,i){var n=[],o={};if(this.isVisible||this.groupId==i1){var r=(i.end-i.start)/4,s=i.start-r,a=i.end+r;if(0<e.length)for(var l=0;l<e.length;l++)this._checkIfVisibleWithReference(e[l],n,o,i);r=F.binarySearchCustom(t.byStart,function(t){return t<s?-1:t<=a?0:1},"data","start");this._traceVisible(r,t.byStart,n,o,function(t){return t.data.start<s||t.data.start>a});if(1==this.checkRangedItems){this.checkRangedItems=!1;for(var h=0;h<t.byEnd.length;h++)this._checkIfVisibleWithReference(t.byEnd[h],n,o,i)}else{r=F.binarySearchCustom(t.byEnd,function(t){var e=t.start,i=t.end;return i<s?-1:e<=a?0:1},"data");this._traceVisible(r,t.byEnd,n,o,function(t){return t.data.end<s||t.data.start>a})}for(var u={},c=0,d=0;d<n.length;d++){var p=n[d];if(!p.displayed){u[d]=p.redraw(!0);c=u[d].length}}r=0<c;if(r)for(var f=0;f<c;f++)(e=>{P(F).call(F,u,function(t){t[e]()})})(f);for(var m=0;m<n.length;m++)n[m].repositionX()}else for(var g=0;g<e.length;g++){var v=e[g];v.displayed&&v.hide()}return n}},{key:"_traceVisible",value:function(t,e,i,n,o){if(-1!=t){for(var r=t;0<=r;r--){var s=e[r];if(o(s))break;if((!s.isCluster||s.hasItems())&&!s.cluster&&void 0===n[s.id]){n[s.id]=!0;i.push(s)}}for(var a=t+1;a<e.length;a++){var l=e[a];if(o(l))break;if((!l.isCluster||l.hasItems())&&!l.cluster&&void 0===n[l.id]){n[l.id]=!0;i.push(l)}}}}},{key:"_checkIfVisible",value:function(t,e,i){if(t.isVisible(i)){t.displayed||t.show();t.repositionX();e.push(t)}else t.displayed&&t.hide()}},{key:"_checkIfVisibleWithReference",value:function(t,e,i,n){if(t.isVisible(n)){if(void 0===i[t.id]){i[t.id]=!0;e.push(t)}}else t.displayed&&t.hide()}},{key:"_updateClustersInRange",value:function(t,e,i){var n=[],o={};if(0<e.length)for(var r=0;r<e.length;r++)this._checkIfVisibleWithReference(e[r],n,o,i);for(var s=0;s<t.byStart.length;s++)this._checkIfVisibleWithReference(t.byStart[s],n,o,i);for(var a=0;a<t.byEnd.length;a++)this._checkIfVisibleWithReference(t.byEnd[a],n,o,i);for(var l={},h=0,u=0;u<n.length;u++){var c=n[u];if(!c.displayed){l[u]=c.redraw(!0);h=l[u].length}}var d=0<h;if(d)for(var p=0;p<h;p++)P(F).call(F,l,function(t){t[p]()});for(var f=0;f<n.length;f++)n[f].repositionX();return n}},{key:"changeSubgroup",value:function(t,e,i){this._removeFromSubgroup(t,e);this._addToSubgroup(t,i);this.orderSubgroups()}},{key:"dispose",value:function(){this.hide();for(var t;t=this._disposeCallbacks.pop();)t()}}]);return s})();function o1(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}var r1=(t=>{bh(r,t);var o=o1(r);function r(t,e,i){var n;g(this,r);n=o.call(this,t,e,i);n.width=0;n.height=0;n.top=0;n.left=0;return n}Jl(r,[{key:"redraw",value:function(t,e,i){this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,t);this.width=this.dom.background.offsetWidth;this.dom.background.style.height="0";for(var n=0,o=this.visibleItems.length;n<o;n++){var r=this.visibleItems[n];r.repositionY(e)}return!1}},{key:"show",value:function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}}]);return r})(n1);function s1(t,e){var i,n,o,r=void 0!==Od&&Hc(t)||t["@@iterator"];if(r)return i=!0,n=!1,{s:function(){r=r.call(t)},n:function(){var t=r.next();i=t.done;return t},e:function(t){n=!0;o=t},f:function(){try{i||null==r.return||r.return()}finally{if(n)throw o}}};if(A(t)||(r=((t,e)=>{if(t){if("string"==typeof t)return a1(t,e);var i=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?jc(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a1(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,a=function(){};return{s:a,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a1(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}D=(()=>{function s(t,e,i){var n,o=this;g(this,s);this.id=null;this.parent=null;this.data=t;this.dom=null;this.conversion=e||{};this.defaultOptions={locales:o0,locale:"en"};this.options=F.extend({},this.defaultOptions,i);this.options.locales=F.extend({},o0,this.options.locales);var r=this.defaultOptions.locales[this.defaultOptions.locale];P(n=Ju(this.options.locales)).call(n,function(t){o.options.locales[t]=F.extend({},r,o.options.locales[t])});this.selected=!1;this.displayed=!1;this.groupShowing=!0;this.selectable=i&&i.selectable||!1;this.dirty=!0;this.top=null;this.right=null;this.left=null;this.width=null;this.height=null;this.setSelectability(t);this.editable=null;this._updateEditStatus()}Jl(s,[{key:"select",value:function(){if(this.selectable){this.selected=!0;this.dirty=!0;this.displayed&&this.redraw()}}},{key:"unselect",value:function(){this.selected=!1;this.dirty=!0;this.displayed&&this.redraw()}},{key:"setData",value:function(t){var e=null!=t.group&&this.data.group!=t.group;e&&null!=this.parent&&this.parent.itemSet._moveToGroup(this,t.group);this.setSelectability(t);this.parent&&(this.parent.stackDirty=!0);e=null!=t.subgroup&&this.data.subgroup!=t.subgroup;e&&null!=this.parent&&this.parent.changeSubgroup(this,this.data.subgroup,t.subgroup);this.data=t;this._updateEditStatus();this.dirty=!0;this.displayed&&this.redraw()}},{key:"setSelectability",value:function(t){t&&(this.selectable=void 0===t.selectable||Boolean(t.selectable))}},{key:"setParent",value:function(t){if(this.displayed){this.hide();this.parent=t;this.parent&&this.show()}else this.parent=t}},{key:"isVisible",value:function(t){return!1}},{key:"show",value:function(){return!1}},{key:"hide",value:function(){return!1}},{key:"redraw",value:function(){}},{key:"repositionX",value:function(){}},{key:"repositionY",value:function(){}},{key:"_repaintDragCenter",value:function(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){var t,e=this,i=document.createElement("div");i.className="vis-drag-center";i.dragCenterItem=this;this.hammerDragCenter=new $b(i);this.hammerDragCenter.on("tap",function(t){e.parent.itemSet.body.emitter.emit("click",{event:t,item:e.id})});this.hammerDragCenter.on("doubletap",function(t){t.stopPropagation();e.parent.itemSet._onUpdateItem(e);e.parent.itemSet.body.emitter.emit("doubleClick",{event:t,item:e.id})});this.hammerDragCenter.on("panstart",function(t){t.stopPropagation();e.parent.itemSet._onDragStart(t)});this.hammerDragCenter.on("panmove",I(t=e.parent.itemSet._onDrag).call(t,e.parent.itemSet));this.hammerDragCenter.on("panend",I(t=e.parent.itemSet._onDragEnd).call(t,e.parent.itemSet));this.hammerDragCenter.get("press").set({time:1e4});this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(i,this.dom.dragLeft):this.dom.box.appendChild(i):this.dom.point&&this.dom.point.appendChild(i);this.dom.dragCenter=i}else if(!this.selected&&this.dom.dragCenter){this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter);this.dom.dragCenter=null;if(this.hammerDragCenter){this.hammerDragCenter.destroy();this.hammerDragCenter=null}}}},{key:"_repaintDeleteButton",value:function(t){var e=(this.options.editable.overrideItems||null==this.editable)&&this.options.editable.remove||!this.options.editable.overrideItems&&null!=this.editable&&this.editable.remove;if(this.selected&&e&&!this.dom.deleteButton){var i=this,n=document.createElement("div"),o=(this.options.rtl?n.className="vis-delete-rtl":n.className="vis-delete",this.options.locales[this.options.locale]);if(!o){if(!this.warned){console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization"));this.warned=!0}o=this.options.locales.en}n.title=o.deleteSelected;this.hammerDeleteButton=new $b(n).on("tap",function(t){t.stopPropagation();i.parent.removeFromDataSet(i)});t.appendChild(n);this.dom.deleteButton=n}else if((!this.selected||!e)&&this.dom.deleteButton){this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton);this.dom.deleteButton=null;if(this.hammerDeleteButton){this.hammerDeleteButton.destroy();this.hammerDeleteButton=null}}}},{key:"_repaintOnItemUpdateTimeTooltip",value:function(t){if(this.options.tooltipOnItemUpdateTime){var e=(this.options.editable.updateTime||!0===this.data.editable)&&!1!==this.data.editable;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){e=document.createElement("div");e.className="vis-onUpdateTime-tooltip";t.appendChild(e);this.dom.onItemUpdateTimeTooltip=e}else if(!this.selected&&this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip);this.dom.onItemUpdateTimeTooltip=null}if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?"visible":"hidden";this.dom.onItemUpdateTimeTooltip.style.transform="translateX(-50%)";this.dom.onItemUpdateTimeTooltip.style.left="50%";var e=this.parent.itemSet.body.domProps.scrollTop,i="top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height,i=i+this.parent.top-50<-e;if(i){this.dom.onItemUpdateTimeTooltip.style.bottom="";this.dom.onItemUpdateTimeTooltip.style.top="".concat(this.height+2,"px")}else{this.dom.onItemUpdateTimeTooltip.style.top="";this.dom.onItemUpdateTimeTooltip.style.bottom="".concat(this.height+2,"px")}if(this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template)var i=I(e=this.options.tooltipOnItemUpdateTime.template).call(e,this),n=i(this.data);else{n="start: ".concat(Zh(this.data.start).format("MM/DD/YYYY hh:mm"));this.data.end&&(n+="<br> end: ".concat(Zh(this.data.end).format("MM/DD/YYYY hh:mm")))}this.dom.onItemUpdateTimeTooltip.innerHTML=F.xss(n)}}}},{key:"_getItemData",value:function(){return this.parent.itemSet.itemsData.get(this.id)}},{key:"_updateContents",value:function(t){var e,i,n,o,r=this._getItemData(),s=this.dom.box||this.dom.point,s=s.getElementsByClassName("vis-item-visible-frame")[0];i=this.options.visibleFrameTemplate?(n=I(n=this.options.visibleFrameTemplate).call(n,this),F.xss(n(r,s))):"";if(s)if(i instanceof Object&&!(i instanceof Element))n(r,s);else{e=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(i);if(e){if(i instanceof Element){s.innerHTML="";s.appendChild(i)}else if(null!=i)s.innerHTML=F.xss(i);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.itemVisibleFrameContent=i}}s=this.options.template?(o=I(n=this.options.template).call(n,this),o(r,t,this.data)):this.data.content;if(s instanceof Object&&!(s instanceof Element))o(r,t);else{e=this._contentToString(this.content)!==this._contentToString(s);if(e){if(s instanceof Element){t.innerHTML="";t.appendChild(s)}else if(null!=s)t.innerHTML=F.xss(s);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.content=s}}}},{key:"_updateDataAttributes",value:function(t){if(this.options.dataAttributes&&0<this.options.dataAttributes.length){var e=[];if(A(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Ju(this.data)}var i,n=s1(e);try{for(n.s();!(i=n.n()).done;){var o=i.value,r=this.data[o];null!=r?t.setAttribute("data-".concat(o),r):t.removeAttribute("data-".concat(o))}}catch(t){n.e(t)}finally{n.f()}}}},{key:"_updateStyle",value:function(t){if(this.style){F.removeCssText(t,this.style);this.style=null}if(this.data.style){F.addCssText(t,this.data.style);this.style=this.data.style}}},{key:"_contentToString",value:function(t){return"string"!=typeof t&&t&&"outerHTML"in t?t.outerHTML:t}},{key:"_updateEditStatus",value:function(){if(this.options)if("boolean"==typeof this.options.editable)this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable};else if("object"===O(this.options.editable)){this.editable={};F.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.options.editable)}if((!this.options||!this.options.editable||!0!==this.options.editable.overrideItems)&&this.data)if("boolean"==typeof this.data.editable)this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable};else if("object"===O(this.data.editable)){this.editable={};F.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)}}},{key:"getWidthLeft",value:function(){return 0}},{key:"getWidthRight",value:function(){return 0}},{key:"getTitle",value:function(){var t;return this.options.tooltip&&this.options.tooltip.template?(t=I(t=this.options.tooltip.template).call(t,this),t(this._getItemData(),this.data)):this.data.title}}]);return s})();D.prototype.stack=!0;function l1(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}c=(t=>{bh(r,t);var o=l1(r);function r(t,e,i){var n;g(this,r);n=o.call(this,t,e,i);n.props={dot:{width:0,height:0},line:{width:0,height:0}};if(t&&null==t.start)throw new Error('Property "start" missing in item '.concat(t));return n}Jl(r,[{key:"isVisible",value:function(t){if(this.cluster)return!1;var e=this.data.align||this.options.align,i=this.width*t.getMillisecondsPerPixel();e="right"==e?this.data.start.getTime()>t.start&&this.data.start.getTime()-i<t.end:"left"==e?this.data.start.getTime()+i>t.start&&this.data.start.getTime()<t.end:this.data.start.getTime()+i/2>t.start&&this.data.start.getTime()-i/2<t.end;return e}},{key:"_createDomElement",value:function(){if(!this.dom){this.dom={};this.dom.box=document.createElement("DIV");this.dom.content=document.createElement("DIV");this.dom.content.className="vis-item-content";this.dom.box.appendChild(this.dom.content);this.dom.line=document.createElement("DIV");this.dom.line.className="vis-line";this.dom.dot=document.createElement("DIV");this.dom.dot.className="vis-dot";this.dom.box["vis-item"]=this;this.dirty=!0}}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}if(!this.dom.line.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){t=this.parent.dom.axis;if(!e)throw new Error("Cannot redraw item: parent has no axis container element");t.appendChild(this.dom.dot)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content);this._updateDataAttributes(this.dom.box);this._updateStyle(this.dom.box);var t=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className="vis-item vis-box".concat(t);this.dom.line.className="vis-item vis-line".concat(t);this.dom.dot.className="vis-item vis-dot".concat(t)}}},{key:"_getDomComponentsSizes",value:function(){return{previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},dot:{height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},line:{width:this.dom.line.offsetWidth},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}}}},{key:"_updateDomComponentsSizes",value:function(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px";this.props.dot.height=t.dot.height;this.props.dot.width=t.dot.width;this.props.line.width=t.line.width;this.width=t.box.width;this.height=t.box.height;this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left;this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box);this._repaintDragCenter();this._repaintDeleteButton(this.dom.box)}},{key:"redraw",value:function(t){var e,i,n=this,o=[I(o=this._createDomElement).call(o,this),I(o=this._appendDomElement).call(o,this),I(o=this._updateDirtyDomComponents).call(o,this),function(){n.dirty&&(e=n._getDomComponentsSizes())},function(){var t;n.dirty&&I(t=n._updateDomComponentsSizes).call(t,n)(e)},I(o=this._repaintDomAdditionals).call(o,this)];return t?o:(P(o).call(o,function(t){i=t()}),i)}},{key:"show",value:function(t){if(!this.displayed)return this.redraw(t)}},{key:"hide",value:function(){if(this.displayed){var t=this.dom;t.box.remove?t.box.remove():t.box.parentNode&&t.box.parentNode.removeChild(t.box);t.line.remove?t.line.remove():t.line.parentNode&&t.line.parentNode.removeChild(t.line);t.dot.remove?t.dot.remove():t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot);this.displayed=!1}}},{key:"repositionXY",value:function(){function t(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(void 0!==e||void 0!==i){var n=n?-1*e:e;t.style.transform=void 0===i?"translateX(".concat(n,"px)"):void 0===e?"translateY(".concat(i,"px)"):Nd(n="translate(".concat(n,"px, ")).call(n,i,"px)")}}var e=this.options.rtl;t(this.dom.box,this.boxX,this.boxY,e);t(this.dom.dot,this.dotX,this.dotY,e);t(this.dom.line,this.lineX,this.lineY,e)}},{key:"repositionX",value:function(){var t=this.conversion.toScreen(this.data.start),e=(void 0===this.data.align?this.options:this.data).align,i=this.props.line.width,n=this.props.dot.width;if("right"==e){this.boxX=t-this.width;this.lineX=t-i;this.dotX=t-i/2-n/2}else if("left"==e){this.boxX=t;this.lineX=t;this.dotX=t+i/2-n/2}else{this.boxX=t-this.width/2;this.lineX=this.options.rtl?t-i:t-i/2;this.dotX=t-n/2}this.options.rtl?this.right=this.boxX:this.left=this.boxX;this.repositionXY()}},{key:"repositionY",value:function(){var t=this.options.orientation.item,e=this.dom.line.style;if("top"==t){t=this.parent.top+this.top+1;this.boxY=this.top||0;e.height="".concat(t,"px");e.bottom="";e.top="0"}else{t=this.parent.itemSet.props.height,t=t-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0);e.height="".concat(t,"px");e.top="";e.bottom="0"}this.dotY=-this.props.dot.height/2;this.repositionXY()}},{key:"getWidthLeft",value:function(){return this.width/2}},{key:"getWidthRight",value:function(){return this.width/2}}]);return r})(D);function h1(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}$i=(t=>{bh(r,t);var o=h1(r);function r(t,e,i){var n;g(this,r);n=o.call(this,t,e,i);n.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}};if(t&&null==t.start)throw new Error('Property "start" missing in item '.concat(t));return n}Jl(r,[{key:"isVisible",value:function(t){var e;return!this.cluster&&(e=this.width*t.getMillisecondsPerPixel(),this.data.start.getTime()+e>t.start)&&this.data.start<t.end}},{key:"_createDomElement",value:function(){if(!this.dom){this.dom={};this.dom.point=document.createElement("div");this.dom.content=document.createElement("div");this.dom.content.className="vis-item-content";this.dom.point.appendChild(this.dom.content);this.dom.dot=document.createElement("div");this.dom.point.appendChild(this.dom.dot);this.dom.point["vis-item"]=this;this.dirty=!0}}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.point.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.point)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content);this._updateDataAttributes(this.dom.point);this._updateStyle(this.dom.point);var t=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.point.className="vis-item vis-point".concat(t);this.dom.dot.className="vis-item vis-dot".concat(t)}}},{key:"_getDomComponentsSizes",value:function(){return{dot:{width:this.dom.dot.offsetWidth,height:this.dom.dot.offsetHeight},content:{width:this.dom.content.offsetWidth,height:this.dom.content.offsetHeight},point:{width:this.dom.point.offsetWidth,height:this.dom.point.offsetHeight}}}},{key:"_updateDomComponentsSizes",value:function(t){this.props.dot.width=t.dot.width;this.props.dot.height=t.dot.height;this.props.content.height=t.content.height;this.options.rtl?this.dom.content.style.marginRight="".concat(this.props.dot.width/2,"px"):this.dom.content.style.marginLeft="".concat(this.props.dot.width/2,"px");this.width=t.point.width;this.height=t.point.height;this.dom.dot.style.top="".concat((this.height-this.props.dot.height)/2,"px");var e=this.props.dot.width,e=this.options.rtl?e/2:e/2*-1;this.dom.dot.style.transform="translateX(".concat(e,"px");this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.point);this._repaintDragCenter();this._repaintDeleteButton(this.dom.point)}},{key:"redraw",value:function(t){var e,i,n=this,o=[I(o=this._createDomElement).call(o,this),I(o=this._appendDomElement).call(o,this),I(o=this._updateDirtyDomComponents).call(o,this),function(){n.dirty&&(e=n._getDomComponentsSizes())},function(){var t;n.dirty&&I(t=n._updateDomComponentsSizes).call(t,n)(e)},I(o=this._repaintDomAdditionals).call(o,this)];return t?o:(P(o).call(o,function(t){i=t()}),i)}},{key:"repositionXY",value:function(){function t(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];if(void 0!==e||void 0!==i){var n=n?-1*e:e;t.style.transform=void 0===i?"translateX(".concat(n,"px)"):void 0===e?"translateY(".concat(i,"px)"):Nd(n="translate(".concat(n,"px, ")).call(n,i,"px)")}}var e=this.options.rtl;t(this.dom.point,this.pointX,this.pointY,e)}},{key:"show",value:function(t){if(!this.displayed)return this.redraw(t)}},{key:"hide",value:function(){if(this.displayed){this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point);this.displayed=!1}}},{key:"repositionX",value:function(){var t=this.conversion.toScreen(this.data.start);this.pointX=t;this.options.rtl?this.right=t-this.props.dot.width:this.left=t-this.props.dot.width;this.repositionXY()}},{key:"repositionY",value:function(){var t=this.options.orientation.item;this.pointY="top"==t?this.top:this.parent.height-this.top-this.height;this.repositionXY()}},{key:"getWidthLeft",value:function(){return this.props.dot.width}},{key:"getWidthRight",value:function(){return this.props.dot.width}}]);return r})(D);function u1(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}var c1=(t=>{bh(r,t);var o=u1(r);function r(t,e,i){var n;g(this,r);n=o.call(this,t,e,i);n.props={content:{width:0}};n.overflow=!1;if(t){if(null==t.start)throw new Error('Property "start" missing in item '.concat(t.id));if(null==t.end)throw new Error('Property "end" missing in item '.concat(t.id))}return n}Jl(r,[{key:"isVisible",value:function(t){return!this.cluster&&this.data.start<t.end&&this.data.end>t.start}},{key:"_createDomElement",value:function(){if(!this.dom){this.dom={};this.dom.box=document.createElement("div");this.dom.frame=document.createElement("div");this.dom.frame.className="vis-item-overflow";this.dom.box.appendChild(this.dom.frame);this.dom.visibleFrame=document.createElement("div");this.dom.visibleFrame.className="vis-item-visible-frame";this.dom.box.appendChild(this.dom.visibleFrame);this.dom.content=document.createElement("div");this.dom.content.className="vis-item-content";this.dom.frame.appendChild(this.dom.content);this.dom.box["vis-item"]=this;this.dirty=!0}}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content);this._updateDataAttributes(this.dom.box);this._updateStyle(this.dom.box);var t=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className=this.baseClassName+t;this.dom.content.style.maxWidth="none"}}},{key:"_getDomComponentsSizes",value:function(){this.overflow="hidden"!==window.getComputedStyle(this.dom.frame).overflow;this.whiteSpace="nowrap"!==window.getComputedStyle(this.dom.content).whiteSpace;return{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}}},{key:"_updateDomComponentsSizes",value:function(t){this.props.content.width=t.content.width;this.height=t.box.height;this.dom.content.style.maxWidth="";this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box);this._repaintDeleteButton(this.dom.box);this._repaintDragCenter();this._repaintDragLeft();this._repaintDragRight()}},{key:"redraw",value:function(t){var e,i,n=this,o=[I(o=this._createDomElement).call(o,this),I(o=this._appendDomElement).call(o,this),I(o=this._updateDirtyDomComponents).call(o,this),function(){var t;n.dirty&&(e=I(t=n._getDomComponentsSizes).call(t,n)())},function(){var t;n.dirty&&I(t=n._updateDomComponentsSizes).call(t,n)(e)},I(o=this._repaintDomAdditionals).call(o,this)];return t?o:(P(o).call(o,function(t){i=t()}),i)}},{key:"show",value:function(t){if(!this.displayed)return this.redraw(t)}},{key:"hide",value:function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t);this.displayed=!1}}},{key:"repositionX",value:function(t){var e,i=this.parent.width,n=this.conversion.toScreen(this.data.start),o=this.conversion.toScreen(this.data.end),r=(void 0===this.data.align?this.options:this.data).align;if(!1!==this.data.limitSize&&(void 0===t||!0===t)){n<-i&&(n=-i);2*i<o&&(o=2*i)}var s=Math.max(Math.round(1e3*(o-n))/1e3,1);if(this.overflow){this.options.rtl?this.right=n:this.left=n;this.width=s+this.props.content.width;e=this.props.content.width}else{this.options.rtl?this.right=n:this.left=n;this.width=s;e=Math.min(o-n,this.props.content.width)}this.options.rtl?this.dom.box.style.transform="translateX(".concat(-1*this.right,"px)"):this.dom.box.style.transform="translateX(".concat(this.left,"px)");this.dom.box.style.width="".concat(s,"px");this.whiteSpace&&(this.height=this.dom.box.offsetHeight);switch(r){case"left":this.dom.content.style.transform="translateX(0)";break;case"right":if(this.options.rtl){var a=-1*Math.max(s-e,0);this.dom.content.style.transform="translateX(".concat(a,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max(s-e,0),"px)");break;case"center":if(this.options.rtl){var a=-1*Math.max((s-e)/2,0);this.dom.content.style.transform="translateX(".concat(a,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max((s-e)/2,0),"px)");break;default:a=this.overflow?0<o?Math.max(-n,0):-e:n<0?-n:0;if(this.options.rtl){var l=-1*a;this.dom.content.style.transform="translateX(".concat(l,"px)")}else this.dom.content.style.transform="translateX(".concat(a,"px)")}}},{key:"repositionY",value:function(){var t=this.options.orientation.item,e=this.dom.box;e.style.top="".concat("top"==t?this.top:this.parent.height-this.top-this.height,"px")}},{key:"_repaintDragLeft",value:function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left";t.dragLeftItem=this;this.dom.box.appendChild(t);this.dom.dragLeft=t}else if(!this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragLeft){this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft);this.dom.dragLeft=null}}},{key:"_repaintDragRight",value:function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right";t.dragRightItem=this;this.dom.box.appendChild(t);this.dom.dragRight=t}else if(!this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragRight){this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight);this.dom.dragRight=null}}}]);return r})(D);c1.prototype.baseClassName="vis-item vis-range";function d1(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}var p1=(t=>{bh(r,t);var o=d1(r);function r(t,e,i){var n;g(this,r);n=o.call(this,t,e,i);n.props={content:{width:0}};n.overflow=!1;if(t){if(null==t.start)throw new Error('Property "start" missing in item '.concat(t.id));if(null==t.end)throw new Error('Property "end" missing in item '.concat(t.id))}return n}Jl(r,[{key:"isVisible",value:function(t){return this.data.start<t.end&&this.data.end>t.start}},{key:"_createDomElement",value:function(){if(!this.dom){this.dom={};this.dom.box=document.createElement("div");this.dom.frame=document.createElement("div");this.dom.frame.className="vis-item-overflow";this.dom.box.appendChild(this.dom.frame);this.dom.content=document.createElement("div");this.dom.content.className="vis-item-content";this.dom.frame.appendChild(this.dom.content);this.dirty=!0}}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.box)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content);this._updateDataAttributes(this.dom.content);this._updateStyle(this.dom.box);var t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+t}}},{key:"_getDomComponentsSizes",value:function(){this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow;return{content:{width:this.dom.content.offsetWidth}}}},{key:"_updateDomComponentsSizes",value:function(t){this.props.content.width=t.content.width;this.height=0;this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){}},{key:"redraw",value:function(t){var e,i,n=this,o=[I(o=this._createDomElement).call(o,this),I(o=this._appendDomElement).call(o,this),I(o=this._updateDirtyDomComponents).call(o,this),function(){var t;n.dirty&&(e=I(t=n._getDomComponentsSizes).call(t,n)())},function(){var t;n.dirty&&I(t=n._updateDomComponentsSizes).call(t,n)(e)},I(o=this._repaintDomAdditionals).call(o,this)];return t?o:(P(o).call(o,function(t){i=t()}),i)}},{key:"repositionY",value:function(t){var e,i=this.options.orientation.item;if(void 0!==this.data.subgroup){var n=this.data.subgroup;this.dom.box.style.height="".concat(this.parent.subgroups[n].height,"px");this.dom.box.style.top="".concat("top"==i?this.parent.top+this.parent.subgroups[n].top:this.parent.top+this.parent.height-this.parent.subgroups[n].top-this.parent.subgroups[n].height,"px");this.dom.box.style.bottom=""}else if(this.parent instanceof r1){e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height);this.dom.box.style.bottom="bottom"==i?"0":"";this.dom.box.style.top="top"==i?"0":""}else{e=this.parent.height;this.dom.box.style.top="".concat(this.parent.top,"px");this.dom.box.style.bottom=""}this.dom.box.style.height="".concat(e,"px")}}]);return r})(D);p1.prototype.baseClassName="vis-item vis-background";p1.prototype.stack=!1;p1.prototype.show=c1.prototype.show;p1.prototype.hide=c1.prototype.hide;p1.prototype.repositionX=c1.prototype.repositionX;function f1(t){var e=t.every;return t===w1||y1(w1,t)&&e===w1.every?b1:e}var m1=(()=>{function i(t,e){g(this,i);this.container=t;this.overflowMethod=e||"cap";this.x=0;this.y=0;this.padding=5;this.hidden=!1;this.frame=document.createElement("div");this.frame.className="vis-tooltip";this.container.appendChild(this.frame)}Jl(i,[{key:"setPosition",value:function(t,e){this.x=gf(t);this.y=gf(e)}},{key:"setText",value:function(t){if(t instanceof Element){this.frame.innerHTML="";this.frame.appendChild(t)}else this.frame.innerHTML=F.xss(t)}},{key:"show",value:function(t){void 0===t&&(t=!0);if(!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,r=0,s=0;if("flip"==this.overflowMethod||"none"==this.overflowMethod){var a=!1,l=!0;if("flip"==this.overflowMethod){this.y-e<this.padding&&(l=!1);this.x+i>o-this.padding&&(a=!0)}r=a?this.x-i:this.x;s=l?this.y-e:this.y}else{s=this.y-e;s+e+this.padding>n&&(s=n-e-this.padding);s<this.padding&&(s=this.padding);r=this.x;r+i+this.padding>o&&(r=o-i-this.padding);r<this.padding&&(r=this.padding)}this.frame.style.left=r+"px";this.frame.style.top=s+"px";this.frame.style.visibility="visible";this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0;this.frame.style.left="0";this.frame.style.top="0";this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]);return i})(),g1={},vs={get exports(){return g1},set exports(t){g1=t}},xs=l,v1=tr.every,h=Eh,fs=h("every"),T=(xs({target:"Array",proto:!0,forced:!fs},{every:function(t){return v1(this,t,1<arguments.length?arguments[1]:void 0)}}),lh),In=T("Array").every,y1=Et,b1=In,w1=Array.prototype,is=f1,k1=(N=vs,N.exports=is,t(g1));function x1(t,e){var i,n,o,r=void 0!==Od&&Hc(t)||t["@@iterator"];if(r)return i=!0,n=!1,{s:function(){r=r.call(t)},n:function(){var t=r.next();i=t.done;return t},e:function(t){n=!0;o=t},f:function(){try{i||null==r.return||r.return()}finally{if(n)throw o}}};if(A(t)||(r=((t,e)=>{if(t){if("string"==typeof t)return _1(t,e);var i=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?jc(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_1(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,a=function(){};return{s:a,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _1(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function C1(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}var S1=(t=>{bh(r,t);var o=C1(r);function r(t,e,i){g(this,r);var n=Ep({},{fitOnDoubleClick:!0},i,{editable:!1}),n=o.call(this,t,e,n);n.props={content:{width:0,height:0}};if(!t||null==t.uiItems)throw new Error('Property "uiItems" missing in item '+t.id);n.id=Dy();n.group=t.group;n._setupRange();n.emitter=n.data.eventEmitter;n.range=n.data.range;n.attached=!1;n.isCluster=!0;n.data.isCluster=!0;return n}Jl(r,[{key:"hasItems",value:function(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}},{key:"setUiItems",value:function(t){this.detach();this.data.uiItems=t;this._setupRange();this.attach()}},{key:"isVisible",value:function(t){var e=this.data.end?this.data.end-this.data.start:0,i=this.width*t.getMillisecondsPerPixel(),e=Math.max(this.data.start.getTime()+e,this.data.start.getTime()+i);return this.data.start<t.end&&e>t.start&&this.hasItems()}},{key:"getData",value:function(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}},{key:"redraw",value:function(t){var e,i,n=[I(n=this._createDomElement).call(n,this),I(n=this._appendDomElement).call(n,this),I(n=this._updateDirtyDomComponents).call(n,this),I(n=function(){this.dirty&&(e=this._getDomComponentsSizes())}).call(n,this),I(n=function(){var t;this.dirty&&I(t=this._updateDomComponentsSizes).call(t,this)(e)}).call(n,this),I(n=this._repaintDomAdditionals).call(n,this)];return t?n:(P(n).call(n,function(t){i=t()}),i)}},{key:"show",value:function(){this.displayed||this.redraw()}},{key:"hide",value:function(){if(this.displayed){var t=this.dom;t.box.parentNode&&t.box.parentNode.removeChild(t.box);if(this.options.showStipes){t.line.parentNode&&t.line.parentNode.removeChild(t.line);t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot)}this.displayed=!1}}},{key:"repositionX",value:function(){var t=this.conversion.toScreen(this.data.start),e=this.data.end?this.conversion.toScreen(this.data.end):0;if(e)this.repositionXWithRanges(t,e);else{var i=(void 0===this.data.align?this.options:this.data).align;this.repositionXWithoutRanges(t,i)}if(this.options.showStipes){this.dom.line.style.display=this._isStipeVisible()?"block":"none";this.dom.dot.style.display=this._isStipeVisible()?"block":"none";this._isStipeVisible()&&this.repositionStype(t,e)}}},{key:"repositionStype",value:function(t,e){this.dom.line.style.display="block";this.dom.dot.style.display="block";var i=this.dom.line.offsetWidth,n=this.dom.dot.offsetWidth;if(e){var i=i+t+(e-t)/2,o=i-n/2,i=this.options.rtl?-1*i:i,o=this.options.rtl?-1*o:o;this.dom.line.style.transform="translateX(".concat(i,"px)");this.dom.dot.style.transform="translateX(".concat(o,"px)")}else{i=this.options.rtl?-1*t:t,o=this.options.rtl?-1*(t-n/2):t-n/2;this.dom.line.style.transform="translateX(".concat(i,"px)");this.dom.dot.style.transform="translateX(".concat(o,"px)")}}},{key:"repositionXWithoutRanges",value:function(t,e){if("right"==e)if(this.options.rtl){this.right=t-this.width;this.dom.box.style.right=this.right+"px"}else{this.left=t-this.width;this.dom.box.style.left=this.left+"px"}else if("left"==e)if(this.options.rtl){this.right=t;this.dom.box.style.right=this.right+"px"}else{this.left=t;this.dom.box.style.left=this.left+"px"}else if(this.options.rtl){this.right=t-this.width/2;this.dom.box.style.right=this.right+"px"}else{this.left=t-this.width/2;this.dom.box.style.left=this.left+"px"}}},{key:"repositionXWithRanges",value:function(t,e){var i=Math.round(Math.max(e-t+.5,1));this.options.rtl?this.right=t:this.left=t;this.width=Math.max(i,this.minWidth||0);this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px";this.dom.box.style.width=i+"px"}},{key:"repositionY",value:function(){var t=this.options.orientation.item,e=this.dom.box;e.style.top="top"==t?(this.top||0)+"px":(this.parent.height-this.top-this.height||0)+"px";if(this.options.showStipes){if("top"==t){this.dom.line.style.top="0";this.dom.line.style.height=this.parent.top+this.top+1+"px";this.dom.line.style.bottom=""}else{e=this.parent.itemSet.props.height,t=e-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=e-t+"px";this.dom.line.style.bottom="0"}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+"px"}}},{key:"getWidthLeft",value:function(){return this.width/2}},{key:"getWidthRight",value:function(){return this.width/2}},{key:"move",value:function(){this.repositionX();this.repositionY()}},{key:"attach",value:function(){var t,e,i=x1(this.data.uiItems);try{for(i.s();!(e=i.n()).done;){var n=e.value;n.cluster=this}}catch(t){i.e(t)}finally{i.f()}this.data.items=ju(t=this.data.uiItems).call(t,function(t){return t.data});this.attached=!0;this.dirty=!0}},{key:"detach",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(this.hasItems()){var e,i=x1(this.data.uiItems);try{for(i.s();!(e=i.n()).done;){var n=e.value;delete n.cluster}}catch(t){i.e(t)}finally{i.f()}this.attached=!1;if(t&&this.group){this.group.remove(this);this.group=null}this.data.items=[];this.dirty=!0}}},{key:"_onDoubleClick",value:function(){this._fit()}},{key:"_setupRange",value:function(){var t,e=ju(e=this.data.uiItems).call(e,function(t){return{start:t.data.start.valueOf(),end:(t.data.end||t.data.start).valueOf()}});this.data.min=Math.min.apply(Math,md(ju(e).call(e,function(t){return Math.min(t.start,t.end||t.start)})));this.data.max=Math.max.apply(Math,md(ju(e).call(e,function(t){return Math.max(t.start,t.end||t.start)})));e=ju(e=this.data.uiItems).call(e,function(t){return t.center}),e=Ku(e).call(e,function(t,e){return t+e},0)/this.data.uiItems.length;if(Ub(t=this.data.uiItems).call(t,function(t){return t.data.end})){this.data.start=new Date(this.data.min);this.data.end=new Date(this.data.max)}else{this.data.start=new Date(e);this.data.end=null}}},{key:"_getUiItems",value:function(){var t,e=this;return this.data.uiItems&&this.data.uiItems.length?M(t=this.data.uiItems).call(t,function(t){return t.cluster===e}):[]}},{key:"_createDomElement",value:function(){if(!this.dom){this.dom={};this.dom.box=document.createElement("DIV");this.dom.content=document.createElement("DIV");this.dom.content.className="vis-item-content";this.dom.box.appendChild(this.dom.content);if(this.options.showStipes){this.dom.line=document.createElement("DIV");this.dom.line.className="vis-cluster-line";this.dom.line.style.display="none";this.dom.dot=document.createElement("DIV");this.dom.dot.className="vis-cluster-dot";this.dom.dot.style.display="none"}var t;this.options.fitOnDoubleClick&&(this.dom.box.ondblclick=I(t=r.prototype._onDoubleClick).call(t,this));this.dom.box["vis-item"]=this;this.dirty=!0}}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}t=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content);this._updateDataAttributes(this.dom.box);this._updateStyle(this.dom.box);var t=this.baseClassName+" "+(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+" vis-readonly";this.dom.box.className="vis-item "+t;if(this.options.showStipes){this.dom.line.className="vis-item vis-cluster-line "+(this.selected?" vis-selected":"");this.dom.dot.className="vis-item vis-cluster-dot "+(this.selected?" vis-selected":"")}this.data.end&&(this.dom.content.style.maxWidth="none")}}},{key:"_getDomComponentsSizes",value:function(){var t={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};if(this.options.showStipes){t.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth};t.line={width:this.dom.line.offsetWidth}}return t}},{key:"_updateDomComponentsSizes",value:function(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px";this.data.end?this.minWidth=t.box.width:this.width=t.box.width;this.height=t.box.height;this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left;this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}},{key:"_isStipeVisible",value:function(){return this.minWidth>=this.width||!this.data.end}},{key:"_getFitRange",value:function(){var t=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-t,fitEnd:this.data.max+t}}},{key:"_fit",value:function(){if(this.emitter){var t=this._getFitRange(),e=t.fitStart,t=t.fitEnd,e={start:new Date(e),end:new Date(t),animation:!0};this.emitter.emit("fit",e)}}},{key:"_getItemData",value:function(){return this.data}}]);return r})(D);S1.prototype.baseClassName="vis-item vis-range vis-cluster";function D1(t,e){var i,n,o,r=void 0!==Od&&Hc(t)||t["@@iterator"];if(r)return i=!0,n=!1,{s:function(){r=r.call(t)},n:function(){var t=r.next();i=t.done;return t},e:function(t){n=!0;o=t},f:function(){try{i||null==r.return||r.return()}finally{if(n)throw o}}};if(A(t)||(r=((t,e)=>{if(t){if("string"==typeof t)return T1(t,e);var i=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?jc(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?T1(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,a=function(){};return{s:a,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T1(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var E1="__ungrouped__",O1=(()=>{function e(t){g(this,e);this.itemSet=t;this.groups={};this.cache={};this.cache[-1]=[]}Jl(e,[{key:"createClusterItem",value:function(t,e,i){var n=new S1(t,e,i);return n}},{key:"setItems",value:function(t,e){this.items=t||[];this.dataChanged=!0;this.applyOnChangedLevel=!1;e&&e.applyOnChangedLevel&&(this.applyOnChangedLevel=e.applyOnChangedLevel)}},{key:"updateData",value:function(){this.dataChanged=!0;this.applyOnChangedLevel=!1}},{key:"getClusters",value:function(t,e,i){var n="boolean"==typeof i?{}:i,o=n.maxItems,r=n.clusterCriteria,r=r||function(){return!0},o=o||1,n=-1,s=0;if(0<e){if(1<=e)return[];n=Math.abs(Math.round(Math.log(100/e)/Math.log(2)));s=Math.abs(Math.pow(2,n))}if(this.dataChanged){var a=n!=this.cacheLevel,a=!this.applyOnChangedLevel||a;if(a){this._dropLevelsCache();this._filterData()}}this.cacheLevel=n;var l=this.cache[n];if(!l){l=[];for(var h in this.groups)if(this.groups.hasOwnProperty(h))for(var u=this.groups[h],c=u.length,d=0;d<c;){for(var p=u[d],f=1,m=d-1;0<=m&&p.center-u[m].center<s/2;){!u[m].cluster&&r(p.data,u[m].data)&&f++;m--}for(var g=d+1;g<u.length&&u[g].center-p.center<s/2;){r(p.data,u[g].data)&&f++;g++}for(var v=l.length-1;0<=v&&p.center-l[v].center<s;){p.group==l[v].group&&r(p.data,l[v].data)&&f++;v--}if(o<f){for(var y=f-o+1,b=[],w=d;b.length<y&&w<u.length;){r(u[d].data,u[w].data)&&b.push(u[w]);w++}var k=this.itemSet.getGroupId(p.data),k=this.itemSet.groups[k]||this.itemSet.groups[E1],k=this._getClusterForItems(b,k,t,i);l.push(k);d+=y}else{delete p.cluster;d+=1}}this.cache[n]=l}return l}},{key:"_filterData",value:function(){var t={};this.groups=t;for(var e,i,n=0,o=nf(this.items);n<o.length;n++){var r=o[n],s=r.parent?r.parent.groupId:"",a=t[s];if(!a){a=[];t[s]=a}a.push(r);r.data.start&&(r.data.end?r.center=(r.data.start.valueOf()+r.data.end.valueOf())/2:r.center=r.data.start.valueOf())}for(e in t)t.hasOwnProperty(e)&&_b(i=t[e]).call(i,function(t,e){return t.center-e.center});this.dataChanged=!1}},{key:"_getClusterForItems",value:function(t,e,i,n){var o=ju(o=i||[]).call(o,function(t){var e;return{cluster:t,itemsIds:new Fw(ju(e=t.data.uiItems).call(e,function(t){return t.id}))}});if(o.length){var r,s=D1(o);try{for(s.s();!(r=s.n()).done;){var a=(()=>{var e=r.value;if(e.itemsIds.size===t.length&&k1(t).call(t,function(t){return e.itemsIds.has(t.id)}))return c=e.cluster,"break"})();if("break"===a)break}}catch(t){s.e(t)}finally{s.f()}}if(c){c.setUiItems(t);if(c.group!==e){c.group&&c.group.remove(c);if(e){e.add(c);c.group=e}}}else{var o=n.titleTemplate||"",l={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},o=o.replace(/{count}/,t.length),h='<div title="'+o+'">'+t.length+"</div>",u=Ep({},n,this.itemSet.options),h={content:h,title:o,group:e,uiItems:t,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range},c=this.createClusterItem(h,l,u);if(e){e.add(c);c.group=e}c.attach()}return c}},{key:"_dropLevelsCache",value:function(){this.cache={};this.cacheLevel=-1;this.cache[this.cacheLevel]=[]}}]);return e})();function A1(t,e){var i,n,o,r=void 0!==Od&&Hc(t)||t["@@iterator"];if(r)return i=!0,n=!1,{s:function(){r=r.call(t)},n:function(){var t=r.next();i=t.done;return t},e:function(t){n=!0;o=t},f:function(){try{i||null==r.return||r.return()}finally{if(n)throw o}}};if(A(t)||(r=((t,e)=>{if(t){if("string"==typeof t)return I1(t,e);var i=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?jc(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?I1(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,a=function(){};return{s:a,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function I1(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function P1(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}var M1="__ungrouped__",N1="__background__",F1=(t=>{bh(u,t);var o=P1(u);function u(t,e){var i;g(this,u);i=o.call(this);i.body=t;i.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap:function(t,e,i){var n=e.order;e.order=t.order;t.order=n},groupOrder:"order",selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:Qb.snap,onDropObjectOnItem:function(t,e,i){i(e)},onAdd:function(t,e){e(t)},onUpdate:function(t,e){e(t)},onMove:function(t,e){e(t)},onRemove:function(t,e){e(t)},onMoving:function(t,e){e(t)},onAddGroup:function(t,e){e(t)},onMoveGroup:function(t,e){e(t)},onRemoveGroup:function(t,e){e(t)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:500},tooltipOnItemUpdateTime:!1};i.options=F.extend({},i.defaultOptions);i.options.rtl=e.rtl;i.options.onTimeout=e.onTimeout;i.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime};i.dom={};i.props={};i.hammer=null;var n=th(i);i.itemsData=null;i.groupsData=null;i.itemsSettingTime=null;i.initialItemSetDrawn=!1;i.userContinueNotBail=null;i.sequentialSelection=!1;i.itemListeners={add:function(t,e,i){n._onAdd(e.items);n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1});n.redraw()},update:function(t,e,i){n._onUpdate(e.items);n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1});n.redraw()},remove:function(t,e,i){n._onRemove(e.items);n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1});n.redraw()}};i.groupListeners={add:function(t,e,o){n._onAddGroups(e.items);if(n.groupsData&&0<n.groupsData.length){var i,r=n.groupsData.getDataSet();P(i=r.get()).call(i,function(i){if(i.nestedGroups){0!=i.showNested&&(i.showNested=!0);var t,n=[];P(t=i.nestedGroups).call(t,function(t){var e=r.get(t);if(e){e.nestedInGroup=i.id;0==i.showNested&&(e.visible=!1);n=Nd(n).call(n,e)}});r.update(n,o)}})}},update:function(t,e,i){n._onUpdateGroups(e.items)},remove:function(t,e,i){n._onRemoveGroups(e.items)}};i.items={};i.groups={};i.groupIds=[];i.selection=[];i.popup=null;i.popupTimer=null;i.touchParams={};i.groupTouchParams={group:null,isDragging:!1};i._create();i.setOptions(e);i.clusters=[];return i}Jl(u,[{key:"_create",value:function(){var e=this,t=document.createElement("div");t.className="vis-itemset";t["vis-itemset"]=this;this.dom.frame=t;var i=document.createElement("div");i.className="vis-background";t.appendChild(i);this.dom.background=i;var i=document.createElement("div");i.className="vis-foreground";t.appendChild(i);this.dom.foreground=i;var t=document.createElement("div");t.className="vis-axis";this.dom.axis=t;var i=document.createElement("div");i.className="vis-labelset";this.dom.labelSet=i;this._updateUngrouped();var t=new r1(N1,null,this);t.show();this.groups[N1]=t;this.hammer=new $b(this.body.dom.centerContainer);this.hammer.on("hammer.input",function(t){t.isFirst&&e._onTouch(t)});this.hammer.on("panstart",I(i=this._onDragStart).call(i,this));this.hammer.on("panmove",I(t=this._onDrag).call(t,this));this.hammer.on("panend",I(i=this._onDragEnd).call(i,this));this.hammer.get("pan").set({threshold:5,direction:$b.ALL});this.hammer.get("press").set({time:1e4});this.hammer.on("tap",I(t=this._onSelectItem).call(t,this));this.hammer.on("press",I(i=this._onMultiSelectItem).call(i,this));this.hammer.get("press").set({time:1e4});this.hammer.on("doubletap",I(t=this._onAddItem).call(t,this));this.options.rtl?this.groupHammer=new $b(this.body.dom.rightContainer):this.groupHammer=new $b(this.body.dom.leftContainer);this.groupHammer.on("tap",I(i=this._onGroupClick).call(i,this));this.groupHammer.on("panstart",I(t=this._onGroupDragStart).call(t,this));this.groupHammer.on("panmove",I(i=this._onGroupDrag).call(i,this));this.groupHammer.on("panend",I(t=this._onGroupDragEnd).call(t,this));this.groupHammer.get("pan").set({threshold:5,direction:$b.DIRECTION_VERTICAL});this.body.dom.centerContainer.addEventListener("mouseover",I(i=this._onMouseOver).call(i,this));this.body.dom.centerContainer.addEventListener("mouseout",I(t=this._onMouseOut).call(t,this));this.body.dom.centerContainer.addEventListener("mousemove",I(i=this._onMouseMove).call(i,this));this.body.dom.centerContainer.addEventListener("contextmenu",I(t=this._onDragEnd).call(t,this));this.body.dom.centerContainer.addEventListener("mousewheel",I(i=this._onMouseWheel).call(i,this));this.show()}},{key:"setOptions",value:function(n){var o=this;if(n){var t;F.selectiveExtend(["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"],this.options,n);if("itemsAlwaysDraggable"in n)if("boolean"==typeof n.itemsAlwaysDraggable){this.options.itemsAlwaysDraggable.item=n.itemsAlwaysDraggable;this.options.itemsAlwaysDraggable.range=!1}else if("object"===O(n.itemsAlwaysDraggable)){F.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,n.itemsAlwaysDraggable);this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1)}"sequentialSelection"in n&&"boolean"==typeof n.sequentialSelection&&(this.options.sequentialSelection=n.sequentialSelection);"orientation"in n&&("string"==typeof n.orientation?this.options.orientation.item="top"===n.orientation?"top":"bottom":"object"===O(n.orientation)&&"item"in n.orientation&&(this.options.orientation.item=n.orientation.item));if("margin"in n)if("number"==typeof n.margin){this.options.margin.axis=n.margin;this.options.margin.item.horizontal=n.margin;this.options.margin.item.vertical=n.margin}else if("object"===O(n.margin)){F.selectiveExtend(["axis"],this.options.margin,n.margin);if("item"in n.margin)if("number"==typeof n.margin.item){this.options.margin.item.horizontal=n.margin.item;this.options.margin.item.vertical=n.margin.item}else"object"===O(n.margin.item)&&F.selectiveExtend(["horizontal","vertical"],this.options.margin.item,n.margin.item)}P(t=["locale","locales"]).call(t,function(t){t in n&&(o.options[t]=n[t])});if("editable"in n)if("boolean"==typeof n.editable){this.options.editable.updateTime=n.editable;this.options.editable.updateGroup=n.editable;this.options.editable.add=n.editable;this.options.editable.remove=n.editable;this.options.editable.overrideItems=!1}else"object"===O(n.editable)&&F.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,n.editable);if("groupEditable"in n)if("boolean"==typeof n.groupEditable){this.options.groupEditable.order=n.groupEditable;this.options.groupEditable.add=n.groupEditable;this.options.groupEditable.remove=n.groupEditable}else"object"===O(n.groupEditable)&&F.selectiveExtend(["order","add","remove"],this.options.groupEditable,n.groupEditable);P(t=["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"]).call(t,function(t){var e,i=n[t];if(i){if("function"!=typeof i)throw new Error(Nd(e="option ".concat(t," must be a function ")).call(e,t,"(item, callback)"));o.options[t]=i}});if(n.cluster){Ep(this.options,{cluster:n.cluster});this.clusterGenerator||(this.clusterGenerator=new O1(this));this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1});this.markDirty({refreshItems:!0,restackGroups:!0});this.redraw()}else if(this.clusterGenerator){this._detachAllClusters();this.clusters=[];this.clusterGenerator=null;this.options.cluster=void 0;this.markDirty({refreshItems:!0,restackGroups:!0});this.redraw()}else this.markDirty()}}},{key:"markDirty",value:function(t){this.groupIds=[];if(t){t.refreshItems&&P(F).call(F,this.items,function(t){t.dirty=!0;t.displayed&&t.redraw()});t.restackGroups&&P(F).call(F,this.groups,function(t,e){e!==N1&&(t.stackDirty=!0)})}}},{key:"destroy",value:function(){this.clearPopupTimer();this.hide();this.setItems(null);this.setGroups(null);this.hammer&&this.hammer.destroy();this.groupHammer&&this.groupHammer.destroy();this.hammer=null;this.body=null;this.conversion=null}},{key:"hide",value:function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame);this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis);this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}},{key:"show",value:function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame);this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis);this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right:this.body.dom.left).appendChild(this.dom.labelSet)}},{key:"setPopupTimer",value:function(t){this.clearPopupTimer();if(t){var e=this.options.tooltip.delay||"number"==typeof this.options.tooltip.delay?this.options.tooltip.delay:500;this.popupTimer=Hh(function(){t.show()},e)}}},{key:"clearPopupTimer",value:function(){if(null!=this.popupTimer){clearTimeout(this.popupTimer);this.popupTimer=null}}},{key:"setSelection",value:function(e){null==e&&(e=[]);A(e)||(e=[e]);var t,i=M(i=this.selection).call(i,function(t){return-1===Cf(e).call(e,t)}),n=A1(i);try{for(n.s();!(t=n.n()).done;){var o=t.value,r=this.getItemById(o);r&&r.unselect()}}catch(t){n.e(t)}finally{n.f()}this.selection=md(e);var s,a=A1(e);try{for(a.s();!(s=a.n()).done;){var l=s.value,h=this.getItemById(l);h&&h.select()}}catch(t){a.e(t)}finally{a.f()}}},{key:"getSelection",value:function(){var t;return Nd(t=this.selection).call(t,[])}},{key:"getVisibleItems",value:function(){var t,e,i=this.body.range.getRange();if(this.options.rtl){t=this.body.util.toScreen(i.start);e=this.body.util.toScreen(i.end)}else{e=this.body.util.toScreen(i.start);t=this.body.util.toScreen(i.end)}var n,o=[];for(n in this.groups)if(this.groups.hasOwnProperty(n)){var r,s=this.groups[n],s=s.isVisible?s.visibleItems:[],a=A1(s);try{for(a.s();!(r=a.n()).done;){var l=r.value;this.options.rtl?l.right<e&&l.right+l.width>t&&o.push(l.id):l.left<t&&l.left+l.width>e&&o.push(l.id)}}catch(t){a.e(t)}finally{a.f()}}return o}},{key:"getItemsAtCurrentTime",value:function(t){var e,i;if(this.options.rtl){e=this.body.util.toScreen(t);i=this.body.util.toScreen(t)}else{i=this.body.util.toScreen(t);e=this.body.util.toScreen(t)}var n,o=[];for(n in this.groups)if(this.groups.hasOwnProperty(n)){var r,s=this.groups[n],s=s.isVisible?s.visibleItems:[],a=A1(s);try{for(a.s();!(r=a.n()).done;){var l=r.value;this.options.rtl?l.right<i&&l.right+l.width>e&&o.push(l.id):l.left<e&&l.left+l.width>i&&o.push(l.id)}}catch(t){a.e(t)}finally{a.f()}}return o}},{key:"getVisibleGroups",value:function(){var t,e=[];for(t in this.groups)if(this.groups.hasOwnProperty(t)){var i=this.groups[t];i.isVisible&&e.push(t)}return e}},{key:"getItemById",value:function(e){var t;return this.items[e]||k0(t=this.clusters).call(t,function(t){return t.id===e})}},{key:"_deselect",value:function(t){for(var e=this.selection,i=0,n=e.length;i<n;i++)if(e[i]==t){gp(e).call(e,i,1);break}}},{key:"redraw",value:function(){var t=this.options.margin,n=this.body.range,e=F.option.asSize,i=this.options,o=i.orientation.item,r=!1,s=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top;this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left;s.className="vis-itemset";this.options.cluster&&this._clusterItems();var r=this._orderGroups()||r,a=n.end-n.start,l=a!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,h=n.start!=this.lastRangeStart,u=i.stack!=this.lastStack,c=i.stackSubgroups!=this.lastStackSubgroups,d=l||h||u||c;this.lastVisibleInterval=a;this.lastRangeStart=n.start;this.lastStack=i.stack;this.lastStackSubgroups=i.stackSubgroups;this.props.lastWidth=this.props.width;var p=this._firstGroup(),f={item:t.item,axis:t.axis},m={item:t.item,axis:t.item.vertical/2},g=0,l=t.axis+t.item.vertical,v=(this.groups[N1].redraw(n,m,d),{}),y=0,h=(P(F).call(F,this.groups,function(t,e){if(e!==N1){var i=t==p?f:m;v[e]=t.redraw(n,i,d,!0);y=v[e].length}}),0<y);if(h){for(var b={},w=0;w<y;w++)(i=>{P(F).call(F,v,function(t,e){b[e]=t[i]()})})(w);P(F).call(F,this.groups,function(t,e){if(e!==N1){var i=b[e];r=i||r;g+=t.height}});g=Math.max(g,l)}g=Math.max(g,l);s.style.height=e(g);this.props.width=s.offsetWidth;this.props.height=g;this.dom.axis.style.top=e("top"==o?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height);this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0";this.hammer.get("press").set({time:this.options.longSelectPressTime});this.initialItemSetDrawn=!0;r=this._isResized()||r;return r}},{key:"_firstGroup",value:function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,t=this.groupIds[t],t=this.groups[t]||this.groups[M1];return t||null}},{key:"_updateUngrouped",value:function(){var t,e,i=this.groups[M1];if(this.groupsData){if(i){i.dispose();delete this.groups[M1];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e];t.parent&&t.parent.remove(t);var n=this.getGroupId(t.data),n=this.groups[n];n&&n.add(t)||t.hide()}}}else if(!i){i=new n1(null,null,this);this.groups[M1]=i;for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e];i.add(t)}i.show()}}},{key:"getLabelSet",value:function(){return this.dom.labelSet}},{key:"setItems",value:function(t){this.itemsSettingTime=new Date;var e,i=this,n=this.itemsData;if(t){if(!Oy(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=My(t)}else this.itemsData=null;if(n){P(F).call(F,this.itemListeners,function(t,e){n.off(e,t)});n.dispose();e=n.getIds();this._onRemove(e)}if(this.itemsData){var o=this.id;P(F).call(F,this.itemListeners,function(t,e){i.itemsData.on(e,t,o)});e=this.itemsData.getIds();this._onAdd(e);this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})}},{key:"getItems",value:function(){return null!=this.itemsData?this.itemsData.rawDS:null}},{key:"setGroups",value:function(t){var e,i=this;if(this.groupsData){P(F).call(F,this.groupListeners,function(t,e){i.groupsData.off(e,t)});e=this.groupsData.getIds();this.groupsData=null;this._onRemoveGroups(e)}if(t){if(!Oy(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var n,o=this.groupsData.getDataSet(),r=(P(n=o.get()).call(n,function(i){var t;i.nestedGroups&&P(t=i.nestedGroups).call(t,function(t){var e=o.get(t);e.nestedInGroup=i.id;0==i.showNested&&(e.visible=!1);o.update(e)})}),this.id);P(F).call(F,this.groupListeners,function(t,e){i.groupsData.on(e,t,r)});e=this.groupsData.getIds();this._onAddGroups(e)}this._updateUngrouped();this._order();if(this.options.cluster){this.clusterGenerator.updateData();this._clusterItems();this.markDirty({refreshItems:!0,restackGroups:!0})}this.body.emitter.emit("_change",{queue:!0})}},{key:"getGroups",value:function(){return this.groupsData}},{key:"removeItem",value:function(e){var i=this,t=this.itemsData.get(e);t&&this.options.onRemove(t,function(t){t&&i.itemsData.remove(e)})}},{key:"_getType",value:function(t){return t.type||this.options.type||(t.end?"range":"box")}},{key:"getGroupId",value:function(t){var e=this._getType(t);return"background"==e&&null==t.group?N1:this.groupsData?t.group:M1}},{key:"_onUpdate",value:function(t){var s=this,a=this;P(t).call(t,function(t){var e,i=a.itemsData.get(t),n=a.items[t],o=i?a._getType(i):null,r=u.types[o];if(n)if(r&&n instanceof r)a._updateItem(n,i);else{e=n.selected;a._removeItem(n);n=null}if(!n&&i){if(!r)throw new TypeError('Unknown item type "'.concat(o,'"'));n=new r(i,a.conversion,a.options);n.id=t;a._addItem(n);if(e){s.selection.push(t);n.select()}}});this._order();if(this.options.cluster){this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1});this._clusterItems()}this.body.emitter.emit("_change",{queue:!0})}},{key:"_onRemove",value:function(t){var i=0,n=this;P(t).call(t,function(t){var e=n.items[t];if(e){i++;n._removeItem(e)}});if(i){this._order();this.body.emitter.emit("_change",{queue:!0})}}},{key:"_order",value:function(){P(F).call(F,this.groups,function(t){t.order()})}},{key:"_onUpdateGroups",value:function(t){this._onAddGroups(t)}},{key:"_onAddGroups",value:function(t){var s=this;P(t).call(t,function(t){var e=s.groupsData.get(t),i=s.groups[t];if(i)i.setData(e);else{if(t==M1||t==N1)throw new Error("Illegal group id. ".concat(t," is a reserved id."));var n,o=Ff(s.options);F.extend(o,{height:null});i=new n1(t,e,s);s.groups[t]=i;for(n in s.items)if(s.items.hasOwnProperty(n)){var r=s.items[n];r.data.group==t&&i.add(r)}i.order();i.show()}});this.body.emitter.emit("_change",{queue:!0})}},{key:"_onRemoveGroups",value:function(t){var i=this;P(t).call(t,function(t){var e=i.groups[t];if(e){e.dispose();delete i.groups[t]}});if(this.options.cluster){this.clusterGenerator.updateData();this._clusterItems()}this.markDirty({restackGroups:!!this.options.cluster});this.body.emitter.emit("_change",{queue:!0})}},{key:"_orderGroups",value:function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder}),t=this._orderNestedGroups(t),e=!F.equalArray(t,this.groupIds);if(e){var i=this.groups;P(t).call(t,function(t){i[t].hide()});P(t).call(t,function(t){i[t].show()});this.groupIds=t}return e}return!1}},{key:"_orderNestedGroups",value:function(t){var e=this;var i=M(t).call(t,function(t){return!e.groupsData.get(t).nestedInGroup});return function i(n,t){var o=[];P(t).call(t,function(e){o.push(e);var t=n.groupsData.get(e);if(t.nestedGroups){t=ju(t=n.groupsData.get({filter:function(t){return t.nestedInGroup==e},order:n.options.groupOrder})).call(t,function(t){return t.id});o=Nd(o).call(o,i(n,t))}});return o}(this,i)}},{key:"_addItem",value:function(t){this.items[t.id]=t;var e=this.getGroupId(t.data),e=this.groups[e];e?e.data&&e.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1;e&&e.add(t)}},{key:"_updateItem",value:function(t,e){t.setData(e);var i=this.getGroupId(t.data),i=this.groups[i];i?i.data&&i.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1}},{key:"_removeItem",value:function(t){var e;t.hide();delete this.items[t.id];var i=Cf(i=this.selection).call(i,t.id);-1!=i&&gp(e=this.selection).call(e,i,1);t.parent&&t.parent.remove(t);null!=this.popup&&this.popup.hide()}},{key:"_constructByEndArray",value:function(t){for(var e=[],i=0;i<t.length;i++)t[i]instanceof c1&&e.push(t[i]);return e}},{key:"_onTouch",value:function(t){this.touchParams.item=this.itemFromTarget(t);this.touchParams.dragLeftItem=t.target.dragLeftItem||!1;this.touchParams.dragRightItem=t.target.dragRightItem||!1;this.touchParams.itemProps=null}},{key:"_getGroupIndex",value:function(t){for(var e=0;e<this.groupIds.length;e++)if(t==this.groupIds[e])return e}},{key:"_onDragStart",value:function(n){var o=this;if(!this.touchParams.itemIsDragging){var t,e=this.touchParams.item||null,r=this;if(e&&(e.selected||this.options.itemsAlwaysDraggable.item)){if((!this.options.editable.overrideItems||this.options.editable.updateTime||this.options.editable.updateGroup)&&(null==e.editable||e.editable.updateTime||e.editable.updateGroup||this.options.editable.overrideItems)){var i=this.touchParams.dragLeftItem,s=this.touchParams.dragRightItem;this.touchParams.itemIsDragging=!0;this.touchParams.selectedItem=e;if(i){t={item:i,initialX:n.center.x,dragLeft:!0,data:this._cloneItemData(e.data)};this.touchParams.itemProps=[t]}else if(s){t={item:s,initialX:n.center.x,dragRight:!0,data:this._cloneItemData(e.data)};this.touchParams.itemProps=[t]}else if(this.options.editable.add&&(n.srcEvent.ctrlKey||n.srcEvent.metaKey))this._onDragStartAddItem(n);else{this.groupIds.length<1&&this.redraw();var a=this._getGroupIndex(e.data.group),i=this.options.itemsAlwaysDraggable.item&&!e.selected?[e.id]:this.getSelection();this.touchParams.itemProps=ju(i).call(i,function(t){var e=r.items[t],i=r._getGroupIndex(e.data.group);return{item:e,initialX:n.center.x,groupOffset:a-i,data:o._cloneItemData(e.data)}})}n.stopPropagation()}}else this.options.editable.add&&(n.srcEvent.ctrlKey||n.srcEvent.metaKey)&&this._onDragStartAddItem(n)}}},{key:"_onDragStartAddItem",value:function(t){var e=this.options.snap||null,i=this.dom.frame.getBoundingClientRect(),i=this.options.rtl?i.right-t.center.x+10:t.center.x-i.left-10,i=this.body.util.toTime(i),n=this.body.util.getScale(),o=this.body.util.getStep(),e=e?e(i,n,o):i,n=e,o={type:"range",start:e,end:n,content:"new item"},i=Dy(),e=(o[this.itemsData.idProp]=i,this.groupFromTarget(t)),n=(e&&(o.group=e.groupId),new c1(o,this.conversion,this.options));n.id=i;n.data=this._cloneItemData(o);this._addItem(n);this.touchParams.selectedItem=n;e={item:n,initialX:t.center.x,data:n.data};this.options.rtl?e.dragLeft=!0:e.dragRight=!0;this.touchParams.itemProps=[e];t.stopPropagation()}},{key:"_onDrag",value:function(l){var h=this;if(null!=this.popup&&this.options.showTooltips&&!this.popup.hidden){var t=this.body.dom.centerContainer,e=t.getBoundingClientRect();this.popup.setPosition(l.center.x-e.left+t.offsetLeft,l.center.y-e.top+t.offsetTop);this.popup.show()}if(this.touchParams.itemProps){l.stopPropagation();var u=this,c=this.options.snap||null,e=this.body.dom.root.offsetLeft,d=this.options.rtl?e+this.body.domProps.right.width:e+this.body.domProps.left.width,p=this.body.util.getScale(),f=this.body.util.getStep(),m=this.touchParams.selectedItem,g=(this.options.editable.overrideItems||null==m.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=m.editable&&m.editable.updateGroup,v=null;if(g&&m&&null!=m.data.group){t=u.groupFromTarget(l);t&&(v=this._getGroupIndex(t.groupId))}P(e=this.touchParams.itemProps).call(e,function(e){var t,i,n=u.body.util.toTime(l.center.x-d),o=u.body.util.toTime(e.initialX-d),n=h.options.rtl?-(n-o):n-o,o=h._cloneItemData(e.item.data);if(null==e.item.editable||e.item.editable.updateTime||e.item.editable.updateGroup||u.options.editable.overrideItems){var r=(h.options.editable.overrideItems||null==m.editable)&&h.options.editable.updateTime||!h.options.editable.overrideItems&&null!=m.editable&&m.editable.updateTime;if(r)if(e.dragLeft){if(h.options.rtl){if(null!=o.end){s=F.convert(e.data.end,"Date");a=new Date(s.valueOf()+n);o.end=c?c(a,p,f):a}}else if(null!=o.start){t=F.convert(e.data.start,"Date");i=new Date(t.valueOf()+n);o.start=c?c(i,p,f):i}}else if(e.dragRight){if(h.options.rtl){if(null!=o.start){t=F.convert(e.data.start,"Date");i=new Date(t.valueOf()+n);o.start=c?c(i,p,f):i}}else if(null!=o.end){s=F.convert(e.data.end,"Date");a=new Date(s.valueOf()+n);o.end=c?c(a,p,f):a}}else if(null!=o.start){t=F.convert(e.data.start,"Date").valueOf();i=new Date(t+n);if(null!=o.end){var s=F.convert(e.data.end,"Date"),r=s.valueOf()-t.valueOf();o.start=c?c(i,p,f):i;o.end=new Date(o.start.valueOf()+r)}else o.start=c?c(i,p,f):i}if(g&&!e.dragLeft&&!e.dragRight&&null!=v&&null!=o.group){var a=v-e.groupOffset,a=Math.max(0,a);a=Math.min(u.groupIds.length-1,a);o.group=u.groupIds[a]}o=h._cloneItemData(o);u.options.onMoving(o,function(t){t&&e.item.setData(h._cloneItemData(t,"Date"))})}});this.body.emitter.emit("_change")}}},{key:"_moveToGroup",value:function(t,e){var i=this.groups[e];if(i&&i.groupId!=t.data.group){var n=t.parent;n.remove(t);n.order();t.data.group=i.groupId;i.add(t);i.order()}}},{key:"_onDragEnd",value:function(t){var n=this;this.touchParams.itemIsDragging=!1;if(this.touchParams.itemProps){t.stopPropagation();var o=this,e=this.touchParams.itemProps;this.touchParams.itemProps=null;P(e).call(e,function(e){var i=e.item.id,t=null!=o.itemsData.get(i);if(t){t=n._cloneItemData(e.item.data);o.options.onMove(t,function(t){if(t){t[n.itemsData.idProp]=i;n.itemsData.update(t)}else{e.item.setData(e.data);o.body.emitter.emit("_change")}})}else o.options.onAdd(e.item.data,function(t){o._removeItem(e.item);t&&o.itemsData.add(t);o.body.emitter.emit("_change")})})}}},{key:"_onGroupClick",value:function(t){var e=this,i=this.groupFromTarget(t);Hh(function(){e.toggleGroupShowNested(i)},1)}},{key:"toggleGroupShowNested",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0;if(t&&t.nestedGroups){for(var i=this.groupsData.getDataSet(),n=(t.showNested=null!=e?!!e:!t.showNested,i.get(t.groupId)),o=(n.showNested=t.showNested,t.nestedGroups),r=o;0<r.length;){for(var s=r,r=[],a=0;a<s.length;a++){var l=i.get(s[a]);l.nestedGroups&&(r=Nd(r).call(r,l.nestedGroups))}0<r.length&&(o=Nd(o).call(o,r))}if(n.showNested){for(var h=i.get(n.nestedGroups),u=0;u<h.length;u++){var c=h[u];c.nestedGroups&&0<c.nestedGroups.length&&(null==c.showNested||1==c.showNested)&&h.push.apply(h,md(i.get(c.nestedGroups)))}d=ju(h).call(h,function(t){null==t.visible&&(t.visible=!0);t.visible=!!n.showNested;return t})}else var d=ju(e=i.get(o)).call(e,function(t){null==t.visible&&(t.visible=!0);t.visible=!!n.showNested;return t});i.update(Nd(d).call(d,n));if(n.showNested){F.removeClassName(t.dom.label,"collapsed");F.addClassName(t.dom.label,"expanded")}else{F.removeClassName(t.dom.label,"expanded");F.addClassName(t.dom.label,"collapsed")}}}},{key:"toggleGroupDragClassName",value:function(t){t.dom.label.classList.toggle("vis-group-is-dragging");t.dom.foreground.classList.toggle("vis-group-is-dragging")}},{key:"_onGroupDragStart",value:function(t){if(!this.groupTouchParams.isDragging&&this.options.groupEditable.order){this.groupTouchParams.group=this.groupFromTarget(t);if(this.groupTouchParams.group){t.stopPropagation();this.groupTouchParams.isDragging=!0;this.toggleGroupDragClassName(this.groupTouchParams.group);this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})}}}},{key:"_onGroupDrag",value:function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this.groupsData.getDataSet(),i=this.groupFromTarget(t);if(i&&i.height!=this.groupTouchParams.group.height){var n=i.top<this.groupTouchParams.group.top,o=t.center?t.center.y:t.clientY,r=i.dom.foreground.getBoundingClientRect(),s=this.groupTouchParams.group.height;if(n){if(r.top+s<o)return}else{n=i.height;if(r.top+n-s>o)return}}if(i&&i!=this.groupTouchParams.group){r=e.get(i.groupId),n=e.get(this.groupTouchParams.group.groupId);if(n&&r){this.options.groupOrderSwap(n,r,e);e.update(n);e.update(r)}var a=e.getIds({order:this.options.groupOrder});if(!F.equalArray(a,this.groupTouchParams.originalOrder))for(var l=this.groupTouchParams.originalOrder,h=this.groupTouchParams.group.groupId,u=Math.min(l.length,a.length),c=0,d=0,p=0;c<u;){for(;c+d<u&&c+p<u&&a[c+d]==l[c+p];)c++;if(u<=c+d)break;if(a[c+d]==h)d=1;else if(l[c+p]==h)p=1;else{var f=Cf(a).call(a,l[c+p]),m=e.get(a[c+d]),g=e.get(l[c+p]);this.options.groupOrderSwap(m,g,e);e.update(m);e.update(g);m=a[c+d];a[c+d]=l[c+p];a[f]=m;c++}}}}}},{key:"_onGroupDragEnd",value:function(t){this.groupTouchParams.isDragging=!1;if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var l=this,h=l.groupTouchParams.group.groupId,u=l.groupsData.getDataSet(),e=F.extend({},u.get(h));l.options.onMoveGroup(e,function(t){if(t){t[u._idProp]=h;u.update(t)}else{var e=u.getIds({order:l.options.groupOrder});if(!F.equalArray(e,l.groupTouchParams.originalOrder))for(var i=l.groupTouchParams.originalOrder,n=Math.min(i.length,e.length),o=0;o<n;){for(;o<n&&e[o]==i[o];)o++;if(n<=o)break;var r=Cf(e).call(e,i[o]),s=u.get(e[o]),a=u.get(i[o]);l.options.groupOrderSwap(s,a,u);u.update(s);u.update(a);s=e[o];e[o]=i[o];e[r]=s;o++}}});l.body.emitter.emit("groupDragged",{groupId:h});this.toggleGroupDragClassName(this.groupTouchParams.group);this.groupTouchParams.group=null}}},{key:"_onSelectItem",value:function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)this._onMultiSelectItem(t);else{e=this.getSelection(),i=this.itemFromTarget(t),i=i&&i.selectable?[i.id]:[],i=(this.setSelection(i),this.getSelection());(0<i.length||0<e.length)&&this.body.emitter.emit("select",{items:i,event:t})}}}},{key:"_onMouseOver",value:function(t){var e=this.itemFromTarget(t);if(e){var i=this.itemFromRelatedTarget(t);if(e!==i){i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new m1(this.body.dom.root,this.options.tooltip.overflowMethod||"flip"));this.popup.setText(i);var i=this.body.dom.centerContainer,n=i.getBoundingClientRect();this.popup.setPosition(t.clientX-n.left+i.offsetLeft,t.clientY-n.top+i.offsetTop);this.setPopupTimer(this.popup)}else{this.clearPopupTimer();null!=this.popup&&this.popup.hide()}this.body.emitter.emit("itemover",{item:e.id,event:t})}}}},{key:"_onMouseOut",value:function(t){var e=this.itemFromTarget(t);if(e){var i=this.itemFromRelatedTarget(t);if(e!==i){this.clearPopupTimer();null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemout",{item:e.id,event:t})}}}},{key:"_onMouseMove",value:function(t){var e=this.itemFromTarget(t);if(e){null!=this.popupTimer&&this.setPopupTimer(this.popup);if(this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden){var e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.clientX-i.left+e.offsetLeft,t.clientY-i.top+e.offsetTop);this.popup.show()}}}},{key:"_onMouseWheel",value:function(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)}},{key:"_onUpdateItem",value:function(t){if(this.options.selectable&&(this.options.editable.updateTime||this.options.editable.updateGroup)){var e=this;if(t){var i=e.itemsData.get(t.id);this.options.onUpdate(i,function(t){t&&e.itemsData.update(t)})}}}},{key:"_onDropObjectOnItem",value:function(t){var e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)}},{key:"_onAddItem",value:function(e){if(this.options.selectable&&this.options.editable.add){var t,i,n=this,o=this.options.snap||null,r=this.dom.frame.getBoundingClientRect(),r=this.options.rtl?r.right-e.center.x:e.center.x-r.left,s=this.body.util.toTime(r),a=this.body.util.getScale(),l=this.body.util.getStep();if("drop"==e.type){i=JSON.parse(e.dataTransfer.getData("text"));i.content=i.content||"new item";i.start=i.start||(o?o(s,a,l):s);i.type=i.type||"box";i[this.itemsData.idProp]=i.id||Dy();if("range"==i.type&&!i.end){t=this.body.util.toTime(r+this.props.width/5);i.end=o?o(t,a,l):t}}else{i={start:o?o(s,a,l):s,content:"new item"};i[this.itemsData.idProp]=Dy();if("range"===this.options.type){t=this.body.util.toTime(r+this.props.width/5);i.end=o?o(t,a,l):t}}s=this.groupFromTarget(e);s&&(i.group=s.groupId);i=this._cloneItemData(i);this.options.onAdd(i,function(t){if(t){n.itemsData.add(t);"drop"==e.type&&n.setSelection([t.id])}})}}},{key:"_onMultiSelectItem",value:function(t){var e=this;if(this.options.selectable){var i=this.itemFromTarget(t);if(i){var n=this.options.multiselect?this.getSelection():[],o=t.srcEvent&&t.srcEvent.shiftKey||!1;if((o||this.options.sequentialSelection)&&this.options.multiselect){var o=this.itemsData.get(i.id).group,r=void 0;this.options.multiselectPerGroup&&0<n.length&&(r=this.itemsData.get(n[0]).group);this.options.multiselectPerGroup&&null!=r&&r!=o||n.push(i.id);var s=u._getItemRange(this.itemsData.get(n));if(!this.options.multiselectPerGroup||r==o){n=[];for(var a in this.items)if(this.items.hasOwnProperty(a)){var a=this.items[a],l=a.data.start,h=void 0!==a.data.end?a.data.end:l;!(l>=s.min&&h<=s.max)||this.options.multiselectPerGroup&&r!=this.itemsData.get(a.id).group||a instanceof p1||n.push(a.id)}}}else{o=Cf(n).call(n,i.id);-1==o?n.push(i.id):gp(n).call(n,o,1)}i=M(n).call(n,function(t){return e.getItemById(t).selectable});this.setSelection(i);this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}}},{key:"itemFromElement",value:function(t){for(var e=t;e;){if(e.hasOwnProperty("vis-item"))return e["vis-item"];e=e.parentNode}return null}},{key:"itemFromTarget",value:function(t){return this.itemFromElement(t.target)}},{key:"itemFromRelatedTarget",value:function(t){return this.itemFromElement(t.relatedTarget)}},{key:"groupFromTarget",value:function(t){var e=t.center?t.center.y:t.clientY,i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(var n=0;n<i.length;n++){var o=i[n],o=this.groups[o],r=o.dom.foreground,s=r.getBoundingClientRect();if(e>=s.top&&e<s.top+r.offsetHeight)return o;if("top"===this.options.orientation.item){if(n===this.groupIds.length-1&&e>s.top)return o}else if(0===n&&e<s.top+r.offset)return o}return null}},{key:"_cloneItemData",value:function(t,e){var i=F.extend({},t);e=e||this.itemsData.type;null!=i.start&&(i.start=F.convert(i.start,e&&e.start||"Date"));null!=i.end&&(i.end=F.convert(i.end,e&&e.end||"Date"));return i}},{key:"_clusterItems",value:function(){if(this.options.cluster){var t=this.body.range.conversion(this.body.domProps.center.width),t=t.scale,t=this.clusterGenerator.getClusters(this.clusters,t,this.options.cluster);if(this.clusters!=t){this._detachAllClusters();if(t){var e,i=A1(t);try{for(i.s();!(e=i.n()).done;){var n=e.value;n.attach()}}catch(t){i.e(t)}finally{i.f()}this.clusters=t}this._updateClusters(t)}}}},{key:"_detachAllClusters",value:function(){if(this.options.cluster&&this.clusters&&this.clusters.length){var t,e=A1(this.clusters);try{for(e.s();!(t=e.n()).done;){var i=t.value;i.detach()}}catch(t){e.e(t)}finally{e.f()}}}},{key:"_updateClusters",value:function(t){if(this.clusters&&this.clusters.length){var e,i=new Fw(ju(t).call(t,function(t){return t.id})),n=M(n=this.clusters).call(n,function(t){return!i.has(t.id)}),o=!1,r=A1(n);try{for(r.s();!(e=r.n()).done;){var s,a,l=e.value,h=Cf(s=this.selection).call(s,l.id);if(-1!==h){l.unselect();gp(a=this.selection).call(a,h,1);o=!0}}}catch(t){r.e(t)}finally{r.f()}if(o){n=this.getSelection();this.body.emitter.emit("select",{items:n,event:event})}}this.clusters=t||[]}}],[{key:"_getItemRange",value:function(t){var e=null,i=null;P(t).call(t,function(t){(null==i||t.start<i)&&(i=t.start);null!=t.end?(null==e||t.end>e)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)});return{min:i,max:e}}},{key:"itemSetFromTarget",value:function(t){for(var e=t.target;e;){if(e.hasOwnProperty("vis-itemset"))return e["vis-itemset"];e=e.parentNode}return null}}]);return u})(x);F1.types={background:p1,box:c,range:c1,point:$i};F1.prototype._onAdd=F1.prototype._onUpdate;var R1,L1=!1,j1="background: #FFeeee; color: #dd0000",B1=(()=>{function d(){g(this,d)}Jl(d,null,[{key:"validate",value:function(t,e,i){L1=!1;R1=e;var n=e;void 0!==i&&(n=e[i]);d.parse(t,n,[]);return L1}},{key:"parse",value:function(t,e,i){for(var n in t)t.hasOwnProperty(n)&&d.check(n,t,e,i)}},{key:"check",value:function(t,e,i,n){if(void 0===i[t]&&void 0===i.__any__)d.getSuggestion(t,i,n);else{var o=t,r=!0;if(void 0===i[t]&&void 0!==i.__any__){o="__any__";r="object"===d.getType(e[t])}var s=i[o];r&&void 0!==s.__type__&&(s=s.__type__);d.checkFields(t,e,i,o,s,n)}}},{key:"checkFields",value:function(e,t,i,n,o,r){function s(t){console.log("%c"+t+d.printLocation(r,e),j1)}var a=d.getType(t[e]),l=o[a];if(void 0!==l){if("array"===d.getType(l)&&-1===Cf(l).call(l,t[e])){s('Invalid option detected in "'+e+'". Allowed values are:'+d.print(l)+' not "'+t[e]+'". ');L1=!0}else if("object"===a&&"__any__"!==n){r=F.copyAndExtendArray(r,e);d.parse(t[e],i[n],r)}}else if(void 0===o.any){s('Invalid type received for "'+e+'". Expected: '+d.print(Ju(o))+". Received ["+a+'] "'+t[e]+'"');L1=!0}}},{key:"getType",value:function(t){var e=O(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":A(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}},{key:"getSuggestion",value:function(t,e,i){var n=d.findInOptions(t,e,i,!1),o=d.findInOptions(t,R1,[],!0),o=void 0!==n.indexMatch?" in "+d.printLocation(n.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+n.indexMatch+'"?\n\n':o.distance<=4&&n.distance>o.distance?" in "+d.printLocation(n.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+d.printLocation(o.path,o.closestMatch,""):n.distance<=8?'. Did you mean "'+n.closestMatch+'"?'+d.printLocation(n.path,t):". Did you mean one of these: "+d.print(Ju(e))+d.printLocation(i,t);console.log('%cUnknown option detected: "'+t+'"'+o,j1);L1=!0}},{key:"findInOptions",value:function(t,e,i){var n,o=3<arguments.length&&void 0!==arguments[3]&&arguments[3],r=1e9,s="",a=[],l=t.toLowerCase(),h=void 0;for(n in e){var u;if(void 0!==e[n].__type__&&!0===o){var c=d.findInOptions(t,e[n],F.copyAndExtendArray(i,n));if(r>c.distance){s=c.closestMatch;a=c.path;r=c.distance;h=c.indexMatch}}else{-1!==Cf(c=n.toLowerCase()).call(c,l)&&(h=n);u=d.levenshteinDistance(t,n);if(u<r){s=n;a=F.copyArray(i);r=u}}}return{closestMatch:s,path:a,distance:r,indexMatch:h}}},{key:"printLocation",value:function(t,e){for(var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",n="\n\n"+i+"options = {\n",o=0;o<t.length;o++){for(var r=0;r<o+1;r++)n+=" ";n+=t[o]+": {\n"}for(var s=0;s<t.length+1;s++)n+=" ";n+=e+"\n";for(var a=0;a<t.length+1;a++){for(var l=0;l<t.length-a;l++)n+=" ";n+="}\n"}return n+"\n\n"}},{key:"print",value:function(t){return Bf(t).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}},{key:"levenshteinDistance",value:function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;for(var i,n=[],o=0;o<=e.length;o++)n[o]=[o];for(i=0;i<=t.length;i++)n[0][i]=i;for(o=1;o<=e.length;o++)for(i=1;i<=t.length;i++)e.charAt(o-1)==t.charAt(i-1)?n[o][i]=n[o-1][i-1]:n[o][i]=Math.min(n[o-1][i-1]+1,Math.min(n[o][i-1]+1,n[o-1][i]+1));return n[e.length][t.length]}}]);return d})(),_="string",s="boolean",v="number",mt="date",S="object",Ie="moment",z1={configure:{enabled:{boolean:s},filter:{boolean:s,function:"function"},container:{dom:"dom"},__type__:{object:S,boolean:s,function:"function"}},align:{string:_},alignCurrentTime:{string:_,undefined:"undefined"},rtl:{boolean:s,undefined:"undefined"},rollingMode:{follow:{boolean:s},offset:{number:v,undefined:"undefined"},__type__:{object:S}},onTimeout:{timeoutMs:{number:v},callback:{function:"function"},__type__:{object:S}},verticalScroll:{boolean:s,undefined:"undefined"},horizontalScroll:{boolean:s,undefined:"undefined"},autoResize:{boolean:s},throttleRedraw:{number:v},clickToUse:{boolean:s},dataAttributes:{string:_,array:"array"},editable:{add:{boolean:s,undefined:"undefined"},remove:{boolean:s,undefined:"undefined"},updateGroup:{boolean:s,undefined:"undefined"},updateTime:{boolean:s,undefined:"undefined"},overrideItems:{boolean:s,undefined:"undefined"},__type__:{boolean:s,object:S}},end:{number:v,date:mt,string:_,moment:Ie},format:{minorLabels:{millisecond:{string:_,undefined:"undefined"},second:{string:_,undefined:"undefined"},minute:{string:_,undefined:"undefined"},hour:{string:_,undefined:"undefined"},weekday:{string:_,undefined:"undefined"},day:{string:_,undefined:"undefined"},week:{string:_,undefined:"undefined"},month:{string:_,undefined:"undefined"},year:{string:_,undefined:"undefined"},__type__:{object:S,function:"function"}},majorLabels:{millisecond:{string:_,undefined:"undefined"},second:{string:_,undefined:"undefined"},minute:{string:_,undefined:"undefined"},hour:{string:_,undefined:"undefined"},weekday:{string:_,undefined:"undefined"},day:{string:_,undefined:"undefined"},week:{string:_,undefined:"undefined"},month:{string:_,undefined:"undefined"},year:{string:_,undefined:"undefined"},__type__:{object:S,function:"function"}},__type__:{object:S}},moment:{function:"function"},groupHeightMode:{string:_},groupOrder:{string:_,function:"function"},groupEditable:{add:{boolean:s,undefined:"undefined"},remove:{boolean:s,undefined:"undefined"},order:{boolean:s,undefined:"undefined"},__type__:{boolean:s,object:S}},groupOrderSwap:{function:"function"},height:{string:_,number:v},hiddenDates:{start:{date:mt,number:v,string:_,moment:Ie},end:{date:mt,number:v,string:_,moment:Ie},repeat:{string:_},__type__:{object:S,array:"array"}},itemsAlwaysDraggable:{item:{boolean:s,undefined:"undefined"},range:{boolean:s,undefined:"undefined"},__type__:{boolean:s,object:S}},limitSize:{boolean:s},locale:{string:_},locales:{__any__:{any:"any"},__type__:{object:S}},longSelectPressTime:{number:v},margin:{axis:{number:v},item:{horizontal:{number:v,undefined:"undefined"},vertical:{number:v,undefined:"undefined"},__type__:{object:S,number:v}},__type__:{object:S,number:v}},max:{date:mt,number:v,string:_,moment:Ie},maxHeight:{number:v,string:_},maxMinorChars:{number:v},min:{date:mt,number:v,string:_,moment:Ie},minHeight:{number:v,string:_},moveable:{boolean:s},multiselect:{boolean:s},multiselectPerGroup:{boolean:s},onAdd:{function:"function"},onDropObjectOnItem:{function:"function"},onUpdate:{function:"function"},onMove:{function:"function"},onMoving:{function:"function"},onRemove:{function:"function"},onAddGroup:{function:"function"},onMoveGroup:{function:"function"},onRemoveGroup:{function:"function"},onInitialDrawComplete:{function:"function"},order:{function:"function"},orientation:{axis:{string:_,undefined:"undefined"},item:{string:_,undefined:"undefined"},__type__:{string:_,object:S}},selectable:{boolean:s},sequentialSelection:{boolean:s},showCurrentTime:{boolean:s},showMajorLabels:{boolean:s},showMinorLabels:{boolean:s},showWeekScale:{boolean:s},stack:{boolean:s},stackSubgroups:{boolean:s},cluster:{maxItems:{number:v,undefined:"undefined"},titleTemplate:{string:_,undefined:"undefined"},clusterCriteria:{function:"function",undefined:"undefined"},showStipes:{boolean:s,undefined:"undefined"},fitOnDoubleClick:{boolean:s,undefined:"undefined"},__type__:{boolean:s,object:S}},snap:{function:"function",null:"null"},start:{date:mt,number:v,string:_,moment:Ie},template:{function:"function"},loadingScreenTemplate:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:_,function:"function"},showTooltips:{boolean:s},tooltip:{followMouse:{boolean:s},overflowMethod:{string:["cap","flip","none"]},delay:{number:v},template:{function:"function"},__type__:{object:S}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:s,object:S}},timeAxis:{scale:{string:_,undefined:"undefined"},step:{number:v,undefined:"undefined"},__type__:{object:S}},type:{string:_},width:{string:_,number:v},preferZoom:{boolean:s},zoomable:{boolean:s},zoomKey:{string:["ctrlKey","altKey","shiftKey","metaKey",""]},zoomFriction:{number:v},zoomMax:{number:v},zoomMin:{number:v},xss:{disabled:{boolean:s},filterOptions:{__any__:{any:"any"},__type__:{object:S}},__type__:{object:S}},__type__:{object:S}},H1={global:{align:["center","left","right"],alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}},groupHeightMode:["auto","fixed","fitItems"],groupsDraggable:!1,height:"",locale:"",longSelectPressTime:251,margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:"",showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","shiftKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],xss:{disabled:!1}}},G1={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},W1=(()=>{function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1;g(this,e);this.pixelRatio=t;this.generated=!1;this.centerCoordinates={x:144.5,y:144.5};this.r=289*.49;this.color={r:255,g:255,b:255,a:1};this.hueCircle=void 0;this.initialColor={r:255,g:255,b:255,a:1};this.previousColor=void 0;this.applied=!1;this.updateCallback=function(){};this.closeCallback=function(){};this._create()}Jl(e,[{key:"insertTo",value:function(t){if(void 0!==this.hammer){this.hammer.destroy();this.hammer=void 0}this.container=t;this.container.appendChild(this.frame);this._bindHammer();this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return G1[t]}},{key:"setColor",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i=this._isColorString(t);void 0!==i&&(t=i);if(!0===F.isString(t)){if(!0===F.isValidRGB(t))var i=t.substr(4).substr(0,t.length-5).split(","),n={r:i[0],g:i[1],b:i[2],a:1};else if(!0===F.isValidRGBA(t)){i=t.substr(5).substr(0,t.length-6).split(",");n={r:i[0],g:i[1],b:i[2],a:i[3]}}else if(!0===F.isValidHex(t)){i=F.hexToRGB(t);n={r:i.r,g:i.g,b:i.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){i=void 0!==t.a?t.a:"1.0";n={r:t.r,g:t.g,b:t.b,a:i}}if(void 0===n)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+Bf(t));this._setColor(n,e)}}},{key:"show",value:function(){if(void 0!==this.closeCallback){this.closeCallback();this.closeCallback=void 0}this.applied=!1;this.frame.style.display="block";this._generateHueCircle()}},{key:"_hide",value:function(){var t=this,e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];!0===e&&(this.previousColor=F.extend({},this.color));!0===this.applied&&this.updateCallback(this.initialColor);this.frame.style.display="none";Hh(function(){if(void 0!==t.closeCallback){t.closeCallback();t.closeCallback=void 0}},0)}},{key:"_save",value:function(){this.updateCallback(this.color);this.applied=!1;this._hide()}},{key:"_apply",value:function(){this.applied=!0;this.updateCallback(this.color);this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];!0===e&&(this.initialColor=F.extend({},t));this.color=t;var e=F.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,n=this.r*e.s,o=this.centerCoordinates.x+n*Math.sin(i*e.h),n=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px";this.colorPickerSelector.style.top=n-.5*this.colorPickerSelector.clientHeight+"px";this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100;this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=F.RGBToHSV(this.color.r,this.color.g,this.color.b),e=(e.v=t/100,F.HSVToRGB(e.h,e.s,e.v));e.a=this.color.a;this.color=e;this._updatePicker()}},{key:"_updatePicker",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.color,e=F.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1));i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o);i.putImageData(this.hueCircle,0,0);i.fillStyle="rgba(0,0,0,"+(1-e.v)+")";i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r);Xf(i).call(i);this.brightnessRange.value=100*e.v;this.opacityRange.value=100*t.a;this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")";this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%";this.colorPickerCanvas.style.height="100%";this.colorPickerCanvas.width=289*this.pixelRatio;this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){this.frame=document.createElement("div");this.frame.className="vis-color-picker";this.colorPickerDiv=document.createElement("div");this.colorPickerSelector=document.createElement("div");this.colorPickerSelector.className="vis-selector";this.colorPickerDiv.appendChild(this.colorPickerSelector);this.colorPickerCanvas=document.createElement("canvas");this.colorPickerDiv.appendChild(this.colorPickerCanvas);if(this.colorPickerCanvas.getContext){var t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1);this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var t=document.createElement("DIV");t.style.color="red";t.style.fontWeight="bold";t.style.padding="10px";t.innerHTML="Error: your browser does not support HTML canvas";this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color";this.opacityDiv=document.createElement("div");this.opacityDiv.className="vis-opacity";this.brightnessDiv=document.createElement("div");this.brightnessDiv.className="vis-brightness";this.arrowDiv=document.createElement("div");this.arrowDiv.className="vis-arrow";this.opacityRange=document.createElement("input");try{this.opacityRange.type="range";this.opacityRange.min="0";this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100";this.opacityRange.className="vis-range";this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range";this.brightnessRange.min="0";this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100";this.brightnessRange.className="vis-range";this.opacityDiv.appendChild(this.opacityRange);this.brightnessDiv.appendChild(this.brightnessRange);var e=this;this.opacityRange.onchange=function(){e._setOpacity(this.value)};this.opacityRange.oninput=function(){e._setOpacity(this.value)};this.brightnessRange.onchange=function(){e._setBrightness(this.value)};this.brightnessRange.oninput=function(){e._setBrightness(this.value)};this.brightnessLabel=document.createElement("div");this.brightnessLabel.className="vis-label vis-brightness";this.brightnessLabel.innerHTML="brightness:";this.opacityLabel=document.createElement("div");this.opacityLabel.className="vis-label vis-opacity";this.opacityLabel.innerHTML="opacity:";this.newColorDiv=document.createElement("div");this.newColorDiv.className="vis-new-color";this.newColorDiv.innerHTML="new";this.initialColorDiv=document.createElement("div");this.initialColorDiv.className="vis-initial-color";this.initialColorDiv.innerHTML="initial";this.cancelButton=document.createElement("div");this.cancelButton.className="vis-button vis-cancel";this.cancelButton.innerHTML="cancel";this.cancelButton.onclick=I(t=this._hide).call(t,this,!1);this.applyButton=document.createElement("div");this.applyButton.className="vis-button vis-apply";this.applyButton.innerHTML="apply";this.applyButton.onclick=I(t=this._apply).call(t,this);this.saveButton=document.createElement("div");this.saveButton.className="vis-button vis-save";this.saveButton.innerHTML="save";this.saveButton.onclick=I(t=this._save).call(t,this);this.loadButton=document.createElement("div");this.loadButton.className="vis-button vis-load";this.loadButton.innerHTML="load last";this.loadButton.onclick=I(t=this._loadLast).call(t,this);this.frame.appendChild(this.colorPickerDiv);this.frame.appendChild(this.arrowDiv);this.frame.appendChild(this.brightnessLabel);this.frame.appendChild(this.brightnessDiv);this.frame.appendChild(this.opacityLabel);this.frame.appendChild(this.opacityDiv);this.frame.appendChild(this.newColorDiv);this.frame.appendChild(this.initialColorDiv);this.frame.appendChild(this.cancelButton);this.frame.appendChild(this.applyButton);this.frame.appendChild(this.saveButton);this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={};this.pinch={};this.hammer=new $b(this.colorPickerCanvas);this.hammer.get("pinch").set({enable:!0});Zb(this.hammer,function(t){e._moveSelector(t)});this.hammer.on("tap",function(t){e._moveSelector(t)});this.hammer.on("panstart",function(t){e._moveSelector(t)});this.hammer.on("panmove",function(t){e._moveSelector(t)});this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1));t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e,i,n,o=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,o,r);this.centerCoordinates={x:.5*o,y:.5*r};this.r=.49*o;for(var s,a=2*Math.PI/360,l=1/this.r,h=0;h<360;h++)for(n=0;n<this.r;n++){e=this.centerCoordinates.x+n*Math.sin(a*h);i=this.centerCoordinates.y+n*Math.cos(a*h);s=F.HSVToRGB(h*(1/360),n*l,1);t.fillStyle="rgb("+s.r+","+s.g+","+s.b+")";t.fillRect(e-.5,i-.5,2,2)}t.strokeStyle="rgba(0,0,0,1)";t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r);t.stroke();this.hueCircle=t.getImageData(0,0,o,r)}this.generated=!0}},{key:"_moveSelector",value:function(t){var e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,e=t.center.y-e.top,n=.5*this.colorPickerDiv.clientHeight,o=.5*this.colorPickerDiv.clientWidth,i=i-o,e=e-n,r=Math.atan2(i,e),i=.98*Math.min(Math.sqrt(i*i+e*e),o),e=Math.cos(r)*i+n,n=Math.sin(r)*i+o;this.colorPickerSelector.style.top=e-.5*this.colorPickerSelector.clientHeight+"px";this.colorPickerSelector.style.left=n-.5*this.colorPickerSelector.clientWidth+"px";o=r/(2*Math.PI),o=o<0?1+o:o,e=i/this.r,n=F.RGBToHSV(this.color.r,this.color.g,this.color.b);n.h=o;n.s=e;r=F.HSVToRGB(n.h,n.s,n.v);r.a=this.color.a;this.color=r;this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")";this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]);return e})(),Y1=(()=>{function o(t,e,i){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1;g(this,o);this.parent=t;this.changedOptions=[];this.container=e;this.allowCreation=!1;this.options={};this.initialized=!1;this.popupCounter=0;this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0};F.extend(this.options,this.defaultOptions);this.configureOptions=i;this.moduleOptions={};this.domElements=[];this.popupDiv={};this.popupLimit=5;this.popupHistory={};this.colorPicker=new W1(n);this.wrapper=void 0}Jl(o,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={};this._removePopup();var e=!0;if("string"==typeof t)this.options.filter=t;else if(A(t))this.options.filter=t.join();else if("object"===O(t)){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container);void 0!==M(t)&&(this.options.filter=M(t));void 0!==t.showButton&&(this.options.showButton=t.showButton);void 0!==t.enabled&&(e=t.enabled)}else if("boolean"==typeof t){this.options.filter=!0;e=t}else if("function"==typeof t){this.options.filter=t;e=!0}!1===M(this.options)&&(e=!1);this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t;if(!0===this.options.enabled){this._clean();void 0!==this.options.container&&(this.container=this.options.container);this._create()}}},{key:"_create",value:function(){this._clean();this.changedOptions=[];var t,e=M(this.options),i=0,n=!1;for(t in this.configureOptions)if(this.configureOptions.hasOwnProperty(t)){this.allowCreation=!1;n=!1;if("function"==typeof e){n=e(t,[]);n=n||this._handleObject(this.configureOptions[t],[t],!0)}else!0!==e&&-1===Cf(e).call(e,t)||(n=!0);if(!1!==n){this.allowCreation=!0;0<i&&this._makeItem([]);this._makeHeader(t);this._handleObject(this.configureOptions[t],[t])}i++}this._makeButton();this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div");this.wrapper.className="vis-configuration-wrapper";this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);if(void 0!==this.wrapper){this.container.removeChild(this.wrapper);this.wrapper=void 0}this.domElements=[];this._removePopup()}},{key:"_getValue",value:function(t){for(var e=this.moduleOptions,i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}},{key:"_makeItem",value:function(t){if(!0!==this.allowCreation)return 0;var e=document.createElement("div");e.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var i=arguments.length,n=new Array(1<i?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];P(n).call(n,function(t){e.appendChild(t)});this.domElements.push(e);return this.domElements.length}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header";e.innerHTML=F.xss(t);this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");n.className="vis-configuration vis-config-label vis-config-s"+e.length;n.innerHTML=!0===i?F.xss("<i><b>"+t+":</b></i>"):F.xss(t+":");return n}},{key:"_makeDropdown",value:function(t,e,i){var n=document.createElement("select"),o=(n.className="vis-configuration vis-config-select",0);void 0!==e&&-1!==Cf(t).call(t,e)&&(o=Cf(t).call(t,e));for(var r=0;r<t.length;r++){var s=document.createElement("option");s.value=t[r];r===o&&(s.selected="selected");s.innerHTML=t[r];n.appendChild(s)}var a=this,l=(n.onchange=function(){a._update(this.value,i)},this._makeLabel(i[i.length-1],i));this._makeItem(i,l,n)}},{key:"_makeRange",value:function(t,e,i){var n=t[0],o=t[1],r=t[2],s=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range";a.min=o;a.max=r}catch(t){}a.step=s;var s="",l=0;if(void 0!==e){if(e<0&&1.2*e<o){a.min=Math.ceil(1.2*e);l=a.min;s="range increased"}else if(e/1.2<o){a.min=Math.ceil(e/1.2);l=a.min;s="range increased"}if(r<1.2*e&&1!==r){a.max=Math.ceil(1.2*e);l=a.max;s="range increased"}a.value=e}else a.value=n;var h=document.createElement("input");h.className="vis-configuration vis-config-rangeinput";h.value=Number(a.value);var u=this;a.onchange=function(){h.value=this.value;u._update(Number(this.value),i)};a.oninput=function(){h.value=this.value};o=this._makeLabel(i[i.length-1],i),r=this._makeItem(i,o,a,h);if(""!==s&&this.popupHistory[r]!==l){this.popupHistory[r]=l;this._setupPopup(s,r)}}},{key:"_makeButton",value:function(){var t=this;if(!0===this.options.showButton){var e=document.createElement("div");e.className="vis-configuration vis-config-button";e.innerHTML="generate options";e.onclick=function(){t._printOptions()};e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"};e.onmouseout=function(){e.className="vis-configuration vis-config-button"};this.optionsContainer=document.createElement("div");this.optionsContainer.className="vis-configuration vis-config-option-container";this.domElements.push(this.optionsContainer);this.domElements.push(e)}}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){var n=document.createElement("div");n.id="vis-configuration-popup";n.className="vis-configuration-popup";n.innerHTML=F.xss(t);n.onclick=function(){i._removePopup()};this.popupCounter+=1;this.popupDiv={html:n,index:e}}}},{key:"_removePopup",value:function(){if(void 0!==this.popupDiv.html){this.popupDiv.html.parentNode.removeChild(this.popupDiv.html);clearTimeout(this.popupDiv.hideTimeout);clearTimeout(this.popupDiv.deleteTimeout);this.popupDiv={}}}},{key:"_showPopupIfNeeded",value:function(){var t=this;if(void 0!==this.popupDiv.html){var e=this.domElements[this.popupDiv.index],e=e.getBoundingClientRect();this.popupDiv.html.style.left=e.left+"px";this.popupDiv.html.style.top=e.top-30+"px";document.body.appendChild(this.popupDiv.html);this.popupDiv.hideTimeout=Hh(function(){t.popupDiv.html.style.opacity=0},1500);this.popupDiv.deleteTimeout=Hh(function(){t._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(t,e,i){var n=document.createElement("input");n.type="checkbox";n.className="vis-configuration vis-config-checkbox";n.checked=t;if(void 0!==e){n.checked=e;e===t||"object"===O(t)&&e===t.enabled||this.changedOptions.push({path:i,value:e})}var o=this,r=(n.onchange=function(){o._update(this.checked,i)},this._makeLabel(i[i.length-1],i));this._makeItem(i,r,n)}},{key:"_makeTextInput",value:function(t,e,i){var n=document.createElement("input");n.type="text";n.className="vis-configuration vis-config-text";n.value=e;e!==t&&this.changedOptions.push({path:i,value:e});var o=this,r=(n.onchange=function(){o._update(this.value,i)},this._makeLabel(i[i.length-1],i));this._makeItem(i,r,n)}},{key:"_makeColorField",value:function(t,e,i){var n=this,o=t[1],r=document.createElement("div");e=void 0===e?o:e;if("none"!==e){r.className="vis-configuration vis-config-colorBlock";r.style.backgroundColor=e}else r.className="vis-configuration vis-config-colorBlock none";e=void 0===e?o:e;r.onclick=function(){n._showColorPicker(e,r,i)};o=this._makeLabel(i[i.length-1],i);this._makeItem(i,o,r)}},{key:"_showColorPicker",value:function(t,i,n){var o=this;i.onclick=function(){};this.colorPicker.insertTo(i);this.colorPicker.show();this.colorPicker.setColor(t);this.colorPicker.setUpdateCallback(function(t){var e="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";i.style.backgroundColor=e;o._update(e,n)});this.colorPicker.setCloseCallback(function(){i.onclick=function(){o._showColorPicker(t,i,n)}})}},{key:"_handleObject",value:function(t){var e,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o=!1,r=M(this.options),s=!1;for(e in t)if(t.hasOwnProperty(e)){var o=!0,a=t[e],l=F.copyAndExtendArray(i,e);if("function"==typeof r){o=r(e,i);if(!1===o&&!A(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object){this.allowCreation=!1;o=this._handleObject(a,l,!0);this.allowCreation=!1===n}}if(!1!==o){var s=!0,h=this._getValue(l);if(A(a))this._handleArray(a,h,l);else if("string"==typeof a)this._makeTextInput(a,h,l);else if("boolean"==typeof a)this._makeCheckbox(a,h,l);else if(a instanceof Object){h=!0;-1!==Cf(i).call(i,"physics")&&this.moduleOptions.physics.solver!==e&&(h=!1);if(!0===h)if(void 0!==a.enabled){h=F.copyAndExtendArray(l,"enabled"),h=this._getValue(h);if(!0===h){var u=this._makeLabel(e,l,!0);this._makeItem(l,u);s=this._handleObject(a,l)||s}else this._makeCheckbox(a,h,l)}else{u=this._makeLabel(e,l,!0);this._makeItem(l,u);s=this._handleObject(a,l)||s}}else console.error("dont know how to handle",a,e,l)}}return s}},{key:"_handleArray",value:function(t,e,i){if("string"==typeof t[0]&&"color"===t[0]){this._makeColorField(t,e,i);t[1]!==e&&this.changedOptions.push({path:i,value:e})}else if("string"==typeof t[0]){this._makeDropdown(t,e,i);t[0]!==e&&this.changedOptions.push({path:i,value:e})}else if("number"==typeof t[0]){this._makeRange(t,e,i);t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)})}}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i);this.initialized=!0;this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=i;t="true"===t||t;t="false"!==t&&t;for(var o=0;o<e.length;o++)if("global"!==e[o]){void 0===n[e[o]]&&(n[e[o]]={});o!==e.length-1?n=n[e[o]]:n[e[o]]=t}return i}},{key:"_printOptions",value:function(){var t=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+Bf(t,null,2)+"</pre>"}},{key:"getOptions",value:function(){for(var t={},e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}]);return o})();function V1(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}o=(t=>{bh(p,t);var d=V1(p);function p(t,e,i,n){var o;g(this,p);o=d.call(this);o.initTime=new Date;o.itemsDone=!1;if(!(th(o)instanceof p))throw new SyntaxError("Constructor must be called with the new operator");if(!A(i)&&!Oy(i)&&i instanceof Object){var r=n;n=i;i=r}n&&n.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var s=th(o);o.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:"bottom",item:"bottom"},moment:Zh};o.options=F.deepExtend({},o.defaultOptions);n&&F.setupXSSProtection(n.xss);o._create(t);if(n&&void 0!==n.rtl)o.options.rtl=n.rtl;else{o.dom.root.style.visibility="hidden";for(var a,l=o.dom.root;!a&&l;){a=window.getComputedStyle(l,null).direction;l=l.parentElement}o.options.rtl=a&&"rtl"==a.toLowerCase()}if(n){n.rollingMode&&(o.options.rollingMode=n.rollingMode);n.onInitialDrawComplete&&(o.options.onInitialDrawComplete=n.onInitialDrawComplete);n.onTimeout&&(o.options.onTimeout=n.onTimeout);n.loadingScreenTemplate&&(o.options.loadingScreenTemplate=n.loadingScreenTemplate)}var r=document.createElement("div");if(o.options.loadingScreenTemplate){var h=I(h=o.options.loadingScreenTemplate).call(h,th(o)),u=h(o.dom.loadingScreen);if(u instanceof Object&&!(u instanceof Element))h(r);else if(u instanceof Element){r.innerHTML="";r.appendChild(u)}else null!=u&&(r.innerHTML=F.xss(u))}o.dom.loadingScreen.appendChild(r);o.components=[];o.body={dom:o.dom,domProps:o.props,emitter:{on:I(h=o.on).call(h,th(o)),off:I(u=o.off).call(u,th(o)),emit:I(r=o.emit).call(r,th(o))},hiddenDates:[],util:{getScale:function(){return s.timeAxis.step.scale},getStep:function(){return s.timeAxis.step.step},toScreen:I(h=s._toScreen).call(h,s),toGlobalScreen:I(u=s._toGlobalScreen).call(u,s),toTime:I(r=s._toTime).call(r,s),toGlobalTime:I(h=s._toGlobalTime).call(h,s)}};o.range=new jb(o.body,o.options);o.components.push(o.range);o.body.range=o.range;o.timeAxis=new t0(o.body,o.options);o.timeAxis2=null;o.components.push(o.timeAxis);o.currentTime=new h0(o.body,o.options);o.components.push(o.currentTime);o.itemSet=new F1(o.body,o.options);o.components.push(o.itemSet);o.itemsData=null;o.groupsData=null;function c(t,e){s.hasListeners(t)&&s.emit(t,s.getEventProperties(e))}o.dom.root.onclick=function(t){c("click",t)};o.dom.root.ondblclick=function(t){c("doubleClick",t)};o.dom.root.oncontextmenu=function(t){c("contextmenu",t)};o.dom.root.onmouseover=function(t){c("mouseOver",t)};if(window.PointerEvent){o.dom.root.onpointerdown=function(t){c("mouseDown",t)};o.dom.root.onpointermove=function(t){c("mouseMove",t)};o.dom.root.onpointerup=function(t){c("mouseUp",t)}}else{o.dom.root.onmousemove=function(t){c("mouseMove",t)};o.dom.root.onmousedown=function(t){c("mouseDown",t)};o.dom.root.onmouseup=function(t){c("mouseUp",t)}}o.initialFitDone=!1;o.on("changed",function(){if(null!=s.itemsData){if(!s.initialFitDone&&!s.options.rollingMode){s.initialFitDone=!0;if(null!=s.options.start||null!=s.options.end){null!=s.options.start&&null!=s.options.end||(e=s.getItemRange());var t=null!=s.options.start?s.options.start:e.min,e=null!=s.options.end?s.options.end:e.max;s.setWindow(t,e,{animation:!1})}else s.fit({animation:!1})}if(!s.initialDrawDone&&(s.initialRangeChangeDone||!s.options.start&&!s.options.end||s.options.rollingMode)){s.initialDrawDone=!0;s.itemSet.initialDrawDone=!0;s.dom.root.style.visibility="visible";s.dom.loadingScreen.parentNode.removeChild(s.dom.loadingScreen);s.options.onInitialDrawComplete&&Hh(function(){return s.options.onInitialDrawComplete()},0)}}});o.on("destroyTimeline",function(){s.destroy()});n&&o.setOptions(n);o.body.emitter.on("fit",function(t){o._onFit(t);o.redraw()});i&&o.setGroups(i);e&&o.setItems(e);o._redraw();return o}Jl(p,[{key:"_createConfigurator",value:function(){return new Y1(this,this.dom.container,H1)}},{key:"redraw",value:function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0});this._redraw()}},{key:"setOptions",value:function(t){var e=B1.validate(t,z1);!0===e&&console.log("%cErrors have been found in the supplied options object.",j1);a0.prototype.setOptions.call(this,t);if("type"in t&&t.type!==this.options.type){this.options.type=t.type;e=this.itemsData;if(e){var i=this.getSelection();this.setItems(null);this.setItems(e.rawDS);this.setSelection(i)}}}},{key:"setItems",value:function(t){this.itemsDone=!1;var e=t?Oy(t)?My(t):My(new B.DataSet(t)):null;this.itemsData&&this.itemsData.dispose();this.itemsData=e;this.itemSet&&this.itemSet.setItems(null!=e?e.rawDS:null)}},{key:"setGroups",value:function(t){var e;if(t){A(t)&&(t=new B.DataSet(t));e=new B.DataView(t,{filter:function(t){return!1!==t.visible}})}else e=null;null!=this.groupsData&&"function"==typeof this.groupsData.setData&&this.groupsData.setData(null);this.groupsData=e;this.itemSet.setGroups(e)}},{key:"setData",value:function(t){t&&t.groups&&this.setGroups(t.groups);t&&t.items&&this.setItems(t.items)}},{key:"setSelection",value:function(t,e){this.itemSet&&this.itemSet.setSelection(t);e&&e.focus&&this.focus(t,e)}},{key:"getSelection",value:function(){return this.itemSet&&this.itemSet.getSelection()||[]}},{key:"focus",value:function(t,e){if(this.itemsData&&null!=t){var i=A(t)?t:[t],n=this.itemsData.get(i),o=null,r=null;P(n).call(n,function(t){var e=t.start.valueOf(),i=("end"in t?t.end:t.start).valueOf();(null===o||e<o)&&(o=e);(null===r||r<i)&&(r=i)});if(null!==o&&null!==r){var s=this,a=this.itemSet.items[i[0]],l=-1*this._getScrollTop(),h=null,u=function(){var t=q1(s,a);if(t.shouldScroll&&t.itemTop!=h.itemTop){s._setScrollTop(-t.scrollOffset);s._redraw()}},n=!e||void 0===e.zoom||e.zoom,i=(o+r)/2,n=n?1.1*(r-o):Math.max(this.range.end-this.range.start,1.1*(r-o)),c=!e||void 0===e.animation||e.animation;c||(h={shouldScroll:!1,scrollOffset:-1,itemTop:-1});this.range.setRange(i-n/2,i+n/2,{animation:c},function(){u();Hh(u,100)},function(t,e,i){var n=q1(s,a);if(!1!==n){h=h||n;if(h.itemTop!=n.itemTop||h.shouldScroll){if(h.itemTop!=n.itemTop&&n.shouldScroll){h=n;l=-1*s._getScrollTop()}var n=l,o=h.scrollOffset,o=i?o:n+(o-n)*t;s._setScrollTop(-o);e||s._redraw()}}})}}}},{key:"fit",value:function(t,e){var i,n=!t||void 0===t.animation||t.animation;if(1===this.itemsData.length&&void 0===this.itemsData.get()[0].end){i=this.getDataRange();this.moveTo(i.min.valueOf(),{animation:n},e)}else{i=this.getItemRange();this.range.setRange(i.min,i.max,{animation:n},e)}}},{key:"getItemRange",value:function(){var r=this,t=this.getDataRange(),s=null!==t.min?t.min.valueOf():null,a=null!==t.max?t.max.valueOf():null,l=null,h=null;if(null!=s&&null!=a){var t=a-s,u=(t<=0&&(t=10),t/this.props.center.width),i={},n=0,e=(P(F).call(F,this.itemSet.items,function(t,e){if(t.groupShowing){i[e]=t.redraw(!0);n=i[e].length}}),0<n);if(e)for(var o=0;o<n;o++)(e=>{P(F).call(F,i,function(t){t[e]()})})(o);P(F).call(F,this.itemSet.items,function(t){var e,i,n=U1(t),o=X1(t);if(r.options.rtl){e=n-(t.getWidthRight()+10)*u;i=o+(t.getWidthLeft()+10)*u}else{e=n-(t.getWidthLeft()+10)*u;i=o+(t.getWidthRight()+10)*u}if(e<s){s=e;l=t}if(a<i){a=i;h=t}});if(l&&h){var e=l.getWidthLeft()+10,c=h.getWidthRight()+10,d=this.props.center.width-e-c;if(0<d)if(this.options.rtl){s=U1(l)-c*t/d;a=X1(h)+e*t/d}else{s=U1(l)-e*t/d;a=X1(h)+c*t/d}}}return{min:null!=s?new Date(s):null,max:null!=a?new Date(a):null}}},{key:"getDataRange",value:function(){var t,n=null,o=null;this.itemsData&&P(t=this.itemsData).call(t,function(t){var e=F.convert(t.start,"Date").valueOf(),i=F.convert(null!=t.end?t.end:t.start,"Date").valueOf();(null===n||e<n)&&(n=e);(null===o||o<i)&&(o=i)});return{min:null!=n?new Date(n):null,max:null!=o?new Date(o):null}}},{key:"getEventProperties",value:function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=this.dom.centerContainer.getBoundingClientRect(),e=this.options.rtl?n.right-e:e-n.left,i=i-n.top,n=this.itemSet.itemFromTarget(t),o=this.itemSet.groupFromTarget(t),r=s0.customTimeFromTarget(t),s=this.itemSet.options.snap||null,a=this.body.util.getScale(),l=this.body.util.getStep(),h=this._toTime(e),s=s?s(h,a,l):h,a=F.getTarget(t),l=null;null!=n?l="item":null!=r?l="custom-time":F.hasParent(a,this.timeAxis.dom.foreground)||this.timeAxis2&&F.hasParent(a,this.timeAxis2.dom.foreground)?l="axis":F.hasParent(a,this.itemSet.dom.labelSet)?l="group-label":F.hasParent(a,this.currentTime.bar)?l="current-time":F.hasParent(a,this.dom.center)&&(l="background");return{event:t,item:n?n.id:null,isCluster:!!n&&!!n.isCluster,items:n?n.items||[]:null,group:o?o.groupId:null,customTime:r?r.options.id:null,what:l,pageX:(t.srcEvent||t).pageX,pageY:(t.srcEvent||t).pageY,x:e,y:i,time:h,snappedTime:s}}},{key:"toggleRollingMode",value:function(){if(this.range.rolling)this.range.stopRolling();else{null==this.options.rollingMode&&this.setOptions(this.options);this.range.startRolling()}}},{key:"_redraw",value:function(){a0.prototype._redraw.call(this)}},{key:"_onFit",value:function(t){var e=t.start,i=t.end,n=t.animation;i?this.range.setRange(e,i,{animation:n}):this.moveTo(e.valueOf(),{animation:n})}}]);return p})(a0);function U1(t){return F.convert(t.data.start,"Date").valueOf()}function X1(t){var e=null!=t.data.end?t.data.end:t.data.start;return F.convert(e,"Date").valueOf()}function q1(t,e){if(!e.parent)return!1;function i(){return"bottom"==l?r.height-e.top-e.height:e.top}var n=(t.options.rtl?t.props.rightContainer:t.props.leftContainer).height,o=t.props.center.height,r=e.parent,s=r.top,a=!0,l=t.timeAxis.options.orientation.axis,h=-1*t._getScrollTop(),u=s+i(),c=e.height;u<h?s+n<=s+i()+c&&(s+=i()-t.itemSet.options.margin.item.vertical):h+n<u+c?s+=i()+c-n+t.itemSet.options.margin.item.vertical:a=!1;s=Math.min(s,o-n);return{shouldScroll:a,scrollOffset:s,itemTop:u}}function K1(t){for(var e in t)if(t.hasOwnProperty(e)){t[e].redundant=t[e].used;t[e].used=[]}}function $1(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i<t[e].redundant.length;i++)t[e].redundant[i].parentNode.removeChild(t[e].redundant[i]);t[e].redundant=[]}}function Z1(t,e,i){var n;if(e.hasOwnProperty(t))if(0<e[t].redundant.length){n=e[t].redundant[0];e[t].redundant.shift()}else{n=document.createElementNS("http://www.w3.org/2000/svg",t);i.appendChild(n)}else{n=document.createElementNS("http://www.w3.org/2000/svg",t);e[t]={used:[],redundant:[]};i.appendChild(n)}e[t].used.push(n);return n}function Q1(t,e,i,n){var o;if(e.hasOwnProperty(t))if(0<e[t].redundant.length){o=e[t].redundant[0];e[t].redundant.shift()}else{o=document.createElement(t);void 0!==n?i.insertBefore(o,n):i.appendChild(o)}else{o=document.createElement(t);e[t]={used:[],redundant:[]};void 0!==n?i.insertBefore(o,n):i.appendChild(o)}e[t].used.push(o);return o}function J1(t,e,i,n,o,r){if("circle"==i.style){s=Z1("circle",n,o);s.setAttributeNS(null,"cx",t);s.setAttributeNS(null,"cy",e);s.setAttributeNS(null,"r",.5*i.size)}else{s=Z1("rect",n,o);s.setAttributeNS(null,"x",t-.5*i.size);s.setAttributeNS(null,"y",e-.5*i.size);s.setAttributeNS(null,"width",i.size);s.setAttributeNS(null,"height",i.size)}void 0!==i.styles&&s.setAttributeNS(null,"style",i.styles);s.setAttributeNS(null,"class",i.className+" vis-point");if(r){var s=Z1("text",n,o);r.xOffset&&(t+=r.xOffset);r.yOffset&&(e+=r.yOffset);r.content&&(s.textContent=r.content);r.className&&s.setAttributeNS(null,"class",r.className+" vis-label");s.setAttributeNS(null,"x",t);s.setAttributeNS(null,"y",e)}}function tk(t,e,i,n,o,r,s,a){if(0!=n){if(n<0){n*=-1;e-=n}var l=Z1("rect",r,s);l.setAttributeNS(null,"x",t-.5*i);l.setAttributeNS(null,"y",e);l.setAttributeNS(null,"width",i);l.setAttributeNS(null,"height",n);l.setAttributeNS(null,"class",o);a&&l.setAttributeNS(null,"style",a)}}var ek=(()=>{function h(t,e,i,n,o,r){var s=6<arguments.length&&void 0!==arguments[6]&&arguments[6],a=7<arguments.length&&void 0!==arguments[7]&&arguments[7];g(this,h);this.majorSteps=[1,2,5,10];this.minorSteps=[.25,.5,1,2];this.customLines=null;this.containerHeight=o;this.majorCharHeight=r;this._start=t;this._end=e;this.scale=1;this.minorStepIdx=-1;this.magnitudefactor=1;this.determineScale();this.zeroAlign=s;this.autoScaleStart=i;this.autoScaleEnd=n;this.formattingFunction=a;if(i||n){var l=this,s=function(t){var e=t-t%(l.magnitudefactor*l.minorSteps[l.minorStepIdx]);return t%(l.magnitudefactor*l.minorSteps[l.minorStepIdx])>l.magnitudefactor*l.minorSteps[l.minorStepIdx]*.5?e+l.magnitudefactor*l.minorSteps[l.minorStepIdx]:e};if(i){this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx];this._start=s(this._start)}if(n){this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx];this._end=s(this._end)}this.determineScale()}}Jl(h,[{key:"setCharHeight",value:function(t){this.majorCharHeight=t}},{key:"setHeight",value:function(t){this.containerHeight=t}},{key:"determineScale",value:function(){var t=this._end-this._start,e=(this.scale=this.containerHeight/t,this.majorCharHeight/this.scale),i=0<t?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1;this.magnitudefactor=Math.pow(10,i);for(var t=0,n=(i<0&&(t=i),!1),o=t;Math.abs(o)<=Math.abs(i);o++){this.magnitudefactor=Math.pow(10,o);for(var r=0;r<this.minorSteps.length;r++){var s=this.magnitudefactor*this.minorSteps[r];if(e<=s){n=!0;this.minorStepIdx=r;break}}if(!0===n)break}}},{key:"is_major",value:function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])==0}},{key:"getStep",value:function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}},{key:"getFirstMajor",value:function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)}},{key:"formatValue",value:function(t){var e=t.toPrecision(5);"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t));return"number"==typeof e?"".concat(e):"string"==typeof e?e:t.toPrecision(5)}},{key:"getLines",value:function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,n=this._start+i;1e-5<this._end-n;n+=e)n!=this._start&&t.push({major:this.is_major(n),y:this.convertValue(n),val:this.formatValue(n)});return t}},{key:"followScale",value:function(t){function e(){s.magnitudefactor*=2}function i(){s.magnitudefactor/=2}var n=this.minorStepIdx,o=this._start,r=this._end,s=this;if(!(t.minorStepIdx<=1&&this.minorStepIdx<=1||1<t.minorStepIdx&&1<this.minorStepIdx))if(t.minorStepIdx<this.minorStepIdx){this.minorStepIdx=1;2!=n&&e();e()}else{this.minorStepIdx=2;1!=n&&i();i()}for(var a=t.convertValue(0),l=t.getStep()*t.scale,h=!1,u=0;!h&&u++<5;){this.scale=l/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);var c=this.containerHeight/this.scale;this._start=o;this._end=this._start+c;var d=this._end*this.scale,p=this.magnitudefactor*this.majorSteps[this.minorStepIdx],f=this.getFirstMajor()-t.getFirstMajor();if(this.zeroAlign){d=a-d;this._end+=d/this.scale;this._start=this._end-c}else{this.autoScaleStart?this._start-=f/this.scale:this._start+=p-f/this.scale;this._end=this._start+c}if(!this.autoScaleEnd&&this._end>r+1e-5){i();h=!1}else{if(!this.autoScaleStart&&this._start<o-1e-5){if(!(this.zeroAlign&&0<=o)){i();h=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}if(this.autoScaleStart&&this.autoScaleEnd&&c<r-o){e();h=!1}else h=!0}}}},{key:"convertValue",value:function(t){return this.containerHeight-(t-this._start)*this.scale}},{key:"screenToValue",value:function(t){return(this.containerHeight-t)/this.scale+this._start}}]);return h})();function ik(t,e){var i,n,o,r=void 0!==Od&&Hc(t)||t["@@iterator"];if(r)return i=!0,n=!1,{s:function(){r=r.call(t)},n:function(){var t=r.next();i=t.done;return t},e:function(t){n=!0;o=t},f:function(){try{i||null==r.return||r.return()}finally{if(n)throw o}}};if(A(t)||(r=((t,e)=>{if(t){if("string"==typeof t)return nk(t,e);var i=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);return"Map"===i||"Set"===i?jc(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?nk(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,a=function(){};return{s:a,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function nk(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function ok(i){var n=(()=>{if("undefined"==typeof Reflect||!m)return!1;if(m.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(m(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Dh(i);t=n?(t=Dh(this).constructor,m(e,arguments,t)):e.apply(this,arguments);return wh(this,t)}}var rk=(t=>{bh(a,t);var s=ok(a);function a(t,e,i,n){var o;g(this,a);o=s.call(this);o.id=Dy();o.body=t;o.defaultOptions={orientation:"left",showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:"40px",visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format:function(t){return"".concat(Xy(t.toPrecision(3)))},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:function(t){return"".concat(Xy(t.toPrecision(3)))},title:{text:void 0,style:void 0}}};o.linegraphOptions=n;o.linegraphSVG=i;o.props={};o.DOMelements={lines:{},labels:{},title:{}};o.dom={};o.scale=void 0;o.range={start:0,end:0};o.options=F.extend({},o.defaultOptions);o.conversionFactor=1;o.setOptions(e);o.width=Number("".concat(o.options.width).replace("px",""));o.minWidth=o.width;o.height=o.linegraphSVG.getBoundingClientRect().height;o.hidden=!1;o.stepPixels=25;o.zeroCrossing=-1;o.amountOfSteps=-1;o.lineOffset=0;o.master=!0;o.masterAxis=null;o.svgElements={};o.iconsRemoved=!1;o.groups={};o.amountOfGroups=0;o._create();null==o.scale&&o._redrawLabels();o.framework={svg:o.svg,svgElements:o.svgElements,options:o.options,groups:o.groups};var r=th(o);o.body.emitter.on("verticalDrag",function(){r.dom.lineContainer.style.top="".concat(r.body.domProps.scrollTop,"px")});return o}Jl(a,[{key:"addGroup",value:function(t,e){this.groups.hasOwnProperty(t)||(this.groups[t]=e);this.amountOfGroups+=1}},{key:"updateGroup",value:function(t,e){this.groups.hasOwnProperty(t)||(this.amountOfGroups+=1);this.groups[t]=e}},{key:"removeGroup",value:function(t){if(this.groups.hasOwnProperty(t)){delete this.groups[t];--this.amountOfGroups}}},{key:"setOptions",value:function(t){if(t){var e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);F.selectiveDeepExtend(["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"],this.options,t);this.minWidth=Number("".concat(this.options.width).replace("px",""));if(!0===e&&this.dom.frame){this.hide();this.show()}}}},{key:"_create",value:function(){this.dom.frame=document.createElement("div");this.dom.frame.style.width=this.options.width;this.dom.frame.style.height=this.height;this.dom.lineContainer=document.createElement("div");this.dom.lineContainer.style.width="100%";this.dom.lineContainer.style.height=this.height;this.dom.lineContainer.style.position="relative";this.dom.lineContainer.style.visibility="visible";this.dom.lineContainer.style.display="block";this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg");this.svg.style.position="absolute";this.svg.style.top="0px";this.svg.style.height="100%";this.svg.style.width="100%";this.svg.style.display="block";this.dom.frame.appendChild(this.svg)}},{key:"_redrawGroupIcons",value:function(){K1(this.svgElements);var t,e=this.options.iconWidth,i=11.5,n="left"===this.options.orientation?4:this.width-e-4,o=Ju(this.groups),r=(_b(o).call(o,function(t,e){return t<e?-1:1}),ik(o));try{for(r.s();!(t=r.n()).done;){var s=t.value;if(!0===this.groups[s].visible&&(void 0===this.linegraphOptions.visibility[s]||!0===this.linegraphOptions.visibility[s])){this.groups[s].getLegend(e,15,this.framework,n,i);i+=19}}}catch(t){r.e(t)}finally{r.f()}$1(this.svgElements);this.iconsRemoved=!1}},{key:"_cleanupIcons",value:function(){if(!1===this.iconsRemoved){K1(this.svgElements);$1(this.svgElements);this.iconsRemoved=!0}}},{key:"show",value:function(){this.hidden=!1;this.dom.frame.parentNode||("left"===this.options.orientation?this.body.dom.left:this.body.dom.right).appendChild(this.dom.frame);this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer);this.dom.lineContainer.style.display="block"}},{key:"hide",value:function(){this.hidden=!0;this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame);this.dom.lineContainer.style.display="none"}},{key:"setRange",value:function(t,e){this.range.start=t;this.range.end=e}},{key:"redraw",value:function(){var t,e=!1,i=0;this.dom.lineContainer.style.top="".concat(this.body.domProps.scrollTop,"px");for(t in this.groups)!this.groups.hasOwnProperty(t)||!0!==this.groups[t].visible||void 0!==this.linegraphOptions.visibility[t]&&!0!==this.linegraphOptions.visibility[t]||i++;if(0===this.amountOfGroups||0===i)this.hide();else{this.show();this.height=Number(this.linegraphSVG.style.height.replace("px",""));this.dom.lineContainer.style.height="".concat(this.height,"px");this.width=!0===this.options.visible?Number("".concat(this.options.width).replace("px","")):0;var n=this.props,o=this.dom.frame;o.className="vis-data-axis";this._calculateCharSize();var r=this.options.orientation,s=this.options.showMinorLabels,a=this.options.showMajorLabels,l=this.body.dom.backgroundHorizontal.offsetWidth;n.minorLabelHeight=s?n.minorCharHeight:0;n.majorLabelHeight=a?n.majorCharHeight:0;n.minorLineWidth=l-this.lineOffset-this.width+2*this.options.minorLinesOffset;n.minorLineHeight=1;n.majorLineWidth=l-this.lineOffset-this.width+2*this.options.majorLinesOffset;n.majorLineHeight=1;if("left"===r){o.style.top="0";o.style.left="0";o.style.bottom="";o.style.width="".concat(this.width,"px");o.style.height="".concat(this.height,"px");this.props.width=this.body.domProps.left.width;this.props.height=this.body.domProps.left.height}else{o.style.top="";o.style.bottom="0";o.style.left="0";o.style.width="".concat(this.width,"px");o.style.height="".concat(this.height,"px");this.props.width=this.body.domProps.right.width;this.props.height=this.body.domProps.right.height}e=this._redrawLabels();e=this._isResized()||e;!0===this.options.icons?this._redrawGroupIcons():this._cleanupIcons();this._redrawTitle(r)}return e}},{key:"_redrawLabels",value:function(){var n=this,t=!1;K1(this.DOMelements.lines);K1(this.DOMelements.labels);var o=this.options.orientation,e=null!=this.options[o].range?this.options[o].range:{},i=!0;if(null!=e.max){this.range.end=e.max;i=!1}var r=!0;if(null!=e.min){this.range.start=e.min;r=!1}this.scale=new ek(this.range.start,this.range.end,r,i,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[o].format);if(!1===this.master&&null!=this.masterAxis){this.scale.followScale(this.masterAxis.scale);this.dom.lineContainer.style.display="none"}else this.dom.lineContainer.style.display="block";this.maxLabelSize=0;e=this.scale.getLines(),r=(P(e).call(e,function(t){var e=t.y,i=t.major;n.options.showMinorLabels&&!1===i&&n._redrawLabel(e-2,t.val,o,"vis-y-axis vis-minor",n.props.minorCharHeight);i&&0<=e&&n._redrawLabel(e-2,t.val,o,"vis-y-axis vis-major",n.props.majorCharHeight);!0===n.master&&(i?n._redrawLine(e,o,"vis-grid vis-horizontal vis-major",n.options.majorLinesOffset,n.props.majorLineWidth):n._redrawLine(e,o,"vis-grid vis-horizontal vis-minor",n.options.minorLinesOffset,n.props.minorLineWidth))}),0),i=(void 0!==this.options[o].title&&void 0!==this.options[o].title.text&&(r=this.props.titleCharHeight),!0===this.options.icons?Math.max(this.options.iconWidth,r)+this.options.labelOffsetX+15:r+this.options.labelOffsetX+15);if(this.maxLabelSize>this.width-i&&!0===this.options.visible){this.width=this.maxLabelSize+i;this.options.width="".concat(this.width,"px");$1(this.DOMelements.lines);$1(this.DOMelements.labels);this.redraw();t=!0}else if(this.maxLabelSize<this.width-i&&!0===this.options.visible&&this.width>this.minWidth){this.width=Math.max(this.minWidth,this.maxLabelSize+i);this.options.width="".concat(this.width,"px");$1(this.DOMelements.lines);$1(this.DOMelements.labels);this.redraw();t=!0}else{$1(this.DOMelements.lines);$1(this.DOMelements.labels);t=!1}return t}},{key:"convertValue",value:function(t){return this.scale.convertValue(t)}},{key:"screenToValue",value:function(t){return this.scale.screenToValue(t)}},{key:"_redrawLabel",value:function(t,e,i,n,o){var r=Q1("div",this.DOMelements.labels,this.dom.frame);r.className=n;r.innerHTML=F.xss(e);if("left"===i){r.style.left="-".concat(this.options.labelOffsetX,"px");r.style.textAlign="right"}else{r.style.right="-".concat(this.options.labelOffsetX,"px");r.style.textAlign="left"}r.style.top="".concat(t-.5*o+this.options.labelOffsetY,"px");e+="";r=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*r&&(this.maxLabelSize=e.length*r)}},{key:"_redrawLine",value:function(t,e,i,n,o){if(!0===this.master){var r=Q1("div",this.DOMelements.lines,this.dom.lineContainer);r.className=i;r.innerHTML="";"left"===e?r.style.left="".concat(this.width-n,"px"):r.style.right="".concat(this.width-n,"px");r.style.width="".concat(o,"px");r.style.top="".concat(t,"px")}}},{key:"_redrawTitle",value:function(t){K1(this.DOMelements.title);if(void 0!==this.options[t].title&&void 0!==this.options[t].title.text){var e=Q1("div",this.DOMelements.title,this.dom.frame);e.className="vis-y-axis vis-title vis-".concat(t);e.innerHTML=F.xss(this.options[t].title.text);void 0!==this.options[t].title.style&&F.addCssText(e,this.options[t].title.style);"left"===t?e.style.left="".concat(this.props.titleCharHeight,"px"):e.style.right="".concat(this.props.titleCharHeight,"px");e.style.width="".concat(this.height,"px")}$1(this.DOMelements.title)}},{key:"_calculateCharSize",value:function(){if(!("minorCharHeight"in this.props)){var t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-minor vis-measure";e.appendChild(t);this.dom.frame.appendChild(e);this.props.minorCharHeight=e.clientHeight;this.props.minorCharWidth=e.clientWidth;this.dom.frame.removeChild(e)}if(!("majorCharHeight"in this.props)){t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-major vis-measure";e.appendChild(t);this.dom.frame.appendChild(e);this.props.majorCharHeight=e.clientHeight;this.props.majorCharWidth=e.clientWidth;this.dom.frame.removeChild(e)}if(!("titleCharHeight"in this.props)){t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-title vis-measure";e.appendChild(t);this.dom.frame.appendChild(e);this.props.titleCharHeight=e.clientHeight;this.props.titleCharWidth=e.clientWidth;this.dom.frame.removeChild(e)}}}]);return a})(x);function sk(t,e){}sk.draw=function(t,e,i,n){n=n||0;for(var o=((t,e)=>{var i=void 0;t.options&&t.options.drawPoints&&t.options.drawPoints.onRender&&"function"==typeof t.options.drawPoints.onRender&&(i=t.options.drawPoints.onRender);e.group.options&&e.group.options.drawPoints&&e.group.options.drawPoints.onRender&&"function"==typeof e.group.options.drawPoints.onRender&&(i=e.group.options.drawPoints.onRender);return i})(i,e),r=0;r<t.length;r++)if(o){var s=o(t[r],e);!0!==s&&"object"!==O(s)||J1(t[r].screen_x+n,t[r].screen_y,ak(e,s),i.svgElements,i.svg,t[r].label)}else J1(t[r].screen_x+n,t[r].screen_y,ak(e),i.svgElements,i.svg,t[r].label)};sk.drawIcon=function(t,e,i,n,o,r){var s=.5*o,a=Z1("rect",r.svgElements,r.svg);a.setAttributeNS(null,"x",e);a.setAttributeNS(null,"y",i-s);a.setAttributeNS(null,"width",n);a.setAttributeNS(null,"height",2*s);a.setAttributeNS(null,"class","vis-outline");J1(e+.5*n,i,ak(t),r.svgElements,r.svg)};function ak(t,e){e=void 0===e?{}:e;return{style:e.style||t.options.drawPoints.style,styles:e.styles||t.options.drawPoints.styles,size:e.size||t.options.drawPoints.size,className:e.className||t.className}}function lk(t,e){}lk.drawIcon=function(t,e,i,n,o,r){var s=.5*o,a=Z1("rect",r.svgElements,r.svg);a.setAttributeNS(null,"x",e);a.setAttributeNS(null,"y",i-s);a.setAttributeNS(null,"width",n);a.setAttributeNS(null,"height",2*s);a.setAttributeNS(null,"class","vis-outline");var a=Math.round(.3*n),l=t.options.barChart.width,l=l/a,h=Math.round(.4*o),u=Math.round(.75*o),c=Math.round((n-2*a)/3);tk(e+.5*a+c,i+s-h-1,a,h,t.className+" vis-bar",r.svgElements,r.svg,t.style);tk(e+1.5*a+c+2,i+s-u-1,a,u,t.className+" vis-bar",r.svgElements,r.svg,t.style);if(1==t.options.drawPoints.enabled){l={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size/l,className:t.className};J1(e+.5*a+c,i+s-h-1,l,r.svgElements,r.svg);J1(e+1.5*a+c+2,i+s-u-1,l,r.svgElements,r.svg)}};lk.draw=function(t,e,i){for(var n,o,r,s=[],a={},l=0,h=0;h<t.length;h++){u=i.groups[t[h]];if("bar"===u.options.style&&!0===u.visible&&(void 0===i.options.groups.visibility[t[h]]||!0===i.options.groups.visibility[t[h]]))for(r=0;r<e[t[h]].length;r++){s.push({screen_x:e[t[h]][r].screen_x,screen_end:e[t[h]][r].screen_end,screen_y:e[t[h]][r].screen_y,x:e[t[h]][r].x,end:e[t[h]][r].end,y:e[t[h]][r].y,groupId:t[h],label:e[t[h]][r].label});l+=1}}if(0!==l){_b(s).call(s,function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x});lk._getDataIntersections(a,s);for(h=0;h<s.length;h++){var u=i.groups[s[h].groupId],c=null!=u.options.barChart.minWidth?u.options.barChart.minWidth:.1*u.options.barChart.width,d=s[h].screen_x,p=0;if(void 0===a[d]){h+1<s.length&&(n=Math.abs(s[h+1].screen_x-d));o=lk._getSafeDrawData(n,u,c)}else{var f=h+(a[d].amount-a[d].resolved);f<s.length&&(n=Math.abs(s[f].screen_x-d));o=lk._getSafeDrawData(n,u,c);a[d].resolved+=1;if(!0===u.options.stack&&!0!==u.options.excludeFromStacking)if(s[h].screen_y<u.zeroPosition){p=a[d].accumulatedNegative;a[d].accumulatedNegative+=u.zeroPosition-s[h].screen_y}else{p=a[d].accumulatedPositive;a[d].accumulatedPositive+=u.zeroPosition-s[h].screen_y}else if(!0===u.options.barChart.sideBySide){o.width=o.width/a[d].amount;o.offset+=a[d].resolved*o.width-.5*o.width*(a[d].amount+1)}}f=o.width,c=s[h].screen_x;if(null!=s[h].screen_end){f=s[h].screen_end-s[h].screen_x;c+=.5*f}else c+=o.offset;tk(c,s[h].screen_y-p,f,u.zeroPosition-s[h].screen_y,u.className+" vis-bar",i.svgElements,i.svg,u.style);if(!0===u.options.drawPoints.enabled){d={screen_x:s[h].screen_x,screen_y:s[h].screen_y-p,x:s[h].x,y:s[h].y,groupId:s[h].groupId,label:s[h].label};sk.draw([d],u,i,o.offset)}}}};lk._getDataIntersections=function(t,e){for(var i,n=0;n<e.length;n++){n+1<e.length&&(i=Math.abs(e[n+1].screen_x-e[n].screen_x));0<n&&(i=Math.min(i,Math.abs(e[n-1].screen_x-e[n].screen_x)));if(0===i){void 0===t[e[n].screen_x]&&(t[e[n].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0});t[e[n].screen_x].amount+=1}}};lk._getSafeDrawData=function(t,e,i){var n,o;if(t<e.options.barChart.width&&0<t){n=t<i?i:t;o=0;"left"===e.options.barChart.align?o-=.5*t:"right"===e.options.barChart.align&&(o+=.5*t)}else{n=e.options.barChart.width;o=0;"left"===e.options.barChart.align?o-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(o+=.5*e.options.barChart.width)}return{width:n,offset:o}};lk.getStackedYRange=function(t,e,i,n,o){if(0<t.length){_b(t).call(t,function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x});var r={};lk._getDataIntersections(r,t);e[n]=lk._getStackedYRange(r,t);e[n].yAxisOrientation=o;i.push(n)}};lk._getStackedYRange=function(t,e){for(var i,n,o=e[0].screen_y,r=e[0].screen_y,s=0;s<e.length;s++){i=e[s].screen_x;if(void 0===t[i]){o=o>e[s].screen_y?e[s].screen_y:o;r=r<e[s].screen_y?e[s].screen_y:r}else e[s].screen_y<0?t[i].accumulatedNegative+=e[s].screen_y:t[i].accumulatedPositive+=e[s].screen_y}for(n in t)if(t.hasOwnProperty(n)){o=o>t[n].accumulatedNegative?t[n].accumulatedNegative:o;o=o>t[n].accumulatedPositive?t[n].accumulatedPositive:o;r=r<t[n].accumulatedNegative?t[n].accumulatedNegative:r;r=r<t[n].accumulatedPositive?t[n].accumulatedPositive:r}return{min:o,max:r}};function hk(t,e){}hk.calcPath=function(t,e){if(null!=t){var i;if(0<t.length)return i=[],i=1==e.options.interpolation.enabled?hk._catmullRom(t,e):hk._linear(t),i}};hk.drawIcon=function(t,e,i,n,o,r){var s=.5*o,a=Z1("rect",r.svgElements,r.svg);a.setAttributeNS(null,"x",e);a.setAttributeNS(null,"y",i-s);a.setAttributeNS(null,"width",n);a.setAttributeNS(null,"height",2*s);a.setAttributeNS(null,"class","vis-outline");a=Z1("path",r.svgElements,r.svg);a.setAttributeNS(null,"class",t.className);void 0!==t.style&&a.setAttributeNS(null,"style",t.style);a.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+n)+","+i);if(1==t.options.shaded.enabled){a=Z1("path",r.svgElements,r.svg);"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-s)+"L"+e+","+i+" L"+(e+n)+","+i+" L"+(e+n)+","+(i-s)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+s)+" L"+(e+n)+","+(i+s)+"L"+(e+n)+","+i);a.setAttributeNS(null,"class",t.className+" vis-icon-fill");void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&a.setAttributeNS(null,"style",t.options.shaded.style)}if(1==t.options.drawPoints.enabled){s={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};J1(e+.5*n,i,s,r.svgElements,r.svg)}};hk.drawShading=function(t,e,i,n){if(1==e.options.shaded.enabled){var o=Number(n.svg.style.height.replace("px","")),r=Z1("path",n.svgElements,n.svg),s="L",a=(1==e.options.interpolation.enabled&&(s="C"),0),a="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?o:Math.min(Math.max(0,e.zeroPosition),o),o="group"==e.options.shaded.orientation&&null!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,s,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1)+" V"+a+" H"+t[0][0]+" Z";r.setAttributeNS(null,"class",e.className+" vis-fill");void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style);r.setAttributeNS(null,"d",o)}};hk.draw=function(t,e,i){if(null!=t){var n=Z1("path",i.svgElements,i.svg);n.setAttributeNS(null,"class",e.className);void 0!==e.style&&n.setAttributeNS(null,"style",e.style);var o="L";1==e.options.interpolation.enabled&&(o="C");n.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,o,!1))}};hk.serializePath=function(t,e,i){if(t.length<2)return"";var n,o=e;if(i)for(n=t.length-2;0<n;n--)o+=t[n][0]+","+t[n][1]+" ";else for(n=1;n<t.length;n++)o+=t[n][0]+","+t[n][1]+" ";return o};hk._catmullRomUniform=function(t){for(var e,i,n,o,r=[],s=(r.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]),t.length),a=0;a<s-1;a++){n=0==a?t[0]:t[a-1];o=t[a];e=t[a+1];i=a+2<s?t[a+2]:e;n={screen_x:(-n.screen_x+6*o.screen_x+e.screen_x)*(1/6),screen_y:(6*o.screen_y-n.screen_y+e.screen_y)*(1/6)};o={screen_x:(o.screen_x+6*e.screen_x-i.screen_x)*(1/6),screen_y:1/6*(o.screen_y+6*e.screen_y-i.screen_y)};r.push([n.screen_x,n.screen_y]);r.push([o.screen_x,o.screen_y]);r.push([e.screen_x,e.screen_y])}return r};hk._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);for(var n,o,r,s,a,l,h,u,c,d,p,f,m=[],g=(m.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]),t.length),v=0;v<g-1;v++){s=0==v?t[0]:t[v-1];n=t[v];o=t[v+1];r=v+2<g?t[v+2]:o;p=Math.sqrt(Math.pow(s.screen_x-n.screen_x,2)+Math.pow(s.screen_y-n.screen_y,2));d=Math.sqrt(Math.pow(n.screen_x-o.screen_x,2)+Math.pow(n.screen_y-o.screen_y,2));c=Math.sqrt(Math.pow(o.screen_x-r.screen_x,2)+Math.pow(o.screen_y-r.screen_y,2));h=Math.pow(c,i);c=Math.pow(c,2*i);u=Math.pow(d,i);d=Math.pow(d,2*i);f=Math.pow(p,i);p=Math.pow(p,2*i);a=2*p+3*f*u+d;l=2*c+3*h*u+d;f=3*f*(f+u);0<f&&(f=1/f);h=3*h*(h+u);0<h&&(h=1/h);u={screen_x:(-d*s.screen_x+a*n.screen_x+p*o.screen_x)*f,screen_y:(-d*s.screen_y+a*n.screen_y+p*o.screen_y)*f};s={screen_x:(c*n.screen_x+l*o.screen_x-d*r.screen_x)*h,screen_y:(c*n.screen_y+l*o.screen_y-d*r.screen_y)*h};0==u.screen_x&&0==u.screen_y&&(u=n);0==s.screen_x&&0==s.screen_y&&(s=o);m.push([u.screen_x,u.screen_y]);m.push([s.screen_x,s.screen_y]);m.push([o.screen_x,o.screen_y])}return m};hk._linear=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i].screen_x,t[i].screen_y]);return e};function uk(t,e,i,n){this.id=e;this.options=F.selectiveBridgeObject(["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"],i);this.usingDefaultStyle=void 0===t.className;this.groupsUsingDefaultStyles=n;this.zeroPosition=0;this.update(t);1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1);this.itemsData=[];this.visible=void 0===t.visible||t.visible}uk.prototype.setItems=function(t){if(null!=t){this.itemsData=t;1==_b(this.options)&&F.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})}else this.itemsData=[]};uk.prototype.getItems=function(){return this.itemsData};uk.prototype.setZeroPosition=function(t){this.zeroPosition=t};uk.prototype.setOptions=function(t){if(void 0!==t){F.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t);"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints});F.mergeOptions(this.options,t,"interpolation");F.mergeOptions(this.options,t,"drawPoints");F.mergeOptions(this.options,t,"shaded");if(t.interpolation&&"object"==O(t.interpolation)&&t.interpolation.parametrization)if("uniform"==t.interpolation.parametrization)this.options.interpolation.alpha=0;else if("chordal"==t.interpolation.parametrization)this.options.interpolation.alpha=1;else{this.options.interpolation.parametrization="centripetal";this.options.interpolation.alpha=.5}}};uk.prototype.update=function(t){this.group=t;this.content=t.content||"graph";this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10;this.visible=void 0===t.visible||t.visible;this.style=t.style;this.setOptions(t.options)};uk.prototype.getLegend=function(t,e,i,n,o){if(null==i){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");i={svg:r,svgElements:{},options:this.options,groups:[this]}}null==n&&(n=0);null==o&&(o=.5*e);switch(this.options.style){case"line":hk.drawIcon(this,n,o,t,e,i);break;case"points":case"point":sk.drawIcon(this,n,o,t,e,i);break;case"bar":lk.drawIcon(this,n,o,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}};uk.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,n=0;n<t.length;n++){e=e>t[n].y?t[n].y:e;i=i<t[n].y?t[n].y:i}return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}};function ck(t,e,i,n){this.body=t;this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-right"}};this.side=i;this.options=F.extend({},this.defaultOptions);this.linegraphOptions=n;this.svgElements={};this.dom={};this.groups={};this.amountOfGroups=0;this._create();this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};this.setOptions(e)}ck.prototype=new x;ck.prototype.clear=function(){this.groups={};this.amountOfGroups=0};ck.prototype.addGroup=function(t,e){if(1!=e.options.excludeFromLegend){this.groups.hasOwnProperty(t)||(this.groups[t]=e);this.amountOfGroups+=1}};ck.prototype.updateGroup=function(t,e){this.groups[t]=e};ck.prototype.removeGroup=function(t){if(this.groups.hasOwnProperty(t)){delete this.groups[t];--this.amountOfGroups}};ck.prototype._create=function(){this.dom.frame=document.createElement("div");this.dom.frame.className="vis-legend";this.dom.frame.style.position="absolute";this.dom.frame.style.top="10px";this.dom.frame.style.display="block";this.dom.textArea=document.createElement("div");this.dom.textArea.className="vis-legend-text";this.dom.textArea.style.position="relative";this.dom.textArea.style.top="0px";this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg");this.svg.style.position="absolute";this.svg.style.top="0px";this.svg.style.width=this.options.iconSize+5+"px";this.svg.style.height="100%";this.dom.frame.appendChild(this.svg);this.dom.frame.appendChild(this.dom.textArea)};ck.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)};ck.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)};ck.prototype.setOptions=function(t){F.selectiveDeepExtend(["enabled","orientation","icons","left","right"],this.options,t)};ck.prototype.redraw=function(){var t=0,e=Ju(this.groups);_b(e).call(e,function(t,e){return t<e?-1:1});for(var i=0;i<e.length;i++){var n=e[i];1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||t++}if(0==this.options[this.side].visible||0==this.amountOfGroups||0==this.options.enabled||0==t)this.hide();else{this.show();if("top-left"==this.options[this.side].position||"bottom-left"==this.options[this.side].position){this.dom.frame.style.left="4px";this.dom.frame.style.textAlign="left";this.dom.textArea.style.textAlign="left";this.dom.textArea.style.left=this.options.iconSize+15+"px";this.dom.textArea.style.right="";this.svg.style.left="0px";this.svg.style.right=""}else{this.dom.frame.style.right="4px";this.dom.frame.style.textAlign="right";this.dom.textArea.style.textAlign="right";this.dom.textArea.style.right=this.options.iconSize+15+"px";this.dom.textArea.style.left="";this.svg.style.right="0px";this.svg.style.left=""}if("top-left"==this.options[this.side].position||"top-right"==this.options[this.side].position){this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace("px",""))+"px";this.dom.frame.style.bottom=""}else{var o=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+o+Number(this.body.dom.center.style.top.replace("px",""))+"px";this.dom.frame.style.top=""}if(0==this.options.icons){this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+"px";this.dom.textArea.style.right="";this.dom.textArea.style.left="";this.svg.style.width="0px"}else{this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+"px";this.drawLegendIcons()}for(var r="",i=0;i<e.length;i++){n=e[i];1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||(r+=this.groups[n].content+"<br />")}this.dom.textArea.innerHTML=F.xss(r);this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}};ck.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Ju(this.groups),e=(_b(t).call(t,function(t,e){return t<e?-1:1}),this.svgElements);K1(e);$1(e);K1(e);var i=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(i.replace("px","")),n=i,o=this.options.iconSize,r=.75*this.options.iconSize,s=i+.5*r+3;this.svg.style.width=o+5+i+"px";for(var a=0;a<t.length;a++){var l=t[a];if(1==this.groups[l].visible&&(void 0===this.linegraphOptions.visibility[l]||1==this.linegraphOptions.visibility[l])){this.groups[l].getLegend(o,r,this.framework,n,s);s+=r+this.options.iconSpacing}}}};var dk="__ungrouped__";function R(t,e){this.id=Dy();this.body=t;this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}};this.options=F.extend({},this.defaultOptions);this.dom={};this.props={};this.hammer=null;this.groups={};this.abortedGraphUpdate=!1;this.updateSVGheight=!1;this.updateSVGheightOnResize=!1;this.forceGraphUpdate=!0;var n=this;this.itemsData=null;this.groupsData=null;this.itemListeners={add:function(t,e,i){n._onAdd(e.items)},update:function(t,e,i){n._onUpdate(e.items)},remove:function(t,e,i){n._onRemove(e.items)}};this.groupListeners={add:function(t,e,i){n._onAddGroups(e.items)},update:function(t,e,i){n._onUpdateGroups(e.items)},remove:function(t,e,i){n._onRemoveGroups(e.items)}};this.items={};this.selection=[];this.lastStart=this.body.range.start;this.touchParams={};this.svgElements={};this.setOptions(e);this.groupsUsingDefaultStyles=[0];this.body.emitter.on("rangechanged",function(){n.svg.style.left=F.option.asSize(-n.props.width);n.forceGraphUpdate=!0;n.redraw.call(n)});this._create();this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}R.prototype=new x;R.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph";this.dom.frame=t;this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg");this.svg.style.position="relative";this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px";this.svg.style.display="block";t.appendChild(this.svg);this.options.dataAxis.orientation="left";this.yAxisLeft=new rk(this.body,this.options.dataAxis,this.svg,this.options.groups);this.options.dataAxis.orientation="right";this.yAxisRight=new rk(this.body,this.options.dataAxis,this.svg,this.options.groups);delete this.options.dataAxis.orientation;this.legendLeft=new ck(this.body,this.options.legend,"left",this.options.groups);this.legendRight=new ck(this.body,this.options.legend,"right",this.options.groups);this.show()};R.prototype.setOptions=function(t){if(t){if(void 0===t.graphHeight&&void 0!==t.height){this.updateSVGheight=!0;this.updateSVGheightOnResize=!0}else void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&gf((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0);F.selectiveDeepExtend(["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"],this.options,t);F.mergeOptions(this.options,t,"interpolation");F.mergeOptions(this.options,t,"drawPoints");F.mergeOptions(this.options,t,"shaded");F.mergeOptions(this.options,t,"legend");if(t.interpolation&&"object"==O(t.interpolation)&&t.interpolation.parametrization)if("uniform"==t.interpolation.parametrization)this.options.interpolation.alpha=0;else if("chordal"==t.interpolation.parametrization)this.options.interpolation.alpha=1;else{this.options.interpolation.parametrization="centripetal";this.options.interpolation.alpha=.5}if(this.yAxisLeft&&void 0!==t.dataAxis){this.yAxisLeft.setOptions(this.options.dataAxis);this.yAxisRight.setOptions(this.options.dataAxis)}if(this.legendLeft&&void 0!==t.legend){this.legendLeft.setOptions(this.options.legend);this.legendRight.setOptions(this.options.legend)}this.groups.hasOwnProperty(dk)&&this.groups[dk].setOptions(t)}if(this.dom.frame){this.forceGraphUpdate=!0;this.body.emitter.emit("_change",{queue:!0})}};R.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)};R.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)};R.prototype.setItems=function(t){var e,i=this,n=this.itemsData;if(t){if(!Oy(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=My(t)}else this.itemsData=null;if(n){P(F).call(F,this.itemListeners,function(t,e){n.off(e,t)});n.dispose();e=n.getIds();this._onRemove(e)}if(this.itemsData){var o=this.id;P(F).call(F,this.itemListeners,function(t,e){i.itemsData.on(e,t,o)});e=this.itemsData.getIds();this._onAdd(e)}};R.prototype.setGroups=function(t){var e,i=this;if(this.groupsData){P(F).call(F,this.groupListeners,function(t,e){i.groupsData.off(e,t)});e=this.groupsData.getIds();this.groupsData=null;for(var n=0;n<e.length;n++)this._removeGroup(e[n])}if(t){if(!Oy(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;P(F).call(F,this.groupListeners,function(t,e){i.groupsData.on(e,t,o)});e=this.groupsData.getIds();this._onAddGroups(e)}};R.prototype._onUpdate=function(t){this._updateAllGroupData(t)};R.prototype._onAdd=function(t){this._onUpdate(t)};R.prototype._onRemove=function(t){this._onUpdate(t)};R.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)};R.prototype._onAddGroups=function(t){this._onUpdateGroups(t)};R.prototype._onRemoveGroups=function(t){for(var e=0;e<t.length;e++)this._removeGroup(t[e]);this.forceGraphUpdate=!0;this.body.emitter.emit("_change",{queue:!0})};R.prototype._removeGroup=function(t){if(this.groups.hasOwnProperty(t)){if("right"==this.groups[t].options.yAxisOrientation){this.yAxisRight.removeGroup(t);this.legendRight.removeGroup(t);this.legendRight.redraw()}else{this.yAxisLeft.removeGroup(t);this.legendLeft.removeGroup(t);this.legendLeft.redraw()}delete this.groups[t]}};R.prototype._updateGroup=function(t,e){if(this.groups.hasOwnProperty(e)){this.groups[e].update(t);if("right"==this.groups[e].options.yAxisOrientation){this.yAxisRight.updateGroup(e,this.groups[e]);this.legendRight.updateGroup(e,this.groups[e]);this.yAxisLeft.removeGroup(e);this.legendLeft.removeGroup(e)}else{this.yAxisLeft.updateGroup(e,this.groups[e]);this.legendLeft.updateGroup(e,this.groups[e]);this.yAxisRight.removeGroup(e);this.legendRight.removeGroup(e)}}else{this.groups[e]=new uk(t,e,this.options,this.groupsUsingDefaultStyles);if("right"==this.groups[e].options.yAxisOrientation){this.yAxisRight.addGroup(e,this.groups[e]);this.legendRight.addGroup(e,this.groups[e])}else{this.yAxisLeft.addGroup(e,this.groups[e]);this.legendLeft.addGroup(e,this.groups[e])}}this.legendLeft.redraw();this.legendRight.redraw()};R.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){for(var i={},n=this.itemsData.get(),o=this.itemsData.idProp,r={},s=(t&&ju(t).call(t,function(t){r[t]=t}),{}),a=0;a<n.length;a++){var l=n[a],h=l.group;null==h&&(h=dk);s.hasOwnProperty(h)?s[h]++:s[h]=1}var u={};if(!e&&t)for(h in this.groups)if(this.groups.hasOwnProperty(h)){var c=this.groups[h],d=c.getItems(),d=(i[h]=M(d).call(d,function(t){u[t[o]]=t[o];return t[o]!==r[t[o]]}),s[h]);s[h]-=i[h].length;i[h].length<d&&(i[h][d-1]={})}for(a=0;a<n.length;a++){l=n[a];h=l.group;null==h&&(h=dk);if(e||!t||l[o]===r[l[o]]||!u.hasOwnProperty(l[o])){i.hasOwnProperty(h)||(i[h]=new Array(s[h]));var p=F.bridgeObject(l);p.x=F.convert(l.x,"Date");p.end=F.convert(l.end,"Date");p.orginalY=l.y;p.y=Number(l.y);p[o]=l[o];var f=i[h].length-s[h]--;i[h][f]=p}}for(h in this.groups)!this.groups.hasOwnProperty(h)||i.hasOwnProperty(h)||(i[h]=new Array(0));for(h in i)if(i.hasOwnProperty(h))if(0==i[h].length)this.groups.hasOwnProperty(h)&&this._removeGroup(h);else{var c=void 0;null!=this.groupsData&&(c=this.groupsData.get(h));null==c&&(c={id:h,content:this.options.defaultGroup+h});this._updateGroup(c,h);this.groups[h].setItems(i[h])}this.forceGraphUpdate=!0;this.body.emitter.emit("_change",{queue:!0})}};R.prototype.redraw=function(){var t=!1;this.props.width=this.dom.frame.offsetWidth;this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom;var t=this._isResized()||t,e=this.body.range.end-this.body.range.start,i=e!=this.lastVisibleInterval;this.lastVisibleInterval=e;if(1==t){this.svg.style.width=F.option.asSize(3*this.props.width);this.svg.style.left=F.option.asSize(-this.props.width);-1==Cf(e=this.options.height+"").call(e,"%")&&1!=this.updateSVGheightOnResize||(this.updateSVGheight=!0)}if(1==this.updateSVGheight){if(this.options.graphHeight!=this.props.height+"px"){this.options.graphHeight=this.props.height+"px";this.svg.style.height=this.props.height+"px"}this.updateSVGheight=!1}else this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px";if(1==t||1==i||1==this.abortedGraphUpdate||1==this.forceGraphUpdate){t=this._updateGraph()||t;this.forceGraphUpdate=!1;this.lastStart=this.body.range.start;this.svg.style.left=-this.props.width+"px"}else if(0!=this.lastStart){e=this.body.range.start-this.lastStart,i=this.body.range.end-this.body.range.start;if(0!=this.props.width){i=this.props.width/i,e=e*i;this.svg.style.left=-this.props.width-e+"px"}}this.legendLeft.redraw();this.legendRight.redraw();return t};R.prototype._getSortedGroupIds=function(){var t,e=[];for(t in this.groups)if(this.groups.hasOwnProperty(t)){var i=this.groups[t];1!=i.visible||void 0!==this.options.groups.visibility[t]&&1!=this.options.groups.visibility[t]||e.push({id:t,zIndex:i.options.zIndex})}F.insertSort(e,function(t,e){var i=t.zIndex,n=e.zIndex;void 0===i&&(i=0);void 0===n&&(n=0);return i==n?0:i<n?-1:1});for(var n=new Array(e.length),o=0;o<e.length;o++)n[o]=e[o].id;return n};R.prototype._updateGraph=function(){K1(this.svgElements);if(0!=this.props.width&&null!=this.itemsData){var t,e={},i=this.body.util.toGlobalTime(-this.body.domProps.root.width),n=this.body.util.toGlobalTime(2*this.body.domProps.root.width),o=this._getSortedGroupIds();if(0<o.length){var r={};this._getRelevantData(o,r,i,n);this._applySampling(o,r);for(a=0;a<o.length;a++)this._convertXcoordinates(r[o[a]]);this._getYRanges(o,r,e);i=this._updateYAxis(o,e);if(1==i){$1(this.svgElements);this.abortedGraphUpdate=!0;return!0}this.abortedGraphUpdate=!1;for(var s=void 0,a=0;a<o.length;a++){t=this.groups[o[a]];if(!0===this.options.stack&&"line"===this.options.style&&(null==t.options.excludeFromStacking||!t.options.excludeFromStacking)){if(null!=s){this._stack(r[t.id],r[s.id]);if(1==t.options.shaded.enabled&&"group"!==t.options.shaded.orientation)if("top"==t.options.shaded.orientation&&"group"!==s.options.shaded.orientation){s.options.shaded.orientation="group";s.options.shaded.groupId=t.id}else{t.options.shaded.orientation="group";t.options.shaded.groupId=s.id}}s=t}this._convertYcoordinates(r[o[a]],t)}var l={};for(a=0;a<o.length;a++){t=this.groups[o[a]];if("line"===t.options.style&&1==t.options.shaded.enabled){var h=r[o[a]];if(null!=h&&0!=h.length){l.hasOwnProperty(o[a])||(l[o[a]]=hk.calcPath(h,t));if("group"===t.options.shaded.orientation){h=t.options.shaded.groupId;if(-1===Cf(o).call(o,h))console.log(t.id+": Unknown shading group target given:"+h);else{l.hasOwnProperty(h)||(l[h]=hk.calcPath(r[h],this.groups[h]));hk.drawShading(l[o[a]],t,l[h],this.framework)}}else hk.drawShading(l[o[a]],t,void 0,this.framework)}}}lk.draw(o,r,this.framework);for(a=0;a<o.length;a++){t=this.groups[o[a]];if(0<r[o[a]].length)switch(t.options.style){case"line":l.hasOwnProperty(o[a])||(l[o[a]]=hk.calcPath(r[o[a]],t));hk.draw(l[o[a]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||sk.draw(r[o[a]],t,this.framework)}}}}$1(this.svgElements);return!1};R.prototype._stack=function(t,e){for(var i,n,o=0,r=0;r<t.length;r++){for(var s=void 0,a=void 0,l=o;l<e.length;l++){if(e[l].x===t[r].x){s=e[l];a=e[l];o=l;break}if(e[l].x>t[r].x){a=e[l];s=0==l?a:e[l-1];o=l;break}}if(void 0===a){s=e[e.length-1];a=e[e.length-1]}i=a.x-s.x;n=a.y-s.y;t[r].y=0==i?t[r].orginalY+a.y:t[r].orginalY+n/i*(t[r].x-s.x)+s.y}};R.prototype._getRelevantData=function(t,e,i,n){var o,r;if(0<t.length)for(o=0;o<t.length;o++){var s=this.groups[t[o]],a=s.getItems();if(1==_b(s.options)){for(var l=function(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1},h=Math.max(0,F.binarySearchValue(a,i,"x","before",l)),u=Math.min(a.length,F.binarySearchValue(a,n,"x","after",l)+1),c=(u<=0&&(u=a.length),new Array(u-h)),d=h;d<u;d++){r=s.itemsData[d];c[d-h]=r}e[t[o]]=c}else e[t[o]]=s.itemsData}};R.prototype._applySampling=function(t,e){if(0<t.length)for(var i=0;i<t.length;i++){r=this.groups[t[i]];if(1==r.options.sampling){var n=e[t[i]];if(0<n.length){for(var o=n.length,r=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),r=o/r,s=Math.min(Math.ceil(.2*o),Math.max(1,Math.round(r))),a=new Array(o),l=0;l<o;l+=s){var h=Math.round(l/s);a[h]=n[l]}e[t[i]]=gp(a).call(a,0,Math.round(o/s))}}}};R.prototype._getYRanges=function(t,e,i){var n,o,r,s,a=[],l=[];if(0<t.length){for(r=0;r<t.length;r++){n=e[t[r]];s=this.groups[t[r]].options;if(0<n.length){o=this.groups[t[r]];!0===s.stack&&"bar"===s.style?"left"===s.yAxisOrientation?a=Nd(a).call(a,n):l=Nd(l).call(l,n):i[t[r]]=o.getYRange(n,t[r])}}lk.getStackedYRange(a,i,t,"__barStackLeft","left");lk.getStackedYRange(l,i,t,"__barStackRight","right")}};R.prototype._updateYAxis=function(t,e){var i,n,o=!1,r=!1,s=!1,a=1e9,l=1e9,h=-1e9,u=-1e9;if(0<t.length){for(var c=0;c<t.length;c++){var d=this.groups[t[c]];if(d&&"right"!=d.options.yAxisOrientation){r=!0;a=1e9;h=-1e9}else if(d&&d.options.yAxisOrientation){s=!0;l=1e9;u=-1e9}}for(c=0;c<t.length;c++)if(e.hasOwnProperty(t[c])&&!0!==e[t[c]].ignore){i=e[t[c]].min;n=e[t[c]].max;if("right"!=e[t[c]].yAxisOrientation){r=!0;a=i<a?i:a;h=h<n?n:h}else{s=!0;l=i<l?i:l;u=u<n?n:u}}1==r&&this.yAxisLeft.setRange(a,h);1==s&&this.yAxisRight.setRange(l,u)}o=this._toggleAxisVisiblity(r,this.yAxisLeft)||o;o=this._toggleAxisVisiblity(s,this.yAxisRight)||o;if(1==s&&1==r){this.yAxisLeft.drawIcons=!0;this.yAxisRight.drawIcons=!0}else{this.yAxisLeft.drawIcons=!1;this.yAxisRight.drawIcons=!1}this.yAxisRight.master=!r;this.yAxisRight.masterAxis=this.yAxisLeft;if(0==this.yAxisRight.master){this.yAxisLeft.lineOffset=1==s?this.yAxisRight.width:0;o=this.yAxisLeft.redraw()||o}for(var o=this.yAxisRight.redraw()||o,p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"],c=0;c<p.length;c++)-1!=Cf(t).call(t,p[c])&&gp(t).call(t,Cf(t).call(t,p[c]),1);return o};R.prototype._toggleAxisVisiblity=function(t,e){var i=!1;if(0==t){if(e.dom.frame.parentNode&&0==e.hidden){e.hide();i=!0}}else if(!e.dom.frame.parentNode&&1==e.hidden){e.show();i=!0}return i};R.prototype._convertXcoordinates=function(t){for(var e=this.body.util.toScreen,i=0;i<t.length;i++){t[i].screen_x=e(t[i].x)+this.props.width;t[i].screen_y=t[i].y;null!=t[i].end?t[i].screen_end=e(t[i].end)+this.props.width:t[i].screen_end=void 0}};R.prototype._convertYcoordinates=function(t,e){var i=this.yAxisLeft,n=Number(this.svg.style.height.replace("px",""));"right"==e.options.yAxisOrientation&&(i=this.yAxisRight);for(var o=0;o<t.length;o++)t[o].screen_y=Math.round(i.convertValue(t[o].y));e.setZeroPosition(Math.min(n,i.convertValue(0)))};var p="string",u="boolean",f="number",Jo="date",d="object",At="moment",pk={configure:{enabled:{boolean:u},filter:{boolean:u,function:"function"},container:{dom:"dom"},__type__:{object:d,boolean:u,function:"function"}},alignCurrentTime:{string:p,undefined:"undefined"},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:p},sort:{boolean:u},sampling:{boolean:u},stack:{boolean:u},graphHeight:{string:p,number:f},shaded:{enabled:{boolean:u},orientation:{string:["bottom","top","zero","group"]},groupId:{object:d},__type__:{boolean:u,object:d}},style:{string:["line","bar","points"]},barChart:{width:{number:f},minWidth:{number:f},sideBySide:{boolean:u},align:{string:["left","center","right"]},__type__:{object:d}},interpolation:{enabled:{boolean:u},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:f},__type__:{object:d,boolean:u}},drawPoints:{enabled:{boolean:u},onRender:{function:"function"},size:{number:f},style:{string:["square","circle"]},__type__:{object:d,boolean:u,function:"function"}},dataAxis:{showMinorLabels:{boolean:u},showMajorLabels:{boolean:u},showWeekScale:{boolean:u},icons:{boolean:u},width:{string:p,number:f},visible:{boolean:u},alignZeros:{boolean:u},left:{range:{min:{number:f,undefined:"undefined"},max:{number:f,undefined:"undefined"},__type__:{object:d}},format:{function:"function"},title:{text:{string:p,number:f,undefined:"undefined"},style:{string:p,undefined:"undefined"},__type__:{object:d}},__type__:{object:d}},right:{range:{min:{number:f,undefined:"undefined"},max:{number:f,undefined:"undefined"},__type__:{object:d}},format:{function:"function"},title:{text:{string:p,number:f,undefined:"undefined"},style:{string:p,undefined:"undefined"},__type__:{object:d}},__type__:{object:d}},__type__:{object:d}},legend:{enabled:{boolean:u},icons:{boolean:u},left:{visible:{boolean:u},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:d}},right:{visible:{boolean:u},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:d}},__type__:{object:d,boolean:u}},groups:{visibility:{any:"any"},__type__:{object:d}},autoResize:{boolean:u},throttleRedraw:{number:f},clickToUse:{boolean:u},end:{number:f,date:Jo,string:p,moment:At},format:{minorLabels:{millisecond:{string:p,undefined:"undefined"},second:{string:p,undefined:"undefined"},minute:{string:p,undefined:"undefined"},hour:{string:p,undefined:"undefined"},weekday:{string:p,undefined:"undefined"},day:{string:p,undefined:"undefined"},week:{string:p,undefined:"undefined"},month:{string:p,undefined:"undefined"},quarter:{string:p,undefined:"undefined"},year:{string:p,undefined:"undefined"},__type__:{object:d}},majorLabels:{millisecond:{string:p,undefined:"undefined"},second:{string:p,undefined:"undefined"},minute:{string:p,undefined:"undefined"},hour:{string:p,undefined:"undefined"},weekday:{string:p,undefined:"undefined"},day:{string:p,undefined:"undefined"},week:{string:p,undefined:"undefined"},month:{string:p,undefined:"undefined"},quarter:{string:p,undefined:"undefined"},year:{string:p,undefined:"undefined"},__type__:{object:d}},__type__:{object:d}},moment:{function:"function"},height:{string:p,number:f},hiddenDates:{start:{date:Jo,number:f,string:p,moment:At},end:{date:Jo,number:f,string:p,moment:At},repeat:{string:p},__type__:{object:d,array:"array"}},locale:{string:p},locales:{__any__:{any:"any"},__type__:{object:d}},max:{date:Jo,number:f,string:p,moment:At},maxHeight:{number:f,string:p},maxMinorChars:{number:f},min:{date:Jo,number:f,string:p,moment:At},minHeight:{number:f,string:p},moveable:{boolean:u},multiselect:{boolean:u},orientation:{string:p},showCurrentTime:{boolean:u},showMajorLabels:{boolean:u},showMinorLabels:{boolean:u},showWeekScale:{boolean:u},snap:{function:"function",null:"null"},start:{date:Jo,number:f,string:p,moment:At},timeAxis:{scale:{string:p,undefined:"undefined"},step:{number:f,undefined:"undefined"},__type__:{object:d}},width:{string:p,number:f},zoomable:{boolean:u},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:f},zoomMin:{number:f},zIndex:{number:f},__type__:{object:d}},fk={global:{alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:["zero","top","bottom","group"]},style:["line","bar","points"],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:["left","center","right"]},interpolation:{enabled:!0,parametrization:["centripetal","chordal","uniform"]},drawPoints:{enabled:!0,size:[6,2,30,1],style:["square","circle"]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:"",style:""}},right:{title:{text:"",style:""}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]},right:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]}},autoResize:!0,clickToUse:!1,end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",quarter:"[Q]Q",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",quarter:"YYYY",year:""}},height:"",locale:"",max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!0,orientation:["both","bottom","top"],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showWeekScale:!1,start:"",width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}};function mk(t,e,i,n){if(!A(i)&&!Oy(i)&&i instanceof Object){var o=n;n=i;i=o}n&&n.throttleRedraw&&console.warn('Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var r=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:Zh,width:null,height:null,maxHeight:null,minHeight:null};this.options=F.deepExtend({},this.defaultOptions);this._create(t);this.components=[];this.body={dom:this.dom,domProps:this.props,emitter:{on:I(o=this.on).call(o,this),off:I(o=this.off).call(o,this),emit:I(o=this.emit).call(o,this)},hiddenDates:[],util:{getScale:function(){return r.timeAxis.step.scale},getStep:function(){return r.timeAxis.step.step},toScreen:I(o=r._toScreen).call(o,r),toGlobalScreen:I(o=r._toGlobalScreen).call(o,r),toTime:I(o=r._toTime).call(o,r),toGlobalTime:I(o=r._toGlobalTime).call(o,r)}};this.range=new jb(this.body);this.components.push(this.range);this.body.range=this.range;this.timeAxis=new t0(this.body);this.components.push(this.timeAxis);this.currentTime=new h0(this.body);this.components.push(this.currentTime);this.linegraph=new R(this.body);this.components.push(this.linegraph);this.itemsData=null;this.groupsData=null;this.on("tap",function(t){r.emit("click",r.getEventProperties(t))});this.on("doubletap",function(t){r.emit("doubleClick",r.getEventProperties(t))});this.dom.root.oncontextmenu=function(t){r.emit("contextmenu",r.getEventProperties(t))};this.initialFitDone=!1;this.on("changed",function(){if(null!=r.itemsData){if(!r.initialFitDone&&!r.options.rollingMode){r.initialFitDone=!0;if(null!=r.options.start||null!=r.options.end){null!=r.options.start&&null!=r.options.end||(e=r.getItemRange());var t=null!=r.options.start?r.options.start:e.min,e=null!=r.options.end?r.options.end:e.max;r.setWindow(t,e,{animation:!1})}else r.fit({animation:!1})}if(!r.initialDrawDone&&(r.initialRangeChangeDone||!r.options.start&&!r.options.end||r.options.rollingMode)){r.initialDrawDone=!0;r.dom.root.style.visibility="visible";r.dom.loadingScreen.parentNode.removeChild(r.dom.loadingScreen);r.options.onInitialDrawComplete&&Hh(function(){return r.options.onInitialDrawComplete()},0)}}});n&&this.setOptions(n);i&&this.setGroups(i);e&&this.setItems(e);this._redraw()}mk.prototype=new a0;mk.prototype.setOptions=function(t){var e=B1.validate(t,pk);!0===e&&console.log("%cErrors have been found in the supplied options object.",j1);a0.prototype.setOptions.call(this,t)};mk.prototype.setItems=function(t){var e=null==this.itemsData,i=t?Oy(t)?My(t):My(new B.DataSet(t)):null;this.itemsData&&this.itemsData.dispose();this.itemsData=i;this.linegraph&&this.linegraph.setItems(null!=i?i.rawDS:null);if(e)if(null!=this.options.start||null!=this.options.end){i=null!=this.options.start?this.options.start:null,e=null!=this.options.end?this.options.end:null;this.setWindow(i,e,{animation:!1})}else this.fit({animation:!1})};mk.prototype.setGroups=function(t){var e=t?Oy(t)?t:new B.DataSet(t):null;this.groupsData=e;this.linegraph.setGroups(e)};mk.prototype.getLegend=function(t,e,i){void 0===e&&(e=15);void 0===i&&(i=15);return void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot find group:'"+t+"'"};mk.prototype.isGroupVisible=function(t){return void 0!==this.linegraph.groups[t]&&this.linegraph.groups[t].visible&&(void 0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t])};mk.prototype.getDataRange=function(){var t,e=null,i=null;for(t in this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(t)&&1==this.linegraph.groups[t].visible)for(var n=0;n<this.linegraph.groups[t].itemsData.length;n++)var o=this.linegraph.groups[t].itemsData[n],o=F.convert(o.x,"Date").valueOf(),e=null==e||o<e?o:e,i=null==i||i<o?o:i;return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}};mk.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,e=e-F.getAbsoluteLeft(this.dom.centerContainer),i=i-F.getAbsoluteTop(this.dom.centerContainer),n=this._toTime(e),o=s0.customTimeFromTarget(t),r=F.getTarget(t),s=null,r=(F.hasParent(r,this.timeAxis.dom.foreground)||this.timeAxis2&&F.hasParent(r,this.timeAxis2.dom.foreground)?s="axis":F.hasParent(r,this.linegraph.yAxisLeft.dom.frame)||F.hasParent(r,this.linegraph.yAxisRight.dom.frame)?s="data-axis":F.hasParent(r,this.linegraph.legendLeft.dom.frame)||F.hasParent(r,this.linegraph.legendRight.dom.frame)?s="legend":null!=o?s="custom-time":F.hasParent(r,this.currentTime.bar)?s="current-time":F.hasParent(r,this.dom.center)&&(s="background"),[]),a=this.linegraph.yAxisLeft,l=this.linegraph.yAxisRight;!a.hidden&&0<this.itemsData.length&&r.push(a.screenToValue(i));!l.hidden&&0<this.itemsData.length&&r.push(l.screenToValue(i));return{event:t,customTime:o?o.options.id:null,what:s,pageX:(t.srcEvent||t).pageX,pageY:(t.srcEvent||t).pageY,x:e,y:i,time:n,value:r}};mk.prototype._createConfigurator=function(){return new Y1(this,this.dom.container,fk)};pt=(()=>{try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch(t){return"en"}})(),k=(j.locale(pt),{Core:a0,DateUtil:n,Range:jb,stack:gs,TimeStep:Qb,components:{items:{Item:D,BackgroundItem:p1,BoxItem:c,ClusterItem:S1,PointItem:$i,RangeItem:c1},BackgroundGroup:r1,Component:x,CurrentTime:h0,CustomTime:s0,DataAxis:rk,DataScale:ek,GraphGroup:uk,Group:n1,ItemSet:F1,Legend:ck,LineGraph:R,TimeAxis:t0}});L.Graph2d=mk;L.Timeline=o;L.timeline=k});
//# sourceMappingURL=vis-timeline.js.map