UNPKG

vis-network

Version:

A dynamic, browser-based visualization library.

26 lines 374 kB
/** * vis-network * https://visjs.github.io/vis-network/ * * A dynamic, browser-based visualization library. * * @version 6.5.2 * @date 2020-01-12T20:06:21.030Z * * @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(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vis-util"),require("keycharm"),require("vis-data")):"function"==typeof define&&define.amd?define(["exports","vis-util","keycharm","vis-data"],t):t((e=e||self).vis=e.vis||{},e.vis,e.keycharm,e.vis)}(this,(function(e,t,i,o){"use strict";var n="default"in t?t.default:t;i=i&&i.hasOwnProperty("default")?i.default:i;var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e,t){return e(t={exports:{}},t.exports),t.exports}function a(e){return e&&e.default||e}var h=function(e){return e&&e.Math==Math&&e},d=h("object"==typeof globalThis&&globalThis)||h("object"==typeof window&&window)||h("object"==typeof self&&self)||h("object"==typeof s&&s)||Function("return this")(),l=function(e){try{return!!e()}catch(e){return!0}},c=!l((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,f={f:p&&!u.call({1:2},1)?function(e){var t=p(this,e);return!!t&&t.enumerable}:u},v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},g={}.toString,y=function(e){return g.call(e).slice(8,-1)},m="".split,b=l((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==y(e)?m.call(e,""):Object(e)}:Object,w=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},k=function(e){return b(w(e))},_=function(e){return"object"==typeof e?null!==e:"function"==typeof e},x=function(e,t){if(!_(e))return e;var i,o;if(t&&"function"==typeof(i=e.toString)&&!_(o=i.call(e)))return o;if("function"==typeof(i=e.valueOf)&&!_(o=i.call(e)))return o;if(!t&&"function"==typeof(i=e.toString)&&!_(o=i.call(e)))return o;throw TypeError("Can't convert object to primitive value")},E={}.hasOwnProperty,O=function(e,t){return E.call(e,t)},C=d.document,S=_(C)&&_(C.createElement),T=function(e){return S?C.createElement(e):{}},D=!c&&!l((function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a})),M=Object.getOwnPropertyDescriptor,I={f:c?M:function(e,t){if(e=k(e),t=x(t,!0),D)try{return M(e,t)}catch(e){}if(O(e,t))return v(!f.f.call(e,t),e[t])}},P=/#|\.prototype\./,F=function(e,t){var i=z[B(e)];return i==A||i!=N&&("function"==typeof t?l(t):!!t)},B=F.normalize=function(e){return String(e).replace(P,".").toLowerCase()},z=F.data={},N=F.NATIVE="N",A=F.POLYFILL="P",R=F,L={},j=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},H=function(e,t,i){if(j(e),void 0===t)return e;switch(i){case 0:return function(){return e.call(t)};case 1:return function(i){return e.call(t,i)};case 2:return function(i,o){return e.call(t,i,o)};case 3:return function(i,o,n){return e.call(t,i,o,n)}}return function(){return e.apply(t,arguments)}},W=function(e){if(!_(e))throw TypeError(String(e)+" is not an object");return e},V=Object.defineProperty,q={f:c?V:function(e,t,i){if(W(e),t=x(t,!0),W(i),D)try{return V(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},U=c?function(e,t,i){return q.f(e,t,v(1,i))}:function(e,t,i){return e[t]=i,e},Y=I.f,X=function(e){var t=function(t,i,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,i)}return new e(t,i,o)}return e.apply(this,arguments)};return t.prototype=e.prototype,t},G=function(e,t){var i,o,n,s,r,a,h,l,c=e.target,u=e.global,p=e.stat,f=e.proto,v=u?d:p?d[c]:(d[c]||{}).prototype,g=u?L:L[c]||(L[c]={}),y=g.prototype;for(n in t)i=!R(u?n:c+(p?".":"#")+n,e.forced)&&v&&O(v,n),r=g[n],i&&(a=e.noTargetGet?(l=Y(v,n))&&l.value:v[n]),s=i&&a?a:t[n],i&&typeof r==typeof s||(h=e.bind&&i?H(s,d):e.wrap&&i?X(s):f&&"function"==typeof s?H(Function.call,s):s,(e.sham||s&&s.sham||r&&r.sham)&&U(h,"sham",!0),g[n]=h,f&&(O(L,o=c+"Prototype")||U(L,o,{}),L[o][n]=s,e.real&&y&&!y[n]&&U(y,n,s)))},K=[].slice,Z={},$=function(e,t,i){if(!(t in Z)){for(var o=[],n=0;n<t;n++)o[n]="a["+n+"]";Z[t]=Function("C,a","return new C("+o.join(",")+")")}return Z[t](e,i)},J=Function.bind||function(e){var t=j(this),i=K.call(arguments,1),o=function(){var n=i.concat(K.call(arguments));return this instanceof o?$(t,n.length,n):t.apply(e,n)};return _(t.prototype)&&(o.prototype=t.prototype),o};G({target:"Function",proto:!0},{bind:J});var Q=function(e){return L[e+"Prototype"]},ee=Q("Function").bind,te=Function.prototype,ie=function(e){var t=e.bind;return e===te||e instanceof Function&&t===te.bind?ee:t};function oe(e,t,i,o){e.beginPath(),e.arc(t,i,o,0,2*Math.PI,!1),e.closePath()}function ne(e,t,i,o,n,s){var r=Math.PI/180;o-2*s<0&&(s=o/2),n-2*s<0&&(s=n/2),e.beginPath(),e.moveTo(t+s,i),e.lineTo(t+o-s,i),e.arc(t+o-s,i+s,s,270*r,360*r,!1),e.lineTo(t+o,i+n-s),e.arc(t+o-s,i+n-s,s,0,90*r,!1),e.lineTo(t+s,i+n),e.arc(t+s,i+n-s,s,90*r,180*r,!1),e.lineTo(t,i+s),e.arc(t+s,i+s,s,180*r,270*r,!1),e.closePath()}function se(e,t,i,o,n){var s=o/2*.5522848,r=n/2*.5522848,a=t+o,h=i+n,d=t+o/2,l=i+n/2;e.beginPath(),e.moveTo(t,l),e.bezierCurveTo(t,l-r,d-s,i,d,i),e.bezierCurveTo(d+s,i,a,l-r,a,l),e.bezierCurveTo(a,l+r,d+s,h,d,h),e.bezierCurveTo(d-s,h,t,l+r,t,l),e.closePath()}function re(e,t,i,o,n){var s=n*(1/3),r=o/2*.5522848,a=s/2*.5522848,h=t+o,d=i+s,l=t+o/2,c=i+s/2,u=i+(n-s/2),p=i+n;e.beginPath(),e.moveTo(h,c),e.bezierCurveTo(h,c+a,l+r,d,l,d),e.bezierCurveTo(l-r,d,t,c+a,t,c),e.bezierCurveTo(t,c-a,l-r,i,l,i),e.bezierCurveTo(l+r,i,h,c-a,h,c),e.lineTo(h,u),e.bezierCurveTo(h,u+a,l+r,p,l,p),e.bezierCurveTo(l-r,p,t,u+a,t,u),e.lineTo(t,c)}function ae(e,t,i,o,n,s){e.beginPath(),e.moveTo(t,i);for(var r=s.length,a=o-t,h=n-i,d=h/a,l=Math.sqrt(a*a+h*h),c=0,u=!0,p=0,f=+s[0];l>=.1;)(f=+s[c++%r])>l&&(f=l),p=Math.sqrt(f*f/(1+d*d)),t+=p=a<0?-p:p,i+=d*p,!0===u?e.lineTo(t,i):e.moveTo(t,i),l-=f,u=!u}var he={circle:oe,dashedLine:ae,database:re,diamond:function(e,t,i,o){e.beginPath(),e.lineTo(t,i+o),e.lineTo(t+o,i),e.lineTo(t,i-o),e.lineTo(t-o,i),e.closePath()},ellipse:se,ellipse_vis:se,hexagon:function(e,t,i,o){e.beginPath();var n=2*Math.PI/6;e.moveTo(t+o,i);for(var s=1;s<6;s++)e.lineTo(t+o*Math.cos(n*s),i+o*Math.sin(n*s));e.closePath()},roundRect:ne,square:function(e,t,i,o){e.beginPath(),e.rect(t-o,i-o,2*o,2*o),e.closePath()},star:function(e,t,i,o){e.beginPath(),i+=.1*(o*=.82);for(var n=0;n<10;n++){var s=n%2==0?1.3*o:.5*o;e.lineTo(t+s*Math.sin(2*n*Math.PI/10),i-s*Math.cos(2*n*Math.PI/10))}e.closePath()},triangle:function(e,t,i,o){e.beginPath(),i+=.275*(o*=1.15);var n=2*o,s=n/2,r=Math.sqrt(3)/6*n,a=Math.sqrt(n*n-s*s);e.moveTo(t,i-(a-r)),e.lineTo(t+s,i+r),e.lineTo(t-s,i+r),e.lineTo(t,i-(a-r)),e.closePath()},triangleDown:function(e,t,i,o){e.beginPath(),i-=.275*(o*=1.15);var n=2*o,s=n/2,r=Math.sqrt(3)/6*n,a=Math.sqrt(n*n-s*s);e.moveTo(t,i+(a-r)),e.lineTo(t+s,i-r),e.lineTo(t-s,i-r),e.lineTo(t,i+(a-r)),e.closePath()}};var de=r((function(e){function t(e){if(e)return function(e){for(var i in t.prototype)e[i]=t.prototype[i];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function i(){this.off(e,i),t.apply(this,arguments)}return i.fn=t,this.on(e,i),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,o=this._callbacks["$"+e];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<o.length;n++)if((i=o[n])===t||i.fn===t){o.splice(n,1);break}return 0===o.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),i=this._callbacks["$"+e],o=1;o<arguments.length;o++)t[o-1]=arguments[o];if(i){o=0;for(var n=(i=i.slice(0)).length;o<n;++o)i[o].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})),le={},ce=d["__core-js_shared__"]||function(e,t){try{U(d,e,t)}catch(i){d[e]=t}return t}("__core-js_shared__",{}),ue=Function.toString;"function"!=typeof ce.inspectSource&&(ce.inspectSource=function(e){return ue.call(e)});var pe,fe,ve,ge=ce.inspectSource,ye=d.WeakMap,me="function"==typeof ye&&/native code/.test(ge(ye)),be=r((function(e){(e.exports=function(e,t){return ce[e]||(ce[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.3",mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),we=0,ke=Math.random(),_e=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++we+ke).toString(36)},xe=be("keys"),Ee=function(e){return xe[e]||(xe[e]=_e(e))},Oe={},Ce=d.WeakMap;if(me){var Se=new Ce,Te=Se.get,De=Se.has,Me=Se.set;pe=function(e,t){return Me.call(Se,e,t),t},fe=function(e){return Te.call(Se,e)||{}},ve=function(e){return De.call(Se,e)}}else{var Ie=Ee("state");Oe[Ie]=!0,pe=function(e,t){return U(e,Ie,t),t},fe=function(e){return O(e,Ie)?e[Ie]:{}},ve=function(e){return O(e,Ie)}}var Pe,Fe,Be,ze={set:pe,get:fe,has:ve,enforce:function(e){return ve(e)?fe(e):pe(e,{})},getterFor:function(e){return function(t){var i;if(!_(t)||(i=fe(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return i}}},Ne=function(e){return Object(w(e))},Ae=!l((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Re=Ee("IE_PROTO"),Le=Object.prototype,je=Ae?Object.getPrototypeOf:function(e){return e=Ne(e),O(e,Re)?e[Re]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Le:null},He=!!Object.getOwnPropertySymbols&&!l((function(){return!String(Symbol())})),We=He&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ve=be("wks"),qe=d.Symbol,Ue=We?qe:qe&&qe.withoutSetter||_e,Ye=function(e){return O(Ve,e)||(He&&O(qe,e)?Ve[e]=qe[e]:Ve[e]=Ue("Symbol."+e)),Ve[e]},Xe=(Ye("iterator"),!1);[].keys&&("next"in(Be=[].keys())?(Fe=je(je(Be)))!==Object.prototype&&(Pe=Fe):Xe=!0),null==Pe&&(Pe={});var Ge,Ke={IteratorPrototype:Pe,BUGGY_SAFARI_ITERATORS:Xe},Ze=Math.ceil,$e=Math.floor,Je=function(e){return isNaN(e=+e)?0:(e>0?$e:Ze)(e)},Qe=Math.min,et=function(e){return e>0?Qe(Je(e),9007199254740991):0},tt=Math.max,it=Math.min,ot=function(e,t){var i=Je(e);return i<0?tt(i+t,0):it(i,t)},nt=function(e){return function(t,i,o){var n,s=k(t),r=et(s.length),a=ot(o,r);if(e&&i!=i){for(;r>a;)if((n=s[a++])!=n)return!0}else for(;r>a;a++)if((e||a in s)&&s[a]===i)return e||a||0;return!e&&-1}},st={includes:nt(!0),indexOf:nt(!1)},rt=st.indexOf,at=function(e,t){var i,o=k(e),n=0,s=[];for(i in o)!O(Oe,i)&&O(o,i)&&s.push(i);for(;t.length>n;)O(o,i=t[n++])&&(~rt(s,i)||s.push(i));return s},ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],dt=Object.keys||function(e){return at(e,ht)},lt=c?Object.defineProperties:function(e,t){W(e);for(var i,o=dt(t),n=o.length,s=0;n>s;)q.f(e,i=o[s++],t[i]);return e},ct=function(e){return"function"==typeof e?e:void 0},ut=function(e,t){return arguments.length<2?ct(L[e])||ct(d[e]):L[e]&&L[e][t]||d[e]&&d[e][t]},pt=ut("document","documentElement"),ft=Ee("IE_PROTO"),vt=function(){},gt=function(e){return"<script>"+e+"<\/script>"},yt=function(){try{Ge=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;yt=Ge?function(e){e.write(gt("")),e.close();var t=e.parentWindow.Object;return e=null,t}(Ge):((t=T("iframe")).style.display="none",pt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(gt("document.F=Object")),e.close(),e.F);for(var i=ht.length;i--;)delete yt.prototype[ht[i]];return yt()};Oe[ft]=!0;var mt=Object.create||function(e,t){var i;return null!==e?(vt.prototype=W(e),i=new vt,vt.prototype=null,i[ft]=e):i=yt(),void 0===t?i:lt(i,t)},bt={};bt[Ye("toStringTag")]="z";var wt="[object z]"===String(bt),kt=Ye("toStringTag"),_t="Arguments"==y(function(){return arguments}()),xt=wt?y:function(e){var t,i,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),kt))?i:_t?y(t):"Object"==(o=y(t))&&"function"==typeof t.callee?"Arguments":o},Et=wt?{}.toString:function(){return"[object "+xt(this)+"]"},Ot=q.f,Ct=Ye("toStringTag"),St=function(e,t,i,o){if(e){var n=i?e:e.prototype;O(n,Ct)||Ot(n,Ct,{configurable:!0,value:t}),o&&!wt&&U(n,"toString",Et)}},Tt=Ke.IteratorPrototype,Dt=function(){return this},Mt=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),t=i instanceof Array}catch(e){}return function(i,o){return W(i),function(e){if(!_(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(o),t?e.call(i,o):i.__proto__=o,i}}():void 0),It=function(e,t,i,o){o&&o.enumerable?e[t]=i:U(e,t,i)},Pt=Ke.IteratorPrototype,Ft=Ke.BUGGY_SAFARI_ITERATORS,Bt=Ye("iterator"),zt=function(){return this},Nt=function(e,t,i,o,n,s,r){!function(e,t,i){var o=t+" Iterator";e.prototype=mt(Tt,{next:v(1,i)}),St(e,o,!1,!0),le[o]=Dt}(i,t,o);var a,h,d,l=function(e){if(e===n&&g)return g;if(!Ft&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new i(this,e)}}return function(){return new i(this)}},c=t+" Iterator",u=!1,p=e.prototype,f=p[Bt]||p["@@iterator"]||n&&p[n],g=!Ft&&f||l(n),y="Array"==t&&p.entries||f;if(y&&(a=je(y.call(new e)),Pt!==Object.prototype&&a.next&&(St(a,c,!0,!0),le[c]=zt)),"values"==n&&f&&"values"!==f.name&&(u=!0,g=function(){return f.call(this)}),r&&p[Bt]!==g&&U(p,Bt,g),le[t]=g,n)if(h={values:l("values"),keys:s?g:l("keys"),entries:l("entries")},r)for(d in h)!Ft&&!u&&d in p||It(p,d,h[d]);else G({target:t,proto:!0,forced:Ft||u},h);return h},At=ze.set,Rt=ze.getterFor("Array Iterator");Nt(Array,"Array",(function(e,t){At(this,{type:"Array Iterator",target:k(e),index:0,kind:t})}),(function(){var e=Rt(this),t=e.target,i=e.kind,o=e.index++;return!t||o>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:o,done:!1}:"values"==i?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}}),"values");le.Arguments=le.Array;var Lt=Ye("toStringTag");for(var jt in{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}){var Ht=d[jt],Wt=Ht&&Ht.prototype;Wt&&xt(Wt)!==Lt&&U(Wt,Lt,jt),le[jt]=le.Array}var Vt=Array.isArray||function(e){return"Array"==y(e)},qt=Ye("species"),Ut=function(e,t){var i;return Vt(e)&&("function"!=typeof(i=e.constructor)||i!==Array&&!Vt(i.prototype)?_(i)&&null===(i=i[qt])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===t?0:t)},Yt=[].push,Xt=function(e){var t=1==e,i=2==e,o=3==e,n=4==e,s=6==e,r=5==e||s;return function(a,h,d,l){for(var c,u,p=Ne(a),f=b(p),v=H(h,d,3),g=et(f.length),y=0,m=l||Ut,w=t?m(a,g):i?m(a,0):void 0;g>y;y++)if((r||y in f)&&(u=v(c=f[y],y,p),e))if(t)w[y]=u;else if(u)switch(e){case 3:return!0;case 5:return c;case 6:return y;case 2:Yt.call(w,c)}else if(n)return!1;return s?-1:o||n?n:w}},Gt={forEach:Xt(0),map:Xt(1),filter:Xt(2),some:Xt(3),every:Xt(4),find:Xt(5),findIndex:Xt(6)},Kt=function(e,t){var i=[][e];return!!i&&l((function(){i.call(null,t||function(){throw 1},1)}))},Zt=Object.defineProperty,$t=function(e){throw e},Jt=function(e,t){t||(t={});var i=[][e],o=!!O(t,"ACCESSORS")&&t.ACCESSORS,n=O(t,0)?t[0]:$t,s=O(t,1)?t[1]:void 0;return!!i&&!l((function(){if(o&&!c)return!0;var e={length:-1},t=function(t){o?Zt(e,t,{enumerable:!0,get:$t}):e[t]=1};t(1),t(2147483646),t(4294967294),i.call(e,n,s)}))},Qt=Gt.forEach,ei=Kt("forEach"),ti=Jt("forEach"),ii=ei&&ti?[].forEach:function(e){return Qt(this,e,arguments.length>1?arguments[1]:void 0)};G({target:"Array",proto:!0,forced:[].forEach!=ii},{forEach:ii});var oi=Q("Array").forEach,ni=Array.prototype,si={DOMTokenList:!0,NodeList:!0},ri=function(e){var t=e.forEach;return e===ni||e instanceof Array&&t===ni.forEach||si.hasOwnProperty(xt(e))?oi:t};G({target:"Array",stat:!0},{isArray:Vt});var ai,hi,di=L.Array.isArray,li=di,ci=function(e,t,i){var o=x(t);o in e?q.f(e,o,v(0,i)):e[o]=i},ui=ut("navigator","userAgent")||"",pi=d.process,fi=pi&&pi.versions,vi=fi&&fi.v8;vi?hi=(ai=vi.split("."))[0]+ai[1]:ui&&(!(ai=ui.match(/Edge\/(\d+)/))||ai[1]>=74)&&(ai=ui.match(/Chrome\/(\d+)/))&&(hi=ai[1]);var gi=hi&&+hi,yi=Ye("species"),mi=function(e){return gi>=51||!l((function(){var t=[];return(t.constructor={})[yi]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},bi=mi("splice"),wi=Jt("splice",{ACCESSORS:!0,0:0,1:2}),ki=Math.max,_i=Math.min;G({target:"Array",proto:!0,forced:!bi||!wi},{splice:function(e,t){var i,o,n,s,r,a,h=Ne(this),d=et(h.length),l=ot(e,d),c=arguments.length;if(0===c?i=o=0:1===c?(i=0,o=d-l):(i=c-2,o=_i(ki(Je(t),0),d-l)),d+i-o>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(n=Ut(h,o),s=0;s<o;s++)(r=l+s)in h&&ci(n,s,h[r]);if(n.length=o,i<o){for(s=l;s<d-o;s++)a=s+i,(r=s+o)in h?h[a]=h[r]:delete h[a];for(s=d;s>d-o+i;s--)delete h[s-1]}else if(i>o)for(s=d-o;s>l;s--)a=s+i-1,(r=s+o-1)in h?h[a]=h[r]:delete h[a];for(s=0;s<i;s++)h[s+l]=arguments[s+2];return h.length=d-o+i,n}});var xi=Q("Array").splice,Ei=Array.prototype,Oi=function(e){var t=e.splice;return e===Ei||e instanceof Array&&t===Ei.splice?xi:t},Ci=st.includes,Si=Jt("indexOf",{ACCESSORS:!0,1:0});G({target:"Array",proto:!0,forced:!Si},{includes:function(e){return Ci(this,e,arguments.length>1?arguments[1]:void 0)}});var Ti=Q("Array").includes,Di=Ye("match"),Mi=function(e){if(function(e){var t;return _(e)&&(void 0!==(t=e[Di])?!!t:"RegExp"==y(e))}(e))throw TypeError("The method doesn't accept regular expressions");return e},Ii=Ye("match");G({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[Ii]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~String(w(this)).indexOf(Mi(e),arguments.length>1?arguments[1]:void 0)}});var Pi=Q("String").includes,Fi=Array.prototype,Bi=String.prototype,zi=function(e){var t=e.includes;return e===Fi||e instanceof Array&&t===Fi.includes?Ti:"string"==typeof e||e===Bi||e instanceof String&&t===Bi.includes?Pi:t},Ni=st.indexOf,Ai=[].indexOf,Ri=!!Ai&&1/[1].indexOf(1,-0)<0,Li=Kt("indexOf"),ji=Jt("indexOf",{ACCESSORS:!0,1:0});G({target:"Array",proto:!0,forced:Ri||!Li||!ji},{indexOf:function(e){return Ri?Ai.apply(this,arguments)||0:Ni(this,e,arguments.length>1?arguments[1]:void 0)}});var Hi=Q("Array").indexOf,Wi=Array.prototype,Vi=function(e){var t=e.indexOf;return e===Wi||e instanceof Array&&t===Wi.indexOf?Hi:t};G({target:"Object",stat:!0,sham:!c},{create:mt});var qi=L.Object,Ui=function(e,t){return qi.create(e,t)},Yi=Ui;function Xi(e){return Ji=e,function(){var e={};Qi=0,void(eo=Ji.charAt(0)),po(),"strict"===to&&(e.strict=!0,po());"graph"!==to&&"digraph"!==to||(e.type=to,po());io===Zi.IDENTIFIER&&(e.id=to,po());if("{"!=to)throw bo("Angle bracket { expected");if(po(),fo(e),"}"!=to)throw bo("Angle bracket } expected");if(po(),""!==to)throw bo("End of file expected");return po(),delete e.node,delete e.edge,delete e.graph,e}()}var Gi={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},Ki=Yi(Gi);Ki.color="color.color",Ki.style="dashes";var Zi={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},$i={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Ji="",Qi=0,eo="",to="",io=Zi.NULL;function oo(){Qi++,eo=Ji.charAt(Qi)}function no(){return Ji.charAt(Qi+1)}var so=/[a-zA-Z_0-9.:#]/;function ro(e){return so.test(e)}function ao(e,t){if(e||(e={}),t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function ho(e,t,i){for(var o=t.split("."),n=e;o.length;){var s=o.shift();o.length?(n[s]||(n[s]={}),n=n[s]):n[s]=i}}function lo(e,t){for(var i,o,n=null,s=[e],r=e;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,o=r.nodes.length;i<o;i++)if(t.id===r.nodes[i].id){n=r.nodes[i];break}for(n||(n={id:t.id},e.node&&(n.attr=ao(n.attr,e.node))),i=s.length-1;i>=0;i--){var a,h=s[i];h.nodes||(h.nodes=[]),-1===Vi(a=h.nodes).call(a,n)&&h.nodes.push(n)}t.attr&&(n.attr=ao(n.attr,t.attr))}function co(e,t){if(e.edges||(e.edges=[]),e.edges.push(t),e.edge){var i=ao({},e.edge);t.attr=ao(i,t.attr)}}function uo(e,t,i,o,n){var s={from:t,to:i,type:o};return e.edge&&(s.attr=ao({},e.edge)),s.attr=ao(s.attr||{},n),null!=n&&n.hasOwnProperty("arrows")&&null!=n.arrows&&(s.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),s}function po(){for(io=Zi.NULL,to="";" "===eo||"\t"===eo||"\n"===eo||"\r"===eo;)oo();do{var e=!1;if("#"===eo){for(var t=Qi-1;" "===Ji.charAt(t)||"\t"===Ji.charAt(t);)t--;if("\n"===Ji.charAt(t)||""===Ji.charAt(t)){for(;""!=eo&&"\n"!=eo;)oo();e=!0}}if("/"===eo&&"/"===no()){for(;""!=eo&&"\n"!=eo;)oo();e=!0}if("/"===eo&&"*"===no()){for(;""!=eo;){if("*"===eo&&"/"===no()){oo(),oo();break}oo()}e=!0}for(;" "===eo||"\t"===eo||"\n"===eo||"\r"===eo;)oo()}while(e);if(""!==eo){var i=eo+no();if($i[i])return io=Zi.DELIMITER,to=i,oo(),void oo();if($i[eo])return io=Zi.DELIMITER,to=eo,void oo();if(ro(eo)||"-"===eo){for(to+=eo,oo();ro(eo);)to+=eo,oo();return"false"===to?to=!1:"true"===to?to=!0:isNaN(Number(to))||(to=Number(to)),void(io=Zi.IDENTIFIER)}if('"'===eo){for(oo();""!=eo&&('"'!=eo||'"'===eo&&'"'===no());)'"'===eo?(to+=eo,oo()):"\\"===eo&&"n"===no()?(to+="\n",oo()):to+=eo,oo();if('"'!=eo)throw bo('End of string " expected');return oo(),void(io=Zi.IDENTIFIER)}for(io=Zi.UNKNOWN;""!=eo;)to+=eo,oo();throw new SyntaxError('Syntax error in part "'+wo(to,30)+'"')}io=Zi.DELIMITER}function fo(e){for(;""!==to&&"}"!=to;)vo(e),";"===to&&po()}function vo(e){var t=go(e);if(t)yo(e,t);else if(!function(e){if("node"===to)return po(),e.node=mo(),"node";if("edge"===to)return po(),e.edge=mo(),"edge";if("graph"===to)return po(),e.graph=mo(),"graph";return null}(e)){if(io!=Zi.IDENTIFIER)throw bo("Identifier expected");var i=to;if(po(),"="===to){if(po(),io!=Zi.IDENTIFIER)throw bo("Identifier expected");e[i]=to,po()}else!function(e,t){var i={id:t},o=mo();o&&(i.attr=o);lo(e,i),yo(e,t)}(e,i)}}function go(e){var t=null;if("subgraph"===to&&((t={}).type="subgraph",po(),io===Zi.IDENTIFIER&&(t.id=to,po())),"{"===to){if(po(),t||(t={}),t.parent=e,t.node=e.node,t.edge=e.edge,t.graph=e.graph,fo(t),"}"!=to)throw bo("Angle bracket } expected");po(),delete t.node,delete t.edge,delete t.graph,delete t.parent,e.subgraphs||(e.subgraphs=[]),e.subgraphs.push(t)}return t}function yo(e,t){for(;"->"===to||"--"===to;){var i,o=to;po();var n=go(e);if(n)i=n;else{if(io!=Zi.IDENTIFIER)throw bo("Identifier or subgraph expected");lo(e,{id:i=to}),po()}co(e,uo(e,t,i,o,mo())),t=i}}function mo(){for(var e,t,i=null,o={dashed:!0,solid:!1,dotted:[1,5]},n={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},s=new Array,r=new Array;"["===to;){for(po(),i={};""!==to&&"]"!=to;){if(io!=Zi.IDENTIFIER)throw bo("Attribute name expected");var a=to;if(po(),"="!=to)throw bo("Equal sign = expected");if(po(),io!=Zi.IDENTIFIER)throw bo("Attribute value expected");var h=to;"style"===a&&(h=o[h]),"arrowhead"===a&&(a="arrows",h={to:{enabled:!0,type:n[h]}}),"arrowtail"===a&&(a="arrows",h={from:{enabled:!0,type:n[h]}}),s.push({attr:i,name:a,value:h}),r.push(a),po(),","==to&&po()}if("]"!=to)throw bo("Bracket ] expected");po()}if(zi(r).call(r,"dir")){var d={arrows:{}};for(e=0;e<s.length;e++)if("arrows"===s[e].name)if(null!=s[e].value.to)d.arrows.to=e;else{if(null==s[e].value.from)throw bo("Invalid value of arrows");d.arrows.from=e}else"dir"===s[e].name&&(d.dir=e);var l,c,u=s[d.dir].value;if(!zi(r).call(r,"arrows"))if("both"===u)s.push({attr:s[d.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),d.arrows.to=s.length-1,s.push({attr:s[d.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),d.arrows.from=s.length-1;else if("forward"===u)s.push({attr:s[d.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),d.arrows.to=s.length-1;else if("back"===u)s.push({attr:s[d.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),d.arrows.from=s.length-1;else{if("none"!==u)throw bo('Invalid dir type "'+u+'"');s.push({attr:s[d.dir].attr,name:"arrows",value:""}),d.arrows.to=s.length-1}if("both"===u)d.arrows.to&&d.arrows.from?(c=s[d.arrows.to].value.to.type,l=s[d.arrows.from].value.from.type,s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}},Oi(s).call(s,d.arrows.from,1)):d.arrows.to?(c=s[d.arrows.to].value.to.type,l="arrow",s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.from&&(c="arrow",l=s[d.arrows.from].value.from.type,s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}});else if("back"===u)d.arrows.to&&d.arrows.from?(c="",l=s[d.arrows.from].value.from.type,s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.to?(c="",l="arrow",d.arrows.from=d.arrows.to,s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.from&&(c="",l=s[d.arrows.from].value.from.type,s[d.arrows.to]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}),s[d.arrows.from]={attr:s[d.arrows.from].attr,name:s[d.arrows.from].name,value:{from:{enabled:!0,type:s[d.arrows.from].value.from.type}}};else if("none"===u){var p;s[p=d.arrows.to?d.arrows.to:d.arrows.from]={attr:s[p].attr,name:s[p].name,value:""}}else{if("forward"!==u)throw bo('Invalid dir type "'+u+'"');d.arrows.to&&d.arrows.from?(c=s[d.arrows.to].value.to.type,l="",s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.to?(c=s[d.arrows.to].value.to.type,l="",s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}):d.arrows.from&&(c="arrow",l="",d.arrows.to=d.arrows.from,s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:l}}}),s[d.arrows.to]={attr:s[d.arrows.to].attr,name:s[d.arrows.to].name,value:{to:{enabled:!0,type:s[d.arrows.to].value.to.type}}}}Oi(s).call(s,d.dir,1)}if(zi(r).call(r,"penwidth")){var f=[];for(t=s.length,e=0;e<t;e++)"width"!==s[e].name&&("penwidth"===s[e].name&&(s[e].name="width"),f.push(s[e]));s=f}for(t=s.length,e=0;e<t;e++)ho(s[e].attr,s[e].name,s[e].value);return i}function bo(e){return new SyntaxError(e+', got "'+wo(to,30)+'" (char '+Qi+")")}function wo(e,t){return e.length<=t?e:e.substr(0,27)+"..."}function ko(e,t,i){for(var o=t.split("."),n=o.pop(),s=e,r=0;r<o.length;r++){var a=o[r];a in s||(s[a]={}),s=s[a]}return s[n]=i,e}function _o(e,t){var i={};for(var o in e)if(e.hasOwnProperty(o)){var n=t[o];li(n)?ri(n).call(n,(function(t){ko(i,t,e[o])})):ko(i,"string"==typeof n?n:o,e[o])}return i}var xo=Xi,Eo=function(e){var t,i=Xi(e),o={nodes:[],edges:[],options:{}};if(i.nodes&&ri(t=i.nodes).call(t,(function(e){var t={id:e.id,label:String(e.label||e.id)};ao(t,_o(e.attr,Gi)),t.image&&(t.shape="image"),o.nodes.push(t)})),i.edges){var n,s=function(e){var t={from:e.from,to:e.to};return ao(t,_o(e.attr,Ki)),null==t.arrows&&"->"===e.type&&(t.arrows="to"),t};ri(n=i.edges).call(n,(function(e){var t,i,n,r,a,h,d;(t=e.from instanceof Object?e.from.nodes:{id:e.from},i=e.to instanceof Object?e.to.nodes:{id:e.to},e.from instanceof Object&&e.from.edges)&&ri(n=e.from.edges).call(n,(function(e){var t=s(e);o.edges.push(t)}));(a=i,h=function(t,i){var n=uo(o,t.id,i.id,e.type,e.attr),r=s(n);o.edges.push(r)},li(r=t)?ri(r).call(r,(function(e){li(a)?ri(a).call(a,(function(t){h(e,t)})):h(e,a)})):li(a)?ri(a).call(a,(function(e){h(r,e)})):h(r,a),e.to instanceof Object&&e.to.edges)&&ri(d=e.to.edges).call(d,(function(e){var t=s(e);o.edges.push(t)}))}))}return i.attr&&(o.options=i.attr),o},Oo={parseDOT:xo,DOTToGraph:Eo},Co=Object.freeze({__proto__:null,default:Oo,__moduleExports:Oo,parseDOT:xo,DOTToGraph:Eo}),So=Gt.map,To=mi("map"),Do=Jt("map");G({target:"Array",proto:!0,forced:!To||!Do},{map:function(e){return So(this,e,arguments.length>1?arguments[1]:void 0)}});var Mo=Q("Array").map,Io=Array.prototype,Po=function(e){var t=e.map;return e===Io||e instanceof Array&&t===Io.map?Mo:t};function Fo(e,t){var i,o={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};null!=t&&(null!=t.fixed&&(o.nodes.fixed=t.fixed),null!=t.parseColor&&(o.nodes.parseColor=t.parseColor),null!=t.inheritColor&&(o.edges.inheritColor=t.inheritColor));var n=e.edges,s=Po(n).call(n,(function(e){var t={from:e.source,id:e.id,to:e.target};return null!=e.attributes&&(t.attributes=e.attributes),null!=e.label&&(t.label=e.label),null!=e.attributes&&null!=e.attributes.title&&(t.title=e.attributes.title),"Directed"===e.type&&(t.arrows="to"),e.color&&!1===o.edges.inheritColor&&(t.color=e.color),t}));return{nodes:Po(i=e.nodes).call(i,(function(e){var t={id:e.id,fixed:o.nodes.fixed&&null!=e.x&&null!=e.y};return null!=e.attributes&&(t.attributes=e.attributes),null!=e.label&&(t.label=e.label),null!=e.size&&(t.size=e.size),null!=e.attributes&&null!=e.attributes.title&&(t.title=e.attributes.title),null!=e.title&&(t.title=e.title),null!=e.x&&(t.x=e.x),null!=e.y&&(t.y=e.y),null!=e.color&&(!0===o.nodes.parseColor?t.color=e.color:t.color={background:e.color,border:e.color,highlight:{background:e.color,border:e.color},hover:{background:e.color,border:e.color}}),t})),edges:s}}var Bo=Object.freeze({__proto__:null,parseGephi:Fo}),zo=Object.freeze({__proto__:null,default:void 0});function No(){return(No=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e}).apply(this,arguments)}function Ao(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Ro(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Lo,jo="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o)for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])}return t}:Object.assign,Ho=["","webkit","Moz","MS","ms","o"],Wo="undefined"==typeof document?{style:{}}:document.createElement("div"),Vo="function",qo=Math.round,Uo=Math.abs,Yo=Date.now;function Xo(e,t){for(var i,o,n=t[0].toUpperCase()+t.slice(1),s=0;s<Ho.length;){if((o=(i=Ho[s])?i+n:t)in e)return o;s++}}Lo="undefined"==typeof window?{}:window;var Go=Xo(Wo.style,"touchAction"),Ko=void 0!==Go;var Zo="auto",$o="manipulation",Jo="none",Qo="pan-x",en="pan-y",tn=function(){if(!Ko)return!1;var e={},t=Lo.CSS&&Lo.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(i){return e[i]=!t||Lo.CSS.supports("touch-action",i)})),e}(),on="ontouchstart"in Lo,nn=void 0!==Xo(Lo,"PointerEvent"),sn=on&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),rn="touch",an="mouse",hn=25,dn=1,ln=2,cn=4,un=8,pn=1,fn=2,vn=4,gn=8,yn=16,mn=fn|vn,bn=gn|yn,wn=mn|bn,kn=["x","y"],_n=["clientX","clientY"];function xn(e,t,i){var o;if(e)if(e.forEach)e.forEach(t,i);else if(void 0!==e.length)for(o=0;o<e.length;)t.call(i,e[o],o,e),o++;else for(o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e)}function En(e,t){return typeof e===Vo?e.apply(t&&t[0]||void 0,t):e}function On(e,t){return e.indexOf(t)>-1}var Cn=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){"compute"===e&&(e=this.compute()),Ko&&this.manager.element.style&&tn[e]&&(this.manager.element.style[Go]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return xn(this.manager.recognizers,(function(t){En(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(On(e,Jo))return Jo;var t=On(e,Qo),i=On(e,en);return t&&i?Jo:t||i?t?Qo:en:On(e,$o)?$o:Zo}(e.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,i=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var o=this.actions,n=On(o,Jo)&&!tn[Jo],s=On(o,en)&&!tn[en],r=On(o,Qo)&&!tn[Qo];if(n){var a=1===e.pointers.length,h=e.distance<2,d=e.deltaTime<250;if(a&&h&&d)return}if(!r||!s)return n||s&&i&mn||r&&i&bn?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Sn(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Tn(e){var t=e.length;if(1===t)return{x:qo(e[0].clientX),y:qo(e[0].clientY)};for(var i=0,o=0,n=0;n<t;)i+=e[n].clientX,o+=e[n].clientY,n++;return{x:qo(i/t),y:qo(o/t)}}function Dn(e){for(var t=[],i=0;i<e.pointers.length;)t[i]={clientX:qo(e.pointers[i].clientX),clientY:qo(e.pointers[i].clientY)},i++;return{timeStamp:Yo(),pointers:t,center:Tn(t),deltaX:e.deltaX,deltaY:e.deltaY}}function Mn(e,t,i){i||(i=kn);var o=t[i[0]]-e[i[0]],n=t[i[1]]-e[i[1]];return Math.sqrt(o*o+n*n)}function In(e,t,i){i||(i=kn);var o=t[i[0]]-e[i[0]],n=t[i[1]]-e[i[1]];return 180*Math.atan2(n,o)/Math.PI}function Pn(e,t){return e===t?pn:Uo(e)>=Uo(t)?e<0?fn:vn:t<0?gn:yn}function Fn(e,t,i){return{x:t/e||0,y:i/e||0}}function Bn(e,t){var i=e.session,o=t.pointers,n=o.length;i.firstInput||(i.firstInput=Dn(t)),n>1&&!i.firstMultiple?i.firstMultiple=Dn(t):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=t.center=Tn(o);t.timeStamp=Yo(),t.deltaTime=t.timeStamp-s.timeStamp,t.angle=In(a,h),t.distance=Mn(a,h),function(e,t){var i=t.center,o=e.offsetDelta||{},n=e.prevDelta||{},s=e.prevInput||{};t.eventType!==dn&&s.eventType!==cn||(n=e.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=e.offsetDelta={x:i.x,y:i.y}),t.deltaX=n.x+(i.x-o.x),t.deltaY=n.y+(i.y-o.y)}(i,t),t.offsetDirection=Pn(t.deltaX,t.deltaY);var d,l,c=Fn(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=Uo(c.x)>Uo(c.y)?c.x:c.y,t.scale=r?(d=r.pointers,Mn((l=o)[0],l[1],_n)/Mn(d[0],d[1],_n)):1,t.rotation=r?function(e,t){return In(t[1],t[0],_n)+In(e[1],e[0],_n)}(r.pointers,o):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,function(e,t){var i,o,n,s,r=e.lastInterval||t,a=t.timeStamp-r.timeStamp;if(t.eventType!==un&&(a>hn||void 0===r.velocity)){var h=t.deltaX-r.deltaX,d=t.deltaY-r.deltaY,l=Fn(a,h,d);o=l.x,n=l.y,i=Uo(l.x)>Uo(l.y)?l.x:l.y,s=Pn(h,d),e.lastInterval=t}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;t.velocity=i,t.velocityX=o,t.velocityY=n,t.direction=s}(i,t);var u,p=e.element,f=t.srcEvent;Sn(u=f.composedPath?f.composedPath()[0]:f.path?f.path[0]:f.target,p)&&(p=u),t.target=p}function zn(e,t,i){var o=i.pointers.length,n=i.changedPointers.length,s=t&dn&&o-n==0,r=t&(cn|un)&&o-n==0;i.isFirst=!!s,i.isFinal=!!r,s&&(e.session={}),i.eventType=t,Bn(e,i),e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function Nn(e){return e.trim().split(/\s+/g)}function An(e,t,i){xn(Nn(t),(function(t){e.addEventListener(t,i,!1)}))}function Rn(e,t,i){xn(Nn(t),(function(t){e.removeEventListener(t,i,!1)}))}function Ln(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var jn=function(){function e(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){En(e.options.enable,[e])&&i.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&An(this.element,this.evEl,this.domHandler),this.evTarget&&An(this.target,this.evTarget,this.domHandler),this.evWin&&An(Ln(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&Rn(this.element,this.evEl,this.domHandler),this.evTarget&&Rn(this.target,this.evTarget,this.domHandler),this.evWin&&Rn(Ln(this.element),this.evWin,this.domHandler)},e}();function Hn(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var o=0;o<e.length;){if(i&&e[o][i]==t||!i&&e[o]===t)return o;o++}return-1}var Wn={pointerdown:dn,pointermove:ln,pointerup:cn,pointercancel:un,pointerout:un},Vn={2:rn,3:"pen",4:an,5:"kinect"},qn="pointerdown",Un="pointermove pointerup pointercancel";Lo.MSPointerEvent&&!Lo.PointerEvent&&(qn="MSPointerDown",Un="MSPointerMove MSPointerUp MSPointerCancel");var Yn=function(e){function t(){var i,o=t.prototype;return o.evEl=qn,o.evWin=Un,(i=e.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return Ao(t,e),t.prototype.handler=function(e){var t=this.store,i=!1,o=e.type.toLowerCase().replace("ms",""),n=Wn[o],s=Vn[e.pointerType]||e.pointerType,r=s===rn,a=Hn(t,e.pointerId,"pointerId");n&dn&&(0===e.button||r)?a<0&&(t.push(e),a=t.length-1):n&(cn|un)&&(i=!0),a<0||(t[a]=e,this.callback(this.manager,n,{pointers:t,changedPointers:[e],pointerType:s,srcEvent:e}),i&&t.splice(a,1))},t}(jn);function Xn(e){return Array.prototype.slice.call(e,0)}function Gn(e,t,i){for(var o=[],n=[],s=0;s<e.length;){var r=t?e[s][t]:e[s];Hn(n,r)<0&&o.push(e[s]),n[s]=r,s++}return i&&(o=t?o.sort((function(e,i){return e[t]>i[t]})):o.sort()),o}var Kn={touchstart:dn,touchmove:ln,touchend:cn,touchcancel:un},Zn="touchstart touchmove touchend touchcancel",$n=function(e){function t(){var i;return t.prototype.evTarget=Zn,(i=e.apply(this,arguments)||this).targetIds={},i}return Ao(t,e),t.prototype.handler=function(e){var t=Kn[e.type],i=Jn.call(this,e,t);i&&this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:rn,srcEvent:e})},t}(jn);function Jn(e,t){var i,o,n=Xn(e.touches),s=this.targetIds;if(t&(dn|ln)&&1===n.length)return s[n[0].identifier]=!0,[n,n];var r=Xn(e.changedTouches),a=[],h=this.target;if(o=n.filter((function(e){return Sn(e.target,h)})),t===dn)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]),t&(cn|un)&&delete s[r[i].identifier],i++;return a.length?[Gn(o.concat(a),"identifier",!0),a]:void 0}var Qn={mousedown:dn,mousemove:ln,mouseup:cn},es="mousedown",ts="mousemove mouseup",is=function(e){function t(){var i,o=t.prototype;return o.evEl=es,o.evWin=ts,(i=e.apply(this,arguments)||this).pressed=!1,i}return Ao(t,e),t.prototype.handler=function(e){var t=Qn[e.type];t&dn&&0===e.button&&(this.pressed=!0),t&ln&&1!==e.which&&(t=cn),this.pressed&&(t&cn&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:an,srcEvent:e}))},t}(jn),os=2500,ns=25;function ss(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var i={x:t.clientX,y:t.clientY},o=this.lastTouches;this.lastTouches.push(i);setTimeout((function(){var e=o.indexOf(i);e>-1&&o.splice(e,1)}),os)}}function rs(e,t){e&dn?(this.primaryTouch=t.changedPointers[0].identifier,ss.call(this,t)):e&(cn|un)&&ss.call(this,t)}function as(e){for(var t=e.srcEvent.clientX,i=e.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var n=this.lastTouches[o],s=Math.abs(t-n.x),r=Math.abs(i-n.y);if(s<=ns&&r<=ns)return!0}return!1}var hs=function(){return function(e){function t(t,i){var o;return(o=e.call(this,t,i)||this).handler=function(e,t,i){var n=i.pointerType===rn,s=i.pointerType===an;if(!(s&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)rs.call(Ro(Ro(o)),t,i);else if(s&&as.call(Ro(Ro(o)),i))return;o.callback(e,t,i)}},o.touch=new $n(o.manager,o.handler),o.mouse=new is(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return Ao(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(jn)}();function ds(e,t,i){return!!Array.isArray(e)&&(xn(e,i[t],i),!0)}var ls=1,cs=2,us=4,ps=8,fs=ps,vs=16,gs=1;function ys(e,t){var i=t.manager;return i?i.get(e):e}function ms(e){return e&vs?"cancel":e&ps?"end":e&us?"move":e&cs?"start":""}var bs=function(){function e(e){void 0===e&&(e={}),this.options=No({enable:!0},e),this.id=gs++,this.manager=null,this.state=ls,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return jo(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(ds(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=ys(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return ds(e,"dropRecognizeWith",this)?this:(e=ys(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(ds(e,"requireFailure",this))return this;var t=this.requireFail;return-1===Hn(t,e=ys(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(ds(e,"dropRequireFailure",this))return this;e=ys(e,this);var t=Hn(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,i=this.state;function o(i){t.manager.emit(i,e)}i<ps&&o(t.options.event+ms(i)),o(t.options.event),e.additionalEvent&&o(e.additionalEvent),i>=ps&&o(t.options.event+ms(i))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=32},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(32|ls)))return!1;e++}return!0},t.recognize=function(e){var t=jo({},e);if(!En(this.options.enable,[this,t]))return this.reset(),void(this.state=32);this.state&(fs|vs|32)&&(this.state=ls),this.state=this.process(t),this.state&(cs|us|ps|vs)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),ws=function(e){function t(t){var i;return void 0===t&&(t={}),(i=e.call(this,No({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}Ao(t,e);var i=t.prototype;return i.getTouchAction=function(){return[$o]},i.process=function(e){var t=this,i=this.options,o=e.pointers.length===i.pointers,n=e.distance<i.threshold,s=e.deltaTime<i.time;if(this.reset(),e.eventType&dn&&0===this.count)return this.failTimeout();if(n&&s&&o){if(e.eventType!==cn)return this.failTimeout();var r=!this.pTime||e.timeStamp-this.pTime<i.interval,a=!this.pCenter||Mn(this.pCenter,e.center)<i.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&r?this.count+=1:this.count=1,this._input=e,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=fs,t.tryEmit()}),i.interval),cs):fs}return 32},i.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=32}),this.options.interval),32},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){this.state===fs&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(bs),ks=function(e){function t(t){return void 0===t&&(t={}),e.call(this,No({pointers:1},t))||this}Ao(t,e);var i=t.prototype;return i.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},i.process=function(e){var t=this.state,i=e.eventType,o=t&(cs|us),n=this.attrTest(e);return o&&(i&un||!n)?t|vs:o||n?i&cn?t|ps:t&cs?t|us:cs:32},t}(bs);function _s(e){return e===yn?"down":e===gn?"up":e===fn?"left":e===vn?"right":""}var xs=function(e){function t(t){var i;return void 0===t&&(t={}),(i=e.call(this,No({event:"pan",threshold:10,pointers:1,direction:wn},t))||this).pX=null,i.pY=null,i}Ao(t,e);var i=t.prototype;return i.getTouchAction=function(){var e=this.options.direction,t=[];return e&mn&&t.push(en),e&bn&&t.push(Qo),t},i.directionTest=function(e){var t=this.options,i=!0,o=e.distance,n=e.direction,s=e.deltaX,r=e.deltaY;return n&t.direction||(t.direction&mn?(n=0===s?pn:s<0?fn:vn,i=s!==this.pX,o=Math.abs(e.deltaX)):(n=0===r?pn:r<0?gn:yn,i=r!==this.pY,o=Math.abs(e.deltaY))),e.direction=n,i&&o>t.threshold&&n&t.direction},i.attrTest=function(e){return ks.prototype.attrTest.call(this,e)&&(this.state&cs||!(this.state&cs)&&this.directionTest(e))},i.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var i=_s(t.direction);i&&(t.additionalEvent=this.options.event+i),e.prototype.emit.call(this,t)},t}(ks),Es=function(e){function t(t){return void 0===t&&(t={}),e.call(this,No({event:"swipe",threshold:10,velocity:.3,direction:mn|bn,pointers:1},t))||this}Ao(t,e);var i=t.prototype;return i.getTouchAction=function(){return xs.prototype.getTouchAction.call(this)},i.attrTest=function(t){var i,o=this.options.direction;return o&(mn|bn)?i=t.overallVelocity:o&mn?i=t.overallVelocityX:o&bn&&(i=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&o&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Uo(i)>this.options.velocity&&t.eventType&cn},i.emit=function(e){var t=_s(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(ks),Os=function(e){function t(t){return void 0===t&&(t={}),e.call(this,No({event:"pinch",threshold:0,pointers:2},t))||this}Ao(t,e);var i=t.prototype;return i.getTouchAction=function(){return[Jo]},i.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&cs)},i.emit=function(t){if(1!==t.scale){var i=t.scale<1?"in":"out";t.additionalEvent=this.options.event+i}e.prototype.emit.call(this,t)},t}(ks),Cs=function(e){function t(t){return void 0===t&&(t={}),e.call(this,No({event:"rotate",threshold:0,pointers:2},t))||this}Ao(t,e);var i=t.prototype;return i.getTouchAction=function(){return[Jo]},i.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&cs)},t}(ks),Ss=function(e){function t(t){var i;return void 0===t&&(t={}),(i=e.call(this,No({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,i._input=null,i}Ao(t,e);var i=t.prototype;return i.getTouchAction=function(){return[Zo]},i.process=function(e){var t=this,i=this.options,o=e.pointers.length===i.pointers,n=e.distance<i.threshold,s=e.deltaTime>i.time;if(this._input=e,!n||!o||e.eventType&(cn|un)&&!s)this.reset();else if(e.eventType&dn)this.reset(),this._timer=setTimeout((function(){t.state=fs,t.tryEmit()}),i.time);else if(e.eventType&cn)return fs;return 32},i.reset=function(){clearTimeout(this._timer)},i.emit=function(e){this.state===fs&&(e&&e.eventType&cn?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=Yo(),this.manager.emit(this.options.event,this._input)))},t}(bs),Ts={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Ds=[[Cs,{enable:!1}],[Os,{enable:!1},["rotate"]],[Es,{direction:mn}],[xs,{direction:mn},["swipe"]],[ws],[ws,{event:"doubletap",taps:2},["tap"]],[Ss]];function Ms(e,t){var i,o=e.element;o.style&&(xn(e.options.cssProps,(function(n,s){i=Xo(o.style,s),t?(e.oldCssProps[i]=o.style[i],o.style[i]=n):o.style[i]=e.oldCssProps[i]||""})),t||(e.oldCssProps={}))}var Is=function(){function e(e,t){var i,o=this;this.options=jo({},Ts,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((i=this).options.inputClass||(nn?Yn:sn?$n:on?hs:is))(i,zn),this.touchAction=new Cn(this,this.options.touchAction),Ms(this,!0),xn(this.options.recognizers,(function(e){var t=o.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return jo(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var i;this.touchAction.preventDefaults(e);var o=this.recognizers,n=t.curRecognizer;(!n||n&&n.state&fs)&&(t.curRecognizer=null,n=null);for(var s=0;s<o.length;)i=o[s],2===t.stopped||n&&i!==n&&!i.canRecognizeWith(n)?i.reset():i.recognize(e),!n&&i.state&(cs|us|ps)&&(t.curRecognizer=i,n=i),s++}},t.get=function(e){if(e instanceof bs)return e;for(var t=this.recognizers,i=0;i<t.length;i++)if(t[i].options.event===e)return t[i];return null},t.add=function(e){if(ds(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(ds(e,"remove",this))return this;var t=this.get(e);if(e){var i=this.recognizers,o=Hn(i,t);-1!==o&&(i.splice(o,1),this.touchAction.update())}return this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var i=this.handlers;return xn(Nn(e),(function(e){i[e]=i[e]||[],i[e].push(t)})),this},t.off=function(e,t){if(void 0===e)return this;var i=this.handlers;return