((t,e)=>{"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,e(t.vis=t.vis||{}))})(this,function(M){function N(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function F(t){return t&&t.Math==Math&&t}function r(t){try{return!!t()}catch(t){return!0}}function z(t){return nt(rt(t),8,-1)}function U(t){if("Function"===ot(t))return it(t)}function q(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}function Y(t){return null==t}function W(t){if(gt(t))throw mt("Can't call method on "+t);return t}function G(t){return bt(xt(t))}function X(t){return Ot(t)?t:void 0}function V(t,e){return arguments.length<2?X(Et[t])||X(Tt[t]):Et[t]&&Et[t][e]||Tt[t]&&Tt[t][e]}var B={},H={get exports(){return B},set exports(t){B=t}},$={},n={get exports(){return $},set exports(t){$=t}},J={},K={get exports(){return J},set exports(t){J=t}},t=F("object"==typeof globalThis&&globalThis)||F("object"==typeof window&&window)||F("object"==typeof self&&self)||F("object"==typeof t&&t)||function(){return this}()||Function("return this")(),o=r,o=!o(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),i=o,Q=Function.prototype,Z=Q.apply,tt=Q.call,Q="object"==typeof Reflect&&Reflect.apply||(i?tt.bind(Z):function(){return tt.apply(Z,arguments)}),i=o,a=Function.prototype,et=a.call,a=i&&a.bind.bind(et,et),i=i?a:function(t){return function(){return et.apply(t,arguments)}},a=i,rt=a({}.toString),nt=a("".slice),ot=z,it=i,a="object"==typeof document&&document.all,s=void 0===a&&void 0!==a,a={all:a,IS_HTMLDDA:s},s=a,at=s.all,s=s.IS_HTMLDDA?function(t){return"function"==typeof t||t===at}:function(t){return"function"==typeof t},st={},ut=r,ut=!ut(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),ct=o,ft=Function.prototype.call,ct=ct?ft.bind(ft):function(){return ft.apply(ft,arguments)},lt={},u={}.propertyIsEnumerable,pt=Object.getOwnPropertyDescriptor,ht=pt&&!u.call({1:2},1),ht=(lt.f=ht?function(t){var e=pt(this,t);return!!e&&e.enumerable}:u,i),u=r,dt=z,vt=Object,yt=ht("".split),ht=u(function(){return!vt("z").propertyIsEnumerable(0)})?function(t){return"String"==dt(t)?yt(t,""):vt(t)}:vt,gt=Y,mt=TypeError,bt=ht,xt=W,_t=s,u=a,wt=u.all,a=u.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:_t(t)||t===wt}:function(t){return"object"==typeof t?null!==t:_t(t)},u={},Et=u,Tt=t,Ot=s,c=i,c=c({}.isPrototypeOf),St="undefined"!=typeof navigator&&String(navigator.userAgent)||"",f=t,l=St,kt=f.process,f=f.Deno,kt=kt&&kt.versions||f&&f.version,f=kt&&kt.v8;if(f){d=f.split(".");Ut=0o;)!Qn(n,r=e[o++])||~to(i,r)||ro(i,r);return i}function Cr(t){return lo[t]||(lo[t]=fo(t))}function Rr(){}function Mr(t){t.write(To(""));t.close();var e=t.parentWindow.Object;t=null;return e}function Nr(t,e,r){for(var n=Ao(t),o=jo(e,n),i=jo(void 0===r?n:r,n),a=Io(Do(i-o,0)),s=0;o{try{return t[e]}catch(t){}})(e=pn(t),ln))?r:hn?cn(e):"Object"==(r=cn(e))&&un(e.callee)?"Arguments":r},H=i,b=s,x=v,dn=H(Function.toString),H=(b(x.inspectSource)||(x.inspectSource=function(t){return dn(t)}),x.inspectSource),b=i,x=r,vn=s,yn=fn,gn=V,mn=H,bn=[],xn=gn("Reflect","construct"),_n=/^\s*(?:class|function)\b/,wn=b(_n.exec),En=!_n.exec(Or),gn=(kr.sham=!0,!xn||x(function(){var t;return Sr(Sr.call)||!Sr(Object)||!Sr(function(){t=!0})||t})?kr:Sr),Tn=n,On=gn,Sn=a,b=p,kn=b("species"),jn=Array,An=function(t){var e;if(Tn(t)){e=t.constructor;if(On(e)&&(e===jn||Tn(e.prototype)))e=void 0;else if(Sn(e)){e=e[kn];null===e&&(e=void 0)}}return void 0===e?jn:e},Pn=r,x=p,In=kt,Dn=x("species"),b=h,x=r,Ln=n,Cn=a,Rn=It,Mn=wr,Nn=Er,Fn=Tr,zn=jr,Un=Ar,qn=p,Yn=kt,Wn=qn("isConcatSpreadable"),qn=51<=Yn||!x(function(){var t=[];t[Wn]=!1;return t.concat()[0]!==t}),Yn=!qn||!Un("concat"),Gn=(b({target:"Array",proto:!0,arity:1,forced:Yn},{concat:function(t){for(var e,r,n,o,i,a=Rn(this),s=zn(a,0),u=0,c=-1,f=arguments.length;c",xo="<",_o="prototype",wo="script",Eo=mo("IE_PROTO"),To=function(t){return xo+wo+bo+t+xo+"/"+wo+bo},Oo=function(){try{Wr=new ActiveXObject("htmlfile")}catch(t){}Oo="undefined"==typeof document||document.domain&&Wr?Mr(Wr):(()=>{var t=go("iframe"),e="java"+wo+":";t.style.display="none";yo.appendChild(t);t.src=String(e);e=t.contentWindow.document;e.open();e.write(To("document.F=Object"));e.close();return e.F})();for(var t=vo.length;t--;)delete Oo[_o][vo[t]];return Oo()},mo=(io[Eo]=!0,Object.create||function(t,e){var r;if(null!==t){Rr[_o]=po(t);r=new Rr;Rr[_o]=null;r[Eo]=t}else r=Oo();return void 0===e?r:ho.f(r,e)}),io={},So=Lr,ko=Yn.concat("length","prototype"),Yn=(io.f=Object.getOwnPropertyNames||function(t){return So(t,ko)},{}),jo=Ir,Ao=wr,Po=Tr,Io=Array,Do=Math.max,Lo=z,Co=G,Ro=io.f,Mo=Nr,No="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Fo=(Yn.f=function(t){if(!No||"Window"!=Lo(t))return Ro(Co(t));try{return Ro(t)}catch(t){return Mo(No)}},{}),zo=(Fo.f=Object.getOwnPropertySymbols,f),Uo=Ut,_={},qo=p,Yo=(_.f=qo,u),Wo=oe,Go=_,Xo=Ut.f,Vo=ct,Bo=V,Ho=p,$o=Fr,qo=K,Jo=fn,qo=qo?{}.toString:function(){return"[object "+Jo(this)+"]"},Ko=K,Qo=Ut.f,Zo=f,ti=oe,ei=qo,K=p,ri=K("toStringTag"),qo=t,K=s,qo=qo.WeakMap,K=K(qo)&&/native code/.test(String(qo)),qo=K,K=t,ni=a,oi=f,ii=oe,w=Cr,E=Un,ai="Object already initialized",si=K.TypeError,K=K.WeakMap;if(qo||v.state){var ui=v.state||(v.state=new K);ui.get=ui.get;ui.has=ui.has;ui.set=ui.set;Gr=function(t,e){if(ui.has(t))throw si(ai);e.facade=t;ui.set(t,e);return e};Xr=function(t){return ui.get(t)||{}};Vr=function(t){return ui.has(t)}}else{var ci=w("state");E[ci]=!0;Gr=function(t,e){if(ii(t,ci))throw si(ai);e.facade=t;oi(t,ci,e);return e};Xr=function(t){return ii(t,ci)?t[ci]:{}};Vr=function(t){return ii(t,ci)}}function fi(h){var d=1==h,v=2==h,y=3==h,g=4==h,m=6==h,b=7==h,x=5==h||m;return function(t,e,r,n){for(var o,i,a=xi(t),s=bi(a),u=mi(e,r),c=_i(s),f=0,l=n||wi,p=d?l(t,c):v||b?l(t,0):void 0;f{var r,n=!1,t={};try{r=ds(Object.prototype,"__proto__","set");r(t,[]);n=t instanceof Array}catch(t){}return function(t,e){vs(t);ys(e);n?r(t,e):t.__proto__=e;return t}})():void 0),gs=h,ms=ct,I=zi,bs=function(t,e,r,n){var o=e+" Iterator";t.prototype=is(os,{next:as(+!n,r)});ss(t,o,!1,!0);us[o]=Za;return t},xs=Ni,_s=Yr,ws=Fr,A=p,Es=L,P=k,Ts=I.PROPER,Os=P.BUGGY_SAFARI_ITERATORS,Ss=A("iterator"),ks="values",js="entries",As=G,w=L,O=qo,E=es,Ps=rs,Is="Array Iterator",Ds=O.set,Ls=O.getterFor(Is);E(Array,"Array",function(t,e){Ds(this,{type:Is,target:As(t),index:0,kind:e})},function(){var t=Ls(this),e=t.target,r=t.kind,n=t.index++;if(!e||n>=e.length)return t.target=void 0,Ps(void 0,!0);return Ps("keys"==r?n:"values"==r?e[n]:[n,e[n]],!1)},"values");w.Arguments=w.Array;var Cs,D={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},Rs=t,Ms=fn,Ns=f,Fs=L,v=p,zs=v("toStringTag");for(Cs in D){var Us=Rs[Cs],Us=Us&&Us.prototype;Us&&Ms(Us)!==zs&&Ns(Us,zs,Cs);Fs[Cs]=Fs.Array}for(var S=Xi,T=S,l=Ur,Ui=(l("dispose"),T),j=Ui,k=Ur,I=(k("asyncDispose"),h),P=V,A=i,O=P("Symbol"),qs=O.keyFor,Ys=A(O.prototype.valueOf),E=(I({target:"Symbol",stat:!0},{isRegistered:function(t){try{return void 0!==qs(Ys(t))}catch(t){return!1}}}),h),w=ee,v=V,D=i,Ws=d,Gs=p,Xs=v("Symbol"),Vs=Xs.isWellKnown,Bs=v("Object","getOwnPropertyNames"),Hs=D(Xs.prototype.valueOf),$s=w("wks"),Js=0,Ks=Bs(Xs),Qs=Ks.length;Js=e.length)return pu(void 0,!0);e=fu(e,r);t.index+=e.length;return pu(e,!1)}),_),S=Xi.f("iterator"),l=S,Ui=l,k=Ui,P=k,j=P,A=j;R=d,R.exports=A;R=I,R.exports=nu;var yu=e(ru);function gu(t){return gu="function"==typeof eu&&"symbol"==typeof yu?function(t){return typeof t}:function(t){return t&&"function"==typeof eu&&t.constructor===eu&&t!==eu.prototype?"symbol":typeof t},gu(t)}var mu={},m={get exports(){return mu},set exports(t){mu=t}},bu={},O={get exports(){return bu},set exports(t){bu=t}},g=_,v=g.f("toPrimitive"),D=v,w=D,E=w,Xi=E,S=Xi,l=S;R=O,R.exports=l;R=m,R.exports=bu;var xu=e(mu);function _u(t){var e=((t,e)=>{if("object"!==gu(t)||null===t)return t;var r=t[xu];if(void 0===r)return("string"===e?String:Number)(t);r=r.call(t,e||"default");if("object"!==gu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")})(t,"string");return"symbol"===gu(e)?e:String(e)}function wu(t,e){for(var r=0;r{function o(t,e,r){var n;N(this,o);C(this,"_source",void 0);C(this,"_transformers",void 0);C(this,"_target",void 0);C(this,"_listeners",{add:Vu(n=this._add).call(n,this),remove:Vu(n=this._remove).call(n,this),update:Vu(n=this._update).call(n,this)});this._source=t;this._transformers=e;this._target=r}Eu(o,[{key:"all",value:function(){this._target.update(this._transformItems(this._source.get()));return this}},{key:"start",value:function(){this._source.on("add",this._listeners.add);this._source.on("remove",this._listeners.remove);this._source.on("update",this._listeners.update);return this}},{key:"stop",value:function(){this._source.off("add",this._listeners.add);this._source.off("remove",this._listeners.remove);this._source.off("update",this._listeners.update);return this}},{key:"_transformItems",value:function(t){var e;return oc(e=this._transformers).call(e,function(t,e){return e(t)},t)}},{key:"_add",value:function(t,e){null!=e&&this._target.add(this._transformItems(this._source.get(e.items)))}},{key:"_update",value:function(t,e){null!=e&&this._target.update(this._transformItems(this._source.get(e.items)))}},{key:"_remove",value:function(t,e){null!=e&&this._target.remove(this._transformItems(e.oldData))}}]);return o})(),Mc=(()=>{function e(t){N(this,e);C(this,"_source",void 0);C(this,"_transformers",[]);this._source=t}Eu(e,[{key:"filter",value:function(e){this._transformers.push(function(t){return fc(t).call(t,e)});return this}},{key:"map",value:function(e){this._transformers.push(function(t){return yc(t).call(t,e)});return this}},{key:"flatMap",value:function(e){this._transformers.push(function(t){return Pc(t).call(t,e)});return this}},{key:"to",value:function(t){return new Rc(this._source,this._transformers,t)}}]);return e})(),Nc={},_={get exports(){return Nc},set exports(t){Nc=t}},Fc=ct,zc=Nt,Uc=Pt,qc=Nt,Yc=Ic,l=p,Wc=L,Gc=l("iterator"),Xc=Array.prototype,Vc=fn,Bc=Pt,Hc=Y,$c=L,S=p,Jc=S("iterator"),Kc=ct,Qc=At,Zc=Nt,tf=jt,ef=Lc,rf=TypeError,nf=Mt,of=ct,af=It,sf=function(e,t,r,n){try{return n?t(qc(r)[0],r[1]):t(r)}catch(t){Yc(e,"throw",t)}},uf=Dc,cf=gn,ff=wr,lf=Tr,pf=Cc,hf=Lc,df=Array,O=p,vf=O("iterator"),yf=!1;try{var gf=0,mf={next:function(){return{done:!!gf++}},return:function(){yf=!0}};mf[vf]=function(){return this};Array.from(mf,function(){throw 2})}catch(t){}function bf(t,e){if(!e&&!yf)return!1;var r=!1;try{var n={};n[vf]=function(){return{next:function(){return{done:r=!0}}}};t(n)}catch(t){}return r}function xf(t){var e,r,n,o,i,a,s=af(t),u=cf(this),c=arguments.length,f=1s;){r=o(n,e=i[s++]);void 0!==r&&qf(a,e,r)}return a}}),u),m=l.Object.getOwnPropertyDescriptors,S=m,L=S,Yf=(R=E,R.exports=L,e(Lf)),Wf={},O={get exports(){return Wf},set exports(t){Wf=t}},Gf={},I={get exports(){return Gf},set exports(t){Gf=t}},mf=h,w=ut,_=x.f,j=(mf({target:"Object",stat:!0,forced:Object.defineProperties!==_,sham:!w},{defineProperties:_}),u),Xf=j.Object,o=I.exports=function(t,e){return Xf.defineProperties(t,e)},A=(Xf.defineProperties.sham&&(o.sham=!0),Gf),P=A,Vf=(R=O,R.exports=P,e(Wf)),Bf={},k={get exports(){return Bf},set exports(t){Bf=t}},Hf=(R=k,R.exports=y,e(Bf)),$f={},l={get exports(){return $f},set exports(t){$f=t}},Jf={},m={get exports(){return Jf},set exports(t){Jf=t}},S=h,E=n,L=(S({target:"Array",stat:!0},{isArray:E}),u),x=L.Array.isArray,mf=x,w=mf,_=w,j=_,I=j,o=I;R=m,R.exports=o;R=l,R.exports=Jf;var Kf=e($f);function Qf(t){var e=t.slice;return t===dl||pl(dl,t)&&e===dl.slice?hl:e}var Zf={},A={get exports(){return Zf},set exports(t){Zf=t}},tl={},O={get exports(){return tl},set exports(t){tl=t}},P=h,el=n,rl=gn,nl=a,ol=Ir,il=wr,al=G,sl=Tr,k=p,y=Ar,ul=Ri,S=y("slice"),cl=k("species"),fl=Array,ll=Math.max,E=(P({target:"Array",proto:!0,forced:!S},{slice:function(t,e){var r,n,o,i=al(this),a=il(i),s=ol(t,a),u=ol(void 0===e?a:e,a);if(el(i)){r=i.constructor;if(rl(r)&&(r===fl||el(r.prototype)))r=void 0;else if(nl(r)){r=r[cl];null===r&&(r=void 0)}if(r===fl||void 0===r)return ul(i,s,u)}n=new(void 0===r?fl:r)(ll(u-s,0));for(o=0;st.length)&&(e=t.length);for(var r=0,n=new Array(e);r{if(Kf(t))return t})(t)||((t,e)=>{var r=null==t?null:void 0!==eu&&Tf(t)||t["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}})(t,e)||xl(t,e)||(()=>{throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function wl(t){return(t=>{if(Kf(t))return bl(t)})(t)||(t=>{if(void 0!==eu&&null!=Tf(t)||null!=t["@@iterator"])return ml(t)})(t)||xl(t)||(()=>{throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function El(t){var e=t.concat;return t===Gl||Yl(Gl,t)&&e===Gl.concat?Wl:e}function Tl(t){var e=t.forEach;return t===lp||cp(lp,t)&&e===lp.forEach||up(pp,sp(t))?fp:e}function Ol(t){var e=t.reverse;return t===bp||gp(bp,t)&&e===bp.reverse?mp:e}function Sl(t,e){if(!delete t[e])throw Sp("Cannot delete property "+Op(e)+" of "+Op(t))}function kl(t){var e=t.splice;return t===Up||Fp(Up,t)&&e===Up.splice?zp:e}function jl(t){var e=t.includes;return t===vh||ph(vh,t)&&e===vh.includes?hh:"string"==typeof t||t===yh||ph(yh,t)&&e===yh.includes?dh:e}function Al(s){return function(t){for(var e,r=Eh(t),n=wh(r),o=n.length,i=0,a=[];is,n=fd(t)?t:hd(t),o=r?ld(arguments,s):[],r=r?function(){cd(n,this,o)}:n;return a?i(r,e):i(r)}:i}function Nl(t){for(var e=gd(this),r=bd(e),n=arguments.length,o=md(1>>0||(Fh(Nh,r)?16:10))}:Rh,lt=h,j=b,L=(lt({global:!0,forced:parseInt!=j},{parseInt:j}),u),ht=L.parseInt,Fo=ht,O=Fo,zh=(R=k,R.exports=O,{}),I={get exports(){return zh},set exports(t){zh=t}},T=h,m=U,Uh=qn.indexOf,_=ku,qh=m([].indexOf),Yh=!!qh&&1/qh([1],1,-0)<0,Mi=Yh||!_("indexOf"),P=(T({target:"Array",proto:!0,forced:Mi},{indexOf:function(t){var e=1{if(!Md)return!1;var e={},r=Cd.CSS&&Cd.CSS.supports;["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return e[t]=!r||Cd.CSS.supports("touch-action",t)});return e})(),Wd="ontouchstart"in Cd,Gd=void 0!==Ld(Cd,"PointerEvent"),Xd=Wd&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Vd="touch",Bd="mouse",Hd=25,$d=1,Jd=4,Kd=8,Qd=1,Zd=2,tv=4,ev=8,rv=16,nv=Zd|tv,ov=ev|rv,iv=nv|ov,av=["x","y"],sv=["clientX","clientY"];function uv(t,e,r){if(t)if(t.forEach)t.forEach(e,r);else if(void 0!==t.length){n=0;for(;n{function t(t,e){this.manager=t;this.set(e)}var e=t.prototype;e.set=function(t){t===Nd&&(t=this.compute());Md&&this.manager.element.style&&Yd[t]&&(this.manager.element.style[Rd]=t);this.actions=t.toLowerCase().trim()};e.update=function(){this.set(this.manager.options.touchAction)};e.compute=function(){var t,e,r,n=[];uv(this.manager.recognizers,function(t){cv(t.options.enable,[t])&&(n=n.concat(t.getTouchAction()))});return t=n.join(" "),fv(t,zd)||(e=fv(t,Ud),r=fv(t,qd),e&&r)?zd:e||r?e?Ud:qd:fv(t,Fd)?Fd:"auto"};e.preventDefaults=function(t){var e=t.srcEvent,r=t.offsetDirection;if(!this.manager.session.prevented){var n=this.actions,o=fv(n,zd)&&!Yd[zd],i=fv(n,qd)&&!Yd[qd],n=fv(n,Ud)&&!Yd[Ud];if(o){var a=1===t.pointers.length,s=t.distance<2,u=t.deltaTime<250;if(a&&s&&u)return}return n&&i?void 0:o||i&&r&nv||n&&r&ov?this.preventSrc(e):void 0}e.preventDefault()};e.preventSrc=function(t){this.manager.session.prevented=!0;t.preventDefault()};return t})();function pv(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function hv(t){var e=t.length;if(1===e)return{x:Pd(t[0].clientX),y:Pd(t[0].clientY)};for(var r=0,n=0,o=0;o=Id(e)?t<0?Zd:tv:e<0?ev:rv}function mv(t,e,r){return{x:e/t||0,y:r/t||0}}function bv(t,e){var r=t.session,n=e.pointers,o=n.length;r.firstInput||(r.firstInput=dv(e));1Id(f.y)?f.x:f.y;e.scale=i?(u=i.pointers,c=n,vv(c[0],c[1],sv)/vv(u[0],u[1],sv)):1;e.rotation=i?(c=i.pointers,u=n,yv(u[1],u[0],sv)+yv(c[1],c[0],sv)):0;e.maxPointers=!r.prevInput||e.pointers.length>r.prevInput.maxPointers?e.pointers.length:r.prevInput.maxPointers;u=r,c=e,s=u.lastInterval||c,o=c.timeStamp-s.timeStamp;if(c.eventType!==Kd&&(HdId(o.y)?o.x:o.y,l=gv(l,a);u.lastInterval=c}else{d=s.velocity;p=s.velocityX;h=s.velocityY;l=s.direction}c.velocity=d;c.velocityX=p;c.velocityY=h;c.direction=l;f=t.element,i=e.srcEvent,n=i.composedPath?i.composedPath()[0]:i.path?i.path[0]:i.target;pv(n,f)&&(f=n);e.target=f}function xv(t,e,r){var n=r.pointers.length,o=r.changedPointers.length,i=e&$d&&n-o==0,n=e&(Jd|Kd)&&n-o==0;r.isFirst=!!i;r.isFinal=!!n;i&&(t.session={});r.eventType=e;bv(t,r);t.emit("hammer.input",r);t.recognize(r);t.session.prevInput=r}function _v(t){return t.trim().split(/\s+/g)}function wv(e,t,r){uv(_v(t),function(t){e.addEventListener(t,r,!1)})}function Ev(e,t,r){uv(_v(t),function(t){e.removeEventListener(t,r,!1)})}function Tv(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var Ov=(()=>{function t(e,t){var r=this;this.manager=e;this.callback=t;this.element=e.element;this.target=e.options.inputTarget;this.domHandler=function(t){cv(e.options.enable,[e])&&r.handler(t)};this.init()}var e=t.prototype;e.handler=function(){};e.init=function(){this.evEl&&wv(this.element,this.evEl,this.domHandler);this.evTarget&&wv(this.target,this.evTarget,this.domHandler);this.evWin&&wv(Tv(this.element),this.evWin,this.domHandler)};e.destroy=function(){this.evEl&&Ev(this.element,this.evEl,this.domHandler);this.evTarget&&Ev(this.target,this.evTarget,this.domHandler);this.evWin&&Ev(Tv(this.element),this.evWin,this.domHandler)};return t})();function Sv(t,e,r){if(t.indexOf&&!r)return t.indexOf(e);for(var n=0;n{Sd(r,e);function r(){var t=r.prototype;t.evEl=Av;t.evWin=Pv;t=e.apply(this,arguments)||this;t.store=t.manager.session.pointerEvents=[];return t}var t=r.prototype;t.handler=function(t){var e=this.store,r=!1,n=t.type.toLowerCase().replace("ms",""),n=kv[n],o=jv[t.pointerType]||t.pointerType,i=o===Vd,a=Sv(e,t.pointerId,"pointerId");if(n&$d&&(0===t.button||i)){if(a<0){e.push(t);a=e.length-1}}else n&(Jd|Kd)&&(r=!0);if(!(a<0)){e[a]=t;this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t});r&&e.splice(a,1)}};return r})(Ov);function Dv(t){return Array.prototype.slice.call(t,0)}function Lv(t,r,e){for(var n=[],o=[],i=0;ie[r]}):n.sort());return n}var Cv={touchstart:$d,touchmove:2,touchend:Jd,touchcancel:Kd},Rv=(e=>{Sd(r,e);function r(){var t;r.prototype.evTarget="touchstart touchmove touchend touchcancel";t=e.apply(this,arguments)||this;t.targetIds={};return t}var t=r.prototype;t.handler=function(t){var e=Cv[t.type],r=function(t,e){var r,n,o=Dv(t.touches),i=this.targetIds;if(e&(2|$d)&&1===o.length)return i[o[0].identifier]=!0,[o,o];var a=Dv(t.changedTouches),s=[],u=this.target;n=o.filter(function(t){return pv(t.target,u)});if(e===$d){r=0;for(;r{Sd(r,e);function r(){var t=r.prototype;t.evEl="mousedown";t.evWin="mousemove mouseup";t=e.apply(this,arguments)||this;t.pressed=!1;return t}var t=r.prototype;t.handler=function(t){var e=Mv[t.type];e&$d&&0===t.button&&(this.pressed=!0);2&e&&1!==t.which&&(e=Jd);if(this.pressed){e&Jd&&(this.pressed=!1);this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Bd,srcEvent:t})}};return r})(Ov),Fv=2500,zv=25;function Uv(t){var e=t.changedPointers,e=e[0];if(e.identifier===this.primaryTouch){var r={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(r);setTimeout(function(){var t=n.indexOf(r);-1{var t=(r=>{Sd(t,r);function t(t,e){var i=r.call(this,t,e)||this;i.handler=function(t,e,r){var n=r.pointerType===Vd,o=r.pointerType===Bd;if(!(o&&r.sourceCapabilities&&r.sourceCapabilities.firesTouchEvents)){if(n)!function(t,e){if(t&$d){this.primaryTouch=e.changedPointers[0].identifier;Uv.call(this,e)}else t&(Jd|Kd)&&Uv.call(this,e)}.call(kd(kd(i)),e,r);else if(o&&function(t){for(var e=t.srcEvent.clientX,r=t.srcEvent.clientY,n=0;n{function t(t){void 0===t&&(t={});this.options=Od({enable:!0},t);this.id=Wv++;this.manager=null;this.state=1;this.simultaneous={};this.requireFail=[]}var e=t.prototype;e.set=function(t){jd(this.options,t);this.manager&&this.manager.touchAction.update();return this};e.recognizeWith=function(t){if(!Yv(t,"recognizeWith",this)){var e=this.simultaneous;t=Gv(t,this);if(!e[t.id]){e[t.id]=t;t.recognizeWith(this)}}return this};e.dropRecognizeWith=function(t){if(!Yv(t,"dropRecognizeWith",this)){t=Gv(t,this);delete this.simultaneous[t.id]}return this};e.requireFailure=function(t){if(!Yv(t,"requireFailure",this)){var e=this.requireFail;t=Gv(t,this);if(-1===Sv(e,t)){e.push(t);t.requireFailure(this)}}return this};e.dropRequireFailure=function(t){if(!Yv(t,"dropRequireFailure",this)){t=Gv(t,this);var e=Sv(this.requireFail,t);-1{Sd(t,r);function t(t){var e;void 0===t&&(t={});e=r.call(this,Od({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this;e.pTime=!1;e.pCenter=!1;e._timer=null;e._input=null;e.count=0;return e}var e=t.prototype;e.getTouchAction=function(){return[Fd]};e.process=function(t){var e=this,r=this.options,n=t.pointers.length===r.pointers,o=t.distance{Sd(t,e);function t(t){void 0===t&&(t={});return e.call(this,Od({pointers:1},t))||this}var r=t.prototype;r.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e};r.process=function(t){var e=this.state,r=t.eventType,n=6&e,o=this.attrTest(t);return n&&(r&Kd||!o)?16|e:n||o?r&Jd?8|e:2&e?4|e:2:32};return t})(Vv);function $v(t){return t===rv?"down":t===ev?"up":t===Zd?"left":t===tv?"right":""}var Jv=(r=>{Sd(t,r);function t(t){var e;void 0===t&&(t={});e=r.call(this,Od({event:"pan",threshold:10,pointers:1,direction:iv},t))||this;e.pX=null;e.pY=null;return e}var e=t.prototype;e.getTouchAction=function(){var t=this.options.direction,e=[];t&nv&&e.push(qd);t&ov&&e.push(Ud);return e};e.directionTest=function(t){var e=this.options,r=!0,n=t.distance,o=t.direction,i=t.deltaX,a=t.deltaY;if(!(o&e.direction))if(e.direction&nv){o=0===i?Qd:i<0?Zd:tv;r=i!==this.pX;n=Math.abs(t.deltaX)}else{o=0===a?Qd:a<0?ev:rv;r=a!==this.pY;n=Math.abs(t.deltaY)}t.direction=o;return r&&n>e.threshold&&o&e.direction};e.attrTest=function(t){return Hv.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))};e.emit=function(t){this.pX=t.deltaX;this.pY=t.deltaY;var e=$v(t.direction);e&&(t.additionalEvent=this.options.event+e);r.prototype.emit.call(this,t)};return t})(Hv),Kv=(n=>{Sd(t,n);function t(t){void 0===t&&(t={});return n.call(this,Od({event:"swipe",threshold:10,velocity:.3,direction:nv|ov,pointers:1},t))||this}var e=t.prototype;e.getTouchAction=function(){return Jv.prototype.getTouchAction.call(this)};e.attrTest=function(t){var e,r=this.options.direction;r&(nv|ov)?e=t.overallVelocity:r&nv?e=t.overallVelocityX:r&ov&&(e=t.overallVelocityY);return n.prototype.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Id(e)>this.options.velocity&&t.eventType&Jd};e.emit=function(t){var e=$v(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t);this.manager.emit(this.options.event,t)};return t})(Hv),Qv=(r=>{Sd(t,r);function t(t){void 0===t&&(t={});return r.call(this,Od({event:"pinch",threshold:0,pointers:2},t))||this}var e=t.prototype;e.getTouchAction=function(){return[zd]};e.attrTest=function(t){return r.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)};e.emit=function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}r.prototype.emit.call(this,t)};return t})(Hv),Zv=(e=>{Sd(t,e);function t(t){void 0===t&&(t={});return e.call(this,Od({event:"rotate",threshold:0,pointers:2},t))||this}var r=t.prototype;r.getTouchAction=function(){return[zd]};r.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)};return t})(Hv),ty=(r=>{Sd(t,r);function t(t){var e;void 0===t&&(t={});e=r.call(this,Od({event:"press",pointers:1,time:251,threshold:9},t))||this;e._timer=null;e._input=null;return e}var e=t.prototype;e.getTouchAction=function(){return["auto"]};e.process=function(t){var e=this,r=this.options,n=t.pointers.length===r.pointers,o=t.distance{function t(t,e){var r,n=this;this.options=jd({},ey,e||{});this.options.inputTarget=this.options.inputTarget||t;this.handlers={};this.session={};this.recognizers=[];this.oldCssProps={};this.element=t;this.input=(e=this,r=e.options.inputClass,r=r||(Gd?Iv:Xd?Rv:Wd?qv:Nv),new r(e,xv));this.touchAction=new lv(this,this.options.touchAction);ny(this,!0);uv(this.options.recognizers,function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]);t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;e.set=function(t){jd(this.options,t);t.touchAction&&this.touchAction.update();if(t.inputTarget){this.input.destroy();this.input.target=t.inputTarget;this.input.init()}return this};e.stop=function(t){this.session.stopped=t?2:1};e.recognize=function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var r,n=this.recognizers,o=e.curRecognizer;if(!o||8&o.state){e.curRecognizer=null;o=null}for(var i=0;i{Sd(r,e);function r(){var t=r.prototype;t.evTarget="touchstart";t.evWin="touchstart touchmove touchend touchcancel";t=e.apply(this,arguments)||this;t.started=!1;return t}var t=r.prototype;t.handler=function(t){var e=iy[t.type];e===$d&&(this.started=!0);if(this.started){var r=function(t,e){var r=Dv(t.touches),n=Dv(t.changedTouches);e&(Jd|Kd)&&(r=Lv(r.concat(n),"identifier",!0));return[r,n]}.call(this,t,e);e&(Jd|Kd)&&r[0].length-r[1].length==0&&(this.started=!1);this.callback(this.manager,e,{pointers:r[0],changedPointers:r[1],pointerType:Vd,srcEvent:t})}};return r})(Ov);function sy(r,t,e){var n="DEPRECATED METHOD: "+t+"\n"+e+" AT \n";return function(){var t=new Error("get-stack-trace"),t=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",e=window.console&&(window.console.warn||window.console.log);e&&e.call(window.console,n,t);return r.apply(this,arguments)}}var uy=sy(function(t,e,r){for(var n=Object.keys(e),o=0;o{function t(t,e){void 0===e&&(e={});return new oy(t,Od({recognizers:ry.concat()},e))}t.VERSION="2.0.17-rc";t.DIRECTION_ALL=iv;t.DIRECTION_DOWN=rv;t.DIRECTION_LEFT=Zd;t.DIRECTION_RIGHT=tv;t.DIRECTION_UP=ev;t.DIRECTION_HORIZONTAL=nv;t.DIRECTION_VERTICAL=ov;t.DIRECTION_NONE=Qd;t.DIRECTION_DOWN=rv;t.INPUT_START=$d;t.INPUT_MOVE=2;t.INPUT_END=Jd;t.INPUT_CANCEL=Kd;t.STATE_POSSIBLE=1;t.STATE_BEGAN=2;t.STATE_CHANGED=4;t.STATE_ENDED=8;t.STATE_RECOGNIZED=8;t.STATE_CANCELLED=16;t.STATE_FAILED=32;t.Manager=oy;t.Input=Ov;t.TouchAction=lv;t.TouchInput=Rv;t.MouseInput=Nv;t.PointerEventInput=Iv;t.TouchMouseInput=qv;t.SingleTouchInput=ay;t.Recognizer=Vv;t.AttrRecognizer=Hv;t.Tap=Bv;t.Pan=Jv;t.Swipe=Kv;t.Pinch=Qv;t.Rotate=Zv;t.Press=ty;t.on=wv;t.off=Ev;t.each=uv;t.merge=cy;t.extend=uy;t.bindFn=ly;t.assign=jd;t.inherit=fy;t.bindFn=ly;t.prefixed=Ld;t.toArray=Dv;t.inArray=Sv;t.uniqueArray=Lv;t.splitStr=_v;t.boolOrFn=cv;t.hasParent=pv;t.addEventListeners=wv;t.removeEventListeners=Ev;t.defaults=jd({},ey,{preset:ry});return t})(),Mi=P;function py(t,e){var r,n,o,i=void 0!==Ul&&Tf(t)||t["@@iterator"];if(i)return r=!0,n=!1,{s:function(){i=i.call(t)},n:function(){var t=i.next();r=t.done;return t},e:function(t){n=!0;o=t},f:function(){try{r||null==i.return||i.return()}finally{if(n)throw o}}};if(Kl(t)||(i=((t,e)=>{if(t){if("string"==typeof t)return hy(t,e);var r=Bl(r=Object.prototype.toString.call(t)).call(r,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);return"Map"===r||"Set"===r?_f(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hy(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var a=0,s=function(){};return{s:s,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function hy(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{for(;t;){if(t===e)return 1;t=t.parentNode}})(t.target,e)||r.deactivate()};document.body.addEventListener("click",this._onClick);this._cleanupQueue.push(function(){document.body.removeEventListener("click",r._onClick)})}this._escListener=function(t){("key"in t?"Escape"===t.key:27===t.keyCode)&&r.deactivate()}}m(my.prototype);my.current=null;my.prototype.destroy=function(){this.deactivate();var t,e,r=py(xp(t=qp(t=this._cleanupQueue).call(t,0)).call(t));try{for(r.s();!(e=r.n()).done;){var n=e.value;n()}}catch(t){r.e(t)}finally{r.f()}};my.prototype.activate=function(){my.current&&my.current.deactivate();my.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)};my.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")};my.prototype._onTapOverlay=function(t){this.activate();t.srcEvent.stopPropagation()};function by(t){if(_y(t))return t;throw Ey(wy(t)+" is not a constructor")}var xy={},I={get exports(){return xy},set exports(t){xy=t}},_y=gn,wy=jt,Ey=TypeError,x=h,o=V,Ty=Q,Oy=d,Sy=by,ky=Nt,jy=a,Ay=mo,zi=r,Py=o("Reflect","construct"),Iy=Object.prototype,Dy=[].push,Ly=zi(function(){function t(){}return!(Py(function(){},[],t)instanceof t)}),Cy=!zi(function(){Py(function(){})}),g=Ly||Cy,A=(x({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){Sy(t);ky(e);var r=arguments.length<3?t:Sy(arguments[2]);if(Cy&&!Ly)return Py(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];Ty(Dy,n,e);return new(Ty(Oy,t,n))}n=r.prototype,r=Ay(jy(n)?n:Iy),n=Ty(t,r,e);return jy(n)?n:r}}),u),S=A.Reflect.construct,n=S,b=n,Ry=(R=I,R.exports=b,e(xy));function My(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Ny={},y={get exports(){return Ny},set exports(t){Ny=t}},Fy={},_={get exports(){return Fy},set exports(t){Fy=t}},lt=O,ht=lt,Fo=ht,k=Fo;R=_,R.exports=k;R=y,R.exports=Fy;var zy=e(Ny),Uy={},L={get exports(){return Uy},set exports(t){Uy=t}},qy={},j={get exports(){return qy},set exports(t){qy=t}},qn=h,T=Fi,E=(qn({target:"Object",stat:!0},{setPrototypeOf:T}),u),P=E.Object.setPrototypeOf,Mi=P,m=Mi,gn=m,d=gn,o=d,zi=o;R=j,R.exports=zi;R=L,R.exports=qy;var Yy=e(Uy),Wy={},x={get exports(){return Wy},set exports(t){Wy=t}},Gy={},g={get exports(){return Gy},set exports(t){Gy=t}},A=v,S=A,n=S,I=n;R=g,R.exports=I;R=x,R.exports=Gy;var Xy=e(Wy);function Vy(t,e){var r;Vy=Yy?Xy(r=Yy).call(r):function(t,e){t.__proto__=e;return t};return Vy(t,e)}function By(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=zy(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}});Br(t,"prototype",{writable:!1});e&&Vy(t,e)}function Hy(t,e){if(e&&("object"===gu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return My(t)}var $y={},b={get exports(){return $y},set exports(t){$y=t}},Jy={},O={get exports(){return Jy},set exports(t){Jy=t}},lt=w,ht=lt,Fo=ht,_=Fo;R=O,R.exports=_;R=b,R.exports=Jy;var Ky=e($y);function Qy(t){var e;Qy=Yy?Xy(e=Ky).call(e):function(t){return t.__proto__||Ky(t)};return Qy(t)}var Zy,tg,eg,rg={},k={get exports(){return rg},set exports(t){rg=t}},ng={},y={get exports(){return ng},set exports(t){ng=t}};Zy=y,tg=Hr,eg=ru,Zy.exports=og,Zy.exports.__esModule=!0,Zy.exports.default=Zy.exports;function og(t){return Zy.exports=og="function"==typeof tg&&"symbol"==typeof eg?function(t){return typeof t}:function(t){return t&&"function"==typeof tg&&t.constructor===tg&&t!==tg.prototype?"symbol":typeof t},Zy.exports.__esModule=!0,Zy.exports.default=Zy.exports,og(t)}var ig={},qn={get exports(){return ig},set exports(t){ig=t}},ag={},T={get exports(){return ag},set exports(t){ag=t}},E=Tl,P=E,Mi=P,m=Mi;R=T,R.exports=m;R=qn,R.exports=ag;function sg(t,e){this.stopped=t;this.result=e}function ug(t,e,r){function n(t){i&&Gg(i,"normal",t);return new sg(!0,t)}function o(t){return p?(Ng(t),v?y(t[0],t[1],n):y(t[0],t[1])):v?y(t,n):y(t)}var i,a,s,u,c,f,l=r&&r.that,p=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),d=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Rg(e,l);if(h)i=t.iterator;else if(d)i=t;else{l=Wg(t);if(!l)throw Xg(Fg(t)+" is not iterable");if(zg(l)){for(a=0,s=Ug(t);agx(e)?1:-1}));r=vx(o);a=0;for(;a{function a(t){N(this,a);C(this,"delay",void 0);C(this,"max",void 0);C(this,"_queue",[]);C(this,"_timeout",null);C(this,"_extended",null);this.delay=null;this.max=1/0;this.setOptions(t)}Eu(a,[{key:"setOptions",value:function(t){t&&void 0!==t.delay&&(this.delay=t.delay);t&&void 0!==t.max&&(this.max=t.max);this._flushIfNeeded()}},{key:"destroy",value:function(){this.flush();if(this._extended){for(var t=this._extended.object,e=this._extended.methods,r=0;rthis.max&&this.flush();if(null!=this._timeout){clearTimeout(this._timeout);this._timeout=null}0{function t(){N(this,t);C(this,"_subscribers",{"*":[],add:[],remove:[],update:[]});C(this,"subscribe",t.prototype.on);C(this,"unsubscribe",t.prototype.off)}Eu(t,[{key:"_trigger",value:function(e,r,n){var t;if("*"===e)throw new Error("Cannot trigger event *");hp(t=Xl(t=[]).call(t,wl(this._subscribers[e]),wl(this._subscribers["*"]))).call(t,function(t){t(e,r,null!=n?n:null)})}},{key:"on",value:function(t,e){"function"==typeof e&&this._subscribers[t].push(e)}},{key:"off",value:function(t,e){var r;this._subscribers[t]=fc(r=this._subscribers[t]).call(r,function(t){return t!==e})}}]);return t})(),r_={},Mi={get exports(){return r_},set exports(t){r_=t}},Fi=Bb,E=Xi,I=(Fi("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},E),u),K=I.Set,qn=K,g=qn,n_=(R=Mi,R.exports=g,e(r_)),o_={},A={get exports(){return o_},set exports(t){o_=t}},i_={},st={get exports(){return i_},set exports(t){i_=t}},n=Cc,Ni=n,w=Ni,d=w,L=d,gn=L,l=gn,o=l;R=st,R.exports=o;R=A,R.exports=i_;var a_=e(o_);function s_(t,e){var r,n,o,i=void 0!==Ul&&Tf(t)||t["@@iterator"];if(i)return r=!0,n=!1,{s:function(){i=i.call(t)},n:function(){var t=i.next();r=t.done;return t},e:function(t){n=!0;o=t},f:function(){try{r||null==i.return||i.return()}finally{if(n)throw o}}};if(Kl(t)||(i=((t,e)=>{if(t){if("string"==typeof t)return u_(t,e);var r=Bl(r=Object.prototype.toString.call(t)).call(r,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);return"Map"===r||"Set"===r?_f(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u_(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var a=0,s=function(){};return{s:s,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{function r(t){N(this,r);C(this,"_pairs",void 0);this._pairs=t}Eu(r,[{key:c_,value:Xb.mark(function t(){var e,r,n;return Xb.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=s_(this._pairs);t.prev=1;e.s();case 3:if((n=e.n()).done){t.next=9;break}n=_l(n.value,2),r=n[0],n=n[1];t.next=7;return[r,n];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11;t.t0=t.catch(1);e.e(t.t0);case 14:t.prev=14;e.f();return t.finish(14);case 17:case"end":return t.stop()}},t,this,[[1,11,14,17]])})},{key:"entries",value:Xb.mark(function t(){var e,r,n;return Xb.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=s_(this._pairs);t.prev=1;e.s();case 3:if((n=e.n()).done){t.next=9;break}n=_l(n.value,2),r=n[0],n=n[1];t.next=7;return[r,n];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11;t.t0=t.catch(1);e.e(t.t0);case 14:t.prev=14;e.f();return t.finish(14);case 17:case"end":return t.stop()}},t,this,[[1,11,14,17]])})},{key:"keys",value:Xb.mark(function t(){var e,r;return Xb.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=s_(this._pairs);t.prev=1;e.s();case 3:if((r=e.n()).done){t.next=9;break}r=_l(r.value,1),r=r[0];t.next=7;return r;case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11;t.t0=t.catch(1);e.e(t.t0);case 14:t.prev=14;e.f();return t.finish(14);case 17:case"end":return t.stop()}},t,this,[[1,11,14,17]])})},{key:"values",value:Xb.mark(function t(){var e,r;return Xb.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=s_(this._pairs);t.prev=1;e.s();case 3:if((r=e.n()).done){t.next=9;break}r=_l(r.value,2),r=r[1];t.next=7;return r;case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11;t.t0=t.catch(1);e.e(t.t0);case 14:t.prev=14;e.f();return t.finish(14);case 17:case"end":return t.stop()}},t,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var t;return yc(t=wl(this._pairs)).call(t,function(t){return t[0]})}},{key:"toItemArray",value:function(){var t;return yc(t=wl(this._pairs)).call(t,function(t){return t[1]})}},{key:"toEntryArray",value:function(){return wl(this._pairs)}},{key:"toObjectMap",value:function(){var t,e=rd(null),r=s_(this._pairs);try{for(r.s();!(t=r.n()).done;){var n=_l(t.value,2),o=n[0],i=n[1];e[o]=i}}catch(t){r.e(t)}finally{r.f()}return e}},{key:"toMap",value:function(){return new $1(this._pairs)}},{key:"toIdSet",value:function(){return new n_(this.toIdArray())}},{key:"toItemSet",value:function(){return new n_(this.toItemArray())}},{key:"cache",value:function(){return new r(wl(this._pairs))}},{key:"distinct",value:function(t){var e,r=new n_,n=s_(this._pairs);try{for(n.s();!(e=n.n()).done;){var o=_l(e.value,2),i=o[0],a=o[1];r.add(t(a,i))}}catch(t){n.e(t)}finally{n.f()}return r}},{key:"filter",value:function(i){var a=this._pairs;return new r(C({},Ux,Xb.mark(function t(){var e,r,n,o;return Xb.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=s_(a);t.prev=1;e.s();case 3:if((r=e.n()).done){t.next=10;break}r=_l(r.value,2),n=r[0],o=r[1];if(!i(o,n)){t.next=8;break}t.next=8;return[n,o];case 8:t.next=3;break;case 10:t.next=15;break;case 12:t.prev=12;t.t0=t.catch(1);e.e(t.t0);case 15:t.prev=15;e.f();return t.finish(15);case 18:case"end":return t.stop()}},t,null,[[1,12,15,18]])})))}},{key:"forEach",value:function(t){var e,r=s_(this._pairs);try{for(r.s();!(e=r.n()).done;){var n=_l(e.value,2),o=n[0],i=n[1];t(i,o)}}catch(t){r.e(t)}finally{r.f()}}},{key:"map",value:function(o){var i=this._pairs;return new r(C({},Ux,Xb.mark(function t(){var e,r,n;return Xb.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=s_(i);t.prev=1;e.s();case 3:if((n=e.n()).done){t.next=9;break}n=_l(n.value,2),r=n[0],n=n[1];t.next=7;return[r,o(n,r)];case 7:t.next=3;break;case 9:t.next=14;break;case 11:t.prev=11;t.t0=t.catch(1);e.e(t.t0);case 14:t.prev=14;e.f();return t.finish(14);case 17:case"end":return t.stop()}},t,null,[[1,11,14,17]])})))}},{key:"max",value:function(t){var e=a_(this._pairs),r=e.next();if(r.done)return null;for(var n=r.value[1],o=t(r.value[1],r.value[0]);!(r=e.next()).done;){var i=_l(r.value,2),a=i[0],i=i[1],a=t(i,a);if(o{if(t){if("string"==typeof t)return d_(t,e);var r=Bl(r=Object.prototype.toString.call(t)).call(r,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);return"Map"===r||"Set"===r?_f(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d_(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var a=0,s=function(){};return{s:s,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{if("undefined"==typeof Reflect||!Ry)return!1;if(Ry.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Ry(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Qy(r);t=n?(t=Qy(this).constructor,Ry(e,arguments,t)):e.apply(this,arguments);return Hy(this,t)}}var y_=(t=>{By(o,t);var n=v_(o);function o(t,e){var r;N(this,o);r=n.call(this);C(My(r),"flush",void 0);C(My(r),"length",void 0);C(My(r),"_options",void 0);C(My(r),"_data",void 0);C(My(r),"_idProp",void 0);C(My(r),"_queue",null);if(t&&!Kl(t)){e=t;t=[]}r._options=e||{};r._data=new $1;r.length=0;r._idProp=r._options.fieldId||"id";t&&t.length&&r.add(t);r.setOptions(e);return r}Eu(o,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(t){if(t&&void 0!==t.queue)if(!1===t.queue){if(this._queue){this._queue.destroy();this._queue=null}}else{this._queue||(this._queue=e_.extend(this,{replace:["add","update","remove"]}));t.queue&&"object"===gu(t.queue)&&this._queue.setOptions(t.queue)}}},{key:"add",value:function(t,e){var r,n=this,o=[];if(Kl(t)){var i=yc(t).call(t,function(t){return t[n._idProp]});if(ex(i).call(i,function(t){return n._data.has(t)}))throw new Error("A duplicate id was found in the parameter array.");for(var a=0,s=t.length;a{null==t[e]&&(t[e]=Zx());return t})(t,this._idProp),r=e[this._idProp];if(this._data.has(r))throw new Error("Cannot add item: item with id "+r+" already exists");this._data.set(r,e);++this.length;return r}},{key:"_updateItem",value:function(t){var e=t[this._idProp];if(null==e)throw new Error("Cannot update item: item has no id (item: "+ad(t)+")");var r=this._data.get(e);if(!r)throw new Error("Cannot update item: no item with id "+e+" found");this._data.set(e,p_(p_({},r),t));return e}},{key:"stream",value:function(i){var a,t;return i?(a=this._data,new f_(C({},Ux,Xb.mark(function t(){var e,r,n,o;return Xb.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=h_(i);t.prev=1;e.s();case 3:if((r=e.n()).done){t.next=11;break}n=r.value;o=a.get(n);if(null==o){t.next=9;break}t.next=9;return[n,o];case 9:t.next=3;break;case 11:t.next=16;break;case 13:t.prev=13;t.t0=t.catch(1);e.e(t.t0);case 16:t.prev=16;e.f();return t.finish(16);case 19:case"end":return t.stop()}},t,null,[[1,13,16,19]])})))):new f_(C({},Ux,Vu(t=Hx(this._data)).call(t,this._data)))}}]);return o})(T);function g_(t,e){var r,n,o,i=void 0!==Ul&&Tf(t)||t["@@iterator"];if(i)return r=!0,n=!1,{s:function(){i=i.call(t)},n:function(){var t=i.next();r=t.done;return t},e:function(t){n=!0;o=t},f:function(){try{r||null==i.return||i.return()}finally{if(n)throw o}}};if(Kl(t)||(i=((t,e)=>{if(t){if("string"==typeof t)return m_(t,e);var r=Bl(r=Object.prototype.toString.call(t)).call(r,8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);return"Map"===r||"Set"===r?_f(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m_(t,e):void 0}})(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var a=0,s=function(){};return{s:s,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r{if("undefined"==typeof Reflect||!Ry)return!1;if(Ry.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Ry(Boolean,[],function(){}));return!0}catch(t){return!1}})();return function(){var t,e=Qy(r);t=n?(t=Qy(this).constructor,Ry(e,arguments,t)):e.apply(this,arguments);return Hy(this,t)}}y=(t=>{By(a,t);var o=b_(a);function a(t,e){var r,n;N(this,a);n=o.call(this);C(My(n),"length",0);C(My(n),"_listener",void 0);C(My(n),"_data",void 0);C(My(n),"_ids",new n_);C(My(n),"_options",void 0);n._options=e||{};n._listener=Vu(r=n._onEvent).call(r,My(n));n.setData(t);return n}Eu(a,[{key:"idProp",get:function(){return this.getDataSet().idProp}},{key:"setData",value:function(t){if(this._data){this._data.off&&this._data.off("*",this._listener);var e=this._data.getIds({filter:fc(this._options)}),r=this._data.get(e);this._ids.clear();this.length=0;this._trigger("remove",{items:e,oldData:r})}if(null!=t){this._data=t;for(var n=this._data.getIds({filter:fc(this._options)}),o=0,i=n.length;o