((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=0o;)!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{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",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{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=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;ia,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(ta;){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:at.length)&&(e=t.length);for(var i=0,n=new Array(e);i{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>>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{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{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=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));1im(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&&(bmim(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{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;re[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{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{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{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{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{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{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{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.\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{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{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{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{function e(){var t=0{function r(t,e,i){var n=3{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-eo-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);so&&(r=o-i-this.padding);r{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=3c.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{var o=4022871197;return function(t){for(var e=t.toString(),i=0;i>>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{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{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/g,Wv=/"/g,Yv=/"/g,Vv=/&#([a-zA-Z0-9]*);?/gim,Uv=/:?/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,""")}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"===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,"{for(;e{for(;e{for(;0{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"";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>>=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{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&&3ub(e)?1:-1}));i=lb(o);s=0;for(;s=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;ot.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=i.start&&a=e.start&&l{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=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(sthis.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{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{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{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(-1n.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{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{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);ie.index?1:t.indexi[a].index&&(i[n].top+=i[a].height);for(var l=t[n],h=0;h{var t=r.value;if(n(t))v.push(t);else if(d(t)){var e=m(t);null!==b&&ee},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{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 em(t)})).call(u,function(t,e){return t.top-e.top}),l=0;lr.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{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{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=-t.body.domProps.scrollTop}},{key:"_calculateHeight",value:function(t){var e,i="fixed"===this.heightMode?F.toArray(this.items):this.visibleItems;if(0t.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=1new 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(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(0a});if(1==this.checkRangedItems){this.checkRangedItems=!1;for(var h=0;ha})}for(var u={},c=0,d=0;d{P(F).call(F,u,function(t){t[e]()})})(f);for(var m=0;m{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{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{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+="
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{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()-it.start&&this.data.start.getTime()t.start&&this.data.start.getTime()-i/2{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{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.startt.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{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.startt.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-eo-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);so&&(r=o-i-this.padding);r{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{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.startt.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=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{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{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='
'+t.length+"
",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{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&&0t&&o.push(l.id):l.lefte&&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.righte&&o.push(l.id):l.lefti&&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{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;io)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=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=s.top&&es.top)return o}else if(0===n&&ee)&&(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=3c.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{function e(){var t=0{function o(t,e,i){var n=3"+t+":"):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;rvar options = "+Bf(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;e{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{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{function h(t,e,i,n,o,r){var s=6l.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=0r+1e-5){i();h=!1}else{if(!this.autoScaleStart&&this._start{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{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 tthis.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.maxLabelSizethis.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{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;re[s].screen_y?e[s].screen_y:o;r=rt[n].accumulatedNegative?t[n].accumulatedNegative:o;o=o>t[n].accumulatedPositive?t[n].accumulatedPositive:o;r=re.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;nt[n].y?t[n].y:e;i=i")}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 tt[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{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