vis-timeline
Version:
Create a fully customizable, interactive timeline with items and ranges.
61 lines • 417 kB
JavaScript
/**
* vis-timeline and vis-graph2d
* https://visjs.github.io/vis-timeline/
*
* Create a fully customizable, interactive timeline with items and ranges.
*
* @version 8.2.1
* @date 2025-07-28T18:35:47.643Z
*
* @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,i){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var s,r,a,h,l,c,d,u,p,m,f,g,v,b,y,w;function _(){if(r)return s;r=1;var t=function(t){return t&&t.Math===Math&&t};return s=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof o&&o)||t("object"==typeof s&&s)||function(){return this}()||Function("return this")()}function x(){return h?a:(h=1,a=function(t){try{return!!t()}catch(t){return!0}})}function C(){return c?l:(c=1,l=!x()(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function S(){if(u)return d;u=1;var t=C(),e=Function.prototype,i=e.apply,o=e.call;return d="object"==typeof Reflect&&Reflect.apply||(t?o.bind(i):function(){return o.apply(i,arguments)}),d}function D(){if(m)return p;m=1;var t=C(),e=Function.prototype,i=e.call,o=t&&e.bind.bind(i,i);return p=t?o:function(t){return function(){return i.apply(t,arguments)}},p}function k(){if(g)return f;g=1;var t=D(),e=t({}.toString),i=t("".slice);return f=function(t){return i(e(t),8,-1)},f}function T(){if(b)return v;b=1;var t=k(),e=D();return v=function(i){if("Function"===t(i))return e(i)}}function O(){if(w)return y;w=1;var t="object"==typeof document&&document.all;return y=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var E,A,I,P,M={};function N(){return A?E:(A=1,E=!x()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function F(){if(P)return I;P=1;var t=C(),e=Function.prototype.call;return I=t?e.bind(e):function(){return e.apply(e,arguments)},I}var R,L,j,B,z,H,G,W,Y,V,U,X,q,K,$,Z,J,Q,tt,et,it,ot,nt,st,rt,at,ht,lt,ct,dt,ut,pt,mt,ft,gt,vt,bt,yt={};function wt(){if(R)return yt;R=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,i=e&&!t.call({1:2},1);return yt.f=i?function(t){var i=e(this,t);return!!i&&i.enumerable}:t,yt}function _t(){return j?L:(j=1,L=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function xt(){if(z)return B;z=1;var t=D(),e=x(),i=k(),o=Object,n=t("".split);return B=e(function(){return!o("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?n(t,""):o(t)}:o,B}function Ct(){return G||(G=1,H=function(t){return null==t}),H}function St(){if(Y)return W;Y=1;var t=Ct(),e=TypeError;return W=function(i){if(t(i))throw new e("Can't call method on "+i);return i},W}function Dt(){if(U)return V;U=1;var t=xt(),e=St();return V=function(i){return t(e(i))},V}function kt(){if(q)return X;q=1;var t=O();return X=function(e){return"object"==typeof e?null!==e:t(e)},X}function Tt(){return $?K:($=1,K={})}function Ot(){if(J)return Z;J=1;var t=Tt(),e=_(),i=O(),o=function(t){return i(t)?t:void 0};return Z=function(i,n){return arguments.length<2?o(t[i])||o(e[i]):t[i]&&t[i][n]||e[i]&&e[i][n]},Z}function Et(){return tt?Q:(tt=1,Q=D()({}.isPrototypeOf))}function At(){if(it)return et;it=1;var t=_().navigator,e=t&&t.userAgent;return et=e?String(e):""}function It(){if(nt)return ot;nt=1;var t,e,i=_(),o=At(),n=i.process,s=i.Deno,r=n&&n.versions||s&&s.version,a=r&&r.v8;return a&&(e=(t=a.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&o&&(!(t=o.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=o.match(/Chrome\/(\d+)/))&&(e=+t[1]),ot=e}function Pt(){if(rt)return st;rt=1;var t=It(),e=x(),i=_().String;return st=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41}),st}function Mt(){return ht?at:(ht=1,at=Pt()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Nt(){if(ct)return lt;ct=1;var t=Ot(),e=O(),i=Et(),o=Object;return lt=Mt()?function(t){return"symbol"==typeof t}:function(n){var s=t("Symbol");return e(s)&&i(s.prototype,o(n))},lt}function Ft(){if(ut)return dt;ut=1;var t=String;return dt=function(e){try{return t(e)}catch(t){return"Object"}}}function Rt(){if(mt)return pt;mt=1;var t=O(),e=Ft(),i=TypeError;return pt=function(o){if(t(o))return o;throw new i(e(o)+" is not a function")}}function Lt(){if(gt)return ft;gt=1;var t=Rt(),e=Ct();return ft=function(i,o){var n=i[o];return e(n)?void 0:t(n)}}function jt(){if(bt)return vt;bt=1;var t=F(),e=O(),i=kt(),o=TypeError;return vt=function(n,s){var r,a;if("string"===s&&e(r=n.toString)&&!i(a=t(r,n)))return a;if(e(r=n.valueOf)&&!i(a=t(r,n)))return a;if("string"!==s&&e(r=n.toString)&&!i(a=t(r,n)))return a;throw new o("Can't convert object to primitive value")}}var Bt,zt,Ht,Gt,Wt,Yt,Vt,Ut,Xt,qt,Kt,$t,Zt,Jt,Qt,te,ee,ie,oe,ne,se,re,ae,he,le,ce,de,ue,pe={exports:{}};function me(){return zt?Bt:(zt=1,Bt=!0)}function fe(){if(Gt)return Ht;Gt=1;var t=_(),e=Object.defineProperty;return Ht=function(i,o){try{e(t,i,{value:o,configurable:!0,writable:!0})}catch(e){t[i]=o}return o}}function ge(){if(Wt)return pe.exports;Wt=1;var t=me(),e=_(),i=fe(),o="__core-js_shared__",n=pe.exports=e[o]||i(o,{});return(n.versions||(n.versions=[])).push({version:"3.44.0",mode:t?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),pe.exports}function ve(){if(Vt)return Yt;Vt=1;var t=ge();return Yt=function(e,i){return t[e]||(t[e]=i||{})}}function be(){if(Xt)return Ut;Xt=1;var t=St(),e=Object;return Ut=function(i){return e(t(i))}}function ye(){if(Kt)return qt;Kt=1;var t=D(),e=be(),i=t({}.hasOwnProperty);return qt=Object.hasOwn||function(t,o){return i(e(t),o)},qt}function we(){if(Zt)return $t;Zt=1;var t=D(),e=0,i=Math.random(),o=t(1.1.toString);return $t=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++e+i,36)}}function _e(){if(Qt)return Jt;Qt=1;var t=_(),e=ve(),i=ye(),o=we(),n=Pt(),s=Mt(),r=t.Symbol,a=e("wks"),h=s?r.for||r:r&&r.withoutSetter||o;return Jt=function(t){return i(a,t)||(a[t]=n&&i(r,t)?r[t]:h("Symbol."+t)),a[t]}}function xe(){if(ee)return te;ee=1;var t=F(),e=kt(),i=Nt(),o=Lt(),n=jt(),s=TypeError,r=_e()("toPrimitive");return te=function(a,h){if(!e(a)||i(a))return a;var l,c=o(a,r);if(c){if(void 0===h&&(h="default"),l=t(c,a,h),!e(l)||i(l))return l;throw new s("Can't convert object to primitive value")}return void 0===h&&(h="number"),n(a,h)}}function Ce(){if(oe)return ie;oe=1;var t=xe(),e=Nt();return ie=function(i){var o=t(i,"string");return e(o)?o:o+""}}function Se(){if(se)return ne;se=1;var t=_(),e=kt(),i=t.document,o=e(i)&&e(i.createElement);return ne=function(t){return o?i.createElement(t):{}},ne}function De(){if(ae)return re;ae=1;var t=N(),e=x(),i=Se();return re=!t&&!e(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})}function ke(){if(he)return M;he=1;var t=N(),e=F(),i=wt(),o=_t(),n=Dt(),s=Ce(),r=ye(),a=De(),h=Object.getOwnPropertyDescriptor;return M.f=t?h:function(t,l){if(t=n(t),l=s(l),a)try{return h(t,l)}catch(t){}if(r(t,l))return o(!e(i.f,t,l),t[l])},M}function Te(){if(ce)return le;ce=1;var t=x(),e=O(),i=/#|\.prototype\./,o=function(i,o){var h=s[n(i)];return h===a||h!==r&&(e(o)?t(o):!!o)},n=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=o.data={},r=o.NATIVE="N",a=o.POLYFILL="P";return le=o}function Oe(){if(ue)return de;ue=1;var t=T(),e=Rt(),i=C(),o=t(t.bind);return de=function(t,n){return e(t),void 0===n?t:i?o(t,n):function(){return t.apply(n,arguments)}},de}var Ee,Ae,Ie,Pe,Me,Ne,Fe,Re,Le,je,Be,ze,He,Ge,We,Ye,Ve,Ue,Xe={};function qe(){return Ae?Ee:(Ae=1,Ee=N()&&x()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Ke(){if(Pe)return Ie;Pe=1;var t=kt(),e=String,i=TypeError;return Ie=function(o){if(t(o))return o;throw new i(e(o)+" is not an object")}}function $e(){if(Me)return Xe;Me=1;var t=N(),e=De(),i=qe(),o=Ke(),n=Ce(),s=TypeError,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,h="enumerable",l="configurable",c="writable";return Xe.f=t?i?function(t,e,i){if(o(t),e=n(e),o(i),"function"==typeof t&&"prototype"===e&&"value"in i&&c in i&&!i[c]){var s=a(t,e);s&&s[c]&&(t[e]=i.value,i={configurable:l in i?i[l]:s[l],enumerable:h in i?i[h]:s[h],writable:!1})}return r(t,e,i)}:r:function(t,i,a){if(o(t),i=n(i),o(a),e)try{return r(t,i,a)}catch(t){}if("get"in a||"set"in a)throw new s("Accessors not supported");return"value"in a&&(t[i]=a.value),t},Xe}function Ze(){if(Fe)return Ne;Fe=1;var t=N(),e=$e(),i=_t();return Ne=t?function(t,o,n){return e.f(t,o,i(1,n))}:function(t,e,i){return t[e]=i,t},Ne}function Je(){if(Le)return Re;Le=1;var t=_(),e=S(),i=T(),o=O(),n=ke().f,s=Te(),r=Tt(),a=Oe(),h=Ze(),l=ye(),c=function(t){var i=function(o,n,s){if(this instanceof i){switch(arguments.length){case 0:return new t;case 1:return new t(o);case 2:return new t(o,n)}return new t(o,n,s)}return e(t,this,arguments)};return i.prototype=t.prototype,i};return Re=function(e,d){var u,p,m,f,g,v,b,y,w,_=e.target,x=e.global,C=e.stat,S=e.proto,D=x?t:C?t[_]:t[_]&&t[_].prototype,k=x?r:r[_]||h(r,_,{})[_],T=k.prototype;for(f in d)p=!(u=s(x?f:_+(C?".":"#")+f,e.forced))&&D&&l(D,f),v=k[f],p&&(b=e.dontCallGetSet?(w=n(D,f))&&w.value:D[f]),g=p&&b?b:d[f],(u||S||typeof v!=typeof g)&&(y=e.bind&&p?a(g,t):e.wrap&&p?c(g):S&&o(g)?i(g):g,(e.sham||g&&g.sham||v&&v.sham)&&h(y,"sham",!0),h(k,f,y),S&&(l(r,m=_+"Prototype")||h(r,m,{}),h(r[m],f,g),e.real&&T&&(u||!T[f])&&h(T,f,g)))}}function Qe(){if(Be)return je;Be=1;var t=k();return je=Array.isArray||function(e){return"Array"===t(e)}}function ti(){return Ge?He:(Ge=1,ze||(ze=1,Je()({target:"Array",stat:!0},{isArray:Qe()})),He=Tt().Array.isArray)}function ei(){return Ye?We:(Ye=1,We=ti())}var ii,oi,ni,si,ri,ai,hi,li,ci,di,ui,pi,mi,fi,gi,vi=n(Ue?Ve:(Ue=1,Ve=ei())),bi={};function yi(){return oi?ii:(oi=1,ii=D()([].slice))}function wi(){if(si)return ni;si=1;var t=D(),e=Rt(),i=kt(),o=ye(),n=yi(),s=C(),r=Function,a=t([].concat),h=t([].join),l={};return ni=s?r.bind:function(t){var s=e(this),c=s.prototype,d=n(arguments,1),u=function(){var e=a(d,n(arguments));return this instanceof u?function(t,e,i){if(!o(l,e)){for(var n=[],s=0;s<e;s++)n[s]="a["+s+"]";l[e]=r("C,a","return new C("+h(n,",")+")")}return l[e](t,i)}(s,e.length,e):s.apply(t,e)};return i(c)&&(u.prototype=c),u},ni}function _i(){if(hi)return ai;hi=1;var t=_(),e=Tt();return ai=function(i,o){var n=e[i+"Prototype"],s=n&&n[o];if(s)return s;var r=t[i],a=r&&r.prototype;return a&&a[o]}}function xi(){return ci?li:(ci=1,function(){if(ri)return bi;ri=1;var t=Je(),e=wi();t({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e})}(),li=_i()("Function","bind"))}function Ci(){if(ui)return di;ui=1;var t=Et(),e=xi(),i=Function.prototype;return di=function(o){var n=o.bind;return o===i||t(i,o)&&n===i.bind?e:n},di}function Si(){return mi?pi:(mi=1,pi=Ci())}var Di,ki,Ti,Oi,Ei,Ai,Ii,Pi=n(gi?fi:(gi=1,fi=Si())),Mi={},Ni={};function Fi(){if(ki)return Di;ki=1;var t=_(),e=At(),i=k(),o=function(t){return e.slice(0,t.length)===t};return Di=o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":t.Bun&&"string"==typeof Bun.version?"BUN":t.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(t.process)?"NODE":t.window&&t.document?"BROWSER":"REST"}function Ri(){if(Oi)return Ti;Oi=1;var t=TypeError;return Ti=function(e,i){if(e<i)throw new t("Not enough arguments");return e}}function Li(){if(Ai)return Ei;Ai=1;var t,e=_(),i=S(),o=O(),n=Fi(),s=At(),r=yi(),a=Ri(),h=e.Function,l=/MSIE .\./.test(s)||"BUN"===n&&((t=e.Bun.version.split(".")).length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2]));return Ei=function(t,e){var n=e?2:1;return l?function(s,l){var c=a(arguments.length,1)>n,d=o(s)?s:h(s),u=c?r(arguments,n):[],p=c?function(){i(d,this,u)}:d;return e?t(p,l):t(p)}:t},Ei}var ji,Bi,zi,Hi,Gi,Wi,Yi={};function Vi(){return Bi||(Bi=1,function(){if(Ii)return Ni;Ii=1;var t=Je(),e=_(),i=Li()(e.setInterval,!0);t({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i})}(),function(){if(ji)return Yi;ji=1;var t=Je(),e=_(),i=Li()(e.setTimeout,!0);t({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i})}()),Mi}function Ui(){return Hi?zi:(Hi=1,Vi(),zi=Tt().setTimeout)}var Xi,qi,Ki,$i,Zi=n(Wi?Gi:(Wi=1,Gi=Ui()));function Ji(){if(qi)return Xi;qi=1;var t={};return t[_e()("toStringTag")]="z",Xi="[object z]"===String(t)}function Qi(){if($i)return Ki;$i=1;var t=Ji(),e=O(),i=k(),o=_e()("toStringTag"),n=Object,s="Arguments"===i(function(){return arguments}());return Ki=t?i:function(t){var r,a,h;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,e){try{return t[e]}catch(t){}}(r=n(t),o))?a:s?i(r):"Object"===(h=i(r))&&e(r.callee)?"Arguments":h},Ki}var to,eo,io,oo,no,so,ro,ao,ho,lo,co,uo,po,mo,fo,go,vo,bo,yo,wo,_o,xo,Co,So,Do,ko,To,Oo,Eo,Ao,Io,Po={};function Mo(){if(eo)return to;eo=1;var t=Math.ceil,e=Math.floor;return to=Math.trunc||function(i){var o=+i;return(o>0?e:t)(o)}}function No(){if(oo)return io;oo=1;var t=Mo();return io=function(e){var i=+e;return i!=i||0===i?0:t(i)},io}function Fo(){if(so)return no;so=1;var t=No(),e=Math.min;return no=function(i){var o=t(i);return o>0?e(o,9007199254740991):0}}function Ro(){if(ao)return ro;ao=1;var t=Fo();return ro=function(e){return t(e.length)}}function Lo(){if(lo)return ho;lo=1;var t=D(),e=O(),i=ge(),o=t(Function.toString);return e(i.inspectSource)||(i.inspectSource=function(t){return o(t)}),ho=i.inspectSource}function jo(){if(uo)return co;uo=1;var t=D(),e=x(),i=O(),o=Qi(),n=Ot(),s=Lo(),r=function(){},a=n("Reflect","construct"),h=/^\s*(?:class|function)\b/,l=t(h.exec),c=!h.test(r),d=function(t){if(!i(t))return!1;try{return a(r,[],t),!0}catch(t){return!1}},u=function(t){if(!i(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(h,s(t))}catch(t){return!0}};return u.sham=!0,co=!a||e(function(){var t;return d(d.call)||!d(Object)||!d(function(){t=!0})||t})?u:d}function Bo(){if(mo)return po;mo=1;var t=Qe(),e=jo(),i=kt(),o=_e()("species"),n=Array;return po=function(s){var r;return t(s)&&(r=s.constructor,(e(r)&&(r===n||t(r.prototype))||i(r)&&null===(r=r[o]))&&(r=void 0)),void 0===r?n:r}}function zo(){if(go)return fo;go=1;var t=Bo();return fo=function(e,i){return new(t(e))(0===i?0:i)}}function Ho(){if(bo)return vo;bo=1;var t=Oe(),e=D(),i=xt(),o=be(),n=Ro(),s=zo(),r=e([].push),a=function(e){var a=1===e,h=2===e,l=3===e,c=4===e,d=6===e,u=7===e,p=5===e||d;return function(m,f,g,v){for(var b,y,w=o(m),_=i(w),x=n(_),C=t(f,g),S=0,D=v||s,k=a?D(m,x):h||u?D(m,0):void 0;x>S;S++)if((p||S in _)&&(y=C(b=_[S],S,w),e))if(a)k[S]=y;else if(y)switch(e){case 3:return!0;case 5:return b;case 6:return S;case 2:r(k,b)}else switch(e){case 4:return!1;case 7:r(k,b)}return d?-1:l||c?c:k}};return vo={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}function Go(){if(wo)return yo;wo=1;var t=x();return yo=function(e,i){var o=[][e];return!!o&&t(function(){o.call(null,i||function(){return 1},1)})}}function Wo(){if(xo)return _o;xo=1;var t=Ho().forEach,e=Go()("forEach");return _o=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},_o}function Yo(){return Do?So:(Do=1,function(){if(Co)return Po;Co=1;var t=Je(),e=Wo();t({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e})}(),So=_i()("Array","forEach"))}function Vo(){return To?ko:(To=1,ko=Yo())}function Uo(){if(Eo)return Oo;Eo=1;var t=Qi(),e=ye(),i=Et(),o=Vo(),n=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Oo=function(r){var a=r.forEach;return r===n||i(n,r)&&a===n.forEach||e(s,t(r))?o:a},Oo}var Xo=n(Io?Ao:(Io=1,Ao=Uo()));const qo="undefined"!=typeof window&&window.moment||e;var Ko,$o,Zo={},Jo={};function Qo(){if($o)return Ko;$o=1;var t=Qi(),e=String;return Ko=function(i){if("Symbol"===t(i))throw new TypeError("Cannot convert a Symbol value to a string");return e(i)}}var tn,en,on,nn,sn,rn,an,hn,ln,cn,dn,un,pn,mn,fn,gn,vn,bn,yn,wn={};function _n(){if(en)return tn;en=1;var t=No(),e=Math.max,i=Math.min;return tn=function(o,n){var s=t(o);return s<0?e(s+n,0):i(s,n)}}function xn(){if(nn)return on;nn=1;var t=Dt(),e=_n(),i=Ro(),o=function(o){return function(n,s,r){var a=t(n),h=i(a);if(0===h)return!o&&-1;var l,c=e(r,h);if(o&&s!=s){for(;h>c;)if((l=a[c++])!=l)return!0}else for(;h>c;c++)if((o||c in a)&&a[c]===s)return o||c||0;return!o&&-1}};return on={includes:o(!0),indexOf:o(!1)}}function Cn(){return rn?sn:(rn=1,sn={})}function Sn(){if(hn)return an;hn=1;var t=D(),e=ye(),i=Dt(),o=xn().indexOf,n=Cn(),s=t([].push);return an=function(t,r){var a,h=i(t),l=0,c=[];for(a in h)!e(n,a)&&e(h,a)&&s(c,a);for(;r.length>l;)e(h,a=r[l++])&&(~o(c,a)||s(c,a));return c},an}function Dn(){return cn?ln:(cn=1,ln=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function kn(){if(un)return dn;un=1;var t=Sn(),e=Dn();return dn=Object.keys||function(i){return t(i,e)}}function Tn(){if(pn)return wn;pn=1;var t=N(),e=qe(),i=$e(),o=Ke(),n=Dt(),s=kn();return wn.f=t&&!e?Object.defineProperties:function(t,e){o(t);for(var r,a=n(e),h=s(e),l=h.length,c=0;l>c;)i.f(t,r=h[c++],a[r]);return t},wn}function On(){return fn?mn:(fn=1,mn=Ot()("document","documentElement"))}function En(){if(vn)return gn;vn=1;var t=ve(),e=we(),i=t("keys");return gn=function(t){return i[t]||(i[t]=e(t))}}function An(){if(yn)return bn;yn=1;var t,e=Ke(),i=Tn(),o=Dn(),n=Cn(),s=On(),r=Se(),a="prototype",h="script",l=En()("IE_PROTO"),c=function(){},d=function(t){return"<"+h+">"+t+"</"+h+">"},u=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var e,i,n;p="undefined"!=typeof document?document.domain&&t?u(t):(i=r("iframe"),n="java"+h+":",i.style.display="none",s.appendChild(i),i.src=String(n),(e=i.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):u(t);for(var l=o.length;l--;)delete p[a][o[l]];return p()};return n[l]=!0,bn=Object.create||function(t,o){var n;return null!==t?(c[a]=e(t),n=new c,c[a]=null,n[l]=t):n=p(),void 0===o?n:i.f(n,o)}}var In,Pn={};function Mn(){if(In)return Pn;In=1;var t=Sn(),e=Dn().concat("length","prototype");return Pn.f=Object.getOwnPropertyNames||function(i){return t(i,e)},Pn}var Nn,Fn={};function Rn(){if(Nn)return Fn;Nn=1;var t=k(),e=Dt(),i=Mn().f,o=yi(),n="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Fn.f=function(s){return n&&"Window"===t(s)?function(t){try{return i(t)}catch(t){return o(n)}}(s):i(e(s))},Fn}var Ln,jn,Bn,zn,Hn,Gn={};function Wn(){return Ln||(Ln=1,Gn.f=Object.getOwnPropertySymbols),Gn}function Yn(){if(Bn)return jn;Bn=1;var t=Ze();return jn=function(e,i,o,n){return n&&n.enumerable?e[i]=o:t(e,i,o),e}}function Vn(){if(Hn)return zn;Hn=1;var t=$e();return zn=function(e,i,o){return t.f(e,i,o)}}var Un,Xn,qn,Kn,$n,Zn,Jn,Qn,ts,es,is,os,ns,ss,rs={};function as(){if(Un)return rs;Un=1;var t=_e();return rs.f=t,rs}function hs(){if(qn)return Xn;qn=1;var t=Tt(),e=ye(),i=as(),o=$e().f;return Xn=function(n){var s=t.Symbol||(t.Symbol={});e(s,n)||o(s,n,{value:i.f(n)})}}function ls(){if($n)return Kn;$n=1;var t=F(),e=Ot(),i=_e(),o=Yn();return Kn=function(){var n=e("Symbol"),s=n&&n.prototype,r=s&&s.valueOf,a=i("toPrimitive");s&&!s[a]&&o(s,a,function(e){return t(r,this)},{arity:1})}}function cs(){if(Jn)return Zn;Jn=1;var t=Ji(),e=Qi();return Zn=t?{}.toString:function(){return"[object "+e(this)+"]"}}function ds(){if(ts)return Qn;ts=1;var t=Ji(),e=$e().f,i=Ze(),o=ye(),n=cs(),s=_e()("toStringTag");return Qn=function(r,a,h,l){var c=h?r:r&&r.prototype;c&&(o(c,s)||e(c,s,{configurable:!0,value:a}),l&&!t&&i(c,"toString",n))},Qn}function us(){if(is)return es;is=1;var t=_(),e=O(),i=t.WeakMap;return es=e(i)&&/native code/.test(String(i))}function ps(){if(ns)return os;ns=1;var t,e,i,o=us(),n=_(),s=kt(),r=Ze(),a=ye(),h=ge(),l=En(),c=Cn(),d="Object already initialized",u=n.TypeError,p=n.WeakMap;if(o||h.state){var m=h.state||(h.state=new p);m.get=m.get,m.has=m.has,m.set=m.set,t=function(t,e){if(m.has(t))throw new u(d);return e.facade=t,m.set(t,e),e},e=function(t){return m.get(t)||{}},i=function(t){return m.has(t)}}else{var f=l("state");c[f]=!0,t=function(t,e){if(a(t,f))throw new u(d);return e.facade=t,r(t,f,e),e},e=function(t){return a(t,f)?t[f]:{}},i=function(t){return a(t,f)}}return os={set:t,get:e,has:i,enforce:function(o){return i(o)?e(o):t(o,{})},getterFor:function(t){return function(i){var o;if(!s(i)||(o=e(i)).type!==t)throw new u("Incompatible receiver, "+t+" required");return o}}},os}var ms,fs,gs,vs={};function bs(){return fs?ms:(fs=1,ms=Pt()&&!!Symbol.for&&!!Symbol.keyFor)}var ys,ws={};var _s,xs,Cs,Ss={};function Ds(){if(xs)return _s;xs=1;var t=D(),e=Qe(),i=O(),o=k(),n=Qo(),s=t([].push);return _s=function(t){if(i(t))return t;if(e(t)){for(var r=t.length,a=[],h=0;h<r;h++){var l=t[h];"string"==typeof l?s(a,l):"number"!=typeof l&&"Number"!==o(l)&&"String"!==o(l)||s(a,n(l))}var c=a.length,d=!0;return function(t,i){if(d)return d=!1,i;if(e(this))return i;for(var o=0;o<c;o++)if(a[o]===t)return i}}},_s}function ks(){if(Cs)return Ss;Cs=1;var t=Je(),e=Ot(),i=S(),o=F(),n=D(),s=x(),r=O(),a=Nt(),h=yi(),l=Ds(),c=Pt(),d=String,u=e("JSON","stringify"),p=n(/./.exec),m=n("".charAt),f=n("".charCodeAt),g=n("".replace),v=n(1.1.toString),b=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,_=!c||s(function(){var t=e("Symbol")("stringify detection");return"[null]"!==u([t])||"{}"!==u({a:t})||"{}"!==u(Object(t))}),C=s(function(){return'"\\udf06\\ud834"'!==u("\udf06\ud834")||'"\\udead"'!==u("\udead")}),k=function(t,e){var n=h(arguments),s=l(e);if(r(s)||void 0!==t&&!a(t))return n[1]=function(t,e){if(r(s)&&(e=o(s,this,d(t),e)),!a(e))return e},i(u,null,n)},T=function(t,e,i){var o=m(i,e-1),n=m(i,e+1);return p(y,t)&&!p(w,n)||p(w,t)&&!p(y,o)?"\\u"+v(f(t,0),16):t};return u&&t({target:"JSON",stat:!0,arity:3,forced:_||C},{stringify:function(t,e,o){var n=h(arguments),s=i(_?k:u,null,n);return C&&"string"==typeof s?g(s,b,T):s}}),Ss}var Ts,Os,Es,As,Is,Ps,Ms,Ns,Fs={};function Rs(){return Os||(Os=1,function(){if(ss)return Jo;ss=1;var t=Je(),e=_(),i=F(),o=D(),n=me(),s=N(),r=Pt(),a=x(),h=ye(),l=Et(),c=Ke(),d=Dt(),u=Ce(),p=Qo(),m=_t(),f=An(),g=kn(),v=Mn(),b=Rn(),y=Wn(),w=ke(),C=$e(),S=Tn(),k=wt(),T=Yn(),O=Vn(),E=ve(),A=En(),I=Cn(),P=we(),M=_e(),R=as(),L=hs(),j=ls(),B=ds(),z=ps(),H=Ho().forEach,G=A("hidden"),W="Symbol",Y="prototype",V=z.set,U=z.getterFor(W),X=Object[Y],q=e.Symbol,K=q&&q[Y],$=e.RangeError,Z=e.TypeError,J=e.QObject,Q=w.f,tt=C.f,et=b.f,it=k.f,ot=o([].push),nt=E("symbols"),st=E("op-symbols"),rt=E("wks"),at=!J||!J[Y]||!J[Y].findChild,ht=function(t,e,i){var o=Q(X,e);o&&delete X[e],tt(t,e,i),o&&t!==X&&tt(X,e,o)},lt=s&&a(function(){return 7!==f(tt({},"a",{get:function(){return tt(this,"a",{value:7}).a}})).a})?ht:tt,ct=function(t,e){var i=nt[t]=f(K);return V(i,{type:W,tag:t,description:e}),s||(i.description=e),i},dt=function(t,e,i){t===X&&dt(st,e,i),c(t);var o=u(e);return c(i),h(nt,o)?(i.enumerable?(h(t,G)&&t[G][o]&&(t[G][o]=!1),i=f(i,{enumerable:m(0,!1)})):(h(t,G)||tt(t,G,m(1,f(null))),t[G][o]=!0),lt(t,o,i)):tt(t,o,i)},ut=function(t,e){c(t);var o=d(e),n=g(o).concat(gt(o));return H(n,function(e){s&&!i(pt,o,e)||dt(t,e,o[e])}),t},pt=function(t){var e=u(t),o=i(it,this,e);return!(this===X&&h(nt,e)&&!h(st,e))&&(!(o||!h(this,e)||!h(nt,e)||h(this,G)&&this[G][e])||o)},mt=function(t,e){var i=d(t),o=u(e);if(i!==X||!h(nt,o)||h(st,o)){var n=Q(i,o);return!n||!h(nt,o)||h(i,G)&&i[G][o]||(n.enumerable=!0),n}},ft=function(t){var e=et(d(t)),i=[];return H(e,function(t){h(nt,t)||h(I,t)||ot(i,t)}),i},gt=function(t){var e=t===X,i=et(e?st:d(t)),o=[];return H(i,function(t){!h(nt,t)||e&&!h(X,t)||ot(o,nt[t])}),o};r||(q=function(){if(l(K,this))throw new Z("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,o=P(t),n=function(t){var s=void 0===this?e:this;s===X&&i(n,st,t),h(s,G)&&h(s[G],o)&&(s[G][o]=!1);var r=m(1,t);try{lt(s,o,r)}catch(t){if(!(t instanceof $))throw t;ht(s,o,r)}};return s&&at&<(X,o,{configurable:!0,set:n}),ct(o,t)},T(K=q[Y],"toString",function(){return U(this).tag}),T(q,"withoutSetter",function(t){return ct(P(t),t)}),k.f=pt,C.f=dt,S.f=ut,w.f=mt,v.f=b.f=ft,y.f=gt,R.f=function(t){return ct(M(t),t)},s&&(O(K,"description",{configurable:!0,get:function(){return U(this).description}}),n||T(X,"propertyIsEnumerable",pt,{unsafe:!0}))),t({global:!0,constructor:!0,wrap:!0,forced:!r,sham:!r},{Symbol:q}),H(g(rt),function(t){L(t)}),t({target:W,stat:!0,forced:!r},{useSetter:function(){at=!0},useSimple:function(){at=!1}}),t({target:"Object",stat:!0,forced:!r,sham:!s},{create:function(t,e){return void 0===e?f(t):ut(f(t),e)},defineProperty:dt,defineProperties:ut,getOwnPropertyDescriptor:mt}),t({target:"Object",stat:!0,forced:!r},{getOwnPropertyNames:ft}),j(),B(q,W),I[G]=!0}(),function(){if(gs)return vs;gs=1;var t=Je(),e=Ot(),i=ye(),o=Qo(),n=ve(),s=bs(),r=n("string-to-symbol-registry"),a=n("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!s},{for:function(t){var n=o(t);if(i(r,n))return r[n];var s=e("Symbol")(n);return r[n]=s,a[s]=n,s}})}(),function(){if(ys)return ws;ys=1;var t=Je(),e=ye(),i=Nt(),o=Ft(),n=ve(),s=bs(),r=n("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!s},{keyFor:function(t){if(!i(t))throw new TypeError(o(t)+" is not a symbol");if(e(r,t))return r[t]}})}(),ks(),function(){if(Ts)return Fs;Ts=1;var t=Je(),e=Pt(),i=x(),o=Wn(),n=be();t({target:"Object",stat:!0,forced:!e||i(function(){o.f(1)})},{getOwnPropertySymbols:function(t){var e=o.f;return e?e(n(t)):[]}})}()),Zo}function Ls(){return As?Es:(As=1,Rs(),Es=Tt().Object.getOwnPropertySymbols)}function js(){return Ps?Is:(Ps=1,Is=Ls())}var Bs,zs,Hs,Gs,Ws,Ys,Vs,Us,Xs,qs,Ks,$s=n(Ns?Ms:(Ns=1,Ms=js())),Zs={};function Js(){if(zs)return Bs;zs=1;var t=x(),e=_e(),i=It(),o=e("species");return Bs=function(e){return i>=51||!t(function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo})},Bs}function Qs(){return Ws?Gs:(Ws=1,function(){if(Hs)return Zs;Hs=1;var t=Je(),e=Ho().filter;t({target:"Array",proto:!0,forced:!Js()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),Gs=_i()("Array","filter"))}function tr(){if(Vs)return Ys;Vs=1;var t=Et(),e=Qs(),i=Array.prototype;return Ys=function(o){var n=o.filter;return o===i||t(i,o)&&n===i.filter?e:n},Ys}function er(){return Xs?Us:(Xs=1,Us=tr())}var ir,or,nr,sr,rr,ar,hr=n(Ks?qs:(Ks=1,qs=er())),lr={exports:{}},cr={};function dr(){if(or)return lr.exports;or=1,function(){if(ir)return cr;ir=1;var t=Je(),e=x(),i=Dt(),o=ke().f,n=N();t({target:"Object",stat:!0,forced:!n||e(function(){o(1)}),sham:!n},{getOwnPropertyDescriptor:function(t,e){return o(i(t),e)}})}();var t=Tt().Object,e=lr.exports=function(e,i){return t.getOwnPropertyDescriptor(e,i)};return t.getOwnPropertyDescriptor.sham&&(e.sham=!0),lr.exports}function ur(){return sr?nr:(sr=1,nr=dr())}var pr,mr,fr,gr,vr,br,yr,wr,_r,xr,Cr,Sr=n(ar?rr:(ar=1,rr=ur())),Dr={};function kr(){if(mr)return pr;mr=1;var t=Ot(),e=D(),i=Mn(),o=Wn(),n=Ke(),s=e([].concat);return pr=t("Reflect","ownKeys")||function(t){var e=i.f(n(t)),r=o.f;return r?s(e,r(t)):e},pr}function Tr(){if(gr)return fr;gr=1;var t=N(),e=$e(),i=_t();return fr=function(o,n,s){t?e.f(o,n,i(0,s)):o[n]=s},fr}function Or(){return yr?br:(yr=1,function(){if(vr)return Dr;vr=1;var t=Je(),e=N(),i=kr(),o=Dt(),n=ke(),s=Tr();t({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(t){for(var e,r,a=o(t),h=n.f,l=i(a),c={},d=0;l.length>d;)void 0!==(r=h(a,e=l[d++]))&&s(c,e,r);return c}})}(),br=Tt().Object.getOwnPropertyDescriptors)}function Er(){return _r?wr:(_r=1,wr=Or())}var Ar,Ir,Pr,Mr,Nr,Fr,Rr=n(Cr?xr:(Cr=1,xr=Er())),Lr={exports:{}},jr={};function Br(){if(Ar)return jr;Ar=1;var t=Je(),e=N(),i=Tn().f;return t({target:"Object",stat:!0,forced:Object.defineProperties!==i,sham:!e},{defineProperties:i}),jr}function zr(){if(Ir)return Lr.exports;Ir=1,Br();var t=Tt().Object,e=Lr.exports=function(e,i){return t.defineProperties(e,i)};return t.defineProperties.sham&&(e.sham=!0),Lr.exports}function Hr(){return Mr?Pr:(Mr=1,Pr=zr())}var Gr,Wr,Yr,Vr,Ur,Xr,qr,Kr,$r,Zr,Jr=n(Fr?Nr:(Fr=1,Nr=Hr())),Qr={exports:{}},ta={};function ea(){if(Gr)return ta;Gr=1;var t=Je(),e=N(),i=$e().f;return t({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!e},{defineProperty:i}),ta}function ia(){if(Wr)return Qr.exports;Wr=1,ea();var t=Tt().Object,e=Qr.exports=function(e,i,o){return t.defineProperty(e,i,o)};return t.defineProperty.sham&&(e.sham=!0),Qr.exports}function oa(){return Vr?Yr:(Vr=1,Yr=ia())}function na(){return Xr?Ur:(Xr=1,Ur=oa())}function sa(){return Kr?qr:(Kr=1,qr=na())}function ra(){return Zr?$r:(Zr=1,$r=sa())}var aa,ha,la,ca=n(ra()),da={};function ua(){if(ha)return aa;ha=1;var t=TypeError;return aa=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e},aa}function pa(){if(la)return da;la=1;var t=Je(),e=x(),i=Qe(),o=kt(),n=be(),s=Ro(),r=ua(),a=Tr(),h=zo(),l=Js(),c=_e(),d=It(),u=c("isConcatSpreadable"),p=d>=51||!e(function(){var t=[];return t[u]=!1,t.concat()[0]!==t}),m=function(t){if(!o(t))return!1;var e=t[u];return void 0!==e?!!e:i(t)};return t({target:"Array",proto:!0,arity:1,forced:!p||!l("concat")},{concat:function(t){var e,i,o,l,c,d=n(this),u=h(d,0),p=0;for(e=-1,o=arguments.length;e<o;e++)if(m(c=-1===e?d:arguments[e]))for(l=s(c),r(p+l),i=0;i<l;i++,p++)i in c&&a(u,p,c[i]);else r(p+1),a(u,p++,c);return u.length=p,u}}),da}var ma,fa={};function ga(){return ma||(ma=1,hs()("asyncDispose")),fa}var va;var ba,ya={};function wa(){return ba||(ba=1,hs()("dispose")),ya}var _a;var xa;var Ca,Sa={};function Da(){return Ca||(Ca=1,hs()("iterator")),Sa}var ka;var Ta;var Oa;var Ea;var Aa;var Ia;var Pa,Ma={};function Na(){if(Pa)return Ma;Pa=1;var t=hs(),e=ls();return t("toPrimitive"),e(),Ma}var Fa,Ra={};var La;var ja,Ba,za,Ha={};function Ga(){return za?Ba:(za=1,pa(),Rs(),ga(),va||(va=1,hs()("asyncIterator")),wa(),_a||(_a=1,hs()("hasInstance")),xa||(xa=1,hs()("isConcatSpreadable")),Da(),ka||(ka=1,hs()("match")),Ta||(Ta=1,hs()("matchAll")),Oa||(Oa=1,hs()("replace")),Ea||(Ea=1,hs()("search")),Aa||(Aa=1,hs()("species")),Ia||(Ia=1,hs()("split")),Na(),function(){if(Fa)return Ra;Fa=1;var t=Ot(),e=hs(),i=ds();e("toStringTag"),i(t("Symbol"),"Symbol")}(),La||(La=1,hs()("unscopables")),function(){if(ja)return Ha;ja=1;var t=_();ds()(t.JSON,"JSON",!0)}(),Ba=Tt().Symbol)}var Wa,Ya,Va,Ua,Xa,qa,Ka,$a,Za,Ja,Qa,th,eh,ih,oh,nh,sh,rh,ah,hh,lh,ch,dh,uh,ph,mh,fh,gh,vh,bh,yh,wh,_h,xh={};function Ch(){return Ya?Wa:(Ya=1,Wa=function(){})}function Sh(){return Ua?Va:(Ua=1,Va={})}function Dh(){if(qa)return Xa;qa=1;var t=N(),e=ye(),i=Function.prototype,o=t&&Object.getOwnPropertyDescriptor,n=e(i,"name"),s=n&&"something"===function(){}.name,r=n&&(!t||t&&o(i,"name").configurable);return Xa={EXISTS:n,PROPER:s,CONFIGURABLE:r}}function kh(){return $a?Ka:($a=1,Ka=!x()(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))}function Th(){if(Ja)return Za;Ja=1;var t=ye(),e=O(),i=be(),o=En(),n=kh(),s=o("IE_PROTO"),r=Object,a=r.prototype;return Za=n?r.getPrototypeOf:function(o){var n=i(o);if(t(n,s))return n[s];var h=n.constructor;return e(h)&&n instanceof h?h.prototype:n instanceof r?a:null},Za}function Oh(){if(th)return Qa;th=1;var t,e,i,o=x(),n=O(),s=kt(),r=An(),a=Th(),h=Yn(),l=_e(),c=me(),d=l("iterator"),u=!1;return[].keys&&("next"in(i=[].keys())?(e=a(a(i)))!==Object.prototype&&(t=e):u=!0),!s(t)||o(function(){var e={};return t[d].call(e)!==e})?t={}:c&&(t=r(t)),n(t[d])||h(t,d,function(){return this}),Qa={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:u}}function Eh(){if(ih)return eh;ih=1;var t=Oh().IteratorPrototype,e=An(),i=_t(),o=ds(),n=Sh(),s=function(){return this};return eh=function(r,a,h,l){var c=a+" Iterator";return r.prototype=e(t,{next:i(+!l,h)}),o(r,c,!1,!0),n[c]=s,r}}function Ah(){if(nh)return oh;nh=1;var t=D(),e=Rt();return oh=function(i,o,n){try{return t(e(Object.getOwnPropertyDescriptor(i,o)[n]))}catch(t){}},oh}function Ih(){if(rh)return sh;rh=1;var t=kt();return sh=function(e){return t(e)||null===e}}function Ph(){if(hh)return ah;hh=1;var t=Ih(),e=String,i=TypeError;return ah=function(o){if(t(o))return o;throw new i("Can't set "+e(o)+" as a prototype")}}function Mh(){if(ch)return lh;ch=1;var t=Ah(),e=kt(),i=St(),o=Ph();return lh=Object.setPrototypeOf||("__proto__"in{}?function(){var n,s=!1,r={};try{(n=t(Object.prototype,"__proto__","set"))(r,[]),s=r instanceof Array}catch(t){}return function(t,r){return i(t),o(r),e(t)?(s?n(t,r):t.__proto__=r,t):t}}():void 0)}function Nh(){if(uh)return dh;uh=1;var t=Je(),e=F(),i=me(),o=Dh(),n=O(),s=Eh(),r=Th(),a=Mh(),h=ds(),l=Ze(),c=Yn(),d=_e(),u=Sh(),p=Oh(),m=o.PROPER,f=o.CONFIGURABLE,g=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,b=d("iterator"),y="keys",w="values",_="entries",x=function(){return this};return dh=function(o,d,p,C,S,D,k){s(p,d,C);var T,O,E,A=function(t){if(t===S&&F)return F;if(!v&&t&&t in M)return M[t];switch(t){case y:case w:case _:return function(){return new p(this,t)}}return function(){return new p(this)}},I=d+" Iterator",P=!1,M=o.prototype,N=M[b]||M["@@iterator"]||S&&M[S],F=!v&&N||A(S),R="Array"===d&&M.entries||N;if(R&&(T=r(R.call(new o)))!==Object.prototype&&T.next&&(i||r(T)===g||(a?a(T,g):n(T[b])||c(T,b,x)),h(T,I,!0,!0),i&&(u[I]=x)),m&&S===w&&N&&N.name!==w&&(!i&&f?l(M,"name",w):(P=!0,F=function(){return e(N,this)})),S)if(O={values:A(w),keys:D?F:A(y),entries:A(_)},k)for(E in O)(v||P||!(E in M))&&c(M,E,O[E]);else t({target:d,proto:!0,forced:v||P},O);return i&&!k||M[b]===F||c(M,b,F,{name:S}),u[d]=F,O}}function Fh(){return mh?ph:(mh=1,ph=function(t,e){return{value:t,done:e}})}function Rh(){if(gh)return fh;gh=1;var t=Dt(),e=Ch(),i=Sh(),o=ps(),n=$e().f,s=Nh(),r=Fh(),a=me(),h=N(),l="Array Iterator",c=o.set,d=o.getterFor(l);fh=s(Array,"Array",function(e,i){c(this,{type:l,target:t(e),index:0,kind:i})},function(){var t=d(this),e=t.target,i=t.index++;if(!e||i>=e.length)return t.target=null,r(void 0,!0);switch(t.kind){case"keys":return r(i,!1);case"values":return r(e[i],!1)}return r([i,e[i]],!1)},"values");var u=i.Arguments=i.Array;if(e("keys"),e("values"),e("entries"),!a&&h&&"values"!==u.name)try{n(u,"name",{value:"values"})}catch(t){}return fh}function Lh(){return bh?vh:(bh=1,vh={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})}function jh(){if(yh)return xh;yh=1,Rh();var t=Lh(),e=_(),i=ds(),o=Sh();for(var n in t)i(e[n],n),o[n]=o.Array;return xh}function Bh(){if(_h)return wh;_h=1;var t=Ga();return jh(),wh=t}var zh,Hh={};var Gh;var Wh;var Yh,Vh,Uh;function Xh(){if(Uh)return Vh;Uh=1;var t=Bh();return function(){if(zh)return Hh;zh=1;var t=_e(),e=$e().f,i=t("metadata"),o=Function.prototype;void 0===o[i]&&e(o,i,{value:null})}(),Gh||(Gh=1,ga()),Wh||(Wh=1,wa()),Yh||(Yh=1,hs()("metadata")),Vh=t}var qh,Kh,$h;function Zh(){if(Kh)return qh;Kh=1;var t=Ot(),e=D(),i=t("Symbol"),o=i.keyFor,n=e(i.prototype.valueOf);return qh=i.isRegisteredSymbol||function(t){try{return void 0!==o(n(t))}catch(t){return!1}}}var Jh,Qh,tl;function el(){if(Qh)return Jh;Qh=1;for(var t=ve(),e=Ot(),i=D(),o=Nt(),n=_e(),s=e("Symbol"),r=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),h=i(s.prototype.valueOf),l=t("wks"),c=0,d=a(s),u=d.length;c<u;c++)try{var p=d[c];o(s[p])&&n(p)}catch(t){}return Jh=function(t){if(r&&r(t))return!0;try{for(var e=h(t),i=0,o=a(l),n=o.length;i<n;i++)if(l[o[i]]==e)return!0}catch(t){}return!1},Jh}var il;var ol;var nl;var sl;var rl;var al;var hl;var ll,cl,dl,ul,pl;function ml(){if(dl)return cl;dl=1;var t=Xh();return $h||($h=1,Je()({target:"Symbol",stat:!0},{isRegisteredSymbol:Zh()})),tl||(tl=1,Je()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:el()})),il||(il=1,hs()("customMatcher")),ol||(ol=1,hs()("observable")),nl||(nl=1,Je()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Zh()})),sl||(sl=1,Je()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:el()})),rl||(rl=1,hs()("matcher")),al||(al=1,hs()("metadataKey")),hl||(hl=1,hs()("patternMatch")),ll||(ll=1,hs()("replaceAll")),cl=t}function fl(){return pl?ul:(pl=1,ul=ml())}var gl,vl,bl,yl,wl,_l,xl,Cl,Sl,Dl,kl,Tl,Ol,El=n(fl()),Al={};function Il(){if(vl)return gl;vl=1;var t=D(),e=No(),i=Qo(),o=St(),n=t("".charAt),s=t("".charCodeAt),r=t("".slice),a=function(t){return function(a,h){var l,c,d=i(o(a)),u=e(h),p=d.length;return u<0||u>=p?t?"":void 0:(l=s(d,u))<55296||l>56319||u+1===p||(c=s(d,u+1))<56320||c>57343?t?n(d,u):l:t?r(d,u,u+2):c-56320+(l-55296<<10)+65536}};return gl={codeAt:a(!1),charAt:a(!0)}}function Pl(){if(bl)return Al;bl=1;var t=Il().charAt,e=Qo(),i=ps(),o=Nh(),n=Fh(),s="String Iterator",r=i.set,a=i.getterFor(s);return o(String,"String",function(t){r(this,{type:s,string:e(t),index:0})},function(){var e,i=a(this),o=i.string,s=i.index;return s>=o.length?n(void 0,!0):(e=t(o,s),i.index+=e.length,n(e,!1))}),Al}function Ml(){return wl?yl:(wl=1,Rh(),Pl(),Da(),yl=as().f("iterator"))}function Nl(){if(xl)return _l;xl=1;var t=Ml();return jh(),_l=t}function Fl(){return Sl?Cl:(Sl=1,Cl=Nl())}function Rl(){return kl?Dl:(kl=1,Dl=Fl())}function Ll(){return Ol?Tl:(Ol=1,Tl=Rl())}var jl,Bl,zl,Hl,Gl,Wl,Yl,Vl,Ul,Xl,ql=n(Ll());function Kl(t){return Kl="function"==typeof El&&"symbol"==typeof ql?function(t){return typeof t}:function(t){return t&&"function"==typeof El&&t.constructor===El&&t!==El.prototype?"symbol":typeof t},Kl(t)}function $l(){return Bl?jl:(Bl=1,Na(),jl=as().f("toPrimitive"))}function Zl(){return Hl?zl:(Hl=1,zl=$l())}function Jl(){return Wl?Gl:(Wl=1,Gl=Zl())}function Ql(){return Vl?Yl:(Vl=1,Yl=Jl())}function tc(){return Xl?Ul:(Xl=1,Ul=Ql())}var ec=n(tc());function ic(t){var e=function(t,e){if("object"!=Kl(t)||!t)return t;var i=t[ec];if(void 0!==i){var o=i.call(t,e);if("object"!=Kl(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Kl(e)?e:e+""}function oc(t,e,i){return(e=ic(e))in t?ca(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var nc,sc,rc,ac,hc,lc,cc,dc,uc,pc={};function mc(){return rc?sc:(rc=1,function(){if(nc)return pc;nc=1;var t=Je(),e=Ho().map;t({target:"Array",proto:!0,forced:!Js()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),sc=_i()("Array","map"))}function fc(){if(hc)return ac;hc=1;var t=Et(),e=mc(),i=Array.prototype;return ac=function(o){var n=o.map;return o===i||t(i,o)&&n===i.map?e:n},ac}function gc(){return cc?lc:(cc=1,lc=fc())}var vc,bc,yc,wc,_c,xc,Cc,Sc,Dc,kc,Tc,Oc,Ec,Ac=n(uc?dc:(uc=1,dc=gc())),Ic={};function Pc(){if(bc)return vc;bc=1;var t=Rt(),e=be(),i=xt(),o=Ro(),n=TypeError,s="Reduce of empty array with no initial value",r=function(r){return function(a,h,l,c){var d=e(a),u=i(d),p=o(d);if(t(h),0===p&&l<2)throw new n(s);var m=r?p-1:0,f=r?-1:1;if(l<2)for(;;){if(m in u){c=u[m],m+=f;break}if(m+=f,r?m<0:p<=m)throw new n(s)}for(;r?m>=0:p>m;m+=f)m in u&&(c=h(c,u[m],m,d));return c}};return vc={left:r(!1),right:r(!0)}}function Mc(){return wc?yc:(wc=1,yc="NODE"===Fi())}function Nc(){return Cc?xc:(Cc=1,function(){if(_c)return Ic;_c=1;var t=Je(),e=Pc().left,i=Go(),o=It();t({target:"Array",proto:!0,forced:!Mc()&&o>79&&o<83||!i("reduce")},{reduce:function(t){var i=arguments.length;return e(this,t,i,i>1?arguments[1]:void 0)}})}(),xc=_i()("Array","reduce"))}function Fc(){if(Dc)return Sc;Dc=1;var t=Et(),e=Nc(),i=Array.prototype;return Sc=function(o){var n=o.reduce;return o===i||t(i,o)&&n===i.reduce?e:n},Sc}function Rc(){return Tc?kc:(Tc=1,kc=Fc())}var Lc,jc,Bc,zc,Hc,Gc,Wc,Yc=n(Ec?Oc:(Ec=1,Oc=Rc())),Vc={};function Uc(){return Bc?jc:(Bc=1,function(){if(Lc)return Vc;Lc=1;var t=Je(),e=be(),i=kn();t({target:"Object",stat:!0,forced:x()(function(){i(1)})},{keys:function(t){return i(e(t))}})}(),jc=Tt().Object.keys)}function Xc(){return Hc?zc:(Hc=1,zc=Uc())}var qc,Kc,$c=n(Wc?Gc:(Wc=1,Gc=Xc()));var Zc,Jc=n(Kc?qc:(Kc=1,qc=oa())),Qc={exports:{}};var td,ed=(Zc||(Zc=1,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,o=this._callbacks["$"+t];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<o.length;n++)if((i=o[n])===e||i.fn===e){o.splice(n,1);break}return 0===o.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],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(i){o=0;for(var n=(i=i.slice(0)).length;o<n;++o)i[o].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}}(Qc)),Qc.exports),id=n(ed);
/*! 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 od(){return od=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},od.apply(this,arguments)}function nd(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function sd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}td="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 o=arguments[i];if(null!=o)for(var n in o)o.hasOwnProperty(n)&&(e[n]=o[n])}return e}:Object.assign;var rd,ad=td,hd=["","webkit","Moz","MS","ms","o"],ld="undefined"==typeof document?{style:{}}:document.createElement("div"),cd=Math.round,dd=Math.abs,ud=Date.now;function pd(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s<hd.length;){if((o=(i=hd[s])?i+n:e)in t)return o;s++}}rd="undefined"==typeof window?{}:window;var md=pd(ld.style,"touchAction"),fd=void 0!==md;var gd="compute",vd="auto",bd="manipulation",yd="none",wd="pan-x",_d="pan-y",xd=function(){if(!fd)return!1;var t={},e=rd.CSS&&rd.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){return t[i]=!e||rd.CSS.supports("touch-action",i)}),t}(),Cd="ontouchstart"in rd,Sd=void 0!==pd(rd,"PointerEvent"),Dd=Cd&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),kd="touch",Td="mouse",Od=16,Ed=24,Ad=["x","y"],Id=["clientX","clientY"];function Pd(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(o=0;o<t.length;)e.call(i,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function Md(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function Nd(t,e){return t.indexOf(e)>-1}var Fd=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===gd&&(t=this.compute()),fd&&this.manager.element.style&&xd[t]&&(this.manager.element.style[md]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Pd(this.manager.recognizers,function(e){Md(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(Nd(t,yd))return yd;var e=Nd(t,wd),i=Nd(t,_d);return e&&i?yd:e||i?e?wd:_d:Nd(t,bd)?bd:vd}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var o=this.actions,n=Nd(o,yd)&&!xd[yd],s=Nd(o,_d)&&!xd[_d],r=Nd(o,wd)&&!xd[wd];if(n){var a=1===t.pointers.length,h=t.distance<2,l=t.deltaTime<250;if(a&&h&&l)return}if(!r||!s)return n||s&&6&i||r&&i&Ed?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Rd(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Ld(t){var e=t.length;if(1===e)return{x:cd(t[0].clientX),y:cd(t[0].clientY)};for(var i=0,o=0,n=0;n<e;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:cd(i/e),y:cd(o/e)}}function jd(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:cd(t.pointers[i].clientX),clientY:cd(t.pointers[i].clientY)},i++;return{timeStamp:ud(),pointers:e,center:Ld(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Bd(t,e,i){i||(i=Ad);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function zd(t,e,i){i||(i=Ad);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function Hd(t,e){return t===e?1:dd(t)>=dd(e)?t<0?2:4:e<0?8:Od}function Gd(t,e,i){return{x:e/t||0,y:i/t||0}}function Wd(t,e){var i=t.session,o=e.pointers,n=o.length;i.firstInput||(i.firstInput=jd(e)),n>1&&!i.firstMultiple?i.firstMultiple=jd(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=Ld(o);e.timeStamp=ud(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=zd(a,h),e.distance=Bd(a,h),function(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}(i,e),e.offsetDirection=Hd(e.deltaX,e.deltaY);var l,c,d=Gd(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=dd(d.x)>dd(d.y)?d.x:d.y,e.scale=r?(l=r.pointers,Bd((c=o)[0],c[1],Id)/Bd(l[0],l[1],Id)):1,e.rotation=r?function(t,e){return zd(e[1],e[0],Id)+zd(t[1],t[0],Id)}(r.pointers,o):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,o,n,s,r=t.lastInterval||e,a=e.timeStamp-r.timeStamp;if(8!==e.eventType&&(a>25||void 0===r.velocity)){var h=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,c=Gd(a,h,l);o=c.x,n=c.y,i=dd(c.x)>dd(c.y)?c.x:c.y,s=Hd(h,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}(i,e);var u,p=t.element,m=e.srcEvent;Rd(u=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=u),e.target=p}function Yd(t,e,i){var o=i.pointers.length,n=i.changedPointers.length,s=1&e&&o-n===0,r=12&e&&o-n===0;i.isFirst=!!s,i.isFinal=!!r,s&&(t.session={}),i.eventType=e,Wd(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function Vd(t){return t.trim().split(/\s+/g)}function Ud(t,e,i){Pd(Vd(e),function(e){t.addEventListener(e,i,!1)})}function Xd(t,e,i){Pd(Vd(e),function(e){t.removeEventListener(e,i,!1)})}function qd(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var Kd=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){Md(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Ud(this.element,this.evEl,this.domHandler),this.evTarget&&Ud(this.target,this.evTarget,this.domHandler),this.evWin&&Ud(qd(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Xd(this.element,this.evEl,this.domHandler),this.evTarget&&Xd(this.target,this.evTarget,this.domHandler),this.evWin&&Xd(qd(this.element),this.evWin,this.domHandler)},t}();function $d(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;o<t.length;){if(i&&t[o][i]==e||!i&&t[o]===e)return o;o++}return-1}var Zd={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Jd={2:kd,3:"pen",4:Td,5:"kinect"},Qd="pointerdown",tu="pointermove pointerup pointercancel";rd.MSPointerEvent&&!rd.PointerEvent&&(Qd="MSPointerDown",tu="MSPointerMove MSPointerUp MSPointerCancel");var eu=function(t){function e(){var i,o=e.prototype;return o.evEl=Qd,o.evWin=tu,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return nd(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,o=t.type.toLowerCase().replace("ms",""),n=Zd[o],s=Jd[t.pointerType]||t.pointerType,r=s===kd,a=$d(e,t.pointerId,"pointerId");1&n&&(0===t.button||r)?a<0&&(e.push(t),a=e.length-1):12&n&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))},e}(Kd);function iu(t){return Array.prototype.slice.call(t,0)}function ou(t,e,i){for(var o=[],n=[],s=0;s<t.length;){var r=e?t[s][e]:t[s];$d(n,r)<0&&o.push(t[s]),n[s]=r,s++}return i&&(o=e?o.sort(function(t,i){return t[e]>i[e]}):o.sort()),o}var nu={touchstart:1,touchmove:2,touchend:4,touchcancel:8},su=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return nd(e,t),e.prototype.handler=function(t){var e=nu[t.type],i=ru.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:kd,srcEvent:t})},e}(Kd);function ru(t,e){var i,o,n=iu(t.touches),s=this.targetIds;if(3&e&&1===n.length)return s[n[0].identifier]=!0,[n,n];var r=iu(t.changedTouches),a=[],h=this.target;if(o=n.filter(function(t){return Rd(t.target,h)}),1===e)for(i=0;i<o.length;)s[o[i].identifier]=!0,i++;for(i=0;i<r.length;)s[r[i].identifier]&&a.push(r[i]),12&e&&delete s[r[i].identifier],i++;return a.length?[ou(o.concat(a),"identifier",!0),a]:void 0}var au={mousedown:1,mousemove:2,mouseup:4},hu=function(t){function e(){var i,o=e.prototype;return o.evEl="mousedown",o.evWin="mousemove mouseup",(i=t.apply(this,arguments)||this).pressed=!1,i}return nd(e,t),e.prototype.handler=function(t){var e=au[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:Td,srcEvent:t}))},e}(Kd);function lu(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},o=this.lastTouches;this.lastTouches.push(i);setTimeout(function(){var t=o.indexOf(i);t>-1&&o.splice(t,1)},2500)}}function cu(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,lu.call(this,e)):12&t&&lu.call(this,e)}function du(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var n=this.lastTouches[o],s=Math.abs(e-n.x),r=Math.abs(i-n.y);if(s<=25&&r<=25)return!0}return!1}var uu=function(){return function(t){function e(e,i){var o;return(o=t.call(this,e,i)||this).handler=function(t,e,i){var n=i.pointerType===kd,s=i.pointerType===Td;if(!(s&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)cu.call(sd(sd(o)),e,i);else if(s&&du.call(sd(sd(o)),i))return;o.callback(t,e,i)}},o.touch=new su(o.manager,o.handler),o.mouse=new hu(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return nd(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(Kd)}();function pu(t,e,i){return!!Array.isArray(t)&&(Pd(t,i[e],i),!0)}var mu=32,fu=1;function gu(t,e){var i=e.manager;return i?i.get(t):t}function vu(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var bu=function(){function t(t){void 0===t&&(t={}),this.options=od({enable:!0},t),this.id=fu++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return ad(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(pu(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=gu(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return pu(t,"dropRecognizeWith",this)||(t=gu(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(pu(t,"requireFailure",this))return this;var e=this.requireFail;return-1===$d(e,t=gu(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(pu(t,"dropRequireFailure",this))return this;t=gu(t,this);var e=$d(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 o(i){e.manager.emit(i,t)}i<8&&o(e.options.event+vu(i)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),i>=8&&o(e.options.event+vu(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=mu},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=ad({},t);if(!Md(this.options.enable,[this,e]))return this.reset(),void(this.state=mu);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}(),yu=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,od({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}nd(e,t);var i=e.prototype;return i.getTouchAction=function(){return[bd]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,n=t.distance<i.threshold,s=t.deltaTime<i.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(n&&s&&o){if(4!==t.eventType)return this.failTimeout();var r=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||Bd(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&r?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 mu},i.failTimeout=function(){var t=this;return this._timer=setTimeout(function(){t.state=mu},this.options.interval),mu},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}(bu),wu=function(t){function e(e){return void 0===e&&(e={}),t.call(this,od({pointers:1},e))||this}nd(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,o=6&e,n=this.attrTest(t);return o&&(8&i||!n)?16|e:o||n?4&i?8|e:2&e?4|e:2:mu},e}(bu);function _u(t){return t===Od?"down":8===t?"up":2===t?"left":4===t?"right":""}var xu=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,od({event:"pan",threshold:10,pointers:1,direction:30},e))||this).pX=null,i.pY=null,i}nd(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(_d),t&Ed&&e.push(wd),e},i.directionTest=function(t){var e=this.options,i=!0,o=t.distance,n=t.direction,s=t.deltaX,r=t.deltaY;return n&e.direction||(6&e.direction?(n=0===s?1:s<0?2:4,i=s!==this.pX,o=Math.abs(t.deltaX)):(n=0===r?1:r<0?8:Od,i=r!==this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},i.attrTest=function(t){return wu.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=_u(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(wu),Cu=function(t){function e(e){return void 0===e&&(e={}),t.call(this,od({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}nd(e,t);var i=e.prototype;return i.getTouchAction=function(){return xu.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,o=this.options.direction;return 30&o?i=e.overallVelocity:6&o?i=e.overallVelocityX:o&Ed&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&o&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&dd(i)>this.options.velocity&&4&e.eventType},i.emit=function(t){var e=_u(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(wu),Su=function(t){function e(e){return void 0===e&&(e={}),t.call(this,od({event:"pinch",threshold:0,pointers:2},e))||this}nd(e,t);var i=e.prototype;return i.getTouchAction=function(){return[yd]},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}(wu),Du=function(t){function e(e){return void 0===e&&(e={}),t.call(this,od({event:"rotate",threshold:0,pointers:2},e))||this}nd(e,t);var i=e.prototype;return i.getTouchAction=function(){return[yd]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(wu),ku=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,od({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}nd(e,t);var i=e.prototype;return i.getTouchAction=function(){return[vd]},i.process=function(t){var e=this,i=this.options,o=t.pointers.length===i.pointers,n=t.distance<i.threshold,s=t.deltaTime>i.time;if(this._input=t,!n||!o||12&t.eventType&&!s)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 mu},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=ud(),this.manager.emit(this.options.event,this._input)))},e}(bu),Tu={domEvents:!1,touchAction:gd,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ou=[[Du,{enable:!1}],[Su,{enable:!1},["rotate"]],[Cu,{direction:6}],[xu,{direction:6},["swipe"]],[yu],[yu,{event:"doubletap",taps:2},["tap"]],[ku]];function Eu(t,e){var i,o=t.element;o.style&&(Pd(t.options.cssProps,function(n,s){i=pd(o.style,s),e?(t.oldCssProps[i]=o.style[i],o.style[i]=n):o.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={}))}var Au=function(){function t(t,e){var i,o=this;this.options=ad({},Tu,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||(Sd?eu:Dd?su:Cd?uu:hu))(i,Yd),this.touchAction=new Fd(this,this.options.touchAction),Eu(this,!0),Pd(this.options.recognizers,function(t){var e=o.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 ad(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 o=this.recognizers,n=e.curRecognizer;(!n||n&&8&n.state)&&(e.curRecognizer=null,n=null);for(var s=0;s<o.length;)i=o[s],2===e.stopped||n&&i!==n&&!i.canRecognizeWith(n)?i.reset():i.recognize(t),!n&&14&i.state&&(e.curRecognizer=i,n=i),s++}},e.get=function(t){if(t instanceof bu)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(pu(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(pu(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,o=$d(i,e);-1!==o&&(i.splice(o,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 Pd(Vd(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 Pd(Vd(t),function(t){e?i[t]&&i[t].splice($d(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 o=0;o<i.length;)i[o](e),o++}},e.destroy=function(){this.element&&Eu(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Iu={touchstart:1,touchmove:2,touchend:4,touchcancel:8},Pu=function(t){function e(){var i,o=e.prototype;return o.evTarget="touchstart",o.evWin="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).started=!1,i}return nd(e,t),e.prototype.handler=function(t){var e=Iu[t.type];if(1===e&&(this.started=!0),this.started){var i=Mu.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:kd,srcEvent:t})}},e}(Kd);function Mu(t,e){var i=iu(t.touches),o=iu(t.changedTouches);return 12&e&&(i=ou(i.concat(o),"identifier",!0)),[i,o]}function Nu(t,e,i){var o="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",n=window.console&&(window.console.warn||window.console.log);return n&&n.call(window.console,o,i),t.apply(this,arguments)}}var Fu=Nu(function(t,e,i){for(var o=Object.keys(e),n=0;n<o.length;)(!i||i&&void 0===t[o[n]])&&(t[o[n]]=e[o[n]]),n++;return t},"extend","Use `assign`."),Ru=Nu(function(t,e){return Fu(t,e,!0)},"merge","Use `assign`.");function Lu(t,e,i){var o,n=e.prototype;(o=t.prototype=Object.create(n)).constructor=t,o._super=n,i&&ad(o,i)}function ju(t,e){return function(){return t.apply(e,arguments)}}var Bu=function(){var t=function(t,e){return void 0===e&&(e={}),new Au(t,od({recognizers:Ou.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=30,t.DIRECTION_DOWN=Od,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=Ed,t.DIRECTION_NONE=1,t.DIRECTION_DOWN=Od,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=mu,t.Manager=Au,t.Input=Kd,t.TouchAction=Fd,t.TouchInput=su,t.MouseInput=hu,t.PointerEventInput=eu,t.TouchMouseInput=uu,t.SingleTouchInput=Pu,t.Recognizer=bu,t.AttrRecognizer=wu,t.Tap=yu,t.Pan=xu,t.Swipe=Cu,t.Pinch=Su,t.Rotate=Du,t.Press=ku,t.on=Ud,t.off=Xd,t.each=Pd,t.merge=Ru,t.extend=Fu,t.bindFn=ju,t.assign=ad,t.inherit=Lu,t.bindFn=ju,t.prefixed=pd,t.toArray=iu,t.inArray=$d,t.uniqueArray=ou,t.splitStr=Vd,t.boolOrFn=Md,t.hasParent=Rd,t.addEventListeners=Ud,t.removeEventListeners=Xd,t.defaults=ad({},Tu,{preset:Ou}),t}();Bu.defaults;
/**
* vis-util
* https://github.com/visjs/vis-util
*
* utilitie collection for visjs
*
* @version 6.0.0
* @date 2025-07-12T18:02:43.836Z
*
* @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.
*/
const zu=Symbol("DELETE");function Hu(...t){const e=Gu(...t);return Yu(e),e}function Gu(...t){if(t.length<2)return t[0];if(t.length>2)return Gu(Hu(t[0],t[1]),...t.slice(2));const e=t[0],i=t[1];if(e instanceof Date&&i instanceof Date)return e.setTime(i.getTime()),e;for(const t of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,t)&&(i[t]===zu?delete e[t]:null===e[t]||null===i[t]||"object"!=typeof e[t]||"object"!=typeof i[t]||Array.isArray(e[t])||Array.isArray(i[t])?e[t]=Wu(i[t]):e[t]=Gu(e[t],i[t]));return e}function Wu(t){return Array.isArray(t)?t.map(t=>Wu(t)):"object"==typeof t&&null!==t?t instanceof Date?new Date(t.getTime()):Gu({},t):t}function Yu(t){for(const e of Object.keys(t))t[e]===zu?delete t[e]:"object"==typeof t[e]&&null!==t[e]&&Yu(t[e])}const Vu="undefined"!=typeof window?window.Hammer||Bu:function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};function Uu(t){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(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const e=Vu(this._dom.overlay);e.on("tap",this._onTapOverlay.bind(this)),this._cleanupQueue.push(()=>{e.destroy()});["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(t=>{e.on(t,t=>{t.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=e=>{(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=t=>{("key"in t?"Escape"===t.key:27===t.keyCode)&&this.deactivate()}}id(Uu.prototype),Uu.current=null,Uu.prototype.destroy=function(){this.deactivate();for(const t of this._cleanupQueue.splice(0).reverse())t()},Uu.prototype.activate=function(){Uu.current&&Uu.current.deactivate(),Uu.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)},Uu.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")},Uu.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};const Xu=/^\/?Date\((-?\d+)/i,qu=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Ku=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,$u=/^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,Zu=/^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 Ju(t){return t instanceof Number||"number"==typeof t}function Qu(t){return t instanceof String||"string"==typeof t}function tp(t){return"object"==typeof t&&null!==t}function ep(t,e,i,o){let n=!1;!0===o&&(n=null===e[i]&&void 0!==t[i]),n?delete t[i]:t[i]=e[i]}const ip=Object.assign;function op(t,e,i=!1,o=!1){for(const n in e)(Object.prototype.hasOwnProperty.call(e,n)||!0===i)&&("object"==typeof e[n]&&null!==e[n]&&Object.getPrototypeOf(e[n])===Object.prototype?void 0===t[n]?t[n]=op({},e[n],i):"object"==typeof t[n]&&null!==t[n]&&Object.getPrototypeOf(t[n])===Object.prototype?op(t[n],e[n],i):ep(t,e,n,o):Array.isArray(e[n])?t[n]=e[n].slice():ep(t,e,n,o));return t}function np(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}function sp(t,e){return[...t,e]}function rp(t){return t.slice()}const ap=Object.values;const hp={asBoolean:(t,e)=>("function"==typeof t&&(t=t()),null!=t?0!=t:e||null),asNumber:(t,e)=>("function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null),asString:(t,e)=>("function"==typeof t&&(t=t()),null!=t?String(t):e||null),asSize:(t,e)=>("function"==typeof t&&(t=t()),Qu(t)?t:Ju(t)?t+"px":e||null),asElement:(t,e)=>("function"==typeof t&&(t=t()),t||e||null)};function lp(t){let e;switch(t.length){case 3:case 4:return e=Ku.exec(t),e?{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16)}:null;case 6:case 7:return e=qu.exec(t),e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null;default:return null}}function cp(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)}function dp(t,e,i){t/=255,e/=255,i/=255;const o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o===n)return{h:0,s:0,v:o};return{h:60*((t===o?3:i===o?1:5)-(t===o?e-i:i===o?t-e:i-t)/(n-o))/360,s:(n-o)/n,v:n}}function up(t){const e=document.createElement("div"),i={};e.style.cssText=t;for(let t=0;t<e.style.length;++t)i[e.style[t]]=e.style.getPropertyValue(e.style[t]);return i}function pp(t,e,i){let o,n,s;const r=Math.floor(6*t),a=6*t-r,h=i*(1-e),l=i*(1-a*e),c=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=c,s=h;break;case 1:o=l,n=i,s=h;break;case 2:o=h,n=i,s=c;break;case 3:o=h,n=l,s=i;break;case 4:o=c,n=h,s=i;break;case 5:o=i,n=h,s=l}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}}function mp(t,e,i){const o=pp(t,e,i);return cp(o.r,o.g,o.b)}function fp(t){const e=lp(t);if(!e)throw new TypeError(`'${t}' is not a valid color.`);return dp(e.r,e.g,e.b)}function gp(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function vp(t){return $u.test(t)}function bp(t){return Zu.test(t)}function yp(t){if(null===t||"object"!=typeof t)return null;if(t instanceof Element)return t;const e=Object.create(t);for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&"object"==typeof t[i]&&(e[i]=yp(t[i]));return e}const wp={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:(4-2*t)*t-1,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1- --t*t*t*t,easeInOutQuart:t=>t<.5?8*t*t*t*t:1-8*--t*t*t*t,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1+--t*t*t*t*t,easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t};const _p={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"};let xp=class{constructor(t=1){this.pixelRatio=t,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}setCloseCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}_isColorString(t){if("string"==typeof t)return _p[t]}setColor(t,e=!0){if("none"===t)return;let i;const o=this._isColorString(t);if(void 0!==o&&(t=o),!0===Qu(t)){if(!0===vp(t)){const e=t.substr(4).substr(0,t.length-5).split(",");i={r:e[0],g:e[1],b:e[2],a:1}}else if(!0===bp(t)){const e=t.substr(5).substr(0,t.length-6).split(",");i={r:e[0],g:e[1],b:e[2],a:e[3]}}else if(!0===gp(t)){const e=lp(t);i={r:e.r,g:e.g,b:e.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){const e=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:e}}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: "+JSON.stringify(t));this._setColor(i,e)}show(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(t=!0){!0===t&&(this.previousColor=Object.assign({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(()=>{void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(t,e=!0){!0===e&&(this.initialColor=Object.assign({},t)),this.color=t;const i=dp(t.r,t.g,t.b),o=2*Math.PI,n=this.r*i.s,s=this.centerCoordinates.x+n*Math.sin(o*i.h),r=this.centerCoordinates.y+n*Math.cos(o*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=r-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){const e=dp(this.color.r,this.color.g,this.color.b);e.v=t/100;const i=pp(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(t=this.color){const e=dp(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);const o=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,o,n),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),i.fill(),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+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){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){const t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const t=this;this.opacityRange.onchange=function(){t._setOpacity(this.value)},this.opacityRange.oninput=function(){t._setOpacity(this.value)},this.brightnessRange.onchange=function(){t._setBrightness(this.value)},this.brightnessRange.oninput=function(){t._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=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=this._loadLast.bind(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)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new Vu(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",t=>{t.isFirst&&this._moveSelector(t)}),this.hammer.on("tap",t=>{this._moveSelector(t)}),this.hammer.on("panstart",t=>{this._moveSelector(t)}),this.hammer.on("panmove",t=>{this._moveSelector(t)}),this.hammer.on("panend",t=>{this._moveSelector(t)})}_generateHueCircle(){if(!1===this.generated){const 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);const e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;let o,n,s,r;t.clearRect(0,0,e,i),this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;const a=2*Math.PI/360,h=1/360,l=1/this.r;let c;for(s=0;s<360;s++)for(r=0;r<this.r;r++)o=this.centerCoordinates.x+r*Math.sin(a*s),n=this.centerCoordinates.y+r*Math.cos(a*s),c=pp(s*h,r*l,1),t.fillStyle="rgb("+c.r+","+c.g+","+c.b+")",t.fillRect(o-.5,n-.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,e,i)}this.generated=!0}_moveSelector(t){const e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,o=t.center.y-e.top,n=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=o-n,h=Math.atan2(r,a),l=.98*Math.min(Math.sqrt(r*r+a*a),s),c=Math.cos(h)*l+n,d=Math.sin(h)*l+s;this.colorPickerSelector.style.top=c-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+"px";let u=h/(2*Math.PI);u=u<0?u+1:u;const p=l/this.r,m=dp(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;const f=pp(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+")"}};function Cp(...t){if(t.length<1)throw new TypeError("Invalid arguments.");if(1===t.length)return document.createTextNode(t[0]);{const e=document.createElement(t[0]);return e.appendChild(Cp(...t.slice(1))),e}}let Sp,Dp=!1;const kp="background: #FFeeee; color: #dd0000";const Tp=Uu,Op=xp,Ep=class{constructor(t,e,i,o=1,n=()=>!1){this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=n,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Object.assign(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new xp(o),this.wrapper=void 0}setOptions(t){if(void 0!==t){this.popupHistory={},this._removePopup();let e=!0;if("string"==typeof t)this.options.filter=t;else if(Array.isArray(t))this.options.filter=t.join();else if("object"==typeof t){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==t.filter&&(this.options.filter=t.filter),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===this.options.filter&&(e=!1),this.options.enabled=e}this._clean()}setModuleOptions(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const t=this.options.filter;let e=0,i=!1;for(const o in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,o)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(o,[]),i=i||this._handleObject(this.configureOptions[o],[o],!0)):!0!==t&&-1===t.indexOf(o)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(o),this._handleObject(this.configureOptions[o],[o])),e++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}_clean(){for(let 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()}_getValue(t){let e=this.moduleOptions;for(let i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}_makeItem(t,...e){if(!0===this.allowCreation){const i=document.createElement("div");return i.className="vis-configuration vis-config-item vis-config-s"+t.length,e.forEach(t=>{i.appendChild(t)}),this.domElements.push(i),this.domElements.length}return 0}_makeHeader(t){const e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerText=t,this._makeItem([],e)}_makeLabel(t,e,i=!1){const o=document.createElement("div");if(o.className="vis-configuration vis-config-label vis-config-s"+e.length,!0===i){for(;o.firstChild;)o.removeChild(o.firstChild);o.appendChild(Cp("i","b",t))}else o.innerText=t+":";return o}_makeDropdown(t,e,i){const o=document.createElement("select");o.className="vis-configuration vis-config-select";let n=0;void 0!==e&&-1!==t.indexOf(e)&&(n=t.indexOf(e));for(let e=0;e<t.length;e++){const i=document.createElement("option");i.value=t[e],e===n&&(i.selected="selected"),i.innerText=t[e],o.appendChild(i)}const s=this;o.onchange=function(){s._update(this.value,i)};const r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,o)}_makeRange(t,e,i){const o=t[0],n=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=n,a.max=s}catch(t){}a.step=r;let h="",l=0;if(void 0!==e){const t=1.2;e<0&&e*t<n?(a.min=Math.ceil(e*t),l=a.min,h="range increased"):e/t<n&&(a.min=Math.ceil(e/t),l=a.min,h="range increased"),e*t>s&&1!==s&&(a.max=Math.ceil(e*t),l=a.max,h="range increased"),a.value=e}else a.value=o;const c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;const d=this;a.onchange=function(){c.value=this.value,d._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};const u=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,u,a,c);""!==h&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(h,p))}_makeButton(){if(!0===this.options.showButton){const t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=()=>{this._printOptions()},t.onmouseover=()=>{t.className="vis-configuration vis-config-button hover"},t.onmouseout=()=>{t.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(t)}}_setupPopup(t,e){if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){const i=document.createElement("div");i.id="vis-configuration-popup",i.className="vis-configuration-popup",i.innerText=t,i.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}_removePopup(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(void 0!==this.popupDiv.html){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=setTimeout(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=setTimeout(()=>{this._removePopup()},1800)}}_makeCheckbox(t,e,i){const o=document.createElement("input");o.type="checkbox",o.className="vis-configuration vis-config-checkbox",o.checked=t,void 0!==e&&(o.checked=e,e!==t&&("object"==typeof t?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));const n=this;o.onchange=function(){n._update(this.checked,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_makeTextInput(t,e,i){const o=document.createElement("input");o.type="text",o.className="vis-configuration vis-config-text",o.value=e,e!==t&&this.changedOptions.push({path:i,value:e});const n=this;o.onchange=function(){n._update(this.value,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_makeColorField(t,e,i){const o=t[1],n=document.createElement("div");"none"!==(e=void 0===e?o:e)?(n.className="vis-configuration vis-config-colorBlock",n.style.backgroundColor=e):n.className="vis-configuration vis-config-colorBlock none",e=void 0===e?o:e,n.onclick=()=>{this._showColorPicker(e,n,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(t=>{const o="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=o,this._update(o,i)}),this.colorPicker.setCloseCallback(()=>{e.onclick=()=>{this._showColorPicker(t,e,i)}})}_handleObject(t,e=[],i=!1){let o=!1;const n=this.options.filter;let s=!1;for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){o=!0;const a=t[r],h=sp(e,r);if("function"==typeof n&&(o=n(r,e),!1===o&&!Array.isArray(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,o=this._handleObject(a,h,!0),this.allowCreation=!1===i)),!1!==o){s=!0;const t=this._getValue(h);if(Array.isArray(a))this._handleArray(a,t,h);else if("string"==typeof a)this._makeTextInput(a,t,h);else if("boolean"==typeof a)this._makeCheckbox(a,t,h);else if(a instanceof Object){if(!this.hideOption(e,r,this.moduleOptions))if(void 0!==a.enabled){const t=sp(h,"enabled"),e=this._getValue(t);if(!0===e){const t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,e,h)}else{const t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}_handleArray(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)}))}_update(t,e){const 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)}_constructOptions(t,e,i={}){let o=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;i<e.length;i++)"global"!==e[i]&&(void 0===o[e[i]]&&(o[e[i]]={}),i!==e.length-1?o=o[e[i]]:o[e[i]]=t);return i}_printOptions(){const t=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(Cp("pre","const options = "+JSON.stringify(t,null,2)))}getOptions(){const t={};for(let e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}},Ap=Vu,Ip=class{constructor(t,e){this.container=t,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(t,e){this.x=parseInt(t),this.y=parseInt(e)}setText(t){if(t instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(t)}else this.frame.innerText=t}show(t){if(void 0===t&&(t=!0),!0===t){const t=this.frame.clientHeight,e=this.frame.clientWidth,i=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth;let n=0,s=0;if("flip"==this.overflowMethod){let i=!1,r=!0;this.y-t<this.padding&&(r=!1),this.x+e>o-this.padding&&(i=!0),n=i?this.x-e:this.x,s=r?this.y-t:this.y}else s=this.y-t,s+t+this.padding>i&&(s=i-t-this.padding),s<this.padding&&(s=this.padding),n=this.x,n+e+this.padding>o&&(n=o-e-this.padding),n<this.padding&&(n=this.padding);this.frame.style.left=n+"px",this.frame.style.top=s+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}},Pp=kp,Mp=class t{static validate(e,i,o){Dp=!1,Sp=i;let n=i;return void 0!==o&&(n=i[o]),t.parse(e,n,[]),Dp}static parse(e,i,o){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.check(n,e,i,o)}static check(e,i,o,n){if(void 0===o[e]&&void 0===o.__any__)return void t.getSuggestion(e,o,n);let s=e,r=!0;void 0===o[e]&&void 0!==o.__any__&&(s="__any__",r="object"===t.getType(i[e]));let a=o[s];r&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,o,s,a,n)}static checkFields(e,i,o,n,s,r){const a=function(i){console.error("%c"+i+t.printLocation(r,e),kp)},h=t.getType(i[e]),l=s[h];void 0!==l?"array"===t.getType(l)&&-1===l.indexOf(i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(l)+' not "'+i[e]+'". '),Dp=!0):"object"===h&&"__any__"!==n&&(r=sp(r,e),t.parse(i[e],o[n],r)):void 0===s.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(Object.keys(s))+". Received ["+h+'] "'+i[e]+'"'),Dp=!0)}static getType(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Array.isArray(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}static getSuggestion(e,i,o){const n=t.findInOptions(e,i,o,!1),s=t.findInOptions(e,Sp,[],!0);let r;r=void 0!==n.indexMatch?" in "+t.printLocation(n.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+n.indexMatch+'"?\n\n':s.distance<=4&&n.distance>s.distance?" in "+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):n.distance<=8?'. Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e):". Did you mean one of these: "+t.print(Object.keys(i))+t.printLocation(o,e),console.error('%cUnknown option detected: "'+e+'"'+r,kp),Dp=!0}static findInOptions(e,i,o,n=!1){let s=1e9,r="",a=[];const h=e.toLowerCase();let l;for(const c in i){let d;if(void 0!==i[c].__type__&&!0===n){const n=t.findInOptions(e,i[c],sp(o,c));s>n.distance&&(r=n.closestMatch,a=n.path,s=n.distance,l=n.indexMatch)}else-1!==c.toLowerCase().indexOf(h)&&(l=c),d=t.levenshteinDistance(e,c),s>d&&(r=c,a=rp(o),s=d)}return{closestMatch:r,path:a,distance:s,indexMatch:l}}static printLocation(t,e,i="Problem value found at: \n"){let o="\n\n"+i+"options = {\n";for(let e=0;e<t.length;e++){for(let t=0;t<e+1;t++)o+=" ";o+=t[e]+": {\n"}for(let e=0;e<t.length+1;e++)o+=" ";o+=e+"\n";for(let e=0;e<t.length+1;e++){for(let i=0;i<t.length-e;i++)o+=" ";o+="}\n"}return o+"\n\n"}static print(t){return JSON.stringify(t).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const i=[];let o,n;for(o=0;o<=e.length;o++)i[o]=[o];for(n=0;n<=t.length;n++)i[0][n]=n;for(o=1;o<=e.length;o++)for(n=1;n<=t.length;n++)e.charAt(o-1)==t.charAt(n-1)?i[o][n]=i[o-1][n-1]:i[o][n]=Math.min(i[o-1][n-1]+1,Math.min(i[o][n-1]+1,i[o-1][n]+1));return i[e.length][t.length]}};var Np,Fp,Rp,Lp,jp,Bp,zp,Hp,Gp,Wp,Yp,Vp=Object.freeze({__proto__:null,Activator:Tp,Alea:function(...t){return function(t){let[e,i,o]=function(...t){const e=function(){let t=4022871197;return function(e){const i=e.toString();for(let e=0;e<i.length;e++){t+=i.charCodeAt(e);let o=.02519603282416938*t;t=o>>>0,o-=t,o*=t,t=o>>>0,o-=t,t+=4294967296*o}return 2.3283064365386963e-10*(t>>>0)}}();let i=e(" "),o=e(" "),n=e(" ");for(let s=0;s<t.length;s++)i-=e(t[s]),i<0&&(i+=1),o-=e(t[s]),o<0&&(o+=1),n-=e(t[s]),n<0&&(n+=1);return[i,o,n]}(t),n=1;const s=()=>{const t=2091639*e+2.3283064365386963e-10*n;return e=i,i=o,o=t-(n=0|t)};return s.uint32=()=>4294967296*s(),s.fract53=()=>s()+11102230246251565e-32*(2097152*s()|0),s.algorithm="Alea",s.seed=t,s.version="0.9",s}(t.length?t:[Date.now()])},ColorPicker:Op,Configurator:Ep,DELETE:zu,HSVToHex:mp,HSVToRGB:pp,Hammer:Ap,Popup:Ip,RGBToHSV:dp,RGBToHex:cp,VALIDATOR_PRINT_STYLE:Pp,Validator:Mp,addClassName:function(t,e){let i=t.className.split(" ");const o=e.split(" ");i=i.concat(o.filter(function(t){return!i.includes(t)})),t.className=i.join(" ")},addCssText:function(t,e){const i=up(e);for(const[e,o]of Object.entries(i))t.style.setProperty(e,o)},binarySearchCustom:function(t,e,i,o){let n=0,s=0,r=t.length-1;for(;s<=r&&n<1e4;){const a=Math.floor((s+r)/2),h=t[a],l=e(void 0===o?h[i]:h[i][o]);if(0==l)return a;-1==l?s=a+1:r=a-1,n++}return-1},binarySearchValue:function(t,e,i,o,n){let s,r,a,h,l=0,c=0,d=t.length-1;for(n=null!=n?n:function(t,e){return t==e?0:t<e?-1:1};c<=d&&l<1e4;){if(h=Math.floor(.5*(d+c)),s=t[Math.max(0,h-1)][i],r=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==n(r,e))return h;if(n(s,e)<0&&n(r,e)>0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?c=h+1:d=h-1,l++}return-1},bridgeObject:yp,copyAndExtendArray:sp,copyArray:rp,deepExtend:op,deepObjectAssign:Hu,easingFunctions:wp,equalArray:function(t,e){if(t.length!==e.length)return!1;for(let i=0,o=t.length;i<o;i++)if(t[i]!=e[i])return!1;return!0},extend:ip,fillIfDefined:function t(e,i,o=!1){for(const n in e)if(void 0!==i[n])if(null===i[n]||"object"!=typeof i[n])ep(e,i,n,o);else{const s=e[n],r=i[n];tp(s)&&tp(r)&&t(s,r,o)}},forEach:function(t,e){if(Array.isArray(t)){const i=t.length;for(let o=0;o<i;o++)e(t[o],o,t)}else for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&e(t[i],i,t)},getAbsoluteLeft:function(t){return t.getBoundingClientRect().left},getAbsoluteRight:function(t){return t.getBoundingClientRect().right},getAbsoluteTop:function(t){return t.getBoundingClientRect().top},getScrollBarWidth:function(){const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const 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);const i=t.offsetWidth;e.style.overflow="scroll";let o=t.offsetWidth;return i==o&&(o=e.clientWidth),document.body.removeChild(e),i-o},getTarget:function(t=window.event){let 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,e instanceof Element))?e:null},getType:np,hasParent:function(t,e){let i=t;for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}return!1},hexToHSV:fp,hexToRGB:lp,insertSort:function(t,e){for(let i=0;i<t.length;i++){const o=t[i];let n;for(n=i;n>0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},isDate:function(t){if(t instanceof Date)return!0;if(Qu(t)){if(Xu.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:Ju,isObject:tp,isString:Qu,isValidHex:gp,isValidRGB:vp,isValidRGBA:bp,mergeOptions:function(t,e,i,o={}){const n=function(t){return null!=t},s=function(t){return null!==t&&"object"==typeof t};if(!s(t))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!n(i))throw new Error("Parameter option must have a value");if(!s(o))throw new Error("Parameter globalOptions must be an object");const r=e[i],a=s(o)&&!function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(o)?o[i]:void 0,h=a?a.enabled:void 0;if(void 0===r)return;if("boolean"==typeof r)return s(t[i])||(t[i]={}),void(t[i].enabled=r);if(null===r&&!s(t[i])){if(!n(a))return;t[i]=Object.create(a)}if(!s(r))return;let l=!0;void 0!==r.enabled?l=r.enabled:void 0!==h&&(l=a.enabled),function(t,e,i){s(t[i])||(t[i]={});const o=e[i],n=t[i];for(const t in o)Object.prototype.hasOwnProperty.call(o,t)&&(n[t]=o[t])}(t,e,i),t[i].enabled=l},option:hp,overrideOpacity:function(t,e){if(t.includes("rgba"))return t;if(t.includes("rgb")){const i=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}{const i=lp(t);return null==i?t:"rgba("+i.r+","+i.g+","+i.b+","+e+")"}},parseColor:function(t,e){if(Qu(t)){let e=t;if(vp(e)){const t=e.substr(4).substr(0,e.length-5).split(",").map(function(t){return parseInt(t)});e=cp(t[0],t[1],t[2])}if(!0===gp(e)){const t=fp(e),i={h:t.h,s:.8*t.s,v:Math.min(1,1.02*t.v)},o={h:t.h,s:Math.min(1,1.25*t.s),v:.8*t.v},n=mp(o.h,o.s,o.v),s=mp(i.h,i.s,i.v);return{background:e,border:n,highlight:{background:s,border:n},hover:{background:s,border:n}}}return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}if(e){return{background:t.background||e.background,border:t.border||e.border,highlight:Qu(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:Qu(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}}}return{background:t.background||void 0,border:t.border||void 0,highlight:Qu(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:Qu(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,...e){return Hu({},t,...e)},recursiveDOMDelete:function t(e){if(e)for(;!0===e.hasChildNodes();){const i=e.firstChild;i&&(t(i),e.removeChild(i))}},removeClassName:function(t,e){let i=t.className.split(" ");const o=e.split(" ");i=i.filter(function(t){return!o.includes(t)}),t.className=i.join(" ")},removeCssText:function(t,e){const i=up(e);for(const e of Object.keys(i))t.style.removeProperty(e)},selectiveBridgeObject:function(t,e){if(null!==e&&"object"==typeof e){const i=Object.create(e);for(let o=0;o<t.length;o++)Object.prototype.hasOwnProperty.call(e,t[o])&&"object"==typeof e[t[o]]&&(i[t[o]]=yp(e[t[o]]));return i}return null},selectiveDeepExtend:function(t,e,i,o=!1){if(Array.isArray(i))throw new TypeError("Arrays are not supported by deepExtend");for(let n=0;n<t.length;n++){const s=t[n];if(Object.prototype.hasOwnProperty.call(i,s))if(i[s]&&i[s].constructor===Object)void 0===e[s]&&(e[s]={}),e[s].constructor===Object?op(e[s],i[s],!1,o):ep(e,i,s,o);else{if(Array.isArray(i[s]))throw new TypeError("Arrays are not supported by deepExtend");ep(e,i,s,o)}}return e},selectiveExtend:function(t,e,...i){if(!Array.isArray(t))throw new Error("Array with property names expected as first argument");for(const o of i)for(let i=0;i<t.length;i++){const n=t[i];o&&Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},selectiveNotDeepExtend:function(t,e,i,o=!1){if(Array.isArray(i))throw new TypeError("Arrays are not supported by deepExtend");for(const n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&!t.includes(n))if(i[n]&&i[n].constructor===Object)void 0===e[n]&&(e[n]={}),e[n].constructor===Object?op(e[n],i[n]):ep(e,i,n,o);else if(Array.isArray(i[n])){e[n]=[];for(let t=0;t<i[n].length;t++)e[n].push(i[n][t])}else ep(e,i,n,o);return e},throttle:function(t){let e=!1;return()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,t()}))}},toArray:ap,topMost:function(t,e){let i;Array.isArray(e)||(e=[e]);for(const o of t)if(o){i=o[e[0]];for(let t=1;t<e.length;t++)i&&(i=i[e[t]]);if(void 0!==i)break}return i},updateProperty:function(t,e,i){return t[e]!==i&&(t[e]=i,!0)}}),Up={exports:{}},Xp={},qp={exports:{}},Kp={};function $p(){if(Np)return Kp;function t(){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}Np=1;var e=/javascript\s*\:/gim;return Kp.whiteList=t(),Kp.getDefaultWhiteList=t,Kp.onAttr=function(t,e,i){},Kp.onIgnoreAttr=function(t,e,i){},Kp.safeAttrValue=function(t,i){return e.test(i)?"":i},Kp}function Zp(){return Rp?Fp:(Rp=1,Fp={indexOf:function(t,e){var i,o;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,o=t.length;i<o;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var o,n;if(Array.prototype.forEach)return t.forEach(e,i);for(o=0,n=t.length;o<n;o++)e.call(i,t[o],o,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,"")}})}function Jp(){if(zp)return Bp;zp=1;var t=$p(),e=function(){if(jp)return Lp;jp=1;var t=Zp();return Lp=function(e,i){";"!==(e=t.trimRight(e))[e.length-1]&&(e+=";");var o=e.length,n=!1,s=0,r=0,a="";function h(){if(!n){var o=t.trim(e.slice(s,r)),h=o.indexOf(":");if(-1!==h){var l=t.trim(o.slice(0,h)),c=t.trim(o.slice(h+1));if(l){var d=i(s,a.length,l,c,o);d&&(a+=d+"; ")}}}s=r+1}for(;r<o;r++){var l=e[r];if("/"===l&&"*"===e[r+1]){var c=e.indexOf("*/",r+2);if(-1===c)break;s=(r=c+1)+1,n=!1}else"("===l?n=!0:")"===l?n=!1:";"===l?n||h():"\n"===l&&h()}return t.trim(a)},Lp}();function i(t){return null==t}function o(e){(e=function(t){var e={};for(var i in t)e[i]=t[i];return e}(e||{})).whiteList=e.whiteList||t.whiteList,e.onAttr=e.onAttr||t.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||t.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||t.safeAttrValue,this.options=e}return Zp(),o.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var o=this.options,n=o.whiteList,s=o.onAttr,r=o.onIgnoreAttr,a=o.safeAttrValue;return e(t,function(t,e,o,h,l){var c=n[o],d=!1;if(!0===c?d=c:"function"==typeof c?d=c(h):c instanceof RegExp&&(d=c.test(h)),!0!==d&&(d=!1),h=a(o,h)){var u,p={position:e,sourcePosition:t,source:l,isWhite:d};return d?i(u=s(o,h,p))?o+":"+h:u:i(u=r(o,h,p))?void 0:u}})},Bp=o}function Qp(){return Hp||(Hp=1,function(t,e){var i=$p(),o=Jp();for(var n in e=t.exports=function(t,e){return new o(e).process(t)},e.FilterCSS=o,i)e[n]=i[n];"undefined"!=typeof window&&(window.filterCSS=t.exports)}(qp,qp.exports)),qp.exports}function tm(){return Wp?Gp:(Wp=1,Gp={indexOf:function(t,e){var i,o;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,o=t.length;i<o;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var o,n;if(Array.prototype.forEach)return t.forEach(e,i);for(o=0,n=t.length;o<n;o++)e.call(i,t[o],o,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}})}function em(){if(Yp)return Xp;Yp=1;var t=Qp().FilterCSS,e=Qp().getDefaultWhiteList,i=tm();function o(){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","loading"],ins:["datetime"],kbd:[],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 n=new t;function s(t){return t.replace(r,"<").replace(a,">")}var r=/</g,a=/>/g,h=/"/g,l=/"/g,c=/&#([a-zA-Z0-9]*);?/gim,d=/:?/gim,u=/&newline;?/gim,p=/((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,m=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,f=/u\s*r\s*l\s*\(.*/gi;function g(t){return t.replace(h,""")}function v(t){return t.replace(l,'"')}function b(t){return t.replace(c,function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))})}function y(t){return t.replace(d,":").replace(u," ")}function w(t){for(var e="",o=0,n=t.length;o<n;o++)e+=t.charCodeAt(o)<32?" ":t.charAt(o);return i.trim(e)}function _(t){return t=w(t=y(t=b(t=v(t))))}function x(t){return t=s(t=g(t))}return Xp.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","loading"],ins:["datetime"],kbd:[],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"]},Xp.getDefaultWhiteList=o,Xp.onTag=function(t,e,i){},Xp.onIgnoreTag=function(t,e,i){},Xp.onTagAttr=function(t,e,i){},Xp.onIgnoreTagAttr=function(t,e,i){},Xp.safeAttrValue=function(t,e,o,s){if(o=_(o),"href"===e||"src"===e){if("#"===(o=i.trim(o)))return"#";if("http://"!==o.substr(0,7)&&"https://"!==o.substr(0,8)&&"mailto:"!==o.substr(0,7)&&"tel:"!==o.substr(0,4)&&"data:image/"!==o.substr(0,11)&&"ftp://"!==o.substr(0,6)&&"./"!==o.substr(0,2)&&"../"!==o.substr(0,3)&&"#"!==o[0]&&"/"!==o[0])return""}else if("background"===e){if(p.lastIndex=0,p.test(o))return""}else if("style"===e){if(m.lastIndex=0,m.test(o))return"";if(f.lastIndex=0,f.test(o)&&(p.lastIndex=0,p.test(o)))return"";!1!==s&&(o=(s=s||n).process(o))}return o=x(o)},Xp.escapeHtml=s,Xp.escapeQuote=g,Xp.unescapeQuote=v,Xp.escapeHtmlEntities=b,Xp.escapeDangerHtml5Entities=y,Xp.clearNonPrintableCharacter=w,Xp.friendlyAttrValue=_,Xp.escapeAttrValue=x,Xp.onIgnoreTagStripAll=function(){return""},Xp.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var o=!Array.isArray(t),n=[],s=!1;return{onIgnoreTag:function(r,a,h){if(function(e){return!!o||-1!==i.indexOf(t,e)}(r)){if(h.isClosing){var l="[/removed]",c=h.position+10;return n.push([!1!==s?s:h.position,c]),s=!1,l}return s||(s=h.position),"[removed]"}return e(r,a,h)},remove:function(t){var e="",o=0;return i.forEach(n,function(i){e+=t.slice(o,i[0]),o=i[1]}),e+=t.slice(o)}}},Xp.stripCommentTag=function(t){for(var e="",i=0;i<t.length;){var o=t.indexOf("\x3c!--",i);if(-1===o){e+=t.slice(i);break}e+=t.slice(i,o);var n=t.indexOf("--\x3e",o);if(-1===n)break;i=n+3}return e},Xp.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("")},Xp.attributeWrapSign='"',Xp.cssFilter=n,Xp.getDefaultCSSWhiteList=e,Xp}var im,om,nm,sm,rm={};function am(){if(im)return rm;im=1;var t=tm();function e(e){var i,o=t.spaceIndex(e);return i=-1===o?e.slice(1,-1):e.slice(1,o+1),"/"===(i=t.trim(i).toLowerCase()).slice(0,1)&&(i=i.slice(1)),"/"===i.slice(-1)&&(i=i.slice(0,-1)),i}function i(t){return"</"===t.slice(0,2)}var o=/[^a-zA-Z0-9\\_:.-]/gim;function n(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"="===i?e:-1}}function s(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"'"===i||'"'===i?e:-1}}function r(t,e){for(;e>0;e--){var i=t[e];if(" "!==i)return"="===i?e:-1}}function a(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}return rm.parseTag=function(t,o,n){var s="",r=0,a=!1,h=!1,l=0,c=t.length,d="",u="";t:for(l=0;l<c;l++){var p=t.charAt(l);if(!1===a){if("<"===p){a=l;continue}}else if(!1===h){if("<"===p){s+=n(t.slice(r,l)),a=l,r=l;continue}if(">"===p||l===c-1){s+=n(t.slice(r,a)),d=e(u=t.slice(a,l+1)),s+=o(a,s.length,d,u,i(u)),r=l+1,a=!1;continue}if('"'===p||"'"===p)for(var m=1,f=t.charAt(l-m);""===f.trim()||"="===f;){if("="===f){h=p;continue t}f=t.charAt(l-++m)}}else if(p===h){h=!1;continue}}return r<c&&(s+=n(t.substr(r))),s},rm.parseAttr=function(e,i){var h=0,l=0,c=[],d=!1,u=e.length;function p(e,n){if(!((e=(e=t.trim(e)).replace(o,"").toLowerCase()).length<1)){var s=i(e,n||"");s&&c.push(s)}}for(var m=0;m<u;m++){var f,g=e.charAt(m);if(!1!==d||"="!==g)if(!1===d||m!==l)if(/\s|\n|\t/.test(g)){if(e=e.replace(/\s|\n|\t/g," "),!1===d){if(-1===(f=n(e,m))){p(t.trim(e.slice(h,m))),d=!1,h=m+1;continue}m=f-1;continue}if(-1===(f=r(e,m-1))){p(d,a(t.trim(e.slice(h,m)))),d=!1,h=m+1;continue}}else;else{if(-1===(f=e.indexOf(g,m+1)))break;p(d,t.trim(e.slice(l+1,f))),d=!1,h=(m=f)+1}else d=e.slice(h,m),h=m+1,l='"'===e.charAt(h)||"'"===e.charAt(h)?h:s(e,m+1)}return h<e.length&&(!1===d?p(e.slice(h)):p(d,a(t.trim(e.slice(h))))),t.trim(c.join(" "))},rm}function hm(){if(nm)return om;nm=1;var t=Qp().FilterCSS,e=em(),i=am(),o=i.parseTag,n=i.parseAttr,s=tm();function r(t){return null==t}function a(i){(i=function(t){var e={};for(var i in t)e[i]=t[i];return e}(i||{})).stripIgnoreTag&&(i.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),i.onIgnoreTag=e.onIgnoreTagStripAll),i.whiteList||i.allowList?i.whiteList=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i.toLowerCase()]=t[i].map(function(t){return t.toLowerCase()}):e[i.toLowerCase()]=t[i];return e}(i.whiteList||i.allowList):i.whiteList=e.whiteList,this.attributeWrapSign=!0===i.singleQuotedAttributeValue?"'":e.attributeWrapSign,i.onTag=i.onTag||e.onTag,i.onTagAttr=i.onTagAttr||e.onTagAttr,i.onIgnoreTag=i.onIgnoreTag||e.onIgnoreTag,i.onIgnoreTagAttr=i.onIgnoreTagAttr||e.onIgnoreTagAttr,i.safeAttrValue=i.safeAttrValue||e.safeAttrValue,i.escapeHtml=i.escapeHtml||e.escapeHtml,this.options=i,!1===i.css?this.cssFilter=!1:(i.css=i.css||{},this.cssFilter=new t(i.css))}return a.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var i=this,a=i.options,h=a.whiteList,l=a.onTag,c=a.onIgnoreTag,d=a.onTagAttr,u=a.onIgnoreTagAttr,p=a.safeAttrValue,m=a.escapeHtml,f=i.attributeWrapSign,g=i.cssFilter;a.stripBlankChar&&(t=e.stripBlankChar(t)),a.allowCommentTag||(t=e.stripCommentTag(t));var v=!1;a.stripIgnoreTagBody&&(v=e.StripTagBody(a.stripIgnoreTagBody,c),c=v.onIgnoreTag);var b=o(t,function(t,e,i,o,a){var v={sourcePosition:t,position:e,isClosing:a,isWhite:Object.prototype.hasOwnProperty.call(h,i)},b=l(i,o,v);if(!r(b))return b;if(v.isWhite){if(v.isClosing)return"</"+i+">";var y=function(t){var e=s.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var i="/"===(t=s.trim(t.slice(e+1,-1)))[t.length-1];return i&&(t=s.trim(t.slice(0,-1))),{html:t,closing:i}}(o),w=h[i],_=n(y.html,function(t,e){var o=-1!==s.indexOf(w,t),n=d(i,t,e,o);return r(n)?o?(e=p(i,t,e,g))?t+"="+f+e+f:t:r(n=u(i,t,e,o))?void 0:n:n});return o="<"+i,_&&(o+=" "+_),y.closing&&(o+=" /"),o+=">"}return r(b=c(i,o,v))?m(o):b},m);return v&&(b=v.remove(b)),b},om=a}var lm=(sm||(sm=1,function(t,e){var i=em(),o=am(),n=hm();function s(t,e){return new n(e).process(t)}(e=t.exports=s).filterXSS=s,e.FilterXSS=n,function(){for(var t in i)e[t]=i[t];for(var n in o)e[n]=o[n]}(),"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)}(Up,Up.exports)),Up.exports),cm=n(lm);const dm=[];for(let t=0;t<256;++t)dm.push((t+256).toString(16).slice(1));let um;const pm=new Uint8Array(16);var mm={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function fm(t,e,i){if(mm.randomUUID&&!t)return mm.randomUUID();const o=(t=t||{}).random??t.rng?.()??function(){if(!um){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");um=crypto.getRandomValues.bind(crypto)}return um(pm)}();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=15&o[6]|64,o[8]=63&o[8]|128,function(t,e=0){return(dm[t[e+0]]+dm[t[e+1]]+dm[t[e+2]]+dm[t[e+3]]+"-"+dm[t[e+4]]+dm[t[e+5]]+"-"+dm[t[e+6]]+dm[t[e+7]]+"-"+dm[t[e+8]]+dm[t[e+9]]+"-"+dm[t[e+10]]+dm[t[e+11]]+dm[t[e+12]]+dm[t[e+13]]+dm[t[e+14]]+dm[t[e+15]]).toLowerCase()}(o)}function gm(t,e){var i=$c(t);if($s){var o=$s(t);e&&(o=hr(o).call(o,function(e){return Sr(t,e).enumerable})),i.push.apply(i,o)}return i}function vm(t){for(var e=1;e<arguments.length;e++){var i,o,n=null!=arguments[e]?arguments[e]:{};e%2?Xo(i=gm(Object(n),!0)).call(i,function(e){oc(t,e,n[e])}):Rr?Jr(t,Rr(n)):Xo(o=gm(Object(n))).call(o,function(e){Jc(t,e,Sr(n,e))})}return t}function bm(t){var e;if(!t)return!1;let o=null!==(e=t.idProp)&&void 0!==e?e:t._idProp;return!!o&&i.isDataViewLike(o,t)}const ym=/^\/?Date\((-?\d+)/i,wm=/^\d+$/;function _m(t,i){let o;if(void 0!==t){if(null===t)return null;if(!i)return t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Qu(t)&&!isNaN(Date.parse(t))?e(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":try{return _m(t,"Moment").toDate()}catch(e){throw e instanceof TypeError?new TypeError("Cannot convert object of type "+np(t)+" to type "+i):e}case"Moment":if(Ju(t))return e(t);if(t instanceof Date)return e(t.valueOf());if(e.isMoment(t))return e(t);if(Qu(t))return o=ym.exec(t),o?e(Number(o[1])):(o=wm.exec(t),e(o?Number(t):t));throw new TypeError("Cannot convert object of type "+np(t)+" to type "+i);case"ISODate":if(Ju(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(e.isMoment(t))return t.toDate().toISOString();if(Qu(t))return o=ym.exec(t),o?new Date(Number(o[1])).toISOString():e(t).format();throw new Error("Cannot convert object of type "+np(t)+" to type ISODate");case"ASPDate":if(Ju(t))return"/Date("+t+")/";if(t instanceof Date||e.isMoment(t))return"/Date("+t.valueOf()+")/";if(Qu(t)){let e;return o=ym.exec(t),e=o?new Date(Number(o[1])).valueOf():new Date(t).valueOf(),"/Date("+e+")/"}throw new Error("Cannot convert object of type "+np(t)+" to type ASPDate");default:throw new Error("Unknown type ".concat(i))}}}function xm(t){var e,o,n,s,r,a;let h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{start:"Date",end:"Date"};const l=t._idProp,c=new i.DataSet({fieldId:l}),d=Ac(e=i.createNewDataPipeFrom(t)).call(e,t=>{var e;return Yc(e=$c(t)).call(e,(e,i)=>(e[i]=_m(t[i],h[i]),e),{})}).to(c);return d.all().start(),{add:function(){return t.getDataSet().add(...arguments)},remove:function(){return t.getDataSet().remove(...arguments)},update:function(){return t.getDataSet().update(...arguments)},updateOnly:function(){return t.getDataSet().updateOnly(...arguments)},clear:function(){return t.getDataSet().clear(...arguments)},forEach:Pi(o=Xo(c)).call(o,c),get:Pi(n=c.get).call(n,c),getIds:Pi(s=c.getIds).call(s,c),off:Pi(r=c.off).call(r,c),on:Pi(a=c.on).call(a,c),get length(){return c.length},idProp:l,type:h,rawDS:t,coercedDS:c,dispose:()=>d.stop()}}const Cm=t=>{const e=new cm.FilterXSS(t);return t=>"string"==typeof t?e.process(t):t},Sm=t=>t;let Dm=Cm();const km=vm(vm({},Vp),{},{convert:_m,setupXSSProtection:t=>{t&&(!0===t.disabled?(Dm=Sm,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):t.filterOptions&&(Dm=Cm(t.filterOptions)))}});var Tm,Om,Em,Am,Im,Pm,Mm,Nm;function Fm(){return Om?Tm:(Om=1,pa(),Tm=_i()("Array","concat"))}function Rm(){if(Am)return Em;Am=1;var t=Et(),e=Fm(),i=Array.prototype;return Em=function(o){var n=o.concat;return o===i||t(i,o)&&n===i.concat?e:n},Em}function Lm(){return Pm?Im:(Pm=1,Im=Rm())}Jc(km,"xss",{get:function(){return Dm}});var jm,Bm,zm,Hm,Gm,Wm,Ym,Vm,Um,Xm,qm,Km,$m,Zm=n(Nm?Mm:(Nm=1,Mm=Lm())),Jm={};function Qm(){if(Bm)return jm;Bm=1;var t=No(),e=Qo(),i=St(),o=RangeError;return jm=function(n){var s=e(i(this)),r="",a=t(n);if(a<0||a===1/0)throw new o("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(s+=s))1&a&&(r+=s);return r}}function tf(){if(Hm)return zm;Hm=1;var t=D(),e=Fo(),i=Qo(),o=Qm(),n=St(),s=t(o),r=t("".slice),a=Math.ceil,h=function(t){return function(o,h,l){var c,d,u=i(n(o)),p=e(h),m=u.length,f=void 0===l?" ":i(l);return p<=m||""===f?u:((d=s(f,a((c=p-m)/f.length))).length>c&&(d=r(d,0,c)),t?u+d:d+u)}};return zm={start:h(!1),end:h(!0)}}function ef(){if(Wm)return Gm;Wm=1;var t=D(),e=x(),i=tf().start,o=RangeError,n=isFinite,s=Math.abs,r=Date.prototype,a=r.toISOString,h=t(r.getTime),l=t(r.getUTCDate),c=t(r.getUTCFullYear),d=t(r.getUTCHours),u=t(r.getUTCMilliseconds),p=t(r.getUTCMinutes),m=t(r.getUTCMonth),f=t(r.getUTCSeconds);return Gm=e(function(){return"0385-07-25T07:06:39.999Z"!==a.call(new Date(-50000000000001))})||!e(function(){a.call(new Date(NaN))})?function(){if(!n(h(this)))throw new o("Invalid time value");var t=this,e=c(t),r=u(t),a=e<0?"-":e>9999?"+":"";return a+i(s(e),a?6:4,0)+"-"+i(m(t)+1,2,0)+"-"+i(l(t),2,0)+"T"+i(d(t),2,0)+":"+i(p(t),2,0)+":"+i(f(t),2,0)+"."+i(r,3,0)+"Z"}:a,Gm}function of(){if(Um)return Vm;Um=1,function(){if(Ym)return Jm;Ym=1;var t=Je(),e=F(),i=be(),o=xe(),n=ef(),s=k();t({target:"Date",proto:!0,forced:x()(function(){return null!==new Date(NaN).toJSON()||1!==e(Date.prototype.toJSON,{toISOString:function(){return 1}})})},{toJSON:function(t){var r=i(this),a=o(r,"number");return"number"!=typeof a||isFinite(a)?"toISOString"in r||"Date"!==s(r)?r.toISOString():e(n,r):null}})}(),ks();var t=Tt(),e=S();return t.JSON||(t.JSON={stringify:JSON.stringify}),Vm=function(i,o,n){return e(t.JSON.stringify,null,arguments)},Vm}function nf(){return qm?Xm:(qm=1,Xm=of())}var sf,rf,af,hf,lf,cf,df,uf=n($m?Km:($m=1,Km=nf())),pf={};function mf(){return af?rf:(af=1,function(){if(sf)return pf;sf=1;var t=Je(),e=Date,i=D()(e.prototype.getTime);t({target:"Date",stat:!0},{now:function(){return i(new e)}})}(),rf=Tt().Date.now)}function ff(){return lf?hf:(lf=1,hf=mf())}var gf,vf,bf,yf,wf,_f,xf,Cf,Sf,Df,kf,Tf,Of,Ef=n(df?cf:(df=1,cf=ff())),Af={};function If(){return vf?gf:(vf=1,gf="\t\n\v\f\r \u2028\u2029\ufeff")}function Pf(){if(yf)return bf;yf=1;var t=D(),e=St(),i=Qo(),o=If(),n=t("".replace),s=RegExp("^["+o+"]+"),r=RegExp("(^|[^"+o+"])["+o+"]+$"),a=function(t){return function(o){var a=i(e(o));return 1&t&&(a=n(a,s,"")),2&t&&(a=n(a,r,"$1")),a}};return bf={start:a(1),end:a(2),trim:a(3)}}function Mf(){if(_f)return wf;_f=1;var t=_(),e=x(),i=D(),o=Qo(),n=Pf().trim,s=If(),r=i("".charAt),a=t.parseFloat,h=t.Symbol,l=h&&h.iterator,c=1/a(s+"-0")!=-1/0||l&&!e(function(){a(Object(l))});return wf=c?function(t){var e=n(o(t)),i=a(e);return 0===i&&"-"===r(e,0)?-0:i}:a,wf}function Nf(){return Sf?Cf:(Sf=1,function(){if(xf)return Af;xf=1;var t=Je(),e=Mf();t({global:!0,forced:parseFloat!==e},{parseFloat:e})}(),Cf=Tt().parseFloat)}function Ff(){return kf?Df:(kf=1,Df=Nf())}var Rf=n(Of?Tf:(Of=1,Tf=Ff()));class Lf{constructor(t,e){this.options=null,this.props=null}setOptions(t){t&&km.extend(this.options,t)}redraw(){return!1}destroy(){}_isResized(){const 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}}var jf,Bf,zf,Hf,Gf,Wf,Yf,Vf,Uf;function Xf(){return zf?Bf:(zf=1,jf||(jf=1,Je()({target:"String",proto:!0},{repeat:Qm()})),Bf=_i()("String","repeat"))}function qf(){if(Gf)return Hf;Gf=1;var t=Et(),e=Xf(),i=String.prototype;return Hf=function(o){var n=o.repeat;return"string"==typeof o||o===i||t(i,o)&&n===i.repeat?e:n},Hf}function Kf(){return Yf?Wf:(Yf=1,Wf=qf())}var $f,Zf,Jf,Qf,tg,eg,ig,og,ng,sg,rg,ag,hg,lg,cg,dg,ug,pg,mg,fg=n(Uf?Vf:(Uf=1,Vf=Kf())),gg={};function vg(){if(Zf)return $f;Zf=1;var t=Ft(),e=TypeError;return $f=function(i,o){if(!delete i[o])throw new e("Cannot delete property "+t(o)+" of "+t(i))}}function bg(){if(Qf)return Jf;Qf=1;var t=yi(),e=Math.floor,i=function(o,n){var s=o.length;if(s<8)for(var r,a,h=1;h<s;){for(a=h,r=o[h];a&&n(o[a-1],r)>0;)o[a]=o[--a];a!==h++&&(o[a]=r)}else for(var l=e(s/2),c=i(t(o,0,l),n),d=i(t(o,l),n),u=c.length,p=d.length,m=0,f=0;m<u||f<p;)o[m+f]=m<u&&f<p?n(c[m],d[f])<=0?c[m++]:d[f++]:m<u?c[m++]:d[f++];return o};return Jf=i}function yg(){if(eg)return tg;eg=1;var t=At().match(/firefox\/(\d+)/i);return tg=!!t&&+t[1]}function wg(){return og?ig:(og=1,ig=/MSIE|Trident/.test(At()))}function _g(){if(sg)return ng;sg=1;var t=At().match(/AppleWebKit\/(\d+)\./);return ng=!!t&&+t[1]}function xg(){if(rg)return gg;rg=1;var t=Je(),e=D(),i=Rt(),o=be(),n=Ro(),s=vg(),r=Qo(),a=x(),h=bg(),l=Go(),c=yg(),d=wg(),u=It(),p=_g(),m=[],f=e(m.sort),g=e(m.push),v=a(function(){m.sort(void 0)}),b=a(function(){m.sort(null)}),y=l("sort"),w=!a(function(){if(u)return u<70;if(!(c&&c>3)){if(d)return!0;if(p)return p<603;var t,e,i,o,n="";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(o=0;o<47;o++)m.push({k:e+o,v:i})}for(m.sort(function(t,e){return e.v-t.v}),o=0;o<m.length;o++)e=m[o].k.charAt(0),n.charAt(n.length-1)!==e&&(n+=e);return"DGBEFHACIJK"!==n}});return t({target:"Array",proto:!0,forced:v||!b||!y||!w},{sort:function(t){void 0!==t&&i(t);var e=o(this);if(w)return void 0===t?f(e):f(e,t);var a,l,c=[],d=n(e);for(l=0;l<d;l++)l in e&&g(c,e[l]);for(h(c,function(t){return function(e,i){return void 0===i?-1:void 0===e?1:void 0!==t?+t(e,i)||0:r(e)>r(i)?1:-1}}(t)),a=n(c),l=0;l<a;)e[l]=c[l++];for(;l<d;)s(e,l++);return e}}),gg}function Cg(){return hg?ag:(hg=1,xg(),ag=_i()("Array","sort"))}function Sg(){if(cg)return lg;cg=1;var t=Et(),e=Cg(),i=Array.prototype;return lg=function(o){var n=o.sort;return o===i||t(i,o)&&n===i.sort?e:n},lg}function Dg(){return ug?dg:(ug=1,dg=Sg())}var kg=n(mg?pg:(mg=1,pg=Dg()));function Tg(t,e,i){if(i&&!vi(i))return Tg(t,e,[i]);if(e.hiddenDates=[],i&&1==vi(i)){var o;for(let o=0;o<i.length;o++)if(void 0===fg(i[o])){const n={};n.start=t(i[o].start).toDate().valueOf(),n.end=t(i[o].end).toDate().valueOf(),e.hiddenDates.push(n)}kg(o=e.hiddenDates).call(o,(t,e)=>t.start-e.start)}}function Og(t,e,i){if(i&&!vi(i))return Og(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){Tg(t,e,i);const o=t(e.range.start),n=t(e.range.end),s=(e.range.end-e.range.start)/e.domProps.centerContainer.width;for(let r=0;r<i.length;r++)if(void 0!==fg(i[r])){let a=t(i[r].start),h=t(i[r].end);if("Invalid Date"==a._d)throw new Error("Supplied start date is not valid: ".concat(i[r].start));if("Invalid Date"==h._d)throw new Error("Supplied end date is not valid: ".concat(i[r].end));if(h-a>=4*s){let t=0,s=n.clone();switch(fg(i[r])){case"daily":a.day()!=h.day()&&(t=1),a=a.dayOfYear(o.dayOfYear()).year(o.year()).subtract(7,"days"),h=h.dayOfYear(o.dayOfYear()).year(o.year()).subtract(7-t,"days"),s.add(1,"weeks");break;case"weekly":{const t=h.diff(a,"days"),e=a.day();a=a.date(o.date()).month(o.month()).year(o.year()),h=a.clone(),a=a.day(e).subtract(1,"weeks"),h=h.day(e).add(t,"days").subtract(1,"weeks"),s.add(1,"weeks");break}case"monthly":a.month()!=h.month()&&(t=1),a=a.month(o.month()).year(o.year()).subtract(1,"months"),h=h.month(o.month()).year(o.year()).subtract(1,"months").add(t,"months"),s.add(1,"months");break;case"yearly":a.year()!=h.year()&&(t=1),a=a.year(o.year()).subtract(1,"years"),h=h.year(o.year()).subtract(1,"years").add(t,"years"),s.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",fg(i[r]))}for(;a<s;)switch(e.hiddenDates.push({start:a.valueOf(),end:h.valueOf()}),fg(i[r])){case"daily":a=a.add(1,"days"),h=h.add(1,"days");break;case"weekly":a=a.add(1,"weeks"),h=h.add(1,"weeks");break;case"monthly":a=a.add(1,"months"),h=h.add(1,"months");break;case"yearly":a=a.add(1,"y"),h=h.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",fg(i[r]))}e.hiddenDates.push({start:a.valueOf(),end:h.valueOf()})}}Eg(e);const r=Bg(e.range.start,e.hiddenDates),a=Bg(e.range.end,e.hiddenDates);let h=e.range.start,l=e.range.end;1==r.hidden&&(h=1==e.range.startToFront?r.startDate-1:r.endDate+1),1==a.hidden&&(l=1==e.range.endToFront?a.startDate-1:a.endDate+1),1!=r.hidden&&1!=a.hidden||e.range._applyRange(h,l)}}function Eg(t){var e;const i=t.hiddenDates,o=[];for(var n=0;n<i.length;n++)for(let t=0;t<i.length;t++)n!=t&&1!=i[t].remove&&1!=i[n].remove&&(i[t].start>=i[n].start&&i[t].end<=i[n].end?i[t].remove=!0:i[t].start>=i[n].start&&i[t].start<=i[n].end?(i[n].end=i[t].end,i[t].remove=!0):i[t].end>=i[n].start&&i[t].end<=i[n].end&&(i[n].start=i[t].start,i[t].remove=!0));for(n=0;n<i.length;n++)!0!==i[n].remove&&o.push(i[n]);t.hiddenDates=o,kg(e=t.hiddenDates).call(e,(t,e)=>t.start-e.start)}function Ag(t,e,i){let o=!1;const n=e.current.valueOf();for(let t=0;t<e.hiddenDates.length;t++){const i=e.hiddenDates[t].start;var s=e.hiddenDates[t].end;if(n>=i&&n<s){o=!0;break}}if(1==o&&n<e._end.valueOf()&&n!=i){const o=t(i),n=t(s);o.year()!=n.year()?e.switchedYear=!0:o.month()!=n.month()?e.switchedMonth=!0:o.dayOfYear()!=n.dayOfYear()&&(e.switchedDay=!0),e.current=n}}function Ig(t,e,i){let o;if(0==t.body.hiddenDates.length)return o=t.range.conversion(i),(e.valueOf()-o.offset)*o.scale;{const n=Bg(e,t.body.hiddenDates);1==n.hidden&&(e=n.startDate);const s=Mg(t.body.hiddenDates,t.range.start,t.range.end);if(e<t.range.start){o=t.range.conversion(i,s);const n=Ng(t.body.hiddenDates,e,o.offset);return e=t.options.moment(e).toDate().valueOf(),e+=n,-(o.offset-e.valueOf())*o.scale}if(e>t.range.end){const n={start:t.range.start,end:e};return e=Fg(t.options.moment,t.body.hiddenDates,n,e),o=t.range.conversion(i,s),(e.valueOf()-o.offset)*o.scale}return e=Fg(t.options.moment,t.body.hiddenDates,t.range,e),o=t.range.conversion(i,s),(e.valueOf()-o.offset)*o.scale}}function Pg(t,e,i){if(0==t.body.hiddenDates.length){const o=t.range.conversion(i);return new Date(e/o.scale+o.offset)}{const o=Mg(t.body.hiddenDates,t.range.start,t.range.end),n=(t.range.end-t.range.start-o)*e/i,s=Lg(t.body.hiddenDates,t.range,n);return new Date(s+n+t.range.start)}}function Mg(t,e,i){let o=0;for(let n=0;n<t.length;n++){const s=t[n].start,r=t[n].end;s>=e&&r<i&&(o+=r-s)}return o}function Ng(t,e,i){let o=0;for(let n=0;n<t.length;n++){const s=t[n].start,r=t[n].end;s>=e&&r<=i&&(o+=r-s)}return o}function Fg(t,e,i,o){return o=t(o).toDate().valueOf(),o-=Rg(t,e,i,o)}function Rg(t,e,i,o){let n=0;o=t(o).toDate().valueOf();for(let t=0;t<e.length;t++){const s=e[t].start,r=e[t].end;s>=i.start&&r<i.end&&o>=r&&(n+=r-s)}return n}function Lg(t,e,i){let o=0,n=0,s=e.start;for(let r=0;r<t.length;r++){const a=t[r].start,h=t[r].end;if(a>=e.start&&h<e.end){if(n+=a-s,s=h,n>=i)break;o+=h-a}}return o}function jg(t,e,i,o){const n=Bg(e,t);return 1==n.hidden?i<0?1==o?n.startDate-(n.endDate-e)-1:n.startDate-1:1==o?n.endDate+(e-n.startDate)+1:n.endDate+1:e}function Bg(t,e){for(let n=0;n<e.length;n++){var i=e[n].start,o=e[n].end;if(t>=i&&t<o)return{hidden:!0,startDate:i,endDate:o}}return{hidden:!1,startDate:i,endDate:o}}var zg=Object.freeze({__proto__:null,convertHiddenOptions:Tg,correctTimeForHidden:Fg,getAccumulatedHiddenDuration:Lg,getHiddenDurationBefore:Rg,getHiddenDurationBeforeStart:Ng,getHiddenDurationBetween:Mg,getIsHidden:Bg,printDates:function(t){for(let e=0;e<t.length;e++)console.log(e,new Date(t[e].start),new Date(t[e].end),t[e].start,t[e].end,t[e].remove)},removeDuplicates:Eg,snapAwayFromHidden:jg,stepOverHiddenDates:Ag,toScreen:Ig,toTime:Pg,updateHiddenDates:Og});class Hg extends Lf{constructor(t,e){var i,o,n,s,r,a,h;super();const l=qo().hours(0).minutes(0).seconds(0).milliseconds(0),c=l.clone().add(-3,"days").valueOf(),d=l.clone().add(3,"days").valueOf();this.millisecondsPerPixelCache=void 0,void 0===e?(this.start=c,this.end=d):(this.start=e.start||c,this.end=e.end||d),this.rolling=!1,this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:qo,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},this.options=km.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",Pi(i=this._onDragStart).call(i,this)),this.body.emitter.on("panmove",Pi(o=this._onDrag).call(o,this)),this.body.emitter.on("panend",Pi(n=this._onDragEnd).call(n,this)),this.body.emitter.on("mousewheel",Pi(s=this._onMouseWheel).call(s,this)),this.body.emitter.on("touch",Pi(r=this._onTouch).call(r,this)),this.body.emitter.on("pinch",Pi(a=this._onPinch).call(a,this)),this.body.dom.rollingModeBtn.addEventListener("click",Pi(h=this.startRolling).call(h,this)),this.setOptions(e)}setOptions(t){if(t){const e=["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","zoomFriction","rtl","showCurrentTime","rollingMode","horizontalScroll"];km.selectiveExtend(e,this.options,t),t.rollingMode&&t.rollingMode.follow&&this.startRolling(),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}}startRolling(){const t=this;!function e(){t.stopRolling(),t.rolling=!0;let i=t.end-t.start;const o=km.convert(new Date,"Date").valueOf(),n=t.options.rollingMode&&t.options.rollingMode.offset||.5,s=o-i*n,r=o+i*(1-n);t.setRange(s,r,{animation:!1}),i=1/t.conversion(t.body.domProps.center.width).scale/10,i<30&&(i=30),i>1e3&&(i=1e3),t.body.dom.rollingModeBtn.style.visibility="hidden",t.currentTimeTimer=Zi(e,i)}()}stopRolling(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}setRange(t,e,i,o,n){i||(i={}),!0!==i.byUser&&(i.byUser=!1);const s=this,r=null!=t?km.convert(t,"Date").valueOf():null,a=null!=e?km.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){const t=this.start,e=this.end,c="object"==typeof i.animation&&"duration"in i.animation?i.animation.duration:500,d="object"==typeof i.animation&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",u=km.easingFunctions[d];var h;if(!u)throw new Error(Zm(h="Unknown easing function ".concat(uf(d),". Choose from: ")).call(h,$c(km.easingFunctions).join(", ")));const p=Ef();let m=!1;const f=()=>{if(!s.props.touch.dragging){const h=Ef()-p,d=u(h/c),g=h>c,v=g||null===r?r:t+(r-t)*d,b=g||null===a?a:e+(a-e)*d;l=s._applyRange(v,b),Og(s.options.moment,s.body,s.options.hiddenDates),m=m||l;const y={start:new Date(s.start),end:new Date(s.end),byUser:i.byUser,event:i.event};if(n&&n(d,l,g),l&&s.body.emitter.emit("rangechange",y),g){if(m&&(s.body.emitter.emit("rangechanged",y),o))return o()}else s.animationTimer=Zi(f,20)}};return f()}var l=this._applyRange(r,a);if(Og(this.options.moment,this.body,this.options.hiddenDates),l){const t={start:new Date(this.start),end:new Date(this.end),byUser:i.byUser,event:i.event};if(this.body.emitter.emit("rangechange",t),clearTimeout(s.timeoutID),s.timeoutID=Zi(()=>{s.body.emitter.emit("rangechanged",t)},200),o)return o()}}getMillisecondsPerPixel(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}_cancelAnimation(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)}_applyRange(t,e){let i=null!=t?km.convert(t,"Date").valueOf():this.start,o=null!=e?km.convert(e,"Date").valueOf():this.end;const n=null!=this.options.max?km.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?km.convert(this.options.min,"Date").valueOf():null;let r;if(isNaN(i)||null===i)throw new Error('Invalid start "'.concat(t,'"'));if(isNaN(o)||null===o)throw new Error('Invalid end "'.concat(e,'"'));if(o<i&&(o=i),null!==s&&i<s&&(r=s-i,i+=r,o+=r,null!=n&&o>n&&(o=n)),null!==n&&o>n&&(r=o-n,i-=r,o-=r,null!=s&&i<s&&(i=s)),null!==this.options.zoomMin){let t=Rf(this.options.zoomMin);if(t<0&&(t=0),o-i<t){const e=.5;this.end-this.start===t&&i>=this.start-e&&o<=this.end?(i=this.start,o=this.end):(r=t-(o-i),i-=r/2,o+=r/2)}}if(null!==this.options.zoomMax){let t=Rf(this.options.zoomMax);t<0&&(t=0),o-i>t&&(this.end-this.start===t&&i<this.start&&o>this.end?(i=this.start,o=this.end):(r=o-i-t,i+=r/2,o-=r/2))}const a=this.start!=i||this.end!=o;return i>=this.start&&i<=this.end||o>=this.start&&o<=this.end||this.start>=i&&this.start<=o||this.end>=i&&this.end<=o||this.body.emitter.emit("checkRangedItems"),this.start=i,this.end=o,a}getRange(){return{start:this.start,end:this.end}}conversion(t,e){return Hg.conversion(this.start,this.end,t,e)}static conversion(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}}_onDragStart(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"))}_onDrag(t){if(!t)return;if(!this.props.touch.dragging)return;if(!this.options.moveable)return;if(!this.props.touch.allowDragging)return;const e=this.options.direction;Gg(e);let i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;let o=this.props.touch.end-this.props.touch.start;o-=Mg(this.body.hiddenDates,this.start,this.end);const n="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;let s;s=this.options.rtl?i/n*o:-i/n*o;const r=this.props.touch.start+s,a=this.props.touch.end+s,h=jg(this.body.hiddenDates,r,this.previousDelta-i,!0),l=jg(this.body.hiddenDates,a,this.previousDelta-i,!0);if(h!=r||l!=a)return this.deltaDifference+=i,this.props.touch.start=h,this.props.touch.end=l,void this._onDrag(t);this.previousDelta=i,this._applyRange(r,a);const c=new Date(this.start),d=new Date(this.end);this.body.emitter.emit("rangechange",{start:c,end:d,byUser:!0,event:t}),this.body.emitter.emit("panmove")}_onDragEnd(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}))}_onMouseWheel(t){let 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){const i=this.options.zoomFriction||5;let o,n;if(o=e<0?1-e/i:1/(1+e/i),this.rolling){const t=this.options.rollingMode&&this.options.rollingMode.offset||.5;n=this.start+(this.end-this.start)*t}else{const e=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);n=this._pointerToDate(e)}this.zoom(o,n,e,t),t.preventDefault()}}_onTouch(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,km.preventDefault(t)}_onPinch(t){if(!this.options.zoomable||!this.options.moveable)return;km.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();const e=1/(t.scale+this.scaleOffset),i=this.props.touch.centerDate,o=Mg(this.body.hiddenDates,this.start,this.end),n=Rg(this.options.moment,this.body.hiddenDates,this,i),s=o-n;let r=i-n+(this.props.touch.start-(i-n))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;const h=jg(this.body.hiddenDates,r,1-e,!0),l=jg(this.body.hiddenDates,a,e-1,!0);h==r&&l==a||(this.props.touch.start=h,this.props.touch.end=l,this.scaleOffset=1-t.scale,r=h,a=l);const c={animation:!1,byUser:!0,event:t};this.setRange(r,a,c),this.startToFront=!1,this.endToFront=!0}_isInsideRange(t){const e=t.center?t.center.x:t.clientX,i=this.body.dom.centerContainer.getBoundingClientRect(),o=this.options.rtl?e-i.left:i.right-e,n=this.body.util.toTime(o);return n>=this.start&&n<=this.end}_pointerToDate(t){let e;const i=this.options.direction;if(Gg(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();{const i=this.body.domProps.center.height;return e=this.conversion(i),t.y/e.scale+e.offset}}getPointer(t,e){const 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}}zoom(t,e,i,o){null==e&&(e=(this.start+this.end)/2);const n=Mg(this.body.hiddenDates,this.start,this.end),s=Rg(this.options.moment,this.body.hiddenDates,this,e),r=n-s;let a=e-s+(this.start-(e-s))*t,h=e+r+(this.end-(e+r))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);const l=jg(this.body.hiddenDates,a,i,!0),c=jg(this.body.hiddenDates,h,-i,!0);l==a&&c==h||(a=l,h=c);const d={animation:!1,byUser:!0,event:o};this.setRange(a,h,d),this.startToFront=!1,this.endToFront=!0}move(t){const e=this.end-this.start,i=this.start+e*t,o=this.end+e*t;this.start=i,this.end=o}moveTo(t){const e=(this.start+this.end)/2-t,i=this.start-e,o=this.end-e;this.setRange(i,o,{animation:!1,byUser:!0,event:null})}destroy(){this.stopRolling()}}function Gg(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'.concat(t,'". Choose "horizontal" or "vertical".'))}var Wg,Yg,Vg,Ug,Xg,qg,Kg,$g,Zg,Jg={};function Qg(){return Vg?Yg:(Vg=1,function(){if(Wg)return Jg;Wg=1;var t=Je(),e=T(),i=xn().indexOf,o=Go(),n=e([].indexOf),s=!!n&&1/n([1],1,-0)<0;t({target:"Array",proto:!0,forced:s||!o("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return s?n(this,t,e)||0:i(this,t,e)}})}(),Yg=_i()("Array","indexOf"))}function tv(){if(Xg)return Ug;Xg=1;var t=Et(),e=Qg(),i=Array.prototype;return Ug=function(o){var n=o.indexOf;return o===i||t(i,o)&&n===i.indexOf?e:n},Ug}function ev(){return Kg?qg:(Kg=1,qg=tv())}var iv,ov,nv,sv,rv,av,hv,lv,cv,dv,uv,pv=n(Zg?$g:(Zg=1,$g=ev())),mv={};function fv(){if(ov)return iv;ov=1;var t=N(),e=Qe(),i=TypeError,o=Object.getOwnPropertyDescriptor,n=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();return iv=n?function(t,n){if(e(t)&&!o(t,"length").writable)throw new i("Cannot set read only .length");return t.length=n}:function(t,e){return t.length=e}}function gv(){return rv?sv:(rv=1,function(){if(nv)return mv;nv=1;var t=Je(),e=be(),i=_n(),o=No(),n=Ro(),s=fv(),r=ua(),a=zo(),h=Tr(),l=vg(),c=Js()("splice"),d=Math.max,u=Math.min;t({target:"Array",proto:!0,forced:!c},{splice:function(t,c){var p,m,f,g,v,b,y=e(this),w=n(y),_=i(t,w),x=arguments.length;for(0===x?p=m=0:1===x?(p=0,m=w-_):(p=x-2,m=u(d(o(c),0),w-_)),r(w+p-m),f=a(y,m),g=0;g<m;g++)(v=_+g)in y&&h(f,g,y[v]);if(f.length=m,p<m){for(g=_;g<w-m;g++)b=g+p,(v=g+m)in y?y[b]=y[v]:l(y,b);for(g=w;g>w-m+p;g--)l(y,g-1)}else if(p>m)for(g=w-m;g>_;g--)b=g+p-1,(v=g+m-1)in y?y[b]=y[v]:l(y,b);for(g=0;g<p;g++)y[g+_]=arguments[g+2];return s(y,w-m+p),f}})}(),sv=_i()("Array","splice"))}function vv(){if(hv)return av;hv=1;var t=Et(),e=gv(),i=Array.prototype;return av=function(o){var n=o.splice;return o===i||t(i,o)&&n===i.splice?e:n},av}function bv(){return cv?lv:(cv=1,lv=vv())}var yv,wv,_v,xv,Cv,Sv,Dv,kv,Tv,Ov=n(uv?dv:(uv=1,dv=bv())),Ev={};function Av(){return _v?wv:(_v=1,function(){if(yv)return Ev;yv=1;var t=Je(),e=Ho().some;t({target:"Array",proto:!0,forced:!Go()("some")},{some:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),wv=_i()("Array","some"))}function Iv(){if(Cv)return xv;Cv=1;var t=Et(),e=Av(),i=Array.prototype;return xv=function(o){var n=o.some;return o===i||t(i,o)&&n===i.some?e:n},xv}function Pv(){return Dv?Sv:(Dv=1,Sv=Iv())}var Mv,Nv,Fv,Rv,Lv=n(Tv?kv:(Tv=1,kv=Pv()));function jv(){return Nv?Mv:(Nv=1,Vi(),Mv=Tt().setInterval)}var Bv=n(Rv?Fv:(Rv=1,Fv=jv())),zv=null;let Hv;if("undefined"!=typeof window){Hv=function t(e,i){var o=i||{preventDefault:!1};if(e.Manager){var n=e,s=function(e,i){var s=Object.create(o);return i&&n.assign(s,i),t(new n(e,s),s)};return n.assign(s,n),s.Manager=function(e,i){var s=Object.create(o);return i&&n.assign(s,i),t(new n.Manager(e,s),s)},s}var r=Object.create(e),a=e.element;function h(t){return t.match(/[^ ]+/g)}function l(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=zv;for(var o=zv.isConnected?zv:t.target;o&&!e;){var n=o.hammer;if(n)for(var s,r=0;r<n.length;r++)if(s=n[r]._handlers[t.type])for(var a=0;a<s.length&&!e;a++)s[a](t);o=o.parentNode}}return a.hammer||(a.hammer=[]),a.hammer.push(r),e.on("hammer.input",function(t){!0!==o.preventDefault&&o.preventDefault!==t.pointerType||t.preventDefault(),t.isFirst&&(zv=t.target)}),r._handlers={},r.on=function(t,i){return h(t).forEach(function(t){var o=r._handlers[t];o||(r._handlers[t]=o=[],e.on(t,l)),o.push(i)}),r},r.off=function(t,i){return h(t).forEach(function(t){var o=r._handlers[t];o&&((o=i?o.filter(function(t){return t!==i}):[]).length>0?r._handlers[t]=o:(e.off(t,l),delete r._handlers[t]))}),r},r.emit=function(t,i){zv=i.target,e.emit(t,i)},r.destroy=function(){var t=e.element.hammer,i=t.indexOf(r);-1!==i&&t.splice(i,1),t.length||delete e.element.hammer,r._handlers={},e.destroy()},r}(window.Hammer||Bu,{preventDefault:"mouse"})}else Hv=function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:e=>({set:t})}}()};var Gv=Hv;function Wv(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}var Yv,Vv,Uv,Xv,qv,Kv,$v,Zv,Jv,Qv={};function tb(){if(Vv)return Yv;Vv=1;var t=_(),e=x(),i=D(),o=Qo(),n=Pf().trim,s=If(),r=t.parseInt,a=t.Symbol,h=a&&a.iterator,l=/^[+-]?0x/i,c=i(l.exec),d=8!==r(s+"08")||22!==r(s+"0x16")||h&&!e(function(){r(Object(h))});return Yv=d?function(t,e){var i=n(o(t));return r(i,e>>>0||(c(l,i)?16:10))}:r,Yv}function eb(){return qv?Xv:(qv=1,function(){if(Uv)return Qv;Uv=1;var t=Je(),e=tb();t({global:!0,forced:parseInt!==e},{parseInt:e})}(),Xv=Tt().parseInt)}function ib(){return $v?Kv:($v=1,Kv=eb())}var ob=n(Jv?Zv:(Jv=1,Zv=ib()));class nb{constructor(t,e,i,o,n){this.moment=n&&n.moment||qo,this.options=n||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale="day",this.step=1,this.setRange(t,e,i),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,vi(o)?this.hiddenDates=o:this.hiddenDates=null!=o?[o]:[],this.format=nb.FORMAT}setMoment(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())}setFormat(t){const e=km.deepExtend({},nb.FORMAT);this.format=km.deepExtend(e,t)}setRange(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()):Ef(),this._end=null!=e?this.moment(e.valueOf()):Ef(),this.autoScale&&this.setMinimumStep(i)}start(){this.current=this._start.clone(),this.roundToMinor()}roundToMinor(){switch("week"==this.scale&&this.current.weekday(0),this.scale){case"year":this.current=this.current.year(this.step*Math.floor(this.current.year()/this.step)).month(0);case"month":this.current=this.current.date(1);case"week":case"day":case"weekday":this.current=this.current.hours(0);case"hour":this.current=this.current.minutes(0);case"minute":this.current=this.current.seconds(0);case"second":this.current=this.current.milliseconds(0)}if(1!=this.step){let t=this.current.clone();switch(this.scale){case"millisecond":this.current=this.current.subtract(this.current.milliseconds()%this.step,"milliseconds");break;case"second":this.current=this.current.subtract(this.current.seconds()%this.step,"seconds");break;case"minute":this.current=this.current.subtract(this.current.minutes()%this.step,"minutes");break;case"hour":this.current=this.current.subtract(this.current.hours()%this.step,"hours");break;case"weekday":case"day":this.current=this.current.subtract((this.current.date()-1)%this.step,"day");break;case"week":this.current=this.current.subtract(this.current.week()%this.step,"week");break;case"month":this.current=this.current.subtract(this.current.month()%this.step,"month");break;case"year":this.current=this.current.subtract(this.current.year()%this.step,"year")}t.isSame(this.current)||(this.current=this.moment(jg(this.hiddenDates,this.current.valueOf(),-1,!0)))}}hasNext(){return this.current.valueOf()<=this._end.valueOf()}next(){const t=this.current.valueOf();switch(this.scale){case"millisecond":this.current=this.current.add(this.step,"millisecond");break;case"second":this.current=this.current.add(this.step,"second");break;case"minute":this.current=this.current.add(this.step,"minute");break;case"hour":this.current=this.current.add(this.step,"hour"),this.current.month()<6?this.current=this.current.subtract(this.current.hours()%this.step,"hour"):this.current.hours()%this.step!==0&&(this.current=this.current.add(this.step-this.current.hours()%this.step,"hour"));break;case"weekday":case"day":this.current=this.current.add(this.step,"day");break;case"week":if(0!==this.current.weekday())this.current=this.current.weekday(0).add(this.step,"week");else if(!1===this.options.showMajorLabels)this.current=this.current.add(this.step,"week");else{const t=this.current.clone();t.add(1,"week"),t.isSame(this.current,"month")?this.current=this.current.add(this.step,"week"):this.current=this.current.add(this.step,"week").date(1)}break;case"month":this.current=this.current.add(this.step,"month");break;case"year":this.current=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=this.current.milliseconds(0));break;case"second":this.current.seconds()>0&&this.current.seconds()<this.step&&(this.current=this.current.seconds(0));break;case"minute":this.current.minutes()>0&&this.current.minutes()<this.step&&(this.current=this.current.minutes(0));break;case"hour":this.current.hours()>0&&this.current.hours()<this.step&&(this.current=this.current.hours(0));break;case"weekday":case"day":this.current.date()<this.step+1&&(this.current=this.current.date(1));break;case"week":this.current.week()<this.step&&(this.current=this.current.week(1));break;case"month":this.current.month()<this.step&&(this.current=this.current.month(0))}this.current.valueOf()==t&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,Ag(this.moment,this,t)}getCurrent(){return this.current.clone()}setScale(t){t&&"string"==typeof t.scale&&(this.scale=t.scale,this.step=t.step>0?t.step:1,this.autoScale=!1)}setAutoScale(t){this.autoScale=t}setMinimumStep(t){if(null==t)return;const e=31104e6,i=2592e6,o=864e5,n=36e5,s=6e4,r=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),o>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),n>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),s>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),r>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)}static snap(t,e,i){let o=qo(t);if("year"==e){const t=o.year()+Math.round(o.month()/12);o=o.year(Math.round(t/i)*i).month(0).date(0).hours(0).minutes(0).seconds(0).milliseconds(0)}else if("month"==e)o=o.date()>15?o.date(1).add(1,"month"):o.date(1),o=o.hours(0).minutes(0).seconds(0).milliseconds(0);else if("week"==e)o=o.weekday()>2?o.weekday(0).add(1,"week"):o.weekday(0),o=o.hours(0).minutes(0).seconds(0).milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o=o.hours(24*Math.round(o.hours()/24));break;default:o=o.hours(12*Math.round(o.hours()/12))}o=o.minutes(0).seconds(0).milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o=o.hours(12*Math.round(o.hours()/12));break;default:o=o.hours(6*Math.round(o.hours()/6))}o=o.minutes(0).seconds(0).milliseconds(0)}else if("hour"==e){if(4===i)o=o.minutes(60*Math.round(o.minutes()/60));else o=o.minutes(30*Math.round(o.minutes()/30));o=o.seconds(0).milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o=o.minutes(5*Math.round(o.minutes()/5)).seconds(0);break;case 5:o=o.seconds(60*Math.round(o.seconds()/60));break;default:o=o.seconds(30*Math.round(o.seconds()/30))}o=o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o=o.seconds(5*Math.round(o.seconds()/5)).milliseconds(0);break;case 5:o=o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o=o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){const t=i>5?i/2:1;o=o.milliseconds(Math.round(o.milliseconds()/t)*t)}return o}isMajor(){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}const t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return this.options.showWeekScale?1==t.isoWeekday():1==t.date();case"week":return 1==t.date();case"month":return 0==t.month();default:return!1}}getLabelMinor(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);const e=this.format.minorLabels[this.scale];return"week"===this.scale&&1===t.date()&&0!==t.weekday()?"":e&&e.length>0?this.moment(t).format(e):""}getLabelMajor(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);const e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""}getClassName(){var t;const e=this.moment,i=this.moment(this.current),o=i.locale?i.locale("en"):i.lang("en"),n=this.step,s=[];function r(t){return t/n%2==0?" vis-even":" vis-odd"}function a(t){return t.isSame(Ef(),"day")?" vis-today":t.isSame(e().add(1,"day"),"day")?" vis-tomorrow":t.isSame(e().add(-1,"day"),"day")?" vis-yesterday":""}function h(t){return t.isSame(Ef(),"week")?" vis-current-week":""}function l(t){return t.isSame(Ef(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":s.push(a(o)),s.push(r(o.milliseconds()));break;case"second":s.push(a(o)),s.push(r(o.seconds()));break;case"minute":s.push(a(o)),s.push(r(o.minutes()));break;case"hour":s.push(Zm(t="vis-h".concat(o.hours())).call(t,4==this.step?"-h"+(o.hours()+4):"")),s.push(a(o)),s.push(r(o.hours()));break;case"weekday":s.push("vis-".concat(o.format("dddd").toLowerCase())),s.push(a(o)),s.push(h(o)),s.push(r(o.date()));break;case"day":s.push("vis-day".concat(o.date())),s.push("vis-".concat(o.format("MMMM").toLowerCase())),s.push(a(o)),s.push(l(o)),s.push(this.step<=2?a(o):""),s.push(this.step<=2?"vis-".concat(o.format("dddd").toLowerCase()):""),s.push(r(o.date()-1));break;case"week":s.push("vis-week".concat(o.format("w"))),s.push(h(o)),s.push(r(o.week()));break;case"month":s.push("vis-".concat(o.format("MMMM").toLowerCase())),s.push(l(o)),s.push(r(o.month()));break;case"year":s.push("vis-year".concat(o.year())),s.push(function(t){return t.isSame(Ef(),"year")?" vis-current-year":""}(o)),s.push(r(o.year()))}return hr(s).call(s,String).join(" ")}}nb.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:""}};class sb extends Lf{constructor(t,e){super(),this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:km.extend({},nb.FORMAT),moment:qo,timeAxis:null},this.options=km.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}setOptions(t){t&&(km.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),km.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"==typeof t.orientation&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof qo.locale?qo.locale(t.locale):qo.lang(t.locale)))}_create(){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"}destroy(){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}redraw(){const t=this.props,e=this.dom.foreground,i=this.dom.background,o="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,n=e.parentNode!==o;this._calculateCharSize();const s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?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;const a=e.nextSibling,h=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?o.insertBefore(e,a):o.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||n}_repaintLabels(){const t=this.options.orientation.axis,e=km.convert(this.body.range.start,"Number"),i=km.convert(this.body.range.end,"Number"),o=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf();let n=o-Rg(this.options.moment,this.body.hiddenDates,this.body.range,o);n-=this.body.util.toTime(0).valueOf();const s=new nb(new Date(e),new Date(i),n,this.body.hiddenDates,this.options);s.setMoment(this.options.moment),this.options.format&&s.setFormat(this.options.format),this.options.timeAxis&&s.setScale(this.options.timeAxis),this.step=s;const r=this.dom;let a,h,l,c,d,u;r.redundant.lines=r.lines,r.redundant.majorTexts=r.majorTexts,r.redundant.minorTexts=r.minorTexts,r.lines=[],r.majorTexts=[],r.minorTexts=[];let p,m,f,g=0,v=0;const b=1e3;let y;for(s.start(),h=s.getCurrent(),c=this.body.util.toScreen(h);s.hasNext()&&v<b;){if(v++,d=s.isMajor(),y=s.getClassName(),a=h,l=c,s.next(),h=s.getCurrent(),c=this.body.util.toScreen(h),p=g,g=c-l,"week"===s.scale)u=!0;else u=g>=.4*p;if(this.options.showMinorLabels&&u){var w=this._repaintMinorText(l,s.getLabelMinor(a),t,y);w.style.width="".concat(g,"px")}d&&this.options.showMajorLabels?(l>0&&(null==f&&(f=l),w=this._repaintMajorText(l,s.getLabelMajor(a),t,y)),m=this._repaintMajorLine(l,g,t,y)):u?m=this._repaintMinorLine(l,g,t,y):m&&(m.style.width="".concat(ob(m.style.width)+g,"px"))}if(v!==b||rb||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(b," lines.")),rb=!0),this.options.showMajorLabels){const e=this.body.util.toTime(0),i=s.getLabelMajor(e),o=i.length*(this.props.majorCharWidth||10)+10;(null==f||o<f)&&this._repaintMajorText(0,i,t,y)}Xo(km).call(km,this.dom.redundant,t=>{for(;t.length;){const e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})}_repaintMinorText(t,e,i,o){let n=this.dom.redundant.minorTexts.shift();if(!n){const t=document.createTextNode("");n=document.createElement("div"),n.appendChild(t),this.dom.foreground.appendChild(n)}this.dom.minorTexts.push(n),n.innerHTML=km.xss(e);let s="top"==i?this.props.majorLabelHeight:0;return this._setXY(n,t,s),n.className="vis-text vis-minor ".concat(o),n}_repaintMajorText(t,e,i,o){let n=this.dom.redundant.majorTexts.shift();if(!n){const t=document.createElement("div");n=document.createElement("div"),n.appendChild(t),this.dom.foreground.appendChild(n)}n.childNodes[0].innerHTML=km.xss(e),n.className="vis-text vis-major ".concat(o);let s="top"==i?0:this.props.minorLabelHeight;return this._setXY(n,t,s),this.dom.majorTexts.push(n),n}_setXY(t,e,i){var o;const n=this.options.rtl?-1*e:e;t.style.transform=Zm(o="translate(".concat(n,"px, ")).call(o,i,"px)")}_repaintMinorLine(t,e,i,o){var n;let s=this.dom.redundant.lines.shift();s||(s=document.createElement("div"),this.dom.background.appendChild(s)),this.dom.lines.push(s);const r=this.props;s.style.width="".concat(e,"px"),s.style.height="".concat(r.minorLineHeight,"px");let a="top"==i?r.majorLabelHeight:this.body.domProps.top.height,h=t-r.minorLineWidth/2;return this._setXY(s,h,a),s.className=Zm(n="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-minor ")).call(n,o),s}_repaintMajorLine(t,e,i,o){var n;let s=this.dom.redundant.lines.shift();s||(s=document.createElement("div"),this.dom.background.appendChild(s)),this.dom.lines.push(s);const r=this.props;s.style.width="".concat(e,"px"),s.style.height="".concat(r.majorLineHeight,"px");let a="top"==i?0:this.body.domProps.top.height,h=t-r.majorLineWidth/2;return this._setXY(s,h,a),s.className=Zm(n="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-major ")).call(n,o),s}_calculateCharSize(){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}}var rb=!1;function ab(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=Gv(this.dom.overlay),this.hammer.on("tap",Pi(e=this._onTapOverlay).call(e,this));var o=this,n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Xo(n).call(n,function(t){o.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)||o.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=function(){var t,e=window,i={},o={keydown:{},keyup:{}},n={};for(t=97;t<=122;t++)n[String.fromCharCode(t)]={code:t-97+65,shift:!1};for(t=65;t<=90;t++)n[String.fromCharCode(t)]={code:t,shift:!0};for(t=0;t<=9;t++)n[""+t]={code:48+t,shift:!1};for(t=1;t<=12;t++)n["F"+t]={code:111+t,shift:!1};for(t=0;t<=9;t++)n["num"+t]={code:96+t,shift:!1};n["num*"]={code:106,shift:!1},n["num+"]={code:107,shift:!1},n["num-"]={code:109,shift:!1},n["num/"]={code:111,shift:!1},n["num."]={code:110,shift:!1},n.left={code:37,shift:!1},n.up={code:38,shift:!1},n.right={code:39,shift:!1},n.down={code:40,shift:!1},n.space={code:32,shift:!1},n.enter={code:13,shift:!1},n.shift={code:16,shift:void 0},n.esc={code:27,shift:!1},n.backspace={code:8,shift:!1},n.tab={code:9,shift:!1},n.ctrl={code:17,shift:!1},n.alt={code:18,shift:!1},n.delete={code:46,shift:!1},n.pageup={code:33,shift:!1},n.pagedown={code:34,shift:!1},n["="]={code:187,shift:!1},n["-"]={code:189,shift:!1},n["]"]={code:221,shift:!1},n["["]={code:219,shift:!1};var s=function(t){a(t,"keydown")},r=function(t){a(t,"keyup")},a=function(t,e){if(void 0!==o[e][t.keyCode])for(var i=o[e][t.keyCode],n=0;n<i.length;n++)(void 0===i[n].shift||1==i[n].shift&&1==t.shiftKey||0==i[n].shift&&0==t.shiftKey)&&i[n].fn(t)};return i.bind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===n[t])throw new Error("unsupported key: "+t);void 0===o[i][n[t].code]&&(o[i][n[t].code]=[]),o[i][n[t].code].push({fn:e,shift:n[t].shift})},i.bindAll=function(t,e){for(var o in void 0===e&&(e="keydown"),n)n.hasOwnProperty(o)&&i.bind(o,t,e)},i.getKey=function(t){for(var e in n)if(n.hasOwnProperty(e)){if(1==t.shiftKey&&1==n[e].shift&&t.keyCode==n[e].code)return e;if(0==t.shiftKey&&0==n[e].shift&&t.keyCode==n[e].code)return e;if(t.keyCode==n[e].code&&"shift"==e)return e}return"unknown key, currently not supported"},i.unbind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===n[t])throw new Error("unsupported key: "+t);if(void 0!==e){var s=[],r=o[i][n[t].code];if(void 0!==r)for(var a=0;a<r.length;a++)r[a].fn==e&&r[a].shift==n[t].shift||s.push(o[i][n[t].code][a]);o[i][n[t].code]=s}else o[i][n[t].code]=[]},i.reset=function(){o={keydown:{},keyup:{}}},i.destroy=function(){o={keydown:{},keyup:{}},e.removeEventListener("keydown",s,!0),e.removeEventListener("keyup",r,!0)},e.addEventListener("keydown",s,!0),e.addEventListener("keyup",r,!0),i}(),this.escListener=Pi(i=this.deactivate).call(i,this)}id(ab.prototype),ab.current=null,ab.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},ab.prototype.activate=function(){var t;ab.current&&ab.current.deactivate(),ab.current=this,this.active=!0,this.dom.overlay.style.display="none",km.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),Pi(t=this.keycharm).call(t,"esc",this.escListener)},ab.prototype.deactivate=function(){ab.current===this&&(ab.current=null),this.active=!1,this.dom.overlay.style.display="",km.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},ab.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()};const hb={current:"current",time:"time",deleteSelected:"Delete selected"},lb={current:"attuale",time:"tempo",deleteSelected:"Cancella la selezione"},cb={current:"huidige",time:"tijd",deleteSelected:"Selectie verwijderen"},db={current:"Aktuelle",time:"Zeit",deleteSelected:"Lösche Auswahl"},ub={current:"actuel",time:"heure",deleteSelected:"Effacer la selection"},pb={current:"corriente",time:"hora",deleteSelected:"Eliminar selección"},mb={current:"поточний",time:"час",deleteSelected:"Видалити обране"},fb={current:"текущее",time:"время",deleteSelected:"Удалить выбранное"},gb={current:"aktualny",time:"czas",deleteSelected:"Usuń wybrane"},vb={current:"atual",time:"data",deleteSelected:"Apagar selecionado"},bb={current:"現在",time:"時刻",deleteSelected:"選択されたものを削除"},yb={current:"nuvarande",time:"tid",deleteSelected:"Radera valda"},wb={current:"nåværende",time:"tid",deleteSelected:"Slett valgte"},_b={current:"einamas",time:"laikas",deleteSelected:"Pašalinti pasirinktą"},xb={en:hb,en_EN:hb,en_US:hb,it:lb,it_IT:lb,it_CH:lb,nl:cb,nl_NL:cb,nl_BE:cb,de:db,de_DE:db,fr:ub,fr_FR:ub,fr_CA:ub,fr_BE:ub,es:pb,es_ES:pb,uk:mb,uk_UA:mb,ru:fb,ru_RU:fb,pl:gb,pl_PL:gb,pt:vb,pt_BR:vb,pt_PT:vb,ja:bb,ja_JP:bb,lt:_b,lt_LT:_b,sv:yb,sv_SE:yb,nb:wb,nn:wb,nb_NO:wb,nn_NO:wb};class Cb extends Lf{constructor(t,e){var i;super(),this.body=t,this.defaultOptions={moment:qo,locales:xb,locale:"en",id:void 0,title:void 0},this.options=km.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=km.extend({},xb,this.options.locales);const o=this.defaultOptions.locales[this.defaultOptions.locale];Xo(i=$c(this.options.locales)).call(i,t=>{this.options.locales[t]=km.extend({},o,this.options.locales[t])}),e&&null!=e.time?this.customTime=e.time:this.customTime=new Date,this.eventParams={},this._create()}setOptions(t){t&&km.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,t)}_create(){var t,e,i;const o=document.createElement("div");o["custom-time"]=this,o.className="vis-custom-time ".concat(this.options.id||""),o.style.position="absolute",o.style.top="0px",o.style.height="100%",this.bar=o;const n=document.createElement("div");function s(t){this.body.range._onMouseWheel(t)}n.style.position="relative",n.style.top="0px",this.options.rtl?n.style.right="-10px":n.style.left="-10px",n.style.height="100%",n.style.width="20px",n.addEventListener?(n.addEventListener("mousewheel",Pi(s).call(s,this),!1),n.addEventListener("DOMMouseScroll",Pi(s).call(s,this),!1)):n.attachEvent("onmousewheel",Pi(s).call(s,this)),o.appendChild(n),this.hammer=new Gv(n),this.hammer.on("panstart",Pi(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",Pi(e=this._onDrag).call(e,this)),this.hammer.on("panend",Pi(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:Gv.DIRECTION_ALL}),this.hammer.get("press").set({time:1e4})}destroy(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}redraw(){const t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));const e=this.body.util.toScreen(this.customTime);let 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);let o=this.options.title;var n;void 0===o?(o=Zm(n="".concat(i.time,": ")).call(n,this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss")),o=o.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}hide(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}setCustomTime(t){this.customTime=km.convert(t,"Date"),this.redraw()}getCustomTime(){return new Date(this.customTime.valueOf())}setCustomMarker(t,e){var i;(this.marker&&this.bar.removeChild(this.marker),this.marker=document.createElement("div"),this.marker.className="vis-custom-time-marker",this.marker.innerHTML=km.xss(t),this.marker.style.position="absolute",e)&&(this.marker.setAttribute("contenteditable","true"),this.marker.addEventListener("pointerdown",()=>{this.marker.focus()}),this.marker.addEventListener("input",Pi(i=this._onMarkerChange).call(i,this)),this.marker.title=t,this.marker.addEventListener("blur",t=>{this.title!=t.target.innerHTML&&(this._onMarkerChanged(t),this.title=t.target.innerHTML)}));this.bar.appendChild(this.marker)}setCustomTitle(t){this.options.title=t}_onDragStart(t){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,t.stopPropagation()}_onDrag(t){if(!this.eventParams.dragging)return;let e=this.options.rtl?-1*t.deltaX:t.deltaX;const i=this.body.util.toScreen(this.eventParams.customTime)+e,o=this.body.util.toTime(i),n=this.body.util.getScale(),s=this.body.util.getStep(),r=this.options.snap,a=r?r(o,n,s):o;this.setCustomTime(a),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation()}_onDragEnd(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation())}_onMarkerChange(t){this.body.emitter.emit("markerchange",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}_onMarkerChanged(t){this.body.emitter.emit("markerchanged",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}static customTimeFromTarget(t){let e=t.target;for(;e;){if(Object.prototype.hasOwnProperty.call(e,"custom-time"))return e["custom-time"];e=e.parentNode}return null}}class Sb{_create(t){var e,i,o;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",()=>{!0===this.initialDrawDone&&this._redraw()}),this.on("rangechanged",()=>{this.initialRangeChangeDone||(this.initialRangeChangeDone=!0)}),this.on("touch",Pi(e=this._onTouch).call(e,this)),this.on("panmove",Pi(i=this._onDrag).call(i,this));const n=this;this._origRedraw=Pi(o=this._redraw).call(o,this),this._redraw=km.throttle(this._origRedraw),this.on("_change",t=>{n.itemSet&&n.itemSet.initialItemSetDrawn&&t&&1==t.queue?n._redraw():n._origRedraw()}),this.hammer=new Gv(this.dom.root);const 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:Gv.DIRECTION_ALL}),this.timelineListeners={};const r=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];var a,h;function l(t){this.isActive()&&this.emit("mousewheel",t);let 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)){const e=this.props.scrollTop,o=e+i;if(this.isActive()){this._setScrollTop(o)!==e&&(this._redraw(),this.emit("scroll",t),t.preventDefault())}}else if(this.options.horizontalScroll){const o=(Math.abs(e)>=Math.abs(i)?e:i)/120*(this.range.end-this.range.start)/20,n=this.range.start+o,s=this.range.end+o,r={animation:!1,byUser:!0,event:t};this.range.setRange(n,s,r),t.preventDefault()}}Xo(r).call(r,t=>{const e=e=>{n.isActive()&&n.emit(t,e)};n.hammer.on(t,e),n.timelineListeners[t]=e}),Wv(this.hammer,t=>{n.emit("touch",t)}),a=this.hammer,(h=t=>{n.emit("release",t)}).inputHandler=function(t){t.isFinal&&h(t)},a.on("hammer.input",h.inputHandler);const c="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";function d(t){if(n.options.verticalScroll&&(t.preventDefault(),n.isActive())){const e=-t.target.scrollTop;n._setScrollTop(e),n._redraw(),n.emit("scrollSide",t)}}this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(c,Pi(l).call(l,this),!1),this.dom.top.addEventListener(c,Pi(l).call(l,this),!1),this.dom.bottom.addEventListener(c,Pi(l).call(l,this),!1),this.dom.left.parentNode.addEventListener("scroll",Pi(d).call(d,this)),this.dom.right.parentNode.addEventListener("scroll",Pi(d).call(d,this));let u=!1;function p(t){var e;if(t.preventDefault&&(n.emit("dragover",n.getEventProperties(t)),t.preventDefault()),pv(e=t.target.className).call(e,"timeline")>-1&&!u)return t.dataTransfer.dropEffect="move",u=!0,!1}function m(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 u=!1,t.center={x:t.clientX,y:t.clientY},"item"!==e.target?n.itemSet._onAddItem(t):n.itemSet._onDropObjectOnItem(t),n.emit("drop",n.getEventProperties(t)),!1}if(this.dom.center.addEventListener("dragover",Pi(p).call(p,this),!1),this.dom.center.addEventListener("drop",Pi(m).call(m,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)}setOptions(t){var e;if(t){const e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","verticalScroll","longSelectPressTime","snap"];if(km.selectiveExtend(e,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"!=typeof 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"==typeof 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){const t=this.timeAxis2=new sb(this.body,this.options);t.setOptions=e=>{const i=e?km.extend({},e):{};i.orientation="top",sb.prototype.setOptions.call(t,i)},this.components.push(t)}}else if(this.timeAxis2){var i;const t=pv(i=this.components).call(i,this.timeAxis2);var o;if(-1!==t)Ov(o=this.components).call(o,t,1);this.timeAxis2.destroy(),this.timeAxis2=null}"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&Tg(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new ab(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(Xo(e=this.components).call(e,e=>e.setOptions(t)),"configure"in t){var n;this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);const e=km.deepExtend({},this.options);Xo(n=this.components).call(n,t=>{km.deepExtend(e,t.options)}),this.configurator.setModuleOptions({global:e})}this._redraw()}isActive(){return!this.activator||this.activator.active}destroy(){var t;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);for(const t in this.timelineListeners)Object.prototype.hasOwnProperty.call(this.timelineListeners,t)&&delete this.timelineListeners[t];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,Xo(t=this.components).call(t,t=>t.destroy()),this.body=null}setCustomTime(t,e){var i;const o=hr(i=this.customTimes).call(i,t=>e===t.options.id);if(0===o.length)throw new Error("No custom time bar found with id ".concat(uf(e)));o.length>0&&o[0].setCustomTime(t)}getCustomTime(t){var e;const i=hr(e=this.customTimes).call(e,e=>e.options.id===t);if(0===i.length)throw new Error("No custom time bar found with id ".concat(uf(t)));return i[0].getCustomTime()}setCustomTimeMarker(t,e,i){var o;const n=hr(o=this.customTimes).call(o,t=>t.options.id===e);if(0===n.length)throw new Error("No custom time bar found with id ".concat(uf(e)));n.length>0&&n[0].setCustomMarker(t,i)}setCustomTimeTitle(t,e){var i;const o=hr(i=this.customTimes).call(i,t=>t.options.id===e);if(0===o.length)throw new Error("No custom time bar found with id ".concat(uf(e)));if(o.length>0)return o[0].setCustomTitle(t)}getEventProperties(t){return{event:t}}addCustomTime(t,e){var i;const o=void 0!==t?km.convert(t,"Date"):new Date,n=Lv(i=this.customTimes).call(i,t=>t.options.id===e);if(n)throw new Error("A custom time with id ".concat(uf(e)," already exists"));const s=new Cb(this.body,km.extend({},this.options,{time:o,id:e,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(s),this.components.push(s),this._redraw(),e}removeCustomTime(t){var e;const i=hr(e=this.customTimes).call(e,e=>e.options.id===t);if(0===i.length)throw new Error("No custom time bar found with id ".concat(uf(t)));Xo(i).call(i,t=>{var e,i,o,n;Ov(e=this.customTimes).call(e,pv(i=this.customTimes).call(i,t),1),Ov(o=this.components).call(o,pv(n=this.components).call(n,t),1),t.destroy()})}getVisibleItems(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}getItemsAtCurrentTime(t){return this.time=t,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}getVisibleGroups(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}fit(t,e){const i=this.getDataRange();if(null===i.min&&null===i.max)return;const o=i.max-i.min,n=new Date(i.min.valueOf()-.01*o),s=new Date(i.max.valueOf()+.01*o),r=!t||void 0===t.animation||t.animation;this.range.setRange(n,s,{animation:r},e)}getDataRange(){throw new Error("Cannot invoke abstract method getDataRange")}setWindow(t,e,i,o){let n,s;"function"==typeof arguments[2]&&(o=arguments[2],i={}),1==arguments.length?(s=arguments[0],n=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:n})):2==arguments.length&&"function"==typeof arguments[1]?(s=arguments[0],o=arguments[1],n=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:n},o)):(n=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:n},o))}moveTo(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});const o=this.range.end-this.range.start,n=km.convert(t,"Date").valueOf(),s=n-o/2,r=n+o/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(s,r,{animation:a},i)}getWindow(){const t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}}zoomIn(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const o=this.getWindow(),n=o.start.valueOf(),s=o.end.valueOf(),r=s-n,a=(r-r/(1+t))/2,h=n+a,l=s-a;this.setWindow(h,l,e,i)}zoomOut(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const o=this.getWindow(),n=o.start.valueOf(),s=o.end.valueOf(),r=s-n,a=n-r*t/2,h=s+r*t/2;this.setWindow(a,h,e,i)}redraw(){this._redraw()}_redraw(){var t;this.redrawCount++;const e=this.dom;if(!e||!e.container||0==e.root.offsetWidth)return;let i=!1;const o=this.options,n=this.props;Og(this.options.moment,this.body,this.options.hiddenDates),"top"==o.orientation?(km.addClassName(e.root,"vis-top"),km.removeClassName(e.root,"vis-bottom")):(km.removeClassName(e.root,"vis-top"),km.addClassName(e.root,"vis-bottom")),o.rtl?(km.addClassName(e.root,"vis-rtl"),km.removeClassName(e.root,"vis-ltr")):(km.addClassName(e.root,"vis-ltr"),km.removeClassName(e.root,"vis-rtl")),e.root.style.maxHeight=km.option.asSize(o.maxHeight,""),e.root.style.minHeight=km.option.asSize(o.minHeight,""),e.root.style.width=km.option.asSize(o.width,"");const s=e.root.offsetWidth;n.border.left=1,n.border.right=1,n.border.top=1,n.border.bottom=1,n.center.height=e.center.offsetHeight,n.left.height=e.left.offsetHeight,n.right.height=e.right.offsetHeight,n.top.height=e.top.clientHeight||-n.border.top,n.bottom.height=Math.round(e.bottom.getBoundingClientRect().height)||e.bottom.clientHeight||-n.border.bottom;const r=Math.max(n.left.height,n.center.height,n.right.height),a=n.top.height+r+n.bottom.height+n.border.top+n.border.bottom;e.root.style.height=km.option.asSize(o.height,"".concat(a,"px")),n.root.height=e.root.offsetHeight,n.background.height=n.root.height;const h=n.root.height-n.top.height-n.bottom.height;n.centerContainer.height=h,n.leftContainer.height=h,n.rightContainer.height=n.leftContainer.height,n.root.width=s,n.background.width=n.root.width,this.initialDrawDone||(n.scrollbarWidth=km.getScrollBarWidth());const l=e.leftContainer.clientWidth,c=e.rightContainer.clientWidth;o.verticalScroll?o.rtl?(n.left.width=l||-n.border.left,n.right.width=c+n.scrollbarWidth||-n.border.right):(n.left.width=l+n.scrollbarWidth||-n.border.left,n.right.width=c||-n.border.right):(n.left.width=l||-n.border.left,n.right.width=c||-n.border.right),this._setDOM();let d=this._updateScrollTop();"top"!=o.orientation.item&&(d+=Math.max(n.centerContainer.height-n.center.height-n.border.top-n.border.bottom,0)),e.center.style.transform="translateY(".concat(d,"px)");const u=0==n.scrollTop?"hidden":"",p=n.scrollTop==n.scrollTopMin?"hidden":"";e.shadowTop.style.visibility=u,e.shadowBottom.style.visibility=p,e.shadowTopLeft.style.visibility=u,e.shadowBottomLeft.style.visibility=p,e.shadowTopRight.style.visibility=u,e.shadowBottomRight.style.visibility=p,o.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"),(!o.verticalScroll||n.center.height<n.centerContainer.height)&&(e.left.style.top="".concat(d,"px"),e.right.style.top="".concat(d,"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|$)")," "),n.left.width=l||-n.border.left,n.right.width=c||-n.border.right,this._setDOM());const m=n.center.height>n.centerContainer.height;this.hammer.get("pan").set({direction:m?Gv.DIRECTION_ALL:Gv.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),Xo(t=this.components).call(t,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")}_setDOM(){const t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;const 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"}setCurrentTime(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)}getCurrentTime(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()}_toTime(t){return Pg(this,t,this.props.center.width)}_toGlobalTime(t){return Pg(this,t,this.props.root.width)}_toScreen(t){return Ig(this,t,this.props.center.width)}_toGlobalScreen(t){return Ig(this,t,this.props.root.width)}_initAutoResize(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()}_startAutoResize(){const t=this;this._stopAutoResize(),this._onResize=()=>{if(1==t.options.autoResize){if(t.dom.root){const 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=km.getScrollBarWidth(),t.body.emitter.emit("_change"))}}else t._stopAutoResize()},window.addEventListener("resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=Bv(this._onResize,1e3)}_stopAutoResize(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null)}_onTouch(t){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}_onPinch(t){this.touch.allowDragging=!1}_onDrag(t){if(!t)return;if(!this.touch.allowDragging)return;const e=t.deltaY,i=this._getScrollTop(),o=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),o!=i&&this.emit("verticalDrag")}_setScrollTop(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop}_updateScrollTop(){const 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}_getScrollTop(){return this.props.scrollTop}_createConfigurator(){throw new Error("Cannot invoke abstract method _createConfigurator")}}id(Sb.prototype);class Db extends Lf{constructor(t,e){var i;super(),this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:qo,locales:xb,locale:"en"},this.options=km.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=km.extend({},xb,this.options.locales);const o=this.defaultOptions.locales[this.defaultOptions.locale];Xo(i=$c(this.options.locales)).call(i,t=>{this.options.locales[t]=km.extend({},o,this.options.locales[t])}),this.offset=0,this._create()}_create(){const t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t}destroy(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}setOptions(t){t&&km.selectiveExtend(["rtl","showCurrentTime","alignCurrentTime","moment","locale","locales"],this.options,t)}redraw(){if(this.options.showCurrentTime){var t,e;const i=this.body.dom.backgroundVertical;this.bar.parentNode!=i&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),i.appendChild(this.bar),this.start());let o=this.options.moment(Ef()+this.offset);this.options.alignCurrentTime&&(o=o.startOf(this.options.alignCurrentTime));const n=this.body.util.toScreen(o);let s=this.options.locales[this.options.locale];s||(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),s=this.options.locales.en);let r=Zm(t=Zm(e="".concat(s.current," ")).call(e,s.time,": ")).call(t,o.format("dddd, MMMM Do YYYY, H:mm:ss"));r=r.charAt(0).toUpperCase()+r.substring(1),this.options.rtl?this.bar.style.transform="translateX(".concat(-1*n,"px)"):this.bar.style.transform="translateX(".concat(n,"px)"),this.bar.title=r}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}start(){const t=this;!function e(){t.stop();let 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=Zi(e,i)}()}stop(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(t){const e=km.convert(t,"Date").valueOf(),i=Ef();this.offset=e-i,this.redraw()}getCurrentTime(){return new Date(Ef()+this.offset)}}var kb,Tb,Ob,Eb,Ab,Ib,Pb,Mb,Nb,Fb={};function Rb(){if(Tb)return kb;Tb=1;var t=N(),e=D(),i=F(),o=x(),n=kn(),s=Wn(),r=wt(),a=be(),h=xt(),l=Object.assign,c=Object.defineProperty,d=e([].concat);return kb=!l||o(function(){if(t&&1!==l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},i={},o=Symbol("assign detection"),s="abcdefghijklmnopqrst";return e[o]=7,s.split("").forEach(function(t){i[t]=t}),7!==l({},e)[o]||n(l({},i)).join("")!==s})?function(e,o){for(var l=a(e),c=arguments.length,u=1,p=s.f,m=r.f;c>u;)for(var f,g=h(arguments[u++]),v=p?d(n(g),p(g)):n(g),b=v.length,y=0;b>y;)f=v[y++],t&&!i(m,g,f)||(l[f]=g[f]);return l}:l,kb}function Lb(){return Ab?Eb:(Ab=1,function(){if(Ob)return Fb;Ob=1;var t=Je(),e=Rb();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}(),Eb=Tt().Object.assign)}function jb(){return Pb?Ib:(Pb=1,Ib=Lb())}var Bb,zb,Hb,Gb,Wb,Yb,Vb,Ub,Xb,qb=n(Nb?Mb:(Nb=1,Mb=jb())),Kb={};function $b(){return Hb?zb:(Hb=1,function(){if(Bb)return Kb;Bb=1;var t=Je(),e=Ho().find,i=Ch(),o="find",n=!0;o in[]&&Array(1)[o](function(){n=!1}),t({target:"Array",proto:!0,forced:n},{find:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),i(o)}(),zb=_i()("Array","find"))}function Zb(){if(Wb)return Gb;Wb=1;var t=Et(),e=$b(),i=Array.prototype;return Gb=function(o){var n=o.find;return o===i||t(i,o)&&n===i.find?e:n},Gb}function Jb(){return Vb?Yb:(Vb=1,Yb=Zb())}var Qb,ty,ey,iy,oy,ny,sy,ry=n(Xb?Ub:(Xb=1,Ub=Jb()));function ay(){if(ey)return ty;ey=1,Qb||(Qb=1,Je()({target:"Object",stat:!0,sham:!N()},{create:An()}));var t=Tt().Object;return ty=function(e,i){return t.create(e,i)}}function hy(){return oy?iy:(oy=1,iy=ay())}var ly,cy,dy,uy,py,my,fy,gy,vy,by,yy,wy,_y,xy,Cy,Sy,Dy,ky,Ty,Oy,Ey,Ay,Iy,Py,My,Ny,Fy,Ry,Ly,jy=n(sy?ny:(sy=1,ny=hy())),By={},zy={exports:{}};function Hy(){return cy?ly:(cy=1,ly=x()(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))}function Gy(){if(uy)return dy;uy=1;var t=x(),e=kt(),i=k(),o=Hy(),n=Object.isExtensible,s=t(function(){});return dy=s||o?function(t){return!!e(t)&&((!o||"ArrayBuffer"!==i(t))&&(!n||n(t)))}:n,dy}function Wy(){return my?py:(my=1,py=!x()(function(){return Object.isExtensible(Object.preventExtensions({}))}))}function Yy(){if(fy)return zy.exports;fy=1;var t=Je(),e=D(),i=Cn(),o=kt(),n=ye(),s=$e().f,r=Mn(),a=Rn(),h=Gy(),l=we(),c=Wy(),d=!1,u=l("meta"),p=0,m=function(t){s(t,u,{value:{objectID:"O"+p++,weakData:{}}})},f=zy.exports={enable:function(){f.enable=function(){},d=!0;var i=r.f,o=e([].splice),n={};n[u]=1,i(n).length&&(r.f=function(t){for(var e=i(t),n=0,s=e.length;n<s;n++)if(e[n]===u){o(e,n,1);break}return e},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!n(t,u)){if(!h(t))return"F";if(!e)return"E";m(t)}return t[u].objectID},getWeakData:function(t,e){if(!n(t,u)){if(!h(t))return!0;if(!e)return!1;m(t)}return t[u].weakData},onFreeze:function(t){return c&&d&&h(t)&&!n(t,u)&&m(t),t}};return i[u]=!0,zy.exports}function Vy(){if(vy)return gy;vy=1;var t=_e(),e=Sh(),i=t("iterator"),o=Array.prototype;return gy=function(t){return void 0!==t&&(e.Array===t||o[i]===t)},gy}function Uy(){if(yy)return by;yy=1;var t=Qi(),e=Lt(),i=Ct(),o=Sh(),n=_e()("iterator");return by=function(s){if(!i(s))return e(s,n)||e(s,"@@iterator")||o[t(s)]},by}function Xy(){if(_y)return wy;_y=1;var t=F(),e=Rt(),i=Ke(),o=Ft(),n=Uy(),s=TypeError;return wy=function(r,a){var h=arguments.length<2?n(r):a;if(e(h))return i(t(h,r));throw new s(o(r)+" is not iterable")},wy}function qy(){if(Cy)return xy;Cy=1;var t=F(),e=Ke(),i=Lt();return xy=function(o,n,s){var r,a;e(o);try{if(!(r=i(o,"return"))){if("throw"===n)throw s;return s}r=t(r,o)}catch(t){a=!0,r=t}if("throw"===n)throw s;if(a)throw r;return e(r),s},xy}function Ky(){if(Dy)return Sy;Dy=1;var t=Oe(),e=F(),i=Ke(),o=Ft(),n=Vy(),s=Ro(),r=Et(),a=Xy(),h=Uy(),l=qy(),c=TypeError,d=function(t,e){this.stopped=t,this.result=e},u=d.prototype;return Sy=function(p,m,f){var g,v,b,y,w,_,x,C=f&&f.that,S=!(!f||!f.AS_ENTRIES),D=!(!f||!f.IS_RECORD),k=!(!f||!f.IS_ITERATOR),T=!(!f||!f.INTERRUPTED),O=t(m,C),E=function(t){return g&&l(g,"normal"),new d(!0,t)},A=function(t){return S?(i(t),T?O(t[0],t[1],E):O(t[0],t[1])):T?O(t,E):O(t)};if(D)g=p.iterator;else if(k)g=p;else{if(!(v=h(p)))throw new c(o(p)+" is not iterable");if(n(v)){for(b=0,y=s(p);y>b;b++)if((w=A(p[b]))&&r(u,w))return w;return new d(!1)}g=a(p,v)}for(_=D?p.next:g.next;!(x=e(_,g)).done;){try{w=A(x.value)}catch(t){l(g,"throw",t)}if("object"==typeof w&&w&&r(u,w))return w}return new d(!1)},Sy}function $y(){if(Ty)return ky;Ty=1;var t=Et(),e=TypeError;return ky=function(i,o){if(t(o,i))return i;throw new e("Incorrect invocation")},ky}function Zy(){if(Ey)return Oy;Ey=1;var t=Je(),e=_(),i=Yy(),o=x(),n=Ze(),s=Ky(),r=$y(),a=O(),h=kt(),l=Ct(),c=ds(),d=$e().f,u=Ho().forEach,p=N(),m=ps(),f=m.set,g=m.getterFor;return Oy=function(m,v,b){var y,w=-1!==m.indexOf("Map"),_=-1!==m.indexOf("Weak"),x=w?"set":"add",C=e[m],S=C&&C.prototype,D={};if(p&&a(C)&&(_||S.forEach&&!o(function(){(new C).entries().next()}))){var k=(y=v(function(t,e){f(r(t,k),{type:m,collection:new C}),l(e)||s(e,t[x],{that:t,AS_ENTRIES:w})})).prototype,T=g(m);u(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(t){var e="add"===t||"set"===t;!(t in S)||_&&"clear"===t||n(k,t,function(i,o){var n=T(this).collection;if(!e&&_&&!h(i))return"get"===t&&void 0;var s=n[t](0===i?0:i,o);return e?this:s})}),_||d(k,"size",{configurable:!0,get:function(){return T(this).collection.size}})}else y=b.getConstructor(v,m,w,x),i.enable();return c(y,m,!1,!0),D[m]=y,t({global:!0,forced:!0},D),_||b.setStrong(y,m,w),y}}function Jy(){if(Iy)return Ay;Iy=1;var t=Yn();return Ay=function(e,i,o){for(var n in i)o&&o.unsafe&&e[n]?e[n]=i[n]:t(e,n,i[n],o);return e}}function Qy(){if(My)return Py;My=1;var t=Ot(),e=Vn(),i=_e(),o=N(),n=i("species");return Py=function(i){var s=t(i);o&&s&&!s[n]&&e(s,n,{configurable:!0,get:function(){return this}})}}function tw(){if(Fy)return Ny;Fy=1;var t=An(),e=Vn(),i=Jy(),o=Oe(),n=$y(),s=Ct(),r=Ky(),a=Nh(),h=Fh(),l=Qy(),c=N(),d=Yy().fastKey,u=ps(),p=u.set,m=u.getterFor;return Ny={getConstructor:function(a,h,l,u){var f=a(function(e,i){n(e,g),p(e,{type:h,index:t(null),first:null,last:null,size:0}),c||(e.size=0),s(i)||r(i,e[u],{that:e,AS_ENTRIES:l})}),g=f.prototype,v=m(h),b=function(t,e,i){var o,n,s=v(t),r=y(t,e);return r?r.value=i:(s.last=r={index:n=d(e,!0),key:e,value:i,previous:o=s.last,next:null,removed:!1},s.first||(s.first=r),o&&(o.next=r),c?s.size++:t.size++,"F"!==n&&(s.index[n]=r)),t},y=function(t,e){var i,o=v(t),n=d(e);if("F"!==n)return o.index[n];for(i=o.first;i;i=i.next)if(i.key===e)return i};return i(g,{clear:function(){for(var e=v(this),i=e.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=null),i=i.next;e.first=e.last=null,e.index=t(null),c?e.size=0:this.size=0},delete:function(t){var e=this,i=v(e),o=y(e,t);if(o){var n=o.next,s=o.previous;delete i.index[o.index],o.removed=!0,s&&(s.next=n),n&&(n.previous=s),i.first===o&&(i.first=n),i.last===o&&(i.last=s),c?i.size--:e.size--}return!!o},forEach:function(t){for(var e,i=v(this),n=o(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!!y(this,t)}}),i(g,l?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return b(this,0===t?0:t,e)}}:{add:function(t){return b(this,t=0===t?0:t,t)}}),c&&e(g,"size",{configurable:!0,get:function(){return v(this).size}}),f},setStrong:function(t,e,i){var o=e+" Iterator",n=m(e),s=m(o);a(t,e,function(t,e){p(this,{type:o,target:t,state:n(t),kind:e,last:null})},function(){for(var t=s(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)?h("keys"===e?i.key:"values"===e?i.value:[i.key,i.value],!1):(t.target=null,h(void 0,!0))},i?"entries":"values",!i,!0),l(e)}},Ny}function ew(){return Ly||(Ly=1,Ry||(Ry=1,Zy()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},tw()))),By}var iw,ow,nw,sw,rw,aw,hw,lw,cw,dw,uw,pw,mw,fw,gw,vw,bw,yw,ww,_w,xw,Cw,Sw,Dw={};function kw(){if(ow)return iw;ow=1;var t=Ft(),e=TypeError;return iw=function(i){if("object"==typeof i&&"size"in i&&"has"in i&&"add"in i&&"delete"in i&&"keys"in i)return i;throw new e(t(i)+" is not a set")},iw}function Tw(){return sw||(sw=1,nw=function(t,e){return 1===e?function(e,i){return e[t](i)}:function(e,i,o){return e[t](i,o)}}),nw}function Ow(){if(aw)return rw;aw=1;var t=Ot(),e=Tw(),i=t("Set"),o=i.prototype;return rw={Set:i,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:o}}function Ew(){if(lw)return hw;lw=1;var t=F();return hw=function(e,i,o){for(var n,s,r=o?e:e.iterator,a=e.next;!(n=t(a,r)).done;)if(void 0!==(s=i(n.value)))return s},hw}function Aw(){if(dw)return cw;dw=1;var t=Ew();return cw=function(e,i,o){return o?t(e.keys(),i,!0):e.forEach(i)},cw}function Iw(){if(pw)return uw;pw=1;var t=Ow(),e=Aw(),i=t.Set,o=t.add;return uw=function(t){var n=new i;return e(t,function(t){o(n,t)}),n},uw}function Pw(){return fw||(fw=1,mw=function(t){return t.size}),mw}function Mw(){return vw?gw:(vw=1,gw=function(t){return{iterator:t,next:t.next,done:!1}})}function Nw(){if(yw)return bw;yw=1;var t=Rt(),e=Ke(),i=F(),o=No(),n=Mw(),s="Invalid size",r=RangeError,a=TypeError,h=Math.max,l=function(e,i){this.set=e,this.size=h(i,0),this.has=t(e.has),this.keys=t(e.keys)};return l.prototype={getIterator:function(){return n(e(i(this.keys,this.set)))},includes:function(t){return i(this.has,this.set,t)}},bw=function(t){e(t);var i=+t.size;if(i!=i)throw new a(s);var n=o(i);if(n<0)throw new r(s);return new l(t,n)}}function Fw(){if(_w)return ww;_w=1;var t=kw(),e=Ow(),i=Iw(),o=Pw(),n=Nw(),s=Aw(),r=Ew(),a=e.has,h=e.remove;return ww=function(e){var l=t(this),c=n(e),d=i(l);return o(l)<=c.size?s(l,function(t){c.includes(t)&&h(d,t)}):r(c.getIterator(),function(t){a(d,t)&&h(d,t)}),d}}function Rw(){return Cw?xw:(Cw=1,xw=function(){return!1})}var Lw,jw,Bw,zw={};function Hw(){if(jw)return Lw;jw=1;var t=kw(),e=Ow(),i=Pw(),o=Nw(),n=Aw(),s=Ew(),r=e.Set,a=e.add,h=e.has;return Lw=function(e){var l=t(this),c=o(e),d=new r;return i(l)>c.size?s(c.getIterator(),function(t){h(l,t)&&a(d,t)}):n(l,function(t){c.includes(t)&&a(d,t)}),d}}var Gw,Ww,Yw,Vw={};function Uw(){if(Ww)return Gw;Ww=1;var t=kw(),e=Ow().has,i=Pw(),o=Nw(),n=Aw(),s=Ew(),r=qy();return Gw=function(a){var h=t(this),l=o(a);if(i(h)<=l.size)return!1!==n(h,function(t){if(l.includes(t))return!1},!0);var c=l.getIterator();return!1!==s(c,function(t){if(e(h,t))return r(c,"normal",!1)})},Gw}var Xw,qw,Kw,$w={};function Zw(){if(qw)return Xw;qw=1;var t=kw(),e=Pw(),i=Aw(),o=Nw();return Xw=function(n){var s=t(this),r=o(n);return!(e(s)>r.size)&&!1!==i(s,function(t){if(!r.includes(t))return!1},!0)}}var Jw,Qw,t_,e_={};function i_(){if(Qw)return Jw;Qw=1;var t=kw(),e=Ow().has,i=Pw(),o=Nw(),n=Ew(),s=qy();return Jw=function(r){var a=t(this),h=o(r);if(i(a)<h.size)return!1;var l=h.getIterator();return!1!==n(l,function(t){if(!e(a,t))return s(l,"normal",!1)})},Jw}var o_,n_,s_,r_,a_,h_={};function l_(){if(n_)return o_;n_=1;var t=kw(),e=Ow(),i=Iw(),o=Nw(),n=Ew(),s=e.add,r=e.has,a=e.remove;return o_=function(e){var h=t(this),l=o(e).getIterator(),c=i(h);return n(l,function(t){r(h,t)?a(c,t):s(c,t)}),c}}function c_(){return r_?s_:(r_=1,s_=function(t){try{var e=new Set,i={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},o=e[t](i);return 1===o.size&&4===o.values().next().value}catch(t){return!1}})}var d_,u_,p_,m_,f_,g_,v_,b_,y_,w_={};function __(){if(u_)return d_;u_=1;var t=kw(),e=Ow().add,i=Iw(),o=Nw(),n=Ew();return d_=function(s){var r=t(this),a=o(s).getIterator(),h=i(r);return n(a,function(t){e(h,t)}),h},d_}function x_(){return f_?m_:(f_=1,Rh(),ew(),function(){if(Sw)return Dw;Sw=1;var t=Je(),e=Fw(),i=x();t({target:"Set",proto:!0,real:!0,forced:!Rw()("difference",function(t){return 0===t.size})||i(function(){var t={size:1,has:function(){return!0},keys:function(){var t=0;return{next:function(){var i=t++>1;return e.has(1)&&e.clear(),{done:i,value:2}}}}},e=new Set([1,2,3,4]);return 3!==e.difference(t).size})},{difference:e})}(),function(){if(Bw)return zw;Bw=1;var t=Je(),e=x(),i=Hw();t({target:"Set",proto:!0,real:!0,forced:!Rw()("intersection",function(t){return 2===t.size&&t.has(1)&&t.has(2)})||e(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:i})}(),function(){if(Yw)return Vw;Yw=1;var t=Je(),e=Uw();t({target:"Set",proto:!0,real:!0,forced:!Rw()("isDisjointFrom",function(t){return!t})},{isDisjointFrom:e})}(),function(){if(Kw)return $w;Kw=1;var t=Je(),e=Zw();t({target:"Set",proto:!0,real:!0,forced:!Rw()("isSubsetOf",function(t){return t})},{isSubsetOf:e})}(),function(){if(t_)return e_;t_=1;var t=Je(),e=i_();t({target:"Set",proto:!0,real:!0,forced:!Rw()("isSupersetOf",function(t){return!t})},{isSupersetOf:e})}(),function(){if(a_)return h_;a_=1;var t=Je(),e=l_(),i=c_();t({target:"Set",proto:!0,real:!0,forced:!Rw()("symmetricDifference")||!i("symmetricDifference")},{symmetricDifference:e})}(),function(){if(p_)return w_;p_=1;var t=Je(),e=__(),i=c_();t({target:"Set",proto:!0,real:!0,forced:!Rw()("union")||!i("union")},{union:e})}(),Pl(),m_=Tt().Set)}function C_(){if(v_)return g_;v_=1;var t=x_();return jh(),g_=t}var S_,D_,k_,T_,O_,E_,A_,I_,P_,M_=n(y_?b_:(y_=1,b_=C_())),N_={};function F_(){return k_?D_:(k_=1,function(){if(S_)return N_;S_=1;var t=Je(),e=Qe(),i=jo(),o=kt(),n=_n(),s=Ro(),r=Dt(),a=Tr(),h=_e(),l=Js(),c=yi(),d=l("slice"),u=h("species"),p=Array,m=Math.max;t({target:"Array",proto:!0,forced:!d},{slice:function(t,h){var l,d,f,g=r(this),v=s(g),b=n(t,v),y=n(void 0===h?v:h,v);if(e(g)&&(l=g.constructor,(i(l)&&(l===p||e(l.prototype))||o(l)&&null===(l=l[u]))&&(l=void 0),l===p||void 0===l))return c(g,b,y);for(d=new(void 0===l?p:l)(m(y-b,0)),f=0;b<y;b++,f++)b in g&&a(d,f,g[b]);return d.length=f,d}})}(),D_=_i()("Array","slice"))}function R_(){if(O_)return T_;O_=1;var t=Et(),e=F_(),i=Array.prototype;return T_=function(o){var n=o.slice;return o===i||t(i,o)&&n===i.slice?e:n},T_}function L_(){return A_?E_:(A_=1,E_=R_())}var j_,B_,z_,H_=n(P_?I_:(P_=1,I_=L_())),G_={};function W_(){return z_?B_:(z_=1,function(){if(j_)return G_;j_=1;var t=Je(),e=xn().includes,i=x(),o=Ch();t({target:"Array",proto:!0,forced:i(function(){return!Array(1).includes()})},{includes:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")}(),B_=_i()("Array","includes"))}var Y_,V_,U_,X_,q_,K_,$_,Z_,J_,Q_,tx,ex,ix,ox,nx,sx={};function rx(){if(V_)return Y_;V_=1;var t=kt(),e=k(),i=_e()("match");return Y_=function(o){var n;return t(o)&&(void 0!==(n=o[i])?!!n:"RegExp"===e(o))},Y_}function ax(){if(X_)return U_;X_=1;var t=rx(),e=TypeError;return U_=function(i){if(t(i))throw new e("The method doesn't accept regular expressions");return i},U_}function hx(){if(K_)return q_;K_=1;var t=_e()("match");return q_=function(e){var i=/./;try{"/./"[e](i)}catch(o){try{return i[t]=!1,"/./"[e](i)}catch(t){}}return!1}}function lx(){return J_?Z_:(J_=1,function(){if($_)return sx;$_=1;var t=Je(),e=D(),i=ax(),o=St(),n=Qo(),s=hx(),r=e("".indexOf);t({target:"String",proto:!0,forced:!s("includes")},{includes:function(t){return!!~r(n(o(this)),n(i(t)),arguments.length>1?arguments[1]:void 0)}})}(),Z_=_i()("String","includes"))}function cx(){if(tx)return Q_;tx=1;var t=Et(),e=W_(),i=lx(),o=Array.prototype,n=String.prototype;return Q_=function(s){var r=s.includes;return s===o||t(o,s)&&r===o.includes?e:"string"==typeof s||s===n||t(n,s)&&r===n.includes?i:r},Q_}function dx(){return ix?ex:(ix=1,ex=cx())}var ux,px,mx,fx,gx,vx,bx,yx,wx,_x=n(nx?ox:(nx=1,ox=dx())),xx={};function Cx(){if(px)return ux;px=1;var t=N(),e=x(),i=D(),o=Th(),n=kn(),s=Dt(),r=i(wt().f),a=i([].push),h=t&&e(function(){var t=Object.create(null);return t[2]=2,!r(t,2)}),l=function(e){return function(i){for(var l,c=s(i),d=n(c),u=h&&null===o(c),p=d.length,m=0,f=[];p>m;)l=d[m++],t&&!(u?l in c:r(c,l))||a(f,e?[l,c[l]]:c[l]);return f}};return ux={entries:l(!0),values:l(!1)}}function Sx(){return gx?fx:(gx=1,function(){if(mx)return xx;mx=1;var t=Je(),e=Cx().values;t({target:"Object",stat:!0},{values:function(t){return e(t)}})}(),fx=Tt().Object.values)}function Dx(){return bx?vx:(bx=1,vx=Sx())}var kx=n(wx?yx:(wx=1,yx=Dx()));const Tx=.001;function Ox(t){kg(t).call(t,(t,e)=>t.data.start-e.data.start)}function Ex(t){kg(t).call(t,(t,e)=>("end"in t.data?t.data.end:t.data.start)-("end"in e.data?e.data.end:e.data.start))}function Ax(t,e,i,o){return null===Fx(t,e.item,!1,t=>t.stack&&(i||null===t.top),t=>t.stack,()=>e.axis,o)}function Ix(t,e,i){const o=Fx(t,e.item,!1,t=>t.stack,()=>!0,t=>t.baseTop);i.height=o-i.top+.5*e.item.vertical}function Px(t,e,i,o){for(let n=0;n<t.length;n++){if(null==t[n].data.subgroup){t[n].top=e.item.vertical;continue}if(void 0===t[n].data.subgroup||!o)continue;let s=0;for(const e in i)!Object.prototype.hasOwnProperty.call(i,e)||!0!==i[e].visible||i[e].index>=i[t[n].data.subgroup].index||(s+=i[e].height,i[t[n].data.subgroup].top=s);t[n].top=s+.5*e.item.vertical}o||Mx(t,e,i)}function Mx(t,e,i){var o;Fx(kg(o=kx(i)).call(o,(t,e)=>t.index>e.index?1:t.index<e.index?-1:0),{vertical:0},!0,()=>!0,()=>!0,()=>0);for(let 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 Nx(t,e,i){let o=!1;const n=[];for(let t in i)Object.prototype.hasOwnProperty.call(i[t],"index")?n[i[t].index]=t:n.push(t);for(let s=0;s<n.length;s++){if(subgroup=n[s],!Object.prototype.hasOwnProperty.call(i,subgroup))continue;o=o||i[subgroup].stack,i[subgroup].top=0;for(const t in i)i[t].visible&&i[subgroup].index>i[t].index&&(i[subgroup].top+=i[t].height);const r=t[subgroup];for(let t=0;t<r.length;t++)void 0!==r[t].data.subgroup&&(r[t].top=i[r[t].data.subgroup].top+.5*e.item.vertical,i[subgroup].stack&&(r[t].baseTop=r[t].top));o&&i[subgroup].stack&&Ix(t[subgroup],e,i[subgroup])}}function Fx(t,e,i,o,n,s,r){let a=t=>t.start,h=t=>t.end;if(!i){const i=!(!t[0]||!t[0].options.rtl);a=i?t=>t.right:t=>t.left,h=t=>a(t)+t.width+e.horizontal}const l=[],c=[];let d=null,u=0;for(const e of t)if(o(e))l.push(e);else if(n(e)){const t=a(e);null!==d&&t<d-Tx&&(u=0),d=t,u=Lx(c,e=>a(e)-Tx>t,u),Ov(c).call(c,u,0,e),u++}d=null;let p=null;u=0;let m=0,f=0,g=0;for(;l.length>0;){var v;const t=l.shift();t.top=s(t);const i=a(t),o=h(t);null!==d&&i<d-Tx&&(m=0,f=0,u=0,p=null),(null===d||i>d+Tx)&&(m=Lx(c,t=>i<h(t)-Tx,m)),d=i,(null===p||p<o-Tx)&&(f=Lx(c,t=>o<a(t)-Tx,Math.max(m,f))),null!==p&&p-Tx>o&&(f=jx(c,t=>o+Tx>=a(t),m,f)+1),p=o;const b=kg(v=Bx(c,t=>i<h(t)-Tx,m,f)).call(v,(t,e)=>t.top-e.top);for(let i=0;i<b.length;i++){const o=b[i];Rx(t,o,e)&&(t.top=o.top+o.height+e.vertical)}n(t)&&(u=Lx(c,t=>a(t)-Tx>i,u),Ov(c).call(c,u,0,t),u<m&&m++,u<=f&&f++,u++);const y=t.top+t.height;if(y>g&&(g=y),r&&r())return null}return g}function Rx(t,e,i){return t.top-i.vertical+Tx<e.top+e.height&&t.top+t.height+i.vertical-Tx>e.top}function Lx(t,e,i){i||(i=0);for(let o=i;o<t.length;o++)if(e(t[o]))return o;return t.length}function jx(t,e,i,o){i||(i=0),o||(o=t.length);for(let n=o-1;n>=i;n--)if(e(t[n]))return n;return i-1}function Bx(t,e,i,o){i||(i=0),o=o?Math.min(o,t.length):t.length;const n=[];for(let s=i;s<o;s++)e(t[s])&&n.push(t[s]);return n}var zx=Object.freeze({__proto__:null,nostack:Px,orderByEnd:Ex,orderByStart:Ox,stack:Ax,stackSubgroups:Mx,stackSubgroupsWithInnerStack:Nx,substack:Ix});const Hx="__background__";class Gx{constructor(t,e,i){if(this.groupId=t,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.isVisible=null,this.height=0,this.stackDirty=!0,this._disposeCallbacks=[],e&&e.nestedGroups&&(this.nestedGroups=e.nestedGroups,0==e.showNested?this.showNested=!1:this.showNested=!0),e&&e.subgroupStack)if("boolean"==typeof e.subgroupStack)this.doInnerStack=e.subgroupStack,this.subgroupStackAll=e.subgroupStack;else for(const t in e.subgroupStack)Object.prototype.hasOwnProperty.call(e.subgroupStack,t)&&(this.subgroupStack[t]=e.subgroupStack[t],this.doInnerStack=this.doInnerStack||e.subgroupStack[t]);e&&e.heightMode?this.heightMode=e.heightMode:this.heightMode=i.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;const o=()=>{this.checkRangedItems=!0};this.itemSet.body.emitter.on("checkRangedItems",o),this._disposeCallbacks.push(()=>{this.itemSet.body.emitter.off("checkRangedItems",o)}),this._create(),this.setData(e)}_create(){const t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;const e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;const 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)}setData(t){if(this.itemSet.groupTouchParams.isDragging)return;let e,i;if(t&&t.subgroupVisibility)for(const e in t.subgroupVisibility)Object.prototype.hasOwnProperty.call(t.subgroupVisibility,e)&&(this.subgroupVisibility[e]=t.subgroupVisibility[e]);var o;this.itemSet.options&&this.itemSet.options.groupTemplate?(i=Pi(o=this.itemSet.options.groupTemplate).call(o,this),e=i(t,this.dom.inner)):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?km.xss(e):km.xss(this.groupId||""));this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?km.removeClassName(this.dom.inner,"vis-hidden"):km.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),km.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(km.removeClassName(this.dom.label,"collapsed"),km.addClassName(this.dom.label,"expanded")):(km.removeClassName(this.dom.label,"expanded"),km.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,km.removeClassName(this.dom.label,"collapsed"),km.removeClassName(this.dom.label,"expanded"),km.removeClassName(this.dom.label,"vis-nesting-group")),t&&(t.treeLevel||t.nestedInGroup)?(km.addClassName(this.dom.label,"vis-nested-group"),t.treeLevel?km.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):km.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):km.addClassName(this.dom.label,"vis-group-level-0");const n=t&&t.className||null;n!=this.className&&(this.className&&(km.removeClassName(this.dom.label,this.className),km.removeClassName(this.dom.foreground,this.className),km.removeClassName(this.dom.background,this.className),km.removeClassName(this.dom.axis,this.className)),km.addClassName(this.dom.label,n),km.addClassName(this.dom.foreground,n),km.addClassName(this.dom.background,n),km.addClassName(this.dom.axis,n),this.className=n),this.style&&(km.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(km.addCssText(this.dom.label,t.style),this.style=t.style)}getLabelWidth(){return this.props.label.width}_didMarkerHeightChange(){const t=this.dom.marker.clientHeight;if(t!=this.lastMarkerHeight){this.lastMarkerHeight=t;const e={};let i=0;Xo(km).call(km,this.items,(t,o)=>{if(t.dirty=!0,t.displayed){const n=!0;e[o]=t.redraw(n),i=e[o].length}});if(i>0)for(let t=0;t<i;t++)Xo(km).call(km,e,e=>{e[t]()});return!0}return!1}_calculateGroupSizeAndPosition(){const{offsetTop:t,offsetLeft:e,offsetWidth:i}=this.dom.foreground;this.top=t,this.right=e,this.width=i}_shouldBailItemsRedraw(){const t=this,e=this.itemSet.options.onTimeout,i={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:e&&e.timeoutMs,userBailFunction:e&&e.callback,shouldBailStackItems:this.shouldBailStackItems};let o=null;if(!this.itemSet.initialDrawDone){if(i.shouldBailStackItems)return!0;Math.abs(Ef()-new Date(i.relativeBailingTime))>i.bailTimeMs&&(i.userBailFunction&&null==this.itemSet.userContinueNotBail?i.userBailFunction(e=>{t.itemSet.userContinueNotBail=e,o=!e}):o=0==t.itemSet.userContinueNotBail)}return o}_redrawItems(t,e,i,o){if(t||this.stackDirty||this.isVisible&&!e){var n,s,r,a,h,l;const t={byEnd:hr(n=this.orderedItems.byEnd).call(n,t=>!t.isCluster),byStart:hr(s=this.orderedItems.byStart).call(s,t=>!t.isCluster)},e={byEnd:[...new M_(hr(r=Ac(a=this.orderedItems.byEnd).call(a,t=>t.cluster)).call(r,t=>!!t))],byStart:[...new M_(hr(h=Ac(l=this.orderedItems.byStart).call(l,t=>t.cluster)).call(h,t=>!!t))]},f=()=>{var i,n;return[...this._updateItemsInRange(t,hr(i=this.visibleItems).call(i,t=>!t.isCluster),o),...this._updateClustersInRange(e,hr(n=this.visibleItems).call(n,t=>t.isCluster),o)]},g=t=>{let e={};for(const o in this.subgroups){var i;if(!Object.prototype.hasOwnProperty.call(this.subgroups,o))continue;const n=hr(i=this.visibleItems).call(i,t=>t.data.subgroup===o);e[o]=t?kg(n).call(n,(e,i)=>t(e.data,i.data)):n}return e};if("function"==typeof this.itemSet.options.order){const t=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){Nx(g(this.itemSet.options.order),i,this.subgroups),this.visibleItems=f(),this._updateSubGroupHeights(i)}else{var c,d,u,p;this.visibleItems=f(),this._updateSubGroupHeights(i);const e=kg(c=hr(d=H_(u=this.visibleItems).call(u)).call(d,t=>t.isCluster||!t.isCluster&&!t.cluster)).call(c,(e,i)=>t.itemSet.options.order(e.data,i.data));this.shouldBailStackItems=Ax(e,i,!0,Pi(p=this._shouldBailItemsRedraw).call(p,this))}}else if(this.visibleItems=f(),this._updateSubGroupHeights(i),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){Nx(g(),i,this.subgroups)}else{var m;this.shouldBailStackItems=Ax(this.visibleItems,i,!0,Pi(m=this._shouldBailItemsRedraw).call(m,this))}else Px(this.visibleItems,i,this.subgroups,this.itemSet.options.stackSubgroups);for(let t=0;t<this.visibleItems.length;t++)this.visibleItems[t].repositionX(),void 0!==this.subgroupVisibility[this.visibleItems[t].data.subgroup]&&(this.subgroupVisibility[this.visibleItems[t].data.subgroup]||this.visibleItems[t].hide());this.itemSet.options.cluster&&Xo(km).call(km,this.items,t=>{t.cluster&&t.displayed&&t.hide()}),this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline"),this.stackDirty=!1}}_didResize(t,e){t=km.updateProperty(this,"height",e)||t;const i=this.dom.inner.clientWidth,o=this.dom.inner.clientHeight;return t=km.updateProperty(this.props.label,"width",i)||t,t=km.updateProperty(this.props.label,"height",o)||t}_applyGroupHeight(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")}_updateItemsVerticalPosition(t){for(let e=0,i=this.visibleItems.length;e<i;e++){const i=this.visibleItems[e];i.repositionY(t),this.isVisible||this.groupId==Hx||i.displayed&&i.hide()}}redraw(t,e,i,o){var n,s,r,a,h;let l=!1;const c=this.isVisible;let d;const u=[()=>{i=this._didMarkerHeightChange.call(this)||i},Pi(n=this._updateSubGroupHeights).call(n,this,e),Pi(s=this._calculateGroupSizeAndPosition).call(s,this),()=>{var i;this.isVisible=Pi(i=this._isGroupVisible).call(i,this)(t,e)},()=>{var o;Pi(o=this._redrawItems).call(o,this)(i,c,e,t)},Pi(r=this._updateSubgroupsSizes).call(r,this),()=>{var t;d=this.height=Pi(t=this._calculateHeight).call(t,this)(e)},Pi(a=this._calculateGroupSizeAndPosition).call(a,this),()=>{var t;l=Pi(t=this._didResize).call(t,this)(l,d)},()=>{var t;Pi(t=this._applyGroupHeight).call(t,this)(d)},()=>{var t;Pi(t=this._updateItemsVerticalPosition).call(t,this)(e)},Pi(h=()=>(!this.isVisible&&this.height&&(l=!1),l)).call(h,this)];if(o)return u;{let t;return Xo(u).call(u,e=>{t=e()}),t}}_updateSubGroupHeights(t){if($c(this.subgroups).length>0){const e=this;this._resetSubgroups(),Xo(km).call(km,this.visibleItems,i=>{void 0!==i.data.subgroup&&(e.subgroups[i.data.subgroup].height=Math.max(e.subgroups[i.data.subgroup].height,i.height+t.item.vertical),e.subgroups[i.data.subgroup].visible=void 0===this.subgroupVisibility[i.data.subgroup]||Boolean(this.subgroupVisibility[i.data.subgroup]))})}}_isGroupVisible(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}_calculateHeight(t){let e,i;if(i="fixed"===this.heightMode?km.toArray(this.items):this.visibleItems,!this.isVisible&&this.height)e=Math.max(this.height,this.props.label.height);else if(i.length>0){let o=i[0].top,n=i[0].top+i[0].height;if(Xo(km).call(km,i,t=>{o=Math.min(o,t.top),n=Math.max(n,t.top+t.height)}),o>t.axis){const e=o-t.axis;n-=e,Xo(km).call(km,i,t=>{t.top-=e})}e=Math.ceil(n+t.item.vertical/2),"fitItems"!==this.heightMode&&(e=Math.max(e,this.props.label.height))}else e=this.props.label.height;return e}show(){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)}hide(){const t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);const e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);const i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);const o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)}add(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()),!_x(e=this.visibleItems).call(e,t)){const e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}}_addToSubgroup(t){let 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);const 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)}_updateSubgroupsSizes(){const t=this;if(t.subgroups)for(const i in t.subgroups){var e;if(!Object.prototype.hasOwnProperty.call(t.subgroups,i))continue;const o=t.subgroups[i].items[0].data.end||t.subgroups[i].items[0].data.start;let n=t.subgroups[i].items[0].data.start,s=o-1;Xo(e=t.subgroups[i].items).call(e,t=>{new Date(t.data.start)<new Date(n)&&(n=t.data.start);const e=t.data.end||t.data.start;new Date(e)>new Date(s)&&(s=e)}),t.subgroups[i].start=n,t.subgroups[i].end=new Date(s-1)}}orderSubgroups(){if(void 0!==this.subgroupOrderer){const t=[];if("string"==typeof this.subgroupOrderer){for(const e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});kg(t).call(t,(t,e)=>t.sortField-e.sortField)}else if("function"==typeof this.subgroupOrderer){for(const e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&t.push(this.subgroups[e].items[0].data);kg(t).call(t,this.subgroupOrderer)}if(t.length>0)for(let e=0;e<t.length;e++)this.subgroups[t[e].subgroup].index=e}}_resetSubgroups(){for(const t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&(this.subgroups[t].visible=!1,this.subgroups[t].height=0)}remove(t){var e,i;delete this.items[t.id],t.setParent(null),this.stackDirty=!0;const o=pv(e=this.visibleItems).call(e,t);-1!=o&&Ov(i=this.visibleItems).call(i,o,1),void 0!==t.data.subgroup&&(this._removeFromSubgroup(t),this.orderSubgroups())}_removeFromSubgroup(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;if(null!=e){const n=this.subgroups[e];if(n){var i;const s=pv(i=n.items).call(i,t);var o;if(s>=0)Ov(o=n.items).call(o,s,1),n.items.length?this._updateSubgroupsSizes():delete this.subgroups[e]}}}removeFromDataSet(t){this.itemSet.removeItem(t.id)}order(){const t=km.toArray(this.items),e=[],i=[];for(let o=0;o<t.length;o++)void 0!==t[o].data.end&&i.push(t[o]),e.push(t[o]);this.orderedItems={byStart:e,byEnd:i},Ox(this.orderedItems.byStart),Ex(this.orderedItems.byEnd)}_updateItemsInRange(t,e,i){const o=[],n={};if(!this.isVisible&&void 0!==this.height&&this.groupId!=Hx){for(let t=0;t<e.length;t++){var s=e[t];s.displayed&&s.hide()}return o}const r=(i.end-i.start)/4,a=i.start-r,h=i.end+r,l=t=>{const{start:e,end:i}=t;return i<a?-1:e<=h?0:1};if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],o,n,i);const c=km.binarySearchCustom(t.byStart,t=>t<a?-1:t<=h?0:1,"data","start");if(this._traceVisible(c,t.byStart,o,n,t=>t.data.start<a||t.data.start>h),1==this.checkRangedItems){this.checkRangedItems=!1;for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],o,n,i)}else{const e=km.binarySearchCustom(t.byEnd,l,"data");this._traceVisible(e,t.byEnd,o,n,t=>t.data.end<a||t.data.start>h)}this._sortVisibleItems(t.byStart,o,n);const d={};let u=0;for(let t=0;t<o.length;t++){const e=o[t];if(!e.displayed){const i=!0;d[t]=e.redraw(i),u=d[t].length}}if(u>0)for(let t=0;t<u;t++)Xo(km).call(km,d,e=>{e[t]()});for(let t=0;t<o.length;t++)o[t].repositionX();return o}_traceVisible(t,e,i,o,n){if(-1!=t){for(let s=t;s>=0;s--){let t=e[s];if(n(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===o[t.id]&&(o[t.id]=!0,i.unshift(t))}for(let s=t+1;s<e.length;s++){let t=e[s];if(n(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===o[t.id]&&(o[t.id]=!0,i.push(t))}}}_sortVisibleItems(t,e,i){e.length=0;for(let o=0;o<t.length;o++){let n=t[o];i[n.id]&&e.push(n)}}_checkIfVisible(t,e,i){t.isVisible(i)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()}_checkIfVisibleWithReference(t,e,i,o){t.isVisible(o)?void 0===i[t.id]&&(i[t.id]=!0,e.push(t)):t.displayed&&t.hide()}_updateClustersInRange(t,e,i){const o=[],n={};if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],o,n,i);for(let e=0;e<t.byStart.length;e++)this._checkIfVisibleWithReference(t.byStart[e],o,n,i);for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],o,n,i);const s={};let r=0;for(let t=0;t<o.length;t++){const e=o[t];if(!e.displayed){const i=!0;s[t]=e.redraw(i),r=s[t].length}}if(r>0)for(var a=0;a<r;a++)Xo(km).call(km,s,function(t){t[a]()});for(let t=0;t<o.length;t++)o[t].repositionX();return o}changeSubgroup(t,e,i){this._removeFromSubgroup(t,e),this._addToSubgroup(t,i),this.orderSubgroups()}dispose(){let t;for(this.hide();t=this._disposeCallbacks.pop();)t()}}class Wx extends Gx{constructor(t,e,i){super(t,e,i),this.width=0,this.height=0,this.top=0,this.left=0}redraw(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(let t=0,i=this.visibleItems.length;t<i;t++){this.visibleItems[t].repositionY(e)}return!1}show(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}}class Yx{constructor(t,e,i){var o;this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.defaultOptions={locales:xb,locale:"en"},this.options=km.extend({},this.defaultOptions,i),this.options.locales=km.extend({},xb,this.options.locales);const n=this.defaultOptions.locales[this.defaultOptions.locale];Xo(o=$c(this.options.locales)).call(o,t=>{this.options.locales[t]=km.extend({},n,this.options.locales[t])}),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=i&&i.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(t),this.editable=null,this._updateEditStatus()}select(){this.selectable&&(this.selected=!0,this.dirty=!0,this.displayed&&this.redraw())}unselect(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()}setData(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()}setSelectability(t){t&&(this.selectable=void 0===t.selectable||Boolean(t.selectable))}setParent(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t}isVisible(t){return!1}show(){return!1}hide(){return!1}redraw(){}repositionX(){}repositionY(){}_repaintDragCenter(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){var t,e;const i=this,o=document.createElement("div");o.className="vis-drag-center",o.dragCenterItem=this,this.hammerDragCenter=new Gv(o),this.hammerDragCenter.on("tap",t=>{i.parent.itemSet.body.emitter.emit("click",{event:t,item:i.id})}),this.hammerDragCenter.on("doubletap",t=>{t.stopPropagation(),i.parent.itemSet._onUpdateItem(i),i.parent.itemSet.body.emitter.emit("doubleClick",{event:t,item:i.id})}),this.hammerDragCenter.on("panstart",t=>{t.stopPropagation(),i.parent.itemSet._onDragStart(t)}),this.hammerDragCenter.on("panmove",Pi(t=i.parent.itemSet._onDrag).call(t,i.parent.itemSet)),this.hammerDragCenter.on("panend",Pi(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(o,this.dom.dragLeft):this.dom.box.appendChild(o):this.dom.point&&this.dom.point.appendChild(o),this.dom.dragCenter=o}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))}_repaintDeleteButton(t){const 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){const e=this,i=document.createElement("div");this.options.rtl?i.className="vis-delete-rtl":i.className="vis-delete";let 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),i.title=o.deleteSelected,this.hammerDeleteButton=new Gv(i).on("tap",t=>{t.stopPropagation(),e.parent.removeFromDataSet(e)}),t.appendChild(i),this.dom.deleteButton=i}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))}_repaintOnItemUpdateTimeTooltip(t){if(!this.options.tooltipOnItemUpdateTime)return;const e=(this.options.editable.updateTime||!0===this.data.editable)&&!1!==this.data.editable;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){const e=document.createElement("div");e.className="vis-onUpdateTime-tooltip",t.appendChild(e),this.dom.onItemUpdateTimeTooltip=e}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%";const t=50,e=this.parent.itemSet.body.domProps.scrollTop;let o;o="top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height;let n,s;var i;if(o+this.parent.top-t<-e?(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)s=Pi(i=this.options.tooltipOnItemUpdateTime.template).call(i,this),n=s(this.data);else n="start: ".concat(qo(this.data.start).format("MM/DD/YYYY hh:mm")),this.data.end&&(n+="<br> end: ".concat(qo(this.data.end).format("MM/DD/YYYY hh:mm")));this.dom.onItemUpdateTimeTooltip.innerHTML=km.xss(n)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(t){let e,i,o,n,s;const r=this._getItemData(),a=(this.dom.box||this.dom.point).getElementsByClassName("vis-item-visible-frame")[0];var h,l;this.options.visibleFrameTemplate?(s=Pi(h=this.options.visibleFrameTemplate).call(h,this),n=km.xss(s(r,a))):n="";if(a)if(n instanceof Object&&!(n instanceof Element))s(r,a);else if(i=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(n),i){if(n instanceof Element)a.innerHTML="",a.appendChild(n);else if(null!=n)a.innerHTML=km.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?(o=Pi(l=this.options.template).call(l,this),e=o(r,t,this.data)):e=this.data.content;if(e instanceof Object&&!(e instanceof Element))o(r,t);else if(i=this._contentToString(this.content)!==this._contentToString(e),i){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(null!=e)t.innerHTML=km.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}}_updateDataAttributes(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){let e=[];if(vi(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=$c(this.data)}for(const i of e){const e=this.data[i];null!=e?t.setAttribute("data-".concat(i),e):t.removeAttribute("data-".concat(i))}}}_updateStyle(t){this.style&&(km.removeCssText(t,this.style),this.style=null),this.data.style&&(km.addCssText(t,this.data.style),this.style=this.data.style)}_contentToString(t){return"string"==typeof t?t:t&&"outerHTML"in t?t.outerHTML:t}_updateEditStatus(){this.options&&("boolean"==typeof this.options.editable?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:"object"==typeof this.options.editable&&(this.editable={},km.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"==typeof this.data.editable&&(this.editable={},km.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)))}getWidthLeft(){return 0}getWidthRight(){return 0}getTitle(){if(this.options.tooltip&&this.options.tooltip.template){var t;return Pi(t=this.options.tooltip.template).call(t,this)(this._getItemData(),this.data)}return this.data.title}}Yx.prototype.stack=!0;class Vx extends Yx{constructor(t,e,i){if(super(t,e,i),this.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))}isVisible(t){if(this.cluster)return!1;let e;const i=this.data.align||this.options.align,o=this.width*t.getMillisecondsPerPixel();return e="right"==i?this.data.start.getTime()>t.start&&this.data.start.getTime()-o<t.end:"left"==i?this.data.start.getTime()+o>t.start&&this.data.start.getTime()<t.end:this.data.start.getTime()+o/2>t.start&&this.data.start.getTime()-o/2<t.end,e}_createDomElement(){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)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const 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 t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){const e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const 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)}}_getDomComponentsSizes(){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}}}_updateDomComponentsSizes(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}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)}redraw(t){var e,i,o,n;let s;const r=[Pi(e=this._createDomElement).call(e,this),Pi(i=this._appendDomElement).call(i,this),Pi(o=this._updateDirtyDomComponents).call(o,this),()=>{this.dirty&&(s=this._getDomComponentsSizes())},()=>{var t;this.dirty&&Pi(t=this._updateDomComponentsSizes).call(t,this)(s)},Pi(n=this._repaintDomAdditionals).call(n,this)];if(t)return r;{let t;return Xo(r).call(r,e=>{t=e()}),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const 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}}repositionXY(){const t=this.options.rtl,e=function(t,e,i){var o;if(void 0===e&&void 0===i)return;const n=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?-1*e:e;t.style.transform=void 0!==i?void 0!==e?Zm(o="translate(".concat(n,"px, ")).call(o,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(n,"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)}repositionX(){const t=this.conversion.toScreen(this.data.start),e=void 0===this.data.align?this.options.align:this.data.align,i=this.props.line.width,o=this.props.dot.width;"right"==e?(this.boxX=t-this.width,this.lineX=t-i,this.dotX=t-i/2-o/2):"left"==e?(this.boxX=t,this.lineX=t,this.dotX=t+i/2-o/2):(this.boxX=t-this.width/2,this.lineX=this.options.rtl?t-i:t-i/2,this.dotX=t-o/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}repositionY(){const t=this.options.orientation.item,e=this.dom.line.style;if("top"==t){const t=this.parent.top+this.top+1;this.boxY=this.top||0,e.height="".concat(t,"px"),e.bottom="",e.top="0"}else{const t=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(t,"px"),e.top="",e.bottom="0"}this.dotY=-this.props.dot.height/2,this.repositionXY()}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}}class Ux extends Yx{constructor(t,e,i){if(super(t,e,i),this.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))}isVisible(t){if(this.cluster)return!1;const e=this.width*t.getMillisecondsPerPixel();return this.data.start.getTime()+e>t.start&&this.data.start<t.end}_createDomElement(){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)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.point.parentNode){const 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}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);const 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)}}_getDomComponentsSizes(){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}}}_updateDomComponentsSizes(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");const 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}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)}redraw(t){var e,i,o,n;let s;const r=[Pi(e=this._createDomElement).call(e,this),Pi(i=this._appendDomElement).call(i,this),Pi(o=this._updateDirtyDomComponents).call(o,this),()=>{this.dirty&&(s=this._getDomComponentsSizes())},()=>{var t;this.dirty&&Pi(t=this._updateDomComponentsSizes).call(t,this)(s)},Pi(n=this._repaintDomAdditionals).call(n,this)];if(t)return r;{let t;return Xo(r).call(r,e=>{t=e()}),t}}repositionXY(){const t=this.options.rtl;!function(t,e,i){var o;if(void 0===e&&void 0===i)return;const n=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?-1*e:e;t.style.transform=void 0!==i?void 0!==e?Zm(o="translate(".concat(n,"px, ")).call(o,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(n,"px)")}(this.dom.point,this.pointX,this.pointY,t)}show(t){if(!this.displayed)return this.redraw(t)}hide(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)}repositionX(){const 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()}repositionY(){const t=this.options.orientation.item;this.pointY="top"==t?this.top:this.parent.height-this.top-this.height,this.repositionXY()}getWidthLeft(){return this.props.dot.width}getWidthRight(){return this.props.dot.width}}class Xx extends Yx{constructor(t,e,i){if(super(t,e,i),this.props={content:{width:0}},this.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))}}isVisible(t){return!this.cluster&&(this.data.start<t.end&&this.data.end>t.start)}_createDomElement(){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)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const 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}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const 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"}}_getDomComponentsSizes(){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}}}_updateDomComponentsSizes(t){this.props.content.width=t.content.width,this.height=t.box.height,this.dom.content.style.maxWidth="",this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}redraw(t){var e,i,o,n;let s;const r=[Pi(e=this._createDomElement).call(e,this),Pi(i=this._appendDomElement).call(i,this),Pi(o=this._updateDirtyDomComponents).call(o,this),()=>{var t;this.dirty&&(s=Pi(t=this._getDomComponentsSizes).call(t,this)())},()=>{var t;this.dirty&&Pi(t=this._updateDomComponentsSizes).call(t,this)(s)},Pi(n=this._repaintDomAdditionals).call(n,this)];if(t)return r;{let t;return Xo(r).call(r,e=>{t=e()}),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}}repositionX(t){const e=this.parent.width;let i=this.conversion.toScreen(this.data.start),o=this.conversion.toScreen(this.data.end);const n=void 0===this.data.align?this.options.align:this.data.align;let s,r;!1===this.data.limitSize||void 0!==t&&!0!==t||(i<-e&&(i=-e),o>2*e&&(o=2*e));const a=Math.max(Math.round(1e3*(o-i))/1e3,1);switch(this.overflow?(this.options.rtl?this.right=i:this.left=i,this.width=a+this.props.content.width,r=this.props.content.width):(this.options.rtl?this.right=i:this.left=i,this.width=a,r=Math.min(o-i,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),n){case"left":this.dom.content.style.transform="translateX(0)";break;case"right":if(this.options.rtl){const t=-1*Math.max(a-r,0);this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max(a-r,0),"px)");break;case"center":if(this.options.rtl){const t=-1*Math.max((a-r)/2,0);this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max((a-r)/2,0),"px)");break;default:if(s=this.overflow?o>0?Math.max(-i,0):-r:i<0?-i:0,this.options.rtl){const t=-1*s;this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(s,"px)")}}repositionY(){const 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")}_repaintDragLeft(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){const 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)}_repaintDragRight(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){const 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)}}Xx.prototype.baseClassName="vis-item vis-range";class qx extends Yx{constructor(t,e,i){if(super(t,e,i),this.props={content:{width:0}},this.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))}}isVisible(t){return this.data.start<t.end&&this.data.end>t.start}_createDomElement(){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)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const 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}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);const t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+t}}_getDomComponentsSizes(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow,{content:{width:this.dom.content.offsetWidth}}}_updateDomComponentsSizes(t){this.props.content.width=t.content.width,this.height=0,this.dirty=!1}_repaintDomAdditionals(){}redraw(t){var e,i,o,n;let s;const r=[Pi(e=this._createDomElement).call(e,this),Pi(i=this._appendDomElement).call(i,this),Pi(o=this._updateDirtyDomComponents).call(o,this),()=>{var t;this.dirty&&(s=Pi(t=this._getDomComponentsSizes).call(t,this)())},()=>{var t;this.dirty&&Pi(t=this._updateDomComponentsSizes).call(t,this)(s)},Pi(n=this._repaintDomAdditionals).call(n,this)];if(t)return r;{let t;return Xo(r).call(r,e=>{t=e()}),t}}repositionY(t){let e;const i=this.options.orientation.item;if(void 0!==this.data.subgroup){const t=this.data.subgroup;this.dom.box.style.height="".concat(this.parent.subgroups[t].height,"px"),this.dom.box.style.top="".concat("top"==i?this.parent.top+this.parent.subgroups[t].top:this.parent.top+this.parent.height-this.parent.subgroups[t].top-this.parent.subgroups[t].height,"px"),this.dom.box.style.bottom=""}else this.parent instanceof Wx?(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")}}qx.prototype.baseClassName="vis-item vis-background",qx.prototype.stack=!1,qx.prototype.show=Xx.prototype.show,qx.prototype.hide=Xx.prototype.hide,qx.prototype.repositionX=Xx.prototype.repositionX;class Kx{constructor(t,e){this.container=t,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(t,e){this.x=ob(t),this.y=ob(e)}setText(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=km.xss(t)}show(t){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,o=this.frame.parentNode.clientHeight,n=this.frame.parentNode.clientWidth,s=0,r=0;if("flip"==this.overflowMethod||"none"==this.overflowMethod){let t=!1,o=!0;"flip"==this.overflowMethod&&(this.y-e<this.padding&&(o=!1),this.x+i>n-this.padding&&(t=!0)),s=t?this.x-i:this.x,r=o?this.y-e:this.y}else(r=this.y-e)+e+this.padding>o&&(r=o-e-this.padding),r<this.padding&&(r=this.padding),(s=this.x)+i+this.padding>n&&(s=n-i-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=r+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}}var $x,Zx,Jx,Qx,tC,eC,iC,oC,nC,sC={};function rC(){return Jx?Zx:(Jx=1,function(){if($x)return sC;$x=1;var t=Je(),e=Ho().every;t({target:"Array",proto:!0,forced:!Go()("every")},{every:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),Zx=_i()("Array","every"))}function aC(){if(tC)return Qx;tC=1;var t=Et(),e=rC(),i=Array.prototype;return Qx=function(o){var n=o.every;return o===i||t(i,o)&&n===i.every?e:n},Qx}function hC(){return iC?eC:(iC=1,eC=aC())}var lC=n(nC?oC:(nC=1,oC=hC()));class cC extends Yx{constructor(t,e,i){if(super(t,e,qb({},{fitOnDoubleClick:!0},i,{editable:!1})),this.props={content:{width:0,height:0}},!t||null==t.uiItems)throw new Error('Property "uiItems" missing in item '+t.id);this.id=fm(),this.group=t.group,this._setupRange(),this.emitter=this.data.eventEmitter,this.range=this.data.range,this.attached=!1,this.isCluster=!0,this.data.isCluster=!0}hasItems(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}setUiItems(t){this.detach(),this.data.uiItems=t,this._setupRange(),this.attach()}isVisible(t){const e=this.data.end?this.data.end-this.data.start:0,i=this.width*t.getMillisecondsPerPixel(),o=Math.max(this.data.start.getTime()+e,this.data.start.getTime()+i);return this.data.start<t.end&&o>t.start&&this.hasItems()}getData(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}redraw(t){var e,i,o,n,s,r,a,h,l=[Pi(e=this._createDomElement).call(e,this),Pi(i=this._appendDomElement).call(i,this),Pi(o=this._updateDirtyDomComponents).call(o,this),Pi(n=function(){this.dirty&&(a=this._getDomComponentsSizes())}).call(n,this),Pi(s=function(){var t;this.dirty&&Pi(t=this._updateDomComponentsSizes).call(t,this)(a)}).call(s,this),Pi(r=this._repaintDomAdditionals).call(r,this)];return t?l:(Xo(l).call(l,function(t){h=t()}),h)}show(){this.displayed||this.redraw()}hide(){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}}repositionX(){let 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{let e=void 0===this.data.align?this.options.align:this.data.align;this.repositionXWithoutRanges(t,e)}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))}repositionStype(t,e){this.dom.line.style.display="block",this.dom.dot.style.display="block";const i=this.dom.line.offsetWidth,o=this.dom.dot.offsetWidth;if(e){const n=i+t+(e-t)/2,s=n-o/2,r=this.options.rtl?-1*n:n,a=this.options.rtl?-1*s:s;this.dom.line.style.transform="translateX(".concat(r,"px)"),this.dom.dot.style.transform="translateX(".concat(a,"px)")}else{const e=this.options.rtl?-1*t:t,i=this.options.rtl?-1*(t-o/2):t-o/2;this.dom.line.style.transform="translateX(".concat(e,"px)"),this.dom.dot.style.transform="translateX(".concat(i,"px)")}}repositionXWithoutRanges(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")}repositionXWithRanges(t,e){let 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"}repositionY(){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,o=i-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=i-o+"px",this.dom.line.style.bottom="0"}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+"px"}}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}move(){this.repositionX(),this.repositionY()}attach(){var t;for(let t of this.data.uiItems)t.cluster=this;this.data.items=Ac(t=this.data.uiItems).call(t,t=>t.data),this.attached=!0,this.dirty=!0}detach(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.hasItems()){for(let t of this.data.uiItems)delete t.cluster;this.attached=!1,t&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}_onDoubleClick(){this._fit()}_setupRange(){var t,e,i;const o=Ac(t=this.data.uiItems).call(t,t=>({start:t.data.start.valueOf(),end:t.data.end?t.data.end.valueOf():t.data.start.valueOf()}));this.data.min=Math.min(...Ac(o).call(o,t=>Math.min(t.start,t.end||t.start))),this.data.max=Math.max(...Ac(o).call(o,t=>Math.max(t.start,t.end||t.start)));const n=Ac(e=this.data.uiItems).call(e,t=>t.center),s=Yc(n).call(n,(t,e)=>t+e,0)/this.data.uiItems.length;Lv(i=this.data.uiItems).call(i,t=>t.data.end)?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(s),this.data.end=null)}_getUiItems(){var t;return this.data.uiItems&&this.data.uiItems.length?hr(t=this.data.uiItems).call(t,t=>t.cluster===this):[]}_createDomElement(){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=Pi(t=cC.prototype._onDoubleClick).call(t,this);this.dom.box["vis-item"]=this,this.dirty=!0}}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}const t=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const 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")}}_getDomComponentsSizes(){const 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}_updateDomComponentsSizes(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}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}_isStipeVisible(){return this.minWidth>=this.width||!this.data.end}_getFitRange(){const t=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-t,fitEnd:this.data.max+t}}_fit(){if(this.emitter){const{fitStart:t,fitEnd:e}=this._getFitRange(),i={start:new Date(t),end:new Date(e),animation:!0};this.emitter.emit("fit",i)}}_getItemData(){return this.data}}cC.prototype.baseClassName="vis-item vis-range vis-cluster";const dC="__ungrouped__";class uC{constructor(t){this.itemSet=t,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(t,e,i){return new cC(t,e,i)}setItems(t,e){this.items=t||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,e&&e.applyOnChangedLevel&&(this.applyOnChangedLevel=e.applyOnChangedLevel)}updateData(){this.dataChanged=!0,this.applyOnChangedLevel=!1}getClusters(t,e,i){let{maxItems:o,clusterCriteria:n}="boolean"==typeof i?{}:i;n||(n=()=>!0),o=o||1;let s=-1,r=0;if(e>0){if(e>=1)return[];s=Math.abs(Math.round(Math.log(100/e)/Math.log(2))),r=Math.abs(Math.pow(2,s))}if(this.dataChanged){const t=s!=this.cacheLevel;(!this.applyOnChangedLevel||t)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=s;let a=this.cache[s];if(!a){a=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;const s=this.groups[e],h=s.length;let l=0;for(;l<h;){let e=s[l],h=1,c=l-1;for(;c>=0&&e.center-s[c].center<r/2;)!s[c].cluster&&n(e.data,s[c].data)&&h++,c--;let d=l+1;for(;d<s.length&&s[d].center-e.center<r/2;)n(e.data,s[d].data)&&h++,d++;let u=a.length-1;for(;u>=0&&e.center-a[u].center<r;)e.group==a[u].group&&n(e.data,a[u].data)&&h++,u--;if(h>o){const r=h-o+1,c=[];let d=l;for(;c.length<r&&d<s.length;)n(s[l].data,s[d].data)&&c.push(s[d]),d++;const u=this.itemSet.getGroupId(e.data),p=this.itemSet.groups[u]||this.itemSet.groups[dC];let m=this._getClusterForItems(c,p,t,i);a.push(m),l+=r}else delete e.cluster,l+=1}}this.cache[s]=a}return a}_filterData(){const t={};this.groups=t;for(const e of kx(this.items)){const i=e.parent?e.parent.groupId:"";let o=t[i];o||(o=[],t[i]=o),o.push(e),e.data.start&&(e.data.end?e.center=(e.data.start.valueOf()+e.data.end.valueOf())/2:e.center=e.data.start.valueOf())}for(let i in t){var e;Object.prototype.hasOwnProperty.call(t,i)&&kg(e=t[i]).call(e,(t,e)=>t.center-e.center)}this.dataChanged=!1}_getClusterForItems(t,e,i,o){var n;const s=Ac(n=i||[]).call(n,t=>{var e;return{cluster:t,itemsIds:new M_(Ac(e=t.data.uiItems).call(e,t=>t.id))}});let r;if(s.length)for(let e of s)if(e.itemsIds.size===t.length&&lC(t).call(t,t=>e.itemsIds.has(t.id))){r=e.cluster;break}if(r)return r.setUiItems(t),r.group!==e&&(r.group&&r.group.remove(r),e&&(e.add(r),r.group=e)),r;let a=o.titleTemplate||"";const h={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},l=a.replace(/{count}/,t.length),c='<div title="'+l+'">'+t.length+"</div>",d=qb({},o,this.itemSet.options),u={content:c,title:l,group:e,uiItems:t,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return r=this.createClusterItem(u,h,d),e&&(e.add(r),r.group=e),r.attach(),r}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}const pC="__ungrouped__",mC="__background__";class fC extends Lf{constructor(t,e){super(),this.body=t,this.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap(t,e,i){const o=e.order;e.order=t.order,t.order=o},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:nb.snap,onDropObjectOnItem(t,e,i){i(e)},onAdd(t,e){e(t)},onUpdate(t,e){e(t)},onMove(t,e){e(t)},onRemove(t,e){e(t)},onMoving(t,e){e(t)},onAddGroup(t,e){e(t)},onMoveGroup(t,e){e(t)},onRemoveGroup(t,e){e(t)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:500},tooltipOnItemUpdateTime:!1},this.options=km.extend({},this.defaultOptions),this.options.rtl=e.rtl,this.options.onTimeout=e.onTimeout,this.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime},this.dom={},this.props={},this.hammer=null;const i=this;this.itemsData=null,this.groupsData=null,this.itemsSettingTime=null,this.initialItemSetDrawn=!1,this.userContinueNotBail=null,this.sequentialSelection=!1,this.itemListeners={add(t,e,o){i._onAdd(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},update(t,e,o){i._onUpdate(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},remove(t,e,o){i._onRemove(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()}},this.groupListeners={add(t,e,o){if(i._onAddGroups(e.items),i.groupsData&&i.groupsData.length>0){var n;const t=i.groupsData.getDataSet();Xo(n=t.get()).call(n,e=>{if(e.nestedGroups){var i;0!=e.showNested&&(e.showNested=!0);let n=[];Xo(i=e.nestedGroups).call(i,i=>{const o=t.get(i);o&&(o.nestedInGroup=e.id,0==e.showNested&&(o.visible=!1),n=Zm(n).call(n,o))}),t.update(n,o)}})}},update(t,e,o){i._onUpdateGroups(e.items)},remove(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.popupTimer=null,this.touchParams={},this.groupTouchParams={group:null,isDragging:!1},this._create(),this.setOptions(e),this.clusters=[]}_create(){var t,e,i,o,n,s,r,a,h,l,c,d,u,p,m;const f=document.createElement("div");f.className="vis-itemset",f["vis-itemset"]=this,this.dom.frame=f;const g=document.createElement("div");g.className="vis-background",f.appendChild(g),this.dom.background=g;const v=document.createElement("div");v.className="vis-foreground",f.appendChild(v),this.dom.foreground=v;const b=document.createElement("div");b.className="vis-axis",this.dom.axis=b;const y=document.createElement("div");y.className="vis-labelset",this.dom.labelSet=y,this._updateUngrouped();const w=new Wx(mC,null,this);w.show(),this.groups[mC]=w,this.hammer=new Gv(this.body.dom.centerContainer),this.hammer.on("hammer.input",t=>{t.isFirst&&this._onTouch(t)}),this.hammer.on("panstart",Pi(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",Pi(e=this._onDrag).call(e,this)),this.hammer.on("panend",Pi(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:Gv.ALL}),this.hammer.get("press").set({time:1e4}),this.hammer.on("tap",Pi(o=this._onSelectItem).call(o,this)),this.hammer.on("press",Pi(n=this._onMultiSelectItem).call(n,this)),this.hammer.get("press").set({time:1e4}),this.hammer.on("doubletap",Pi(s=this._onAddItem).call(s,this)),this.options.rtl?this.groupHammer=new Gv(this.body.dom.rightContainer):this.groupHammer=new Gv(this.body.dom.leftContainer),this.groupHammer.on("tap",Pi(r=this._onGroupClick).call(r,this)),this.groupHammer.on("panstart",Pi(a=this._onGroupDragStart).call(a,this)),this.groupHammer.on("panmove",Pi(h=this._onGroupDrag).call(h,this)),this.groupHammer.on("panend",Pi(l=this._onGroupDragEnd).call(l,this)),this.groupHammer.get("pan").set({threshold:5,direction:Gv.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",Pi(c=this._onMouseOver).call(c,this)),this.body.dom.centerContainer.addEventListener("mouseout",Pi(d=this._onMouseOut).call(d,this)),this.body.dom.centerContainer.addEventListener("mousemove",Pi(u=this._onMouseMove).call(u,this)),this.body.dom.centerContainer.addEventListener("contextmenu",Pi(p=this._onDragEnd).call(p,this)),this.body.dom.centerContainer.addEventListener("mousewheel",Pi(m=this._onMouseWheel).call(m,this)),this.show()}setOptions(t){if(t){var e,i;const o=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"];km.selectiveExtend(o,this.options,t),"itemsAlwaysDraggable"in t&&("boolean"==typeof t.itemsAlwaysDraggable?(this.options.itemsAlwaysDraggable.item=t.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):"object"==typeof t.itemsAlwaysDraggable&&(km.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"==typeof 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"==typeof t.margin&&(km.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"==typeof t.margin.item&&km.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),Xo(e=["locale","locales"]).call(e,e=>{e in t&&(this.options[e]=t[e])}),"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"==typeof t.editable&&km.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"==typeof t.groupEditable&&km.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));const n=e=>{const i=t[e];if(i){var o;if("function"!=typeof i)throw new Error(Zm(o="option ".concat(e," must be a function ")).call(o,e,"(item, callback)"));this.options[e]=i}};Xo(i=["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"]).call(i,n),t.cluster?(qb(this.options,{cluster:t.cluster}),this.clusterGenerator||(this.clusterGenerator=new uC(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()}}markDirty(t){this.groupIds=[],t&&(t.refreshItems&&Xo(km).call(km,this.items,t=>{t.dirty=!0,t.displayed&&t.redraw()}),t.restackGroups&&Xo(km).call(km,this.groups,(t,e)=>{e!==mC&&(t.stackDirty=!0)}))}destroy(){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}hide(){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)}show(){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))}setPopupTimer(t){if(this.clearPopupTimer(),t){const e=this.options.tooltip.delay||"number"==typeof this.options.tooltip.delay?this.options.tooltip.delay:500;this.popupTimer=Zi(function(){t.show()},e)}}clearPopupTimer(){null!=this.popupTimer&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(t){var e;null==t&&(t=[]),vi(t)||(t=[t]);const i=hr(e=this.selection).call(e,e=>-1===pv(t).call(t,e));for(let t of i){const e=this.getItemById(t);e&&e.unselect()}this.selection=[...t];for(let e of t){const t=this.getItemById(e);t&&t.select()}}getSelection(){var t;return Zm(t=this.selection).call(t,[])}getVisibleItems(){const t=this.body.range.getRange();let e,i;this.options.rtl?(e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end)):(i=this.body.util.toScreen(t.start),e=this.body.util.toScreen(t.end));const o=[];for(const t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;const n=this.groups[t],s=n.isVisible?n.visibleItems:[];for(const t of s)this.options.rtl?t.right<i&&t.right+t.width>e&&o.push(t.id):t.left<e&&t.left+t.width>i&&o.push(t.id)}return o}getItemsAtCurrentTime(t){let 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));const o=[];for(const t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;const n=this.groups[t],s=n.isVisible?n.visibleItems:[];for(const t of s)this.options.rtl?t.right<i&&t.right+t.width>e&&o.push(t.id):t.left<e&&t.left+t.width>i&&o.push(t.id)}return o}getVisibleGroups(){const t=[];for(const e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;this.groups[e].isVisible&&t.push(e)}return t}getItemById(t){var e;return this.items[t]||ry(e=this.clusters).call(e,e=>e.id===t)}_deselect(t){const e=this.selection;for(let i=0,o=e.length;i<o;i++)if(e[i]==t){Ov(e).call(e,i,1);break}}redraw(){const t=this.options.margin,e=this.body.range,i=km.option.asSize,o=this.options,n=o.orientation.item;let s=!1;const r=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,r.className="vis-itemset",this.options.cluster&&this._clusterItems(),s=this._orderGroups()||s;const a=e.end-e.start,h=a!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,l=e.start!=this.lastRangeStart,c=o.stack!=this.lastStack,d=o.stackSubgroups!=this.lastStackSubgroups,u=h||l||c||d;this.lastVisibleInterval=a,this.lastRangeStart=e.start,this.lastStack=o.stack,this.lastStackSubgroups=o.stackSubgroups,this.props.lastWidth=this.props.width;const p=this._firstGroup(),m={item:t.item,axis:t.axis},f={item:t.item,axis:t.item.vertical/2};let g=0;const v=t.axis+t.item.vertical;this.groups[mC].redraw(e,f,u);const b={};let y=0;Xo(km).call(km,this.groups,(t,i)=>{if(i===mC)return;const o=t==p?m:f;b[i]=t.redraw(e,o,u,!0),y=b[i].length});if(y>0){const t={};for(let e=0;e<y;e++)Xo(km).call(km,b,(i,o)=>{t[o]=i[e]()});Xo(km).call(km,this.groups,(e,i)=>{if(i===mC)return;const o=t[i];s=o||s,g+=e.height}),g=Math.max(g,v)}return g=Math.max(g,v),r.style.height=i(g),this.props.width=r.offsetWidth,this.props.height=g,this.dom.axis.style.top=i("top"==n?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,s}_firstGroup(){const t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[pC]||null}_updateUngrouped(){let t,e,i=this.groups[pC];if(this.groupsData){if(i)for(e in i.dispose(),delete this.groups[pC],this.items){if(!Object.prototype.hasOwnProperty.call(this.items,e))continue;t=this.items[e],t.parent&&t.parent.remove(t);const i=this.getGroupId(t.data),o=this.groups[i];o&&o.add(t)||t.hide()}}else if(!i){const o=null,n=null;for(e in i=new Gx(o,n,this),this.groups[pC]=i,this.items)Object.prototype.hasOwnProperty.call(this.items,e)&&(t=this.items[e],i.add(t));i.show()}}getLabelSet(){return this.dom.labelSet}setItems(t){this.itemsSettingTime=new Date;const e=this;let i;const o=this.itemsData;if(t){if(!bm(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=xm(t)}else this.itemsData=null;if(o&&(Xo(km).call(km,this.itemListeners,(t,e)=>{o.off(e,t)}),o.dispose(),i=o.getIds(),this._onRemove(i)),this.itemsData){const t=this.id;Xo(km).call(km,this.itemListeners,(i,o)=>{e.itemsData.on(o,i,t)}),i=this.itemsData.getIds(),this._onAdd(i),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})}getItems(){return null!=this.itemsData?this.itemsData.rawDS:null}setGroups(t){const e=this;let i;if(this.groupsData&&(Xo(km).call(km,this.groupListeners,(t,i)=>{e.groupsData.off(i,t)}),i=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(i)),t){if(!bm(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;const t=this.groupsData.getDataSet();Xo(o=t.get()).call(o,e=>{var i;e.nestedGroups&&Xo(i=e.nestedGroups).call(i,i=>{const o=t.get(i);o.nestedInGroup=e.id,0==e.showNested&&(o.visible=!1),t.update(o)})});const n=this.id;Xo(km).call(km,this.groupListeners,(t,i)=>{e.groupsData.on(i,t,n)}),i=this.groupsData.getIds(),this._onAddGroups(i)}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})}getGroups(){return this.groupsData}removeItem(t){const e=this.itemsData.get(t);e&&this.options.onRemove(e,e=>{e&&this.itemsData.remove(t)})}_getType(t){return t.type||this.options.type||(t.end?"range":"box")}getGroupId(t){return"background"==this._getType(t)&&null==t.group?mC:this.groupsData?t.group:pC}_onUpdate(t){const e=this;Xo(t).call(t,t=>{const i=e.itemsData.get(t);let o=e.items[t];const n=i?e._getType(i):null,s=fC.types[n];let r;if(o&&(s&&o instanceof s?e._updateItem(o,i):(r=o.selected,e._removeItem(o),o=null)),!o&&i){if(!s)throw new TypeError('Unknown item type "'.concat(n,'"'));o=new s(i,e.conversion,e.options),o.id=t,e._addItem(o),r&&(this.selection.push(t),o.select())}}),this._order(),this.options.cluster&&(this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this._clusterItems()),this.body.emitter.emit("_change",{queue:!0})}_onRemove(t){let e=0;const i=this;Xo(t).call(t,t=>{const o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))}_order(){Xo(km).call(km,this.groups,t=>{t.order()})}_onUpdateGroups(t){this._onAddGroups(t)}_onAddGroups(t){const e=this;Xo(t).call(t,t=>{const i=e.groupsData.get(t);let o=e.groups[t];if(o)o.setData(i);else{if(t==pC||t==mC)throw new Error("Illegal group id. ".concat(t," is a reserved id."));const n=jy(e.options);km.extend(n,{height:null}),o=new Gx(t,i,e),e.groups[t]=o;for(const i in e.items){if(!Object.prototype.hasOwnProperty.call(e.items,i))continue;const n=e.items[i];n.data.group==t&&o.add(n)}o.order(),o.show()}}),this.body.emitter.emit("_change",{queue:!0})}_onRemoveGroups(t){Xo(t).call(t,t=>{const e=this.groups[t];e&&(e.dispose(),delete this.groups[t])}),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems()),this.markDirty({restackGroups:!!this.options.cluster}),this.body.emitter.emit("_change",{queue:!0})}_orderGroups(){if(this.groupsData){let t=this.groupsData.getIds({order:this.options.groupOrder});t=this._orderNestedGroups(t);const e=!km.equalArray(t,this.groupIds);if(e){const e=this.groups;Xo(t).call(t,t=>{e[t].hide()}),Xo(t).call(t,t=>{e[t].show()}),this.groupIds=t}return e}return!1}_orderNestedGroups(t){return function t(e,i){let o=[];return Xo(i).call(i,i=>{o.push(i);if(e.groupsData.get(i).nestedGroups){var n;const s=Ac(n=e.groupsData.get({filter:t=>t.nestedInGroup==i,order:e.options.groupOrder})).call(n,t=>t.id);o=Zm(o).call(o,t(e,s))}}),o}(this,hr(t).call(t,t=>!this.groupsData.get(t).nestedInGroup))}_addItem(t){this.items[t.id]=t;const 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)}_updateItem(t,e){t.setData(e);const i=this.getGroupId(t.data),o=this.groups[i];o?o&&o.data&&o.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1}_removeItem(t){var e,i;t.hide(),delete this.items[t.id];const o=pv(e=this.selection).call(e,t.id);-1!=o&&Ov(i=this.selection).call(i,o,1),t.parent&&t.parent.remove(t),null!=this.popup&&this.popup.hide()}_constructByEndArray(t){const e=[];for(let i=0;i<t.length;i++)t[i]instanceof Xx&&e.push(t[i]);return e}_onTouch(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}_getGroupIndex(t){for(let e=0;e<this.groupIds.length;e++)if(t==this.groupIds[e])return e}_onDragStart(t){if(this.touchParams.itemIsDragging)return;const e=this.touchParams.item||null,i=this;let o;if(e&&(e.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;if(null!=e.editable&&!e.editable.updateTime&&!e.editable.updateGroup&&!this.options.editable.overrideItems)return;const n=this.touchParams.dragLeftItem,s=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=e,n)o={item:n,initialX:t.center.x,dragLeft:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[o];else if(s)o={item:s,initialX:t.center.x,dragRight:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[o];else if(this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey))this._onDragStartAddItem(t);else{this.groupIds.length<1&&this.redraw();const o=this._getGroupIndex(e.data.group),n=this.options.itemsAlwaysDraggable.item&&!e.selected?[e.id]:this.getSelection();this.touchParams.itemProps=Ac(n).call(n,e=>{const n=i.items[e],s=i._getGroupIndex(n.data.group);return{item:n,initialX:t.center.x,groupOffset:o-s,data:this._cloneItemData(n.data)}})}t.stopPropagation()}else this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey)&&this._onDragStartAddItem(t)}_onDragStartAddItem(t){const e=this.options.snap||null,i=this.dom.frame.getBoundingClientRect(),o=this.options.rtl?i.right-t.center.x+10:t.center.x-i.left-10,n=this.body.util.toTime(o),s=this.body.util.getScale(),r=this.body.util.getStep(),a=e?e(n,s,r):n,h={type:"range",start:a,end:a,content:"new item"},l=fm();h[this.itemsData.idProp]=l;const c=this.groupFromTarget(t);c&&(h.group=c.groupId);const d=new Xx(h,this.conversion,this.options);d.id=l,d.data=this._cloneItemData(h),this._addItem(d),this.touchParams.selectedItem=d;const u={item:d,initialX:t.center.x,data:d.data};this.options.rtl?u.dragLeft=!0:u.dragRight=!0,this.touchParams.itemProps=[u],t.stopPropagation()}_onDrag(t){if(null!=this.popup&&this.options.showTooltips&&!this.popup.hidden){const e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.center.x-i.left+e.offsetLeft,t.center.y-i.top+e.offsetTop),this.popup.show()}if(this.touchParams.itemProps){var e;t.stopPropagation();const i=this,o=this.options.snap||null,n=this.body.dom.root.offsetLeft,s=this.options.rtl?n+this.body.domProps.right.width:n+this.body.domProps.left.width,r=this.body.util.getScale(),a=this.body.util.getStep(),h=this.touchParams.selectedItem,l=(this.options.editable.overrideItems||null==h.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=h.editable&&h.editable.updateGroup;let c=null;if(l&&h&&null!=h.data.group){const e=i.groupFromTarget(t);e&&(c=this._getGroupIndex(e.groupId))}Xo(e=this.touchParams.itemProps).call(e,e=>{const n=i.body.util.toTime(t.center.x-s),d=i.body.util.toTime(e.initialX-s);let u,p,m,f,g;u=this.options.rtl?-(n-d):n-d;let v=this._cloneItemData(e.item.data);if(null!=e.item.editable&&!e.item.editable.updateTime&&!e.item.editable.updateGroup&&!i.options.editable.overrideItems)return;if((this.options.editable.overrideItems||null==h.editable)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&null!=h.editable&&h.editable.updateTime)if(e.dragLeft)this.options.rtl?null!=v.end&&(m=km.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=o?o(g,r,a):g):null!=v.start&&(p=km.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=o?o(f,r,a):f);else if(e.dragRight)this.options.rtl?null!=v.start&&(p=km.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=o?o(f,r,a):f):null!=v.end&&(m=km.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=o?o(g,r,a):g);else if(null!=v.start)if(p=km.convert(e.data.start,"Date").valueOf(),f=new Date(p+u),null!=v.end){m=km.convert(e.data.end,"Date");const t=m.valueOf()-p.valueOf();v.start=o?o(f,r,a):f,v.end=new Date(v.start.valueOf()+t)}else v.start=o?o(f,r,a):f;if(l&&!e.dragLeft&&!e.dragRight&&null!=c&&null!=v.group){let t=c-e.groupOffset;t=Math.max(0,t),t=Math.min(i.groupIds.length-1,t),v.group=i.groupIds[t]}v=this._cloneItemData(v),i.options.onMoving(v,t=>{t&&e.item.setData(this._cloneItemData(t,"Date"))})}),this.body.emitter.emit("_change")}}_moveToGroup(t,e){const i=this.groups[e];if(i&&i.groupId!=t.data.group){const e=t.parent;e.remove(t),e.order(),t.data.group=i.groupId,i.add(t),i.order()}}_onDragEnd(t){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){t.stopPropagation();const e=this,i=this.touchParams.itemProps;this.touchParams.itemProps=null,Xo(i).call(i,t=>{const i=t.item.id;if(null!=e.itemsData.get(i)){const o=this._cloneItemData(t.item.data);e.options.onMove(o,o=>{o?(o[this.itemsData.idProp]=i,this.itemsData.update(o)):(t.item.setData(t.data),e.body.emitter.emit("_change"))})}else e.options.onAdd(t.item.data,i=>{e._removeItem(t.item),i&&e.itemsData.add(i),e.body.emitter.emit("_change")})})}}_onGroupClick(t){const e=this.groupFromTarget(t);Zi(()=>{this.toggleGroupShowNested(e)},1)}toggleGroupShowNested(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!t||!t.nestedGroups)return;const i=this.groupsData.getDataSet();t.showNested=null!=e?!!e:!t.showNested;let o=i.get(t.groupId);o.showNested=t.showNested;let n=t.nestedGroups,s=n;for(;s.length>0;){let t=s;s=[];for(let e=0;e<t.length;e++){let o=i.get(t[e]);o.nestedGroups&&(s=Zm(s).call(s,o.nestedGroups))}s.length>0&&(n=Zm(n).call(n,s))}var r;if(o.showNested){var a=i.get(o.nestedGroups);for(let t=0;t<a.length;t++){let e=a[t];e.nestedGroups&&e.nestedGroups.length>0&&(null==e.showNested||1==e.showNested)&&a.push(...i.get(e.nestedGroups))}r=Ac(a).call(a,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!o.showNested,t})}else{var h;r=Ac(h=i.get(n)).call(h,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!o.showNested,t})}i.update(Zm(r).call(r,o)),o.showNested?(km.removeClassName(t.dom.label,"collapsed"),km.addClassName(t.dom.label,"expanded")):(km.removeClassName(t.dom.label,"expanded"),km.addClassName(t.dom.label,"collapsed"))}toggleGroupDragClassName(t){t.dom.label.classList.toggle("vis-group-is-dragging"),t.dom.foreground.classList.toggle("vis-group-is-dragging")}_onGroupDragStart(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})))}_onGroupDrag(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this.groupsData.getDataSet(),i=this.groupFromTarget(t);if(i&&i.height!=this.groupTouchParams.group.height){const e=i.top<this.groupTouchParams.group.top,o=t.center?t.center.y:t.clientY,n=i.dom.foreground.getBoundingClientRect(),s=this.groupTouchParams.group.height;if(e){if(n.top+s<o)return}else{const t=i.height;if(n.top+t-s>o)return}}if(i&&i!=this.groupTouchParams.group){const t=e.get(i.groupId),o=e.get(this.groupTouchParams.group.groupId);o&&t&&(this.options.groupOrderSwap(o,t,e),e.update(o),e.update(t));const n=e.getIds({order:this.options.groupOrder});if(!km.equalArray(n,this.groupTouchParams.originalOrder)){const t=this.groupTouchParams.originalOrder,i=this.groupTouchParams.group.groupId,o=Math.min(t.length,n.length);let s=0,r=0,a=0;for(;s<o;){for(;s+r<o&&s+a<o&&n[s+r]==t[s+a];)s++;if(s+r>=o)break;if(n[s+r]==i)r=1;else if(t[s+a]==i)a=1;else{const i=pv(n).call(n,t[s+a]),o=e.get(n[s+r]),h=e.get(t[s+a]);this.options.groupOrderSwap(o,h,e),e.update(o),e.update(h);const l=n[s+r];n[s+r]=t[s+a],n[i]=l,s++}}}}}}_onGroupDragEnd(t){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=km.extend({},o.get(i));e.options.onMoveGroup(n,t=>{if(t)t[o._idProp]=i,o.update(t);else{const t=o.getIds({order:e.options.groupOrder});if(!km.equalArray(t,e.groupTouchParams.originalOrder)){const i=e.groupTouchParams.originalOrder,n=Math.min(i.length,t.length);let s=0;for(;s<n;){for(;s<n&&t[s]==i[s];)s++;if(s>=n)break;const r=pv(t).call(t,i[s]),a=o.get(t[s]),h=o.get(i[s]);e.options.groupOrderSwap(a,h,o),o.update(a),o.update(h);const l=t[s];t[s]=i[s],t[r]=l,s++}}}}),e.body.emitter.emit("groupDragged",{groupId:i}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}_onSelectItem(t){if(!this.options.selectable)return;const e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);const o=this.getSelection(),n=this.itemFromTarget(t),s=n&&n.selectable?[n.id]:[];this.setSelection(s);const r=this.getSelection();(r.length>0||o.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}_onMouseOver(t){const e=this.itemFromTarget(t);if(!e)return;if(e===this.itemFromRelatedTarget(t))return;const i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new Kx(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);const e=this.body.dom.centerContainer,o=e.getBoundingClientRect();this.popup.setPosition(t.clientX-o.left+e.offsetLeft,t.clientY-o.top+e.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}_onMouseOut(t){const e=this.itemFromTarget(t);if(!e)return;e!==this.itemFromRelatedTarget(t)&&(this.clearPopupTimer(),null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t}))}_onMouseMove(t){if(this.itemFromTarget(t)&&(null!=this.popupTimer&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){const 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()}}_onMouseWheel(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)}_onUpdateItem(t){if(!this.options.selectable)return;if(!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;const e=this;if(t){const i=e.itemsData.get(t.id);this.options.onUpdate(i,t=>{t&&e.itemsData.update(t)})}}_onDropObjectOnItem(t){const e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)}_onAddItem(t){if(!this.options.selectable)return;if(!this.options.editable.add)return;const e=this,i=this.options.snap||null,o=this.dom.frame.getBoundingClientRect(),n=this.options.rtl?o.right-t.center.x:t.center.x-o.left,s=this.body.util.toTime(n),r=this.body.util.getScale(),a=this.body.util.getStep();let h,l;"drop"==t.type?(l=JSON.parse(t.dataTransfer.getData("text")),l.content=l.content?l.content:"new item",l.start=l.start?l.start:i?i(s,r,a):s,l.type=l.type||"box",l[this.itemsData.idProp]=l.id||fm(),"range"!=l.type||l.end||(h=this.body.util.toTime(n+this.props.width/5),l.end=i?i(h,r,a):h)):(l={start:i?i(s,r,a):s,content:"new item"},l[this.itemsData.idProp]=fm(),"range"===this.options.type&&(h=this.body.util.toTime(n+this.props.width/5),l.end=i?i(h,r,a):h));const c=this.groupFromTarget(t);c&&(l.group=c.groupId),l=this._cloneItemData(l),this.options.onAdd(l,i=>{i&&(e.itemsData.add(i),"drop"==t.type&&e.setSelection([i.id]))})}_onMultiSelectItem(t){if(!this.options.selectable)return;const e=this.itemFromTarget(t);if(e){let i=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||!1||this.options.sequentialSelection)&&this.options.multiselect){const t=this.itemsData.get(e.id).group;let o;this.options.multiselectPerGroup&&i.length>0&&(o=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&null!=o&&o!=t||i.push(e.id);const n=fC._getItemRange(this.itemsData.get(i));if(!this.options.multiselectPerGroup||o==t){i=[];for(const t in this.items){if(!Object.prototype.hasOwnProperty.call(this.items,t))continue;const e=this.items[t],s=e.data.start,r=void 0!==e.data.end?e.data.end:s;!(s>=n.min&&r<=n.max)||this.options.multiselectPerGroup&&o!=this.itemsData.get(e.id).group||e instanceof qx||i.push(e.id)}}}else{const t=pv(i).call(i,e.id);-1==t?i.push(e.id):Ov(i).call(i,t,1)}const o=hr(i).call(i,t=>this.getItemById(t).selectable);this.setSelection(o),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}static _getItemRange(t){let e=null,i=null;return Xo(t).call(t,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}}itemFromElement(t){let e=t;for(;e;){if(Object.prototype.hasOwnProperty.call(e,"vis-item"))return e["vis-item"];e=e.parentNode}return null}itemFromTarget(t){return this.itemFromElement(t.target)}itemFromRelatedTarget(t){return this.itemFromElement(t.relatedTarget)}groupFromTarget(t){const e=t.center?t.center.y:t.clientY;let i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(let t=0;t<i.length;t++){const o=i[t],n=this.groups[o],s=n.dom.foreground,r=s.getBoundingClientRect();if(e>=r.top&&e<r.top+s.offsetHeight)return n;if("top"===this.options.orientation.item){if(t===this.groupIds.length-1&&e>r.top)return n}else if(0===t&&e<r.top+s.offset)return n}return null}static itemSetFromTarget(t){let e=t.target;for(;e;){if(Object.prototype.hasOwnProperty.call(e,"vis-itemset"))return e["vis-itemset"];e=e.parentNode}return null}_cloneItemData(t,e){const i=km.extend({},t);return e||(e=this.itemsData.type),null!=i.start&&(i.start=km.convert(i.start,e&&e.start||"Date")),null!=i.end&&(i.end=km.convert(i.end,e&&e.end||"Date")),i}_clusterItems(){if(!this.options.cluster)return;const{scale:t}=this.body.range.conversion(this.body.domProps.center.width),e=this.clusterGenerator.getClusters(this.clusters,t,this.options.cluster);if(this.clusters!=e){if(this._detachAllClusters(),e){for(let t of e)t.attach();this.clusters=e}this._updateClusters(e)}}_detachAllClusters(){if(this.options.cluster&&this.clusters&&this.clusters.length)for(let t of this.clusters)t.detach()}_updateClusters(t){if(this.clusters&&this.clusters.length){var e;const n=new M_(Ac(t).call(t,t=>t.id)),s=hr(e=this.clusters).call(e,t=>!n.has(t.id));let r=!1;for(let t of s){var i;const e=pv(i=this.selection).call(i,t.id);var o;if(-1!==e)t.unselect(),Ov(o=this.selection).call(o,e,1),r=!0}if(r){const t=this.getSelection();this.body.emitter.emit("select",{items:t,event:event})}}this.clusters=t||[]}}fC.types={background:qx,box:Vx,range:Xx,point:Ux},fC.prototype._onAdd=fC.prototype._onUpdate;let gC,vC=!1,bC="background: #FFeeee; color: #dd0000";class yC{constructor(){}static validate(t,e,i){vC=!1,gC=e;let o=e;return void 0!==i&&(o=e[i]),yC.parse(t,o,[]),vC}static parse(t,e,i){for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&yC.check(o,t,e,i)}static check(t,e,i,o){if(void 0===i[t]&&void 0===i.__any__)return void yC.getSuggestion(t,i,o);let n=t,s=!0;void 0===i[t]&&void 0!==i.__any__&&(n="__any__",s="object"===yC.getType(e[t]));let r=i[n];s&&void 0!==r.__type__&&(r=r.__type__),yC.checkFields(t,e,i,n,r,o)}static checkFields(t,e,i,o,n,s){let r=function(e){console.log("%c"+e+yC.printLocation(s,t),bC)},a=yC.getType(e[t]),h=n[a];void 0!==h?"array"===yC.getType(h)&&-1===pv(h).call(h,e[t])?(r('Invalid option detected in "'+t+'". Allowed values are:'+yC.print(h)+' not "'+e[t]+'". '),vC=!0):"object"===a&&"__any__"!==o&&(s=km.copyAndExtendArray(s,t),yC.parse(e[t],i[o],s)):void 0===n.any&&(r('Invalid type received for "'+t+'". Expected: '+yC.print($c(n))+". Received ["+a+'] "'+e[t]+'"'),vC=!0)}static getType(t){var e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":vi(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}static getSuggestion(t,e,i){let o,n=yC.findInOptions(t,e,i,!1),s=yC.findInOptions(t,gC,[],!0);o=void 0!==n.indexMatch?" in "+yC.printLocation(n.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+n.indexMatch+'"?\n\n':s.distance<=4&&n.distance>s.distance?" in "+yC.printLocation(n.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+yC.printLocation(s.path,s.closestMatch,""):n.distance<=8?'. Did you mean "'+n.closestMatch+'"?'+yC.printLocation(n.path,t):". Did you mean one of these: "+yC.print($c(e))+yC.printLocation(i,t),console.log('%cUnknown option detected: "'+t+'"'+o,bC),vC=!0}static findInOptions(t,e,i){let o,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,r="",a=[],h=t.toLowerCase();for(let c in e){if(!Object.prototype.hasOwnProperty.call(e,c))continue;let d;if(void 0!==e[c].__type__&&!0===n){let n=yC.findInOptions(t,e[c],km.copyAndExtendArray(i,c));s>n.distance&&(r=n.closestMatch,a=n.path,s=n.distance,o=n.indexMatch)}else{var l;-1!==pv(l=c.toLowerCase()).call(l,h)&&(o=c),d=yC.levenshteinDistance(t,c),s>d&&(r=c,a=km.copyArray(i),s=d)}}return{closestMatch:r,path:a,distance:s,indexMatch:o}}static printLocation(t,e){let i="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n";for(let e=0;e<t.length;e++){for(let t=0;t<e+1;t++)i+=" ";i+=t[e]+": {\n"}for(let e=0;e<t.length+1;e++)i+=" ";i+=e+"\n";for(let e=0;e<t.length+1;e++){for(let o=0;o<t.length-e;o++)i+=" ";i+="}\n"}return i+"\n\n"}static print(t){return uf(t).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}static levenshteinDistance(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var i,o,n=[];for(i=0;i<=e.length;i++)n[i]=[i];for(o=0;o<=t.length;o++)n[0][o]=o;for(i=1;i<=e.length;i++)for(o=1;o<=t.length;o++)e.charAt(i-1)==t.charAt(o-1)?n[i][o]=n[i-1][o-1]:n[i][o]=Math.min(n[i-1][o-1]+1,Math.min(n[i][o-1]+1,n[i-1][o]+1));return n[e.length][t.length]}}let wC="string",_C="boolean",xC="number",CC="array",SC="date",DC="object",kC="moment",TC={configure:{enabled:{boolean:_C},filter:{boolean:_C,function:"function"},container:{dom:"dom"},__type__:{object:DC,boolean:_C,function:"function"}},align:{string:wC},alignCurrentTime:{string:wC,undefined:"undefined"},rtl:{boolean:_C,undefined:"undefined"},rollingMode:{follow:{boolean:_C},offset:{number:xC,undefined:"undefined"},__type__:{object:DC}},onTimeout:{timeoutMs:{number:xC},callback:{function:"function"},__type__:{object:DC}},verticalScroll:{boolean:_C,undefined:"undefined"},horizontalScroll:{boolean:_C,undefined:"undefined"},autoResize:{boolean:_C},throttleRedraw:{number:xC},clickToUse:{boolean:_C},dataAttributes:{string:wC,array:CC},editable:{add:{boolean:_C,undefined:"undefined"},remove:{boolean:_C,undefined:"undefined"},updateGroup:{boolean:_C,undefined:"undefined"},updateTime:{boolean:_C,undefined:"undefined"},overrideItems:{boolean:_C,undefined:"undefined"},__type__:{boolean:_C,object:DC}},end:{number:xC,date:SC,string:wC,moment:kC},format:{minorLabels:{millisecond:{string:wC,undefined:"undefined"},second:{string:wC,undefined:"undefined"},minute:{string:wC,undefined:"undefined"},hour:{string:wC,undefined:"undefined"},weekday:{string:wC,undefined:"undefined"},day:{string:wC,undefined:"undefined"},week:{string:wC,undefined:"undefined"},month:{string:wC,undefined:"undefined"},year:{string:wC,undefined:"undefined"},__type__:{object:DC,function:"function"}},majorLabels:{millisecond:{string:wC,undefined:"undefined"},second:{string:wC,undefined:"undefined"},minute:{string:wC,undefined:"undefined"},hour:{string:wC,undefined:"undefined"},weekday:{string:wC,undefined:"undefined"},day:{string:wC,undefined:"undefined"},week:{string:wC,undefined:"undefined"},month:{string:wC,undefined:"undefined"},year:{string:wC,undefined:"undefined"},__type__:{object:DC,function:"function"}},__type__:{object:DC}},moment:{function:"function"},groupHeightMode:{string:wC},groupOrder:{string:wC,function:"function"},groupEditable:{add:{boolean:_C,undefined:"undefined"},remove:{boolean:_C,undefined:"undefined"},order:{boolean:_C,undefined:"undefined"},__type__:{boolean:_C,object:DC}},groupOrderSwap:{function:"function"},height:{string:wC,number:xC},hiddenDates:{start:{date:SC,number:xC,string:wC,moment:kC},end:{date:SC,number:xC,string:wC,moment:kC},repeat:{string:wC},__type__:{object:DC,array:CC}},itemsAlwaysDraggable:{item:{boolean:_C,undefined:"undefined"},range:{boolean:_C,undefined:"undefined"},__type__:{boolean:_C,object:DC}},limitSize:{boolean:_C},locale:{string:wC},locales:{__any__:{any:"any"},__type__:{object:DC}},longSelectPressTime:{number:xC},margin:{axis:{number:xC},item:{horizontal:{number:xC,undefined:"undefined"},vertical:{number:xC,undefined:"undefined"},__type__:{object:DC,number:xC}},__type__:{object:DC,number:xC}},max:{date:SC,number:xC,string:wC,moment:kC},maxHeight:{number:xC,string:wC},maxMinorChars:{number:xC},min:{date:SC,number:xC,string:wC,moment:kC},minHeight:{number:xC,string:wC},moveable:{boolean:_C},multiselect:{boolean:_C},multiselectPerGroup:{boolean:_C},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:wC,undefined:"undefined"},item:{string:wC,undefined:"undefined"},__type__:{string:wC,object:DC}},selectable:{boolean:_C},sequentialSelection:{boolean:_C},showCurrentTime:{boolean:_C},showMajorLabels:{boolean:_C},showMinorLabels:{boolean:_C},showWeekScale:{boolean:_C},stack:{boolean:_C},stackSubgroups:{boolean:_C},cluster:{maxItems:{number:xC,undefined:"undefined"},titleTemplate:{string:wC,undefined:"undefined"},clusterCriteria:{function:"function",undefined:"undefined"},showStipes:{boolean:_C,undefined:"undefined"},fitOnDoubleClick:{boolean:_C,undefined:"undefined"},__type__:{boolean:_C,object:DC}},snap:{function:"function",null:"null"},start:{date:SC,number:xC,string:wC,moment:kC},template:{function:"function"},loadingScreenTemplate:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:wC,function:"function"},showTooltips:{boolean:_C},tooltip:{followMouse:{boolean:_C},overflowMethod:{string:["cap","flip","none"]},delay:{number:xC},template:{function:"function"},__type__:{object:DC}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:_C,object:DC}},timeAxis:{scale:{string:wC,undefined:"undefined"},step:{number:xC,undefined:"undefined"},__type__:{object:DC}},type:{string:wC},width:{string:wC,number:xC},preferZoom:{boolean:_C},zoomable:{boolean:_C},zoomKey:{string:["ctrlKey","altKey","shiftKey","metaKey",""]},zoomFriction:{number:xC},zoomMax:{number:xC},zoomMin:{number:xC},xss:{disabled:{boolean:_C},filterOptions:{__any__:{any:"any"},__type__:{object:DC}},__type__:{object:DC}},__type__:{object:DC}},OC={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}}};var EC,AC,IC,PC,MC,NC,FC,RC,LC,jC,BC,zC={};function HC(){if(AC)return EC;AC=1;var t=be(),e=_n(),i=Ro();return EC=function(o){for(var n=t(this),s=i(n),r=arguments.length,a=e(r>1?arguments[1]:void 0,s),h=r>2?arguments[2]:void 0,l=void 0===h?s:e(h,s);l>a;)n[a++]=o;return n},EC}function GC(){return MC?PC:(MC=1,function(){if(IC)return zC;IC=1;var t=Je(),e=HC(),i=Ch();t({target:"Array",proto:!0},{fill:e}),i("fill")}(),PC=_i()("Array","fill"))}function WC(){if(FC)return NC;FC=1;var t=Et(),e=GC(),i=Array.prototype;return NC=function(o){var n=o.fill;return o===i||t(i,o)&&n===i.fill?e:n},NC}function YC(){return LC?RC:(LC=1,RC=WC())}var VC=n(BC?jC:(BC=1,jC=YC())),UC={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"};class XC{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.pixelRatio=t,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}setCloseCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}_isColorString(t){if("string"==typeof t)return UC[t]}setColor(t){let e,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var o=this._isColorString(t);if(void 0!==o&&(t=o),!0===km.isString(t)){if(!0===km.isValidRGB(t)){let i=t.substr(4).substr(0,t.length-5).split(",");e={r:i[0],g:i[1],b:i[2],a:1}}else if(!0===km.isValidRGBA(t)){let i=t.substr(5).substr(0,t.length-6).split(",");e={r:i[0],g:i[1],b:i[2],a:i[3]}}else if(!0===km.isValidHex(t)){let i=km.hexToRGB(t);e={r:i.r,g:i.g,b:i.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){let i=void 0!==t.a?t.a:"1.0";e={r:t.r,g:t.g,b:t.b,a:i}}if(void 0===e)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: "+uf(t));this._setColor(e,i)}}show(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=km.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Zi(()=>{void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=km.extend({},t)),this.color=t;let e=km.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,o=this.r*e.s,n=this.centerCoordinates.x+o*Math.sin(i*e.h),s=this.centerCoordinates.y+o*Math.cos(i*e.h);this.colorPickerSelector.style.left=n-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){let e=km.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;let i=km.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=km.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);let o=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,o,n),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),VC(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+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var t,e,i,o;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){let t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var n=this;this.opacityRange.onchange=function(){n._setOpacity(this.value)},this.opacityRange.oninput=function(){n._setOpacity(this.value)},this.brightnessRange.onchange=function(){n._setBrightness(this.value)},this.brightnessRange.oninput=function(){n._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=Pi(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=Pi(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=Pi(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=Pi(o=this._loadLast).call(o,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)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new Gv(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),Wv(this.hammer,t=>{this._moveSelector(t)}),this.hammer.on("tap",t=>{this._moveSelector(t)}),this.hammer.on("panstart",t=>{this._moveSelector(t)}),this.hammer.on("panmove",t=>{this._moveSelector(t)}),this.hammer.on("panend",t=>{this._moveSelector(t)})}_generateHueCircle(){if(!1===this.generated){let 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);let e,i,o,n,s=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,s,r),this.centerCoordinates={x:.5*s,y:.5*r},this.r=.49*s;let a,h=2*Math.PI/360,l=1/360,c=1/this.r;for(o=0;o<360;o++)for(n=0;n<this.r;n++)e=this.centerCoordinates.x+n*Math.sin(h*o),i=this.centerCoordinates.y+n*Math.cos(h*o),a=km.HSVToRGB(o*l,n*c,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,s,r)}this.generated=!0}_moveSelector(t){let e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,o=t.center.y-e.top,n=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=o-n,h=Math.atan2(r,a),l=.98*Math.min(Math.sqrt(r*r+a*a),s),c=Math.cos(h)*l+n,d=Math.sin(h)*l+s;this.colorPickerSelector.style.top=c-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+"px";let u=h/(2*Math.PI);u=u<0?u+1:u;let p=l/this.r,m=km.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;let f=km.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+")"}}class qC{constructor(t,e,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},km.extend(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new XC(o),this.wrapper=void 0}setOptions(t){if(void 0!==t){this.popupHistory={},this._removePopup();let e=!0;if("string"==typeof t)this.options.filter=t;else if(vi(t))this.options.filter=t.join();else if("object"==typeof t){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==hr(t)&&(this.options.filter=hr(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===hr(this.options)&&(e=!1),this.options.enabled=e}this._clean()}setModuleOptions(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let t=hr(this.options),e=0,i=!1;for(let o in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,o)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(o,[]),i=i||this._handleObject(this.configureOptions[o],[o],!0)):!0!==t&&-1===pv(t).call(t,o)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(o),this._handleObject(this.configureOptions[o],[o])),e++);this._makeButton(),this._push()}_push(){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()}_clean(){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()}_getValue(t){let e=this.moduleOptions;for(let i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}_makeItem(t){if(!0===this.allowCreation){let n=document.createElement("div");n.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var e=arguments.length,i=new Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return Xo(i).call(i,t=>{n.appendChild(t)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(t){let e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=km.xss(t),this._makeItem([],e)}_makeLabel(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,o.innerHTML=!0===i?km.xss("<i><b>"+t+":</b></i>"):km.xss(t+":"),o}_makeDropdown(t,e,i){let o=document.createElement("select");o.className="vis-configuration vis-config-select";let n=0;void 0!==e&&-1!==pv(t).call(t,e)&&(n=pv(t).call(t,e));for(let e=0;e<t.length;e++){let i=document.createElement("option");i.value=t[e],e===n&&(i.selected="selected"),i.innerHTML=t[e],o.appendChild(i)}let s=this;o.onchange=function(){s._update(this.value,i)};let r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,o)}_makeRange(t,e,i){let o=t[0],n=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=n,a.max=s}catch(t){}a.step=r;let h="",l=0;if(void 0!==e){let t=1.2;e<0&&e*t<n?(a.min=Math.ceil(e*t),l=a.min,h="range increased"):e/t<n&&(a.min=Math.ceil(e/t),l=a.min,h="range increased"),e*t>s&&1!==s&&(a.max=Math.ceil(e*t),l=a.max,h="range increased"),a.value=e}else a.value=o;let 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};let u=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,u,a,c);""!==h&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(h,p))}_makeButton(){if(!0===this.options.showButton){let t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=()=>{this._printOptions()},t.onmouseover=()=>{t.className="vis-configuration vis-config-button hover"},t.onmouseout=()=>{t.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(t)}}_setupPopup(t,e){if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){let i=document.createElement("div");i.id="vis-configuration-popup",i.className="vis-configuration-popup",i.innerHTML=km.xss(t),i.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}_removePopup(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(void 0!==this.popupDiv.html){let t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Zi(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Zi(()=>{this._removePopup()},1800)}}_makeCheckbox(t,e,i){var o=document.createElement("input");o.type="checkbox",o.className="vis-configuration vis-config-checkbox",o.checked=t,void 0!==e&&(o.checked=e,e!==t&&("object"==typeof t?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));let n=this;o.onchange=function(){n._update(this.checked,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_makeTextInput(t,e,i){var o=document.createElement("input");o.type="text",o.className="vis-configuration vis-config-text",o.value=e,e!==t&&this.changedOptions.push({path:i,value:e});let n=this;o.onchange=function(){n._update(this.value,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_makeColorField(t,e,i){let o=t[1],n=document.createElement("div");"none"!==(e=void 0===e?o:e)?(n.className="vis-configuration vis-config-colorBlock",n.style.backgroundColor=e):n.className="vis-configuration vis-config-colorBlock none",e=void 0===e?o:e,n.onclick=()=>{this._showColorPicker(e,n,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(t=>{let o="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=o,this._update(o,i)}),this.colorPicker.setCloseCallback(()=>{e.onclick=()=>{this._showColorPicker(t,e,i)}})}_handleObject(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1,n=hr(this.options),s=!1;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;o=!0;let a=t[r],h=km.copyAndExtendArray(e,r);if("function"==typeof n&&(o=n(r,e),!1===o&&!vi(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,o=this._handleObject(a,h,!0),this.allowCreation=!1===i)),!1!==o){s=!0;let t=this._getValue(h);if(vi(a))this._handleArray(a,t,h);else if("string"==typeof a)this._makeTextInput(a,t,h);else if("boolean"==typeof a)this._makeCheckbox(a,t,h);else if(a instanceof Object){let t=!0;if(-1!==pv(e).call(e,"physics")&&this.moduleOptions.physics.solver!==r&&(t=!1),!0===t)if(void 0!==a.enabled){let t=km.copyAndExtendArray(h,"enabled"),e=this._getValue(t);if(!0===e){let t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,e,h)}else{let t=this._makeLabel(r,h,!0);this._makeItem(h,t),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}_handleArray(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)}))}_update(t,e){let 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)}_constructOptions(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;i<e.length;i++)"global"!==e[i]&&(void 0===o[e[i]]&&(o[e[i]]={}),i!==e.length-1?o=o[e[i]]:o[e[i]]=t);return i}_printOptions(){let t=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+uf(t,null,2)+"</pre>"}getOptions(){let t={};for(var e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}class KC extends Sb{constructor(t,e,i,o){var n,s,r,a,h,l,c;if(super(),this.initTime=new Date,this.itemsDone=!1,!(this instanceof KC))throw new SyntaxError("Constructor must be called with the new operator");if(!vi(i)&&!bm(i)&&i instanceof Object){const t=o;o=i,i=t}o&&o.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');const d=this;if(this.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:"bottom",item:"bottom"},moment:qo},this.options=km.deepExtend({},this.defaultOptions),o&&km.setupXSSProtection(o.xss),this._create(t),!o||o&&void 0===o.rtl){let t;this.dom.root.style.visibility="hidden";let e=this.dom.root;for(;!t&&e;)t=window.getComputedStyle(e,null).direction,e=e.parentElement;this.options.rtl=t&&"rtl"==t.toLowerCase()}else this.options.rtl=o.rtl;o&&(o.rollingMode&&(this.options.rollingMode=o.rollingMode),o.onInitialDrawComplete&&(this.options.onInitialDrawComplete=o.onInitialDrawComplete),o.onTimeout&&(this.options.onTimeout=o.onTimeout),o.loadingScreenTemplate&&(this.options.loadingScreenTemplate=o.loadingScreenTemplate));const u=document.createElement("div");if(this.options.loadingScreenTemplate){var p;const t=Pi(p=this.options.loadingScreenTemplate).call(p,this),e=t(this.dom.loadingScreen);e instanceof Object&&!(e instanceof Element)?t(u):e instanceof Element?(u.innerHTML="",u.appendChild(e)):null!=e&&(u.innerHTML=km.xss(e))}function m(t,e){d.hasListeners(t)&&d.emit(t,d.getEventProperties(e))}this.dom.loadingScreen.appendChild(u),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:Pi(n=this.on).call(n,this),off:Pi(s=this.off).call(s,this),emit:Pi(r=this.emit).call(r,this)},hiddenDates:[],util:{getScale:()=>d.timeAxis.step.scale,getStep:()=>d.timeAxis.step.step,toScreen:Pi(a=d._toScreen).call(a,d),toGlobalScreen:Pi(h=d._toGlobalScreen).call(h,d),toTime:Pi(l=d._toTime).call(l,d),toGlobalTime:Pi(c=d._toGlobalTime).call(c,d)}},this.range=new Hg(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new sb(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new Db(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new fC(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.dom.root.onclick=t=>m("click",t),this.dom.root.ondblclick=t=>m("doubleClick",t),this.dom.root.oncontextmenu=t=>m("contextmenu",t),this.dom.root.onmouseover=t=>m("mouseOver",t),window.PointerEvent?(this.dom.root.onpointerdown=t=>m("mouseDown",t),this.dom.root.onpointermove=t=>m("mouseMove",t),this.dom.root.onpointerup=t=>m("mouseUp",t)):(this.dom.root.onmousemove=t=>m("mouseMove",t),this.dom.root.onmousedown=t=>m("mouseDown",t),this.dom.root.onmouseup=t=>m("mouseUp",t)),this.initialFitDone=!1,this.on("changed",()=>{if(null!=d.itemsData){if(!d.initialFitDone&&!d.options.rollingMode)if(d.initialFitDone=!0,null!=d.options.start||null!=d.options.end){if(null==d.options.start||null==d.options.end)var t=d.getItemRange();const e=null!=d.options.start?d.options.start:t.min,i=null!=d.options.end?d.options.end:t.max;d.setWindow(e,i,{animation:!1})}else d.fit({animation:!1});d.initialDrawDone||!d.initialRangeChangeDone&&(d.options.start||d.options.end)&&!d.options.rollingMode||(d.initialDrawDone=!0,d.itemSet.initialDrawDone=!0,d.dom.root.style.visibility="visible",d.dom.loadingScreen.parentNode.removeChild(d.dom.loadingScreen),d.options.onInitialDrawComplete&&Zi(()=>d.options.onInitialDrawComplete(),0))}}),this.on("destroyTimeline",()=>{d.destroy()}),o&&this.setOptions(o),this.body.emitter.on("fit",t=>{this._onFit(t),this.redraw()}),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}_createConfigurator(){return new qC(this,this.dom.container,OC)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(t){if(!0===yC.validate(t,TC)&&console.log("%cErrors have been found in the supplied options object.",bC),Sb.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;const e=this.itemsData;if(e){const t=this.getSelection();this.setItems(null),this.setItems(e.rawDS),this.setSelection(t)}}}setItems(t){let e;this.itemsDone=!1,e=t?bm(t)?xm(t):xm(new i.DataSet(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.itemSet&&this.itemSet.setItems(null!=e?e.rawDS:null)}setGroups(t){let e;const o=t=>!1!==t.visible;t?(vi(t)&&(t=new i.DataSet(t)),e=new i.DataView(t,{filter:o})):e=null,null!=this.groupsData&&"function"==typeof this.groupsData.setData&&this.groupsData.setData(null),this.groupsData=e,this.itemSet.setGroups(e)}setData(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)}setSelection(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)}getSelection(){return this.itemSet&&this.itemSet.getSelection()||[]}focus(t,e){if(!this.itemsData||null==t)return;const i=vi(t)?t:[t],o=this.itemsData.get(i);let n=null,s=null;if(Xo(o).call(o,t=>{const e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===n||e<n)&&(n=e),(null===s||i>s)&&(s=i)}),null!==n&&null!==s){const t=this,o=this.itemSet.items[i[0]];let r=-1*this._getScrollTop(),a=null;const h=(e,i,n)=>{const s=JC(t,o);if(!1===s)return;if(a||(a=s),a.itemTop==s.itemTop&&!a.shouldScroll)return;a.itemTop!=s.itemTop&&s.shouldScroll&&(a=s,r=-1*t._getScrollTop());const h=r,l=a.scrollOffset,c=n?l:h+(l-h)*e;t._setScrollTop(-c),i||t._redraw()},l=()=>{const e=JC(t,o);e.shouldScroll&&e.itemTop!=a.itemTop&&(t._setScrollTop(-e.scrollOffset),t._redraw())},c=()=>{l(),Zi(l,100)},d=!e||void 0===e.zoom||e.zoom,u=(n+s)/2,p=d?1.1*(s-n):Math.max(this.range.end-this.range.start,1.1*(s-n)),m=!e||void 0===e.animation||e.animation;m||(a={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.stopRolling(),this.range.setRange(u-p/2,u+p/2,{animation:m},c,h)}}fit(t,e){const i=!t||void 0===t.animation||t.animation;let o;1===this.itemsData.length&&void 0===this.itemsData.get()[0].end?(o=this.getDataRange(),this.moveTo(o.min.valueOf(),{animation:i},e)):(o=this.getItemRange(),this.range.setRange(o.min,o.max,{animation:i},e))}getItemRange(){const t=this.getDataRange();let e=null!==t.min?t.min.valueOf():null,i=null!==t.max?t.max.valueOf():null,o=null,n=null;if(null!=e&&null!=i){let t=i-e;t<=0&&(t=10);const s=t/this.props.center.width,r={};let a=0;Xo(km).call(km,this.itemSet.items,(t,e)=>{if(t.groupShowing){const i=!0;r[e]=t.redraw(i),a=r[e].length}});if(a>0)for(let t=0;t<a;t++)Xo(km).call(km,r,e=>{e[t]()});if(Xo(km).call(km,this.itemSet.items,t=>{const r=$C(t),a=ZC(t);let h,l;this.options.rtl?(h=r-(t.getWidthRight()+10)*s,l=a+(t.getWidthLeft()+10)*s):(h=r-(t.getWidthLeft()+10)*s,l=a+(t.getWidthRight()+10)*s),h<e&&(e=h,o=t),l>i&&(i=l,n=t)}),o&&n){const s=o.getWidthLeft()+10,r=n.getWidthRight()+10,a=this.props.center.width-s-r;a>0&&(this.options.rtl?(e=$C(o)-r*t/a,i=ZC(n)+s*t/a):(e=$C(o)-s*t/a,i=ZC(n)+r*t/a))}}return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}}getDataRange(){let t=null,e=null;var i;this.itemsData&&Xo(i=this.itemsData).call(i,i=>{const o=km.convert(i.start,"Date").valueOf(),n=km.convert(null!=i.end?i.end:i.start,"Date").valueOf();(null===t||o<t)&&(t=o),(null===e||n>e)&&(e=n)});return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}}getEventProperties(t){const e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=this.dom.centerContainer.getBoundingClientRect(),n=this.options.rtl?o.right-e:e-o.left,s=i-o.top,r=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),h=Cb.customTimeFromTarget(t),l=this.itemSet.options.snap||null,c=this.body.util.getScale(),d=this.body.util.getStep(),u=this._toTime(n),p=l?l(u,c,d):u,m=km.getTarget(t);let f=null;return null!=r?f="item":null!=h?f="custom-time":km.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&km.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":km.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":km.hasParent(m,this.currentTime.bar)?f="current-time":km.hasParent(m,this.dom.center)&&(f="background"),{event:t,item:r?r.id:null,isCluster:!!r&&!!r.isCluster,items:r?r.items||[]:null,group:a?a.groupId:null,customTime:h?h.options.id:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:s,time:u,snappedTime:p}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())}_redraw(){Sb.prototype._redraw.call(this)}_onFit(t){const{start:e,end:i,animation:o}=t;i?this.range.setRange(e,i,{animation:o}):this.moveTo(e.valueOf(),{animation:o})}}function $C(t){return km.convert(t.data.start,"Date").valueOf()}function ZC(t){const e=null!=t.data.end?t.data.end:t.data.start;return km.convert(e,"Date").valueOf()}function JC(t,e){if(!e.parent)return!1;const i=t.options.rtl?t.props.rightContainer.height:t.props.leftContainer.height,o=t.props.center.height,n=e.parent;let s=n.top,r=!0;const a=t.timeAxis.options.orientation.axis,h=()=>"bottom"==a?n.height-e.top-e.height:e.top,l=-1*t._getScrollTop(),c=s+h(),d=e.height;return c<l?s+i<=s+h()+d&&(s+=h()-t.itemSet.options.margin.item.vertical):c+d>l+i?s+=h()+d-i+t.itemSet.options.margin.item.vertical:r=!1,s=Math.min(s,o-i),{shouldScroll:r,scrollOffset:s,itemTop:c}}function QC(t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].redundant=t[e].used,t[e].used=[])}function tS(t){for(var e in t){if(!Object.prototype.hasOwnProperty.call(t,e))continue;const o=t[e];for(var i=0;i<o.redundant.length;i++)o.redundant[i].parentNode.removeChild(o.redundant[i]);o.redundant=[]}}function eS(t,e,i){var o;return Object.prototype.hasOwnProperty.call(e,t)?e[t].redundant.length>0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o}function iS(t,e,i,o){var n;return Object.prototype.hasOwnProperty.call(e,t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},i.appendChild(n)),e[t].used.push(n),n}function oS(t,e,i,o,n,s){var r;if("circle"==i.style?((r=eS("circle",o,n)).setAttributeNS(null,"cx",t),r.setAttributeNS(null,"cy",e),r.setAttributeNS(null,"r",.5*i.size)):((r=eS("rect",o,n)).setAttributeNS(null,"x",t-.5*i.size),r.setAttributeNS(null,"y",e-.5*i.size),r.setAttributeNS(null,"width",i.size),r.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&r.setAttributeNS(null,"style",i.styles),r.setAttributeNS(null,"class",i.className+" vis-point"),s){var a=eS("text",o,n);s.xOffset&&(t+=s.xOffset),s.yOffset&&(e+=s.yOffset),s.content&&(a.textContent=s.content),s.className&&a.setAttributeNS(null,"class",s.className+" vis-label"),a.setAttributeNS(null,"x",t),a.setAttributeNS(null,"y",e)}return r}function nS(t,e,i,o,n,s,r,a){if(0!=o){o<0&&(e-=o*=-1);var h=eS("rect",s,r);h.setAttributeNS(null,"x",t-.5*i),h.setAttributeNS(null,"y",e),h.setAttributeNS(null,"width",i),h.setAttributeNS(null,"height",o),h.setAttributeNS(null,"class",n),a&&h.setAttributeNS(null,"style",a)}}class sS{constructor(t,e,i,o,n,s){let r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=n,this.majorCharHeight=s,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=r,this.autoScaleStart=i,this.autoScaleEnd=o,this.formattingFunction=a,i||o){const t=this,e=e=>{const i=e-e%(t.magnitudefactor*t.minorSteps[t.minorStepIdx]);return e%(t.magnitudefactor*t.minorSteps[t.minorStepIdx])>t.magnitudefactor*t.minorSteps[t.minorStepIdx]*.5?i+t.magnitudefactor*t.minorSteps[t.minorStepIdx]:i};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=e(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=e(this._end)),this.determineScale()}}setCharHeight(t){this.majorCharHeight=t}setHeight(t){this.containerHeight=t}determineScale(){const t=this._end-this._start;this.scale=this.containerHeight/t;const 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);let o=0;i<0&&(o=i);let n=!1;for(let t=o;Math.abs(t)<=Math.abs(i);t++){this.magnitudefactor=Math.pow(10,t);for(let t=0;t<this.minorSteps.length;t++){if(this.magnitudefactor*this.minorSteps[t]>=e){n=!0,this.minorStepIdx=t;break}}if(!0===n)break}}is_major(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0}getStep(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}getFirstMajor(){const t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)}formatValue(t){let 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)}getLines(){const t=[],e=this.getStep(),i=(e-this._start%e)%e;for(let o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t}followScale(t){const e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=()=>{n.magnitudefactor*=2},r=()=>{n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,2==e||s(),s()):(this.minorStepIdx=2,1==e||r(),r()));const a=t.convertValue(0),h=t.getStep()*t.scale;let l=!1,c=0;for(;!l&&c++<5;){this.scale=h/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);const e=this.containerHeight/this.scale;this._start=i,this._end=this._start+e;const n=this._end*this.scale,c=this.magnitudefactor*this.majorSteps[this.minorStepIdx],d=this.getFirstMajor()-t.getFirstMajor();if(this.zeroAlign){const t=a-n;this._end+=t/this.scale,this._start=this._end-e}else this.autoScaleStart?(this._start-=d/this.scale,this._end=this._start+e):(this._start+=c-d/this.scale,this._end=this._start+e);if(!this.autoScaleEnd&&this._end>o+1e-5)r(),l=!1;else{if(!this.autoScaleStart&&this._start<i-1e-5){if(!(this.zeroAlign&&i>=0)){r(),l=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&e<o-i?(s(),l=!1):l=!0}}}convertValue(t){return this.containerHeight-(t-this._start)*this.scale}screenToValue(t){return(this.containerHeight-t)/this.scale+this._start}}class rS extends Lf{constructor(t,e,i,o){super(),this.id=fm(),this.body=t,this.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:t=>"".concat(Rf(t.toPrecision(3))),title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:t=>"".concat(Rf(t.toPrecision(3))),title:{text:void 0,style:void 0}}},this.linegraphOptions=o,this.linegraphSVG=i,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=km.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(e),this.width=Number("".concat(this.options.width).replace("px","")),this.minWidth=this.width,this.height=this.linegraphSVG.getBoundingClientRect().height,this.hidden=!1,this.stepPixels=25,this.zeroCrossing=-1,this.amountOfSteps=-1,this.lineOffset=0,this.master=!0,this.masterAxis=null,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create(),null==this.scale&&this._redrawLabels(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};const n=this;this.body.emitter.on("verticalDrag",()=>{n.dom.lineContainer.style.top="".concat(n.body.domProps.scrollTop,"px")})}addGroup(t,e){Object.prototype.hasOwnProperty.call(this.groups,t)||(this.groups[t]=e),this.amountOfGroups+=1}updateGroup(t,e){Object.prototype.hasOwnProperty.call(this.groups,t)||(this.amountOfGroups+=1),this.groups[t]=e}removeGroup(t){Object.prototype.hasOwnProperty.call(this.groups,t)&&(delete this.groups[t],this.amountOfGroups-=1)}setOptions(t){if(t){let e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);const i=["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"];km.selectiveDeepExtend(i,this.options,t),this.minWidth=Number("".concat(this.options.width).replace("px","")),!0===e&&this.dom.frame&&(this.hide(),this.show())}}_create(){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)}_redrawGroupIcons(){let t;QC(this.svgElements);const e=this.options.iconWidth;let i=11.5;t="left"===this.options.orientation?4:this.width-e-4;const o=$c(this.groups);kg(o).call(o,(t,e)=>t<e?-1:1);for(const n of o)!0!==this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&!0!==this.linegraphOptions.visibility[n]||(this.groups[n].getLegend(e,15,this.framework,t,i),i+=19);tS(this.svgElements),this.iconsRemoved=!1}_cleanupIcons(){!1===this.iconsRemoved&&(QC(this.svgElements),tS(this.svgElements),this.iconsRemoved=!0)}show(){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"}hide(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.style.display="none"}setRange(t,e){this.range.start=t,this.range.end=e}redraw(){let t=!1,e=0;this.dom.lineContainer.style.top="".concat(this.body.domProps.scrollTop,"px");for(const t in this.groups)Object.prototype.hasOwnProperty.call(this.groups,t)&&(!0!==this.groups[t].visible||void 0!==this.linegraphOptions.visibility[t]&&!0!==this.linegraphOptions.visibility[t]||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;const e=this.props,i=this.dom.frame;i.className="vis-data-axis",this._calculateCharSize();const o=this.options.orientation,n=this.options.showMinorLabels,s=this.options.showMajorLabels,r=this.body.dom.backgroundHorizontal.offsetWidth;e.minorLabelHeight=n?e.minorCharHeight:0,e.majorLabelHeight=s?e.majorCharHeight:0,e.minorLineWidth=r-this.lineOffset-this.width+2*this.options.minorLinesOffset,e.minorLineHeight=1,e.majorLineWidth=r-this.lineOffset-this.width+2*this.options.majorLinesOffset,e.majorLineHeight=1,"left"===o?(i.style.top="0",i.style.left="0",i.style.bottom="",i.style.width="".concat(this.width,"px"),i.style.height="".concat(this.height,"px"),this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(i.style.top="",i.style.bottom="0",i.style.left="0",i.style.width="".concat(this.width,"px"),i.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(o)}return t}_redrawLabels(){let t=!1;QC(this.DOMelements.lines),QC(this.DOMelements.labels);const e=this.options.orientation,i=null!=this.options[e].range?this.options[e].range:{};let o=!0;null!=i.max&&(this.range.end=i.max,o=!1);let n=!0;null!=i.min&&(this.range.start=i.min,n=!1),this.scale=new sS(this.range.start,this.range.end,n,o,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[e].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;const s=this.scale.getLines();Xo(s).call(s,t=>{const i=t.y,o=t.major;this.options.showMinorLabels&&!1===o&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-minor",this.props.minorCharHeight),o&&i>=0&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-major",this.props.majorCharHeight),!0===this.master&&(o?this._redrawLine(i,e,"vis-grid vis-horizontal vis-major",this.options.majorLinesOffset,this.props.majorLineWidth):this._redrawLine(i,e,"vis-grid vis-horizontal vis-minor",this.options.minorLinesOffset,this.props.minorLineWidth))});let r=0;void 0!==this.options[e].title&&void 0!==this.options[e].title.text&&(r=this.props.titleCharHeight);const a=!0===this.options.icons?Math.max(this.options.iconWidth,r)+this.options.labelOffsetX+15:r+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-a&&!0===this.options.visible?(this.width=this.maxLabelSize+a,this.options.width="".concat(this.width,"px"),tS(this.DOMelements.lines),tS(this.DOMelements.labels),this.redraw(),t=!0):this.maxLabelSize<this.width-a&&!0===this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+a),this.options.width="".concat(this.width,"px"),tS(this.DOMelements.lines),tS(this.DOMelements.labels),this.redraw(),t=!0):(tS(this.DOMelements.lines),tS(this.DOMelements.labels),t=!1),t}convertValue(t){return this.scale.convertValue(t)}screenToValue(t){return this.scale.screenToValue(t)}_redrawLabel(t,e,i,o,n){const s=iS("div",this.DOMelements.labels,this.dom.frame);s.className=o,s.innerHTML=km.xss(e),"left"===i?(s.style.left="-".concat(this.options.labelOffsetX,"px"),s.style.textAlign="right"):(s.style.right="-".concat(this.options.labelOffsetX,"px"),s.style.textAlign="left"),s.style.top="".concat(t-.5*n+this.options.labelOffsetY,"px"),e+="";const r=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*r&&(this.maxLabelSize=e.length*r)}_redrawLine(t,e,i,o,n){if(!0===this.master){const s=iS("div",this.DOMelements.lines,this.dom.lineContainer);s.className=i,s.innerHTML="","left"===e?s.style.left="".concat(this.width-o,"px"):s.style.right="".concat(this.width-o,"px"),s.style.width="".concat(n,"px"),s.style.top="".concat(t,"px")}}_redrawTitle(t){if(QC(this.DOMelements.title),void 0!==this.options[t].title&&void 0!==this.options[t].title.text){const e=iS("div",this.DOMelements.title,this.dom.frame);e.className="vis-y-axis vis-title vis-".concat(t),e.innerHTML=km.xss(this.options[t].title.text),void 0!==this.options[t].title.style&&km.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")}tS(this.DOMelements.title)}_calculateCharSize(){if(!("minorCharHeight"in this.props)){const 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)){const t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-major vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.majorCharHeight=e.clientHeight,this.props.majorCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}if(!("titleCharHeight"in this.props)){const t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-title vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.titleCharHeight=e.clientHeight,this.props.titleCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}}}function aS(t,e){}function hS(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 lS(t,e){}function cS(t,e){}function dS(t,e,i,o){this.id=e;this.options=km.selectiveBridgeObject(["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"],i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=o,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible||t.visible}function uS(t,e,i,o){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=km.extend({},this.defaultOptions),this.linegraphOptions=o,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)}aS.draw=function(t,e,i,o){o=o||0;for(var n=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),s=0;s<t.length;s++)if(n){var r=n(t[s],e);!0!==r&&"object"!=typeof r||oS(t[s].screen_x+o,t[s].screen_y,hS(e,r),i.svgElements,i.svg,t[s].label)}else oS(t[s].screen_x+o,t[s].screen_y,hS(e),i.svgElements,i.svg,t[s].label)},aS.drawIcon=function(t,e,i,o,n,s){var r=.5*n,a=eS("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",o),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline"),oS(e+.5*o,i,hS(t),s.svgElements,s.svg)},lS.drawIcon=function(t,e,i,o,n,s){var r=.5*n,a=eS("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",o),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline");var h=Math.round(.3*o),l=t.options.barChart.width/h,c=Math.round(.4*n),d=Math.round(.75*n),u=Math.round((o-2*h)/3);if(nS(e+.5*h+u,i+r-c-1,h,c,t.className+" vis-bar",s.svgElements,s.svg,t.style),nS(e+1.5*h+u+2,i+r-d-1,h,d,t.className+" vis-bar",s.svgElements,s.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/l,className:t.className};oS(e+.5*h+u,i+r-c-1,p,s.svgElements,s.svg),oS(e+1.5*h+u+2,i+r-d-1,p,s.svgElements,s.svg)}},lS.draw=function(t,e,i){var o,n,s,r,a,h,l=[],c={},d=0;for(a=0;a<t.length;a++)if("bar"===(r=i.groups[t[a]]).options.style&&!0===r.visible&&(void 0===i.options.groups.visibility[t[a]]||!0===i.options.groups.visibility[t[a]]))for(h=0;h<e[t[a]].length;h++)l.push({screen_x:e[t[a]][h].screen_x,screen_end:e[t[a]][h].screen_end,screen_y:e[t[a]][h].screen_y,x:e[t[a]][h].x,end:e[t[a]][h].end,y:e[t[a]][h].y,groupId:t[a],label:e[t[a]][h].label}),d+=1;if(0!==d)for(kg(l).call(l,function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x}),lS._getDataIntersections(c,l),a=0;a<l.length;a++){var u=null!=(r=i.groups[l[a].groupId]).options.barChart.minWidth?r.options.barChart.minWidth:.1*r.options.barChart.width,p=0;if(void 0===c[n=l[a].screen_x])a+1<l.length&&(o=Math.abs(l[a+1].screen_x-n)),s=lS._getSafeDrawData(o,r,u);else{var m=a+(c[n].amount-c[n].resolved);m<l.length&&(o=Math.abs(l[m].screen_x-n)),s=lS._getSafeDrawData(o,r,u),c[n].resolved+=1,!0===r.options.stack&&!0!==r.options.excludeFromStacking?l[a].screen_y<r.zeroPosition?(p=c[n].accumulatedNegative,c[n].accumulatedNegative+=r.zeroPosition-l[a].screen_y):(p=c[n].accumulatedPositive,c[n].accumulatedPositive+=r.zeroPosition-l[a].screen_y):!0===r.options.barChart.sideBySide&&(s.width=s.width/c[n].amount,s.offset+=c[n].resolved*s.width-.5*s.width*(c[n].amount+1))}let t=s.width,e=l[a].screen_x;if(null!=l[a].screen_end?(t=l[a].screen_end-l[a].screen_x,e+=.5*t):e+=s.offset,nS(e,l[a].screen_y-p,t,r.zeroPosition-l[a].screen_y,r.className+" vis-bar",i.svgElements,i.svg,r.style),!0===r.options.drawPoints.enabled){let t={screen_x:l[a].screen_x,screen_y:l[a].screen_y-p,x:l[a].x,y:l[a].y,groupId:l[a].groupId,label:l[a].label};aS.draw([t],r,i,s.offset)}}},lS._getDataIntersections=function(t,e){for(var i,o=0;o<e.length;o++)o+1<e.length&&(i=Math.abs(e[o+1].screen_x-e[o].screen_x)),o>0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},lS._getSafeDrawData=function(t,e,i){var o,n;return t<e.options.barChart.width&&t>0?(o=t<i?i:t,n=0,"left"===e.options.barChart.align?n-=.5*t:"right"===e.options.barChart.align&&(n+=.5*t)):(o=e.options.barChart.width,n=0,"left"===e.options.barChart.align?n-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(n+=.5*e.options.barChart.width)),{width:o,offset:n}},lS.getStackedYRange=function(t,e,i,o,n){if(t.length>0){kg(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 s={};lS._getDataIntersections(s,t),e[o]=lS._getStackedYRange(s,t),e[o].yAxisOrientation=n,i.push(o)}},lS._getStackedYRange=function(t,e){for(var i,o=e[0].screen_y,n=e[0].screen_y,s=0;s<e.length;s++)void 0===t[i=e[s].screen_x]?(o=o>e[s].screen_y?e[s].screen_y:o,n=n<e[s].screen_y?e[s].screen_y:n):e[s].screen_y<0?t[i].accumulatedNegative+=e[s].screen_y:t[i].accumulatedPositive+=e[s].screen_y;for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(o=(o=o>t[r].accumulatedNegative?t[r].accumulatedNegative:o)>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=(n=n<t[r].accumulatedNegative?t[r].accumulatedNegative:n)<t[r].accumulatedPositive?t[r].accumulatedPositive:n);return{min:o,max:n}},cS.calcPath=function(t,e){if(null!=t&&t.length>0){return 1==e.options.interpolation.enabled?cS._catmullRom(t,e):cS._linear(t)}},cS.drawIcon=function(t,e,i,o,n,s){var r,a,h=.5*n,l=eS("rect",s.svgElements,s.svg);(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-h),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*h),l.setAttributeNS(null,"class","vis-outline"),(r=eS("path",s.svgElements,s.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&r.setAttributeNS(null,"style",t.style),r.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(a=eS("path",s.svgElements,s.svg),"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-h)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-h)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+h)+" L"+(e+o)+","+(i+h)+"L"+(e+o)+","+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)&&oS(e+.5*o,i,{style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className},s.svgElements,s.svg)},cS.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var n,s=Number(o.svg.style.height.replace("px","")),r=eS("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h=0;h="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),n="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"+h+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",n)}},cS.draw=function(t,e,i){if(null!=t&&null!=t){var o=eS("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var n="L";1==e.options.interpolation.enabled&&(n="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,n,!1))}},cS.serializePath=function(t,e,i){if(t.length<2)return"";var o,n=e;if(i)for(o=t.length-2;o>0;o--)n+=t[o][0]+","+t[o][1]+" ";else for(o=1;o<t.length;o++)n+=t[o][0]+","+t[o][1]+" ";return n},cS._catmullRomUniform=function(t){var e,i,o,n,s,r,a=[];a.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var h=1/6,l=t.length,c=0;c<l-1;c++)e=0==c?t[0]:t[c-1],i=t[c],o=t[c+1],n=c+2<l?t[c+2]:o,s={screen_x:(-e.screen_x+6*i.screen_x+o.screen_x)*h,screen_y:(-e.screen_y+6*i.screen_y+o.screen_y)*h},r={screen_x:(i.screen_x+6*o.screen_x-n.screen_x)*h,screen_y:(i.screen_y+6*o.screen_y-n.screen_y)*h},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([o.screen_x,o.screen_y]);return a},cS._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var o,n,s,r,a,h,l,c,d,u,p,m,f,g,v,b,y,w,_,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var C=t.length,S=0;S<C-1;S++)o=0==S?t[0]:t[S-1],n=t[S],s=t[S+1],r=S+2<C?t[S+2]:s,l=Math.sqrt(Math.pow(o.screen_x-n.screen_x,2)+Math.pow(o.screen_y-n.screen_y,2)),c=Math.sqrt(Math.pow(n.screen_x-s.screen_x,2)+Math.pow(n.screen_y-s.screen_y,2)),d=Math.sqrt(Math.pow(s.screen_x-r.screen_x,2)+Math.pow(s.screen_y-r.screen_y,2)),g=Math.pow(d,i),b=Math.pow(d,2*i),v=Math.pow(c,i),y=Math.pow(c,2*i),_=Math.pow(l,i),u=2*(w=Math.pow(l,2*i))+3*_*v+y,p=2*b+3*g*v+y,(m=3*_*(_+v))>0&&(m=1/m),(f=3*g*(g+v))>0&&(f=1/f),a={screen_x:(-y*o.screen_x+u*n.screen_x+w*s.screen_x)*m,screen_y:(-y*o.screen_y+u*n.screen_y+w*s.screen_y)*m},h={screen_x:(b*n.screen_x+p*s.screen_x-y*r.screen_x)*f,screen_y:(b*n.screen_y+p*s.screen_y-y*r.screen_y)*f},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},cS._linear=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i].screen_x,t[i].screen_y]);return e},dS.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==kg(this.options)&&km.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},dS.prototype.getItems=function(){return this.itemsData},dS.prototype.setZeroPosition=function(t){this.zeroPosition=t},dS.prototype.setOptions=function(t){if(void 0!==t){km.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),km.mergeOptions(this.options,t,"interpolation"),km.mergeOptions(this.options,t,"drawPoints"),km.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==typeof 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))}},dS.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)},dS.prototype.getLegend=function(t,e,i,o,n){null!=i&&null!=i||(i={svg:document.createElementNS("http://www.w3.org/2000/svg","svg"),svgElements:{},options:this.options,groups:[this]});switch(null!=o&&null!=o||(o=0),null!=n&&null!=n||(n=.5*e),this.options.style){case"line":cS.drawIcon(this,o,n,t,e,i);break;case"points":case"point":aS.drawIcon(this,o,n,t,e,i);break;case"bar":lS.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},dS.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;o<t.length;o++)e=e>t[o].y?t[o].y:e,i=i<t[o].y?t[o].y:i;return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}},uS.prototype=new Lf,uS.prototype.clear=function(){this.groups={},this.amountOfGroups=0},uS.prototype.addGroup=function(t,e){1!=e.options.excludeFromLegend&&(Object.prototype.hasOwnProperty.call(this.groups,t)||(this.groups[t]=e),this.amountOfGroups+=1)},uS.prototype.updateGroup=function(t,e){this.groups[t]=e},uS.prototype.removeGroup=function(t){Object.prototype.hasOwnProperty.call(this.groups,t)&&(delete this.groups[t],this.amountOfGroups-=1)},uS.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)},uS.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},uS.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},uS.prototype.setOptions=function(t){km.selectiveDeepExtend(["enabled","orientation","icons","left","right"],this.options,t)},uS.prototype.redraw=function(){var t=0,e=$c(this.groups);kg(e).call(e,function(t,e){return t<e?-1:1});for(var i=0;i<e.length;i++){var o=e[i];1!=this.groups[o].visible||void 0!==this.linegraphOptions.visibility[o]&&1!=this.linegraphOptions.visibility[o]||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 n=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+n+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 s="";for(i=0;i<e.length;i++)o=e[i],1!=this.groups[o].visible||void 0!==this.linegraphOptions.visibility[o]&&1!=this.linegraphOptions.visibility[o]||(s+=this.groups[o].content+"<br />");this.dom.textArea.innerHTML=km.xss(s),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},uS.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=$c(this.groups);kg(t).call(t,function(t,e){return t<e?-1:1}),QC(l=this.svgElements),tS(l),QC(l);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),o=i,n=this.options.iconSize,s=.75*this.options.iconSize,r=i+.5*s+3;this.svg.style.width=n+5+i+"px";for(var a=0;a<t.length;a++){var h=t[a];1!=this.groups[h].visible||void 0!==this.linegraphOptions.visibility[h]&&1!=this.linegraphOptions.visibility[h]||(this.groups[h].getLegend(n,s,this.framework,o,r),r+=s+this.options.iconSpacing)}}var l};var pS="__ungrouped__";function mS(t,e){this.id=fm(),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=km.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,o){i._onAdd(e.items)},update:function(t,e,o){i._onUpdate(e.items)},remove:function(t,e,o){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,o){i._onAddGroups(e.items)},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){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=km.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}}mS.prototype=new Lf,mS.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 rS(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new rS(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new uS(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new uS(this.body,this.options.legend,"right",this.options.groups),this.show()},mS.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&&ob((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),km.selectiveDeepExtend(["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"],this.options,t),km.mergeOptions(this.options,t,"interpolation"),km.mergeOptions(this.options,t,"drawPoints"),km.mergeOptions(this.options,t,"shaded"),km.mergeOptions(this.options,t,"legend"),t.interpolation&&"object"==typeof 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)),Object.prototype.hasOwnProperty.call(this.groups,pS)&&this.groups[pS].setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},mS.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},mS.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},mS.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!bm(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=xm(t)}else this.itemsData=null;if(o&&(Xo(km).call(km,this.itemListeners,function(t,e){o.off(e,t)}),o.dispose(),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;Xo(km).call(km,this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e)}},mS.prototype.setGroups=function(t){var e,i=this;if(this.groupsData){Xo(km).call(km,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(!bm(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var n=this.id;Xo(km).call(km,this.groupListeners,function(t,e){i.groupsData.on(e,t,n)}),e=this.groupsData.getIds(),this._onAddGroups(e)}},mS.prototype._onUpdate=function(t){this._updateAllGroupData(t)},mS.prototype._onAdd=function(t){this._onUpdate(t)},mS.prototype._onRemove=function(t){this._onUpdate(t)},mS.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)},mS.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},mS.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})},mS.prototype._removeGroup=function(t){Object.prototype.hasOwnProperty.call(this.groups,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])},mS.prototype._updateGroup=function(t,e){Object.prototype.hasOwnProperty.call(this.groups,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 dS(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()},mS.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){var i={},o=this.itemsData.get(),n=this.itemsData.idProp,s={};t&&Ac(t).call(t,function(t){s[t]=t});for(var r={},a=0;a<o.length;a++){var h=o[a],l=h.group;null==l&&(l=pS),Object.prototype.hasOwnProperty.call(r,l)?r[l]++:r[l]=1}var c={};if(!e&&t)for(l in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,l)){var d=(f=this.groups[l]).getItems();i[l]=hr(d).call(d,function(t){return c[t[n]]=t[n],t[n]!==s[t[n]]});var u=r[l];r[l]-=i[l].length,i[l].length<u&&(i[l][u-1]={})}for(a=0;a<o.length;a++)if(null==(l=(h=o[a]).group)&&(l=pS),e||!t||h[n]===s[h[n]]||!Object.prototype.hasOwnProperty.call(c,h[n])){Object.prototype.hasOwnProperty.call(i,l)||(i[l]=new Array(r[l]));var p=km.bridgeObject(h);p.x=km.convert(h.x,"Date"),p.end=km.convert(h.end,"Date"),p.orginalY=h.y,p.y=Number(h.y),p[n]=h[n];var m=i[l].length-r[l]--;i[l][m]=p}for(l in this.groups)Object.prototype.hasOwnProperty.call(this.groups,l)&&!Object.prototype.hasOwnProperty.call(i,l)&&(i[l]=new Array(0));for(l in i)if(Object.prototype.hasOwnProperty.call(i,l))if(0==i[l].length)Object.prototype.hasOwnProperty.call(this.groups,l)&&this._removeGroup(l);else{var f=void 0;null!=this.groupsData&&(f=this.groupsData.get(l)),null==f&&(f={id:l,content:this.options.defaultGroup+l}),this._updateGroup(f,l),this.groups[l].setItems(i[l])}this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})}},mS.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,o=i!=this.lastVisibleInterval;(this.lastVisibleInterval=i,1==t)&&(this.svg.style.width=km.option.asSize(3*this.props.width),this.svg.style.left=km.option.asSize(-this.props.width),-1==pv(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==o||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 n=this.body.range.start-this.lastStart,s=this.body.range.end-this.body.range.start;if(0!=this.props.width){var r=n*(this.props.width/s);this.svg.style.left=-this.props.width-r+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),t},mS.prototype._getSortedGroupIds=function(){var t=[];for(var e in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,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})}km.insertSort(t,function(t,e){var i=t.zIndex,o=e.zIndex;return void 0===i&&(i=0),void 0===o&&(o=0),i==o?0:i<o?-1:1});for(var o=new Array(t.length),n=0;n<t.length;n++)o[n]=t[n].id;return o},mS.prototype._updateGraph=function(){if(QC(this.svgElements),0!=this.props.width&&null!=this.itemsData){var t,e,i={},o=this.body.util.toGlobalTime(-this.body.domProps.root.width),n=this.body.util.toGlobalTime(2*this.body.domProps.root.width),s=this._getSortedGroupIds();if(s.length>0){var r={};for(this._getRelevantData(s,r,o,n),this._applySampling(s,r),e=0;e<s.length;e++)this._convertXcoordinates(r[s[e]]);if(this._getYRanges(s,r,i),1==this._updateYAxis(s,i))return tS(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var a=void 0;for(e=0;e<s.length;e++)t=this.groups[s[e]],!0===this.options.stack&&"line"===this.options.style&&(null!=t.options.excludeFromStacking&&t.options.excludeFromStacking||(null!=a&&(this._stack(r[t.id],r[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(r[s[e]],t);var h={};for(e=0;e<s.length;e++)if("line"===(t=this.groups[s[e]]).options.style&&1==t.options.shaded.enabled){var l=r[s[e]];if(null==l||0==l.length)continue;if(Object.prototype.hasOwnProperty.call(h,s[e])||(h[s[e]]=cS.calcPath(l,t)),"group"===t.options.shaded.orientation){var c=t.options.shaded.groupId;if(-1===pv(s).call(s,c)){console.log(t.id+": Unknown shading group target given:"+c);continue}Object.prototype.hasOwnProperty.call(h,c)||(h[c]=cS.calcPath(r[c],this.groups[c])),cS.drawShading(h[s[e]],t,h[c],this.framework)}else cS.drawShading(h[s[e]],t,void 0,this.framework)}for(lS.draw(s,r,this.framework),e=0;e<s.length;e++)if(t=this.groups[s[e]],r[s[e]].length>0)switch(t.options.style){case"line":Object.prototype.hasOwnProperty.call(h,s[e])||(h[s[e]]=cS.calcPath(r[s[e]],t)),cS.draw(h[s[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||aS.draw(r[s[e]],t,this.framework)}}}return tS(this.svgElements),!1},mS.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;a<t.length;a++){s=void 0,r=void 0;for(var h=i;h<e.length;h++){if(e[h].x===t[a].x){s=e[h],r=e[h],i=h;break}if(e[h].x>t[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,t[a].y=0==o?t[a].orginalY+r.y:t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},mS.prototype._getRelevantData=function(t,e,i,o){var n,s,r,a;if(t.length>0)for(s=0;s<t.length;s++){var h=(n=this.groups[t[s]]).getItems();if(1==kg(n.options)){var l=function(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1},c=Math.max(0,km.binarySearchValue(h,i,"x","before",l)),d=Math.min(h.length,km.binarySearchValue(h,o,"x","after",l)+1);d<=0&&(d=h.length);var u=new Array(d-c);for(r=c;r<d;r++)a=n.itemsData[r],u[r-c]=a;e[t[s]]=u}else e[t[s]]=n.itemsData}},mS.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 o=e[t[i]];if(o.length>0){var n,s=o.length,r=s/(this.body.util.toGlobalScreen(o[o.length-1].x)-this.body.util.toGlobalScreen(o[0].x));n=Math.min(Math.ceil(.2*s),Math.max(1,Math.round(r)));for(var a=new Array(s),h=0;h<s;h+=n){a[Math.round(h/n)]=o[h]}e[t[i]]=Ov(a).call(a,0,Math.round(s/n))}}},mS.prototype._getYRanges=function(t,e,i){var o,n,s,r,a=[],h=[];if(t.length>0){for(s=0;s<t.length;s++)o=e[t[s]],r=this.groups[t[s]].options,o.length>0&&(n=this.groups[t[s]],!0===r.stack&&"bar"===r.style?"left"===r.yAxisOrientation?a=Zm(a).call(a,o):h=Zm(h).call(h,o):i[t[s]]=n.getYRange(o,t[s]));lS.getStackedYRange(a,i,t,"__barStackLeft","left"),lS.getStackedYRange(h,i,t,"__barStackRight","right")}},mS.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,l=-1e9,c=-1e9;if(t.length>0){for(var d=0;d<t.length;d++){var u=this.groups[t[d]];u&&"right"!=u.options.yAxisOrientation?(s=!0,a=1e9,l=-1e9):u&&u.options.yAxisOrientation&&(r=!0,h=1e9,c=-1e9)}for(d=0;d<t.length;d++)Object.prototype.hasOwnProperty.call(e,t[d])&&!0!==e[t[d]].ignore&&(i=e[t[d]].min,o=e[t[d]].max,"right"!=e[t[d]].yAxisOrientation?(s=!0,a=a>i?i:a,l=l<o?o:l):(r=!0,h=h>i?i:h,c=c<o?o:c));1==s&&this.yAxisLeft.setRange(a,l),1==r&&this.yAxisRight.setRange(h,c)}n=this._toggleAxisVisiblity(s,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(r,this.yAxisRight)||n,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(this.yAxisLeft.lineOffset=1==r?this.yAxisRight.width:0,n=this.yAxisLeft.redraw()||n,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"];for(d=0;d<p.length;d++)-1!=pv(t).call(t,p[d])&&Ov(t).call(t,pv(t).call(t,p[d]),1);return n},mS.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},mS.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},mS.prototype._convertYcoordinates=function(t,e){var i=this.yAxisLeft,o=Number(this.svg.style.height.replace("px",""));"right"==e.options.yAxisOrientation&&(i=this.yAxisRight);for(var n=0;n<t.length;n++)t[n].screen_y=Math.round(i.convertValue(t[n].y));e.setZeroPosition(Math.min(o,i.convertValue(0)))};let fS="string",gS="boolean",vS="number",bS="date",yS="object",wS="moment",_S={configure:{enabled:{boolean:gS},filter:{boolean:gS,function:"function"},container:{dom:"dom"},__type__:{object:yS,boolean:gS,function:"function"}},alignCurrentTime:{string:fS,undefined:"undefined"},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:fS},sort:{boolean:gS},sampling:{boolean:gS},stack:{boolean:gS},graphHeight:{string:fS,number:vS},shaded:{enabled:{boolean:gS},orientation:{string:["bottom","top","zero","group"]},groupId:{object:yS},__type__:{boolean:gS,object:yS}},style:{string:["line","bar","points"]},barChart:{width:{number:vS},minWidth:{number:vS},sideBySide:{boolean:gS},align:{string:["left","center","right"]},__type__:{object:yS}},interpolation:{enabled:{boolean:gS},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:vS},__type__:{object:yS,boolean:gS}},drawPoints:{enabled:{boolean:gS},onRender:{function:"function"},size:{number:vS},style:{string:["square","circle"]},__type__:{object:yS,boolean:gS,function:"function"}},dataAxis:{showMinorLabels:{boolean:gS},showMajorLabels:{boolean:gS},showWeekScale:{boolean:gS},icons:{boolean:gS},width:{string:fS,number:vS},visible:{boolean:gS},alignZeros:{boolean:gS},left:{range:{min:{number:vS,undefined:"undefined"},max:{number:vS,undefined:"undefined"},__type__:{object:yS}},format:{function:"function"},title:{text:{string:fS,number:vS,undefined:"undefined"},style:{string:fS,undefined:"undefined"},__type__:{object:yS}},__type__:{object:yS}},right:{range:{min:{number:vS,undefined:"undefined"},max:{number:vS,undefined:"undefined"},__type__:{object:yS}},format:{function:"function"},title:{text:{string:fS,number:vS,undefined:"undefined"},style:{string:fS,undefined:"undefined"},__type__:{object:yS}},__type__:{object:yS}},__type__:{object:yS}},legend:{enabled:{boolean:gS},icons:{boolean:gS},left:{visible:{boolean:gS},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:yS}},right:{visible:{boolean:gS},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:yS}},__type__:{object:yS,boolean:gS}},groups:{visibility:{any:"any"},__type__:{object:yS}},autoResize:{boolean:gS},throttleRedraw:{number:vS},clickToUse:{boolean:gS},end:{number:vS,date:bS,string:fS,moment:wS},format:{minorLabels:{millisecond:{string:fS,undefined:"undefined"},second:{string:fS,undefined:"undefined"},minute:{string:fS,undefined:"undefined"},hour:{string:fS,undefined:"undefined"},weekday:{string:fS,undefined:"undefined"},day:{string:fS,undefined:"undefined"},week:{string:fS,undefined:"undefined"},month:{string:fS,undefined:"undefined"},quarter:{string:fS,undefined:"undefined"},year:{string:fS,undefined:"undefined"},__type__:{object:yS}},majorLabels:{millisecond:{string:fS,undefined:"undefined"},second:{string:fS,undefined:"undefined"},minute:{string:fS,undefined:"undefined"},hour:{string:fS,undefined:"undefined"},weekday:{string:fS,undefined:"undefined"},day:{string:fS,undefined:"undefined"},week:{string:fS,undefined:"undefined"},month:{string:fS,undefined:"undefined"},quarter:{string:fS,undefined:"undefined"},year:{string:fS,undefined:"undefined"},__type__:{object:yS}},__type__:{object:yS}},moment:{function:"function"},height:{string:fS,number:vS},hiddenDates:{start:{date:bS,number:vS,string:fS,moment:wS},end:{date:bS,number:vS,string:fS,moment:wS},repeat:{string:fS},__type__:{object:yS,array:"array"}},locale:{string:fS},locales:{__any__:{any:"any"},__type__:{object:yS}},max:{date:bS,number:vS,string:fS,moment:wS},maxHeight:{number:vS,string:fS},maxMinorChars:{number:vS},min:{date:bS,number:vS,string:fS,moment:wS},minHeight:{number:vS,string:fS},moveable:{boolean:gS},multiselect:{boolean:gS},orientation:{string:fS},showCurrentTime:{boolean:gS},showMajorLabels:{boolean:gS},showMinorLabels:{boolean:gS},showWeekScale:{boolean:gS},snap:{function:"function",null:"null"},start:{date:bS,number:vS,string:fS,moment:wS},timeAxis:{scale:{string:fS,undefined:"undefined"},step:{number:vS,undefined:"undefined"},__type__:{object:yS}},width:{string:fS,number:vS},zoomable:{boolean:gS},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:vS},zoomMin:{number:vS},zIndex:{number:vS},__type__:{object:yS}},xS={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 CS(t,e,i,o){var n,s,r,a,h,l,c;if(!vi(i)&&!bm(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 u=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:qo,width:null,height:null,maxHeight:null,minHeight:null},this.options=km.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:Pi(n=this.on).call(n,this),off:Pi(s=this.off).call(s,this),emit:Pi(r=this.emit).call(r,this)},hiddenDates:[],util:{getScale:()=>u.timeAxis.step.scale,getStep:()=>u.timeAxis.step.step,toScreen:Pi(a=u._toScreen).call(a,u),toGlobalScreen:Pi(h=u._toGlobalScreen).call(h,u),toTime:Pi(l=u._toTime).call(l,u),toGlobalTime:Pi(c=u._toGlobalTime).call(c,u)}},this.range=new Hg(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new sb(this.body),this.components.push(this.timeAxis),this.currentTime=new Db(this.body),this.components.push(this.currentTime),this.linegraph=new mS(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){u.emit("click",u.getEventProperties(t))}),this.on("doubletap",function(t){u.emit("doubleClick",u.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){u.emit("contextmenu",u.getEventProperties(t))},this.initialFitDone=!1,this.on("changed",function(){if(null!=u.itemsData){if(!u.initialFitDone&&!u.options.rollingMode)if(u.initialFitDone=!0,null!=u.options.start||null!=u.options.end){if(null==u.options.start||null==u.options.end)var t=u.getItemRange();var e=null!=u.options.start?u.options.start:t.min,i=null!=u.options.end?u.options.end:t.max;u.setWindow(e,i,{animation:!1})}else u.fit({animation:!1});u.initialDrawDone||!u.initialRangeChangeDone&&(u.options.start||u.options.end)&&!u.options.rollingMode||(u.initialDrawDone=!0,u.dom.root.style.visibility="visible",u.dom.loadingScreen.parentNode.removeChild(u.dom.loadingScreen),u.options.onInitialDrawComplete&&Zi(()=>u.options.onInitialDrawComplete(),0))}}),o&&this.setOptions(o),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}CS.prototype=new Sb,CS.prototype.setOptions=function(t){!0===yC.validate(t,_S)&&console.log("%cErrors have been found in the supplied options object.",bC),Sb.prototype.setOptions.call(this,t)},CS.prototype.setItems=function(t){var e,o=null==this.itemsData;if(e=t?bm(t)?xm(t):xm(new i.DataSet(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.linegraph&&this.linegraph.setItems(null!=e?e.rawDS:null),o)if(null!=this.options.start||null!=this.options.end){var n=null!=this.options.start?this.options.start:null,s=null!=this.options.end?this.options.end:null;this.setWindow(n,s,{animation:!1})}else this.fit({animation:!1})},CS.prototype.setGroups=function(t){var e;e=t?bm(t)?t:new i.DataSet(t):null,this.groupsData=e,this.linegraph.setGroups(e)},CS.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+"'"},CS.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]))},CS.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(Object.prototype.hasOwnProperty.call(this.linegraph.groups,i)&&!0===this.linegraph.groups[i].visible)for(var o=0;o<this.linegraph.groups[i].itemsData.length;o++){var n=this.linegraph.groups[i].itemsData[o],s=km.convert(n.x,"Date").valueOf();t=null==t||t>s?s:t,e=null==e||e<s?s:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},CS.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-km.getAbsoluteLeft(this.dom.centerContainer),n=i-km.getAbsoluteTop(this.dom.centerContainer),s=this._toTime(o),r=Cb.customTimeFromTarget(t),a=km.getTarget(t),h=null;km.hasParent(a,this.timeAxis.dom.foreground)||this.timeAxis2&&km.hasParent(a,this.timeAxis2.dom.foreground)?h="axis":km.hasParent(a,this.linegraph.yAxisLeft.dom.frame)||km.hasParent(a,this.linegraph.yAxisRight.dom.frame)?h="data-axis":km.hasParent(a,this.linegraph.legendLeft.dom.frame)||km.hasParent(a,this.linegraph.legendRight.dom.frame)?h="legend":null!=r?h="custom-time":km.hasParent(a,this.currentTime.bar)?h="current-time":km.hasParent(a,this.dom.center)&&(h="background");var l=[],c=this.linegraph.yAxisLeft,d=this.linegraph.yAxisRight;return!c.hidden&&this.itemsData.length>0&&l.push(c.screenToValue(n)),!d.hidden&&this.itemsData.length>0&&l.push(d.screenToValue(n)),{event:t,customTime:r?r.options.id:null,what:h,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:s,value:l}},CS.prototype._createConfigurator=function(){return new qC(this,this.dom.container,xS)};const SS=function(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch(t){return"en"}}();e.locale(SS);const DS={Core:Sb,DateUtil:zg,Range:Hg,stack:zx,TimeStep:nb,components:{items:{Item:Yx,BackgroundItem:qx,BoxItem:Vx,ClusterItem:cC,PointItem:Ux,RangeItem:Xx},BackgroundGroup:Wx,Component:Lf,CurrentTime:Db,CustomTime:Cb,DataAxis:rS,DataScale:sS,GraphGroup:dS,Group:Gx,ItemSet:fC,Legend:uS,LineGraph:mS,TimeAxis:sb}};t.Graph2d=CS,t.Timeline=KC,t.timeline=DS});
//# sourceMappingURL=vis-timeline-graph2d.min.js.map