UNPKG

vis-timeline

Version:

Create a fully customizable, interactive timeline with items and ranges.

34 lines 421 kB
/**
 * vis-timeline and vis-graph2d
 * https://visjs.github.io/vis-timeline/
 *
 * Create a fully customizable, interactive timeline with items and ranges.
 *
 * @version 7.5.0
 * @date    2021-11-06T19:14:36.014Z
 *
 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
 * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
 *
 * @license
 * vis.js is dual licensed under both
 *
 *   1. The Apache 2.0 License
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   and
 *
 *   2. The MIT License
 *      http://opensource.org/licenses/MIT
 *
 * vis.js may be distributed under either license.
 */
!function(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):e((t="undefined"!=typeof globalThis?globalThis:t||self).vis=t.vis||{},t.moment,t.vis)}(this,(function(t,e,n){function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=o(e),s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a=function(t){return t&&t.Math==Math&&t},l=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof s&&s)||function(){return this}()||Function("return this")(),h=Function.prototype,u=h.apply,c=h.bind,d=h.call,p="object"==typeof Reflect&&Reflect.apply||(c?d.bind(u):function(){return d.apply(u,arguments)}),m=Function.prototype,f=m.bind,v=m.call,g=f&&f.bind(v),y=f?function(t){return t&&g(v,t)}:function(t){return t&&function(){return v.apply(t,arguments)}},b=function(t){return"function"==typeof t},w={},k=function(t){try{return!!t()}catch(t){return!0}},_=!k((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),x=Function.prototype.call,C=x.bind?x.bind(x):function(){return x.apply(x,arguments)},D={},S={}.propertyIsEnumerable,T=Object.getOwnPropertyDescriptor,E=T&&!S.call({1:2},1);D.f=E?function(t){var e=T(this,t);return!!e&&e.enumerable}:S;var O,A,I=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},P=y,M=P({}.toString),N=P("".slice),F=function(t){return N(M(t),8,-1)},R=y,L=k,j=F,B=l.Object,z=R("".split),H=L((function(){return!B("z").propertyIsEnumerable(0)}))?function(t){return"String"==j(t)?z(t,""):B(t)}:B,G=l.TypeError,V=function(t){if(null==t)throw G("Can't call method on "+t);return t},W=H,Y=V,U=function(t){return W(Y(t))},X=b,q=function(t){return"object"==typeof t?null!==t:X(t)},K={},$=K,Z=l,Q=b,J=function(t){return Q(t)?t:void 0},tt=function(t,e){return arguments.length<2?J($[t])||J(Z[t]):$[t]&&$[t][e]||Z[t]&&Z[t][e]},et=y({}.isPrototypeOf),it=tt("navigator","userAgent")||"",nt=l,ot=it,rt=nt.process,st=nt.Deno,at=rt&&rt.versions||st&&st.version,lt=at&&at.v8;lt&&(A=(O=lt.split("."))[0]>0&&O[0]<4?1:+(O[0]+O[1])),!A&&ot&&(!(O=ot.match(/Edge\/(\d+)/))||O[1]>=74)&&(O=ot.match(/Chrome\/(\d+)/))&&(A=+O[1]);var ht=A,ut=ht,ct=k,dt=!!Object.getOwnPropertySymbols&&!ct((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ut&&ut<41})),pt=dt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,mt=tt,ft=b,vt=et,gt=pt,yt=l.Object,bt=gt?function(t){return"symbol"==typeof t}:function(t){var e=mt("Symbol");return ft(e)&&vt(e.prototype,yt(t))},wt=l.String,kt=function(t){try{return wt(t)}catch(t){return"Object"}},_t=b,xt=kt,Ct=l.TypeError,Dt=function(t){if(_t(t))return t;throw Ct(xt(t)+" is not a function")},St=Dt,Tt=function(t,e){var i=t[e];return null==i?void 0:St(i)},Et=C,Ot=b,At=q,It=l.TypeError,Pt={exports:{}},Mt=l,Nt=Object.defineProperty,Ft=function(t,e){try{Nt(Mt,t,{value:e,configurable:!0,writable:!0})}catch(i){Mt[t]=e}return e},Rt="__core-js_shared__",Lt=l[Rt]||Ft(Rt,{}),jt=Lt;(Pt.exports=function(t,e){return jt[t]||(jt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.1",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Bt=V,zt=l.Object,Ht=function(t){return zt(Bt(t))},Gt=Ht,Vt=y({}.hasOwnProperty),Wt=Object.hasOwn||function(t,e){return Vt(Gt(t),e)},Yt=y,Ut=0,Xt=Math.random(),qt=Yt(1..toString),Kt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+qt(++Ut+Xt,36)},$t=l,Zt=Pt.exports,Qt=Wt,Jt=Kt,te=dt,ee=pt,ie=Zt("wks"),ne=$t.Symbol,oe=ne&&ne.for,re=ee?ne:ne&&ne.withoutSetter||Jt,se=function(t){if(!Qt(ie,t)||!te&&"string"!=typeof ie[t]){var e="Symbol."+t;te&&Qt(ne,t)?ie[t]=ne[t]:ie[t]=ee&&oe?oe(e):re(e)}return ie[t]},ae=C,le=q,he=bt,ue=Tt,ce=function(t,e){var i,n;if("string"===e&&Ot(i=t.toString)&&!At(n=Et(i,t)))return n;if(Ot(i=t.valueOf)&&!At(n=Et(i,t)))return n;if("string"!==e&&Ot(i=t.toString)&&!At(n=Et(i,t)))return n;throw It("Can't convert object to primitive value")},de=se,pe=l.TypeError,me=de("toPrimitive"),fe=function(t,e){if(!le(t)||he(t))return t;var i,n=ue(t,me);if(n){if(void 0===e&&(e="default"),i=ae(n,t,e),!le(i)||he(i))return i;throw pe("Can't convert object to primitive value")}return void 0===e&&(e="number"),ce(t,e)},ve=bt,ge=function(t){var e=fe(t,"string");return ve(e)?e:e+""},ye=q,be=l.document,we=ye(be)&&ye(be.createElement),ke=function(t){return we?be.createElement(t):{}},_e=ke,xe=!_&&!k((function(){return 7!=Object.defineProperty(_e("div"),"a",{get:function(){return 7}}).a})),Ce=_,De=C,Se=D,Te=I,Ee=U,Oe=ge,Ae=Wt,Ie=xe,Pe=Object.getOwnPropertyDescriptor;w.f=Ce?Pe:function(t,e){if(t=Ee(t),e=Oe(e),Ie)try{return Pe(t,e)}catch(t){}if(Ae(t,e))return Te(!De(Se.f,t,e),t[e])};var Me=k,Ne=b,Fe=/#|\.prototype\./,Re=function(t,e){var i=je[Le(t)];return i==ze||i!=Be&&(Ne(e)?Me(e):!!e)},Le=Re.normalize=function(t){return String(t).replace(Fe,".").toLowerCase()},je=Re.data={},Be=Re.NATIVE="N",ze=Re.POLYFILL="P",He=Re,Ge=Dt,Ve=y(y.bind),We=function(t,e){return Ge(t),void 0===e?t:Ve?Ve(t,e):function(){return t.apply(e,arguments)}},Ye={},Ue=l,Xe=q,qe=Ue.String,Ke=Ue.TypeError,$e=function(t){if(Xe(t))return t;throw Ke(qe(t)+" is not an object")},Ze=_,Qe=xe,Je=$e,ti=ge,ei=l.TypeError,ii=Object.defineProperty;Ye.f=Ze?ii:function(t,e,i){if(Je(t),e=ti(e),Je(i),Qe)try{return ii(t,e,i)}catch(t){}if("get"in i||"set"in i)throw ei("Accessors not supported");return"value"in i&&(t[e]=i.value),t};var ni=Ye,oi=I,ri=_?function(t,e,i){return ni.f(t,e,oi(1,i))}:function(t,e,i){return t[e]=i,t},si=l,ai=p,li=y,hi=b,ui=w.f,ci=He,di=K,pi=We,mi=ri,fi=Wt,vi=function(t){var e=function(i,n,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(i);case 2:return new t(i,n)}return new t(i,n,o)}return ai(t,this,arguments)};return e.prototype=t.prototype,e},gi=function(t,e){var i,n,o,r,s,a,l,h,u=t.target,c=t.global,d=t.stat,p=t.proto,m=c?si:d?si[u]:(si[u]||{}).prototype,f=c?di:di[u]||mi(di,u,{})[u],v=f.prototype;for(o in e)i=!ci(c?o:u+(d?".":"#")+o,t.forced)&&m&&fi(m,o),s=f[o],i&&(a=t.noTargetGet?(h=ui(m,o))&&h.value:m[o]),r=i&&a?a:e[o],i&&typeof s==typeof r||(l=t.bind&&i?pi(r,si):t.wrap&&i?vi(r):p&&hi(r)?li(r):r,(t.sham||r&&r.sham||s&&s.sham)&&mi(l,"sham",!0),mi(f,o,l),p&&(fi(di,n=u+"Prototype")||mi(di,n,{}),mi(di[n],o,r),t.real&&v&&!v[o]&&mi(v,o,r)))},yi=y([].slice),bi=y,wi=Dt,ki=q,_i=Wt,xi=yi,Ci=l.Function,Di=bi([].concat),Si=bi([].join),Ti={},Ei=function(t,e,i){if(!_i(Ti,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";Ti[e]=Ci("C,a","return new C("+Si(n,",")+")")}return Ti[e](t,i)},Oi=Ci.bind||function(t){var e=wi(this),i=e.prototype,n=xi(arguments,1),o=function(){var i=Di(n,xi(arguments));return this instanceof o?Ei(e,i.length,i):e.apply(t,i)};return ki(i)&&(o.prototype=i),o},Ai={};Ai[se("toStringTag")]="z";var Ii="[object z]"===String(Ai),Pi=l,Mi=Ii,Ni=b,Fi=F,Ri=se("toStringTag"),Li=Pi.Object,ji="Arguments"==Fi(function(){return arguments}()),Bi=Mi?Fi:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Li(t),Ri))?i:ji?Fi(e):"Object"==(n=Fi(e))&&Ni(e.callee)?"Arguments":n},zi=b,Hi=Lt,Gi=y(Function.toString);zi(Hi.inspectSource)||(Hi.inspectSource=function(t){return Gi(t)});var Vi,Wi=Hi.inspectSource,Yi=y,Ui=k,Xi=b,qi=Bi,Ki=Wi,$i=function(){},Zi=[],Qi=tt("Reflect","construct"),Ji=/^\s*(?:class|function)\b/,tn=Yi(Ji.exec),en=!Ji.exec($i),nn=function(t){if(!Xi(t))return!1;try{return Qi($i,Zi,t),!0}catch(t){return!1}},on=!Qi||Ui((function(){var t;return nn(nn.call)||!nn(Object)||!nn((function(){t=!0}))||t}))?function(t){if(!Xi(t))return!1;switch(qi(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return en||!!tn(Ji,Ki(t))}:nn,rn=on,sn=kt,an=l.TypeError,ln=Math.ceil,hn=Math.floor,un=function(t){var e=+t;return e!=e||0===e?0:(e>0?hn:ln)(e)},cn=un,dn=Math.max,pn=Math.min,mn=function(t,e){var i=cn(t);return i<0?dn(i+e,0):pn(i,e)},fn=un,vn=Math.min,gn=function(t){return t>0?vn(fn(t),9007199254740991):0},yn=function(t){return gn(t.length)},bn=U,wn=mn,kn=yn,_n=function(t){return function(e,i,n){var o,r=bn(e),s=kn(r),a=wn(n,s);if(t&&i!=i){for(;s>a;)if((o=r[a++])!=o)return!0}else for(;s>a;a++)if((t||a in r)&&r[a]===i)return t||a||0;return!t&&-1}},xn={includes:_n(!0),indexOf:_n(!1)},Cn={},Dn=Wt,Sn=U,Tn=xn.indexOf,En=Cn,On=y([].push),An=function(t,e){var i,n=Sn(t),o=0,r=[];for(i in n)!Dn(En,i)&&Dn(n,i)&&On(r,i);for(;e.length>o;)Dn(n,i=e[o++])&&(~Tn(r,i)||On(r,i));return r},In=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Pn=An,Mn=In,Nn=Object.keys||function(t){return Pn(t,Mn)},Fn=Ye,Rn=$e,Ln=U,jn=Nn,Bn=_?Object.defineProperties:function(t,e){Rn(t);for(var i,n=Ln(e),o=jn(e),r=o.length,s=0;r>s;)Fn.f(t,i=o[s++],n[i]);return t},zn=tt("document","documentElement"),Hn=Pt.exports,Gn=Kt,Vn=Hn("keys"),Wn=function(t){return Vn[t]||(Vn[t]=Gn(t))},Yn=$e,Un=Bn,Xn=In,qn=Cn,Kn=zn,$n=ke,Zn=Wn("IE_PROTO"),Qn=function(){},Jn=function(t){return"<script>"+t+"</"+"script>"},to=function(t){t.write(Jn("")),t.close();var e=t.parentWindow.Object;return t=null,e},eo=function(){try{Vi=new ActiveXObject("htmlfile")}catch(t){}var t,e;eo="undefined"!=typeof document?document.domain&&Vi?to(Vi):((e=$n("iframe")).style.display="none",Kn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Jn("document.F=Object")),t.close(),t.F):to(Vi);for(var i=Xn.length;i--;)delete eo.prototype[Xn[i]];return eo()};qn[Zn]=!0;var io=Object.create||function(t,e){var i;return null!==t?(Qn.prototype=Yn(t),i=new Qn,Qn.prototype=null,i[Zn]=t):i=eo(),void 0===e?i:Un(i,e)},no=gi,oo=p,ro=Oi,so=function(t){if(rn(t))return t;throw an(sn(t)+" is not a constructor")},ao=$e,lo=q,ho=io,uo=k,co=tt("Reflect","construct"),po=Object.prototype,mo=[].push,fo=uo((function(){function t(){}return!(co((function(){}),[],t)instanceof t)})),vo=!uo((function(){co((function(){}))})),go=fo||vo;no({target:"Reflect",stat:!0,forced:go,sham:go},{construct:function(t,e){so(t),ao(e);var i=arguments.length<3?t:so(arguments[2]);if(vo&&!fo)return co(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];return oo(mo,n,e),new(oo(ro,t,n))}var o=i.prototype,r=ho(lo(o)?o:po),s=oo(t,r,e);return lo(s)?s:r}});var yo=K.Reflect.construct;function bo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var wo={exports:{}};gi({target:"Object",stat:!0,forced:!_,sham:!_},{defineProperty:Ye.f});var ko=K.Object,_o=wo.exports=function(t,e,i){return ko.defineProperty(t,e,i)};ko.defineProperty.sham&&(_o.sham=!0);var xo=wo.exports,Co=xo;function Do(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Co(t,n.key,n)}}function So(t,e,i){return e&&Do(t.prototype,e),i&&Do(t,i),t}function To(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}gi({target:"Object",stat:!0,sham:!_},{create:io});var Eo=K.Object,Oo=function(t,e){return Eo.create(t,e)},Ao=Oo,Io=l,Po=b,Mo=Io.String,No=Io.TypeError,Fo=y,Ro=$e,Lo=function(t){if("object"==typeof t||Po(t))return t;throw No("Can't set "+Mo(t)+" as a prototype")};gi({target:"Object",stat:!0},{setPrototypeOf:Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=Fo(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(i,[]),e=i instanceof Array}catch(t){}return function(i,n){return Ro(i),Lo(n),e?t(i,n):i.__proto__=n,i}}():void 0)});var jo=K.Object.setPrototypeOf;function Bo(t,e){return(Bo=jo||function(t,e){return t.__proto__=e,t})(t,e)}function zo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Ao(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Bo(t,e)}var Ho=F,Go=Array.isArray||function(t){return"Array"==Ho(t)},Vo=ge,Wo=Ye,Yo=I,Uo=function(t,e,i){var n=Vo(e);n in t?Wo.f(t,n,Yo(0,i)):t[n]=i},Xo=l,qo=Go,Ko=on,$o=q,Zo=se("species"),Qo=Xo.Array,Jo=function(t){var e;return qo(t)&&(e=t.constructor,(Ko(e)&&(e===Qo||qo(e.prototype))||$o(e)&&null===(e=e[Zo]))&&(e=void 0)),void 0===e?Qo:e},tr=function(t,e){return new(Jo(t))(0===e?0:e)},er=k,ir=ht,nr=se("species"),or=function(t){return ir>=51||!er((function(){var e=[];return(e.constructor={})[nr]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},rr=gi,sr=l,ar=k,lr=Go,hr=q,ur=Ht,cr=yn,dr=Uo,pr=tr,mr=or,fr=ht,vr=se("isConcatSpreadable"),gr=9007199254740991,yr="Maximum allowed index exceeded",br=sr.TypeError,wr=fr>=51||!ar((function(){var t=[];return t[vr]=!1,t.concat()[0]!==t})),kr=mr("concat"),_r=function(t){if(!hr(t))return!1;var e=t[vr];return void 0!==e?!!e:lr(t)};rr({target:"Array",proto:!0,forced:!wr||!kr},{concat:function(t){var e,i,n,o,r,s=ur(this),a=pr(s,0),l=0;for(e=-1,n=arguments.length;e<n;e++)if(_r(r=-1===e?s:arguments[e])){if(l+(o=cr(r))>gr)throw br(yr);for(i=0;i<o;i++,l++)i in r&&dr(a,l,r[i])}else{if(l>=gr)throw br(yr);dr(a,l++,r)}return a.length=l,a}});var xr=Bi,Cr=l.String,Dr=function(t){if("Symbol"===xr(t))throw TypeError("Cannot convert a Symbol value to a string");return Cr(t)},Sr={},Tr=An,Er=In.concat("length","prototype");Sr.f=Object.getOwnPropertyNames||function(t){return Tr(t,Er)};var Or={},Ar=F,Ir=U,Pr=Sr.f,Mr=yi,Nr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Or.f=function(t){return Nr&&"Window"==Ar(t)?function(t){try{return Pr(t)}catch(t){return Mr(Nr)}}(t):Pr(Ir(t))};var Fr={};Fr.f=Object.getOwnPropertySymbols;var Rr=ri,Lr=function(t,e,i,n){n&&n.enumerable?t[e]=i:Rr(t,e,i)},jr={},Br=se;jr.f=Br;var zr,Hr,Gr,Vr=K,Wr=Wt,Yr=jr,Ur=Ye.f,Xr=function(t){var e=Vr.Symbol||(Vr.Symbol={});Wr(e,t)||Ur(e,t,{value:Yr.f(t)})},qr=Bi,Kr=Ii?{}.toString:function(){return"[object "+qr(this)+"]"},$r=Ii,Zr=Ye.f,Qr=ri,Jr=Wt,ts=Kr,es=se("toStringTag"),is=function(t,e,i,n){if(t){var o=i?t:t.prototype;Jr(o,es)||Zr(o,es,{configurable:!0,value:e}),n&&!$r&&Qr(o,"toString",ts)}},ns=b,os=Wi,rs=l.WeakMap,ss=ns(rs)&&/native code/.test(os(rs)),as=l,ls=y,hs=q,us=ri,cs=Wt,ds=Lt,ps=Wn,ms=Cn,fs="Object already initialized",vs=as.TypeError,gs=as.WeakMap;if(ss||ds.state){var ys=ds.state||(ds.state=new gs),bs=ls(ys.get),ws=ls(ys.has),ks=ls(ys.set);zr=function(t,e){if(ws(ys,t))throw new vs(fs);return e.facade=t,ks(ys,t,e),e},Hr=function(t){return bs(ys,t)||{}},Gr=function(t){return ws(ys,t)}}else{var _s=ps("state");ms[_s]=!0,zr=function(t,e){if(cs(t,_s))throw new vs(fs);return e.facade=t,us(t,_s,e),e},Hr=function(t){return cs(t,_s)?t[_s]:{}},Gr=function(t){return cs(t,_s)}}var xs={set:zr,get:Hr,has:Gr,enforce:function(t){return Gr(t)?Hr(t):zr(t,{})},getterFor:function(t){return function(e){var i;if(!hs(e)||(i=Hr(e)).type!==t)throw vs("Incompatible receiver, "+t+" required");return i}}},Cs=We,Ds=H,Ss=Ht,Ts=yn,Es=tr,Os=y([].push),As=function(t){var e=1==t,i=2==t,n=3==t,o=4==t,r=6==t,s=7==t,a=5==t||r;return function(l,h,u,c){for(var d,p,m=Ss(l),f=Ds(m),v=Cs(h,u),g=Ts(f),y=0,b=c||Es,w=e?b(l,g):i||s?b(l,0):void 0;g>y;y++)if((a||y in f)&&(p=v(d=f[y],y,m),t))if(e)w[y]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return y;case 2:Os(w,d)}else switch(t){case 4:return!1;case 7:Os(w,d)}return r?-1:n||o?o:w}},Is={forEach:As(0),map:As(1),filter:As(2),some:As(3),every:As(4),find:As(5),findIndex:As(6),filterReject:As(7)},Ps=gi,Ms=l,Ns=tt,Fs=p,Rs=C,Ls=y,js=_,Bs=dt,zs=k,Hs=Wt,Gs=Go,Vs=b,Ws=q,Ys=et,Us=bt,Xs=$e,qs=Ht,Ks=U,$s=ge,Zs=Dr,Qs=I,Js=io,ta=Nn,ea=Sr,ia=Or,na=Fr,oa=w,ra=Ye,sa=D,aa=yi,la=Lr,ha=Pt.exports,ua=Cn,ca=Kt,da=se,pa=jr,ma=Xr,fa=is,va=xs,ga=Is.forEach,ya=Wn("hidden"),ba="Symbol",wa=da("toPrimitive"),ka=va.set,_a=va.getterFor(ba),xa=Object.prototype,Ca=Ms.Symbol,Da=Ca&&Ca.prototype,Sa=Ms.TypeError,Ta=Ms.QObject,Ea=Ns("JSON","stringify"),Oa=oa.f,Aa=ra.f,Ia=ia.f,Pa=sa.f,Ma=Ls([].push),Na=ha("symbols"),Fa=ha("op-symbols"),Ra=ha("string-to-symbol-registry"),La=ha("symbol-to-string-registry"),ja=ha("wks"),Ba=!Ta||!Ta.prototype||!Ta.prototype.findChild,za=js&&zs((function(){return 7!=Js(Aa({},"a",{get:function(){return Aa(this,"a",{value:7}).a}})).a}))?function(t,e,i){var n=Oa(xa,e);n&&delete xa[e],Aa(t,e,i),n&&t!==xa&&Aa(xa,e,n)}:Aa,Ha=function(t,e){var i=Na[t]=Js(Da);return ka(i,{type:ba,tag:t,description:e}),js||(i.description=e),i},Ga=function(t,e,i){t===xa&&Ga(Fa,e,i),Xs(t);var n=$s(e);return Xs(i),Hs(Na,n)?(i.enumerable?(Hs(t,ya)&&t[ya][n]&&(t[ya][n]=!1),i=Js(i,{enumerable:Qs(0,!1)})):(Hs(t,ya)||Aa(t,ya,Qs(1,{})),t[ya][n]=!0),za(t,n,i)):Aa(t,n,i)},Va=function(t,e){Xs(t);var i=Ks(e),n=ta(i).concat(Xa(i));return ga(n,(function(e){js&&!Rs(Wa,i,e)||Ga(t,e,i[e])})),t},Wa=function(t){var e=$s(t),i=Rs(Pa,this,e);return!(this===xa&&Hs(Na,e)&&!Hs(Fa,e))&&(!(i||!Hs(this,e)||!Hs(Na,e)||Hs(this,ya)&&this[ya][e])||i)},Ya=function(t,e){var i=Ks(t),n=$s(e);if(i!==xa||!Hs(Na,n)||Hs(Fa,n)){var o=Oa(i,n);return!o||!Hs(Na,n)||Hs(i,ya)&&i[ya][n]||(o.enumerable=!0),o}},Ua=function(t){var e=Ia(Ks(t)),i=[];return ga(e,(function(t){Hs(Na,t)||Hs(ua,t)||Ma(i,t)})),i},Xa=function(t){var e=t===xa,i=Ia(e?Fa:Ks(t)),n=[];return ga(i,(function(t){!Hs(Na,t)||e&&!Hs(xa,t)||Ma(n,Na[t])})),n};(Bs||(la(Da=(Ca=function(){if(Ys(Da,this))throw Sa("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Zs(arguments[0]):void 0,e=ca(t),i=function(t){this===xa&&Rs(i,Fa,t),Hs(this,ya)&&Hs(this[ya],e)&&(this[ya][e]=!1),za(this,e,Qs(1,t))};return js&&Ba&&za(xa,e,{configurable:!0,set:i}),Ha(e,t)}).prototype,"toString",(function(){return _a(this).tag})),la(Ca,"withoutSetter",(function(t){return Ha(ca(t),t)})),sa.f=Wa,ra.f=Ga,oa.f=Ya,ea.f=ia.f=Ua,na.f=Xa,pa.f=function(t){return Ha(da(t),t)},js&&Aa(Da,"description",{configurable:!0,get:function(){return _a(this).description}})),Ps({global:!0,wrap:!0,forced:!Bs,sham:!Bs},{Symbol:Ca}),ga(ta(ja),(function(t){ma(t)})),Ps({target:ba,stat:!0,forced:!Bs},{for:function(t){var e=Zs(t);if(Hs(Ra,e))return Ra[e];var i=Ca(e);return Ra[e]=i,La[i]=e,i},keyFor:function(t){if(!Us(t))throw Sa(t+" is not a symbol");if(Hs(La,t))return La[t]},useSetter:function(){Ba=!0},useSimple:function(){Ba=!1}}),Ps({target:"Object",stat:!0,forced:!Bs,sham:!js},{create:function(t,e){return void 0===e?Js(t):Va(Js(t),e)},defineProperty:Ga,defineProperties:Va,getOwnPropertyDescriptor:Ya}),Ps({target:"Object",stat:!0,forced:!Bs},{getOwnPropertyNames:Ua,getOwnPropertySymbols:Xa}),Ps({target:"Object",stat:!0,forced:zs((function(){na.f(1)}))},{getOwnPropertySymbols:function(t){return na.f(qs(t))}}),Ea)&&Ps({target:"JSON",stat:!0,forced:!Bs||zs((function(){var t=Ca();return"[null]"!=Ea([t])||"{}"!=Ea({a:t})||"{}"!=Ea(Object(t))}))},{stringify:function(t,e,i){var n=aa(arguments),o=e;if((Ws(e)||void 0!==t)&&!Us(t))return Gs(e)||(e=function(t,e){if(Vs(o)&&(e=Rs(o,this,t,e)),!Us(e))return e}),n[1]=e,Fs(Ea,null,n)}});if(!Da[wa]){var qa=Da.valueOf;la(Da,wa,(function(t){return Rs(qa,this)}))}fa(Ca,ba),ua[ya]=!0,Xr("asyncIterator"),Xr("hasInstance"),Xr("isConcatSpreadable"),Xr("iterator"),Xr("match"),Xr("matchAll"),Xr("replace"),Xr("search"),Xr("species"),Xr("split"),Xr("toPrimitive"),Xr("toStringTag"),Xr("unscopables"),is(l.JSON,"JSON",!0);var Ka,$a,Za,Qa=K.Symbol,Ja={},tl=_,el=Wt,il=Function.prototype,nl=tl&&Object.getOwnPropertyDescriptor,ol=el(il,"name"),rl={EXISTS:ol,PROPER:ol&&"something"===function(){}.name,CONFIGURABLE:ol&&(!tl||tl&&nl(il,"name").configurable)},sl=!k((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),al=l,ll=Wt,hl=b,ul=Ht,cl=sl,dl=Wn("IE_PROTO"),pl=al.Object,ml=pl.prototype,fl=cl?pl.getPrototypeOf:function(t){var e=ul(t);if(ll(e,dl))return e[dl];var i=e.constructor;return hl(i)&&e instanceof i?i.prototype:e instanceof pl?ml:null},vl=k,gl=b,yl=io,bl=fl,wl=Lr,kl=se("iterator"),_l=!1;[].keys&&("next"in(Za=[].keys())?($a=bl(bl(Za)))!==Object.prototype&&(Ka=$a):_l=!0);var xl=null==Ka||vl((function(){var t={};return Ka[kl].call(t)!==t}));gl((Ka=xl?{}:yl(Ka))[kl])||wl(Ka,kl,(function(){return this}));var Cl={IteratorPrototype:Ka,BUGGY_SAFARI_ITERATORS:_l},Dl=Cl.IteratorPrototype,Sl=io,Tl=I,El=is,Ol=Ja,Al=function(){return this},Il=gi,Pl=C,Ml=function(t,e,i){var n=e+" Iterator";return t.prototype=Sl(Dl,{next:Tl(1,i)}),El(t,n,!1,!0),Ol[n]=Al,t},Nl=fl,Fl=is,Rl=Lr,Ll=Ja,jl=rl.PROPER,Bl=Cl.BUGGY_SAFARI_ITERATORS,zl=se("iterator"),Hl="keys",Gl="values",Vl="entries",Wl=function(){return this},Yl=function(t,e,i,n,o,r,s){Ml(i,e,n);var a,l,h,u=function(t){if(t===o&&f)return f;if(!Bl&&t in p)return p[t];switch(t){case Hl:case Gl:case Vl:return function(){return new i(this,t)}}return function(){return new i(this)}},c=e+" Iterator",d=!1,p=t.prototype,m=p[zl]||p["@@iterator"]||o&&p[o],f=!Bl&&m||u(o),v="Array"==e&&p.entries||m;if(v&&(a=Nl(v.call(new t)))!==Object.prototype&&a.next&&(Fl(a,c,!0,!0),Ll[c]=Wl),jl&&o==Gl&&m&&m.name!==Gl&&(d=!0,f=function(){return Pl(m,this)}),o)if(l={values:u(Gl),keys:r?f:u(Hl),entries:u(Vl)},s)for(h in l)(Bl||d||!(h in p))&&Rl(p,h,l[h]);else Il({target:e,proto:!0,forced:Bl||d},l);return s&&p[zl]!==f&&Rl(p,zl,f,{name:o}),Ll[e]=f,l},Ul=U,Xl=Ja,ql=xs,Kl=Yl,$l="Array Iterator",Zl=ql.set,Ql=ql.getterFor($l);Kl(Array,"Array",(function(t,e){Zl(this,{type:$l,target:Ul(t),index:0,kind:e})}),(function(){var t=Ql(this),e=t.target,i=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),Xl.Arguments=Xl.Array;var Jl={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},th=l,eh=Bi,ih=ri,nh=Ja,oh=se("toStringTag");for(var rh in Jl){var sh=th[rh],ah=sh&&sh.prototype;ah&&eh(ah)!==oh&&ih(ah,oh,rh),nh[rh]=nh.Array}var lh=Qa;Xr("asyncDispose"),Xr("dispose"),Xr("matcher"),Xr("metadata"),Xr("observable"),Xr("patternMatch"),Xr("replaceAll");var hh=lh,uh=y,ch=un,dh=Dr,ph=V,mh=uh("".charAt),fh=uh("".charCodeAt),vh=uh("".slice),gh=function(t){return function(e,i){var n,o,r=dh(ph(e)),s=ch(i),a=r.length;return s<0||s>=a?t?"":void 0:(n=fh(r,s))<55296||n>56319||s+1===a||(o=fh(r,s+1))<56320||o>57343?t?mh(r,s):n:t?vh(r,s,s+2):o-56320+(n-55296<<10)+65536}},yh={codeAt:gh(!1),charAt:gh(!0)}.charAt,bh=Dr,wh=xs,kh=Yl,_h="String Iterator",xh=wh.set,Ch=wh.getterFor(_h);kh(String,"String",(function(t){xh(this,{type:_h,string:bh(t),index:0})}),(function(){var t,e=Ch(this),i=e.string,n=e.index;return n>=i.length?{value:void 0,done:!0}:(t=yh(i,n),e.index+=t.length,{value:t,done:!1})}));var Dh=jr.f("iterator");function Sh(t){return(Sh="function"==typeof hh&&"symbol"==typeof Dh?function(t){return typeof t}:function(t){return t&&"function"==typeof hh&&t.constructor===hh&&t!==hh.prototype?"symbol":typeof t})(t)}function Th(t,e){if(e&&("object"===Sh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return To(t)}var Eh=Ht,Oh=fl,Ah=sl;gi({target:"Object",stat:!0,forced:k((function(){Oh(1)})),sham:!Ah},{getPrototypeOf:function(t){return Oh(Eh(t))}});var Ih=K.Object.getPrototypeOf,Ph=Ih;function Mh(t){return(Mh=jo?Ph:function(t){return t.__proto__||Ph(t)})(t)}gi({target:"Array",stat:!0},{isArray:Go});var Nh=K.Array.isArray,Fh=Nh;gi({target:"Function",proto:!0},{bind:Oi});var Rh=K,Lh=function(t){return Rh[t+"Prototype"]},jh=Lh("Function").bind,Bh=et,zh=jh,Hh=Function.prototype,Gh=function(t){var e=t.bind;return t===Hh||Bh(Hh,t)&&e===Hh.bind?zh:e},Vh=gi,Wh=l,Yh=p,Uh=b,Xh=yi,qh=/MSIE .\./.test(it),Kh=Wh.Function,$h=function(t){return function(e,i){var n=arguments.length>2,o=n?Xh(arguments,2):void 0;return t(n?function(){Yh(Uh(e)?e:Kh(e),this,o)}:e,i)}};Vh({global:!0,bind:!0,forced:qh},{setTimeout:$h(Wh.setTimeout),setInterval:$h(Wh.setInterval)});var Zh=K.setTimeout,Qh=k,Jh=function(t,e){var i=[][t];return!!i&&Qh((function(){i.call(null,e||function(){throw 1},1)}))},tu=Is.forEach,eu=Jh("forEach")?[].forEach:function(t){return tu(this,t,arguments.length>1?arguments[1]:void 0)};gi({target:"Array",proto:!0,forced:[].forEach!=eu},{forEach:eu});var iu=Lh("Array").forEach,nu=Bi,ou=Wt,ru=et,su=iu,au=Array.prototype,lu={DOMTokenList:!0,NodeList:!0},hu=function(t){var e=t.forEach;return t===au||ru(au,t)&&e===au.forEach||ou(lu,nu(t))?su:e},uu="undefined"!=typeof window&&window.moment||r.default,cu=K.Object.getOwnPropertySymbols,du=Is.filter;gi({target:"Array",proto:!0,forced:!or("filter")},{filter:function(t){return du(this,t,arguments.length>1?arguments[1]:void 0)}});var pu=Lh("Array").filter,mu=et,fu=pu,vu=Array.prototype,gu=function(t){var e=t.filter;return t===vu||mu(vu,t)&&e===vu.filter?fu:e},yu={exports:{}},bu=gi,wu=k,ku=U,_u=w.f,xu=_,Cu=wu((function(){_u(1)}));bu({target:"Object",stat:!0,forced:!xu||Cu,sham:!xu},{getOwnPropertyDescriptor:function(t,e){return _u(ku(t),e)}});var Du=K.Object,Su=yu.exports=function(t,e){return Du.getOwnPropertyDescriptor(t,e)};Du.getOwnPropertyDescriptor.sham&&(Su.sham=!0);var Tu=yu.exports,Eu=tt,Ou=Sr,Au=Fr,Iu=$e,Pu=y([].concat),Mu=Eu("Reflect","ownKeys")||function(t){var e=Ou.f(Iu(t)),i=Au.f;return i?Pu(e,i(t)):e},Nu=Mu,Fu=U,Ru=w,Lu=Uo;gi({target:"Object",stat:!0,sham:!_},{getOwnPropertyDescriptors:function(t){for(var e,i,n=Fu(t),o=Ru.f,r=Nu(n),s={},a=0;r.length>a;)void 0!==(i=o(n,e=r[a++]))&&Lu(s,e,i);return s}});var ju=K.Object.getOwnPropertyDescriptors,Bu={exports:{}};gi({target:"Object",stat:!0,forced:!_,sham:!_},{defineProperties:Bn});var zu=K.Object,Hu=Bu.exports=function(t,e){return zu.defineProperties(t,e)};zu.defineProperties.sham&&(Hu.sham=!0);var Gu=Bu.exports;function Vu(t,e,i){return e in t?Co(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Wu=Is.map;gi({target:"Array",proto:!0,forced:!or("map")},{map:function(t){return Wu(this,t,arguments.length>1?arguments[1]:void 0)}});var Yu=Lh("Array").map,Uu=et,Xu=Yu,qu=Array.prototype,Ku=function(t){var e=t.map;return t===qu||Uu(qu,t)&&e===qu.map?Xu:e},$u=Dt,Zu=Ht,Qu=H,Ju=yn,tc=l.TypeError,ec=function(t){return function(e,i,n,o){$u(i);var r=Zu(e),s=Qu(r),a=Ju(r),l=t?a-1:0,h=t?-1:1;if(n<2)for(;;){if(l in s){o=s[l],l+=h;break}if(l+=h,t?l<0:a<=l)throw tc("Reduce of empty array with no initial value")}for(;t?l>=0:a>l;l+=h)l in s&&(o=i(o,s[l],l,r));return o}},ic={left:ec(!1),right:ec(!0)},nc="process"==F(l.process),oc=ic.left,rc=ht,sc=nc;gi({target:"Array",proto:!0,forced:!Jh("reduce")||!sc&&rc>79&&rc<83},{reduce:function(t){var e=arguments.length;return oc(this,t,e,e>1?arguments[1]:void 0)}});var ac=Lh("Array").reduce,lc=et,hc=ac,uc=Array.prototype,cc=function(t){var e=t.reduce;return t===uc||lc(uc,t)&&e===uc.reduce?hc:e},dc=Ht,pc=Nn;gi({target:"Object",stat:!0,forced:k((function(){pc(1)}))},{keys:function(t){return pc(dc(t))}});var mc=K.Object.keys,fc=xo,vc=C,gc=$e,yc=Tt,bc=function(t,e,i){var n,o;gc(t);try{if(!(n=yc(t,"return"))){if("throw"===e)throw i;return i}n=vc(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw i;if(o)throw n;return gc(n),i},wc=$e,kc=bc,_c=Ja,xc=se("iterator"),Cc=Array.prototype,Dc=function(t){return void 0!==t&&(_c.Array===t||Cc[xc]===t)},Sc=Bi,Tc=Tt,Ec=Ja,Oc=se("iterator"),Ac=function(t){if(null!=t)return Tc(t,Oc)||Tc(t,"@@iterator")||Ec[Sc(t)]},Ic=C,Pc=Dt,Mc=$e,Nc=kt,Fc=Ac,Rc=l.TypeError,Lc=function(t,e){var i=arguments.length<2?Fc(t):e;if(Pc(i))return Mc(Ic(i,t));throw Rc(Nc(t)+" is not iterable")},jc=We,Bc=C,zc=Ht,Hc=function(t,e,i,n){try{return n?e(wc(i)[0],i[1]):e(i)}catch(e){kc(t,"throw",e)}},Gc=Dc,Vc=on,Wc=yn,Yc=Uo,Uc=Lc,Xc=Ac,qc=l.Array,Kc=se("iterator"),$c=!1;try{var Zc=0,Qc={next:function(){return{done:!!Zc++}},return:function(){$c=!0}};Qc[Kc]=function(){return this},Array.from(Qc,(function(){throw 2}))}catch(t){}var Jc=function(t){var e=zc(t),i=Vc(this),n=arguments.length,o=n>1?arguments[1]:void 0,r=void 0!==o;r&&(o=jc(o,n>2?arguments[2]:void 0));var s,a,l,h,u,c,d=Xc(e),p=0;if(!d||this==qc&&Gc(d))for(s=Wc(e),a=i?new this(s):qc(s);s>p;p++)c=r?o(e[p],p):e[p],Yc(a,p,c);else for(u=(h=Uc(e,d)).next,a=i?new this:[];!(l=Bc(u,h)).done;p++)c=r?Hc(h,o,[l.value,p],!0):l.value,Yc(a,p,c);return a.length=p,a};gi({target:"Array",stat:!0,forced:!function(t,e){if(!e&&!$c)return!1;var i=!1;try{var n={};n[Kc]=function(){return{next:function(){return{done:i=!0}}}},t(n)}catch(t){}return i}((function(t){Array.from(t)}))},{from:Jc});var td=K.Array.from,ed=td,id=Ac,nd=Nh;var od=gi,rd=l,sd=Go,ad=on,ld=q,hd=mn,ud=yn,cd=U,dd=Uo,pd=se,md=yi,fd=or("slice"),vd=pd("species"),gd=rd.Array,yd=Math.max;od({target:"Array",proto:!0,forced:!fd},{slice:function(t,e){var i,n,o,r=cd(this),s=ud(r),a=hd(t,s),l=hd(void 0===e?s:e,s);if(sd(r)&&(i=r.constructor,(ad(i)&&(i===gd||sd(i.prototype))||ld(i)&&null===(i=i[vd]))&&(i=void 0),i===gd||void 0===i))return md(r,a,l);for(n=new(void 0===i?gd:i)(yd(l-a,0)),o=0;a<l;a++,o++)a in r&&dd(n,o,r[a]);return n.length=o,n}});var bd=Lh("Array").slice,wd=et,kd=bd,_d=Array.prototype,xd=function(t){var e=t.slice;return t===_d||wd(_d,t)&&e===_d.slice?kd:e},Cd=xd,Dd=td;function Sd(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function Td(t,e){var i;if(t){if("string"==typeof t)return Sd(t,e);var n=Cd(i=Object.prototype.toString.call(t)).call(i,8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Dd(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sd(t,e):void 0}}function Ed(t,e){return function(t){if(nd(t))return t}(t)||function(t,e){var i=null==t?null:void 0!==hh&&id(t)||t["@@iterator"];if(null!=i){var n,o,r=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(n=i.next()).done)&&(r.push(n.value),!e||r.length!==e);s=!0);}catch(t){a=!0,o=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw o}}return r}}(t,e)||Td(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Od(t){return function(t){if(nd(t))return Sd(t)}(t)||function(t){if(void 0!==hh&&null!=id(t)||null!=t["@@iterator"])return Dd(t)}(t)||Td(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ad=lh,Id=Lh("Array").concat,Pd=et,Md=Id,Nd=Array.prototype,Fd=function(t){var e=t.concat;return t===Nd||Pd(Nd,t)&&e===Nd.concat?Md:e},Rd=xd;gi({target:"Reflect",stat:!0},{ownKeys:Mu});var Ld=K.Reflect.ownKeys,jd=gi,Bd=y,zd=l.Date,Hd=Bd(zd.prototype.getTime);jd({target:"Date",stat:!0},{now:function(){return Hd(new zd)}});var Gd=K.Date.now,Vd=gi,Wd=Go,Yd=y([].reverse),Ud=[1,2];Vd({target:"Array",proto:!0,forced:String(Ud)===String(Ud.reverse())},{reverse:function(){return Wd(this)&&(this.length=this.length),Yd(this)}});var Xd=Lh("Array").reverse,qd=et,Kd=Xd,$d=Array.prototype,Zd=function(t){var e=t.reverse;return t===$d||qd($d,t)&&e===$d.reverse?Kd:e},Qd=gi,Jd=l,tp=mn,ep=un,ip=yn,np=Ht,op=tr,rp=Uo,sp=or("splice"),ap=Jd.TypeError,lp=Math.max,hp=Math.min,up=9007199254740991,cp="Maximum allowed length exceeded";Qd({target:"Array",proto:!0,forced:!sp},{splice:function(t,e){var i,n,o,r,s,a,l=np(this),h=ip(l),u=tp(t,h),c=arguments.length;if(0===c?i=n=0:1===c?(i=0,n=h-u):(i=c-2,n=hp(lp(ep(e),0),h-u)),h+i-n>up)throw ap(cp);for(o=op(l,n),r=0;r<n;r++)(s=u+r)in l&&rp(o,r,l[s]);if(o.length=n,i<n){for(r=u;r<h-n;r++)a=r+i,(s=r+n)in l?l[a]=l[s]:delete l[a];for(r=h;r>h-n+i;r--)delete l[r-1]}else if(i>n)for(r=h-n;r>u;r--)a=r+i-1,(s=r+n-1)in l?l[a]=l[s]:delete l[a];for(r=0;r<i;r++)l[r+u]=arguments[r+2];return l.length=h-n+i,o}});var dp=Lh("Array").splice,pp=et,mp=dp,fp=Array.prototype,vp=function(t){var e=t.splice;return t===fp||pp(fp,t)&&e===fp.splice?mp:e},gp=_,yp=y,bp=C,wp=k,kp=Nn,_p=Fr,xp=D,Cp=Ht,Dp=H,Sp=Object.assign,Tp=Object.defineProperty,Ep=yp([].concat),Op=!Sp||wp((function(){if(gp&&1!==Sp({b:1},Sp(Tp({},"a",{enumerable:!0,get:function(){Tp(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},i=Symbol(),n="abcdefghijklmnopqrst";return t[i]=7,n.split("").forEach((function(t){e[t]=t})),7!=Sp({},t)[i]||kp(Sp({},e)).join("")!=n}))?function(t,e){for(var i=Cp(t),n=arguments.length,o=1,r=_p.f,s=xp.f;n>o;)for(var a,l=Dp(arguments[o++]),h=r?Ep(kp(l),r(l)):kp(l),u=h.length,c=0;u>c;)a=h[c++],gp&&!bp(s,l,a)||(i[a]=l[a]);return i}:Sp;gi({target:"Object",stat:!0,forced:Object.assign!==Op},{assign:Op});var Ap=K.Object.assign,Ip=xn.includes;gi({target:"Array",proto:!0},{includes:function(t){return Ip(this,t,arguments.length>1?arguments[1]:void 0)}});var Pp=Lh("Array").includes,Mp=q,Np=F,Fp=se("match"),Rp=function(t){var e;return Mp(t)&&(void 0!==(e=t[Fp])?!!e:"RegExp"==Np(t))},Lp=l.TypeError,jp=se("match"),Bp=gi,zp=function(t){if(Rp(t))throw Lp("The method doesn't accept regular expressions");return t},Hp=V,Gp=Dr,Vp=function(t){var e=/./;try{"/./"[t](e)}catch(i){try{return e[jp]=!1,"/./"[t](e)}catch(t){}}return!1},Wp=y("".indexOf);Bp({target:"String",proto:!0,forced:!Vp("includes")},{includes:function(t){return!!~Wp(Gp(Hp(this)),Gp(zp(t)),arguments.length>1?arguments[1]:void 0)}});var Yp=Lh("String").includes,Up=et,Xp=Pp,qp=Yp,Kp=Array.prototype,$p=String.prototype,Zp=function(t){var e=t.includes;return t===Kp||Up(Kp,t)&&e===Kp.includes?Xp:"string"==typeof t||t===$p||Up($p,t)&&e===$p.includes?qp:e},Qp=Ih,Jp=_,tm=y,em=Nn,im=U,nm=tm(D.f),om=tm([].push),rm=function(t){return function(e){for(var i,n=im(e),o=em(n),r=o.length,s=0,a=[];r>s;)i=o[s++],Jp&&!nm(n,i)||om(a,t?[i,n[i]]:n[i]);return a}},sm={entries:rm(!0),values:rm(!1)}.values;gi({target:"Object",stat:!0},{values:function(t){return sm(t)}});var am=K.Object.values,lm="\t\n\v\f\r                 \u2028\u2029\ufeff",hm=V,um=Dr,cm=y("".replace),dm="[\t\n\v\f\r                 \u2028\u2029\ufeff]",pm=RegExp("^"+dm+dm+"*"),mm=RegExp(dm+dm+"*$"),fm=function(t){return function(e){var i=um(hm(e));return 1&t&&(i=cm(i,pm,"")),2&t&&(i=cm(i,mm,"")),i}},vm={start:fm(1),end:fm(2),trim:fm(3)},gm=l,ym=k,bm=y,wm=Dr,km=vm.trim,_m=lm,xm=gm.parseInt,Cm=gm.Symbol,Dm=Cm&&Cm.iterator,Sm=/^[+-]?0x/i,Tm=bm(Sm.exec),Em=8!==xm(_m+"08")||22!==xm(_m+"0x16")||Dm&&!ym((function(){xm(Object(Dm))}))?function(t,e){var i=km(wm(t));return xm(i,e>>>0||(Tm(Sm,i)?16:10))}:xm;gi({global:!0,forced:parseInt!=Em},{parseInt:Em});var Om=K.parseInt,Am=gi,Im=xn.indexOf,Pm=Jh,Mm=y([].indexOf),Nm=!!Mm&&1/Mm([1],1,-0)<0,Fm=Pm("indexOf");Am({target:"Array",proto:!0,forced:Nm||!Fm},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return Nm?Mm(this,t,e)||0:Im(this,t,e)}});var Rm=Lh("Array").indexOf,Lm=et,jm=Rm,Bm=Array.prototype,zm=function(t){var e=t.indexOf;return t===Bm||Lm(Bm,t)&&e===Bm.indexOf?jm:e},Hm=rl.PROPER,Gm=k,Vm=lm,Wm=vm.trim;gi({target:"String",proto:!0,forced:function(t){return Gm((function(){return!!Vm[t]()||"​…᠎"!=="​…᠎"[t]()||Hm&&Vm[t].name!==t}))}("trim")},{trim:function(){return Wm(this)}});var Ym=Lh("String").trim,Um=et,Xm=Ym,qm=String.prototype,Km=function(t){var e=t.trim;return"string"==typeof t||t===qm||Um(qm,t)&&e===qm.trim?Xm:e},$m=Oo,Zm=gi,Qm=tt,Jm=p,tf=y,ef=k,nf=l.Array,of=Qm("JSON","stringify"),rf=tf(/./.exec),sf=tf("".charAt),af=tf("".charCodeAt),lf=tf("".replace),hf=tf(1..toString),uf=/[\uD800-\uDFFF]/g,cf=/^[\uD800-\uDBFF]$/,df=/^[\uDC00-\uDFFF]$/,pf=function(t,e,i){var n=sf(i,e-1),o=sf(i,e+1);return rf(cf,t)&&!rf(df,o)||rf(df,t)&&!rf(cf,n)?"\\u"+hf(af(t,0),16):t},mf=ef((function(){return'"\\udf06\\ud834"'!==of("\udf06\ud834")||'"\\udead"'!==of("\udead")}));of&&Zm({target:"JSON",stat:!0,forced:mf},{stringify:function(t,e,i){for(var n=0,o=arguments.length,r=nf(o);n<o;n++)r[n]=arguments[n];var s=Jm(of,null,r);return"string"==typeof s?lf(s,uf,pf):s}});var ff=K,vf=p;ff.JSON||(ff.JSON={stringify:JSON.stringify});var gf=function(t,e,i){return vf(ff.JSON.stringify,null,arguments)},yf=Ht,bf=mn,wf=yn;gi({target:"Array",proto:!0},{fill:function(t){for(var e=yf(this),i=wf(e),n=arguments.length,o=bf(n>1?arguments[1]:void 0,i),r=n>2?arguments[2]:void 0,s=void 0===r?i:bf(r,i);s>o;)e[o++]=t;return e}});var kf=Lh("Array").fill,_f=et,xf=kf,Cf=Array.prototype,Df=function(t){var e=t.fill;return t===Cf||_f(Cf,t)&&e===Cf.fill?xf:e},Sf={exports:{}};!function(t){function e(t){if(t)return function(t){for(var i in e.prototype)t[i]=e.prototype[i];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((i=n[o])===e||i.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),i=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(i){n=0;for(var o=(i=i.slice(0)).length;n<o;++n)i[n].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}}(Sf);var Tf=Sf.exports;
/*! Hammer.JS - v2.0.17-rc - 2019-12-16
	 * http://naver.github.io/egjs
	 *
	 * Forked By Naver egjs
	 * Copyright (c) hammerjs
	 * Licensed under the MIT license */function Ef(){return(Ef=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function Of(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Af(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var If,Pf="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}:Object.assign,Mf=["","webkit","Moz","MS","ms","o"],Nf="undefined"==typeof document?{style:{}}:document.createElement("div"),Ff=Math.round,Rf=Math.abs,Lf=Date.now;function jf(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),r=0;r<Mf.length;){if((n=(i=Mf[r])?i+o:e)in t)return n;r++}}If="undefined"==typeof window?{}:window;var Bf=jf(Nf.style,"touchAction"),zf=void 0!==Bf;var Hf="compute",Gf="auto",Vf="manipulation",Wf="none",Yf="pan-x",Uf="pan-y",Xf=function(){if(!zf)return!1;var t={},e=If.CSS&&If.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return t[i]=!e||If.CSS.supports("touch-action",i)})),t}(),qf="ontouchstart"in If,Kf=void 0!==jf(If,"PointerEvent"),$f=qf&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Zf="touch",Qf="mouse",Jf=16,tv=24,ev=["x","y"],iv=["clientX","clientY"];function nv(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function ov(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function rv(t,e){return t.indexOf(e)>-1}var sv=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===Hf&&(t=this.compute()),zf&&this.manager.element.style&&Xf[t]&&(this.manager.element.style[Bf]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return nv(this.manager.recognizers,(function(e){ov(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(rv(t,Wf))return Wf;var e=rv(t,Yf),i=rv(t,Uf);return e&&i?Wf:e||i?e?Yf:Uf:rv(t,Vf)?Vf:Gf}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,o=rv(n,Wf)&&!Xf.none,r=rv(n,Uf)&&!Xf["pan-y"],s=rv(n,Yf)&&!Xf["pan-x"];if(o){var a=1===t.pointers.length,l=t.distance<2,h=t.deltaTime<250;if(a&&l&&h)return}if(!s||!r)return o||r&&6&i||s&&i&tv?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function av(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function lv(t){var e=t.length;if(1===e)return{x:Ff(t[0].clientX),y:Ff(t[0].clientY)};for(var i=0,n=0,o=0;o<e;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:Ff(i/e),y:Ff(n/e)}}function hv(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:Ff(t.pointers[i].clientX),clientY:Ff(t.pointers[i].clientY)},i++;return{timeStamp:Lf(),pointers:e,center:lv(e),deltaX:t.deltaX,deltaY:t.deltaY}}function uv(t,e,i){i||(i=ev);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function cv(t,e,i){i||(i=ev);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function dv(t,e){return t===e?1:Rf(t)>=Rf(e)?t<0?2:4:e<0?8:Jf}function pv(t,e,i){return{x:e/t||0,y:i/t||0}}function mv(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=hv(e)),o>1&&!i.firstMultiple?i.firstMultiple=hv(e):1===o&&(i.firstMultiple=!1);var r=i.firstInput,s=i.firstMultiple,a=s?s.center:r.center,l=e.center=lv(n);e.timeStamp=Lf(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=cv(a,l),e.distance=uv(a,l),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(o=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=dv(e.deltaX,e.deltaY);var h,u,c=pv(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=Rf(c.x)>Rf(c.y)?c.x:c.y,e.scale=s?(h=s.pointers,uv((u=n)[0],u[1],iv)/uv(h[0],h[1],iv)):1,e.rotation=s?function(t,e){return cv(e[1],e[0],iv)+cv(t[1],t[0],iv)}(s.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,o,r,s=t.lastInterval||e,a=e.timeStamp-s.timeStamp;if(8!==e.eventType&&(a>25||void 0===s.velocity)){var l=e.deltaX-s.deltaX,h=e.deltaY-s.deltaY,u=pv(a,l,h);n=u.x,o=u.y,i=Rf(u.x)>Rf(u.y)?u.x:u.y,r=dv(l,h),t.lastInterval=e}else i=s.velocity,n=s.velocityX,o=s.velocityY,r=s.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=r}(i,e);var d,p=t.element,m=e.srcEvent;av(d=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=d),e.target=p}function fv(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,r=1&e&&n-o==0,s=12&e&&n-o==0;i.isFirst=!!r,i.isFinal=!!s,r&&(t.session={}),i.eventType=e,mv(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function vv(t){return t.trim().split(/\s+/g)}function gv(t,e,i){nv(vv(e),(function(e){t.addEventListener(e,i,!1)}))}function yv(t,e,i){nv(vv(e),(function(e){t.removeEventListener(e,i,!1)}))}function bv(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var wv=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){ov(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&gv(this.element,this.evEl,this.domHandler),this.evTarget&&gv(this.target,this.evTarget,this.domHandler),this.evWin&&gv(bv(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&yv(this.element,this.evEl,this.domHandler),this.evTarget&&yv(this.target,this.evTarget,this.domHandler),this.evWin&&yv(bv(this.element),this.evWin,this.domHandler)},t}();function kv(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}var _v={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},xv={2:Zf,3:"pen",4:Qf,5:"kinect"},Cv="pointerdown",Dv="pointermove pointerup pointercancel";If.MSPointerEvent&&!If.PointerEvent&&(Cv="MSPointerDown",Dv="MSPointerMove MSPointerUp MSPointerCancel");var Sv=function(t){function e(){var i,n=e.prototype;return n.evEl=Cv,n.evWin=Dv,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return Of(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=_v[n],r=xv[t.pointerType]||t.pointerType,s=r===Zf,a=kv(e,t.pointerId,"pointerId");1&o&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):12&o&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),i&&e.splice(a,1))},e}(wv);function Tv(t){return Array.prototype.slice.call(t,0)}function Ev(t,e,i){for(var n=[],o=[],r=0;r<t.length;){var s=e?t[r][e]:t[r];kv(o,s)<0&&n.push(t[r]),o[r]=s,r++}return i&&(n=e?n.sort((function(t,i){return t[e]>i[e]})):n.sort()),n}var Ov={touchstart:1,touchmove:2,touchend:4,touchcancel:8},Av="touchstart touchmove touchend touchcancel",Iv=function(t){function e(){var i;return e.prototype.evTarget=Av,(i=t.apply(this,arguments)||this).targetIds={},i}return Of(e,t),e.prototype.handler=function(t){var e=Ov[t.type],i=Pv.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Zf,srcEvent:t})},e}(wv);function Pv(t,e){var i,n,o=Tv(t.touches),r=this.targetIds;if(3&e&&1===o.length)return r[o[0].identifier]=!0,[o,o];var s=Tv(t.changedTouches),a=[],l=this.target;if(n=o.filter((function(t){return av(t.target,l)})),1===e)for(i=0;i<n.length;)r[n[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),12&e&&delete r[s[i].identifier],i++;return a.length?[Ev(n.concat(a),"identifier",!0),a]:void 0}var Mv={mousedown:1,mousemove:2,mouseup:4},Nv="mousedown",Fv="mousemove mouseup",Rv=function(t){function e(){var i,n=e.prototype;return n.evEl=Nv,n.evWin=Fv,(i=t.apply(this,arguments)||this).pressed=!1,i}return Of(e,t),e.prototype.handler=function(t){var e=Mv[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Qf,srcEvent:t}))},e}(wv);function Lv(t){var e=t.changedPointers[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);t>-1&&n.splice(t,1)}),2500)}}function jv(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,Lv.call(this,e)):12&t&&Lv.call(this,e)}function Bv(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],r=Math.abs(e-o.x),s=Math.abs(i-o.y);if(r<=25&&s<=25)return!0}return!1}var zv=function(){return function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).handler=function(t,e,i){var o=i.pointerType===Zf,r=i.pointerType===Qf;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)jv.call(Af(Af(n)),e,i);else if(r&&Bv.call(Af(Af(n)),i))return;n.callback(t,e,i)}},n.touch=new Iv(n.manager,n.handler),n.mouse=new Rv(n.manager,n.handler),n.primaryTouch=null,n.lastTouches=[],n}return Of(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(wv)}();function Hv(t,e,i){return!!Array.isArray(t)&&(nv(t,i[e],i),!0)}var Gv=32,Vv=1;function Wv(t,e){var i=e.manager;return i?i.get(t):t}function Yv(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var Uv=function(){function t(t){void 0===t&&(t={}),this.options=Ef({enable:!0},t),this.id=Vv++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return Pf(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(Hv(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Wv(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return Hv(t,"dropRecognizeWith",this)||(t=Wv(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(Hv(t,"requireFailure",this))return this;var e=this.requireFail;return-1===kv(e,t=Wv(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(Hv(t,"dropRequireFailure",this))return this;t=Wv(t,this);var e=kv(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+Yv(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+Yv(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=Gv},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=Pf({},t);if(!ov(this.options.enable,[this,e]))return this.reset(),void(this.state=Gv);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Xv=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Ef({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}Of(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Vf]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime<i.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(o&&r&&n){if(4!==t.eventType)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||uv(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&s?this.count+=1:this.count=1,this._input=t,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.interval),2):8}return Gv},i.failTimeout=function(){var t=this;return this._timer=setTimeout((function(){t.state=Gv}),this.options.interval),Gv},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(Uv),qv=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Ef({pointers:1},e))||this}Of(e,t);var i=e.prototype;return 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&&(8&i||!o)?16|e:n||o?4&i?8|e:2&e?4|e:2:Gv},e}(Uv);function Kv(t){return t===Jf?"down":8===t?"up":2===t?"left":4===t?"right":""}var $v=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Ef({event:"pan",threshold:10,pointers:1,direction:30},e))||this).pX=null,i.pY=null,i}Of(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(Uf),t&tv&&e.push(Yf),e},i.directionTest=function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,r=t.deltaX,s=t.deltaY;return o&e.direction||(6&e.direction?(o=0===r?1:r<0?2:4,i=r!==this.pX,n=Math.abs(t.deltaX)):(o=0===s?1:s<0?8:Jf,i=s!==this.pY,n=Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},i.attrTest=function(t){return qv.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=Kv(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(qv),Zv=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Ef({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}Of(e,t);var i=e.prototype;return i.getTouchAction=function(){return $v.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,n=this.options.direction;return 30&n?i=e.overallVelocity:6&n?i=e.overallVelocityX:n&tv&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&Rf(i)>this.options.velocity&&4&e.eventType},i.emit=function(t){var e=Kv(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(qv),Qv=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Ef({event:"pinch",threshold:0,pointers:2},e))||this}Of(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Wf]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(qv),Jv=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Ef({event:"rotate",threshold:0,pointers:2},e))||this}Of(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Wf]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(qv),tg=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,Ef({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}Of(e,t);var i=e.prototype;return i.getTouchAction=function(){return[Gf]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,r=t.deltaTime>i.time;if(this._input=t,!o||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=setTimeout((function(){e.state=8,e.tryEmit()}),i.time);else if(4&t.eventType)return 8;return Gv},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Lf(),this.manager.emit(this.options.event,this._input)))},e}(Uv),eg={domEvents:!1,touchAction:Hf,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},ig=[[Jv,{enable:!1}],[Qv,{enable:!1},["rotate"]],[Zv,{direction:6}],[$v,{direction:6},["swipe"]],[Xv],[Xv,{event:"doubletap",taps:2},["tap"]],[tg]];function ng(t,e){var i,n=t.element;n.style&&(nv(t.options.cssProps,(function(o,r){i=jf(n.style,r),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""})),e||(t.oldCssProps={}))}var og=function(){function t(t,e){var i,n=this;this.options=Pf({},eg,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(Kf?Sv:$f?Iv:qf?zv:Rv))(i,fv),this.touchAction=new sv(this,this.options.touchAction),ng(this,!0),nv(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;return e.set=function(t){return Pf(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,o=e.curRecognizer;(!o||o&&8&o.state)&&(e.curRecognizer=null,o=null);for(var r=0;r<n.length;)i=n[r],2===e.stopped||o&&i!==o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&14&i.state&&(e.curRecognizer=i,o=i),r++}},e.get=function(t){if(t instanceof Uv)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event===t)return e[i];return null},e.add=function(t){if(Hv(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(Hv(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,n=kv(i,e);-1!==n&&(i.splice(n,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var i=this.handlers;return nv(vv(t),(function(t){i[t]=i[t]||[],i[t].push(e)})),this},e.off=function(t,e){if(void 0===t)return this;var i=this.handlers;return nv(vv(t),(function(t){e?i[t]&&i[t].splice(kv(i[t],e),1):delete i[t]})),this},e.emit=function(t,e){this.options.domEvents&&function(t,e){var i=document.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](e),n++}},e.destroy=function(){this.element&&ng(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),rg={touchstart:1,touchmove:2,touchend:4,touchcancel:8},sg="touchstart",ag="touchstart touchmove touchend touchcancel",lg=function(t){function e(){var i,n=e.prototype;return n.evTarget=sg,n.evWin=ag,(i=t.apply(this,arguments)||this).started=!1,i}return Of(e,t),e.prototype.handler=function(t){var e=rg[t.type];if(1===e&&(this.started=!0),this.started){var i=hg.call(this,t,e);12&e&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Zf,srcEvent:t})}},e}(wv);function hg(t,e){var i=Tv(t.touches),n=Tv(t.changedTouches);return 12&e&&(i=Ev(i.concat(n),"identifier",!0)),[i,n]}function ug(t,e,i){var n="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,i),t.apply(this,arguments)}}var cg=ug((function(t,e,i){for(var n=Object.keys(e),o=0;o<n.length;)(!i||i&&void 0===t[n[o]])&&(t[n[o]]=e[n[o]]),o++;return t}),"extend","Use `assign`."),dg=ug((function(t,e){return cg(t,e,!0)}),"merge","Use `assign`.");function pg(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&Pf(n,i)}function mg(t,e){return function(){return t.apply(e,arguments)}}var fg=function(){var t=function(t,e){return void 0===e&&(e={}),new og(t,Ef({recognizers:ig.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=30,t.DIRECTION_DOWN=Jf,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=tv,t.DIRECTION_NONE=1,t.DIRECTION_DOWN=Jf,t.INPUT_START=1,t.INPUT_MOVE=2,t.INPUT_END=4,t.INPUT_CANCEL=8,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=Gv,t.Manager=og,t.Input=wv,t.TouchAction=sv,t.TouchInput=Iv,t.MouseInput=Rv,t.PointerEventInput=Sv,t.TouchMouseInput=zv,t.SingleTouchInput=lg,t.Recognizer=Uv,t.AttrRecognizer=qv,t.Tap=Xv,t.Pan=$v,t.Swipe=Zv,t.Pinch=Qv,t.Rotate=Jv,t.Press=tg,t.on=gv,t.off=yv,t.each=nv,t.merge=dg,t.extend=cg,t.bindFn=mg,t.assign=Pf,t.inherit=pg,t.bindFn=mg,t.prefixed=jf,t.toArray=Tv,t.inArray=kv,t.uniqueArray=Ev,t.splitStr=vv,t.boolOrFn=ov,t.hasParent=av,t.addEventListeners=gv,t.removeEventListeners=yv,t.defaults=Pf({},eg,{preset:ig}),t}();function vg(t,e){var i=mc(t);if(cu){var n=cu(t);e&&(n=gu(n).call(n,(function(e){return Tu(t,e).enumerable}))),i.push.apply(i,n)}return i}function gg(t){for(var e=1;e<arguments.length;e++){var i,n=null!=arguments[e]?arguments[e]:{};if(e%2)hu(i=vg(Object(n),!0)).call(i,(function(e){Vu(t,e,n[e])}));else if(ju)Gu(t,ju(n));else{var o;hu(o=vg(Object(n))).call(o,(function(e){fc(t,e,Tu(n,e))}))}}return t}function yg(t,e){var i=void 0!==Ad&&id(t)||t["@@iterator"];if(!i){if(Fh(t)||(i=function(t,e){var i;if(!t)return;if("string"==typeof t)return bg(t,e);var n=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return ed(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bg(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function bg(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var wg=Ad("DELETE");function kg(){var t=_g.apply(void 0,arguments);return Cg(t),t}function _g(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(e.length<2)return e[0];var n;if(e.length>2)return _g.apply(void 0,Fd(n=[kg(e[0],e[1])]).call(n,Od(Rd(e).call(e,2))));var o,r=e[0],s=e[1],a=yg(Ld(s));try{for(a.s();!(o=a.n()).done;){var l=o.value;Object.prototype.propertyIsEnumerable.call(s,l)&&(s[l]===wg?delete r[l]:null===r[l]||null===s[l]||"object"!==Sh(r[l])||"object"!==Sh(s[l])||Fh(r[l])||Fh(s[l])?r[l]=xg(s[l]):r[l]=_g(r[l],s[l]))}}catch(t){a.e(t)}finally{a.f()}return r}function xg(t){return Fh(t)?Ku(t).call(t,(function(t){return xg(t)})):"object"===Sh(t)&&null!==t?_g({},t):t}function Cg(t){for(var e=0,i=mc(t);e<i.length;e++){var n=i[e];t[n]===wg?delete t[n]:"object"===Sh(t[n])&&null!==t[n]&&Cg(t[n])}}function Dg(t){var e=Ed(function(){for(var t=Sg(),e=t(" "),i=t(" "),n=t(" "),o=0;o<arguments.length;o++)(e-=t(o<0||arguments.length<=o?void 0:arguments[o]))<0&&(e+=1),(i-=t(o<0||arguments.length<=o?void 0:arguments[o]))<0&&(i+=1),(n-=t(o<0||arguments.length<=o?void 0:arguments[o]))<0&&(n+=1);return[e,i,n]}(t),3),i=e[0],n=e[1],o=e[2],r=1,s=function(){var t=2091639*i+2.3283064365386963e-10*r;return i=n,n=o,o=t-(r=0|t)};return s.uint32=function(){return 4294967296*s()},s.fract53=function(){return s()+11102230246251565e-32*(2097152*s()|0)},s.algorithm="Alea",s.seed=t,s.version="0.9",s}function Sg(){var t=4022871197;return function(e){for(var i=e.toString(),n=0;n<i.length;n++){var o=.02519603282416938*(t+=i.charCodeAt(n));o-=t=o>>>0,t=(o*=t)>>>0,t+=4294967296*(o-=t)}return 2.3283064365386963e-10*(t>>>0)}}var Tg="undefined"!=typeof window?window.Hammer||fg:function(){return function(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}()};function Eg(t){var e,i=this;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push((function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)}));var n=Tg(this._dom.overlay);n.on("tap",Gh(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push((function(){n.destroy()}));var o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];hu(o).call(o,(function(t){n.on(t,(function(t){t.srcEvent.stopPropagation()}))})),document&&document.body&&(this._onClick=function(e){(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||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()}}Tf(Eg.prototype),Eg.current=null,Eg.prototype.destroy=function(){var t,e;this.deactivate();var i,n=yg(Zd(t=vp(e=this._cleanupQueue).call(e,0)).call(t));try{for(n.s();!(i=n.n()).done;){(0,i.value)()}}catch(t){n.e(t)}finally{n.f()}},Eg.prototype.activate=function(){Eg.current&&Eg.current.deactivate(),Eg.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)},Eg.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")},Eg.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};var Og=/^\/?Date\((-?\d+)/i,Ag=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Ig=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Pg=/^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,Mg=/^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 Ng(t){return t instanceof Number||"number"==typeof t}function Fg(t){return t instanceof String||"string"==typeof t}function Rg(t){return"object"===Sh(t)&&null!==t}function Lg(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]}var jg=Ap;function Bg(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)||!0===i)if("object"===Sh(e[o])&&null!==e[o]&&Qp(e[o])===Object.prototype)void 0===t[o]?t[o]=Bg({},e[o],i):"object"===Sh(t[o])&&null!==t[o]&&Qp(t[o])===Object.prototype?Bg(t[o],e[o],i):Lg(t,e,o,n);else if(Fh(e[o])){var r;t[o]=Rd(r=e[o]).call(r)}else Lg(t,e,o,n);return t}function zg(t){var e=Sh(t);return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Fh(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}function Hg(t,e){var i;return Fd(i=[]).call(i,Od(t),[e])}function Gg(t){return Rd(t).call(t)}var Vg=am;var Wg={asBoolean:function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},asNumber:function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},asString:function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},asSize:function(t,e){return"function"==typeof t&&(t=t()),Fg(t)?t:Ng(t)?t+"px":e||null},asElement:function(t,e){return"function"==typeof t&&(t=t()),t||e||null}};function Yg(t){var e;switch(t.length){case 3:case 4:return(e=Ig.exec(t))?{r:Om(e[1]+e[1],16),g:Om(e[2]+e[2],16),b:Om(e[3]+e[3],16)}:null;case 6:case 7:return(e=Ag.exec(t))?{r:Om(e[1],16),g:Om(e[2],16),b:Om(e[3],16)}:null;default:return null}}function Ug(t,e,i){var n;return"#"+Rd(n=((1<<24)+(t<<16)+(e<<8)+i).toString(16)).call(n,1)}function Xg(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,Math.min(e,i)),o=Math.max(t,Math.max(e,i));return n===o?{h:0,s:0,v:n}:{h:60*((t===n?3:i===n?1:5)-(t===n?e-i:i===n?t-e:i-t)/(o-n))/360,s:(o-n)/o,v:o}}var qg=function(t){var e,i={};return hu(e=t.split(";")).call(e,(function(t){if(""!=Km(t).call(t)){var e,n,o=t.split(":"),r=Km(e=o[0]).call(e),s=Km(n=o[1]).call(n);i[r]=s}})),i},Kg=function(t){var e;return Ku(e=mc(t)).call(e,(function(e){return e+": "+t[e]})).join("; ")};function $g(t,e,i){var n,o,r,s=Math.floor(6*t),a=6*t-s,l=i*(1-e),h=i*(1-a*e),u=i*(1-(1-a)*e);switch(s%6){case 0:n=i,o=u,r=l;break;case 1:n=h,o=i,r=l;break;case 2:n=l,o=i,r=u;break;case 3:n=l,o=h,r=i;break;case 4:n=u,o=l,r=i;break;case 5:n=i,o=l,r=h}return{r:Math.floor(255*n),g:Math.floor(255*o),b:Math.floor(255*r)}}function Zg(t,e,i){var n=$g(t,e,i);return Ug(n.r,n.g,n.b)}function Qg(t){var e=Yg(t);if(!e)throw new TypeError("'".concat(t,"' is not a valid color."));return Xg(e.r,e.g,e.b)}function Jg(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function ty(t){return Pg.test(t)}function ey(t){return Mg.test(t)}function iy(t){if(null===t||"object"!==Sh(t))return null;if(t instanceof Element)return t;var e=$m(t);for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&"object"==Sh(t[i])&&(e[i]=iy(t[i]));return e}var ny={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},oy=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;bo(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return So(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return ny[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i,n=this._isColorString(t);if(void 0!==n&&(t=n),!0===Fg(t)){if(!0===ty(t)){var o=t.substr(4).substr(0,t.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(!0===ey(t)){var r=t.substr(5).substr(0,t.length-6).split(",");i={r:r[0],g:r[1],b:r[2],a:r[3]}}else if(!0===Jg(t)){var s=Yg(t);i={r:s.r,g:s.g,b:s.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var a=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:a}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+gf(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!0===e&&(this.previousColor=Ap({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Zh((function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)}),0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!0===e&&(this.initialColor=Ap({},t)),this.color=t;var i=Xg(t.r,t.g,t.b),n=2*Math.PI,o=this.r*i.s,r=this.centerCoordinates.x+o*Math.sin(n*i.h),s=this.centerCoordinates.y+o*Math.cos(n*i.h);this.colorPickerSelector.style.left=r-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=Xg(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=$g(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=Xg(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),Df(i).call(i),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var t,e,i,n;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var r=document.createElement("DIV");r.style.color="red",r.style.fontWeight="bold",r.style.padding="10px",r.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(r)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=Gh(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=Gh(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=Gh(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=Gh(n=this._loadLast).call(n,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new Tg(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",(function(e){e.isFirst&&t._moveSelector(e)})),this.hammer.on("tap",(function(e){t._moveSelector(e)})),this.hammer.on("panstart",(function(e){t._moveSelector(e)})),this.hammer.on("panmove",(function(e){t._moveSelector(e)})),this.hammer.on("panend",(function(e){t._moveSelector(e)}))}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e,i,n,o,r=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,r,s),this.centerCoordinates={x:.5*r,y:.5*s},this.r=.49*r;var a,l=2*Math.PI/360,h=1/this.r;for(n=0;n<360;n++)for(o=0;o<this.r;o++)e=this.centerCoordinates.x+o*Math.sin(l*n),i=this.centerCoordinates.y+o*Math.cos(l*n),a=$g(.002777777777777778*n,o*h,1),t.fillStyle="rgb("+a.r+","+a.g+","+a.b+")",t.fillRect(e-.5,i-.5,2,2);t.strokeStyle="rgba(0,0,0,1)",t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),t.stroke(),this.hueCircle=t.getImageData(0,0,r,s)}this.generated=!0}},{key:"_moveSelector",value:function(t){var e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,r=.5*this.colorPickerDiv.clientWidth,s=i-r,a=n-o,l=Math.atan2(s,a),h=.98*Math.min(Math.sqrt(s*s+a*a),r),u=Math.cos(l)*h+o,c=Math.sin(l)*h+r;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";var d=l/(2*Math.PI);d=d<0?d+1:d;var p=h/this.r,m=Xg(this.color.r,this.color.g,this.color.b);m.h=d,m.s=p;var f=$g(m.h,m.s,m.v);f.a=this.color.a,this.color=f,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),t}();function ry(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(e.length<1)throw new TypeError("Invalid arguments.");if(1===e.length)return document.createTextNode(e[0]);var n=document.createElement(e[0]);return n.appendChild(ry.apply(void 0,Od(Rd(e).call(e,1)))),n}var sy,ay=function(){function t(e,i,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return!1};bo(this,t),this.parent=e,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.hideOption=r,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Ap(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new oy(o),this.wrapper=void 0}return So(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;if("string"==typeof t)this.options.filter=t;else if(Fh(t))this.options.filter=t.join();else if("object"===Sh(t)){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==gu(t)&&(this.options.filter=gu(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===gu(this.options)&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var t=gu(this.options),e=0,i=!1;for(var n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?i=(i=t(n,[]))||this._handleObject(this.configureOptions[n],[n],!0):!0!==t&&-1===zm(t).call(t,n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(t){for(var e=this.moduleOptions,i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}},{key:"_makeItem",value:function(t){if(!0===this.allowCreation){var e=document.createElement("div");e.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return hu(n).call(n,(function(t){e.appendChild(t)})),this.domElements.push(e),this.domElements.length}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerText=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");if(n.className="vis-configuration vis-config-label vis-config-s"+e.length,!0===i){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(ry("i","b",t))}else n.innerText=t+":";return n}},{key:"_makeDropdown",value:function(t,e,i){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var o=0;void 0!==e&&-1!==zm(t).call(t,e)&&(o=zm(t).call(t,e));for(var r=0;r<t.length;r++){var s=document.createElement("option");s.value=t[r],r===o&&(s.selected="selected"),s.innerText=t[r],n.appendChild(s)}var a=this;n.onchange=function(){a._update(this.value,i)};var l=this._makeLabel(i[i.length-1],i);this._makeItem(i,l,n)}},{key:"_makeRange",value:function(t,e,i){var n=t[0],o=t[1],r=t[2],s=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=r}catch(t){}a.step=s;var l="",h=0;if(void 0!==e){var u=1.2;e<0&&e*u<o?(a.min=Math.ceil(e*u),h=a.min,l="range increased"):e/u<o&&(a.min=Math.ceil(e/u),h=a.min,l="range increased"),e*u>r&&1!==r&&(a.max=Math.ceil(e*u),h=a.max,l="range increased"),a.value=e}else a.value=n;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;var d=this;a.onchange=function(){c.value=this.value,d._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};var p=this._makeLabel(i[i.length-1],i),m=this._makeItem(i,p,a,c);""!==l&&this.popupHistory[m]!==h&&(this.popupHistory[m]=h,this._setupPopup(l,m))}},{key:"_makeButton",value:function(){var t=this;if(!0===this.options.showButton){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){var n=document.createElement("div");n.id="vis-configuration-popup",n.className="vis-configuration-popup",n.innerText=t,n.onclick=function(){i._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:e}}}},{key:"_removePopup",value:function(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var t=this;if(void 0!==this.popupDiv.html){var e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+"px",this.popupDiv.html.style.top=e.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Zh((function(){t.popupDiv.html.style.opacity=0}),1500),this.popupDiv.deleteTimeout=Zh((function(){t._removePopup()}),1800)}}},{key:"_makeCheckbox",value:function(t,e,i){var n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0!==e&&(n.checked=e,e!==t&&("object"===Sh(t)?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));var o=this;n.onchange=function(){o._update(this.checked,i)};var r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}},{key:"_makeTextInput",value:function(t,e,i){var n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=e,e!==t&&this.changedOptions.push({path:i,value:e});var o=this;n.onchange=function(){o._update(this.value,i)};var r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}},{key:"_makeColorField",value:function(t,e,i){var n=this,o=t[1],r=document.createElement("div");"none"!==(e=void 0===e?o:e)?(r.className="vis-configuration vis-config-colorBlock",r.style.backgroundColor=e):r.className="vis-configuration vis-config-colorBlock none",e=void 0===e?o:e,r.onclick=function(){n._showColorPicker(e,r,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,r)}},{key:"_showColorPicker",value:function(t,e,i){var n=this;e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback((function(t){var o="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=o,n._update(o,i)})),this.colorPicker.setCloseCallback((function(){e.onclick=function(){n._showColorPicker(t,e,i)}}))}},{key:"_handleObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=gu(this.options),r=!1;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){n=!0;var a=t[s],l=Hg(e,s);if("function"==typeof o&&!1===(n=o(s,e))&&!Fh(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i),!1!==n){r=!0;var h=this._getValue(l);if(Fh(a))this._handleArray(a,h,l);else if("string"==typeof a)this._makeTextInput(a,h,l);else if("boolean"==typeof a)this._makeCheckbox(a,h,l);else if(a instanceof Object){if(!this.hideOption(e,s,this.moduleOptions))if(void 0!==a.enabled){var u=Hg(l,"enabled"),c=this._getValue(u);if(!0===c){var d=this._makeLabel(s,l,!0);this._makeItem(l,d),r=this._handleObject(a,l)||r}else this._makeCheckbox(a,c,l)}else{var p=this._makeLabel(s,l,!0);this._makeItem(l,p),r=this._handleObject(a,l)||r}}else console.error("dont know how to handle",a,s,l)}}return r}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(var o=0;o<e.length;o++)"global"!==e[o]&&(void 0===n[e[o]]&&(n[e[o]]={}),o!==e.length-1?n=n[e[o]]:n[e[o]]=t);return i}},{key:"_printOptions",value:function(){for(var t=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(ry("pre","const options = "+gf(t,null,2)))}},{key:"getOptions",value:function(){for(var t={},e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}]),t}(),ly=!1,hy="background: #FFeeee; color: #dd0000",uy=Eg,cy=oy,dy=ay,py=Tg,my=function(){function t(e,i){bo(this,t),this.container=e,this.overflowMethod=i||"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)}return So(t,[{key:"setPosition",value:function(t,e){this.x=Om(t),this.y=Om(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){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,r=0,s=0;if("flip"==this.overflowMethod){var a=!1,l=!0;this.y-e<this.padding&&(l=!1),this.x+i>o-this.padding&&(a=!0),r=a?this.x-i:this.x,s=l?this.y-e:this.y}else(s=this.y-e)+e+this.padding>n&&(s=n-e-this.padding),s<this.padding&&(s=this.padding),(r=this.x)+i+this.padding>o&&(r=o-i-this.padding),r<this.padding&&(r=this.padding);this.frame.style.left=r+"px",this.frame.style.top=s+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),t}(),fy=function(){function t(){bo(this,t)}return So(t,null,[{key:"validate",value:function(e,i,n){ly=!1,sy=i;var o=i;return void 0!==n&&(o=i[n]),t.parse(e,o,[]),ly}},{key:"parse",value:function(e,i,n){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.check(o,e,i,n)}},{key:"check",value:function(e,i,n,o){if(void 0!==n[e]||void 0!==n.__any__){var r=e,s=!0;void 0===n[e]&&void 0!==n.__any__&&(r="__any__",s="object"===t.getType(i[e]));var a=n[r];s&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,n,r,a,o)}else t.getSuggestion(e,n,o)}},{key:"checkFields",value:function(e,i,n,o,r,s){var a=function(i){console.error("%c"+i+t.printLocation(s,e),hy)},l=t.getType(i[e]),h=r[l];void 0!==h?"array"===t.getType(h)&&-1===zm(h).call(h,i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(h)+' not "'+i[e]+'". '),ly=!0):"object"===l&&"__any__"!==o&&(s=Hg(s,e),t.parse(i[e],n[o],s)):void 0===r.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(mc(r))+". Received ["+l+'] "'+i[e]+'"'),ly=!0)}},{key:"getType",value:function(t){var e=Sh(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Fh(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(e,i,n){var o,r=t.findInOptions(e,i,n,!1),s=t.findInOptions(e,sy,[],!0);o=void 0!==r.indexMatch?" in "+t.printLocation(r.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+r.indexMatch+'"?\n\n':s.distance<=4&&r.distance>s.distance?" in "+t.printLocation(r.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):r.distance<=8?'. Did you mean "'+r.closestMatch+'"?'+t.printLocation(r.path,e):". Did you mean one of these: "+t.print(mc(i))+t.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+o,hy),ly=!0}},{key:"findInOptions",value:function(e,i,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=1e9,s="",a=[],l=e.toLowerCase(),h=void 0;for(var u in i){var c=void 0;if(void 0!==i[u].__type__&&!0===o){var d=t.findInOptions(e,i[u],Hg(n,u));r>d.distance&&(s=d.closestMatch,a=d.path,r=d.distance,h=d.indexMatch)}else{var p;-1!==zm(p=u.toLowerCase()).call(p,l)&&(h=u),r>(c=t.levenshteinDistance(e,u))&&(s=u,a=Gg(n),r=c)}}return{closestMatch:s,path:a,distance:r,indexMatch:h}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",n="\n\n"+i+"options = {\n",o=0;o<t.length;o++){for(var r=0;r<o+1;r++)n+="  ";n+=t[o]+": {\n"}for(var s=0;s<t.length+1;s++)n+="  ";n+=e+"\n";for(var a=0;a<t.length+1;a++){for(var l=0;l<t.length-a;l++)n+="  ";n+="}\n"}return n+"\n\n"}},{key:"print",value:function(t){return gf(t).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}},{key:"levenshteinDistance",value:function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var i,n,o=[];for(i=0;i<=e.length;i++)o[i]=[i];for(n=0;n<=t.length;n++)o[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)==t.charAt(n-1)?o[i][n]=o[i-1][n-1]:o[i][n]=Math.min(o[i-1][n-1]+1,Math.min(o[i][n-1]+1,o[i-1][n]+1));return o[e.length][t.length]}}]),t}(),vy=Object.freeze({__proto__:null,Activator:uy,Alea:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return Dg(e.length?e:[Gd()])},ColorPicker:cy,Configurator:dy,DELETE:wg,HSVToHex:Zg,HSVToRGB:$g,Hammer:py,Popup:my,RGBToHSV:Xg,RGBToHex:Ug,VALIDATOR_PRINT_STYLE:"background: #FFeeee; color: #dd0000",Validator:fy,addClassName:function(t,e){var i=t.className.split(" "),n=e.split(" ");i=Fd(i).call(i,gu(n).call(n,(function(t){return!Zp(i).call(i,t)}))),t.className=i.join(" ")},addCssText:function(t,e){var i=qg(t.style.cssText),n=qg(e),o=gg(gg({},i),n);t.style.cssText=Kg(o)},addEventListener:function(t,e,i,n){var o;t.addEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&Zp(o=navigator.userAgent).call(o,"Firefox")&&(e="DOMMouseScroll"),t.addEventListener(e,i,n)):t.attachEvent("on"+e,i)},binarySearchCustom:function(t,e,i,n){for(var o=0,r=0,s=t.length-1;r<=s&&o<1e4;){var a=Math.floor((r+s)/2),l=t[a],h=e(void 0===n?l[i]:l[i][n]);if(0==h)return a;-1==h?r=a+1:s=a-1,o++}return-1},binarySearchValue:function(t,e,i,n,o){var r,s,a,l,h=0,u=0,c=t.length-1;for(o=null!=o?o:function(t,e){return t==e?0:t<e?-1:1};u<=c&&h<1e4;){if(l=Math.floor(.5*(c+u)),r=t[Math.max(0,l-1)][i],s=t[l][i],a=t[Math.min(t.length-1,l+1)][i],0==o(s,e))return l;if(o(r,e)<0&&o(s,e)>0)return"before"==n?Math.max(0,l-1):l;if(o(s,e)<0&&o(a,e)>0)return"before"==n?l:Math.min(t.length-1,l+1);o(s,e)<0?u=l+1:c=l-1,h++}return-1},bridgeObject:iy,copyAndExtendArray:Hg,copyArray:Gg,deepExtend:Bg,deepObjectAssign:kg,easingFunctions:{linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},equalArray:function(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!=e[i])return!1;return!0},extend:jg,fillIfDefined:function t(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var o in e)if(void 0!==i[o])if(null===i[o]||"object"!==Sh(i[o]))Lg(e,i,o,n);else{var r=e[o],s=i[o];Rg(r)&&Rg(s)&&t(r,s,n)}},forEach:function(t,e){if(Fh(t))for(var i=t.length,n=0;n<i;n++)e(t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e(t[o],o,t)},getAbsoluteLeft:function(t){return t.getBoundingClientRect().left},getAbsoluteRight:function(t){return t.getBoundingClientRect().right},getAbsoluteTop:function(t){return t.getBoundingClientRect().top},getScrollBarWidth:function(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;return i==n&&(n=e.clientWidth),document.body.removeChild(e),i-n},getTarget:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,e=null;return t&&(t.target?e=t.target:t.srcElement&&(e=t.srcElement)),e instanceof Element&&(null==e.nodeType||3!=e.nodeType||(e=e.parentNode)instanceof Element)?e:null},getType:zg,hasParent:function(t,e){for(var i=t;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}return!1},hexToHSV:Qg,hexToRGB:Yg,insertSort:function(t,e){for(var i=0;i<t.length;i++){var n=t[i],o=void 0;for(o=i;o>0&&e(n,t[o-1])<0;o--)t[o]=t[o-1];t[o]=n}return t},isDate:function(t){if(t instanceof Date)return!0;if(Fg(t)){if(Og.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:Ng,isObject:Rg,isString:Fg,isValidHex:Jg,isValidRGB:ty,isValidRGBA:ey,mergeOptions:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=function(t){return null!=t},r=function(t){return null!==t&&"object"===Sh(t)},s=function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0};if(!r(t))throw new Error("Parameter mergeTarget must be an object");if(!r(e))throw new Error("Parameter options must be an object");if(!o(i))throw new Error("Parameter option must have a value");if(!r(n))throw new Error("Parameter globalOptions must be an object");var a=function(t,e,i){r(t[i])||(t[i]={});var n=e[i],o=t[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])},l=e[i],h=r(n)&&!s(n),u=h?n[i]:void 0,c=u?u.enabled:void 0;if(void 0!==l){if("boolean"==typeof l)return r(t[i])||(t[i]={}),void(t[i].enabled=l);if(null===l&&!r(t[i])){if(!o(u))return;t[i]=$m(u)}if(r(l)){var d=!0;void 0!==l.enabled?d=l.enabled:void 0!==c&&(d=u.enabled),a(t,e,i),t[i].enabled=d}}},option:Wg,overrideOpacity:function(t,e){if(Zp(t).call(t,"rgba"))return t;if(Zp(t).call(t,"rgb")){var i=t.substr(zm(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}var n=Yg(t);return null==n?t:"rgba("+n.r+","+n.g+","+n.b+","+e+")"},parseColor:function(t,e){if(Fg(t)){var i=t;if(ty(i)){var n,o=Ku(n=i.substr(4).substr(0,i.length-5).split(",")).call(n,(function(t){return Om(t)}));i=Ug(o[0],o[1],o[2])}if(!0===Jg(i)){var r=Qg(i),s={h:r.h,s:.8*r.s,v:Math.min(1,1.02*r.v)},a={h:r.h,s:Math.min(1,1.25*r.s),v:.8*r.v},l=Zg(a.h,a.s,a.v),h=Zg(s.h,s.s,s.v);return{background:i,border:l,highlight:{background:h,border:l},hover:{background:h,border:l}}}return{background:i,border:i,highlight:{background:i,border:i},hover:{background:i,border:i}}}return e?{background:t.background||e.background,border:t.border||e.border,highlight:Fg(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:Fg(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}}:{background:t.background||void 0,border:t.border||void 0,highlight:Fg(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:Fg(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||void 0,background:t.hover&&t.hover.background||void 0}}},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(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return kg.apply(void 0,Fd(e=[{},t]).call(e,n))},recursiveDOMDelete:function t(e){if(e)for(;!0===e.hasChildNodes();){var i=e.firstChild;i&&(t(i),e.removeChild(i))}},removeClassName:function(t,e){var i=t.className.split(" "),n=e.split(" ");i=gu(i).call(i,(function(t){return!Zp(n).call(n,t)})),t.className=i.join(" ")},removeCssText:function(t,e){var i=qg(t.style.cssText),n=qg(e);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&delete i[o];t.style.cssText=Kg(i)},removeEventListener:function(t,e,i,n){var o;t.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&Zp(o=navigator.userAgent).call(o,"Firefox")&&(e="DOMMouseScroll"),t.removeEventListener(e,i,n)):t.detachEvent("on"+e,i)},selectiveBridgeObject:function(t,e){if(null!==e&&"object"===Sh(e)){for(var i=$m(e),n=0;n<t.length;n++)Object.prototype.hasOwnProperty.call(e,t[n])&&"object"==Sh(e[t[n]])&&(i[t[n]]=iy(e[t[n]]));return i}return null},selectiveDeepExtend:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Fh(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o=0;o<t.length;o++){var r=t[o];if(Object.prototype.hasOwnProperty.call(i,r))if(i[r]&&i[r].constructor===Object)void 0===e[r]&&(e[r]={}),e[r].constructor===Object?Bg(e[r],i[r],!1,n):Lg(e,i,r,n);else{if(Fh(i[r]))throw new TypeError("Arrays are not supported by deepExtend");Lg(e,i,r,n)}}return e},selectiveExtend:function(t,e){if(!Fh(t))throw new Error("Array with property names expected as first argument");for(var i=arguments.length,n=new Array(i>2?i-2:0),o=2;o<i;o++)n[o-2]=arguments[o];for(var r=0,s=n;r<s.length;r++)for(var a=s[r],l=0;l<t.length;l++){var h=t[l];a&&Object.prototype.hasOwnProperty.call(a,h)&&(e[h]=a[h])}return e},selectiveNotDeepExtend:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Fh(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&!Zp(t).call(t,o))if(i[o]&&i[o].constructor===Object)void 0===e[o]&&(e[o]={}),e[o].constructor===Object?Bg(e[o],i[o]):Lg(e,i,o,n);else if(Fh(i[o])){e[o]=[];for(var r=0;r<i[o].length;r++)e[o].push(i[o][r])}else Lg(e,i,o,n);return e},throttle:function(t){var e=!1;return function(){e||(e=!0,requestAnimationFrame((function(){e=!1,t()})))}},toArray:Vg,topMost:function(t,e){var i;Fh(e)||(e=[e]);var n,o=yg(t);try{for(o.s();!(n=o.n()).done;){var r=n.value;if(r){i=r[e[0]];for(var s=1;s<e.length;s++)i&&(i=i[e[s]]);if(void 0!==i)break}}}catch(t){o.e(t)}finally{o.f()}return i},updateProperty:function(t,e,i){return t[e]!==i&&(t[e]=i,!0)}}),gy={exports:{}},yy={},by={exports:{}},wy={};function ky(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var _y=/javascript\s*\:/gim;wy.whiteList=ky(),wy.getDefaultWhiteList=ky,wy.onAttr=function(t,e,i){},wy.onIgnoreAttr=function(t,e,i){},wy.safeAttrValue=function(t,e){return _y.test(e)?"":e};var xy={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,o;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}};var Cy=wy,Dy=function(t,e){";"!==(t=xy.trimRight(t))[t.length-1]&&(t+=";");var i=t.length,n=!1,o=0,r=0,s="";function a(){if(!n){var i=xy.trim(t.slice(o,r)),a=i.indexOf(":");if(-1!==a){var l=xy.trim(i.slice(0,a)),h=xy.trim(i.slice(a+1));if(l){var u=e(o,s.length,l,h,i);u&&(s+=u+"; ")}}}o=r+1}for(;r<i;r++){var l=t[r];if("/"===l&&"*"===t[r+1]){var h=t.indexOf("*/",r+2);if(-1===h)break;o=(r=h+1)+1,n=!1}else"("===l?n=!0:")"===l?n=!1:";"===l?n||a():"\n"===l&&a()}return xy.trim(s)};function Sy(t){return null==t}function Ty(t){(t=function(t){var e={};for(var i in t)e[i]=t[i];return e}(t||{})).whiteList=t.whiteList||Cy.whiteList,t.onAttr=t.onAttr||Cy.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||Cy.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||Cy.safeAttrValue,this.options=t}Ty.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,i=e.whiteList,n=e.onAttr,o=e.onIgnoreAttr,r=e.safeAttrValue;return Dy(t,(function(t,e,s,a,l){var h=i[s],u=!1;if(!0===h?u=h:"function"==typeof h?u=h(a):h instanceof RegExp&&(u=h.test(a)),!0!==u&&(u=!1),a=r(s,a)){var c,d={position:e,sourcePosition:t,source:l,isWhite:u};return u?Sy(c=n(s,a,d))?s+":"+a:c:Sy(c=o(s,a,d))?void 0:c}}))};var Ey=Ty;!function(t,e){var i=wy,n=Ey;for(var o in(e=t.exports=function(t,e){return new n(e).process(t)}).FilterCSS=n,i)e[o]=i[o];"undefined"!=typeof window&&(window.filterCSS=t.exports)}(by,by.exports);var Oy={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,o;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}},Ay=by.exports.FilterCSS,Iy=by.exports.getDefaultWhiteList,Py=Oy;function My(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var Ny=new Ay;function Fy(t){return t.replace(Ry,"&lt;").replace(Ly,"&gt;")}var Ry=/</g,Ly=/>/g,jy=/"/g,By=/&quot;/g,zy=/&#([a-zA-Z0-9]*);?/gim,Hy=/&colon;?/gim,Gy=/&newline;?/gim,Vy=/((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,Wy=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Yy=/u\s*r\s*l\s*\(.*/gi;function Uy(t){return t.replace(jy,"&quot;")}function Xy(t){return t.replace(By,'"')}function qy(t){return t.replace(zy,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function Ky(t){return t.replace(Hy,":").replace(Gy," ")}function $y(t){for(var e="",i=0,n=t.length;i<n;i++)e+=t.charCodeAt(i)<32?" ":t.charAt(i);return Py.trim(e)}function Zy(t){return t=$y(t=Ky(t=qy(t=Xy(t))))}function Qy(t){return t=Fy(t=Uy(t))}yy.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},yy.getDefaultWhiteList=My,yy.onTag=function(t,e,i){},yy.onIgnoreTag=function(t,e,i){},yy.onTagAttr=function(t,e,i){},yy.onIgnoreTagAttr=function(t,e,i){},yy.safeAttrValue=function(t,e,i,n){if(i=Zy(i),"href"===e||"src"===e){if("#"===(i=Py.trim(i)))return"#";if("http://"!==i.substr(0,7)&&"https://"!==i.substr(0,8)&&"mailto:"!==i.substr(0,7)&&"tel:"!==i.substr(0,4)&&"data:image/"!==i.substr(0,11)&&"ftp://"!==i.substr(0,6)&&"./"!==i.substr(0,2)&&"../"!==i.substr(0,3)&&"#"!==i[0]&&"/"!==i[0])return""}else if("background"===e){if(Vy.lastIndex=0,Vy.test(i))return""}else if("style"===e){if(Wy.lastIndex=0,Wy.test(i))return"";if(Yy.lastIndex=0,Yy.test(i)&&(Vy.lastIndex=0,Vy.test(i)))return"";!1!==n&&(i=(n=n||Ny).process(i))}return i=Qy(i)},yy.escapeHtml=Fy,yy.escapeQuote=Uy,yy.unescapeQuote=Xy,yy.escapeHtmlEntities=qy,yy.escapeDangerHtml5Entities=Ky,yy.clearNonPrintableCharacter=$y,yy.friendlyAttrValue=Zy,yy.escapeAttrValue=Qy,yy.onIgnoreTagStripAll=function(){return""},yy.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var i=!Array.isArray(t),n=[],o=!1;return{onIgnoreTag:function(r,s,a){if(function(e){return!!i||-1!==Py.indexOf(t,e)}(r)){if(a.isClosing){var l="[/removed]",h=a.position+l.length;return n.push([!1!==o?o:a.position,h]),o=!1,l}return o||(o=a.position),"[removed]"}return e(r,s,a)},remove:function(t){var e="",i=0;return Py.forEach(n,(function(n){e+=t.slice(i,n[0]),i=n[1]})),e+=t.slice(i)}}},yy.stripCommentTag=function(t){for(var e="",i=0;i<t.length;){var n=t.indexOf("\x3c!--",i);if(-1===n){e+=t.slice(i);break}e+=t.slice(i,n);var o=t.indexOf("--\x3e",n);if(-1===o)break;i=o+3}return e},yy.stripBlankChar=function(t){var e=t.split("");return(e=e.filter((function(t){var e=t.charCodeAt(0);return 127!==e&&(!(e<=31)||(10===e||13===e))}))).join("")},yy.cssFilter=Ny,yy.getDefaultCSSWhiteList=Iy;var Jy={},tb=Oy;function eb(t){var e=tb.spaceIndex(t);if(-1===e)var i=t.slice(1,-1);else i=t.slice(1,e+1);return"/"===(i=tb.trim(i).toLowerCase()).slice(0,1)&&(i=i.slice(1)),"/"===i.slice(-1)&&(i=i.slice(0,-1)),i}function ib(t){return"</"===t.slice(0,2)}var nb=/[^a-zA-Z0-9_:\.\-]/gim;function ob(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"="===i?e:-1}}function rb(t,e){for(;e>0;e--){var i=t[e];if(" "!==i)return"="===i?e:-1}}function sb(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}Jy.parseTag=function(t,e,i){var n="",o=0,r=!1,s=!1,a=0,l=t.length,h="",u="";t:for(a=0;a<l;a++){var c=t.charAt(a);if(!1===r){if("<"===c){r=a;continue}}else if(!1===s){if("<"===c){n+=i(t.slice(o,a)),r=a,o=a;continue}if(">"===c){n+=i(t.slice(o,r)),h=eb(u=t.slice(r,a+1)),n+=e(r,n.length,h,u,ib(u)),o=a+1,r=!1;continue}if('"'===c||"'"===c)for(var d=1,p=t.charAt(a-d);""===p.trim()||"="===p;){if("="===p){s=c;continue t}p=t.charAt(a-++d)}}else if(c===s){s=!1;continue}}return o<t.length&&(n+=i(t.substr(o))),n},Jy.parseAttr=function(t,e){var i=0,n=[],o=!1,r=t.length;function s(t,i){if(!((t=(t=tb.trim(t)).replace(nb,"").toLowerCase()).length<1)){var o=e(t,i||"");o&&n.push(o)}}for(var a=0;a<r;a++){var l,h=t.charAt(a);if(!1!==o||"="!==h)if(!1===o||a!==i||'"'!==h&&"'"!==h||"="!==t.charAt(a-1))if(/\s|\n|\t/.test(h)){if(t=t.replace(/\s|\n|\t/g," "),!1===o){if(-1===(l=ob(t,a))){s(tb.trim(t.slice(i,a))),o=!1,i=a+1;continue}a=l-1;continue}if(-1===(l=rb(t,a-1))){s(o,sb(tb.trim(t.slice(i,a)))),o=!1,i=a+1;continue}}else;else{if(-1===(l=t.indexOf(h,a+1)))break;s(o,tb.trim(t.slice(i+1,l))),o=!1,i=(a=l)+1}else o=t.slice(i,a),i=a+1}return i<t.length&&(!1===o?s(t.slice(i)):s(o,sb(tb.trim(t.slice(i))))),tb.trim(n.join(" "))};var ab=by.exports.FilterCSS,lb=yy,hb=Jy,ub=hb.parseTag,cb=hb.parseAttr,db=Oy;function pb(t){return null==t}function mb(t){(t=function(t){var e={};for(var i in t)e[i]=t[i];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=lb.onIgnoreTagStripAll),t.whiteList=t.whiteList||lb.whiteList,t.onTag=t.onTag||lb.onTag,t.onTagAttr=t.onTagAttr||lb.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||lb.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||lb.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||lb.safeAttrValue,t.escapeHtml=t.escapeHtml||lb.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new ab(t.css))}mb.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,i=e.whiteList,n=e.onTag,o=e.onIgnoreTag,r=e.onTagAttr,s=e.onIgnoreTagAttr,a=e.safeAttrValue,l=e.escapeHtml,h=this.cssFilter;e.stripBlankChar&&(t=lb.stripBlankChar(t)),e.allowCommentTag||(t=lb.stripCommentTag(t));var u=!1;if(e.stripIgnoreTagBody){u=lb.StripTagBody(e.stripIgnoreTagBody,o);o=u.onIgnoreTag}var c=ub(t,(function(t,e,u,c,d){var p,m={sourcePosition:t,position:e,isClosing:d,isWhite:i.hasOwnProperty(u)};if(!pb(p=n(u,c,m)))return p;if(m.isWhite){if(m.isClosing)return"</"+u+">";var f=function(t){var e=db.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var i="/"===(t=db.trim(t.slice(e+1,-1)))[t.length-1];return i&&(t=db.trim(t.slice(0,-1))),{html:t,closing:i}}(c),v=i[u],g=cb(f.html,(function(t,e){var i,n=-1!==db.indexOf(v,t);return pb(i=r(u,t,e,n))?n?(e=a(u,t,e,h))?t+'="'+e+'"':t:pb(i=s(u,t,e,n))?void 0:i:i}));c="<"+u;return g&&(c+=" "+g),f.closing&&(c+=" /"),c+=">"}return pb(p=o(u,c,m))?l(c):p}),l);return u&&(c=u.remove(c)),c};var fb=mb;!function(t,e){var i=yy,n=Jy,o=fb;function r(t,e){return new o(e).process(t)}for(var s in(e=t.exports=r).filterXSS=r,e.FilterXSS=o,i)e[s]=i[s];for(var s in n)e[s]=n[s];"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)}(gy,gy.exports);var vb=gy.exports,gb="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),yb=new Uint8Array(16);function bb(){if(!gb)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gb(yb)}for(var wb=[],kb=0;kb<256;++kb)wb[kb]=(kb+256).toString(16).substr(1);function _b(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||bb)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var r=0;r<16;++r)e[n+r]=o[r];return e||function(t,e){var i=e||0,n=wb;return[n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],"-",n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]],n[t[i++]]].join("")}(o)}function xb(t,e){var i=mc(t);if(cu){var n=cu(t);e&&(n=gu(n).call(n,(function(e){return Tu(t,e).enumerable}))),i.push.apply(i,n)}return i}function Cb(t){for(var e=1;e<arguments.length;e++){var i,n=null!=arguments[e]?arguments[e]:{};if(e%2)hu(i=xb(Object(n),!0)).call(i,(function(e){Vu(t,e,n[e])}));else if(ju)Gu(t,ju(n));else{var o;hu(o=xb(Object(n))).call(o,(function(e){fc(t,e,Tu(n,e))}))}}return t}var Db=/^\/?Date\((-?\d+)/i,Sb=/^\d+$/;function Tb(t,e){var i;if(void 0!==t){if(null===t)return null;if(!e)return t;if("string"!=typeof e&&!(e instanceof String))throw new Error("Type must be a string");switch(e){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Fg(t)&&!isNaN(Date.parse(t))?r.default(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":try{return Tb(t,"Moment").toDate()}catch(i){throw i instanceof TypeError?new TypeError("Cannot convert object of type "+zg(t)+" to type "+e):i}case"Moment":if(Ng(t))return r.default(t);if(t instanceof Date)return r.default(t.valueOf());if(r.default.isMoment(t))return r.default(t);if(Fg(t))return(i=Db.exec(t))?r.default(Number(i[1])):(i=Sb.exec(t))?r.default(Number(t)):r.default(t);throw new TypeError("Cannot convert object of type "+zg(t)+" to type "+e);case"ISODate":if(Ng(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(r.default.isMoment(t))return t.toDate().toISOString();if(Fg(t))return(i=Db.exec(t))?new Date(Number(i[1])).toISOString():r.default(t).format();throw new Error("Cannot convert object of type "+zg(t)+" to type ISODate");case"ASPDate":if(Ng(t))return"/Date("+t+")/";if(t instanceof Date||r.default.isMoment(t))return"/Date("+t.valueOf()+")/";if(Fg(t))return"/Date("+((i=Db.exec(t))?new Date(Number(i[1])).valueOf():new Date(t).valueOf())+")/";throw new Error("Cannot convert object of type "+zg(t)+" to type ASPDate");default:throw new Error("Unknown type ".concat(e))}}}function Eb(t){var e,i,o,r,s,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{start:"Date",end:"Date"},h=t._idProp,u=new n.DataSet({fieldId:h}),c=Ku(e=n.createNewDataPipeFrom(t)).call(e,(function(t){var e;return cc(e=mc(t)).call(e,(function(e,i){return e[i]=Tb(t[i],l[i]),e}),{})})).to(u);return c.all().start(),{add:function(){var e;return(e=t.getDataSet()).add.apply(e,arguments)},remove:function(){var e;return(e=t.getDataSet()).remove.apply(e,arguments)},update:function(){var e;return(e=t.getDataSet()).update.apply(e,arguments)},updateOnly:function(){var e;return(e=t.getDataSet()).updateOnly.apply(e,arguments)},clear:function(){var e;return(e=t.getDataSet()).clear.apply(e,arguments)},forEach:Gh(i=hu(u)).call(i,u),get:Gh(o=u.get).call(o,u),getIds:Gh(r=u.getIds).call(r,u),off:Gh(s=u.off).call(s,u),on:Gh(a=u.on).call(a,u),get length(){return u.length},idProp:h,type:l,rawDS:t,coercedDS:u,dispose:function(){return c.stop()}}}var Ob=function(t){var e=new vb.FilterXSS(t);return function(t){return e.process(t)}},Ab=function(t){return t},Ib=Ob(),Pb=Cb(Cb({},vy),{},{convert:Tb,setupXSSProtection:function(t){t&&(!0===t.disabled?(Ib=Ab,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):t.filterOptions&&(Ib=Ob(t.filterOptions)))}});fc(Pb,"xss",{get:function(){return Ib}});var Mb=l,Nb=k,Fb=Dr,Rb=vm.trim,Lb=y("".charAt),jb=Mb.parseFloat,Bb=Mb.Symbol,zb=Bb&&Bb.iterator,Hb=1/jb("\t\n\v\f\r                 \u2028\u2029\ufeff-0")!=-1/0||zb&&!Nb((function(){jb(Object(zb))}))?function(t){var e=Rb(Fb(t)),i=jb(e);return 0===i&&"-"==Lb(e,0)?-0:i}:jb;gi({global:!0,forced:parseFloat!=Hb},{parseFloat:Hb});var Gb=K.parseFloat,Vb=function(){function t(e,i){bo(this,t),this.options=null,this.props=null}return So(t,[{key:"setOptions",value:function(t){t&&Pb.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;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t}}]),t}(),Wb=un,Yb=Dr,Ub=V,Xb=l.RangeError;gi({target:"String",proto:!0},{repeat:function(t){var e=Yb(Ub(this)),i="",n=Wb(t);if(n<0||n==1/0)throw Xb("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(i+=e);return i}});var qb=Lh("String").repeat,Kb=et,$b=qb,Zb=String.prototype,Qb=function(t){var e=t.repeat;return"string"==typeof t||t===Zb||Kb(Zb,t)&&e===Zb.repeat?$b:e},Jb=yi,tw=Math.floor,ew=function(t,e){var i=t.length,n=tw(i/2);return i<8?iw(t,e):nw(t,ew(Jb(t,0,n),e),ew(Jb(t,n),e),e)},iw=function(t,e){for(var i,n,o=t.length,r=1;r<o;){for(n=r,i=t[r];n&&e(t[n-1],i)>0;)t[n]=t[--n];n!==r++&&(t[n]=i)}return t},nw=function(t,e,i,n){for(var o=e.length,r=i.length,s=0,a=0;s<o||a<r;)t[s+a]=s<o&&a<r?n(e[s],i[a])<=0?e[s++]:i[a++]:s<o?e[s++]:i[a++];return t},ow=ew,rw=it.match(/firefox\/(\d+)/i),sw=!!rw&&+rw[1],aw=/MSIE|Trident/.test(it),lw=it.match(/AppleWebKit\/(\d+)\./),hw=!!lw&&+lw[1],uw=gi,cw=y,dw=Dt,pw=Ht,mw=yn,fw=Dr,vw=k,gw=ow,yw=Jh,bw=sw,ww=aw,kw=ht,_w=hw,xw=[],Cw=cw(xw.sort),Dw=cw(xw.push),Sw=vw((function(){xw.sort(void 0)})),Tw=vw((function(){xw.sort(null)})),Ew=yw("sort"),Ow=!vw((function(){if(kw)return kw<70;if(!(bw&&bw>3)){if(ww)return!0;if(_w)return _w<603;var t,e,i,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)xw.push({k:e+n,v:i})}for(xw.sort((function(t,e){return e.v-t.v})),n=0;n<xw.length;n++)e=xw[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));uw({target:"Array",proto:!0,forced:Sw||!Tw||!Ew||!Ow},{sort:function(t){void 0!==t&&dw(t);var e=pw(this);if(Ow)return void 0===t?Cw(e):Cw(e,t);var i,n,o=[],r=mw(e);for(n=0;n<r;n++)n in e&&Dw(o,e[n]);for(gw(o,function(t){return function(e,i){return void 0===i?-1:void 0===e?1:void 0!==t?+t(e,i)||0:fw(e)>fw(i)?1:-1}}(t)),i=o.length,n=0;n<i;)e[n]=o[n++];for(;n<r;)delete e[n++];return e}});var Aw=Lh("Array").sort,Iw=et,Pw=Aw,Mw=Array.prototype,Nw=function(t){var e=t.sort;return t===Mw||Iw(Mw,t)&&e===Mw.sort?Pw:e};function Fw(t,e,i){if(i&&!Fh(i))return Fw(t,e,[i]);if(e.hiddenDates=[],i&&1==Fh(i)){for(var n,o=0;o<i.length;o++)if(void 0===Qb(i[o])){var r={};r.start=t(i[o].start).toDate().valueOf(),r.end=t(i[o].end).toDate().valueOf(),e.hiddenDates.push(r)}Nw(n=e.hiddenDates).call(n,(function(t,e){return t.start-e.start}))}}function Rw(t,e,i){if(i&&!Fh(i))return Rw(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){Fw(t,e,i);for(var n=t(e.range.start),o=t(e.range.end),r=(e.range.end-e.range.start)/e.domProps.centerContainer.width,s=0;s<i.length;s++)if(void 0!==Qb(i[s])){var a=t(i[s].start),l=t(i[s].end);if("Invalid Date"==a._d)throw new Error("Supplied start date is not valid: ".concat(i[s].start));if("Invalid Date"==l._d)throw new Error("Supplied end date is not valid: ".concat(i[s].end));if(l-a>=4*r){var h=0,u=o.clone();switch(Qb(i[s])){case"daily":a.day()!=l.day()&&(h=1),a.dayOfYear(n.dayOfYear()),a.year(n.year()),a.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-h,"days"),u.add(1,"weeks");break;case"weekly":var c=l.diff(a,"days"),d=a.day();a.date(n.date()),a.month(n.month()),a.year(n.year()),l=a.clone(),a.day(d),l.day(d),l.add(c,"days"),a.subtract(1,"weeks"),l.subtract(1,"weeks"),u.add(1,"weeks");break;case"monthly":a.month()!=l.month()&&(h=1),a.month(n.month()),a.year(n.year()),a.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(h,"months"),u.add(1,"months");break;case"yearly":a.year()!=l.year()&&(h=1),a.year(n.year()),a.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(h,"years"),u.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",Qb(i[s]))}for(;a<u;)switch(e.hiddenDates.push({start:a.valueOf(),end:l.valueOf()}),Qb(i[s])){case"daily":a.add(1,"days"),l.add(1,"days");break;case"weekly":a.add(1,"weeks"),l.add(1,"weeks");break;case"monthly":a.add(1,"months"),l.add(1,"months");break;case"yearly":a.add(1,"y"),l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",Qb(i[s]))}e.hiddenDates.push({start:a.valueOf(),end:l.valueOf()})}}Lw(e);var p=Xw(e.range.start,e.hiddenDates),m=Xw(e.range.end,e.hiddenDates),f=e.range.start,v=e.range.end;1==p.hidden&&(f=1==e.range.startToFront?p.startDate-1:p.endDate+1),1==m.hidden&&(v=1==e.range.endToFront?m.startDate-1:m.endDate+1),1!=p.hidden&&1!=m.hidden||e.range._applyRange(f,v)}}function Lw(t){for(var e,i=t.hiddenDates,n=[],o=0;o<i.length;o++)for(var r=0;r<i.length;r++)o!=r&&1!=i[r].remove&&1!=i[o].remove&&(i[r].start>=i[o].start&&i[r].end<=i[o].end?i[r].remove=!0:i[r].start>=i[o].start&&i[r].start<=i[o].end?(i[o].end=i[r].end,i[r].remove=!0):i[r].end>=i[o].start&&i[r].end<=i[o].end&&(i[o].start=i[r].start,i[r].remove=!0));for(o=0;o<i.length;o++)!0!==i[o].remove&&n.push(i[o]);t.hiddenDates=n,Nw(e=t.hiddenDates).call(e,(function(t,e){return t.start-e.start}))}function jw(t,e,i){for(var n=!1,o=e.current.valueOf(),r=0;r<e.hiddenDates.length;r++){var s=e.hiddenDates[r].start,a=e.hiddenDates[r].end;if(o>=s&&o<a){n=!0;break}}if(1==n&&o<e._end.valueOf()&&o!=i){var l=t(i),h=t(a);l.year()!=h.year()?e.switchedYear=!0:l.month()!=h.month()?e.switchedMonth=!0:l.dayOfYear()!=h.dayOfYear()&&(e.switchedDay=!0),e.current=h}}function Bw(t,e,i){var n;if(0==t.body.hiddenDates.length)return n=t.range.conversion(i),(e.valueOf()-n.offset)*n.scale;var o=Xw(e,t.body.hiddenDates);1==o.hidden&&(e=o.startDate);var r=Hw(t.body.hiddenDates,t.range.start,t.range.end);if(e<t.range.start){n=t.range.conversion(i,r);var s=Gw(t.body.hiddenDates,e,n.offset);return e=t.options.moment(e).toDate().valueOf(),e+=s,-(n.offset-e.valueOf())*n.scale}if(e>t.range.end){var a={start:t.range.start,end:e};return e=Vw(t.options.moment,t.body.hiddenDates,a,e),n=t.range.conversion(i,r),(e.valueOf()-n.offset)*n.scale}return e=Vw(t.options.moment,t.body.hiddenDates,t.range,e),n=t.range.conversion(i,r),(e.valueOf()-n.offset)*n.scale}function zw(t,e,i){if(0==t.body.hiddenDates.length){var n=t.range.conversion(i);return new Date(e/n.scale+n.offset)}var o=Hw(t.body.hiddenDates,t.range.start,t.range.end),r=(t.range.end-t.range.start-o)*e/i,s=Yw(t.body.hiddenDates,t.range,r);return new Date(s+r+t.range.start)}function Hw(t,e,i){for(var n=0,o=0;o<t.length;o++){var r=t[o].start,s=t[o].end;r>=e&&s<i&&(n+=s-r)}return n}function Gw(t,e,i){for(var n=0,o=0;o<t.length;o++){var r=t[o].start,s=t[o].end;r>=e&&s<=i&&(n+=s-r)}return n}function Vw(t,e,i,n){return n=t(n).toDate().valueOf(),n-=Ww(t,e,i,n)}function Ww(t,e,i,n){var o=0;n=t(n).toDate().valueOf();for(var r=0;r<e.length;r++){var s=e[r].start,a=e[r].end;s>=i.start&&a<i.end&&n>=a&&(o+=a-s)}return o}function Yw(t,e,i){for(var n=0,o=0,r=e.start,s=0;s<t.length;s++){var a=t[s].start,l=t[s].end;if(a>=e.start&&l<e.end){if(o+=a-r,r=l,o>=i)break;n+=l-a}}return n}function Uw(t,e,i,n){var o=Xw(e,t);return 1==o.hidden?i<0?1==n?o.startDate-(o.endDate-e)-1:o.startDate-1:1==n?o.endDate+(e-o.startDate)+1:o.endDate+1:e}function Xw(t,e){for(var i=0;i<e.length;i++){var n=e[i].start,o=e[i].end;if(t>=n&&t<o)return{hidden:!0,startDate:n,endDate:o}}return{hidden:!1,startDate:n,endDate:o}}var qw=Object.freeze({__proto__:null,convertHiddenOptions:Fw,updateHiddenDates:Rw,removeDuplicates:Lw,printDates:function(t){for(var e=0;e<t.length;e++)console.log(e,new Date(t[e].start),new Date(t[e].end),t[e].start,t[e].end,t[e].remove)},stepOverHiddenDates:jw,toScreen:Bw,toTime:zw,getHiddenDurationBetween:Hw,getHiddenDurationBeforeStart:Gw,correctTimeForHidden:Vw,getHiddenDurationBefore:Ww,getAccumulatedHiddenDuration:Yw,snapAwayFromHidden:Uw,getIsHidden:Xw});function Kw(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}var $w=function(t){zo(i,t);var e=Kw(i);function i(t,n){var o,r,s,a,l,h,u,c;bo(this,i),c=e.call(this);var d=uu().hours(0).minutes(0).seconds(0).milliseconds(0),p=d.clone().add(-3,"days").valueOf(),m=d.clone().add(3,"days").valueOf();return c.millisecondsPerPixelCache=void 0,void 0===n?(c.start=p,c.end=m):(c.start=n.start||p,c.end=n.end||m),c.rolling=!1,c.body=t,c.deltaDifference=0,c.scaleOffset=0,c.startToFront=!1,c.endToFront=!0,c.defaultOptions={rtl:!1,start:null,end:null,moment:uu,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},c.options=Pb.extend({},c.defaultOptions),c.props={touch:{}},c.animationTimer=null,c.body.emitter.on("panstart",Gh(o=c._onDragStart).call(o,To(c))),c.body.emitter.on("panmove",Gh(r=c._onDrag).call(r,To(c))),c.body.emitter.on("panend",Gh(s=c._onDragEnd).call(s,To(c))),c.body.emitter.on("mousewheel",Gh(a=c._onMouseWheel).call(a,To(c))),c.body.emitter.on("touch",Gh(l=c._onTouch).call(l,To(c))),c.body.emitter.on("pinch",Gh(h=c._onPinch).call(h,To(c))),c.body.dom.rollingModeBtn.addEventListener("click",Gh(u=c.startRolling).call(u,To(c))),c.setOptions(n),c}return So(i,[{key:"setOptions",value:function(t){if(t){Pb.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 t=this;!function e(){t.stopRolling(),t.rolling=!0;var i=t.end-t.start,n=Pb.convert(new Date,"Date").valueOf(),o=t.options.rollingMode&&t.options.rollingMode.offset||.5,r=n-i*o,s=n+i*(1-o);t.setRange(r,s,{animation:!1}),(i=1/t.conversion(t.body.domProps.center.width).scale/10)<30&&(i=30),i>1e3&&(i=1e3),t.body.dom.rollingModeBtn.style.visibility="hidden",t.currentTimeTimer=Zh(e,i)}()}},{key:"stopRolling",value:function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}},{key:"setRange",value:function(t,e,i,n,o){i||(i={}),!0!==i.byUser&&(i.byUser=!1);var r=this,s=null!=t?Pb.convert(t,"Date").valueOf():null,a=null!=e?Pb.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){var l,h=this.start,u=this.end,c="object"===Sh(i.animation)&&"duration"in i.animation?i.animation.duration:500,d="object"===Sh(i.animation)&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",p=Pb.easingFunctions[d];if(!p)throw new Error(Fd(l="Unknown easing function ".concat(gf(d),". Choose from: ")).call(l,mc(Pb.easingFunctions).join(", ")));var m=Gd(),f=!1;return function t(){if(!r.props.touch.dragging){var e=Gd()-m,l=p(e/c),d=e>c,g=d||null===s?s:h+(s-h)*l,y=d||null===a?a:u+(a-u)*l;v=r._applyRange(g,y),Rw(r.options.moment,r.body,r.options.hiddenDates),f=f||v;var b={start:new Date(r.start),end:new Date(r.end),byUser:i.byUser,event:i.event};if(o&&o(l,v,d),v&&r.body.emitter.emit("rangechange",b),d){if(f&&(r.body.emitter.emit("rangechanged",b),n))return n()}else r.animationTimer=Zh(t,20)}}()}var v=this._applyRange(s,a);if(Rw(this.options.moment,this.body,this.options.hiddenDates),v){var g={start:new Date(this.start),end:new Date(this.end),byUser:i.byUser,event:i.event};if(this.body.emitter.emit("rangechange",g),clearTimeout(r.timeoutID),r.timeoutID=Zh((function(){r.body.emitter.emit("rangechanged",g)}),200),n)return n()}}},{key:"getMillisecondsPerPixel",value:function(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}},{key:"_cancelAnimation",value:function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)}},{key:"_applyRange",value:function(t,e){var i,n=null!=t?Pb.convert(t,"Date").valueOf():this.start,o=null!=e?Pb.convert(e,"Date").valueOf():this.end,r=null!=this.options.max?Pb.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?Pb.convert(this.options.min,"Date").valueOf():null;if(isNaN(n)||null===n)throw new Error('Invalid start "'.concat(t,'"'));if(isNaN(o)||null===o)throw new Error('Invalid end "'.concat(e,'"'));if(o<n&&(o=n),null!==s&&n<s&&(n+=i=s-n,o+=i,null!=r&&o>r&&(o=r)),null!==r&&o>r&&(n-=i=o-r,o-=i,null!=s&&n<s&&(n=s)),null!==this.options.zoomMin){var a=Gb(this.options.zoomMin);if(a<0&&(a=0),o-n<a){this.end-this.start===a&&n>=this.start-.5&&o<=this.end?(n=this.start,o=this.end):(n-=(i=a-(o-n))/2,o+=i/2)}}if(null!==this.options.zoomMax){var l=Gb(this.options.zoomMax);l<0&&(l=0),o-n>l&&(this.end-this.start===l&&n<this.start&&o>this.end?(n=this.start,o=this.end):(n+=(i=o-n-l)/2,o-=i/2))}var h=this.start!=n||this.end!=o;return 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,h}},{key:"getRange",value:function(){return{start:this.start,end:this.end}}},{key:"conversion",value:function(t,e){return i.conversion(this.start,this.end,t,e)}},{key:"_onDragStart",value:function(t){this.deltaDifference=0,this.previousDelta=0,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;Zw(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var n=this.props.touch.end-this.props.touch.start;n-=Hw(this.body.hiddenDates,this.start,this.end);var o,r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;o=this.options.rtl?i/r*n:-i/r*n;var s=this.props.touch.start+o,a=this.props.touch.end+o,l=Uw(this.body.hiddenDates,s,this.previousDelta-i,!0),h=Uw(this.body.hiddenDates,a,this.previousDelta-i,!0);if(l!=s||h!=a)return this.deltaDifference+=i,this.props.touch.start=l,this.props.touch.end=h,void this._onDrag(t);this.previousDelta=i,this._applyRange(s,a);var u=new Date(this.start),c=new Date(this.end);this.body.emitter.emit("rangechange",{start:u,end:c,byUser:!0,event:t}),this.body.emitter.emit("panmove")}}},{key:"_onDragEnd",value:function(t){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;if(t.wheelDelta?e=t.wheelDelta/120:t.detail?e=-t.detail/3:t.deltaY&&(e=-t.deltaY/3),!(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,n,o=this.options.zoomFriction||5;if(i=e<0?1-e/o:1/(1+e/o),this.rolling){var r=this.options.rollingMode&&this.options.rollingMode.offset||.5;n=this.start+(this.end-this.start)*r}else{var s=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);n=this._pointerToDate(s)}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,Pb.preventDefault(t)}},{key:"_onPinch",value:function(t){if(this.options.zoomable&&this.options.moveable){Pb.preventDefault(t),this.props.touch.allowDragging=!1,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=Hw(this.body.hiddenDates,this.start,this.end),o=Ww(this.options.moment,this.body.hiddenDates,this,i),r=n-o,s=i-o+(this.props.touch.start-(i-o))*e,a=i+r+(this.props.touch.end-(i+r))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;var l=Uw(this.body.hiddenDates,s,1-e,!0),h=Uw(this.body.hiddenDates,a,e-1,!0);l==s&&h==a||(this.props.touch.start=l,this.props.touch.end=h,this.scaleOffset=1-t.scale,s=l,a=h);var u={animation:!1,byUser:!0,event:t};this.setRange(s,a,u),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(),n=this.options.rtl?e-i.left:i.right-e,o=this.body.util.toTime(n);return o>=this.start&&o<=this.end}},{key:"_pointerToDate",value:function(t){var e,i=this.options.direction;if(Zw(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var n=this.body.domProps.center.height;return e=this.conversion(n),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=Hw(this.body.hiddenDates,this.start,this.end),r=Ww(this.options.moment,this.body.hiddenDates,this,e),s=o-r,a=e-r+(this.start-(e-r))*t,l=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=Uw(this.body.hiddenDates,a,i,!0),u=Uw(this.body.hiddenDates,l,-i,!0);h==a&&u==l||(a=h,l=u);var c={animation:!1,byUser:!0,event:n};this.setRange(a,l,c),this.startToFront=!1,this.endToFront=!0}},{key:"move",value:function(t){var e=this.end-this.start,i=this.start+e*t,n=this.end+e*t;this.start=i,this.end=n}},{key:"moveTo",value:function(t){var e=(this.start+this.end)/2-t,i=this.start-e,n=this.end-e;this.setRange(i,n,{animation:!1,byUser:!0,event:null})}}],[{key:"conversion",value:function(t,e,i,n){return void 0===n&&(n=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-n)}:{offset:0,scale:1}}}]),i}(Vb);function Zw(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'.concat(t,'". Choose "horizontal" or "vertical".'))}var Qw=Is.some;gi({target:"Array",proto:!0,forced:!Jh("some")},{some:function(t){return Qw(this,t,arguments.length>1?arguments[1]:void 0)}});var Jw,tk=Lh("Array").some,ek=et,ik=tk,nk=Array.prototype,ok=function(t){var e=t.some;return t===nk||ek(nk,t)&&e===nk.some?ik:e},rk=K.setInterval,sk=null;"undefined"!=typeof window?Jw=function t(e,i){var n=i||{preventDefault:!1};if(e.Manager){var o=e,r=function(e,i){var r=Object.create(n);return i&&o.assign(r,i),t(new o(e,r),r)};return o.assign(r,o),r.Manager=function(e,i){var r=Object.create(n);return i&&o.assign(r,i),t(new o.Manager(e,r),r)},r}var s=Object.create(e),a=e.element;function l(t){return t.match(/[^ ]+/g)}function h(t){if("hammer.input"!==t.type){if(t.srcEvent._handled||(t.srcEvent._handled={}),t.srcEvent._handled[t.type])return;t.srcEvent._handled[t.type]=!0}var e=!1;t.stopPropagation=function(){e=!0};var i=t.srcEvent.stopPropagation.bind(t.srcEvent);"function"==typeof i&&(t.srcEvent.stopPropagation=function(){i(),t.stopPropagation()}),t.firstTarget=sk;for(var n=sk;n&&!e;){var o=n.hammer;if(o)for(var r,s=0;s<o.length;s++)if(r=o[s]._handlers[t.type])for(var a=0;a<r.length&&!e;a++)r[a](t);n=n.parentNode}}return a.hammer||(a.hammer=[]),a.hammer.push(s),e.on("hammer.input",(function(t){!0!==n.preventDefault&&n.preventDefault!==t.pointerType||t.preventDefault(),t.isFirst&&(sk=t.target)})),s._handlers={},s.on=function(t,i){return l(t).forEach((function(t){var n=s._handlers[t];n||(s._handlers[t]=n=[],e.on(t,h)),n.push(i)})),s},s.off=function(t,i){return l(t).forEach((function(t){var n=s._handlers[t];n&&((n=i?n.filter((function(t){return t!==i})):[]).length>0?s._handlers[t]=n:(e.off(t,h),delete s._handlers[t]))})),s},s.emit=function(t,i){sk=i.target,e.emit(t,i)},s.destroy=function(){var t=e.element.hammer,i=t.indexOf(s);-1!==i&&t.splice(i,1),t.length||delete e.element.hammer,s._handlers={},e.destroy()},s}(window.Hammer||fg,{preventDefault:"mouse"}):Jw=function(){return function(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(e){return{set:t}}}}()};var ak=Jw;function lk(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}var hk=function(){function t(e,i,n,o,r){bo(this,t),this.moment=r&&r.moment||uu,this.options=r||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale="day",this.step=1,this.setRange(e,i,n),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,Fh(o)?this.hiddenDates=o:this.hiddenDates=null!=o?[o]:[],this.format=t.FORMAT}return So(t,[{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(e){var i=Pb.deepExtend({},t.FORMAT);this.format=Pb.deepExtend(i,e)}},{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(){switch("week"==this.scale&&this.current.weekday(0),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(Uw(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"),e.isSame(this.current,"month")?this.current.add(this.step,"week"):(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":this.current.milliseconds()>0&&this.current.milliseconds()<this.step&&this.current.milliseconds(0);break;case"second":this.current.seconds()>0&&this.current.seconds()<this.step&&this.current.seconds(0);break;case"minute":this.current.minutes()>0&&this.current.minutes()<this.step&&this.current.minutes(0);break;case"hour":this.current.hours()>0&&this.current.hours()<this.step&&this.current.hours(0);break;case"weekday":case"day":this.current.date()<this.step+1&&this.current.date(1);break;case"week":this.current.week()<this.step&&this.current.week(1);break;case"month":this.current.month()<this.step&&this.current.month(0)}this.current.valueOf()==t&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,jw(this.moment,this,t)}},{key:"getCurrent",value:function(){return this.current.clone()}},{key:"setScale",value:function(t){t&&"string"==typeof t.scale&&(this.scale=t.scale,this.step=t.step>0?t.step:1,this.autoScale=!1)}},{key:"setAutoScale",value:function(t){this.autoScale=t}},{key:"setMinimumStep",value:function(t){if(null!=t){var e=31104e6,i=2592e6,n=864e5,o=36e5,r=6e4,s=1e3;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),7776e6>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),6048e5>t&&this.options.showWeekScale&&(this.scale="week",this.step=1),1728e5>t&&(this.scale="day",this.step=2),n>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),o>t&&(this.scale="hour",this.step=1),9e5>t&&(this.scale="minute",this.step=15),6e5>t&&(this.scale="minute",this.step=10),3e5>t&&(this.scale="minute",this.step=5),r>t&&(this.scale="minute",this.step=1),15e3>t&&(this.scale="second",this.step=15),1e4>t&&(this.scale="second",this.step=10),5e3>t&&(this.scale="second",this.step=5),s>t&&(this.scale="second",this.step=1),200>t&&(this.scale="millisecond",this.step=200),100>t&&(this.scale="millisecond",this.step=100),50>t&&(this.scale="millisecond",this.step=50),10>t&&(this.scale="millisecond",this.step=10),5>t&&(this.scale="millisecond",this.step=5),1>t&&(this.scale="millisecond",this.step=1)}}},{key:"isMajor",value:function(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"week":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":case"week":return 1==t.date();case"month":return 0==t.month();case"year":default:return!1}}},{key:"getLabelMinor",value:function(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);var e=this.format.minorLabels[this.scale];switch(this.scale){case"week":if(1===t.date()&&0!==t.weekday())return"";default:return e&&e.length>0?this.moment(t).format(e):""}}},{key:"getLabelMajor",value:function(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""}},{key:"getClassName",value:function(){var t,e=this.moment,i=this.moment(this.current),n=i.locale?i.locale("en"):i.lang("en"),o=this.step,r=[];function s(t){return t/o%2==0?" vis-even":" vis-odd"}function a(t){return t.isSame(Gd(),"day")?" vis-today":t.isSame(e().add(1,"day"),"day")?" vis-tomorrow":t.isSame(e().add(-1,"day"),"day")?" vis-yesterday":""}function l(t){return t.isSame(Gd(),"week")?" vis-current-week":""}function h(t){return t.isSame(Gd(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":r.push(a(n)),r.push(s(n.milliseconds()));break;case"second":r.push(a(n)),r.push(s(n.seconds()));break;case"minute":r.push(a(n)),r.push(s(n.minutes()));break;case"hour":r.push(Fd(t="vis-h".concat(n.hours())).call(t,4==this.step?"-h"+(n.hours()+4):"")),r.push(a(n)),r.push(s(n.hours()));break;case"weekday":r.push("vis-".concat(n.format("dddd").toLowerCase())),r.push(a(n)),r.push(l(n)),r.push(s(n.date()));break;case"day":r.push("vis-day".concat(n.date())),r.push("vis-".concat(n.format("MMMM").toLowerCase())),r.push(a(n)),r.push(h(n)),r.push(this.step<=2?a(n):""),r.push(this.step<=2?"vis-".concat(n.format("dddd").toLowerCase()):""),r.push(s(n.date()-1));break;case"week":r.push("vis-week".concat(n.format("w"))),r.push(l(n)),r.push(s(n.week()));break;case"month":r.push("vis-".concat(n.format("MMMM").toLowerCase())),r.push(h(n)),r.push(s(n.month()));break;case"year":r.push("vis-year".concat(n.year())),r.push(function(t){return t.isSame(Gd(),"year")?" vis-current-year":""}(n)),r.push(s(n.year()))}return gu(r).call(r,String).join(" ")}}],[{key:"snap",value:function(t,e,i){var n=uu(t);if("year"==e){var o=n.year()+Math.round(n.month()/12);n.year(Math.round(o/i)*i),n.month(0),n.date(0),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("month"==e)n.date()>15?(n.date(1),n.add(1,"month")):n.date(1),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0);else if("week"==e)n.weekday()>2?(n.weekday(0),n.add(1,"week")):n.weekday(0),n.hours(0),n.minutes(0),n.seconds(0),n.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:n.hours(24*Math.round(n.hours()/24));break;default:n.hours(12*Math.round(n.hours()/12))}n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:n.hours(12*Math.round(n.hours()/12));break;default:n.hours(6*Math.round(n.hours()/6))}n.minutes(0),n.seconds(0),n.milliseconds(0)}else if("hour"==e){switch(i){case 4:n.minutes(60*Math.round(n.minutes()/60));break;default:n.minutes(30*Math.round(n.minutes()/30))}n.seconds(0),n.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:n.minutes(5*Math.round(n.minutes()/5)),n.seconds(0);break;case 5:n.seconds(60*Math.round(n.seconds()/60));break;default:n.seconds(30*Math.round(n.seconds()/30))}n.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:n.seconds(5*Math.round(n.seconds()/5)),n.milliseconds(0);break;case 5:n.milliseconds(1e3*Math.round(n.milliseconds()/1e3));break;default:n.milliseconds(500*Math.round(n.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;n.milliseconds(Math.round(n.milliseconds()/r)*r)}return n}}]),t}();function uk(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}hk.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}};var ck=function(t){zo(i,t);var e=uk(i);function i(t,n){var o;return bo(this,i),(o=e.call(this)).dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},o.props={range:{start:0,end:0,minimumStep:0},lineTop:0},o.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:Pb.extend({},hk.FORMAT),moment:uu,timeAxis:null},o.options=Pb.extend({},o.defaultOptions),o.body=t,o._create(),o.setOptions(n),o}return So(i,[{key:"setOptions",value:function(t){t&&(Pb.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),Pb.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===Sh(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof uu.locale?uu.locale(t.locale):uu.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;this._calculateCharSize();var r=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.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,l=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height="".concat(this.props.height,"px"),this._repaintLabels(),a?n.insertBefore(e,a):n.appendChild(e),l?this.body.dom.backgroundVertical.insertBefore(i,l):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||o}},{key:"_repaintLabels",value:function(){var t=this.options.orientation.axis,e=Pb.convert(this.body.range.start,"Number"),i=Pb.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),o=n-Ww(this.options.moment,this.body.hiddenDates,this.body.range,n);o-=this.body.util.toTime(0).valueOf();var r=new hk(new Date(e),new Date(i),o,this.body.hiddenDates,this.options);r.setMoment(this.options.moment),this.options.format&&r.setFormat(this.options.format),this.options.timeAxis&&r.setScale(this.options.timeAxis),this.step=r;var s,a,l,h,u,c,d=this.dom;d.redundant.lines=d.lines,d.redundant.majorTexts=d.majorTexts,d.redundant.minorTexts=d.minorTexts,d.lines=[],d.majorTexts=[],d.minorTexts=[];var p,m,f,v=0,g=void 0,y=0,b=1e3;for(r.start(),a=r.getCurrent(),h=this.body.util.toScreen(a);r.hasNext()&&y<b;){switch(y++,u=r.isMajor(),f=r.getClassName(),s=a,l=h,r.next(),a=r.getCurrent(),p=v,v=(h=this.body.util.toScreen(a))-l,r.scale){case"week":c=!0;break;default:c=v>=.4*p}if(this.options.showMinorLabels&&c){var w=this._repaintMinorText(l,r.getLabelMinor(s),t,f);w.style.width="".concat(v,"px")}u&&this.options.showMajorLabels?(l>0&&(null==g&&(g=l),w=this._repaintMajorText(l,r.getLabelMajor(s),t,f)),m=this._repaintMajorLine(l,v,t,f)):c?m=this._repaintMinorLine(l,v,t,f):m&&(m.style.width="".concat(Om(m.style.width)+v,"px"))}if(y!==b||dk||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(b," lines.")),dk=!0),this.options.showMajorLabels){var k=this.body.util.toTime(0),_=r.getLabelMajor(k),x=_.length*(this.props.majorCharWidth||10)+10;(null==g||x<g)&&this._repaintMajorText(0,_,t,f)}hu(Pb).call(Pb,this.dom.redundant,(function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}}))}},{key:"_repaintMinorText",value:function(t,e,i,n){var o=this.dom.redundant.minorTexts.shift();if(!o){var r=document.createTextNode("");(o=document.createElement("div")).appendChild(r),this.dom.foreground.appendChild(o)}this.dom.minorTexts.push(o),o.innerHTML=Pb.xss(e);var s="top"==i?this.props.majorLabelHeight:0;return this._setXY(o,t,s),o.className="vis-text vis-minor ".concat(n),o}},{key:"_repaintMajorText",value:function(t,e,i,n){var o=this.dom.redundant.majorTexts.shift();if(!o){var r=document.createElement("div");(o=document.createElement("div")).appendChild(r),this.dom.foreground.appendChild(o)}o.childNodes[0].innerHTML=Pb.xss(e),o.className="vis-text vis-major ".concat(n);var s="top"==i?0:this.props.minorLabelHeight;return this._setXY(o,t,s),this.dom.majorTexts.push(o),o}},{key:"_setXY",value:function(t,e,i){var n,o=this.options.rtl?-1*e:e;t.style.transform=Fd(n="translate(".concat(o,"px, ")).call(n,i,"px)")}},{key:"_repaintMinorLine",value:function(t,e,i,n){var o,r=this.dom.redundant.lines.shift();r||(r=document.createElement("div"),this.dom.background.appendChild(r)),this.dom.lines.push(r);var s=this.props;r.style.width="".concat(e,"px"),r.style.height="".concat(s.minorLineHeight,"px");var a="top"==i?s.majorLabelHeight:this.body.domProps.top.height,l=t-s.minorLineWidth/2;return this._setXY(r,l,a),r.className=Fd(o="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-minor ")).call(o,n),r}},{key:"_repaintMajorLine",value:function(t,e,i,n){var o,r=this.dom.redundant.lines.shift();r||(r=document.createElement("div"),this.dom.background.appendChild(r)),this.dom.lines.push(r);var s=this.props;r.style.width="".concat(e,"px"),r.style.height="".concat(s.majorLineHeight,"px");var a="top"==i?0:this.body.domProps.top.height,l=t-s.majorLineWidth/2;return this._setXY(r,l,a),r.className=Fd(o="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-major ")).call(o,n),r}},{key:"_calculateCharSize",value:function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth}}]),i}(Vb),dk=!1;function pk(t){var e,i;this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=ak(this.dom.overlay),this.hammer.on("tap",Gh(e=this._onTapOverlay).call(e,this));var n=this,o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];hu(o).call(o,(function(t){n.hammer.on(t,(function(t){t.stopPropagation()}))})),document&&document.body&&(this.onClick=function(e){(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||n.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=function(t){var e,i=t&&t.preventDefault||!1,n=t&&t.container||window,o={},r={keydown:{},keyup:{}},s={};for(e=97;e<=122;e++)s[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)s[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)s[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)s["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)s["num"+e]={code:96+e,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(t){h(t,"keydown")},l=function(t){h(t,"keyup")},h=function(t,e){if(void 0!==r[e][t.keyCode]){for(var n=r[e][t.keyCode],o=0;o<n.length;o++)(void 0===n[o].shift||1==n[o].shift&&1==t.shiftKey||0==n[o].shift&&0==t.shiftKey)&&n[o].fn(t);1==i&&t.preventDefault()}};return o.bind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===s[t])throw new Error("unsupported key: "+t);void 0===r[i][s[t].code]&&(r[i][s[t].code]=[]),r[i][s[t].code].push({fn:e,shift:s[t].shift})},o.bindAll=function(t,e){for(var i in void 0===e&&(e="keydown"),s)s.hasOwnProperty(i)&&o.bind(i,t,e)},o.getKey=function(t){for(var e in s)if(s.hasOwnProperty(e)){if(1==t.shiftKey&&1==s[e].shift&&t.keyCode==s[e].code)return e;if(0==t.shiftKey&&0==s[e].shift&&t.keyCode==s[e].code)return e;if(t.keyCode==s[e].code&&"shift"==e)return e}return"unknown key, currently not supported"},o.unbind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===s[t])throw new Error("unsupported key: "+t);if(void 0!==e){var n=[],o=r[i][s[t].code];if(void 0!==o)for(var a=0;a<o.length;a++)o[a].fn==e&&o[a].shift==s[t].shift||n.push(r[i][s[t].code][a]);r[i][s[t].code]=n}else r[i][s[t].code]=[]},o.reset=function(){r={keydown:{},keyup:{}}},o.destroy=function(){r={keydown:{},keyup:{}},n.removeEventListener("keydown",a,!0),n.removeEventListener("keyup",l,!0)},n.addEventListener("keydown",a,!0),n.addEventListener("keyup",l,!0),o}(),this.escListener=Gh(i=this.deactivate).call(i,this)}Tf(pk.prototype),pk.current=null,pk.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},pk.prototype.activate=function(){var t;pk.current&&pk.current.deactivate(),pk.current=this,this.active=!0,this.dom.overlay.style.display="none",Pb.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),Gh(t=this.keycharm).call(t,"esc",this.escListener)},pk.prototype.deactivate=function(){pk.current===this&&(pk.current=null),this.active=!1,this.dom.overlay.style.display="",Pb.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},pk.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()};var mk={current:"current",time:"time",deleteSelected:"Delete selected"},fk={current:"attuale",time:"tempo",deleteSelected:"Cancella la selezione"},vk={current:"huidige",time:"tijd",deleteSelected:"Selectie verwijderen"},gk={current:"Aktuelle",time:"Zeit",deleteSelected:"Lösche Auswahl"},yk={current:"actuel",time:"heure",deleteSelected:"Effacer la selection"},bk={current:"corriente",time:"hora",deleteSelected:"Eliminar selección"},wk={current:"поточний",time:"час",deleteSelected:"Видалити обране"},kk={current:"текущее",time:"время",deleteSelected:"Удалить выбранное"},_k={current:"aktualny",time:"czas",deleteSelected:"Usuń wybrane"},xk={current:"atual",time:"data",deleteSelected:"Apagar selecionado"},Ck={current:"現在",time:"時刻",deleteSelected:"選択されたものを削除"},Dk={current:"nuvarande",time:"tid",deleteSelected:"Radera valda"},Sk={current:"nåværende",time:"tid",deleteSelected:"Slett valgte"},Tk={current:"einamas",time:"laikas",deleteSelected:"Pašalinti pasirinktą"},Ek={en:mk,en_EN:mk,en_US:mk,it:fk,it_IT:fk,it_CH:fk,nl:vk,nl_NL:vk,nl_BE:vk,de:gk,de_DE:gk,fr:yk,fr_FR:yk,fr_CA:yk,fr_BE:yk,es:bk,es_ES:bk,uk:wk,uk_UA:wk,ru:kk,ru_RU:kk,pl:_k,pl_PL:_k,pt:xk,pt_BR:xk,pt_PT:xk,ja:Ck,ja_JP:Ck,lt:Tk,lt_LT:Tk,sv:Dk,sv_SE:Dk,nb:Sk,nn:Sk,nb_NO:Sk,nn_NO:Sk};function Ok(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}var Ak=function(t){zo(i,t);var e=Ok(i);function i(t,n){var o,r;bo(this,i),(r=e.call(this)).body=t,r.defaultOptions={moment:uu,locales:Ek,locale:"en",id:void 0,title:void 0},r.options=Pb.extend({},r.defaultOptions),r.setOptions(n),r.options.locales=Pb.extend({},Ek,r.options.locales);var s=r.defaultOptions.locales[r.defaultOptions.locale];return hu(o=mc(r.options.locales)).call(o,(function(t){r.options.locales[t]=Pb.extend({},s,r.options.locales[t])})),n&&null!=n.time?r.customTime=n.time:r.customTime=new Date,r.eventParams={},r._create(),r}return So(i,[{key:"setOptions",value:function(t){t&&Pb.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,t)}},{key:"_create",value:function(){var t,e,i,n=document.createElement("div");n["custom-time"]=this,n.className="vis-custom-time ".concat(this.options.id||""),n.style.position="absolute",n.style.top="0px",n.style.height="100%",this.bar=n;var o=document.createElement("div");function r(t){this.body.range._onMouseWheel(t)}o.style.position="relative",o.style.top="0px",this.options.rtl?o.style.right="-10px":o.style.left="-10px",o.style.height="100%",o.style.width="20px",o.addEventListener?(o.addEventListener("mousewheel",Gh(r).call(r,this),!1),o.addEventListener("DOMMouseScroll",Gh(r).call(r,this),!1)):o.attachEvent("onmousewheel",Gh(r).call(r,this)),n.appendChild(o),this.hammer=new ak(o),this.hammer.on("panstart",Gh(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",Gh(e=this._onDrag).call(e,this)),this.hammer.on("panend",Gh(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:ak.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;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));var e=this.body.util.toScreen(this.customTime),i=this.options.locales[this.options.locale];i||(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),i=this.options.locales.en);var n,o=this.options.title;void 0===o?o=(o=Fd(n="".concat(i.time,": ")).call(n,this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss"))).charAt(0).toUpperCase()+o.substring(1):"function"==typeof o&&(o=o.call(this,this.customTime));return this.options.rtl?this.bar.style.right="".concat(e,"px"):this.bar.style.left="".concat(e,"px"),this.bar.title=o,!1}},{key:"hide",value:function(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}},{key:"setCustomTime",value:function(t){this.customTime=Pb.convert(t,"Date"),this.redraw()}},{key:"getCustomTime",value:function(){return new Date(this.customTime.valueOf())}},{key:"setCustomMarker",value:function(t,e){var i,n,o=document.createElement("div");(o.className="vis-custom-time-marker",o.innerHTML=Pb.xss(t),o.style.position="absolute",e)&&(o.setAttribute("contenteditable","true"),o.addEventListener("pointerdown",(function(){o.focus()})),o.addEventListener("input",Gh(i=this._onMarkerChange).call(i,this)),o.title=t,o.addEventListener("blur",Gh(n=function(t){this.title!=t.target.innerHTML&&(this._onMarkerChanged(t),this.title=t.target.innerHTML)}).call(n,this)));this.bar.appendChild(o)}},{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,i=this.body.util.toScreen(this.eventParams.customTime)+e,n=this.body.util.toTime(i),o=this.body.util.getScale(),r=this.body.util.getStep(),s=this.options.snap,a=s?s(n,o,r):n;this.setCustomTime(a),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation()}}},{key:"_onDragEnd",value:function(t){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}}]),i}(Vb),Ik=function(){function t(){bo(this,t)}return So(t,[{key:"_create",value:function(t){var e,i,n,o=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===o.initialDrawDone&&o._redraw()})),this.on("rangechanged",(function(){o.initialRangeChangeDone||(o.initialRangeChangeDone=!0)})),this.on("touch",Gh(e=this._onTouch).call(e,this)),this.on("panmove",Gh(i=this._onDrag).call(i,this));var r=this;this._origRedraw=Gh(n=this._redraw).call(n,this),this._redraw=Pb.throttle(this._origRedraw),this.on("_change",(function(t){r.itemSet&&r.itemSet.initialItemSetDrawn&&t&&1==t.queue?r._redraw():r._origRedraw()})),this.hammer=new ak(this.dom.root);var s=this.hammer.get("pinch").set({enable:!0});s&&function(t){t.getTouchAction=function(){return["pan-y"]}}(s),this.hammer.get("pan").set({threshold:5,direction:ak.DIRECTION_ALL}),this.timelineListeners={};var a,l,h=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];function u(t){this.isActive()&&this.emit("mousewheel",t);var e=0,i=0;if("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),"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),t.deltaMode&&(1===t.deltaMode?(e*=40,i*=40):(e*=40,i*=800)),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())this._setScrollTop(o)!==n&&(this._redraw(),this.emit("scroll",t),t.preventDefault())}else if(this.options.horizontalScroll){var r=(Math.abs(e)>=Math.abs(i)?e:i)/120*(this.range.end-this.range.start)/20,s=this.range.start+r,a=this.range.end+r,l={animation:!1,byUser:!0,event:t};this.range.setRange(s,a,l),t.preventDefault()}}hu(h).call(h,(function(t){var e=function(e){r.isActive()&&r.emit(t,e)};r.hammer.on(t,e),r.timelineListeners[t]=e})),lk(this.hammer,(function(t){r.emit("touch",t)})),a=this.hammer,(l=function(t){r.emit("release",t)}).inputHandler=function(t){t.isFinal&&l(t)},a.on("hammer.input",l.inputHandler);var c="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";function d(t){if(r.options.verticalScroll&&(t.preventDefault(),r.isActive())){var e=-t.target.scrollTop;r._setScrollTop(e),r._redraw(),r.emit("scrollSide",t)}}this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(c,Gh(u).call(u,this),!1),this.dom.top.addEventListener(c,Gh(u).call(u,this),!1),this.dom.bottom.addEventListener(c,Gh(u).call(u,this),!1),this.dom.left.parentNode.addEventListener("scroll",Gh(d).call(d,this)),this.dom.right.parentNode.addEventListener("scroll",Gh(d).call(d,this));var p=!1;function m(t){var e;if(t.preventDefault&&(r.emit("dragover",r.getEventProperties(t)),t.preventDefault()),zm(e=t.target.className).call(e,"timeline")>-1&&!p)return t.dataTransfer.dropEffect="move",p=!0,!1}function f(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var e=JSON.parse(t.dataTransfer.getData("text"));if(!e||!e.content)return}catch(t){return!1}return p=!1,t.center={x:t.clientX,y:t.clientY},"item"!==e.target?r.itemSet._onAddItem(t):r.itemSet._onDropObjectOnItem(t),r.emit("drop",r.getEventProperties(t)),!1}if(this.dom.center.addEventListener("dragover",Gh(m).call(m,this),!1),this.dom.center.addEventListener("drop",Gh(f).call(f,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root),t.appendChild(this.dom.loadingScreen)}},{key:"setOptions",value:function(t){var e;if(t){if(Pb.selectiveExtend(["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","verticalScroll","longSelectPressTime","snap"],this.options,t),this.dom.rollingModeBtn.style.visibility="hidden",this.options.rtl&&(this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll"),"object"!==Sh(this.options.orientation)&&(this.options.orientation={item:void 0,axis:void 0}),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"===Sh(t.orientation)&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var i=this.timeAxis2=new ck(this.body);i.setOptions=function(t){var e=t?Pb.extend({},t):{};e.orientation="top",ck.prototype.setOptions.call(i,e)},this.components.push(i)}}else if(this.timeAxis2){var n,o,r=zm(n=this.components).call(n,this.timeAxis2);if(-1!==r)vp(o=this.components).call(o,r,1);this.timeAxis2.destroy(),this.timeAxis2=null}"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&Fw(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new pk(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(hu(e=this.components).call(e,(function(e){return e.setOptions(t)})),"configure"in t){var s;this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var a=Pb.deepExtend({},this.options);hu(s=this.components).call(s,(function(t){Pb.deepExtend(a,t.options)})),this.configurator.setModuleOptions({global:a})}this._redraw()}},{key:"isActive",value:function(){return!this.activator||this.activator.active}},{key:"destroy",value:function(){var t;for(var e in this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator),this.timelineListeners)this.timelineListeners.hasOwnProperty(e)&&delete this.timelineListeners[e];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,hu(t=this.components).call(t,(function(t){return t.destroy()})),this.body=null}},{key:"setCustomTime",value:function(t,e){var i,n=gu(i=this.customTimes).call(i,(function(t){return e===t.options.id}));if(0===n.length)throw new Error("No custom time bar found with id ".concat(gf(e)));n.length>0&&n[0].setCustomTime(t)}},{key:"getCustomTime",value:function(t){var e,i=gu(e=this.customTimes).call(e,(function(e){return e.options.id===t}));if(0===i.length)throw new Error("No custom time bar found with id ".concat(gf(t)));return i[0].getCustomTime()}},{key:"setCustomTimeMarker",value:function(t,e,i){var n,o=gu(n=this.customTimes).call(n,(function(t){return t.options.id===e}));if(0===o.length)throw new Error("No custom time bar found with id ".concat(gf(e)));o.length>0&&o[0].setCustomMarker(t,i)}},{key:"setCustomTimeTitle",value:function(t,e){var i,n=gu(i=this.customTimes).call(i,(function(t){return t.options.id===e}));if(0===n.length)throw new Error("No custom time bar found with id ".concat(gf(e)));if(n.length>0)return n[0].setCustomTitle(t)}},{key:"getEventProperties",value:function(t){return{event:t}}},{key:"addCustomTime",value:function(t,e){var i,n=void 0!==t?Pb.convert(t,"Date"):new Date;if(ok(i=this.customTimes).call(i,(function(t){return t.options.id===e})))throw new Error("A custom time with id ".concat(gf(e)," already exists"));var o=new Ak(this.body,Pb.extend({},this.options,{time:n,id:e,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(o),this.components.push(o),this._redraw(),e}},{key:"removeCustomTime",value:function(t){var e,i=this,n=gu(e=this.customTimes).call(e,(function(e){return e.options.id===t}));if(0===n.length)throw new Error("No custom time bar found with id ".concat(gf(t)));hu(n).call(n,(function(t){var e,n,o,r;vp(e=i.customTimes).call(e,zm(n=i.customTimes).call(n,t),1),vp(o=i.components).call(o,zm(r=i.components).call(r,t),1),t.destroy()}))}},{key:"getVisibleItems",value:function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}},{key:"getItemsAtCurrentTime",value:function(t){return this.time=t,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}},{key:"getVisibleGroups",value:function(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}},{key:"fit",value:function(t,e){var i=this.getDataRange();if(null!==i.min||null!==i.max){var n=i.max-i.min,o=new Date(i.min.valueOf()-.01*n),r=new Date(i.max.valueOf()+.01*n),s=!t||void 0===t.animation||t.animation;this.range.setRange(o,r,{animation:s},e)}}},{key:"getDataRange",value:function(){throw new Error("Cannot invoke abstract method getDataRange")}},{key:"setWindow",value:function(t,e,i,n){var o,r;"function"==typeof arguments[2]&&(n=arguments[2],i={}),1==arguments.length?(o=void 0===(r=arguments[0]).animation||r.animation,this.range.setRange(r.start,r.end,{animation:o})):2==arguments.length&&"function"==typeof arguments[1]?(n=arguments[1],o=void 0===(r=arguments[0]).animation||r.animation,this.range.setRange(r.start,r.end,{animation:o},n)):(o=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:o},n))}},{key:"moveTo",value:function(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});var n=this.range.end-this.range.start,o=Pb.convert(t,"Date").valueOf(),r=o-n/2,s=o+n/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(r,s,{animation:a},i)}},{key:"getWindow",value:function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}}},{key:"zoomIn",value:function(t,e,i){if(!(!t||t<0||t>1)){"function"==typeof arguments[1]&&(i=arguments[1],e={});var n=this.getWindow(),o=n.start.valueOf(),r=n.end.valueOf(),s=r-o,a=s/(1+t),l=(s-a)/2,h=o+l,u=r-l;this.setWindow(h,u,e,i)}}},{key:"zoomOut",value:function(t,e,i){if(!(!t||t<0||t>1)){"function"==typeof arguments[1]&&(i=arguments[1],e={});var n=this.getWindow(),o=n.start.valueOf(),r=n.end.valueOf(),s=r-o,a=o-s*t/2,l=r+s*t/2;this.setWindow(a,l,e,i)}}},{key:"redraw",value:function(){this._redraw()}},{key:"_redraw",value:function(){var t;this.redrawCount++;var e=this.dom;if(e&&e.container&&0!=e.root.offsetWidth){var i=!1,n=this.options,o=this.props;Rw(this.options.moment,this.body,this.options.hiddenDates),"top"==n.orientation?(Pb.addClassName(e.root,"vis-top"),Pb.removeClassName(e.root,"vis-bottom")):(Pb.removeClassName(e.root,"vis-top"),Pb.addClassName(e.root,"vis-bottom")),n.rtl?(Pb.addClassName(e.root,"vis-rtl"),Pb.removeClassName(e.root,"vis-ltr")):(Pb.addClassName(e.root,"vis-ltr"),Pb.removeClassName(e.root,"vis-rtl")),e.root.style.maxHeight=Pb.option.asSize(n.maxHeight,""),e.root.style.minHeight=Pb.option.asSize(n.minHeight,""),e.root.style.width=Pb.option.asSize(n.width,"");var r=e.root.offsetWidth;o.border.left=1,o.border.right=1,o.border.top=1,o.border.bottom=1,o.center.height=e.center.offsetHeight,o.left.height=e.left.offsetHeight,o.right.height=e.right.offsetHeight,o.top.height=e.top.clientHeight||-o.border.top,o.bottom.height=Math.round(e.bottom.getBoundingClientRect().height)||e.bottom.clientHeight||-o.border.bottom;var s=Math.max(o.left.height,o.center.height,o.right.height),a=o.top.height+s+o.bottom.height+o.border.top+o.border.bottom;e.root.style.height=Pb.option.asSize(n.height,"".concat(a,"px")),o.root.height=e.root.offsetHeight,o.background.height=o.root.height;var l=o.root.height-o.top.height-o.bottom.height;o.centerContainer.height=l,o.leftContainer.height=l,o.rightContainer.height=o.leftContainer.height,o.root.width=r,o.background.width=o.root.width,this.initialDrawDone||(o.scrollbarWidth=Pb.getScrollBarWidth());var h=e.leftContainer.clientWidth,u=e.rightContainer.clientWidth;n.verticalScroll?n.rtl?(o.left.width=h||-o.border.left,o.right.width=u+o.scrollbarWidth||-o.border.right):(o.left.width=h+o.scrollbarWidth||-o.border.left,o.right.width=u||-o.border.right):(o.left.width=h||-o.border.left,o.right.width=u||-o.border.right),this._setDOM();var c=this._updateScrollTop();"top"!=n.orientation.item&&(c+=Math.max(o.centerContainer.height-o.center.height-o.border.top-o.border.bottom,0)),e.center.style.transform="translateY(".concat(c,"px)");var d=0==o.scrollTop?"hidden":"",p=o.scrollTop==o.scrollTopMin?"hidden":"";e.shadowTop.style.visibility=d,e.shadowBottom.style.visibility=p,e.shadowTopLeft.style.visibility=d,e.shadowBottomLeft.style.visibility=p,e.shadowTopRight.style.visibility=d,e.shadowBottomRight.style.visibility=p,n.verticalScroll&&(e.rightContainer.className="vis-panel vis-right vis-vertical-scroll",e.leftContainer.className="vis-panel vis-left vis-vertical-scroll",e.shadowTopRight.style.visibility="hidden",e.shadowBottomRight.style.visibility="hidden",e.shadowTopLeft.style.visibility="hidden",e.shadowBottomLeft.style.visibility="hidden",e.left.style.top="0px",e.right.style.top="0px"),(!n.verticalScroll||o.center.height<o.centerContainer.height)&&(e.left.style.top="".concat(c,"px"),e.right.style.top="".concat(c,"px"),e.rightContainer.className=e.rightContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),e.leftContainer.className=e.leftContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),o.left.width=h||-o.border.left,o.right.width=u||-o.border.right,this._setDOM());var m=o.center.height>o.centerContainer.height;this.hammer.get("pan").set({direction:m?ak.DIRECTION_ALL:ak.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),hu(t=this.components).call(t,(function(t){i=t.redraw()||i}));if(i){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)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()}},{key:"_toTime",value:function(t){return zw(this,t,this.props.center.width)}},{key:"_toGlobalTime",value:function(t){return zw(this,t,this.props.root.width)}},{key:"_toScreen",value:function(t){return Bw(this,t,this.props.center.width)}},{key:"_toGlobalScreen",value:function(t){return Bw(this,t,this.props.root.width)}},{key:"_initAutoResize",value:function(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()}},{key:"_startAutoResize",value:function(){var t=this;this._stopAutoResize(),this._onResize=function(){if(1==t.options.autoResize){if(t.dom.root){var e=t.dom.root.offsetHeight,i=t.dom.root.offsetWidth;i==t.props.lastWidth&&e==t.props.lastHeight||(t.props.lastWidth=i,t.props.lastHeight=e,t.props.scrollbarWidth=Pb.getScrollBarWidth(),t.body.emitter.emit("_change"))}}else t._stopAutoResize()},Pb.addEventListener(window,"resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=rk(this._onResize,1e3)}},{key:"_stopAutoResize",value:function(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(Pb.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(),n=this._setScrollTop(this.touch.initialScrollTop+e);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),n!=i&&this.emit("verticalDrag")}}},{key:"_setScrollTop",value:function(t){return this.props.scrollTop=t,this._updateScrollTop(),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);return t!=this.props.scrollTopMin&&("top"!=this.options.orientation.item&&(this.props.scrollTop+=t-this.props.scrollTopMin),this.props.scrollTopMin=t),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop<t&&(this.props.scrollTop=t),this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),this.props.scrollTop}},{key:"_getScrollTop",value:function(){return this.props.scrollTop}},{key:"_createConfigurator",value:function(){throw new Error("Cannot invoke abstract method _createConfigurator")}}]),t}();function Pk(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}Tf(Ik.prototype);var Mk=function(t){zo(i,t);var e=Pk(i);function i(t,n){var o,r;bo(this,i),(r=e.call(this)).body=t,r.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:uu,locales:Ek,locale:"en"},r.options=Pb.extend({},r.defaultOptions),r.setOptions(n),r.options.locales=Pb.extend({},Ek,r.options.locales);var s=r.defaultOptions.locales[r.defaultOptions.locale];return hu(o=mc(r.options.locales)).call(o,(function(t){r.options.locales[t]=Pb.extend({},s,r.options.locales[t])})),r.offset=0,r._create(),r}return So(i,[{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&&Pb.selectiveExtend(["rtl","showCurrentTime","alignCurrentTime","moment","locale","locales"],this.options,t)}},{key:"redraw",value:function(){if(this.options.showCurrentTime){var t,e,i=this.body.dom.backgroundVertical;this.bar.parentNode!=i&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),i.appendChild(this.bar),this.start());var n=this.options.moment(Gd()+this.offset);this.options.alignCurrentTime&&(n=n.startOf(this.options.alignCurrentTime));var o=this.body.util.toScreen(n),r=this.options.locales[this.options.locale];r||(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),r=this.options.locales.en);var s=Fd(t=Fd(e="".concat(r.current," ")).call(e,r.time,": ")).call(t,n.format("dddd, MMMM Do YYYY, H:mm:ss"));s=s.charAt(0).toUpperCase()+s.substring(1),this.options.rtl?this.bar.style.transform="translateX(".concat(-1*o,"px)"):this.bar.style.transform="translateX(".concat(o,"px)"),this.bar.title=s}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}},{key:"start",value:function(){var t=this;!function e(){t.stop();var i=1/t.body.range.conversion(t.body.domProps.center.width).scale/10;i<30&&(i=30),i>1e3&&(i=1e3),t.redraw(),t.body.emitter.emit("currentTimeTick"),t.currentTimeTimer=Zh(e,i)}()}},{key:"stop",value:function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}},{key:"setCurrentTime",value:function(t){var e=Pb.convert(t,"Date").valueOf(),i=Gd();this.offset=e-i,this.redraw()}},{key:"getCurrentTime",value:function(){return new Date(Gd()+this.offset)}}]),i}(Vb),Nk=gi,Fk=Is.find,Rk="find",Lk=!0;Rk in[]&&Array(1).find((function(){Lk=!1})),Nk({target:"Array",proto:!0,forced:Lk},{find:function(t){return Fk(this,t,arguments.length>1?arguments[1]:void 0)}});var jk=Lh("Array").find,Bk=et,zk=jk,Hk=Array.prototype,Gk=function(t){var e=t.find;return t===Hk||Bk(Hk,t)&&e===Hk.find?zk:e},Vk={exports:{}},Wk=k((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Yk=k,Uk=q,Xk=F,qk=Wk,Kk=Object.isExtensible,$k=Yk((function(){Kk(1)}))||qk?function(t){return!!Uk(t)&&((!qk||"ArrayBuffer"!=Xk(t))&&(!Kk||Kk(t)))}:Kk,Zk=!k((function(){return Object.isExtensible(Object.preventExtensions({}))})),Qk=gi,Jk=y,t_=Cn,e_=q,i_=Wt,n_=Ye.f,o_=Sr,r_=Or,s_=$k,a_=Zk,l_=!1,h_=Kt("meta"),u_=0,c_=function(t){n_(t,h_,{value:{objectID:"O"+u_++,weakData:{}}})},d_=Vk.exports={enable:function(){d_.enable=function(){},l_=!0;var t=o_.f,e=Jk([].splice),i={};i[h_]=1,t(i).length&&(o_.f=function(i){for(var n=t(i),o=0,r=n.length;o<r;o++)if(n[o]===h_){e(n,o,1);break}return n},Qk({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:r_.f}))},fastKey:function(t,e){if(!e_(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i_(t,h_)){if(!s_(t))return"F";if(!e)return"E";c_(t)}return t[h_].objectID},getWeakData:function(t,e){if(!i_(t,h_)){if(!s_(t))return!0;if(!e)return!1;c_(t)}return t[h_].weakData},onFreeze:function(t){return a_&&l_&&s_(t)&&!i_(t,h_)&&c_(t),t}};t_[h_]=!0;var p_=We,m_=C,f_=$e,v_=kt,g_=Dc,y_=yn,b_=et,w_=Lc,k_=Ac,__=bc,x_=l.TypeError,C_=function(t,e){this.stopped=t,this.result=e},D_=C_.prototype,S_=function(t,e,i){var n,o,r,s,a,l,h,u=i&&i.that,c=!(!i||!i.AS_ENTRIES),d=!(!i||!i.IS_ITERATOR),p=!(!i||!i.INTERRUPTED),m=p_(e,u),f=function(t){return n&&__(n,"normal",t),new C_(!0,t)},v=function(t){return c?(f_(t),p?m(t[0],t[1],f):m(t[0],t[1])):p?m(t,f):m(t)};if(d)n=t;else{if(!(o=k_(t)))throw x_(v_(t)+" is not iterable");if(g_(o)){for(r=0,s=y_(t);s>r;r++)if((a=v(t[r]))&&b_(D_,a))return a;return new C_(!1)}n=w_(t,o)}for(l=n.next;!(h=m_(l,n)).done;){try{a=v(h.value)}catch(t){__(n,"throw",t)}if("object"==typeof a&&a&&b_(D_,a))return a}return new C_(!1)},T_=et,E_=l.TypeError,O_=function(t,e){if(T_(e,t))return t;throw E_("Incorrect invocation")},A_=gi,I_=l,P_=Vk.exports,M_=k,N_=ri,F_=S_,R_=O_,L_=b,j_=q,B_=is,z_=Ye.f,H_=Is.forEach,G_=_,V_=xs.set,W_=xs.getterFor,Y_=Lr,U_=tt,X_=Ye,q_=_,K_=se("species"),$_=Ye.f,Z_=io,Q_=function(t,e,i){for(var n in e)i&&i.unsafe&&t[n]?t[n]=e[n]:Y_(t,n,e[n],i);return t},J_=We,tx=O_,ex=S_,ix=Yl,nx=function(t){var e=U_(t),i=X_.f;q_&&e&&!e[K_]&&i(e,K_,{configurable:!0,get:function(){return this}})},ox=_,rx=Vk.exports.fastKey,sx=xs.set,ax=xs.getterFor;(function(t,e,i){var n,o=-1!==t.indexOf("Map"),r=-1!==t.indexOf("Weak"),s=o?"set":"add",a=I_[t],l=a&&a.prototype,h={};if(G_&&L_(a)&&(r||l.forEach&&!M_((function(){(new a).entries().next()})))){var u=(n=e((function(e,i){V_(R_(e,u),{type:t,collection:new a}),null!=i&&F_(i,e[s],{that:e,AS_ENTRIES:o})}))).prototype,c=W_(t);H_(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in l)||r&&"clear"==t||N_(u,t,(function(i,n){var o=c(this).collection;if(!e&&r&&!j_(i))return"get"==t&&void 0;var s=o[t](0===i?0:i,n);return e?this:s}))})),r||z_(u,"size",{configurable:!0,get:function(){return c(this).collection.size}})}else n=i.getConstructor(e,t,o,s),P_.enable();B_(n,t,!1,!0),h[t]=n,A_({global:!0,forced:!0},h),r||i.setStrong(n,t,o)})("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(t,e,i,n){var o=t((function(t,o){tx(t,r),sx(t,{type:e,index:Z_(null),first:void 0,last:void 0,size:0}),ox||(t.size=0),null!=o&&ex(o,t[n],{that:t,AS_ENTRIES:i})})),r=o.prototype,s=ax(e),a=function(t,e,i){var n,o,r=s(t),a=l(t,e);return a?a.value=i:(r.last=a={index:o=rx(e,!0),key:e,value:i,previous:n=r.last,next:void 0,removed:!1},r.first||(r.first=a),n&&(n.next=a),ox?r.size++:t.size++,"F"!==o&&(r.index[o]=a)),t},l=function(t,e){var i,n=s(t),o=rx(e);if("F"!==o)return n.index[o];for(i=n.first;i;i=i.next)if(i.key==e)return i};return Q_(r,{clear:function(){for(var t=s(this),e=t.index,i=t.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=void 0),delete e[i.index],i=i.next;t.first=t.last=void 0,ox?t.size=0:this.size=0},delete:function(t){var e=this,i=s(e),n=l(e,t);if(n){var o=n.next,r=n.previous;delete i.index[n.index],n.removed=!0,r&&(r.next=o),o&&(o.previous=r),i.first==n&&(i.first=o),i.last==n&&(i.last=r),ox?i.size--:e.size--}return!!n},forEach:function(t){for(var e,i=s(this),n=J_(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:i.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!l(this,t)}}),Q_(r,i?{get:function(t){var e=l(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),ox&&$_(r,"size",{get:function(){return s(this).size}}),o},setStrong:function(t,e,i){var n=e+" Iterator",o=ax(e),r=ax(n);ix(t,e,(function(t,e){sx(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=r(this),e=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?"keys"==e?{value:i.key,done:!1}:"values"==e?{value:i.value,done:!1}:{value:[i.key,i.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),i?"entries":"values",!i,!0),nx(e)}});var lx=K.Set,hx=gi,ux=Is.findIndex,cx="findIndex",dx=!0;cx in[]&&Array(1).findIndex((function(){dx=!1})),hx({target:"Array",proto:!0,forced:dx},{findIndex:function(t){return ux(this,t,arguments.length>1?arguments[1]:void 0)}});var px=Lh("Array").findIndex,mx=et,fx=px,vx=Array.prototype,gx=function(t){var e=t.findIndex;return t===vx||mx(vx,t)&&e===vx.findIndex?fx:e};function yx(t,e){var i=void 0!==Ad&&id(t)||t["@@iterator"];if(!i){if(Fh(t)||(i=function(t,e){var i;if(!t)return;if("string"==typeof t)return bx(t,e);var n=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return ed(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bx(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function bx(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var wx=.001;function kx(t){Nw(t).call(t,(function(t,e){return t.data.start-e.data.start}))}function _x(t){Nw(t).call(t,(function(t,e){return("end"in t.data?t.data.end:t.data.start)-("end"in e.data?e.data.end:e.data.start)}))}function xx(t,e,i,n){return null===Ex(t,e.item,!1,(function(t){return t.stack&&(i||null===t.top)}),(function(t){return t.stack}),(function(t){return e.axis}),n)}function Cx(t,e,i){var n=Ex(t,e.item,!1,(function(t){return t.stack}),(function(t){return!0}),(function(t){return t.baseTop}));i.height=n-i.top+.5*e.item.vertical}function Dx(t,e,i,n){for(var o=0;o<t.length;o++)if(null==t[o].data.subgroup)t[o].top=e.item.vertical;else if(void 0!==t[o].data.subgroup&&n){var r=0;for(var s in i)i.hasOwnProperty(s)&&1==i[s].visible&&i[s].index<i[t[o].data.subgroup].index&&(r+=i[s].height,i[t[o].data.subgroup].top=r);t[o].top=r+.5*e.item.vertical}n||Sx(t,e,i)}function Sx(t,e,i){var n;Ex(Nw(n=am(i)).call(n,(function(t,e){return t.index>e.index?1:t.index<e.index?-1:0})),{vertical:0},!0,(function(t){return!0}),(function(t){return!0}),(function(t){return 0}));for(var o=0;o<t.length;o++)void 0!==t[o].data.subgroup&&(t[o].top=i[t[o].data.subgroup].top+.5*e.item.vertical)}function Tx(t,e,i){var n=!1,o=[];for(var r in i)i[r].hasOwnProperty("index")?o[i[r].index]=r:o.push(r);for(var s=0;s<o.length;s++)if(r=o[s],i.hasOwnProperty(r)){for(var a in n=n||i[r].stack,i[r].top=0,i)i[a].visible&&i[r].index>i[a].index&&(i[r].top+=i[a].height);for(var l=t[r],h=0;h<l.length;h++)void 0!==l[h].data.subgroup&&(l[h].top=i[l[h].data.subgroup].top+.5*e.item.vertical,i[r].stack&&(l[h].baseTop=l[h].top));n&&i[r].stack&&Cx(t[r],e,i[r])}}function Ex(t,e,n,o,r,s,a){var l=function(t){return t.start},h=function(t){return t.end};if(!n){var u=!(!t[0]||!t[0].options.rtl);l=u?function(t){return t.right}:function(t){return t.left},h=function(t){return l(t)+t.width+e.horizontal}}var c,d=[],p=[],m=null,f=0,v=yx(t);try{for(v.s();!(c=v.n()).done;){var g=c.value;o(g)?d.push(g):r(g)&&function(){var t=l(g);null!==m&&t<m-wx&&(f=0),m=t,f=Ox(p,(function(e){return l(e)-wx>t}),f),vp(p).call(p,f,0,g),f++}()}}catch(t){v.e(t)}finally{v.f()}m=null;var y=null;f=0;for(var b=0,w=0,k=0,_=function(){var t,n,o=d.shift();o.top=s(o);var u=l(o),c=h(o);null!==m&&u<m-wx&&(b=0,w=0,f=0,y=null),m=u,b=Ox(p,(function(t){return u<h(t)-wx}),b),(null===y||y<c-wx)&&(w=Ox(p,(function(t){return c<l(t)-wx}),Math.max(b,w))),null!==y&&y-wx>c&&(w=function(t,e,n,o){n||(n=0);o||(o=t.length);for(i=o-1;i>=n;i--)if(e(t[i]))return i;return n-1}(p,(function(t){return c+wx>=l(t)}),b,horizontalOVerlapEndIndex)+1);for(var v,g,_,x=Nw(t=gu(n=Rd(p).call(p,b,w)).call(n,(function(t){return u<h(t)-wx&&c-wx>l(t)}))).call(t,(function(t,e){return t.top-e.top})),C=0;C<x.length;C++){var D=x[C];g=D,_=e,(v=o).top-_.vertical+wx<g.top+g.height&&v.top+v.height+_.vertical-wx>g.top&&(o.top=D.top+D.height+e.vertical)}r(o)&&(f=Ox(p,(function(t){return l(t)-wx>u}),f),vp(p).call(p,f,0,o),f++);var S=o.top+o.height;if(S>k&&(k=S),a&&a())return{v:null}};d.length>0;){var x=_();if("object"===Sh(x))return x.v}return k}function Ox(t,e,i){var n;i||(i=0);var o=gx(n=Rd(t).call(t,i)).call(n,e);return-1===o?t.length:o+i}var Ax=Object.freeze({__proto__:null,orderByStart:kx,orderByEnd:_x,stack:xx,substack:Cx,nostack:Dx,stackSubgroups:Sx,stackSubgroupsWithInnerStack:Tx}),Ix="__background__",Px=function(){function t(e,i,n){var o=this;if(bo(this,t),this.groupId=e,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=i&&i.subgroupOrder,this.itemSet=n,this.isVisible=null,this.stackDirty=!0,this._disposeCallbacks=[],i&&i.nestedGroups&&(this.nestedGroups=i.nestedGroups,0==i.showNested?this.showNested=!1:this.showNested=!0),i&&i.subgroupStack)if("boolean"==typeof i.subgroupStack)this.doInnerStack=i.subgroupStack,this.subgroupStackAll=i.subgroupStack;else for(var r in i.subgroupStack)this.subgroupStack[r]=i.subgroupStack[r],this.doInnerStack=this.doInnerStack||i.subgroupStack[r];i&&i.heightMode?this.heightMode=i.heightMode:this.heightMode=n.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;var s=function(){o.checkRangedItems=!0};this.itemSet.body.emitter.on("checkRangedItems",s),this._disposeCallbacks.push((function(){o.itemSet.body.emitter.off("checkRangedItems",s)})),this._create(),this.setData(i)}return So(t,[{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;var i=document.createElement("div");i.className="vis-group",i["vis-group"]=this,this.dom.foreground=i,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,i,n;if(t&&t.subgroupVisibility)for(var o in t.subgroupVisibility)this.subgroupVisibility[o]=t.subgroupVisibility[o];if(this.itemSet.options&&this.itemSet.options.groupTemplate)e=(i=Gh(n=this.itemSet.options.groupTemplate).call(n,this))(t,this.dom.inner);else e=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?i(t,this.dom.inner):this.dom.inner.innerHTML=null!=e?Pb.xss(e):Pb.xss(this.groupId||""));this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?Pb.removeClassName(this.dom.inner,"vis-hidden"):Pb.addClassName(this.dom.inner,"vis-hidden"),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),Pb.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(Pb.removeClassName(this.dom.label,"collapsed"),Pb.addClassName(this.dom.label,"expanded")):(Pb.removeClassName(this.dom.label,"expanded"),Pb.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,Pb.removeClassName(this.dom.label,"collapsed"),Pb.removeClassName(this.dom.label,"expanded"),Pb.removeClassName(this.dom.label,"vis-nesting-group")),t&&(t.treeLevel||t.nestedInGroup)?(Pb.addClassName(this.dom.label,"vis-nested-group"),t.treeLevel?Pb.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):Pb.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):Pb.addClassName(this.dom.label,"vis-group-level-0");var r=t&&t.className||null;r!=this.className&&(this.className&&(Pb.removeClassName(this.dom.label,this.className),Pb.removeClassName(this.dom.foreground,this.className),Pb.removeClassName(this.dom.background,this.className),Pb.removeClassName(this.dom.axis,this.className)),Pb.addClassName(this.dom.label,r),Pb.addClassName(this.dom.foreground,r),Pb.addClassName(this.dom.background,r),Pb.addClassName(this.dom.axis,r),this.className=r),this.style&&(Pb.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(Pb.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){this.lastMarkerHeight=t;var e={},i=0;if(hu(Pb).call(Pb,this.items,(function(t,n){if(t.dirty=!0,t.displayed){e[n]=t.redraw(!0),i=e[n].length}})),i>0)for(var n=function(t){hu(Pb).call(Pb,e,(function(e){e[t]()}))},o=0;o<i;o++)n(o);return!0}return!1}},{key:"_calculateGroupSizeAndPosition",value:function(){var t=this.dom.foreground,e=t.offsetTop,i=t.offsetLeft,n=t.offsetWidth;this.top=e,this.right=i,this.width=n}},{key:"_shouldBailItemsRedraw",value:function(){var t=this,e=this.itemSet.options.onTimeout,i={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:e&&e.timeoutMs,userBailFunction:e&&e.callback,shouldBailStackItems:this.shouldBailStackItems},n=null;if(!this.itemSet.initialDrawDone){if(i.shouldBailStackItems)return!0;Math.abs(Gd()-new Date(i.relativeBailingTime))>i.bailTimeMs&&(i.userBailFunction&&null==this.itemSet.userContinueNotBail?i.userBailFunction((function(e){t.itemSet.userContinueNotBail=e,n=!e})):n=0==t.itemSet.userContinueNotBail)}return n}},{key:"_redrawItems",value:function(t,e,i,n){var o=this;if(t||this.stackDirty||this.isVisible&&!e){var r,s,a,l,h,u,c={byEnd:gu(r=this.orderedItems.byEnd).call(r,(function(t){return!t.isCluster})),byStart:gu(s=this.orderedItems.byStart).call(s,(function(t){return!t.isCluster}))},d={byEnd:Od(new lx(gu(a=Ku(l=this.orderedItems.byEnd).call(l,(function(t){return t.cluster}))).call(a,(function(t){return!!t})))),byStart:Od(new lx(gu(h=Ku(u=this.orderedItems.byStart).call(u,(function(t){return t.cluster}))).call(h,(function(t){return!!t}))))},p=function(){var t,e,i,r=o._updateItemsInRange(c,gu(t=o.visibleItems).call(t,(function(t){return!t.isCluster})),n),s=o._updateClustersInRange(d,gu(e=o.visibleItems).call(e,(function(t){return t.isCluster})),n);return Fd(i=[]).call(i,Od(r),Od(s))},m=function(t){var e={},i=function(i){var n,r=gu(n=o.visibleItems).call(n,(function(t){return t.data.subgroup===i}));e[i]=t?Nw(r).call(r,(function(e,i){return t(e.data,i.data)})):r};for(var n in o.subgroups)i(n);return e};if("function"==typeof this.itemSet.options.order){var f=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){Tx(m(this.itemSet.options.order),i,this.subgroups),this.visibleItems=p(),this._updateSubGroupHeights(i)}else{var v,g,y,b;this.visibleItems=p(),this._updateSubGroupHeights(i);var w=Nw(v=gu(g=Rd(y=this.visibleItems).call(y)).call(g,(function(t){return t.isCluster||!t.isCluster&&!t.cluster}))).call(v,(function(t,e){return f.itemSet.options.order(t.data,e.data)}));this.shouldBailStackItems=xx(w,i,!0,Gh(b=this._shouldBailItemsRedraw).call(b,this))}}else{var k;if(this.visibleItems=p(),this._updateSubGroupHeights(i),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups)Tx(m(),i,this.subgroups);else this.shouldBailStackItems=xx(this.visibleItems,i,!0,Gh(k=this._shouldBailItemsRedraw).call(k,this));else Dx(this.visibleItems,i,this.subgroups,this.itemSet.options.stackSubgroups)}for(var _=0;_<this.visibleItems.length;_++)this.visibleItems[_].repositionX(),void 0!==this.subgroupVisibility[this.visibleItems[_].data.subgroup]&&(this.subgroupVisibility[this.visibleItems[_].data.subgroup]||this.visibleItems[_].hide());this.itemSet.options.cluster&&hu(Pb).call(Pb,this.items,(function(t){t.cluster&&t.displayed&&t.hide()})),this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline"),this.stackDirty=!1}}},{key:"_didResize",value:function(t,e){t=Pb.updateProperty(this,"height",e)||t;var i=this.dom.inner.clientWidth,n=this.dom.inner.clientHeight;return t=Pb.updateProperty(this.props.label,"width",i)||t,t=Pb.updateProperty(this.props.label,"height",n)||t}},{key:"_applyGroupHeight",value:function(t){this.dom.background.style.height="".concat(t,"px"),this.dom.foreground.style.height="".concat(t,"px"),this.dom.label.style.height="".concat(t,"px")}},{key:"_updateItemsVerticalPosition",value:function(t){for(var e=0,i=this.visibleItems.length;e<i;e++){var n=this.visibleItems[e];n.repositionY(t),this.isVisible||this.groupId==Ix||n.displayed&&n.hide()}}},{key:"redraw",value:function(t,e,i,n){var o,r,s,a,l,h,u,c=this,d=!1,p=this.isVisible,m=[function(){i=c._didMarkerHeightChange.call(c)||i},Gh(o=this._updateSubGroupHeights).call(o,this,e),Gh(r=this._calculateGroupSizeAndPosition).call(r,this),function(){var i;c.isVisible=Gh(i=c._isGroupVisible).call(i,c)(t,e)},function(){var n;Gh(n=c._redrawItems).call(n,c)(i,p,e,t)},Gh(s=this._updateSubgroupsSizes).call(s,this),function(){var t;h=Gh(t=c._calculateHeight).call(t,c)(e)},Gh(a=this._calculateGroupSizeAndPosition).call(a,this),function(){var t;d=Gh(t=c._didResize).call(t,c)(d,h)},function(){var t;Gh(t=c._applyGroupHeight).call(t,c)(h)},function(){var t;Gh(t=c._updateItemsVerticalPosition).call(t,c)(e)},Gh(l=function(){return!c.isVisible&&c.height&&(d=!1),d}).call(l,this)];return n?m:(hu(m).call(m,(function(t){u=t()})),u)}},{key:"_updateSubGroupHeights",value:function(t){var e=this;if(mc(this.subgroups).length>0){var i=this;this._resetSubgroups(),hu(Pb).call(Pb,this.visibleItems,(function(n){void 0!==n.data.subgroup&&(i.subgroups[n.data.subgroup].height=Math.max(i.subgroups[n.data.subgroup].height,n.height+t.item.vertical),i.subgroups[n.data.subgroup].visible=void 0===e.subgroupVisibility[n.data.subgroup]||Boolean(e.subgroupVisibility[n.data.subgroup]))}))}}},{key:"_isGroupVisible",value:function(t,e){return this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop}},{key:"_calculateHeight",value:function(t){var e,i;if((i="fixed"===this.heightMode?Pb.toArray(this.items):this.visibleItems).length>0){var n=i[0].top,o=i[0].top+i[0].height;if(hu(Pb).call(Pb,i,(function(t){n=Math.min(n,t.top),o=Math.max(o,t.top+t.height)})),n>t.axis){var r=n-t.axis;o-=r,hu(Pb).call(Pb,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.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var n=this.dom.axis;n.parentNode&&n.parentNode.removeChild(n)}},{key:"add",value:function(t){var e;if(this.items[t.id]=t,t.setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),!Zp(e=this.visibleItems).call(e,t)){var i=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,i)}}},{key:"_addToSubgroup",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;null!=e&&void 0===this.subgroups[e]&&(this.subgroups[e]={height:0,top:0,start:t.data.start,end:t.data.end||t.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[e]||!1},this.subgroupIndex++),new Date(t.data.start)<new Date(this.subgroups[e].start)&&(this.subgroups[e].start=t.data.start);var i=t.data.end||t.data.start;new Date(i)>new Date(this.subgroups[e].end)&&(this.subgroups[e].end=i),this.subgroups[e].items.push(t)}},{key:"_updateSubgroupsSizes",value:function(){var t=this;if(t.subgroups){var e=function(e){var i,n=t.subgroups[e].items[0].data.end||t.subgroups[e].items[0].data.start,o=t.subgroups[e].items[0].data.start,r=n-1;hu(i=t.subgroups[e].items).call(i,(function(t){new Date(t.data.start)<new Date(o)&&(o=t.data.start);var e=t.data.end||t.data.start;new Date(e)>new Date(r)&&(r=e)})),t.subgroups[e].start=o,t.subgroups[e].end=new Date(r-1)};for(var i in t.subgroups)e(i)}}},{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]});Nw(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);Nw(t).call(t,this.subgroupOrderer)}if(t.length>0)for(var n=0;n<t.length;n++)this.subgroups[t[n].subgroup].index=n}}},{key:"_resetSubgroups",value:function(){for(var t in this.subgroups)this.subgroups.hasOwnProperty(t)&&(this.subgroups[t].visible=!1,this.subgroups[t].height=0)}},{key:"remove",value:function(t){var e,i;delete this.items[t.id],t.setParent(null),this.stackDirty=!0;var n=zm(e=this.visibleItems).call(e,t);-1!=n&&vp(i=this.visibleItems).call(i,n,1),void 0!==t.data.subgroup&&(this._removeFromSubgroup(t),this.orderSubgroups())}},{key:"_removeFromSubgroup",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;if(null!=e){var i=this.subgroups[e];if(i){var n,o,r=zm(n=i.items).call(n,t);if(r>=0)vp(o=i.items).call(o,r,1),i.items.length?this._updateSubgroupsSizes():delete this.subgroups[e]}}}},{key:"removeFromDataSet",value:function(t){this.itemSet.removeItem(t.id)}},{key:"order",value:function(){for(var t=Pb.toArray(this.items),e=[],i=[],n=0;n<t.length;n++)void 0!==t[n].data.end&&i.push(t[n]),e.push(t[n]);this.orderedItems={byStart:e,byEnd:i},kx(this.orderedItems.byStart),_x(this.orderedItems.byEnd)}},{key:"_updateItemsInRange",value:function(t,e,i){var n=[],o={};if(!this.isVisible&&this.groupId!=Ix){for(var r=0;r<e.length;r++){var s=e[r];s.displayed&&s.hide()}return n}var a=(i.end-i.start)/4,l=i.start-a,h=i.end+a;if(e.length>0)for(var u=0;u<e.length;u++)this._checkIfVisibleWithReference(e[u],n,o,i);var c=Pb.binarySearchCustom(t.byStart,(function(t){return t<l?-1:t<=h?0:1}),"data","start");if(this._traceVisible(c,t.byStart,n,o,(function(t){return t.data.start<l||t.data.start>h})),1==this.checkRangedItems){this.checkRangedItems=!1;for(var d=0;d<t.byEnd.length;d++)this._checkIfVisibleWithReference(t.byEnd[d],n,o,i)}else{var p=Pb.binarySearchCustom(t.byEnd,(function(t){var e=t.start;return t.end<l?-1:e<=h?0:1}),"data");this._traceVisible(p,t.byEnd,n,o,(function(t){return t.data.end<l||t.data.start>h}))}for(var m={},f=0,v=0;v<n.length;v++){var g=n[v];if(!g.displayed){m[v]=g.redraw(!0),f=m[v].length}}if(f>0)for(var y=function(t){hu(Pb).call(Pb,m,(function(e){e[t]()}))},b=0;b<f;b++)y(b);for(var w=0;w<n.length;w++)n[w].repositionX();return n}},{key:"_traceVisible",value:function(t,e,i,n,o){if(-1!=t){for(var r=t;r>=0;r--){var s=e[r];if(o(s))break;s.isCluster&&!s.hasItems()||s.cluster||void 0===n[s.id]&&(n[s.id]=!0,i.push(s))}for(var a=t+1;a<e.length;a++){var l=e[a];if(o(l))break;l.isCluster&&!l.hasItems()||l.cluster||void 0===n[l.id]&&(n[l.id]=!0,i.push(l))}}}},{key:"_checkIfVisible",value:function(t,e,i){t.isVisible(i)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()}},{key:"_checkIfVisibleWithReference",value:function(t,e,i,n){t.isVisible(n)?void 0===i[t.id]&&(i[t.id]=!0,e.push(t)):t.displayed&&t.hide()}},{key:"_updateClustersInRange",value:function(t,e,i){var n=[],o={};if(e.length>0)for(var r=0;r<e.length;r++)this._checkIfVisibleWithReference(e[r],n,o,i);for(var s=0;s<t.byStart.length;s++)this._checkIfVisibleWithReference(t.byStart[s],n,o,i);for(var a=0;a<t.byEnd.length;a++)this._checkIfVisibleWithReference(t.byEnd[a],n,o,i);for(var l={},h=0,u=0;u<n.length;u++){var c=n[u];if(!c.displayed){l[u]=c.redraw(!0),h=l[u].length}}if(h>0)for(var d=0;d<h;d++)hu(Pb).call(Pb,l,(function(t){t[d]()}));for(var p=0;p<n.length;p++)n[p].repositionX();return n}},{key:"changeSubgroup",value:function(t,e,i){this._removeFromSubgroup(t,e),this._addToSubgroup(t,i),this.orderSubgroups()}},{key:"dispose",value:function(){var t;for(this.hide();t=this._disposeCallbacks.pop();)t()}}]),t}();function Mx(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}var Nx=function(t){zo(i,t);var e=Mx(i);function i(t,n,o){var r;return bo(this,i),(r=e.call(this,t,n,o)).width=0,r.height=0,r.top=0,r.left=0,r}return So(i,[{key:"redraw",value:function(t,e,i){this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,t),this.width=this.dom.background.offsetWidth,this.dom.background.style.height="0";for(var n=0,o=this.visibleItems.length;n<o;n++){this.visibleItems[n].repositionY(e)}return!1}},{key:"show",value:function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}}]),i}(Px);function Fx(t,e){var i=void 0!==Ad&&id(t)||t["@@iterator"];if(!i){if(Fh(t)||(i=function(t,e){var i;if(!t)return;if("string"==typeof t)return Rx(t,e);var n=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return ed(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rx(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function Rx(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var Lx=function(){function t(e,i,n){var o,r=this;bo(this,t),this.id=null,this.parent=null,this.data=e,this.dom=null,this.conversion=i||{},this.defaultOptions={locales:Ek,locale:"en"},this.options=Pb.extend({},this.defaultOptions,n),this.options.locales=Pb.extend({},Ek,this.options.locales);var s=this.defaultOptions.locales[this.defaultOptions.locale];hu(o=mc(this.options.locales)).call(o,(function(t){r.options.locales[t]=Pb.extend({},s,r.options.locales[t])})),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=n&&n.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(e),this.editable=null,this._updateEditStatus()}return So(t,[{key:"select",value:function(){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){null!=t.group&&this.data.group!=t.group&&null!=this.parent&&this.parent.itemSet._moveToGroup(this,t.group),this.setSelectability(t),this.parent&&(this.parent.stackDirty=!0),null!=t.subgroup&&this.data.subgroup!=t.subgroup&&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){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):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,i=this,n=document.createElement("div");n.className="vis-drag-center",n.dragCenterItem=this,this.hammerDragCenter=new ak(n),this.hammerDragCenter.on("tap",(function(t){i.parent.itemSet.body.emitter.emit("click",{event:t,item:i.id})})),this.hammerDragCenter.on("doubletap",(function(t){t.stopPropagation(),i.parent.itemSet._onUpdateItem(i),i.parent.itemSet.body.emitter.emit("doubleClick",{event:t,item:i.id})})),this.hammerDragCenter.on("panstart",(function(t){t.stopPropagation(),i.parent.itemSet._onDragStart(t)})),this.hammerDragCenter.on("panmove",Gh(t=i.parent.itemSet._onDrag).call(t,i.parent.itemSet)),this.hammerDragCenter.on("panend",Gh(e=i.parent.itemSet._onDragEnd).call(e,i.parent.itemSet)),this.hammerDragCenter.get("press").set({time:1e4}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(n,this.dom.dragLeft):this.dom.box.appendChild(n):this.dom.point&&this.dom.point.appendChild(n),this.dom.dragCenter=n}else!this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null,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");this.options.rtl?n.className="vis-delete-rtl":n.className="vis-delete";var o=this.options.locales[this.options.locale];o||(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 ak(n).on("tap",(function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)})),t.appendChild(n),this.dom.deleteButton=n}else this.selected&&e||!this.dom.deleteButton||(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null,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){var i=document.createElement("div");i.className="vis-onUpdateTime-tooltip",t.appendChild(i),this.dom.onItemUpdateTimeTooltip=i}else!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 n,o,r=this.parent.itemSet.body.domProps.scrollTop;if(("top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height)+this.parent.top-50<-r?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top="".concat(this.height+2,"px")):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom="".concat(this.height+2,"px")),this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template)n=Gh(o=this.options.tooltipOnItemUpdateTime.template).call(o,this)(this.data);else n="start: ".concat(uu(this.data.start).format("MM/DD/YYYY hh:mm")),this.data.end&&(n+="<br> end: ".concat(uu(this.data.end).format("MM/DD/YYYY hh:mm")));this.dom.onItemUpdateTimeTooltip.innerHTML=Pb.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,s,a=this._getItemData(),l=(this.dom.box||this.dom.point).getElementsByClassName("vis-item-visible-frame")[0];this.options.visibleFrameTemplate?(o=Gh(r=this.options.visibleFrameTemplate).call(r,this),n=Pb.xss(o(a,l))):n="";if(l)if(n instanceof Object&&!(n instanceof Element))o(a,l);else if(this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(n)){if(n instanceof Element)l.innerHTML="",l.appendChild(n);else if(null!=n)l.innerHTML=Pb.xss(n);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.itemVisibleFrameContent=n}this.options.template?e=(i=Gh(s=this.options.template).call(s,this))(a,t,this.data):e=this.data.content;if(e instanceof Object&&!(e instanceof Element))i(a,t);else if(this._contentToString(this.content)!==this._contentToString(e)){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(null!=e)t.innerHTML=Pb.xss(e);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.content=e}}},{key:"_updateDataAttributes",value:function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Fh(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=mc(this.data)}var i,n=Fx(e);try{for(n.s();!(i=n.n()).done;){var o=i.value,r=this.data[o];null!=r?t.setAttribute("data-".concat(o),r):t.removeAttribute("data-".concat(o))}}catch(t){n.e(t)}finally{n.f()}}}},{key:"_updateStyle",value:function(t){this.style&&(Pb.removeCssText(t,this.style),this.style=null),this.data.style&&(Pb.addCssText(t,this.data.style),this.style=this.data.style)}},{key:"_contentToString",value:function(t){return"string"==typeof t?t:t&&"outerHTML"in t?t.outerHTML:t}},{key:"_updateEditStatus",value:function(){this.options&&("boolean"==typeof this.options.editable?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:"object"===Sh(this.options.editable)&&(this.editable={},Pb.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.options.editable))),this.options&&this.options.editable&&!0===this.options.editable.overrideItems||this.data&&("boolean"==typeof this.data.editable?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:"object"===Sh(this.data.editable)&&(this.editable={},Pb.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)))}},{key:"getWidthLeft",value:function(){return 0}},{key:"getWidthRight",value:function(){return 0}},{key:"getTitle",value:function(){var t;return this.options.tooltip&&this.options.tooltip.template?Gh(t=this.options.tooltip.template).call(t,this)(this._getItemData(),this.data):this.data.title}}]),t}();function jx(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}Lx.prototype.stack=!0;var Bx=function(t){zo(i,t);var e=jx(i);function i(t,n,o){var r;if(bo(this,i),(r=e.call(this,t,n,o)).props={dot:{width:0,height:0},line:{width:0,height:0}},t&&null==t.start)throw new Error('Property "start" missing in item '.concat(t));return r}return So(i,[{key:"isVisible",value:function(t){if(this.cluster)return!1;var e,i=this.data.align||this.options.align,n=this.width*t.getMillisecondsPerPixel();return e="right"==i?this.data.start.getTime()>t.start&&this.data.start.getTime()-n<t.end:"left"==i?this.data.start.getTime()+n>t.start&&this.data.start.getTime()<t.end:this.data.start.getTime()+n/2>t.start&&this.data.start.getTime()-n/2<t.end,e}},{key:"_createDomElement",value:function(){this.dom||(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-line",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-dot",this.dom.box["vis-item"]=this,this.dirty=!0)}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}if(!this.dom.line.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var i=this.parent.dom.axis;if(!e)throw new Error("Cannot redraw item: parent has no axis container element");i.appendChild(this.dom.dot)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className="vis-item vis-box".concat(e),this.dom.line.className="vis-item vis-line".concat(e),this.dom.dot.className="vis-item vis-dot".concat(e)}}},{key:"_getDomComponentsSizes",value:function(){return{previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},dot:{height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},line:{width:this.dom.line.offsetWidth},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}}}},{key:"_updateDomComponentsSizes",value:function(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.props.dot.height=t.dot.height,this.props.dot.width=t.dot.width,this.props.line.width=t.line.width,this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)}},{key:"redraw",value:function(t){var e,i,n,o,r,s,a=this,l=[Gh(e=this._createDomElement).call(e,this),Gh(i=this._appendDomElement).call(i,this),Gh(n=this._updateDirtyDomComponents).call(n,this),function(){a.dirty&&(r=a._getDomComponentsSizes())},function(){var t;a.dirty&&Gh(t=a._updateDomComponentsSizes).call(t,a)(r)},Gh(o=this._repaintDomAdditionals).call(o,this)];return t?l:(hu(l).call(l,(function(t){s=t()})),s)}},{key:"show",value:function(t){if(!this.displayed)return this.redraw(t)}},{key:"hide",value:function(){if(this.displayed){var t=this.dom;t.box.remove?t.box.remove():t.box.parentNode&&t.box.parentNode.removeChild(t.box),t.line.remove?t.line.remove():t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.remove?t.dot.remove():t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot),this.displayed=!1}}},{key:"repositionXY",value:function(){var t=this.options.rtl,e=function(t,e,i){var n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e||void 0!==i){var r=o?-1*e:e;t.style.transform=void 0!==i?void 0!==e?Fd(n="translate(".concat(r,"px, ")).call(n,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(r,"px)")}};e(this.dom.box,this.boxX,this.boxY,t),e(this.dom.dot,this.dotX,this.dotY,t),e(this.dom.line,this.lineX,this.lineY,t)}},{key:"repositionX",value:function(){var t=this.conversion.toScreen(this.data.start),e=void 0===this.data.align?this.options.align:this.data.align,i=this.props.line.width,n=this.props.dot.width;"right"==e?(this.boxX=t-this.width,this.lineX=t-i,this.dotX=t-i/2-n/2):"left"==e?(this.boxX=t,this.lineX=t,this.dotX=t+i/2-n/2):(this.boxX=t-this.width/2,this.lineX=this.options.rtl?t-i:t-i/2,this.dotX=t-n/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}},{key:"repositionY",value:function(){var t=this.options.orientation.item,e=this.dom.line.style;if("top"==t){var i=this.parent.top+this.top+1;this.boxY=this.top||0,e.height="".concat(i,"px"),e.bottom="",e.top="0"}else{var n=this.parent.itemSet.props.height-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),e.height="".concat(n,"px"),e.top="",e.bottom="0"}this.dotY=-this.props.dot.height/2,this.repositionXY()}},{key:"getWidthLeft",value:function(){return this.width/2}},{key:"getWidthRight",value:function(){return this.width/2}}]),i}(Lx);function zx(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}var Hx=function(t){zo(i,t);var e=zx(i);function i(t,n,o){var r;if(bo(this,i),(r=e.call(this,t,n,o)).props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},t&&null==t.start)throw new Error('Property "start" missing in item '.concat(t));return r}return So(i,[{key:"isVisible",value:function(t){if(this.cluster)return!1;var e=this.width*t.getMillisecondsPerPixel();return this.data.start.getTime()+e>t.start&&this.data.start<t.end}},{key:"_createDomElement",value:function(){this.dom||(this.dom={},this.dom.point=document.createElement("div"),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.point.appendChild(this.dom.content),this.dom.dot=document.createElement("div"),this.dom.point.appendChild(this.dom.dot),this.dom.point["vis-item"]=this,this.dirty=!0)}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.point.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.point)}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);var t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.point.className="vis-item vis-point".concat(e),this.dom.dot.className="vis-item vis-dot".concat(e)}}},{key:"_getDomComponentsSizes",value:function(){return{dot:{width:this.dom.dot.offsetWidth,height:this.dom.dot.offsetHeight},content:{width:this.dom.content.offsetWidth,height:this.dom.content.offsetHeight},point:{width:this.dom.point.offsetWidth,height:this.dom.point.offsetHeight}}}},{key:"_updateDomComponentsSizes",value:function(t){this.props.dot.width=t.dot.width,this.props.dot.height=t.dot.height,this.props.content.height=t.content.height,this.options.rtl?this.dom.content.style.marginRight="".concat(this.props.dot.width/2,"px"):this.dom.content.style.marginLeft="".concat(this.props.dot.width/2,"px"),this.width=t.point.width,this.height=t.point.height,this.dom.dot.style.top="".concat((this.height-this.props.dot.height)/2,"px");var e=this.props.dot.width,i=this.options.rtl?e/2:e/2*-1;this.dom.dot.style.transform="translateX(".concat(i,"px"),this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)}},{key:"redraw",value:function(t){var e,i,n,o,r,s,a=this,l=[Gh(e=this._createDomElement).call(e,this),Gh(i=this._appendDomElement).call(i,this),Gh(n=this._updateDirtyDomComponents).call(n,this),function(){a.dirty&&(r=a._getDomComponentsSizes())},function(){var t;a.dirty&&Gh(t=a._updateDomComponentsSizes).call(t,a)(r)},Gh(o=this._repaintDomAdditionals).call(o,this)];return t?l:(hu(l).call(l,(function(t){s=t()})),s)}},{key:"repositionXY",value:function(){var t=this.options.rtl,e=function(t,e,i){var n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e||void 0!==i){var r=o?-1*e:e;t.style.transform=void 0!==i?void 0!==e?Fd(n="translate(".concat(r,"px, ")).call(n,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(r,"px)")}};e(this.dom.point,this.pointX,this.pointY,t)}},{key:"show",value:function(t){if(!this.displayed)return this.redraw(t)}},{key:"hide",value:function(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)}},{key:"repositionX",value:function(){var t=this.conversion.toScreen(this.data.start);this.pointX=t,this.options.rtl?this.right=t-this.props.dot.width:this.left=t-this.props.dot.width,this.repositionXY()}},{key:"repositionY",value:function(){var t=this.options.orientation.item;this.pointY="top"==t?this.top:this.parent.height-this.top-this.height,this.repositionXY()}},{key:"getWidthLeft",value:function(){return this.props.dot.width}},{key:"getWidthRight",value:function(){return this.props.dot.width}}]),i}(Lx);function Gx(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}var Vx=function(t){zo(i,t);var e=Gx(i);function i(t,n,o){var r;if(bo(this,i),(r=e.call(this,t,n,o)).props={content:{width:0}},r.overflow=!1,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 r}return So(i,[{key:"isVisible",value:function(t){return!this.cluster&&(this.data.start<t.end&&this.data.end>t.start)}},{key:"_createDomElement",value:function(){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,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className=this.baseClassName+e,this.dom.content.style.maxWidth="none"}}},{key:"_getDomComponentsSizes",value:function(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.frame).overflow,this.whiteSpace="nowrap"!==window.getComputedStyle(this.dom.content).whiteSpace,{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,o,r,s,a=this,l=[Gh(e=this._createDomElement).call(e,this),Gh(i=this._appendDomElement).call(i,this),Gh(n=this._updateDirtyDomComponents).call(n,this),function(){var t;a.dirty&&(r=Gh(t=a._getDomComponentsSizes).call(t,a)())},function(){var t;a.dirty&&Gh(t=a._updateDomComponentsSizes).call(t,a)(r)},Gh(o=this._repaintDomAdditionals).call(o,this)];return t?l:(hu(l).call(l,(function(t){s=t()})),s)}},{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,n=this.parent.width,o=this.conversion.toScreen(this.data.start),r=this.conversion.toScreen(this.data.end),s=void 0===this.data.align?this.options.align:this.data.align;!1===this.data.limitSize||void 0!==t&&!0!==t||(o<-n&&(o=-n),r>2*n&&(r=2*n));var a=Math.max(Math.round(1e3*(r-o))/1e3,1);switch(this.overflow?(this.options.rtl?this.right=o:this.left=o,this.width=a+this.props.content.width,i=this.props.content.width):(this.options.rtl?this.right=o:this.left=o,this.width=a,i=Math.min(r-o,this.props.content.width)),this.options.rtl?this.dom.box.style.transform="translateX(".concat(-1*this.right,"px)"):this.dom.box.style.transform="translateX(".concat(this.left,"px)"),this.dom.box.style.width="".concat(a,"px"),this.whiteSpace&&(this.height=this.dom.box.offsetHeight),s){case"left":this.dom.content.style.transform="translateX(0)";break;case"right":if(this.options.rtl){var l=-1*Math.max(a-i,0);this.dom.content.style.transform="translateX(".concat(l,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max(a-i,0),"px)");break;case"center":if(this.options.rtl){var h=-1*Math.max((a-i)/2,0);this.dom.content.style.transform="translateX(".concat(h,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max((a-i)/2,0),"px)");break;default:if(e=this.overflow?r>0?Math.max(-o,0):-i:o<0?-o:0,this.options.rtl){var u=-1*e;this.dom.content.style.transform="translateX(".concat(u,"px)")}else this.dom.content.style.transform="translateX(".concat(e,"px)")}}},{key:"repositionY",value:function(){var t=this.options.orientation.item,e=this.dom.box;e.style.top="".concat("top"==t?this.top:this.parent.height-this.top-this.height,"px")}},{key:"_repaintDragLeft",value:function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragLeft||(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}},{key:"_repaintDragRight",value:function(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else this.selected||this.options.itemsAlwaysDraggable.range||!this.dom.dragRight||(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}}]),i}(Lx);function Wx(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}Vx.prototype.baseClassName="vis-item vis-range";var Yx=function(t){zo(i,t);var e=Wx(i);function i(t,n,o){var r;if(bo(this,i),(r=e.call(this,t,n,o)).props={content:{width:0}},r.overflow=!1,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 r}return So(i,[{key:"isVisible",value:function(t){return this.data.start<t.end&&this.data.end>t.start}},{key:"_createDomElement",value:function(){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(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow,{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,o,r,s,a=this,l=[Gh(e=this._createDomElement).call(e,this),Gh(i=this._appendDomElement).call(i,this),Gh(n=this._updateDirtyDomComponents).call(n,this),function(){var t;a.dirty&&(r=Gh(t=a._getDomComponentsSizes).call(t,a)())},function(){var t;a.dirty&&Gh(t=a._updateDomComponentsSizes).call(t,a)(r)},Gh(o=this._repaintDomAdditionals).call(o,this)];return t?l:(hu(l).call(l,(function(t){s=t()})),s)}},{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 this.parent instanceof Nx?(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":""):(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")}}]),i}(Lx);Yx.prototype.baseClassName="vis-item vis-background",Yx.prototype.stack=!1,Yx.prototype.show=Vx.prototype.show,Yx.prototype.hide=Vx.prototype.hide,Yx.prototype.repositionX=Vx.prototype.repositionX;var Ux=function(){function t(e,i){bo(this,t),this.container=e,this.overflowMethod=i||"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)}return So(t,[{key:"setPosition",value:function(t,e){this.x=Om(t),this.y=Om(e)}},{key:"setText",value:function(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=Pb.xss(t)}},{key:"show",value:function(t){if(void 0===t&&(t=!0),!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;"flip"==this.overflowMethod&&(this.y-e<this.padding&&(l=!1),this.x+i>o-this.padding&&(a=!0)),r=a?this.x-i:this.x,s=l?this.y-e:this.y}else(s=this.y-e)+e+this.padding>n&&(s=n-e-this.padding),s<this.padding&&(s=this.padding),(r=this.x)+i+this.padding>o&&(r=o-i-this.padding),r<this.padding&&(r=this.padding);this.frame.style.left=r+"px",this.frame.style.top=s+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),t}(),Xx=Is.every;gi({target:"Array",proto:!0,forced:!Jh("every")},{every:function(t){return Xx(this,t,arguments.length>1?arguments[1]:void 0)}});var qx=Lh("Array").every,Kx=et,$x=qx,Zx=Array.prototype,Qx=function(t){var e=t.every;return t===Zx||Kx(Zx,t)&&e===Zx.every?$x:e};function Jx(t,e){var i=void 0!==Ad&&id(t)||t["@@iterator"];if(!i){if(Fh(t)||(i=function(t,e){var i;if(!t)return;if("string"==typeof t)return tC(t,e);var n=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return ed(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tC(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function tC(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function eC(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}var iC=function(t){zo(i,t);var e=eC(i);function i(t,n,o){var r;bo(this,i);var s=Ap({},{fitOnDoubleClick:!0},o,{editable:!1});if((r=e.call(this,t,n,s)).props={content:{width:0,height:0}},!t||null==t.uiItems)throw new Error('Property "uiItems" missing in item '+t.id);return r.id=_b(),r.group=t.group,r._setupRange(),r.emitter=r.data.eventEmitter,r.range=r.data.range,r.attached=!1,r.isCluster=!0,r.data.isCluster=!0,r}return So(i,[{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(),n=Math.max(this.data.start.getTime()+e,this.data.start.getTime()+i);return this.data.start<t.end&&n>t.start&&this.hasItems()}},{key:"getData",value:function(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}},{key:"redraw",value:function(t){var e,i,n,o,r,s,a,l,h=[Gh(e=this._createDomElement).call(e,this),Gh(i=this._appendDomElement).call(i,this),Gh(n=this._updateDirtyDomComponents).call(n,this),Gh(o=function(){this.dirty&&(a=this._getDomComponentsSizes())}).call(o,this),Gh(r=function(){var t;this.dirty&&Gh(t=this._updateDomComponentsSizes).call(t,this)(a)}).call(r,this),Gh(s=this._repaintDomAdditionals).call(s,this)];return t?h:(hu(h).call(h,(function(t){l=t()})),l)}},{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),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.align:this.data.align;this.repositionXWithoutRanges(t,i)}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 o=i+t+(e-t)/2,r=o-n/2,s=this.options.rtl?-1*o:o,a=this.options.rtl?-1*r:r;this.dom.line.style.transform="translateX(".concat(s,"px)"),this.dom.dot.style.transform="translateX(".concat(a,"px)")}else{var l=this.options.rtl?-1*t:t,h=this.options.rtl?-1*(t-n/2):t-n/2;this.dom.line.style.transform="translateX(".concat(l,"px)"),this.dom.dot.style.transform="translateX(".concat(h,"px)")}}},{key:"repositionXWithoutRanges",value:function(t,e){"right"==e?this.options.rtl?(this.right=t-this.width,this.dom.box.style.right=this.right+"px"):(this.left=t-this.width,this.dom.box.style.left=this.left+"px"):"left"==e?this.options.rtl?(this.right=t,this.dom.box.style.right=this.right+"px"):(this.left=t,this.dom.box.style.left=this.left+"px"):this.options.rtl?(this.right=t-this.width/2,this.dom.box.style.right=this.right+"px"):(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;if(e.style.top="top"==t?(this.top||0)+"px":(this.parent.height-this.top-this.height||0)+"px",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{var i=this.parent.itemSet.props.height,n=i-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=i-n+"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=Jx(this.data.uiItems);try{for(i.s();!(e=i.n()).done;){e.value.cluster=this}}catch(t){i.e(t)}finally{i.f()}this.data.items=Ku(t=this.data.uiItems).call(t,(function(t){return t.data})),this.attached=!0,this.dirty=!0}},{key:"detach",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.hasItems()){var e,i=Jx(this.data.uiItems);try{for(i.s();!(e=i.n()).done;){var n=e.value;delete n.cluster}}catch(t){i.e(t)}finally{i.f()}this.attached=!1,t&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}},{key:"_onDoubleClick",value:function(){this._fit()}},{key:"_setupRange",value:function(){var t,e,i,n=Ku(t=this.data.uiItems).call(t,(function(t){return{start:t.data.start.valueOf(),end:t.data.end?t.data.end.valueOf():t.data.start.valueOf()}}));this.data.min=Math.min.apply(Math,Od(Ku(n).call(n,(function(t){return Math.min(t.start,t.end||t.start)})))),this.data.max=Math.max.apply(Math,Od(Ku(n).call(n,(function(t){return Math.max(t.start,t.end||t.start)}))));var o=Ku(e=this.data.uiItems).call(e,(function(t){return t.center})),r=cc(o).call(o,(function(t,e){return t+e}),0)/this.data.uiItems.length;ok(i=this.data.uiItems).call(i,(function(t){return t.data.end}))?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(r),this.data.end=null)}},{key:"_getUiItems",value:function(){var t,e=this;return this.data.uiItems&&this.data.uiItems.length?gu(t=this.data.uiItems).call(t,(function(t){return t.cluster===e})):[]}},{key:"_createDomElement",value:function(){if(!this.dom){var t;if(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.options.showStipes&&(this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-cluster-line",this.dom.line.style.display="none",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-cluster-dot",this.dom.dot.style.display="none"),this.options.fitOnDoubleClick)this.dom.box.ondblclick=Gh(t=i.prototype._onDoubleClick).call(t,this);this.dom.box["vis-item"]=this,this.dirty=!0}}},{key:"_appendDomElement",value:function(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){var t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}var e=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var i=this.parent.dom.axis;if(!e)throw new Error("Cannot redraw item: parent has no axis container element");i.appendChild(this.dom.dot)}}this.displayed=!0}},{key:"_updateDirtyDomComponents",value:function(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var t=this.baseClassName+" "+(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+" vis-readonly";this.dom.box.className="vis-item "+t,this.options.showStipes&&(this.dom.line.className="vis-item vis-cluster-line "+(this.selected?" vis-selected":""),this.dom.dot.className="vis-item vis-cluster-dot "+(this.selected?" vis-selected":"")),this.data.end&&(this.dom.content.style.maxWidth="none")}}},{key:"_getDomComponentsSizes",value:function(){var t={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(t.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},t.line={width:this.dom.line.offsetWidth}),t}},{key:"_updateDomComponentsSizes",value:function(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.data.end?this.minWidth=t.box.width:this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1}},{key:"_repaintDomAdditionals",value:function(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}},{key:"_isStipeVisible",value:function(){return this.minWidth>=this.width||!this.data.end}},{key:"_getFitRange",value:function(){var t=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-t,fitEnd:this.data.max+t}}},{key:"_fit",value:function(){if(this.emitter){var t=this._getFitRange(),e=t.fitStart,i=t.fitEnd,n={start:new Date(e),end:new Date(i),animation:!0};this.emitter.emit("fit",n)}}},{key:"_getItemData",value:function(){return this.data}}]),i}(Lx);function nC(t,e){var i=void 0!==Ad&&id(t)||t["@@iterator"];if(!i){if(Fh(t)||(i=function(t,e){var i;if(!t)return;if("string"==typeof t)return oC(t,e);var n=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return ed(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oC(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function oC(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}iC.prototype.baseClassName="vis-item vis-range vis-cluster";var rC="__ungrouped__",sC=function(){function t(e){bo(this,t),this.itemSet=e,this.groups={},this.cache={},this.cache[-1]=[]}return So(t,[{key:"createClusterItem",value:function(t,e,i){return new iC(t,e,i)}},{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;var s=-1,a=0;if(e>0){if(e>=1)return[];s=Math.abs(Math.round(Math.log(100/e)/Math.log(2))),a=Math.abs(Math.pow(2,s))}if(this.dataChanged){var l=s!=this.cacheLevel;(!this.applyOnChangedLevel||l)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=s;var h=this.cache[s];if(!h){for(var u in h=[],this.groups)if(this.groups.hasOwnProperty(u))for(var c=this.groups[u],d=c.length,p=0;p<d;){for(var m=c[p],f=1,v=p-1;v>=0&&m.center-c[v].center<a/2;)!c[v].cluster&&r(m.data,c[v].data)&&f++,v--;for(var g=p+1;g<c.length&&c[g].center-m.center<a/2;)r(m.data,c[g].data)&&f++,g++;for(var y=h.length-1;y>=0&&m.center-h[y].center<a;)m.group==h[y].group&&r(m.data,h[y].data)&&f++,y--;if(f>o){for(var b=f-o+1,w=[],k=p;w.length<b&&k<c.length;)r(c[p].data,c[k].data)&&w.push(c[k]),k++;var _=this.itemSet.getGroupId(m.data),x=this.itemSet.groups[_]||this.itemSet.groups[rC],C=this._getClusterForItems(w,x,t,i);h.push(C),p+=b}else delete m.cluster,p+=1}this.cache[s]=h}return h}},{key:"_filterData",value:function(){var t={};this.groups=t;for(var e=0,i=am(this.items);e<i.length;e++){var n=i[e],o=n.parent?n.parent.groupId:"",r=t[o];r||(r=[],t[o]=r),r.push(n),n.data.start&&(n.data.end?n.center=(n.data.start.valueOf()+n.data.end.valueOf())/2:n.center=n.data.start.valueOf())}for(var s in t){var a;if(t.hasOwnProperty(s))Nw(a=t[s]).call(a,(function(t,e){return t.center-e.center}))}this.dataChanged=!1}},{key:"_getClusterForItems",value:function(t,e,i,n){var o,r,s=Ku(o=i||[]).call(o,(function(t){var e;return{cluster:t,itemsIds:new lx(Ku(e=t.data.uiItems).call(e,(function(t){return t.id})))}}));if(s.length){var a,l=nC(s);try{var h=function(){var e=a.value;if(e.itemsIds.size===t.length&&Qx(t).call(t,(function(t){return e.itemsIds.has(t.id)})))return r=e.cluster,"break"};for(l.s();!(a=l.n()).done;){if("break"===h())break}}catch(t){l.e(t)}finally{l.f()}}if(r)return r.setUiItems(t),r.group!==e&&(r.group&&r.group.remove(r),e&&(e.add(r),r.group=e)),r;var u=n.titleTemplate||"",c={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},d=u.replace(/{count}/,t.length),p='<div title="'+d+'">'+t.length+"</div>",m=Ap({},n,this.itemSet.options),f={content:p,title:d,group:e,uiItems:t,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return r=this.createClusterItem(f,c,m),e&&(e.add(r),r.group=e),r.attach(),r}},{key:"_dropLevelsCache",value:function(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}]),t}();function aC(t,e){var i=void 0!==Ad&&id(t)||t["@@iterator"];if(!i){if(Fh(t)||(i=function(t,e){var i;if(!t)return;if("string"==typeof t)return lC(t,e);var n=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return ed(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lC(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function lC(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function hC(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}var uC="__ungrouped__",cC="__background__",dC=function(t){zo(i,t);var e=hC(i);function i(t,n){var o;bo(this,i),(o=e.call(this)).body=t,o.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:hk.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},o.options=Pb.extend({},o.defaultOptions),o.options.rtl=n.rtl,o.options.onTimeout=n.onTimeout,o.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime},o.dom={},o.props={},o.hammer=null;var r=To(o);return o.itemsData=null,o.groupsData=null,o.itemsSettingTime=null,o.initialItemSetDrawn=!1,o.userContinueNotBail=null,o.sequentialSelection=!1,o.itemListeners={add:function(t,e,i){r._onAdd(e.items),r.options.cluster&&r.clusterGenerator.setItems(r.items,{applyOnChangedLevel:!1}),r.redraw()},update:function(t,e,i){r._onUpdate(e.items),r.options.cluster&&r.clusterGenerator.setItems(r.items,{applyOnChangedLevel:!1}),r.redraw()},remove:function(t,e,i){r._onRemove(e.items),r.options.cluster&&r.clusterGenerator.setItems(r.items,{applyOnChangedLevel:!1}),r.redraw()}},o.groupListeners={add:function(t,e,i){if(r._onAddGroups(e.items),r.groupsData&&r.groupsData.length>0){var n,o=r.groupsData.getDataSet();hu(n=o.get()).call(n,(function(t){if(t.nestedGroups){var e;0!=t.showNested&&(t.showNested=!0);var n=[];hu(e=t.nestedGroups).call(e,(function(e){var i=o.get(e);i&&(i.nestedInGroup=t.id,0==t.showNested&&(i.visible=!1),n=Fd(n).call(n,i))})),o.update(n,i)}}))}},update:function(t,e,i){r._onUpdateGroups(e.items)},remove:function(t,e,i){r._onRemoveGroups(e.items)}},o.items={},o.groups={},o.groupIds=[],o.selection=[],o.popup=null,o.popupTimer=null,o.touchParams={},o.groupTouchParams={group:null,isDragging:!1},o._create(),o.setOptions(n),o.clusters=[],o}return So(i,[{key:"_create",value:function(){var t,e,i,n,o,r,s,a,l,h,u,c,d,p,m,f=this,v=document.createElement("div");v.className="vis-itemset",v["vis-itemset"]=this,this.dom.frame=v;var g=document.createElement("div");g.className="vis-background",v.appendChild(g),this.dom.background=g;var y=document.createElement("div");y.className="vis-foreground",v.appendChild(y),this.dom.foreground=y;var b=document.createElement("div");b.className="vis-axis",this.dom.axis=b;var w=document.createElement("div");w.className="vis-labelset",this.dom.labelSet=w,this._updateUngrouped();var k=new Nx(cC,null,this);k.show(),this.groups[cC]=k,this.hammer=new ak(this.body.dom.centerContainer),this.hammer.on("hammer.input",(function(t){t.isFirst&&f._onTouch(t)})),this.hammer.on("panstart",Gh(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",Gh(e=this._onDrag).call(e,this)),this.hammer.on("panend",Gh(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:ak.ALL}),this.hammer.get("press").set({time:1e4}),this.hammer.on("tap",Gh(n=this._onSelectItem).call(n,this)),this.hammer.on("press",Gh(o=this._onMultiSelectItem).call(o,this)),this.hammer.get("press").set({time:1e4}),this.hammer.on("doubletap",Gh(r=this._onAddItem).call(r,this)),this.options.rtl?this.groupHammer=new ak(this.body.dom.rightContainer):this.groupHammer=new ak(this.body.dom.leftContainer),this.groupHammer.on("tap",Gh(s=this._onGroupClick).call(s,this)),this.groupHammer.on("panstart",Gh(a=this._onGroupDragStart).call(a,this)),this.groupHammer.on("panmove",Gh(l=this._onGroupDrag).call(l,this)),this.groupHammer.on("panend",Gh(h=this._onGroupDragEnd).call(h,this)),this.groupHammer.get("pan").set({threshold:5,direction:ak.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",Gh(u=this._onMouseOver).call(u,this)),this.body.dom.centerContainer.addEventListener("mouseout",Gh(c=this._onMouseOut).call(c,this)),this.body.dom.centerContainer.addEventListener("mousemove",Gh(d=this._onMouseMove).call(d,this)),this.body.dom.centerContainer.addEventListener("contextmenu",Gh(p=this._onDragEnd).call(p,this)),this.body.dom.centerContainer.addEventListener("mousewheel",Gh(m=this._onMouseWheel).call(m,this)),this.show()}},{key:"setOptions",value:function(t){var e=this;if(t){var i,n;Pb.selectiveExtend(["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"],this.options,t),"itemsAlwaysDraggable"in t&&("boolean"==typeof t.itemsAlwaysDraggable?(this.options.itemsAlwaysDraggable.item=t.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):"object"===Sh(t.itemsAlwaysDraggable)&&(Pb.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,t.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),"sequentialSelection"in t&&"boolean"==typeof t.sequentialSelection&&(this.options.sequentialSelection=t.sequentialSelection),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.item="top"===t.orientation?"top":"bottom":"object"===Sh(t.orientation)&&"item"in t.orientation&&(this.options.orientation.item=t.orientation.item)),"margin"in t&&("number"==typeof t.margin?(this.options.margin.axis=t.margin,this.options.margin.item.horizontal=t.margin,this.options.margin.item.vertical=t.margin):"object"===Sh(t.margin)&&(Pb.selectiveExtend(["axis"],this.options.margin,t.margin),"item"in t.margin&&("number"==typeof t.margin.item?(this.options.margin.item.horizontal=t.margin.item,this.options.margin.item.vertical=t.margin.item):"object"===Sh(t.margin.item)&&Pb.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),hu(i=["locale","locales"]).call(i,(function(i){i in t&&(e.options[i]=t[i])})),"editable"in t&&("boolean"==typeof t.editable?(this.options.editable.updateTime=t.editable,this.options.editable.updateGroup=t.editable,this.options.editable.add=t.editable,this.options.editable.remove=t.editable,this.options.editable.overrideItems=!1):"object"===Sh(t.editable)&&Pb.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,t.editable)),"groupEditable"in t&&("boolean"==typeof t.groupEditable?(this.options.groupEditable.order=t.groupEditable,this.options.groupEditable.add=t.groupEditable,this.options.groupEditable.remove=t.groupEditable):"object"===Sh(t.groupEditable)&&Pb.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));hu(n=["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"]).call(n,(function(i){var n=t[i];if(n){var o;if("function"!=typeof n)throw new Error(Fd(o="option ".concat(i," must be a function ")).call(o,i,"(item, callback)"));e.options[i]=n}})),t.cluster?(Ap(this.options,{cluster:t.cluster}),this.clusterGenerator||(this.clusterGenerator=new sC(this)),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}},{key:"markDirty",value:function(t){this.groupIds=[],t&&(t.refreshItems&&hu(Pb).call(Pb,this.items,(function(t){t.dirty=!0,t.displayed&&t.redraw()})),t.restackGroups&&hu(Pb).call(Pb,this.groups,(function(t,e){e!==cC&&(t.stackDirty=!0)})))}},{key:"destroy",value:function(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}},{key:"hide",value:function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}},{key:"show",value:function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}},{key:"setPopupTimer",value:function(t){if(this.clearPopupTimer(),t){var e=this.options.tooltip.delay||"number"==typeof this.options.tooltip.delay?this.options.tooltip.delay:500;this.popupTimer=Zh((function(){t.show()}),e)}}},{key:"clearPopupTimer",value:function(){null!=this.popupTimer&&(clearTimeout(this.popupTimer),this.popupTimer=null)}},{key:"setSelection",value:function(t){var e;null==t&&(t=[]),Fh(t)||(t=[t]);var i,n=aC(gu(e=this.selection).call(e,(function(e){return-1===zm(t).call(t,e)})));try{for(n.s();!(i=n.n()).done;){var o=i.value,r=this.getItemById(o);r&&r.unselect()}}catch(t){n.e(t)}finally{n.f()}this.selection=Od(t);var s,a=aC(t);try{for(a.s();!(s=a.n()).done;){var l=s.value,h=this.getItemById(l);h&&h.select()}}catch(t){a.e(t)}finally{a.f()}}},{key:"getSelection",value:function(){var t;return Fd(t=this.selection).call(t,[])}},{key:"getVisibleItems",value:function(){var t,e,i=this.body.range.getRange();this.options.rtl?(t=this.body.util.toScreen(i.start),e=this.body.util.toScreen(i.end)):(e=this.body.util.toScreen(i.start),t=this.body.util.toScreen(i.end));var n=[];for(var o in this.groups)if(this.groups.hasOwnProperty(o)){var r,s=this.groups[o],a=aC(s.isVisible?s.visibleItems:[]);try{for(a.s();!(r=a.n()).done;){var l=r.value;this.options.rtl?l.right<e&&l.right+l.width>t&&n.push(l.id):l.left<t&&l.left+l.width>e&&n.push(l.id)}}catch(t){a.e(t)}finally{a.f()}}return n}},{key:"getItemsAtCurrentTime",value:function(t){var e,i;this.options.rtl?(e=this.body.util.toScreen(t),i=this.body.util.toScreen(t)):(i=this.body.util.toScreen(t),e=this.body.util.toScreen(t));var n=[];for(var o in this.groups)if(this.groups.hasOwnProperty(o)){var r,s=this.groups[o],a=aC(s.isVisible?s.visibleItems:[]);try{for(a.s();!(r=a.n()).done;){var l=r.value;this.options.rtl?l.right<i&&l.right+l.width>e&&n.push(l.id):l.left<e&&l.left+l.width>i&&n.push(l.id)}}catch(t){a.e(t)}finally{a.f()}}return n}},{key:"getVisibleGroups",value:function(){var t=[];for(var e in this.groups){if(this.groups.hasOwnProperty(e))this.groups[e].isVisible&&t.push(e)}return t}},{key:"getItemById",value:function(t){var e;return this.items[t]||Gk(e=this.clusters).call(e,(function(e){return e.id===t}))}},{key:"_deselect",value:function(t){for(var e=this.selection,i=0,n=e.length;i<n;i++)if(e[i]==t){vp(e).call(e,i,1);break}}},{key:"redraw",value:function(){var t=this,e=this.options.margin,i=this.body.range,n=Pb.option.asSize,o=this.options,r=o.orientation.item,s=!1,a=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,a.className="vis-itemset",this.options.cluster&&this._clusterItems(),s=this._orderGroups()||s;var l=i.end-i.start,h=l!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,u=i.start!=this.lastRangeStart,c=o.stack!=this.lastStack,d=o.stackSubgroups!=this.lastStackSubgroups,p=h||u||c||d;this.lastVisibleInterval=l,this.lastRangeStart=i.start,this.lastStack=o.stack,this.lastStackSubgroups=o.stackSubgroups,this.props.lastWidth=this.props.width;var m=this._firstGroup(),f={item:e.item,axis:e.axis},v={item:e.item,axis:e.item.vertical/2},g=0,y=e.axis+e.item.vertical;this.groups[cC].redraw(i,v,p);var b={},w=0;return hu(Pb).call(Pb,this.groups,(function(t,e){if(e!==cC){var n=t==m?f:v;b[e]=t.redraw(i,n,p,!0),w=b[e].length}})),w>0&&function(){for(var e={},i=function(t){hu(Pb).call(Pb,b,(function(i,n){e[n]=i[t]()}))},n=0;n<w;n++)i(n);hu(Pb).call(Pb,t.groups,(function(t,i){if(i!==cC){var n=e[i];s=n||s,g+=t.height}})),g=Math.max(g,y)}(),g=Math.max(g,y),a.style.height=n(g),this.props.width=a.offsetWidth,this.props.height=g,this.dom.axis.style.top=n("top"==r?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,s=this._isResized()||s}},{key:"_firstGroup",value:function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[uC]||null}},{key:"_updateUngrouped",value:function(){var t,e,i=this.groups[uC];if(this.groupsData){if(i)for(e in i.dispose(),delete this.groups[uC],this.items)if(this.items.hasOwnProperty(e)){(t=this.items[e]).parent&&t.parent.remove(t);var n=this.getGroupId(t.data),o=this.groups[n];o&&o.add(t)||t.hide()}}else if(!i){for(e in i=new Px(null,null,this),this.groups[uC]=i,this.items)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,o=this.itemsData;if(t){if(!n.isDataViewLike("id",t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=Eb(t)}else this.itemsData=null;if(o&&(hu(Pb).call(Pb,this.itemListeners,(function(t,e){o.off(e,t)})),o.dispose(),e=o.getIds(),this._onRemove(e)),this.itemsData){var r=this.id;hu(Pb).call(Pb,this.itemListeners,(function(t,e){i.itemsData.on(e,t,r)})),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&&(hu(Pb).call(Pb,this.groupListeners,(function(t,e){i.groupsData.off(e,t)})),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!n.isDataViewLike("id",t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o,r=this.groupsData.getDataSet();hu(o=r.get()).call(o,(function(t){var e;t.nestedGroups&&hu(e=t.nestedGroups).call(e,(function(e){var i=r.get(e);i.nestedInGroup=t.id,0==t.showNested&&(i.visible=!1),r.update(i)}))}));var s=this.id;hu(Pb).call(Pb,this.groupListeners,(function(t,e){i.groupsData.on(e,t,s)})),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),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(t){var e=this,i=this.itemsData.get(t);i&&this.options.onRemove(i,(function(i){i&&e.itemsData.remove(t)}))}},{key:"_getType",value:function(t){return t.type||this.options.type||(t.end?"range":"box")}},{key:"getGroupId",value:function(t){return"background"==this._getType(t)&&null==t.group?cC:this.groupsData?t.group:uC}},{key:"_onUpdate",value:function(t){var e=this,n=this;hu(t).call(t,(function(t){var o,r=n.itemsData.get(t),s=n.items[t],a=r?n._getType(r):null,l=i.types[a];if(s&&(l&&s instanceof l?n._updateItem(s,r):(o=s.selected,n._removeItem(s),s=null)),!s&&r){if(!l)throw new TypeError('Unknown item type "'.concat(a,'"'));(s=new l(r,n.conversion,n.options)).id=t,n._addItem(s),o&&(e.selection.push(t),s.select())}})),this._order(),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 e=0,i=this;hu(t).call(t,(function(t){var n=i.items[t];n&&(e++,i._removeItem(n))})),e&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))}},{key:"_order",value:function(){hu(Pb).call(Pb,this.groups,(function(t){t.order()}))}},{key:"_onUpdateGroups",value:function(t){this._onAddGroups(t)}},{key:"_onAddGroups",value:function(t){var e=this;hu(t).call(t,(function(t){var i=e.groupsData.get(t),n=e.groups[t];if(n)n.setData(i);else{if(t==uC||t==cC)throw new Error("Illegal group id. ".concat(t," is a reserved id."));var o=$m(e.options);for(var r in Pb.extend(o,{height:null}),n=new Px(t,i,e),e.groups[t]=n,e.items)if(e.items.hasOwnProperty(r)){var s=e.items[r];s.data.group==t&&n.add(s)}n.order(),n.show()}})),this.body.emitter.emit("_change",{queue:!0})}},{key:"_onRemoveGroups",value:function(t){var e=this;hu(t).call(t,(function(t){var i=e.groups[t];i&&(i.dispose(),delete e.groups[t])})),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);var e=!Pb.equalArray(t,this.groupIds);if(e){var i=this.groups;hu(t).call(t,(function(t){i[t].hide()})),hu(t).call(t,(function(t){i[t].show()})),this.groupIds=t}return e}return!1}},{key:"_orderNestedGroups",value:function(t){var e=this;return function t(e,i){var n=[];return hu(i).call(i,(function(i){if(n.push(i),e.groupsData.get(i).nestedGroups){var o,r=Ku(o=e.groupsData.get({filter:function(t){return t.nestedInGroup==i},order:e.options.groupOrder})).call(o,(function(t){return t.id}));n=Fd(n).call(n,t(e,r))}})),n}(this,gu(t).call(t,(function(t){return!e.groupsData.get(t).nestedInGroup})))}},{key:"_addItem",value:function(t){this.items[t.id]=t;var e=this.getGroupId(t.data),i=this.groups[e];i?i&&i.data&&i.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1,i&&i.add(t)}},{key:"_updateItem",value:function(t,e){t.setData(e);var i=this.getGroupId(t.data),n=this.groups[i];n?n&&n.data&&n.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1}},{key:"_removeItem",value:function(t){var e,i;t.hide(),delete this.items[t.id];var n=zm(e=this.selection).call(e,t.id);-1!=n&&vp(i=this.selection).call(i,n,1),t.parent&&t.parent.remove(t),null!=this.popup&&this.popup.hide()}},{key:"_constructByEndArray",value:function(t){for(var e=[],i=0;i<t.length;i++)t[i]instanceof Vx&&e.push(t[i]);return e}},{key:"_onTouch",value:function(t){this.touchParams.item=this.itemFromTarget(t),this.touchParams.dragLeftItem=t.target.dragLeftItem||!1,this.touchParams.dragRightItem=t.target.dragRightItem||!1,this.touchParams.itemProps=null}},{key:"_getGroupIndex",value:function(t){for(var e=0;e<this.groupIds.length;e++)if(t==this.groupIds[e])return e}},{key:"_onDragStart",value:function(t){var e=this;if(!this.touchParams.itemIsDragging){var i,n=this.touchParams.item||null,o=this;if(n&&(n.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;if(null!=n.editable&&!n.editable.updateTime&&!n.editable.updateGroup&&!this.options.editable.overrideItems)return;var r=this.touchParams.dragLeftItem,s=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=n,r)i={item:r,initialX:t.center.x,dragLeft:!0,data:this._cloneItemData(n.data)},this.touchParams.itemProps=[i];else if(s)i={item:s,initialX:t.center.x,dragRight:!0,data:this._cloneItemData(n.data)},this.touchParams.itemProps=[i];else if(this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey))this._onDragStartAddItem(t);else{this.groupIds.length<1&&this.redraw();var a=this._getGroupIndex(n.data.group),l=this.options.itemsAlwaysDraggable.item&&!n.selected?[n.id]:this.getSelection();this.touchParams.itemProps=Ku(l).call(l,(function(i){var n=o.items[i],r=o._getGroupIndex(n.data.group);return{item:n,initialX:t.center.x,groupOffset:a-r,data:e._cloneItemData(n.data)}}))}t.stopPropagation()}else this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey)&&this._onDragStartAddItem(t)}}},{key:"_onDragStartAddItem",value:function(t){var e=this.options.snap||null,i=this.dom.frame.getBoundingClientRect(),n=this.options.rtl?i.right-t.center.x+10:t.center.x-i.left-10,o=this.body.util.toTime(n),r=this.body.util.getScale(),s=this.body.util.getStep(),a=e?e(o,r,s):o,l={type:"range",start:a,end:a,content:"new item"},h=_b();l[this.itemsData.idProp]=h;var u=this.groupFromTarget(t);u&&(l.group=u.groupId);var c=new Vx(l,this.conversion,this.options);c.id=h,c.data=this._cloneItemData(l),this._addItem(c),this.touchParams.selectedItem=c;var d={item:c,initialX:t.center.x,data:c.data};this.options.rtl?d.dragLeft=!0:d.dragRight=!0,this.touchParams.itemProps=[d],t.stopPropagation()}},{key:"_onDrag",value:function(t){var e=this;if(null!=this.popup&&this.options.showTooltips&&!this.popup.hidden){var i=this.body.dom.centerContainer,n=i.getBoundingClientRect();this.popup.setPosition(t.center.x-n.left+i.offsetLeft,t.center.y-n.top+i.offsetTop),this.popup.show()}if(this.touchParams.itemProps){var o;t.stopPropagation();var r=this,s=this.options.snap||null,a=this.body.dom.root.offsetLeft,l=this.options.rtl?a+this.body.domProps.right.width:a+this.body.domProps.left.width,h=this.body.util.getScale(),u=this.body.util.getStep(),c=this.touchParams.selectedItem,d=(this.options.editable.overrideItems||null==c.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=c.editable&&c.editable.updateGroup,p=null;if(d&&c&&null!=c.data.group){var m=r.groupFromTarget(t);m&&(p=this._getGroupIndex(m.groupId))}hu(o=this.touchParams.itemProps).call(o,(function(i){var n,o,a,m,f,v=r.body.util.toTime(t.center.x-l),g=r.body.util.toTime(i.initialX-l);n=e.options.rtl?-(v-g):v-g;var y=e._cloneItemData(i.item.data);if(null==i.item.editable||i.item.editable.updateTime||i.item.editable.updateGroup||r.options.editable.overrideItems){if((e.options.editable.overrideItems||null==c.editable)&&e.options.editable.updateTime||!e.options.editable.overrideItems&&null!=c.editable&&c.editable.updateTime)if(i.dragLeft)e.options.rtl?null!=y.end&&(a=Pb.convert(i.data.end,"Date"),f=new Date(a.valueOf()+n),y.end=s?s(f,h,u):f):null!=y.start&&(o=Pb.convert(i.data.start,"Date"),m=new Date(o.valueOf()+n),y.start=s?s(m,h,u):m);else if(i.dragRight)e.options.rtl?null!=y.start&&(o=Pb.convert(i.data.start,"Date"),m=new Date(o.valueOf()+n),y.start=s?s(m,h,u):m):null!=y.end&&(a=Pb.convert(i.data.end,"Date"),f=new Date(a.valueOf()+n),y.end=s?s(f,h,u):f);else if(null!=y.start)if(o=Pb.convert(i.data.start,"Date").valueOf(),m=new Date(o+n),null!=y.end){var b=(a=Pb.convert(i.data.end,"Date")).valueOf()-o.valueOf();y.start=s?s(m,h,u):m,y.end=new Date(y.start.valueOf()+b)}else y.start=s?s(m,h,u):m;if(d&&!i.dragLeft&&!i.dragRight&&null!=p&&null!=y.group){var w=p-i.groupOffset;w=Math.max(0,w),w=Math.min(r.groupIds.length-1,w),y.group=r.groupIds[w]}y=e._cloneItemData(y),r.options.onMoving(y,(function(t){t&&i.item.setData(e._cloneItemData(t,"Date"))}))}})),this.body.emitter.emit("_change")}}},{key:"_moveToGroup",value:function(t,e){var i=this.groups[e];if(i&&i.groupId!=t.data.group){var n=t.parent;n.remove(t),n.order(),t.data.group=i.groupId,i.add(t),i.order()}}},{key:"_onDragEnd",value:function(t){var e=this;if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){t.stopPropagation();var i=this,n=this.touchParams.itemProps;this.touchParams.itemProps=null,hu(n).call(n,(function(t){var n=t.item.id;if(null!=i.itemsData.get(n)){var o=e._cloneItemData(t.item.data);i.options.onMove(o,(function(o){o?(o[e.itemsData.idProp]=n,e.itemsData.update(o)):(t.item.setData(t.data),i.body.emitter.emit("_change"))}))}else i.options.onAdd(t.item.data,(function(e){i._removeItem(t.item),e&&i.itemsData.add(e),i.body.emitter.emit("_change")}))}))}}},{key:"_onGroupClick",value:function(t){var e=this,i=this.groupFromTarget(t);Zh((function(){e.toggleGroupShowNested(i)}),1)}},{key:"toggleGroupShowNested",value:function(t){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(t&&t.nestedGroups){var n=this.groupsData.getDataSet();t.showNested=null!=i?!!i:!t.showNested;var o=n.get(t.groupId);o.showNested=t.showNested;for(var r=t.nestedGroups,s=r;s.length>0;){var a=s;s=[];for(var l=0;l<a.length;l++){var h=n.get(a[l]);h.nestedGroups&&(s=Fd(s).call(s,h.nestedGroups))}s.length>0&&(r=Fd(r).call(r,s))}var u=Ku(e=n.get(r)).call(e,(function(t){return null==t.visible&&(t.visible=!0),t.visible=!!o.showNested,t}));n.update(Fd(u).call(u,o)),o.showNested?(Pb.removeClassName(t.dom.label,"collapsed"),Pb.addClassName(t.dom.label,"expanded")):(Pb.removeClassName(t.dom.label,"expanded"),Pb.addClassName(t.dom.label,"collapsed"))}}},{key:"toggleGroupDragClassName",value:function(t){t.dom.label.classList.toggle("vis-group-is-dragging"),t.dom.foreground.classList.toggle("vis-group-is-dragging")}},{key:"_onGroupDragStart",value:function(t){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(t),this.groupTouchParams.group&&(t.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}},{key:"_onGroupDrag",value:function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this.groupsData.getDataSet(),i=this.groupFromTarget(t);if(i&&i.height!=this.groupTouchParams.group.height){var n=i.top<this.groupTouchParams.group.top,o=t.center?t.center.y:t.clientY,r=i.dom.foreground.getBoundingClientRect(),s=this.groupTouchParams.group.height;if(n){if(r.top+s<o)return}else{var a=i.height;if(r.top+a-s>o)return}}if(i&&i!=this.groupTouchParams.group){var l=e.get(i.groupId),h=e.get(this.groupTouchParams.group.groupId);h&&l&&(this.options.groupOrderSwap(h,l,e),e.update(h),e.update(l));var u=e.getIds({order:this.options.groupOrder});if(!Pb.equalArray(u,this.groupTouchParams.originalOrder))for(var c=this.groupTouchParams.originalOrder,d=this.groupTouchParams.group.groupId,p=Math.min(c.length,u.length),m=0,f=0,v=0;m<p;){for(;m+f<p&&m+v<p&&u[m+f]==c[m+v];)m++;if(m+f>=p)break;if(u[m+f]==d)f=1;else if(c[m+v]==d)v=1;else{var g=zm(u).call(u,c[m+v]),y=e.get(u[m+f]),b=e.get(c[m+v]);this.options.groupOrderSwap(y,b,e),e.update(y),e.update(b);var w=u[m+f];u[m+f]=c[m+v],u[g]=w,m++}}}}}},{key:"_onGroupDragEnd",value:function(t){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,n=e.groupsData.getDataSet(),o=Pb.extend({},n.get(i));e.options.onMoveGroup(o,(function(t){if(t)t[n._idProp]=i,n.update(t);else{var o=n.getIds({order:e.options.groupOrder});if(!Pb.equalArray(o,e.groupTouchParams.originalOrder))for(var r=e.groupTouchParams.originalOrder,s=Math.min(r.length,o.length),a=0;a<s;){for(;a<s&&o[a]==r[a];)a++;if(a>=s)break;var l=zm(o).call(o,r[a]),h=n.get(o[a]),u=n.get(r[a]);e.options.groupOrderSwap(h,u,n),n.update(h),n.update(u);var c=o[a];o[a]=r[a],o[l]=c,a++}}})),e.body.emitter.emit("groupDragged",{groupId:i}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}},{key:"_onSelectItem",value:function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)this._onMultiSelectItem(t);else{var n=this.getSelection(),o=this.itemFromTarget(t),r=o&&o.selectable?[o.id]:[];this.setSelection(r);var s=this.getSelection();(s.length>0||n.length>0)&&this.body.emitter.emit("select",{items:s,event:t})}}}},{key:"_onMouseOver",value:function(t){var e=this.itemFromTarget(t);if(e&&e!==this.itemFromRelatedTarget(t)){var i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new Ux(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);var n=this.body.dom.centerContainer,o=n.getBoundingClientRect();this.popup.setPosition(t.clientX-o.left+n.offsetLeft,t.clientY-o.top+n.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}}},{key:"_onMouseOut",value:function(t){var e=this.itemFromTarget(t);e&&(e!==this.itemFromRelatedTarget(t)&&(this.clearPopupTimer(),null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t})))}},{key:"_onMouseMove",value:function(t){if(this.itemFromTarget(t)&&(null!=this.popupTimer&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){var e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.clientX-i.left+e.offsetLeft,t.clientY-i.top+e.offsetTop),this.popup.show()}}},{key:"_onMouseWheel",value:function(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)}},{key:"_onUpdateItem",value:function(t){if(this.options.selectable&&(this.options.editable.updateTime||this.options.editable.updateGroup)){var e=this;if(t){var i=e.itemsData.get(t.id);this.options.onUpdate(i,(function(t){t&&e.itemsData.update(t)}))}}}},{key:"_onDropObjectOnItem",value:function(t){var e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)}},{key:"_onAddItem",value:function(t){if(this.options.selectable&&this.options.editable.add){var e,i,n=this,o=this.options.snap||null,r=this.dom.frame.getBoundingClientRect(),s=this.options.rtl?r.right-t.center.x:t.center.x-r.left,a=this.body.util.toTime(s),l=this.body.util.getScale(),h=this.body.util.getStep();"drop"==t.type?((i=JSON.parse(t.dataTransfer.getData("text"))).content=i.content?i.content:"new item",i.start=i.start?i.start:o?o(a,l,h):a,i.type=i.type||"box",i[this.itemsData.idProp]=i.id||_b(),"range"!=i.type||i.end||(e=this.body.util.toTime(s+this.props.width/5),i.end=o?o(e,l,h):e)):((i={start:o?o(a,l,h):a,content:"new item"})[this.itemsData.idProp]=_b(),"range"===this.options.type&&(e=this.body.util.toTime(s+this.props.width/5),i.end=o?o(e,l,h):e));var u=this.groupFromTarget(t);u&&(i.group=u.groupId),i=this._cloneItemData(i),this.options.onAdd(i,(function(e){e&&(n.itemsData.add(e),"drop"==t.type&&n.setSelection([e.id]))}))}}},{key:"_onMultiSelectItem",value:function(t){var e=this;if(this.options.selectable){var n=this.itemFromTarget(t);if(n){var o=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||!1||this.options.sequentialSelection)&&this.options.multiselect){var r=this.itemsData.get(n.id).group,s=void 0;this.options.multiselectPerGroup&&o.length>0&&(s=this.itemsData.get(o[0]).group),this.options.multiselectPerGroup&&null!=s&&s!=r||o.push(n.id);var a=i._getItemRange(this.itemsData.get(o));if(!this.options.multiselectPerGroup||s==r)for(var l in o=[],this.items)if(this.items.hasOwnProperty(l)){var h=this.items[l],u=h.data.start,c=void 0!==h.data.end?h.data.end:u;!(u>=a.min&&c<=a.max)||this.options.multiselectPerGroup&&s!=this.itemsData.get(h.id).group||h instanceof Yx||o.push(h.id)}}else{var d=zm(o).call(o,n.id);-1==d?o.push(n.id):vp(o).call(o,d,1)}var p=gu(o).call(o,(function(t){return e.getItemById(t).selectable}));this.setSelection(p),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}}},{key:"itemFromElement",value:function(t){for(var e=t;e;){if(e.hasOwnProperty("vis-item"))return e["vis-item"];e=e.parentNode}return null}},{key:"itemFromTarget",value:function(t){return this.itemFromElement(t.target)}},{key:"itemFromRelatedTarget",value:function(t){return this.itemFromElement(t.relatedTarget)}},{key:"groupFromTarget",value:function(t){var e=t.center?t.center.y:t.clientY,i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(var n=0;n<i.length;n++){var o=i[n],r=this.groups[o],s=r.dom.foreground,a=s.getBoundingClientRect();if(e>=a.top&&e<a.top+s.offsetHeight)return r;if("top"===this.options.orientation.item){if(n===this.groupIds.length-1&&e>a.top)return r}else if(0===n&&e<a.top+s.offset)return r}return null}},{key:"_cloneItemData",value:function(t,e){var i=Pb.extend({},t);return e||(e=this.itemsData.type),null!=i.start&&(i.start=Pb.convert(i.start,e&&e.start||"Date")),null!=i.end&&(i.end=Pb.convert(i.end,e&&e.end||"Date")),i}},{key:"_clusterItems",value:function(){if(this.options.cluster){var t=this.body.range.conversion(this.body.domProps.center.width).scale,e=this.clusterGenerator.getClusters(this.clusters,t,this.options.cluster);if(this.clusters!=e){if(this._detachAllClusters(),e){var i,n=aC(e);try{for(n.s();!(i=n.n()).done;){i.value.attach()}}catch(t){n.e(t)}finally{n.f()}this.clusters=e}this._updateClusters(e)}}}},{key:"_detachAllClusters",value:function(){if(this.options.cluster&&this.clusters&&this.clusters.length){var t,e=aC(this.clusters);try{for(e.s();!(t=e.n()).done;){t.value.detach()}}catch(t){e.e(t)}finally{e.f()}}}},{key:"_updateClusters",value:function(t){if(this.clusters&&this.clusters.length){var e,i,n=new lx(Ku(t).call(t,(function(t){return t.id}))),o=!1,r=aC(gu(e=this.clusters).call(e,(function(t){return!n.has(t.id)})));try{for(r.s();!(i=r.n()).done;){var s,a,l=i.value,h=zm(s=this.selection).call(s,l.id);if(-1!==h)l.unselect(),vp(a=this.selection).call(a,h,1),o=!0}}catch(t){r.e(t)}finally{r.f()}if(o){var u=this.getSelection();this.body.emitter.emit("select",{items:u,event:event})}}this.clusters=t||[]}}],[{key:"_getItemRange",value:function(t){var e=null,i=null;return hu(t).call(t,(function(t){(null==i||t.start<i)&&(i=t.start),null!=t.end?(null==e||t.end>e)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)})),{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}}]),i}(Vb);dC.types={background:Yx,box:Bx,range:Vx,point:Hx},dC.prototype._onAdd=dC.prototype._onUpdate;var pC,mC=!1,fC="background: #FFeeee; color: #dd0000",vC=function(){function t(){bo(this,t)}return So(t,null,[{key:"validate",value:function(e,i,n){mC=!1,pC=i;var o=i;return void 0!==n&&(o=i[n]),t.parse(e,o,[]),mC}},{key:"parse",value:function(e,i,n){for(var o in e)e.hasOwnProperty(o)&&t.check(o,e,i,n)}},{key:"check",value:function(e,i,n,o){if(void 0!==n[e]||void 0!==n.__any__){var r=e,s=!0;void 0===n[e]&&void 0!==n.__any__&&(r="__any__",s="object"===t.getType(i[e]));var a=n[r];s&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,n,r,a,o)}else t.getSuggestion(e,n,o)}},{key:"checkFields",value:function(e,i,n,o,r,s){var a=function(i){console.log("%c"+i+t.printLocation(s,e),fC)},l=t.getType(i[e]),h=r[l];void 0!==h?"array"===t.getType(h)&&-1===zm(h).call(h,i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(h)+' not "'+i[e]+'". '),mC=!0):"object"===l&&"__any__"!==o&&(s=Pb.copyAndExtendArray(s,e),t.parse(i[e],n[o],s)):void 0===r.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(mc(r))+". Received ["+l+'] "'+i[e]+'"'),mC=!0)}},{key:"getType",value:function(t){var e=Sh(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Fh(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(e,i,n){var o,r=t.findInOptions(e,i,n,!1),s=t.findInOptions(e,pC,[],!0);o=void 0!==r.indexMatch?" in "+t.printLocation(r.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+r.indexMatch+'"?\n\n':s.distance<=4&&r.distance>s.distance?" in "+t.printLocation(r.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):r.distance<=8?'. Did you mean "'+r.closestMatch+'"?'+t.printLocation(r.path,e):". Did you mean one of these: "+t.print(mc(i))+t.printLocation(n,e),console.log('%cUnknown option detected: "'+e+'"'+o,fC),mC=!0}},{key:"findInOptions",value:function(e,i,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=1e9,s="",a=[],l=e.toLowerCase(),h=void 0;for(var u in i){var c=void 0;if(void 0!==i[u].__type__&&!0===o){var d=t.findInOptions(e,i[u],Pb.copyAndExtendArray(n,u));r>d.distance&&(s=d.closestMatch,a=d.path,r=d.distance,h=d.indexMatch)}else{var p;-1!==zm(p=u.toLowerCase()).call(p,l)&&(h=u),r>(c=t.levenshteinDistance(e,u))&&(s=u,a=Pb.copyArray(n),r=c)}}return{closestMatch:s,path:a,distance:r,indexMatch:h}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",n="\n\n"+i+"options = {\n",o=0;o<t.length;o++){for(var r=0;r<o+1;r++)n+="  ";n+=t[o]+": {\n"}for(var s=0;s<t.length+1;s++)n+="  ";n+=e+"\n";for(var a=0;a<t.length+1;a++){for(var l=0;l<t.length-a;l++)n+="  ";n+="}\n"}return n+"\n\n"}},{key:"print",value:function(t){return gf(t).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}},{key:"levenshteinDistance",value:function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var i,n,o=[];for(i=0;i<=e.length;i++)o[i]=[i];for(n=0;n<=t.length;n++)o[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)==t.charAt(n-1)?o[i][n]=o[i-1][n-1]:o[i][n]=Math.min(o[i-1][n-1]+1,Math.min(o[i][n-1]+1,o[i-1][n]+1));return o[e.length][t.length]}}]),t}(),gC="string",yC="boolean",bC="number",wC="array",kC="date",_C="object",xC="moment",CC={configure:{enabled:{boolean:yC},filter:{boolean:yC,function:"function"},container:{dom:"dom"},__type__:{object:_C,boolean:yC,function:"function"}},align:{string:gC},alignCurrentTime:{string:gC,undefined:"undefined"},rtl:{boolean:yC,undefined:"undefined"},rollingMode:{follow:{boolean:yC},offset:{number:bC,undefined:"undefined"},__type__:{object:_C}},onTimeout:{timeoutMs:{number:bC},callback:{function:"function"},__type__:{object:_C}},verticalScroll:{boolean:yC,undefined:"undefined"},horizontalScroll:{boolean:yC,undefined:"undefined"},autoResize:{boolean:yC},throttleRedraw:{number:bC},clickToUse:{boolean:yC},dataAttributes:{string:gC,array:wC},editable:{add:{boolean:yC,undefined:"undefined"},remove:{boolean:yC,undefined:"undefined"},updateGroup:{boolean:yC,undefined:"undefined"},updateTime:{boolean:yC,undefined:"undefined"},overrideItems:{boolean:yC,undefined:"undefined"},__type__:{boolean:yC,object:_C}},end:{number:bC,date:kC,string:gC,moment:xC},format:{minorLabels:{millisecond:{string:gC,undefined:"undefined"},second:{string:gC,undefined:"undefined"},minute:{string:gC,undefined:"undefined"},hour:{string:gC,undefined:"undefined"},weekday:{string:gC,undefined:"undefined"},day:{string:gC,undefined:"undefined"},week:{string:gC,undefined:"undefined"},month:{string:gC,undefined:"undefined"},year:{string:gC,undefined:"undefined"},__type__:{object:_C,function:"function"}},majorLabels:{millisecond:{string:gC,undefined:"undefined"},second:{string:gC,undefined:"undefined"},minute:{string:gC,undefined:"undefined"},hour:{string:gC,undefined:"undefined"},weekday:{string:gC,undefined:"undefined"},day:{string:gC,undefined:"undefined"},week:{string:gC,undefined:"undefined"},month:{string:gC,undefined:"undefined"},year:{string:gC,undefined:"undefined"},__type__:{object:_C,function:"function"}},__type__:{object:_C}},moment:{function:"function"},groupHeightMode:{string:gC},groupOrder:{string:gC,function:"function"},groupEditable:{add:{boolean:yC,undefined:"undefined"},remove:{boolean:yC,undefined:"undefined"},order:{boolean:yC,undefined:"undefined"},__type__:{boolean:yC,object:_C}},groupOrderSwap:{function:"function"},height:{string:gC,number:bC},hiddenDates:{start:{date:kC,number:bC,string:gC,moment:xC},end:{date:kC,number:bC,string:gC,moment:xC},repeat:{string:gC},__type__:{object:_C,array:wC}},itemsAlwaysDraggable:{item:{boolean:yC,undefined:"undefined"},range:{boolean:yC,undefined:"undefined"},__type__:{boolean:yC,object:_C}},limitSize:{boolean:yC},locale:{string:gC},locales:{__any__:{any:"any"},__type__:{object:_C}},longSelectPressTime:{number:bC},margin:{axis:{number:bC},item:{horizontal:{number:bC,undefined:"undefined"},vertical:{number:bC,undefined:"undefined"},__type__:{object:_C,number:bC}},__type__:{object:_C,number:bC}},max:{date:kC,number:bC,string:gC,moment:xC},maxHeight:{number:bC,string:gC},maxMinorChars:{number:bC},min:{date:kC,number:bC,string:gC,moment:xC},minHeight:{number:bC,string:gC},moveable:{boolean:yC},multiselect:{boolean:yC},multiselectPerGroup:{boolean:yC},onAdd:{function:"function"},onDropObjectOnItem:{function:"function"},onUpdate:{function:"function"},onMove:{function:"function"},onMoving:{function:"function"},onRemove:{function:"function"},onAddGroup:{function:"function"},onMoveGroup:{function:"function"},onRemoveGroup:{function:"function"},onInitialDrawComplete:{function:"function"},order:{function:"function"},orientation:{axis:{string:gC,undefined:"undefined"},item:{string:gC,undefined:"undefined"},__type__:{string:gC,object:_C}},selectable:{boolean:yC},sequentialSelection:{boolean:yC},showCurrentTime:{boolean:yC},showMajorLabels:{boolean:yC},showMinorLabels:{boolean:yC},showWeekScale:{boolean:yC},stack:{boolean:yC},stackSubgroups:{boolean:yC},cluster:{maxItems:{number:bC,undefined:"undefined"},titleTemplate:{string:gC,undefined:"undefined"},clusterCriteria:{function:"function",undefined:"undefined"},showStipes:{boolean:yC,undefined:"undefined"},fitOnDoubleClick:{boolean:yC,undefined:"undefined"},__type__:{boolean:yC,object:_C}},snap:{function:"function",null:"null"},start:{date:kC,number:bC,string:gC,moment:xC},template:{function:"function"},loadingScreenTemplate:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:gC,function:"function"},showTooltips:{boolean:yC},tooltip:{followMouse:{boolean:yC},overflowMethod:{string:["cap","flip","none"]},delay:{number:bC},template:{function:"function"},__type__:{object:_C}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:yC,object:_C}},timeAxis:{scale:{string:gC,undefined:"undefined"},step:{number:bC,undefined:"undefined"},__type__:{object:_C}},type:{string:gC},width:{string:gC,number:bC},preferZoom:{boolean:yC},zoomable:{boolean:yC},zoomKey:{string:["ctrlKey","altKey","shiftKey","metaKey",""]},zoomFriction:{number:bC},zoomMax:{number:bC},zoomMin:{number:bC},xss:{disabled:{boolean:yC},filterOptions:{__any__:{any:"any"},__type__:{object:_C}},__type__:{object:_C}},__type__:{object:_C}},DC={global:{align:["center","left","right"],alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",year:""}},groupHeightMode:["auto","fixed","fitItems"],groupsDraggable:!1,height:"",locale:"",longSelectPressTime:251,margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:"",showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","shiftKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],xss:{disabled:!1}}},SC={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},TC=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;bo(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return So(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){if("string"==typeof t)return SC[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i,n=this._isColorString(t);if(void 0!==n&&(t=n),!0===Pb.isString(t)){if(!0===Pb.isValidRGB(t)){var o=t.substr(4).substr(0,t.length-5).split(",");i={r:o[0],g:o[1],b:o[2],a:1}}else if(!0===Pb.isValidRGBA(t)){var r=t.substr(5).substr(0,t.length-6).split(",");i={r:r[0],g:r[1],b:r[2],a:r[3]}}else if(!0===Pb.isValidHex(t)){var s=Pb.hexToRGB(t);i={r:s.r,g:s.g,b:s.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var a=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:a}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+gf(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];!0===e&&(this.previousColor=Pb.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Zh((function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)}),0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];!0===e&&(this.initialColor=Pb.extend({},t)),this.color=t;var i=Pb.RGBToHSV(t.r,t.g,t.b),n=2*Math.PI,o=this.r*i.s,r=this.centerCoordinates.x+o*Math.sin(n*i.h),s=this.centerCoordinates.y+o*Math.cos(n*i.h);this.colorPickerSelector.style.left=r-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=Pb.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=Pb.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=Pb.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),Df(i).call(i),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var t,e,i,n;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var r=document.createElement("DIV");r.style.color="red",r.style.fontWeight="bold",r.style.padding="10px",r.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(r)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=Gh(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=Gh(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=Gh(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=Gh(n=this._loadLast).call(n,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new ak(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),lk(this.hammer,(function(e){t._moveSelector(e)})),this.hammer.on("tap",(function(e){t._moveSelector(e)})),this.hammer.on("panstart",(function(e){t._moveSelector(e)})),this.hammer.on("panmove",(function(e){t._moveSelector(e)})),this.hammer.on("panend",(function(e){t._moveSelector(e)}))}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e,i,n,o,r=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,r,s),this.centerCoordinates={x:.5*r,y:.5*s},this.r=.49*r;var a,l=2*Math.PI/360,h=1/this.r;for(n=0;n<360;n++)for(o=0;o<this.r;o++)e=this.centerCoordinates.x+o*Math.sin(l*n),i=this.centerCoordinates.y+o*Math.cos(l*n),a=Pb.HSVToRGB(.002777777777777778*n,o*h,1),t.fillStyle="rgb("+a.r+","+a.g+","+a.b+")",t.fillRect(e-.5,i-.5,2,2);t.strokeStyle="rgba(0,0,0,1)",t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),t.stroke(),this.hueCircle=t.getImageData(0,0,r,s)}this.generated=!0}},{key:"_moveSelector",value:function(t){var e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,r=.5*this.colorPickerDiv.clientWidth,s=i-r,a=n-o,l=Math.atan2(s,a),h=.98*Math.min(Math.sqrt(s*s+a*a),r),u=Math.cos(l)*h+o,c=Math.sin(l)*h+r;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";var d=l/(2*Math.PI);d=d<0?d+1:d;var p=h/this.r,m=Pb.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=d,m.s=p;var f=Pb.HSVToRGB(m.h,m.s,m.v);f.a=this.color.a,this.color=f,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),t}(),EC=function(){function t(e,i,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;bo(this,t),this.parent=e,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Pb.extend(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new TC(o),this.wrapper=void 0}return So(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;if("string"==typeof t)this.options.filter=t;else if(Fh(t))this.options.filter=t.join();else if("object"===Sh(t)){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==gu(t)&&(this.options.filter=gu(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===gu(this.options)&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var t=gu(this.options),e=0,i=!1;for(var n in this.configureOptions)this.configureOptions.hasOwnProperty(n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?i=(i=t(n,[]))||this._handleObject(this.configureOptions[n],[n],!0):!0!==t&&-1===zm(t).call(t,n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(t){for(var e=this.moduleOptions,i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}},{key:"_makeItem",value:function(t){if(!0===this.allowCreation){var e=document.createElement("div");e.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];return hu(n).call(n,(function(t){e.appendChild(t)})),this.domElements.push(e),this.domElements.length}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=Pb.xss(t),this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");return n.className="vis-configuration vis-config-label vis-config-s"+e.length,n.innerHTML=!0===i?Pb.xss("<i><b>"+t+":</b></i>"):Pb.xss(t+":"),n}},{key:"_makeDropdown",value:function(t,e,i){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var o=0;void 0!==e&&-1!==zm(t).call(t,e)&&(o=zm(t).call(t,e));for(var r=0;r<t.length;r++){var s=document.createElement("option");s.value=t[r],r===o&&(s.selected="selected"),s.innerHTML=t[r],n.appendChild(s)}var a=this;n.onchange=function(){a._update(this.value,i)};var l=this._makeLabel(i[i.length-1],i);this._makeItem(i,l,n)}},{key:"_makeRange",value:function(t,e,i){var n=t[0],o=t[1],r=t[2],s=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=r}catch(t){}a.step=s;var l="",h=0;if(void 0!==e){var u=1.2;e<0&&e*u<o?(a.min=Math.ceil(e*u),h=a.min,l="range increased"):e/u<o&&(a.min=Math.ceil(e/u),h=a.min,l="range increased"),e*u>r&&1!==r&&(a.max=Math.ceil(e*u),h=a.max,l="range increased"),a.value=e}else a.value=n;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=Number(a.value);var d=this;a.onchange=function(){c.value=this.value,d._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};var p=this._makeLabel(i[i.length-1],i),m=this._makeItem(i,p,a,c);""!==l&&this.popupHistory[m]!==h&&(this.popupHistory[m]=h,this._setupPopup(l,m))}},{key:"_makeButton",value:function(){var t=this;if(!0===this.options.showButton){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}},{key:"_setupPopup",value:function(t,e){var i=this;if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){var n=document.createElement("div");n.id="vis-configuration-popup",n.className="vis-configuration-popup",n.innerHTML=Pb.xss(t),n.onclick=function(){i._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:e}}}},{key:"_removePopup",value:function(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var t=this;if(void 0!==this.popupDiv.html){var e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+"px",this.popupDiv.html.style.top=e.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Zh((function(){t.popupDiv.html.style.opacity=0}),1500),this.popupDiv.deleteTimeout=Zh((function(){t._removePopup()}),1800)}}},{key:"_makeCheckbox",value:function(t,e,i){var n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0!==e&&(n.checked=e,e!==t&&("object"===Sh(t)?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));var o=this;n.onchange=function(){o._update(this.checked,i)};var r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}},{key:"_makeTextInput",value:function(t,e,i){var n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=e,e!==t&&this.changedOptions.push({path:i,value:e});var o=this;n.onchange=function(){o._update(this.value,i)};var r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}},{key:"_makeColorField",value:function(t,e,i){var n=this,o=t[1],r=document.createElement("div");"none"!==(e=void 0===e?o:e)?(r.className="vis-configuration vis-config-colorBlock",r.style.backgroundColor=e):r.className="vis-configuration vis-config-colorBlock none",e=void 0===e?o:e,r.onclick=function(){n._showColorPicker(e,r,i)};var s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,r)}},{key:"_showColorPicker",value:function(t,e,i){var n=this;e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback((function(t){var o="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=o,n._update(o,i)})),this.colorPicker.setCloseCallback((function(){e.onclick=function(){n._showColorPicker(t,e,i)}}))}},{key:"_handleObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=gu(this.options),r=!1;for(var s in t)if(t.hasOwnProperty(s)){n=!0;var a=t[s],l=Pb.copyAndExtendArray(e,s);if("function"==typeof o&&!1===(n=o(s,e))&&!Fh(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i),!1!==n){r=!0;var h=this._getValue(l);if(Fh(a))this._handleArray(a,h,l);else if("string"==typeof a)this._makeTextInput(a,h,l);else if("boolean"==typeof a)this._makeCheckbox(a,h,l);else if(a instanceof Object){var u=!0;if(-1!==zm(e).call(e,"physics")&&this.moduleOptions.physics.solver!==s&&(u=!1),!0===u)if(void 0!==a.enabled){var c=Pb.copyAndExtendArray(l,"enabled"),d=this._getValue(c);if(!0===d){var p=this._makeLabel(s,l,!0);this._makeItem(l,p),r=this._handleObject(a,l)||r}else this._makeCheckbox(a,d,l)}else{var m=this._makeLabel(s,l,!0);this._makeItem(l,m),r=this._handleObject(a,l)||r}}else console.error("dont know how to handle",a,s,l)}}return r}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(var o=0;o<e.length;o++)"global"!==e[o]&&(void 0===n[e[o]]&&(n[e[o]]={}),o!==e.length-1?n=n[e[o]]:n[e[o]]=t);return i}},{key:"_printOptions",value:function(){var t=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+gf(t,null,2)+"</pre>"}},{key:"getOptions",value:function(){for(var t={},e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}]),t}();function OC(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}var AC=function(t){zo(i,t);var e=OC(i);function i(t,o,r,s){var a,l,h,u,c,d,p,m;if(bo(this,i),(m=e.call(this)).initTime=new Date,m.itemsDone=!1,!(To(m)instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(!Fh(r)&&!n.isDataViewLike("id",r)&&r instanceof Object){var f=s;s=r,r=f}s&&s.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var v=To(m);if(m.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:"bottom",item:"bottom"},moment:uu},m.options=Pb.deepExtend({},m.defaultOptions),s&&Pb.setupXSSProtection(s.xss),m._create(t),!s||s&&void 0===s.rtl){var g;m.dom.root.style.visibility="hidden";for(var y=m.dom.root;!g&&y;)g=window.getComputedStyle(y,null).direction,y=y.parentElement;m.options.rtl=g&&"rtl"==g.toLowerCase()}else m.options.rtl=s.rtl;s&&(s.rollingMode&&(m.options.rollingMode=s.rollingMode),s.onInitialDrawComplete&&(m.options.onInitialDrawComplete=s.onInitialDrawComplete),s.onTimeout&&(m.options.onTimeout=s.onTimeout),s.loadingScreenTemplate&&(m.options.loadingScreenTemplate=s.loadingScreenTemplate));var b=document.createElement("div");if(m.options.loadingScreenTemplate){var w,k=Gh(w=m.options.loadingScreenTemplate).call(w,To(m)),_=k(m.dom.loadingScreen);_ instanceof Object&&!(_ instanceof Element)?k(b):_ instanceof Element?(b.innerHTML="",b.appendChild(_)):null!=_&&(b.innerHTML=Pb.xss(_))}function x(t,e){v.hasListeners(t)&&v.emit(t,v.getEventProperties(e))}return m.dom.loadingScreen.appendChild(b),m.components=[],m.body={dom:m.dom,domProps:m.props,emitter:{on:Gh(a=m.on).call(a,To(m)),off:Gh(l=m.off).call(l,To(m)),emit:Gh(h=m.emit).call(h,To(m))},hiddenDates:[],util:{getScale:function(){return v.timeAxis.step.scale},getStep:function(){return v.timeAxis.step.step},toScreen:Gh(u=v._toScreen).call(u,v),toGlobalScreen:Gh(c=v._toGlobalScreen).call(c,v),toTime:Gh(d=v._toTime).call(d,v),toGlobalTime:Gh(p=v._toGlobalTime).call(p,v)}},m.range=new $w(m.body,m.options),m.components.push(m.range),m.body.range=m.range,m.timeAxis=new ck(m.body,m.options),m.timeAxis2=null,m.components.push(m.timeAxis),m.currentTime=new Mk(m.body,m.options),m.components.push(m.currentTime),m.itemSet=new dC(m.body,m.options),m.components.push(m.itemSet),m.itemsData=null,m.groupsData=null,m.dom.root.onclick=function(t){x("click",t)},m.dom.root.ondblclick=function(t){x("doubleClick",t)},m.dom.root.oncontextmenu=function(t){x("contextmenu",t)},m.dom.root.onmouseover=function(t){x("mouseOver",t)},window.PointerEvent?(m.dom.root.onpointerdown=function(t){x("mouseDown",t)},m.dom.root.onpointermove=function(t){x("mouseMove",t)},m.dom.root.onpointerup=function(t){x("mouseUp",t)}):(m.dom.root.onmousemove=function(t){x("mouseMove",t)},m.dom.root.onmousedown=function(t){x("mouseDown",t)},m.dom.root.onmouseup=function(t){x("mouseUp",t)}),m.initialFitDone=!1,m.on("changed",(function(){if(null!=v.itemsData){if(!v.initialFitDone&&!v.options.rollingMode)if(v.initialFitDone=!0,null!=v.options.start||null!=v.options.end){if(null==v.options.start||null==v.options.end)var t=v.getItemRange();var e=null!=v.options.start?v.options.start:t.min,i=null!=v.options.end?v.options.end:t.max;v.setWindow(e,i,{animation:!1})}else v.fit({animation:!1});v.initialDrawDone||!v.initialRangeChangeDone&&(v.options.start||v.options.end)&&!v.options.rollingMode||(v.initialDrawDone=!0,v.itemSet.initialDrawDone=!0,v.dom.root.style.visibility="visible",v.dom.loadingScreen.parentNode.removeChild(v.dom.loadingScreen),v.options.onInitialDrawComplete&&Zh((function(){return v.options.onInitialDrawComplete()}),0))}})),m.on("destroyTimeline",(function(){v.destroy()})),s&&m.setOptions(s),m.body.emitter.on("fit",(function(t){m._onFit(t),m.redraw()})),r&&m.setGroups(r),o&&m.setItems(o),m._redraw(),m}return So(i,[{key:"_createConfigurator",value:function(){return new EC(this,this.dom.container,DC)}},{key:"redraw",value:function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}},{key:"setOptions",value:function(t){if(!0===vC.validate(t,CC)&&console.log("%cErrors have been found in the supplied options object.",fC),Ik.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var e=this.itemsData;if(e){var i=this.getSelection();this.setItems(null),this.setItems(e.rawDS),this.setSelection(i)}}}},{key:"setItems",value:function(t){var e;this.itemsDone=!1,e=t?n.isDataViewLike("id",t)?Eb(t):Eb(new n.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;t?(Fh(t)&&(t=new n.DataSet(t)),e=new n.DataView(t,{filter:function(t){return!1!==t.visible}})):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=Fh(t)?t:[t],n=this.itemsData.get(i),o=null,r=null;if(hu(n).call(n,(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===o||e<o)&&(o=e),(null===r||i>r)&&(r=i)})),null!==o&&null!==r){var s=this,a=this.itemSet.items[i[0]],l=-1*this._getScrollTop(),h=null,u=function(){var t=MC(s,a);t.shouldScroll&&t.itemTop!=h.itemTop&&(s._setScrollTop(-t.scrollOffset),s._redraw())},c=!e||void 0===e.zoom||e.zoom,d=(o+r)/2,p=c?1.1*(r-o):Math.max(this.range.end-this.range.start,1.1*(r-o)),m=!e||void 0===e.animation||e.animation;m||(h={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.setRange(d-p/2,d+p/2,{animation:m},(function(){u(),Zh(u,100)}),(function(t,e,i){var n=MC(s,a);if(!1!==n&&(h||(h=n),h.itemTop!=n.itemTop||h.shouldScroll)){h.itemTop!=n.itemTop&&n.shouldScroll&&(h=n,l=-1*s._getScrollTop());var o=l,r=h.scrollOffset,u=i?r:o+(r-o)*t;s._setScrollTop(-u),e||s._redraw()}}))}}}},{key:"fit",value:function(t,e){var i,n=!t||void 0===t.animation||t.animation;1===this.itemsData.length&&void 0===this.itemsData.get()[0].end?(i=this.getDataRange(),this.moveTo(i.min.valueOf(),{animation:n},e)):(i=this.getItemRange(),this.range.setRange(i.min,i.max,{animation:n},e))}},{key:"getItemRange",value:function(){var t=this,e=this.getDataRange(),i=null!==e.min?e.min.valueOf():null,n=null!==e.max?e.max.valueOf():null,o=null,r=null;if(null!=i&&null!=n){var s=n-i;s<=0&&(s=10);var a=s/this.props.center.width,l={},h=0;if(hu(Pb).call(Pb,this.itemSet.items,(function(t,e){if(t.groupShowing){l[e]=t.redraw(!0),h=l[e].length}})),h>0)for(var u=function(t){hu(Pb).call(Pb,l,(function(e){e[t]()}))},c=0;c<h;c++)u(c);if(hu(Pb).call(Pb,this.itemSet.items,(function(e){var s,l,h=IC(e),u=PC(e);t.options.rtl?(s=h-(e.getWidthRight()+10)*a,l=u+(e.getWidthLeft()+10)*a):(s=h-(e.getWidthLeft()+10)*a,l=u+(e.getWidthRight()+10)*a),s<i&&(i=s,o=e),l>n&&(n=l,r=e)})),o&&r){var d=o.getWidthLeft()+10,p=r.getWidthRight()+10,m=this.props.center.width-d-p;m>0&&(this.options.rtl?(i=IC(o)-p*s/m,n=PC(r)+d*s/m):(i=IC(o)-d*s/m,n=PC(r)+p*s/m))}}return{min:null!=i?new Date(i):null,max:null!=n?new Date(n):null}}},{key:"getDataRange",value:function(){var t,e=null,i=null;this.itemsData&&hu(t=this.itemsData).call(t,(function(t){var n=Pb.convert(t.start,"Date").valueOf(),o=Pb.convert(null!=t.end?t.end:t.start,"Date").valueOf();(null===e||n<e)&&(e=n),(null===i||o>i)&&(i=o)}));return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}}},{key:"getEventProperties",value:function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=this.dom.centerContainer.getBoundingClientRect(),o=this.options.rtl?n.right-e:e-n.left,r=i-n.top,s=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),l=Ak.customTimeFromTarget(t),h=this.itemSet.options.snap||null,u=this.body.util.getScale(),c=this.body.util.getStep(),d=this._toTime(o),p=h?h(d,u,c):d,m=Pb.getTarget(t),f=null;return null!=s?f="item":null!=l?f="custom-time":Pb.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&Pb.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":Pb.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":Pb.hasParent(m,this.currentTime.bar)?f="current-time":Pb.hasParent(m,this.dom.center)&&(f="background"),{event:t,item:s?s.id:null,isCluster:!!s&&!!s.isCluster,items:s?s.items||[]:null,group:a?a.groupId:null,customTime:l?l.options.id:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:r,time:d,snappedTime:p}}},{key:"toggleRollingMode",value:function(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())}},{key:"_redraw",value:function(){Ik.prototype._redraw.call(this)}},{key:"_onFit",value:function(t){var e=t.start,i=t.end,n=t.animation;i?this.range.setRange(e,i,{animation:n}):this.moveTo(e.valueOf(),{animation:n})}}]),i}(Ik);function IC(t){return Pb.convert(t.data.start,"Date").valueOf()}function PC(t){var e=null!=t.data.end?t.data.end:t.data.start;return Pb.convert(e,"Date").valueOf()}function MC(t,e){if(!e.parent)return!1;var i=t.options.rtl?t.props.rightContainer.height:t.props.leftContainer.height,n=t.props.center.height,o=e.parent,r=o.top,s=!0,a=t.timeAxis.options.orientation.axis,l=function(){return"bottom"==a?o.height-e.top-e.height:e.top},h=-1*t._getScrollTop(),u=r+l(),c=e.height;return u<h?r+i<=r+l()+c&&(r+=l()-t.itemSet.options.margin.item.vertical):u+c>h+i?r+=l()+c-i+t.itemSet.options.margin.item.vertical:s=!1,{shouldScroll:s,scrollOffset:r=Math.min(r,n-i),itemTop:u}}function NC(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])}function FC(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i<t[e].redundant.length;i++)t[e].redundant[i].parentNode.removeChild(t[e].redundant[i]);t[e].redundant=[]}}function RC(t,e,i){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(n)):(n=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(n)),e[t].used.push(n),n}function LC(t,e,i,n){var o;return e.hasOwnProperty(t)?e[t].redundant.length>0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElement(t),void 0!==n?i.insertBefore(o,n):i.appendChild(o)):(o=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==n?i.insertBefore(o,n):i.appendChild(o)),e[t].used.push(o),o}function jC(t,e,i,n,o,r){var s;if("circle"==i.style?((s=RC("circle",n,o)).setAttributeNS(null,"cx",t),s.setAttributeNS(null,"cy",e),s.setAttributeNS(null,"r",.5*i.size)):((s=RC("rect",n,o)).setAttributeNS(null,"x",t-.5*i.size),s.setAttributeNS(null,"y",e-.5*i.size),s.setAttributeNS(null,"width",i.size),s.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&s.setAttributeNS(null,"style",i.styles),s.setAttributeNS(null,"class",i.className+" vis-point"),r){var a=RC("text",n,o);r.xOffset&&(t+=r.xOffset),r.yOffset&&(e+=r.yOffset),r.content&&(a.textContent=r.content),r.className&&a.setAttributeNS(null,"class",r.className+" vis-label"),a.setAttributeNS(null,"x",t),a.setAttributeNS(null,"y",e)}return s}function BC(t,e,i,n,o,r,s,a){if(0!=n){n<0&&(e-=n*=-1);var l=RC("rect",r,s);l.setAttributeNS(null,"x",t-.5*i),l.setAttributeNS(null,"y",e),l.setAttributeNS(null,"width",i),l.setAttributeNS(null,"height",n),l.setAttributeNS(null,"class",o),a&&l.setAttributeNS(null,"style",a)}}var zC=function(){function t(e,i,n,o,r,s){var a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],l=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(bo(this,t),this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=r,this.majorCharHeight=s,this._start=e,this._end=i,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=a,this.autoScaleStart=n,this.autoScaleEnd=o,this.formattingFunction=l,n||o){var h=this,u=function(t){var e=t-t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx]);return t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx])>h.magnitudefactor*h.minorSteps[h.minorStepIdx]*.5?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};n&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=u(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=u(this._end)),this.determineScale()}}return So(t,[{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;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var n=0;i<0&&(n=i);for(var o=!1,r=n;Math.abs(r)<=Math.abs(i);r++){this.magnitudefactor=Math.pow(10,r);for(var s=0;s<this.minorSteps.length;s++){if(this.magnitudefactor*this.minorSteps[s]>=e){o=!0,this.minorStepIdx=s;break}}if(!0===o)break}}},{key:"is_major",value:function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])==0}},{key:"getStep",value:function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}},{key:"getFirstMajor",value:function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)}},{key:"formatValue",value:function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?"".concat(e):"string"==typeof e?e:t.toPrecision(5)}},{key:"getLines",value:function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,n=this._start+i;this._end-n>1e-5;n+=e)n!=this._start&&t.push({major:this.is_major(n),y:this.convertValue(n),val:this.formatValue(n)});return t}},{key:"followScale",value:function(t){var e=this.minorStepIdx,i=this._start,n=this._end,o=this,r=function(){o.magnitudefactor*=2},s=function(){o.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,2==e||r(),r()):(this.minorStepIdx=2,1==e||s(),s()));for(var a=t.convertValue(0),l=t.getStep()*t.scale,h=!1,u=0;!h&&u++<5;){this.scale=l/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);var c=this.containerHeight/this.scale;this._start=i,this._end=this._start+c;var d=this._end*this.scale,p=this.magnitudefactor*this.majorSteps[this.minorStepIdx],m=this.getFirstMajor()-t.getFirstMajor();if(this.zeroAlign){var f=a-d;this._end+=f/this.scale,this._start=this._end-c}else this.autoScaleStart?(this._start-=m/this.scale,this._end=this._start+c):(this._start+=p-m/this.scale,this._end=this._start+c);if(!this.autoScaleEnd&&this._end>n+1e-5)s(),h=!1;else{if(!this.autoScaleStart&&this._start<i-1e-5){if(!(this.zeroAlign&&i>=0)){s(),h=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&c<n-i?(r(),h=!1):h=!0}}}},{key:"convertValue",value:function(t){return this.containerHeight-(t-this._start)*this.scale}},{key:"screenToValue",value:function(t){return(this.containerHeight-t)/this.scale+this._start}}]),t}();function HC(t,e){var i=void 0!==Ad&&id(t)||t["@@iterator"];if(!i){if(Fh(t)||(i=function(t,e){var i;if(!t)return;if("string"==typeof t)return GC(t,e);var n=Rd(i=Object.prototype.toString.call(t)).call(i,8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return ed(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GC(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}function GC(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function VC(t){var e=function(){if("undefined"==typeof Reflect||!yo)return!1;if(yo.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(yo(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,n=Mh(t);if(e){var o=Mh(this).constructor;i=yo(n,arguments,o)}else i=n.apply(this,arguments);return Th(this,i)}}var WC=function(t){zo(i,t);var e=VC(i);function i(t,n,o,r){var s;bo(this,i),(s=e.call(this)).id=_b(),s.body=t,s.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(Gb(t.toPrecision(3)))},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:function(t){return"".concat(Gb(t.toPrecision(3)))},title:{text:void 0,style:void 0}}},s.linegraphOptions=r,s.linegraphSVG=o,s.props={},s.DOMelements={lines:{},labels:{},title:{}},s.dom={},s.scale=void 0,s.range={start:0,end:0},s.options=Pb.extend({},s.defaultOptions),s.conversionFactor=1,s.setOptions(n),s.width=Number("".concat(s.options.width).replace("px","")),s.minWidth=s.width,s.height=s.linegraphSVG.getBoundingClientRect().height,s.hidden=!1,s.stepPixels=25,s.zeroCrossing=-1,s.amountOfSteps=-1,s.lineOffset=0,s.master=!0,s.masterAxis=null,s.svgElements={},s.iconsRemoved=!1,s.groups={},s.amountOfGroups=0,s._create(),null==s.scale&&s._redrawLabels(),s.framework={svg:s.svg,svgElements:s.svgElements,options:s.options,groups:s.groups};var a=To(s);return s.body.emitter.on("verticalDrag",(function(){a.dom.lineContainer.style.top="".concat(a.body.domProps.scrollTop,"px")})),s}return So(i,[{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){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)}},{key:"setOptions",value:function(t){if(t){var e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);Pb.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","")),!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(){var t;NC(this.svgElements);var e=this.options.iconWidth,i=11.5;t="left"===this.options.orientation?4:this.width-e-4;var n=mc(this.groups);Nw(n).call(n,(function(t,e){return t<e?-1:1}));var o,r=HC(n);try{for(r.s();!(o=r.n()).done;){var s=o.value;!0!==this.groups[s].visible||void 0!==this.linegraphOptions.visibility[s]&&!0!==this.linegraphOptions.visibility[s]||(this.groups[s].getLegend(e,15,this.framework,t,i),i+=19)}}catch(t){r.e(t)}finally{r.f()}FC(this.svgElements),this.iconsRemoved=!1}},{key:"_cleanupIcons",value:function(){!1===this.iconsRemoved&&(NC(this.svgElements),FC(this.svgElements),this.iconsRemoved=!0)}},{key:"show",value:function(){this.hidden=!1,this.dom.frame.parentNode||("left"===this.options.orientation?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer),this.dom.lineContainer.style.display="block"}},{key:"hide",value:function(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.style.display="none"}},{key:"setRange",value:function(t,e){this.range.start=t,this.range.end=e}},{key:"redraw",value:function(){var t=!1,e=0;for(var i in this.dom.lineContainer.style.top="".concat(this.body.domProps.scrollTop,"px"),this.groups)this.groups.hasOwnProperty(i)&&(!0!==this.groups[i].visible||void 0!==this.linegraphOptions.visibility[i]&&!0!==this.linegraphOptions.visibility[i]||e++);if(0===this.amountOfGroups||0===e)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace("px","")),this.dom.lineContainer.style.height="".concat(this.height,"px"),this.width=!0===this.options.visible?Number("".concat(this.options.width).replace("px","")):0;var n=this.props,o=this.dom.frame;o.className="vis-data-axis",this._calculateCharSize();var r=this.options.orientation,s=this.options.showMinorLabels,a=this.options.showMajorLabels,l=this.body.dom.backgroundHorizontal.offsetWidth;n.minorLabelHeight=s?n.minorCharHeight:0,n.majorLabelHeight=a?n.majorCharHeight:0,n.minorLineWidth=l-this.lineOffset-this.width+2*this.options.minorLinesOffset,n.minorLineHeight=1,n.majorLineWidth=l-this.lineOffset-this.width+2*this.options.majorLinesOffset,n.majorLineHeight=1,"left"===r?(o.style.top="0",o.style.left="0",o.style.bottom="",o.style.width="".concat(this.width,"px"),o.style.height="".concat(this.height,"px"),this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(o.style.top="",o.style.bottom="0",o.style.left="0",o.style.width="".concat(this.width,"px"),o.style.height="".concat(this.height,"px"),this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),t=this._redrawLabels(),t=this._isResized()||t,!0===this.options.icons?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(r)}return t}},{key:"_redrawLabels",value:function(){var t=this,e=!1;NC(this.DOMelements.lines),NC(this.DOMelements.labels);var i=this.options.orientation,n=null!=this.options[i].range?this.options[i].range:{},o=!0;null!=n.max&&(this.range.end=n.max,o=!1);var r=!0;null!=n.min&&(this.range.start=n.min,r=!1),this.scale=new zC(this.range.start,this.range.end,r,o,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[i].format),!1===this.master&&null!=this.masterAxis?(this.scale.followScale(this.masterAxis.scale),this.dom.lineContainer.style.display="none"):this.dom.lineContainer.style.display="block",this.maxLabelSize=0;var s=this.scale.getLines();hu(s).call(s,(function(e){var n=e.y,o=e.major;t.options.showMinorLabels&&!1===o&&t._redrawLabel(n-2,e.val,i,"vis-y-axis vis-minor",t.props.minorCharHeight),o&&n>=0&&t._redrawLabel(n-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),!0===t.master&&(o?t._redrawLine(n,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(n,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))}));var a=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(a=this.props.titleCharHeight);var l=!0===this.options.icons?Math.max(this.options.iconWidth,a)+this.options.labelOffsetX+15:a+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&!0===this.options.visible?(this.width=this.maxLabelSize+l,this.options.width="".concat(this.width,"px"),FC(this.DOMelements.lines),FC(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSize<this.width-l&&!0===this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width="".concat(this.width,"px"),FC(this.DOMelements.lines),FC(this.DOMelements.labels),this.redraw(),e=!0):(FC(this.DOMelements.lines),FC(this.DOMelements.labels),e=!1),e}},{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=LC("div",this.DOMelements.labels,this.dom.frame);r.className=n,r.innerHTML=Pb.xss(e),"left"===i?(r.style.left="-".concat(this.options.labelOffsetX,"px"),r.style.textAlign="right"):(r.style.right="-".concat(this.options.labelOffsetX,"px"),r.style.textAlign="left"),r.style.top="".concat(t-.5*o+this.options.labelOffsetY,"px"),e+="";var s=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*s&&(this.maxLabelSize=e.length*s)}},{key:"_redrawLine",value:function(t,e,i,n,o){if(!0===this.master){var r=LC("div",this.DOMelements.lines,this.dom.lineContainer);r.className=i,r.innerHTML="","left"===e?r.style.left="".concat(this.width-n,"px"):r.style.right="".concat(this.width-n,"px"),r.style.width="".concat(o,"px"),r.style.top="".concat(t,"px")}}},{key:"_redrawTitle",value:function(t){if(NC(this.DOMelements.title),void 0!==this.options[t].title&&void 0!==this.options[t].title.text){var e=LC("div",this.DOMelements.title,this.dom.frame);e.className="vis-y-axis vis-title vis-".concat(t),e.innerHTML=Pb.xss(this.options[t].title.text),void 0!==this.options[t].title.style&&Pb.addCssText(e,this.options[t].title.style),"left"===t?e.style.left="".concat(this.props.titleCharHeight,"px"):e.style.right="".concat(this.props.titleCharHeight,"px"),e.style.width="".concat(this.height,"px")}FC(this.DOMelements.title)}},{key:"_calculateCharSize",value:function(){if(!("minorCharHeight"in this.props)){var t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-minor vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.minorCharHeight=e.clientHeight,this.props.minorCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}if(!("majorCharHeight"in this.props)){var i=document.createTextNode("0"),n=document.createElement("div");n.className="vis-y-axis vis-major vis-measure",n.appendChild(i),this.dom.frame.appendChild(n),this.props.majorCharHeight=n.clientHeight,this.props.majorCharWidth=n.clientWidth,this.dom.frame.removeChild(n)}if(!("titleCharHeight"in this.props)){var o=document.createTextNode("0"),r=document.createElement("div");r.className="vis-y-axis vis-title vis-measure",r.appendChild(o),this.dom.frame.appendChild(r),this.props.titleCharHeight=r.clientHeight,this.props.titleCharWidth=r.clientWidth,this.dom.frame.removeChild(r)}}}]),i}(Vb);function YC(t,e){}function UC(t,e){return{style:(e=void 0===e?{}:e).style||t.options.drawPoints.style,styles:e.styles||t.options.drawPoints.styles,size:e.size||t.options.drawPoints.size,className:e.className||t.className}}function XC(t,e){}function qC(t,e){}function KC(t,e,i,n){this.id=e;this.options=Pb.selectiveBridgeObject(["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"],i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=n,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible||t.visible}function $C(t,e,i,n){this.body=t,this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-right"}},this.side=i,this.options=Pb.extend({},this.defaultOptions),this.linegraphOptions=n,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.setOptions(e)}YC.draw=function(t,e,i,n){n=n||0;for(var o=function(t,e){var i=void 0;t.options&&t.options.drawPoints&&t.options.drawPoints.onRender&&"function"==typeof t.options.drawPoints.onRender&&(i=t.options.drawPoints.onRender);e.group.options&&e.group.options.drawPoints&&e.group.options.drawPoints.onRender&&"function"==typeof e.group.options.drawPoints.onRender&&(i=e.group.options.drawPoints.onRender);return i}(i,e),r=0;r<t.length;r++)if(o){var s=o(t[r],e);!0!==s&&"object"!==Sh(s)||jC(t[r].screen_x+n,t[r].screen_y,UC(e,s),i.svgElements,i.svg,t[r].label)}else jC(t[r].screen_x+n,t[r].screen_y,UC(e),i.svgElements,i.svg,t[r].label)},YC.drawIcon=function(t,e,i,n,o,r){var s=.5*o,a=RC("rect",r.svgElements,r.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-s),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*s),a.setAttributeNS(null,"class","vis-outline"),jC(e+.5*n,i,UC(t),r.svgElements,r.svg)},XC.drawIcon=function(t,e,i,n,o,r){var s=.5*o,a=RC("rect",r.svgElements,r.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-s),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*s),a.setAttributeNS(null,"class","vis-outline");var l=Math.round(.3*n),h=t.options.barChart.width/l,u=Math.round(.4*o),c=Math.round(.75*o),d=Math.round((n-2*l)/3);if(BC(e+.5*l+d,i+s-u-1,l,u,t.className+" vis-bar",r.svgElements,r.svg,t.style),BC(e+1.5*l+d+2,i+s-c-1,l,c,t.className+" vis-bar",r.svgElements,r.svg,t.style),1==t.options.drawPoints.enabled){var p={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size/h,className:t.className};jC(e+.5*l+d,i+s-u-1,p,r.svgElements,r.svg),jC(e+1.5*l+d+2,i+s-c-1,p,r.svgElements,r.svg)}},XC.draw=function(t,e,i){var n,o,r,s,a,l,h=[],u={},c=0;for(a=0;a<t.length;a++)if("bar"===(s=i.groups[t[a]]).options.style&&!0===s.visible&&(void 0===i.options.groups.visibility[t[a]]||!0===i.options.groups.visibility[t[a]]))for(l=0;l<e[t[a]].length;l++)h.push({screen_x:e[t[a]][l].screen_x,screen_end:e[t[a]][l].screen_end,screen_y:e[t[a]][l].screen_y,x:e[t[a]][l].x,end:e[t[a]][l].end,y:e[t[a]][l].y,groupId:t[a],label:e[t[a]][l].label}),c+=1;if(0!==c)for(Nw(h).call(h,(function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x})),XC._getDataIntersections(u,h),a=0;a<h.length;a++){var d=null!=(s=i.groups[h[a].groupId]).options.barChart.minWidth?s.options.barChart.minWidth:.1*s.options.barChart.width,p=0;if(void 0===u[o=h[a].screen_x])a+1<h.length&&(n=Math.abs(h[a+1].screen_x-o)),r=XC._getSafeDrawData(n,s,d);else{var m=a+(u[o].amount-u[o].resolved);m<h.length&&(n=Math.abs(h[m].screen_x-o)),r=XC._getSafeDrawData(n,s,d),u[o].resolved+=1,!0===s.options.stack&&!0!==s.options.excludeFromStacking?h[a].screen_y<s.zeroPosition?(p=u[o].accumulatedNegative,u[o].accumulatedNegative+=s.zeroPosition-h[a].screen_y):(p=u[o].accumulatedPositive,u[o].accumulatedPositive+=s.zeroPosition-h[a].screen_y):!0===s.options.barChart.sideBySide&&(r.width=r.width/u[o].amount,r.offset+=u[o].resolved*r.width-.5*r.width*(u[o].amount+1))}var f=r.width,v=h[a].screen_x;if(null!=h[a].screen_end?v+=.5*(f=h[a].screen_end-h[a].screen_x):v+=r.offset,BC(v,h[a].screen_y-p,f,s.zeroPosition-h[a].screen_y,s.className+" vis-bar",i.svgElements,i.svg,s.style),!0===s.options.drawPoints.enabled){var g={screen_x:h[a].screen_x,screen_y:h[a].screen_y-p,x:h[a].x,y:h[a].y,groupId:h[a].groupId,label:h[a].label};YC.draw([g],s,i,r.offset)}}},XC._getDataIntersections=function(t,e){for(var i,n=0;n<e.length;n++)n+1<e.length&&(i=Math.abs(e[n+1].screen_x-e[n].screen_x)),n>0&&(i=Math.min(i,Math.abs(e[n-1].screen_x-e[n].screen_x))),0===i&&(void 0===t[e[n].screen_x]&&(t[e[n].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[n].screen_x].amount+=1)},XC._getSafeDrawData=function(t,e,i){var n,o;return t<e.options.barChart.width&&t>0?(n=t<i?i:t,o=0,"left"===e.options.barChart.align?o-=.5*t:"right"===e.options.barChart.align&&(o+=.5*t)):(n=e.options.barChart.width,o=0,"left"===e.options.barChart.align?o-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(o+=.5*e.options.barChart.width)),{width:n,offset:o}},XC.getStackedYRange=function(t,e,i,n,o){if(t.length>0){Nw(t).call(t,(function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x}));var r={};XC._getDataIntersections(r,t),e[n]=XC._getStackedYRange(r,t),e[n].yAxisOrientation=o,i.push(n)}},XC._getStackedYRange=function(t,e){for(var i,n=e[0].screen_y,o=e[0].screen_y,r=0;r<e.length;r++)void 0===t[i=e[r].screen_x]?(n=n>e[r].screen_y?e[r].screen_y:n,o=o<e[r].screen_y?e[r].screen_y:o):e[r].screen_y<0?t[i].accumulatedNegative+=e[r].screen_y:t[i].accumulatedPositive+=e[r].screen_y;for(var s in t)t.hasOwnProperty(s)&&(n=(n=n>t[s].accumulatedNegative?t[s].accumulatedNegative:n)>t[s].accumulatedPositive?t[s].accumulatedPositive:n,o=(o=o<t[s].accumulatedNegative?t[s].accumulatedNegative:o)<t[s].accumulatedPositive?t[s].accumulatedPositive:o);return{min:n,max:o}},qC.calcPath=function(t,e){if(null!=t&&t.length>0){return 1==e.options.interpolation.enabled?qC._catmullRom(t,e):qC._linear(t)}},qC.drawIcon=function(t,e,i,n,o,r){var s,a,l=.5*o,h=RC("rect",r.svgElements,r.svg);(h.setAttributeNS(null,"x",e),h.setAttributeNS(null,"y",i-l),h.setAttributeNS(null,"width",n),h.setAttributeNS(null,"height",2*l),h.setAttributeNS(null,"class","vis-outline"),(s=RC("path",r.svgElements,r.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&s.setAttributeNS(null,"style",t.style),s.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+n)+","+i),1==t.options.shaded.enabled&&(a=RC("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-l)+"L"+e+","+i+" L"+(e+n)+","+i+" L"+(e+n)+","+(i-l)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+l)+" L"+(e+n)+","+(i+l)+"L"+(e+n)+","+i),a.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&a.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled)&&jC(e+.5*n,i,{style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className},r.svgElements,r.svg)},qC.drawShading=function(t,e,i,n){if(1==e.options.shaded.enabled){var o,r=Number(n.svg.style.height.replace("px","")),s=RC("path",n.svgElements,n.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var l=0;l="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?r:Math.min(Math.max(0,e.zeroPosition),r),o="group"==e.options.shaded.orientation&&null!=i&&null!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+l+" H"+t[0][0]+" Z",s.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&s.setAttributeNS(null,"style",e.options.shaded.style),s.setAttributeNS(null,"d",o)}},qC.draw=function(t,e,i){if(null!=t&&null!=t){var n=RC("path",i.svgElements,i.svg);n.setAttributeNS(null,"class",e.className),void 0!==e.style&&n.setAttributeNS(null,"style",e.style);var o="L";1==e.options.interpolation.enabled&&(o="C"),n.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,o,!1))}},qC.serializePath=function(t,e,i){if(t.length<2)return"";var n,o=e;if(i)for(n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(n=1;n<t.length;n++)o+=t[n][0]+","+t[n][1]+" ";return o},qC._catmullRomUniform=function(t){var e,i,n,o,r,s,a=[];a.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var l=1/6,h=t.length,u=0;u<h-1;u++)e=0==u?t[0]:t[u-1],i=t[u],n=t[u+1],o=u+2<h?t[u+2]:n,r={screen_x:(-e.screen_x+6*i.screen_x+n.screen_x)*l,screen_y:(-e.screen_y+6*i.screen_y+n.screen_y)*l},s={screen_x:(i.screen_x+6*n.screen_x-o.screen_x)*l,screen_y:(i.screen_y+6*n.screen_y-o.screen_y)*l},a.push([r.screen_x,r.screen_y]),a.push([s.screen_x,s.screen_y]),a.push([n.screen_x,n.screen_y]);return a},qC._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var n,o,r,s,a,l,h,u,c,d,p,m,f,v,g,y,b,w,k,_=[];_.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var x=t.length,C=0;C<x-1;C++)n=0==C?t[0]:t[C-1],o=t[C],r=t[C+1],s=C+2<x?t[C+2]:r,h=Math.sqrt(Math.pow(n.screen_x-o.screen_x,2)+Math.pow(n.screen_y-o.screen_y,2)),u=Math.sqrt(Math.pow(o.screen_x-r.screen_x,2)+Math.pow(o.screen_y-r.screen_y,2)),c=Math.sqrt(Math.pow(r.screen_x-s.screen_x,2)+Math.pow(r.screen_y-s.screen_y,2)),v=Math.pow(c,i),y=Math.pow(c,2*i),g=Math.pow(u,i),b=Math.pow(u,2*i),k=Math.pow(h,i),d=2*(w=Math.pow(h,2*i))+3*k*g+b,p=2*y+3*v*g+b,(m=3*k*(k+g))>0&&(m=1/m),(f=3*v*(v+g))>0&&(f=1/f),a={screen_x:(-b*n.screen_x+d*o.screen_x+w*r.screen_x)*m,screen_y:(-b*n.screen_y+d*o.screen_y+w*r.screen_y)*m},l={screen_x:(y*o.screen_x+p*r.screen_x-b*s.screen_x)*f,screen_y:(y*o.screen_y+p*r.screen_y-b*s.screen_y)*f},0==a.screen_x&&0==a.screen_y&&(a=o),0==l.screen_x&&0==l.screen_y&&(l=r),_.push([a.screen_x,a.screen_y]),_.push([l.screen_x,l.screen_y]),_.push([r.screen_x,r.screen_y]);return _},qC._linear=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i].screen_x,t[i].screen_y]);return e},KC.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==Nw(this.options)&&Pb.insertSort(this.itemsData,(function(t,e){return t.x>e.x?1:-1}))):this.itemsData=[]},KC.prototype.getItems=function(){return this.itemsData},KC.prototype.setZeroPosition=function(t){this.zeroPosition=t},KC.prototype.setOptions=function(t){if(void 0!==t){Pb.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),Pb.mergeOptions(this.options,t,"interpolation"),Pb.mergeOptions(this.options,t,"drawPoints"),Pb.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==Sh(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},KC.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)},KC.prototype.getLegend=function(t,e,i,n,o){null!=i&&null!=i||(i={svg:document.createElementNS("http://www.w3.org/2000/svg","svg"),svgElements:{},options:this.options,groups:[this]});switch(null!=n&&null!=n||(n=0),null!=o&&null!=o||(o=.5*e),this.options.style){case"line":qC.drawIcon(this,n,o,t,e,i);break;case"points":case"point":YC.drawIcon(this,n,o,t,e,i);break;case"bar":XC.drawIcon(this,n,o,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},KC.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,n=0;n<t.length;n++)e=e>t[n].y?t[n].y:e,i=i<t[n].y?t[n].y:i;return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}},$C.prototype=new Vb,$C.prototype.clear=function(){this.groups={},this.amountOfGroups=0},$C.prototype.addGroup=function(t,e){1!=e.options.excludeFromLegend&&(this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1)},$C.prototype.updateGroup=function(t,e){this.groups[t]=e},$C.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},$C.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-legend",this.dom.frame.style.position="absolute",this.dom.frame.style.top="10px",this.dom.frame.style.display="block",this.dom.textArea=document.createElement("div"),this.dom.textArea.className="vis-legend-text",this.dom.textArea.style.position="relative",this.dom.textArea.style.top="0px",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.width=this.options.iconSize+5+"px",this.svg.style.height="100%",this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},$C.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},$C.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},$C.prototype.setOptions=function(t){Pb.selectiveDeepExtend(["enabled","orientation","icons","left","right"],this.options,t)},$C.prototype.redraw=function(){var t=0,e=mc(this.groups);Nw(e).call(e,(function(t,e){return t<e?-1:1}));for(var i=0;i<e.length;i++){var n=e[i];1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||t++}if(0==this.options[this.side].visible||0==this.amountOfGroups||0==this.options.enabled||0==t)this.hide();else{if(this.show(),"top-left"==this.options[this.side].position||"bottom-left"==this.options[this.side].position?(this.dom.frame.style.left="4px",this.dom.frame.style.textAlign="left",this.dom.textArea.style.textAlign="left",this.dom.textArea.style.left=this.options.iconSize+15+"px",this.dom.textArea.style.right="",this.svg.style.left="0px",this.svg.style.right=""):(this.dom.frame.style.right="4px",this.dom.frame.style.textAlign="right",this.dom.textArea.style.textAlign="right",this.dom.textArea.style.right=this.options.iconSize+15+"px",this.dom.textArea.style.left="",this.svg.style.right="0px",this.svg.style.left=""),"top-left"==this.options[this.side].position||"top-right"==this.options[this.side].position)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.bottom="";else{var o=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+o+Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.top=""}0==this.options.icons?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+"px",this.dom.textArea.style.right="",this.dom.textArea.style.left="",this.svg.style.width="0px"):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+"px",this.drawLegendIcons());var r="";for(i=0;i<e.length;i++)n=e[i],1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||(r+=this.groups[n].content+"<br />");this.dom.textArea.innerHTML=Pb.xss(r),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},$C.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=mc(this.groups);Nw(t).call(t,(function(t,e){return t<e?-1:1})),NC(h=this.svgElements),FC(h),NC(h);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),n=i,o=this.options.iconSize,r=.75*this.options.iconSize,s=i+.5*r+3;this.svg.style.width=o+5+i+"px";for(var a=0;a<t.length;a++){var l=t[a];1!=this.groups[l].visible||void 0!==this.linegraphOptions.visibility[l]&&1!=this.linegraphOptions.visibility[l]||(this.groups[l].getLegend(o,r,this.framework,n,s),s+=r+this.options.iconSpacing)}}var h};var ZC="__ungrouped__";function QC(t,e){this.id=_b(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=Pb.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,n){i._onAdd(e.items)},update:function(t,e,n){i._onUpdate(e.items)},remove:function(t,e,n){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,n){i._onAddGroups(e.items)},update:function(t,e,n){i._onUpdateGroups(e.items)},remove:function(t,e,n){i._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",(function(){i.svg.style.left=Pb.option.asSize(-i.props.width),i.forceGraphUpdate=!0,i.redraw.call(i)})),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}QC.prototype=new Vb,QC.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new WC(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new WC(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new $C(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new $C(this.body,this.options.legend,"right",this.options.groups),this.show()},QC.prototype.setOptions=function(t){if(t){void 0===t.graphHeight&&void 0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&Om((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),Pb.selectiveDeepExtend(["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"],this.options,t),Pb.mergeOptions(this.options,t,"interpolation"),Pb.mergeOptions(this.options,t,"drawPoints"),Pb.mergeOptions(this.options,t,"shaded"),Pb.mergeOptions(this.options,t,"legend"),t.interpolation&&"object"==Sh(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5)),this.yAxisLeft&&void 0!==t.dataAxis&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&void 0!==t.legend&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),this.groups.hasOwnProperty(ZC)&&this.groups[ZC].setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},QC.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},QC.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},QC.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!n.isDataViewLike("id",t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=Eb(t)}else this.itemsData=null;if(o&&(hu(Pb).call(Pb,this.itemListeners,(function(t,e){o.off(e,t)})),o.dispose(),e=o.getIds(),this._onRemove(e)),this.itemsData){var r=this.id;hu(Pb).call(Pb,this.itemListeners,(function(t,e){i.itemsData.on(e,t,r)})),e=this.itemsData.getIds(),this._onAdd(e)}},QC.prototype.setGroups=function(t){var e,i=this;if(this.groupsData){hu(Pb).call(Pb,this.groupListeners,(function(t,e){i.groupsData.off(e,t)})),e=this.groupsData.getIds(),this.groupsData=null;for(var o=0;o<e.length;o++)this._removeGroup(e[o])}if(t){if(!n.isDataViewLike("id",t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var r=this.id;hu(Pb).call(Pb,this.groupListeners,(function(t,e){i.groupsData.on(e,t,r)})),e=this.groupsData.getIds(),this._onAddGroups(e)}},QC.prototype._onUpdate=function(t){this._updateAllGroupData(t)},QC.prototype._onAdd=function(t){this._onUpdate(t)},QC.prototype._onRemove=function(t){this._onUpdate(t)},QC.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)},QC.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},QC.prototype._onRemoveGroups=function(t){for(var e=0;e<t.length;e++)this._removeGroup(t[e]);this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})},QC.prototype._removeGroup=function(t){this.groups.hasOwnProperty(t)&&("right"==this.groups[t].options.yAxisOrientation?(this.yAxisRight.removeGroup(t),this.legendRight.removeGroup(t),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(t),this.legendLeft.removeGroup(t),this.legendLeft.redraw()),delete this.groups[t])},QC.prototype._updateGroup=function(t,e){this.groups.hasOwnProperty(e)?(this.groups[e].update(t),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.updateGroup(e,this.groups[e]),this.legendRight.updateGroup(e,this.groups[e]),this.yAxisLeft.removeGroup(e),this.legendLeft.removeGroup(e)):(this.yAxisLeft.updateGroup(e,this.groups[e]),this.legendLeft.updateGroup(e,this.groups[e]),this.yAxisRight.removeGroup(e),this.legendRight.removeGroup(e))):(this.groups[e]=new KC(t,e,this.options,this.groupsUsingDefaultStyles),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.addGroup(e,this.groups[e]),this.legendRight.addGroup(e,this.groups[e])):(this.yAxisLeft.addGroup(e,this.groups[e]),this.legendLeft.addGroup(e,this.groups[e]))),this.legendLeft.redraw(),this.legendRight.redraw()},QC.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){var i={},n=this.itemsData.get(),o=this.itemsData.idProp,r={};t&&Ku(t).call(t,(function(t){r[t]=t}));for(var s={},a=0;a<n.length;a++){var l=n[a],h=l.group;null==h&&(h=ZC),s.hasOwnProperty(h)?s[h]++:s[h]=1}var u={};if(!e&&t)for(h in this.groups)if(this.groups.hasOwnProperty(h)){var c=(f=this.groups[h]).getItems();i[h]=gu(c).call(c,(function(t){return u[t[o]]=t[o],t[o]!==r[t[o]]}));var d=s[h];s[h]-=i[h].length,i[h].length<d&&(i[h][d-1]={})}for(a=0;a<n.length;a++)if(null==(h=(l=n[a]).group)&&(h=ZC),e||!t||l[o]===r[l[o]]||!u.hasOwnProperty(l[o])){i.hasOwnProperty(h)||(i[h]=new Array(s[h]));var p=Pb.bridgeObject(l);p.x=Pb.convert(l.x,"Date"),p.end=Pb.convert(l.end,"Date"),p.orginalY=l.y,p.y=Number(l.y),p[o]=l[o];var m=i[h].length-s[h]--;i[h][m]=p}for(h in this.groups)this.groups.hasOwnProperty(h)&&(i.hasOwnProperty(h)||(i[h]=new Array(0)));for(h in i)if(i.hasOwnProperty(h))if(0==i[h].length)this.groups.hasOwnProperty(h)&&this._removeGroup(h);else{var f=void 0;null!=this.groupsData&&(f=this.groupsData.get(h)),null==f&&(f={id:h,content:this.options.defaultGroup+h}),this._updateGroup(f,h),this.groups[h].setItems(i[h])}this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})}},QC.prototype.redraw=function(){var t=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom,t=this._isResized()||t;var e,i=this.body.range.end-this.body.range.start,n=i!=this.lastVisibleInterval;(this.lastVisibleInterval=i,1==t)&&(this.svg.style.width=Pb.option.asSize(3*this.props.width),this.svg.style.left=Pb.option.asSize(-this.props.width),-1==zm(e=this.options.height+"").call(e,"%")&&1!=this.updateSVGheightOnResize||(this.updateSVGheight=!0));if(1==this.updateSVGheight?(this.options.graphHeight!=this.props.height+"px"&&(this.options.graphHeight=this.props.height+"px",this.svg.style.height=this.props.height+"px"),this.updateSVGheight=!1):this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",1==t||1==n||1==this.abortedGraphUpdate||1==this.forceGraphUpdate)t=this._updateGraph()||t,this.forceGraphUpdate=!1,this.lastStart=this.body.range.start,this.svg.style.left=-this.props.width+"px";else if(0!=this.lastStart){var o=this.body.range.start-this.lastStart,r=this.body.range.end-this.body.range.start;if(0!=this.props.width){var s=o*(this.props.width/r);this.svg.style.left=-this.props.width-s+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),t},QC.prototype._getSortedGroupIds=function(){var t=[];for(var e in this.groups)if(this.groups.hasOwnProperty(e)){var i=this.groups[e];1!=i.visible||void 0!==this.options.groups.visibility[e]&&1!=this.options.groups.visibility[e]||t.push({id:e,zIndex:i.options.zIndex})}Pb.insertSort(t,(function(t,e){var i=t.zIndex,n=e.zIndex;return void 0===i&&(i=0),void 0===n&&(n=0),i==n?0:i<n?-1:1}));for(var n=new Array(t.length),o=0;o<t.length;o++)n[o]=t[o].id;return n},QC.prototype._updateGraph=function(){if(NC(this.svgElements),0!=this.props.width&&null!=this.itemsData){var t,e,i={},n=this.body.util.toGlobalTime(-this.body.domProps.root.width),o=this.body.util.toGlobalTime(2*this.body.domProps.root.width),r=this._getSortedGroupIds();if(r.length>0){var s={};for(this._getRelevantData(r,s,n,o),this._applySampling(r,s),e=0;e<r.length;e++)this._convertXcoordinates(s[r[e]]);if(this._getYRanges(r,s,i),1==this._updateYAxis(r,i))return FC(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var a=void 0;for(e=0;e<r.length;e++)t=this.groups[r[e]],!0===this.options.stack&&"line"===this.options.style&&(null!=t.options.excludeFromStacking&&t.options.excludeFromStacking||(null!=a&&(this._stack(s[t.id],s[a.id]),1==t.options.shaded.enabled&&"group"!==t.options.shaded.orientation&&("top"==t.options.shaded.orientation&&"group"!==a.options.shaded.orientation?(a.options.shaded.orientation="group",a.options.shaded.groupId=t.id):(t.options.shaded.orientation="group",t.options.shaded.groupId=a.id))),a=t)),this._convertYcoordinates(s[r[e]],t);var l={};for(e=0;e<r.length;e++)if("line"===(t=this.groups[r[e]]).options.style&&1==t.options.shaded.enabled){var h=s[r[e]];if(null==h||0==h.length)continue;if(l.hasOwnProperty(r[e])||(l[r[e]]=qC.calcPath(h,t)),"group"===t.options.shaded.orientation){var u=t.options.shaded.groupId;if(-1===zm(r).call(r,u)){console.log(t.id+": Unknown shading group target given:"+u);continue}l.hasOwnProperty(u)||(l[u]=qC.calcPath(s[u],this.groups[u])),qC.drawShading(l[r[e]],t,l[u],this.framework)}else qC.drawShading(l[r[e]],t,void 0,this.framework)}for(XC.draw(r,s,this.framework),e=0;e<r.length;e++)if(t=this.groups[r[e]],s[r[e]].length>0)switch(t.options.style){case"line":l.hasOwnProperty(r[e])||(l[r[e]]=qC.calcPath(s[r[e]],t)),qC.draw(l[r[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||YC.draw(s[r[e]],t,this.framework)}}}return FC(this.svgElements),!1},QC.prototype._stack=function(t,e){var i,n,o,r,s;i=0;for(var a=0;a<t.length;a++){r=void 0,s=void 0;for(var l=i;l<e.length;l++){if(e[l].x===t[a].x){r=e[l],s=e[l],i=l;break}if(e[l].x>t[a].x){s=e[l],r=0==l?s:e[l-1],i=l;break}}void 0===s&&(r=e[e.length-1],s=e[e.length-1]),n=s.x-r.x,o=s.y-r.y,t[a].y=0==n?t[a].orginalY+s.y:t[a].orginalY+o/n*(t[a].x-r.x)+r.y}},QC.prototype._getRelevantData=function(t,e,i,n){var o,r,s,a;if(t.length>0)for(r=0;r<t.length;r++){var l=(o=this.groups[t[r]]).getItems();if(1==Nw(o.options)){var h=function(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1},u=Math.max(0,Pb.binarySearchValue(l,i,"x","before",h)),c=Math.min(l.length,Pb.binarySearchValue(l,n,"x","after",h)+1);c<=0&&(c=l.length);var d=new Array(c-u);for(s=u;s<c;s++)a=o.itemsData[s],d[s-u]=a;e[t[r]]=d}else e[t[r]]=o.itemsData}},QC.prototype._applySampling=function(t,e){if(t.length>0)for(var i=0;i<t.length;i++)if(1==this.groups[t[i]].options.sampling){var n=e[t[i]];if(n.length>0){var o,r=n.length,s=r/(this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x));o=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(s)));for(var a=new Array(r),l=0;l<r;l+=o){a[Math.round(l/o)]=n[l]}e[t[i]]=vp(a).call(a,0,Math.round(r/o))}}},QC.prototype._getYRanges=function(t,e,i){var n,o,r,s,a=[],l=[];if(t.length>0){for(r=0;r<t.length;r++)n=e[t[r]],s=this.groups[t[r]].options,n.length>0&&(o=this.groups[t[r]],!0===s.stack&&"bar"===s.style?"left"===s.yAxisOrientation?a=Fd(a).call(a,n):l=Fd(l).call(l,n):i[t[r]]=o.getYRange(n,t[r]));XC.getStackedYRange(a,i,t,"__barStackLeft","left"),XC.getStackedYRange(l,i,t,"__barStackRight","right")}},QC.prototype._updateYAxis=function(t,e){var i,n,o=!1,r=!1,s=!1,a=1e9,l=1e9,h=-1e9,u=-1e9;if(t.length>0){for(var c=0;c<t.length;c++){var d=this.groups[t[c]];d&&"right"!=d.options.yAxisOrientation?(r=!0,a=1e9,h=-1e9):d&&d.options.yAxisOrientation&&(s=!0,l=1e9,u=-1e9)}for(c=0;c<t.length;c++)e.hasOwnProperty(t[c])&&!0!==e[t[c]].ignore&&(i=e[t[c]].min,n=e[t[c]].max,"right"!=e[t[c]].yAxisOrientation?(r=!0,a=a>i?i:a,h=h<n?n:h):(s=!0,l=l>i?i:l,u=u<n?n:u));1==r&&this.yAxisLeft.setRange(a,h),1==s&&this.yAxisRight.setRange(l,u)}o=this._toggleAxisVisiblity(r,this.yAxisLeft)||o,o=this._toggleAxisVisiblity(s,this.yAxisRight)||o,1==s&&1==r?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!r,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(this.yAxisLeft.lineOffset=1==s?this.yAxisRight.width:0,o=this.yAxisLeft.redraw()||o,o=this.yAxisRight.redraw()||o):o=this.yAxisRight.redraw()||o;var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"];for(c=0;c<p.length;c++)-1!=zm(t).call(t,p[c])&&vp(t).call(t,zm(t).call(t,p[c]),1);return o},QC.prototype._toggleAxisVisiblity=function(t,e){var i=!1;return 0==t?e.dom.frame.parentNode&&0==e.hidden&&(e.hide(),i=!0):e.dom.frame.parentNode||1!=e.hidden||(e.show(),i=!0),i},QC.prototype._convertXcoordinates=function(t){for(var e=this.body.util.toScreen,i=0;i<t.length;i++)t[i].screen_x=e(t[i].x)+this.props.width,t[i].screen_y=t[i].y,null!=t[i].end?t[i].screen_end=e(t[i].end)+this.props.width:t[i].screen_end=void 0},QC.prototype._convertYcoordinates=function(t,e){var i=this.yAxisLeft,n=Number(this.svg.style.height.replace("px",""));"right"==e.options.yAxisOrientation&&(i=this.yAxisRight);for(var o=0;o<t.length;o++)t[o].screen_y=Math.round(i.convertValue(t[o].y));e.setZeroPosition(Math.min(n,i.convertValue(0)))};var JC="string",tD="boolean",eD="number",iD="date",nD="object",oD="moment",rD={configure:{enabled:{boolean:tD},filter:{boolean:tD,function:"function"},container:{dom:"dom"},__type__:{object:nD,boolean:tD,function:"function"}},alignCurrentTime:{string:JC,undefined:"undefined"},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:JC},sort:{boolean:tD},sampling:{boolean:tD},stack:{boolean:tD},graphHeight:{string:JC,number:eD},shaded:{enabled:{boolean:tD},orientation:{string:["bottom","top","zero","group"]},groupId:{object:nD},__type__:{boolean:tD,object:nD}},style:{string:["line","bar","points"]},barChart:{width:{number:eD},minWidth:{number:eD},sideBySide:{boolean:tD},align:{string:["left","center","right"]},__type__:{object:nD}},interpolation:{enabled:{boolean:tD},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:eD},__type__:{object:nD,boolean:tD}},drawPoints:{enabled:{boolean:tD},onRender:{function:"function"},size:{number:eD},style:{string:["square","circle"]},__type__:{object:nD,boolean:tD,function:"function"}},dataAxis:{showMinorLabels:{boolean:tD},showMajorLabels:{boolean:tD},showWeekScale:{boolean:tD},icons:{boolean:tD},width:{string:JC,number:eD},visible:{boolean:tD},alignZeros:{boolean:tD},left:{range:{min:{number:eD,undefined:"undefined"},max:{number:eD,undefined:"undefined"},__type__:{object:nD}},format:{function:"function"},title:{text:{string:JC,number:eD,undefined:"undefined"},style:{string:JC,undefined:"undefined"},__type__:{object:nD}},__type__:{object:nD}},right:{range:{min:{number:eD,undefined:"undefined"},max:{number:eD,undefined:"undefined"},__type__:{object:nD}},format:{function:"function"},title:{text:{string:JC,number:eD,undefined:"undefined"},style:{string:JC,undefined:"undefined"},__type__:{object:nD}},__type__:{object:nD}},__type__:{object:nD}},legend:{enabled:{boolean:tD},icons:{boolean:tD},left:{visible:{boolean:tD},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:nD}},right:{visible:{boolean:tD},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:nD}},__type__:{object:nD,boolean:tD}},groups:{visibility:{any:"any"},__type__:{object:nD}},autoResize:{boolean:tD},throttleRedraw:{number:eD},clickToUse:{boolean:tD},end:{number:eD,date:iD,string:JC,moment:oD},format:{minorLabels:{millisecond:{string:JC,undefined:"undefined"},second:{string:JC,undefined:"undefined"},minute:{string:JC,undefined:"undefined"},hour:{string:JC,undefined:"undefined"},weekday:{string:JC,undefined:"undefined"},day:{string:JC,undefined:"undefined"},week:{string:JC,undefined:"undefined"},month:{string:JC,undefined:"undefined"},quarter:{string:JC,undefined:"undefined"},year:{string:JC,undefined:"undefined"},__type__:{object:nD}},majorLabels:{millisecond:{string:JC,undefined:"undefined"},second:{string:JC,undefined:"undefined"},minute:{string:JC,undefined:"undefined"},hour:{string:JC,undefined:"undefined"},weekday:{string:JC,undefined:"undefined"},day:{string:JC,undefined:"undefined"},week:{string:JC,undefined:"undefined"},month:{string:JC,undefined:"undefined"},quarter:{string:JC,undefined:"undefined"},year:{string:JC,undefined:"undefined"},__type__:{object:nD}},__type__:{object:nD}},moment:{function:"function"},height:{string:JC,number:eD},hiddenDates:{start:{date:iD,number:eD,string:JC,moment:oD},end:{date:iD,number:eD,string:JC,moment:oD},repeat:{string:JC},__type__:{object:nD,array:"array"}},locale:{string:JC},locales:{__any__:{any:"any"},__type__:{object:nD}},max:{date:iD,number:eD,string:JC,moment:oD},maxHeight:{number:eD,string:JC},maxMinorChars:{number:eD},min:{date:iD,number:eD,string:JC,moment:oD},minHeight:{number:eD,string:JC},moveable:{boolean:tD},multiselect:{boolean:tD},orientation:{string:JC},showCurrentTime:{boolean:tD},showMajorLabels:{boolean:tD},showMinorLabels:{boolean:tD},showWeekScale:{boolean:tD},snap:{function:"function",null:"null"},start:{date:iD,number:eD,string:JC,moment:oD},timeAxis:{scale:{string:JC,undefined:"undefined"},step:{number:eD,undefined:"undefined"},__type__:{object:nD}},width:{string:JC,number:eD},zoomable:{boolean:tD},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:eD},zoomMin:{number:eD},zIndex:{number:eD},__type__:{object:nD}},sD={global:{alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:["zero","top","bottom","group"]},style:["line","bar","points"],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:["left","center","right"]},interpolation:{enabled:!0,parametrization:["centripetal","chordal","uniform"]},drawPoints:{enabled:!0,size:[6,2,30,1],style:["square","circle"]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:"",style:""}},right:{title:{text:"",style:""}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]},right:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]}},autoResize:!0,clickToUse:!1,end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",quarter:"[Q]Q",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",week:"MMMM YYYY",month:"YYYY",quarter:"YYYY",year:""}},height:"",locale:"",max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!0,orientation:["both","bottom","top"],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showWeekScale:!1,start:"",width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}};function aD(t,e,i,o){var r,s,a,l,h,u,c;if(!Fh(i)&&!n.isDataViewLike("id",i)&&i instanceof Object){var d=o;o=i,i=d}o&&o.throttleRedraw&&console.warn('Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var p=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:uu,width:null,height:null,maxHeight:null,minHeight:null},this.options=Pb.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:Gh(r=this.on).call(r,this),off:Gh(s=this.off).call(s,this),emit:Gh(a=this.emit).call(a,this)},hiddenDates:[],util:{getScale:function(){return p.timeAxis.step.scale},getStep:function(){return p.timeAxis.step.step},toScreen:Gh(l=p._toScreen).call(l,p),toGlobalScreen:Gh(h=p._toGlobalScreen).call(h,p),toTime:Gh(u=p._toTime).call(u,p),toGlobalTime:Gh(c=p._toGlobalTime).call(c,p)}},this.range=new $w(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new ck(this.body),this.components.push(this.timeAxis),this.currentTime=new Mk(this.body),this.components.push(this.currentTime),this.linegraph=new QC(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",(function(t){p.emit("click",p.getEventProperties(t))})),this.on("doubletap",(function(t){p.emit("doubleClick",p.getEventProperties(t))})),this.dom.root.oncontextmenu=function(t){p.emit("contextmenu",p.getEventProperties(t))},this.initialFitDone=!1,this.on("changed",(function(){if(null!=p.itemsData){if(!p.initialFitDone&&!p.options.rollingMode)if(p.initialFitDone=!0,null!=p.options.start||null!=p.options.end){if(null==p.options.start||null==p.options.end)var t=p.getItemRange();var e=null!=p.options.start?p.options.start:t.min,i=null!=p.options.end?p.options.end:t.max;p.setWindow(e,i,{animation:!1})}else p.fit({animation:!1});p.initialDrawDone||!p.initialRangeChangeDone&&(p.options.start||p.options.end)&&!p.options.rollingMode||(p.initialDrawDone=!0,p.dom.root.style.visibility="visible",p.dom.loadingScreen.parentNode.removeChild(p.dom.loadingScreen),p.options.onInitialDrawComplete&&Zh((function(){return p.options.onInitialDrawComplete()}),0))}})),o&&this.setOptions(o),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}aD.prototype=new Ik,aD.prototype.setOptions=function(t){!0===vC.validate(t,rD)&&console.log("%cErrors have been found in the supplied options object.",fC),Ik.prototype.setOptions.call(this,t)},aD.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?n.isDataViewLike("id",t)?Eb(t):Eb(new n.DataSet(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.linegraph&&this.linegraph.setItems(null!=e?e.rawDS:null),i)if(null!=this.options.start||null!=this.options.end){var o=null!=this.options.start?this.options.start:null,r=null!=this.options.end?this.options.end:null;this.setWindow(o,r,{animation:!1})}else this.fit({animation:!1})},aD.prototype.setGroups=function(t){var e;e=t?n.isDataViewLike("id",t)?t:new n.DataSet(t):null,this.groupsData=e,this.linegraph.setGroups(e)},aD.prototype.getLegend=function(t,e,i){return void 0===e&&(e=15),void 0===i&&(i=15),void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot find group:'"+t+"'"},aD.prototype.isGroupVisible=function(t){return void 0!==this.linegraph.groups[t]&&(this.linegraph.groups[t].visible&&(void 0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t]))},aD.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(i)&&1==this.linegraph.groups[i].visible)for(var n=0;n<this.linegraph.groups[i].itemsData.length;n++){var o=this.linegraph.groups[i].itemsData[n],r=Pb.convert(o.x,"Date").valueOf();t=null==t||t>r?r:t,e=null==e||e<r?r:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},aD.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=e-Pb.getAbsoluteLeft(this.dom.centerContainer),o=i-Pb.getAbsoluteTop(this.dom.centerContainer),r=this._toTime(n),s=Ak.customTimeFromTarget(t),a=Pb.getTarget(t),l=null;Pb.hasParent(a,this.timeAxis.dom.foreground)||this.timeAxis2&&Pb.hasParent(a,this.timeAxis2.dom.foreground)?l="axis":Pb.hasParent(a,this.linegraph.yAxisLeft.dom.frame)||Pb.hasParent(a,this.linegraph.yAxisRight.dom.frame)?l="data-axis":Pb.hasParent(a,this.linegraph.legendLeft.dom.frame)||Pb.hasParent(a,this.linegraph.legendRight.dom.frame)?l="legend":null!=s?l="custom-time":Pb.hasParent(a,this.currentTime.bar)?l="current-time":Pb.hasParent(a,this.dom.center)&&(l="background");var h=[],u=this.linegraph.yAxisLeft,c=this.linegraph.yAxisRight;return!u.hidden&&this.itemsData.length>0&&h.push(u.screenToValue(o)),!c.hidden&&this.itemsData.length>0&&h.push(c.screenToValue(o)),{event:t,customTime:s?s.options.id:null,what:l,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:o,time:r,value:h}},aD.prototype._createConfigurator=function(){return new EC(this,this.dom.container,sD)};var lD=function(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch(t){return"en"}}();r.default.locale(lD);var hD={Core:Ik,DateUtil:qw,Range:$w,stack:Ax,TimeStep:hk,components:{items:{Item:Lx,BackgroundItem:Yx,BoxItem:Bx,ClusterItem:iC,PointItem:Hx,RangeItem:Vx},BackgroundGroup:Nx,Component:Vb,CurrentTime:Mk,CustomTime:Ak,DataAxis:WC,DataScale:zC,GraphGroup:KC,Group:Px,ItemSet:dC,Legend:$C,LineGraph:QC,TimeAxis:ck}};t.Graph2d=aD,t.Timeline=AC,t.timeline=hD,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=vis-timeline-graph2d.min.js.map