vis-graph3d
Version:
Create interactive, animated 3d graphs. Surfaces, lines, dots and block styling out of the box.
35 lines • 134 kB
JavaScript
/**
* vis-graph3d
* https://visjs.github.io/vis-graph3d/
*
* Create interactive, animated 3d graphs. Surfaces, lines, dots and block styling out of the box.
*
* @version 7.0.4
* @date 2026-10-25T13:37:24.057Z
*
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
*
* @license
* vis.js is dual licensed under both
*
* 1. The Apache 2.0 License
* http://www.apache.org/licenses/LICENSE-2.0
*
* and
*
* 2. The MIT License
* http://opensource.org/licenses/MIT
*
* vis.js may be distributed under either license.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vis-data/peer/umd/vis-data.js")):"function"==typeof define&&define.amd?define(["exports","vis-data/peer/umd/vis-data.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).vis=t.vis||{},t.vis)}(this,function(t,e){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var i,o,a,s,u,c,l,h,f,p,d,v,m,y,g,b;function w(){if(o)return i;o=1;var t=function(t){return t&&t.Math===Math&&t};return i=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof n&&n)||t("object"==typeof i&&i)||function(){return this}()||Function("return this")()}function x(){return s?a:(s=1,a=function(t){try{return!!t()}catch(t){return!0}})}function _(){return c?u:(c=1,u=!x()(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function S(){if(h)return l;h=1;var t=_(),e=Function.prototype,n=e.apply,r=e.call;return l="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),l}function T(){if(p)return f;p=1;var t=_(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return f=t?r:function(t){return function(){return n.apply(t,arguments)}},f}function C(){if(v)return d;v=1;var t=T(),e=t({}.toString),n=t("".slice);return d=function(t){return n(e(t),8,-1)}}function E(){if(y)return m;y=1;var t=C(),e=T();return m=function(n){if("Function"===t(n))return e(n)}}function L(){if(b)return g;b=1;var t="object"==typeof document&&document.all;return g=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var O,A,P,M,D={};function R(){return A?O:(A=1,O=!x()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function I(){if(M)return P;M=1;var t=_(),e=Function.prototype.call;return P=t?e.bind(e):function(){return e.apply(e,arguments)},P}var z,k,j,N,F,B,W,Y,G,X,V,U,Z,H,J,q,$,Q,K,tt,et,nt,rt,it,ot,at,st,ut,ct,lt,ht,ft,pt,dt,vt,mt,yt,gt={};function bt(){if(z)return gt;z=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return gt.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,gt}function wt(){return j?k:(j=1,k=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function xt(){if(F)return N;F=1;var t=T(),e=x(),n=C(),r=Object,i=t("".split);return N=e(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===n(t)?i(t,""):r(t)}:r}function _t(){return W?B:(W=1,B=function(t){return null==t})}function St(){if(G)return Y;G=1;var t=_t(),e=TypeError;return Y=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function Tt(){if(V)return X;V=1;var t=xt(),e=St();return X=function(n){return t(e(n))}}function Ct(){if(Z)return U;Z=1;var t=L();return U=function(e){return"object"==typeof e?null!==e:t(e)}}function Et(){return J?H:(J=1,H={})}function Lt(){if($)return q;$=1;var t=Et(),e=w(),n=L(),r=function(t){return n(t)?t:void 0};return q=function(n,i){return arguments.length<2?r(t[n])||r(e[n]):t[n]&&t[n][i]||e[n]&&e[n][i]},q}function Ot(){return K?Q:(K=1,Q=T()({}.isPrototypeOf))}function At(){if(et)return tt;et=1;var t=w().navigator,e=t&&t.userAgent;return tt=e?String(e):""}function Pt(){if(rt)return nt;rt=1;var t,e,n=w(),r=At(),i=n.process,o=n.Deno,a=i&&i.versions||o&&o.version,s=a&&a.v8;return s&&(e=(t=s.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&r&&(!(t=r.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=r.match(/Chrome\/(\d+)/))&&(e=+t[1]),nt=e}function Mt(){if(ot)return it;ot=1;var t=Pt(),e=x(),n=w().String;return it=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41}),it}function Dt(){return st?at:(st=1,at=Mt()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Rt(){if(ct)return ut;ct=1;var t=Lt(),e=L(),n=Ot(),r=Object;return ut=Dt()?function(t){return"symbol"==typeof t}:function(i){var o=t("Symbol");return e(o)&&n(o.prototype,r(i))}}function It(){if(ht)return lt;ht=1;var t=String;return lt=function(e){try{return t(e)}catch(t){return"Object"}}}function zt(){if(pt)return ft;pt=1;var t=L(),e=It(),n=TypeError;return ft=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function kt(){if(vt)return dt;vt=1;var t=zt(),e=_t();return dt=function(n,r){var i=n[r];return e(i)?void 0:t(i)}}function jt(){if(yt)return mt;yt=1;var t=I(),e=L(),n=Ct(),r=TypeError;return mt=function(i,o){var a,s;if("string"===o&&e(a=i.toString)&&!n(s=t(a,i)))return s;if(e(a=i.valueOf)&&!n(s=t(a,i)))return s;if("string"!==o&&e(a=i.toString)&&!n(s=t(a,i)))return s;throw new r("Can't convert object to primitive value")}}var Nt,Ft,Bt,Wt,Yt,Gt,Xt,Vt,Ut,Zt,Ht,Jt,qt,$t,Qt,Kt,te,ee,ne,re,ie,oe,ae,se,ue,ce,le,he,fe={exports:{}};function pe(){return Ft?Nt:(Ft=1,Nt=!0)}function de(){if(Wt)return Bt;Wt=1;var t=w(),e=Object.defineProperty;return Bt=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function ve(){if(Yt)return fe.exports;Yt=1;var t=pe(),e=w(),n=de(),r="__core-js_shared__",i=fe.exports=e[r]||n(r,{});return(i.versions||(i.versions=[])).push({version:"3.50.0",mode:t?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"}),fe.exports}function me(){if(Xt)return Gt;Xt=1;var t=ve(),e=Object.create||Object;return Gt=function(n,r){return t[n]||(t[n]=r||e(null))}}function ye(){if(Ut)return Vt;Ut=1;var t=St(),e=Object;return Vt=function(n){return e(t(n))}}function ge(){if(Ht)return Zt;Ht=1;var t=T(),e=ye(),n=t({}.hasOwnProperty);return Zt=Object.hasOwn||function(t,r){return n(e(t),r)}}function be(){if(qt)return Jt;qt=1;var t=T(),e=0,n=Math.random(),r=t(1.1.toString);return Jt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function we(){if(Qt)return $t;Qt=1;var t=w(),e=me(),n=ge(),r=be(),i=Mt(),o=Dt(),a=t.Symbol,s=e("wks"),u=o?a.for||a:a&&a.withoutSetter||r;return $t=function(t){return n(s,t)||(s[t]=i&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function xe(){if(te)return Kt;te=1;var t=I(),e=Ct(),n=Rt(),r=kt(),i=jt(),o=TypeError,a=we()("toPrimitive");return Kt=function(s,u){if(!e(s)||n(s))return s;var c,l=r(s,a);if(l){if(void 0===u&&(u="default"),c=t(l,s,u),!e(c)||n(c))return c;throw new o("Can't convert object to primitive value")}return void 0===u&&(u="number"),i(s,u)}}function _e(){if(ne)return ee;ne=1;var t=xe(),e=Rt();return ee=function(n){var r=t(n,"string");return e(r)?r:r+""}}function Se(){if(ie)return re;ie=1;var t=w(),e=Ct(),n=t.document,r=e(n)&&e(n.createElement);return re=function(t){return r?n.createElement(t):{}}}function Te(){if(ae)return oe;ae=1;var t=R(),e=x(),n=Se();return oe=!t&&!e(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Ce(){if(se)return D;se=1;var t=R(),e=I(),n=bt(),r=wt(),i=Tt(),o=_e(),a=ge(),s=Te(),u=Object.getOwnPropertyDescriptor;return D.f=t?u:function(t,c){if(t=i(t),c=o(c),s)try{return u(t,c)}catch(t){}if(a(t,c))return r(!e(n.f,t,c),t[c])},D}function Ee(){if(ce)return ue;ce=1;var t=x(),e=L(),n=/#|\.prototype\./,r=function(n,r){var u=o[i(n)];return u===s||u!==a&&(e(r)?t(r):!!r)},i=r.normalize=function(t){return String(t).replace(n,".").toLowerCase()},o=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return ue=r}function Le(){if(he)return le;he=1;var t=E(),e=zt(),n=_(),r=t(t.bind);return le=function(t,i){return e(t),void 0===i?t:n?r(t,i):function(){return t.apply(i,arguments)}},le}var Oe,Ae,Pe,Me,De,Re,Ie,ze,ke,je,Ne,Fe,Be,We,Ye,Ge,Xe,Ve,Ue={};function Ze(){return Ae?Oe:(Ae=1,Oe=R()&&x()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function He(){if(Me)return Pe;Me=1;var t=Ct(),e=String,n=TypeError;return Pe=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function Je(){if(De)return Ue;De=1;var t=R(),e=Te(),n=Ze(),r=He(),i=_e(),o=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",c="configurable",l="writable";return Ue.f=t?n?function(t,e,n){if(r(t),e=i(e),r(n),"function"==typeof t&&"prototype"===e&&"value"in n&&l in n&&!n[l]){var o=s(t,e);o&&o[l]&&(t[e]=n.value,n={configurable:c in n?n[c]:o[c],enumerable:u in n?n[u]:o[u],writable:!1})}return a(t,e,n)}:a:function(t,n,s){if(r(t),n=i(n),r(s),e)try{return a(t,n,s)}catch(t){}if("get"in s||"set"in s)throw new o("Accessors not supported");return"value"in s&&(t[n]=s.value),t},Ue}function qe(){if(Ie)return Re;Ie=1;var t=R(),e=Je(),n=wt();return Re=t?function(t,r,i){return e.f(t,r,n(1,i))}:function(t,e,n){return t[e]=n,t},Re}function $e(){if(ke)return ze;ke=1;var t=w(),e=S(),n=E(),r=L(),i=Ce().f,o=Ee(),a=Et(),s=Le(),u=qe(),c=ge(),l=function(t){var n=function(r,i,o){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,i)}return new t(r,i,o)}return e(t,this,arguments)};return n.prototype=t.prototype,n};return ze=function(e,h){var f,p,d,v,m,y,g,b,w,x=e.target,_=e.global,S=e.stat,T=e.proto,C=_?t:S?t[x]:t[x]&&t[x].prototype,E=_?a:a[x]||u(a,x,{})[x],L=E.prototype;for(v in h)p=!(f=o(_?v:x+(S?".":"#")+v,e.forced))&&C&&c(C,v),y=E[v],p&&(g=e.dontCallGetSet?(w=i(C,v))&&w.value:C[v]),m=p&&g?g:h[v],(f||T||typeof y!=typeof m)&&(b=e.bind&&p?s(m,t):e.wrap&&p?l(m):T&&r(m)?n(m):m,(e.sham||m&&m.sham||y&&y.sham)&&u(b,"sham",!0),u(E,v,b),T&&(c(a,d=x+"Prototype")||u(a,d,{}),u(a[d],v,m),e.real&&L&&(f||!L[v])&&u(L,v,m)))}}function Qe(){return Ne?je:(Ne=1,je=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1})}function Ke(){return We?Be:(We=1,Fe||(Fe=1,$e()({target:"Math",stat:!0},{sign:Qe()})),Be=Et().Math.sign)}function tn(){return Ge?Ye:(Ge=1,Ye=Ke())}var en=r(Ve?Xe:(Ve=1,Xe=tn()));function nn(t,e,n){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==n?n:0}function rn(){this.armLocation=new nn,this.armRotation={},this.armRotation.horizontal=0,this.armRotation.vertical=0,this.armLength=1.7,this.cameraOffset=new nn,this.offsetMultiplier=.6,this.cameraLocation=new nn,this.cameraRotation=new nn(.5*Math.PI,0,0),this.calculateCameraOrientation()}nn.subtract=function(t,e){const n=new nn;return n.x=t.x-e.x,n.y=t.y-e.y,n.z=t.z-e.z,n},nn.add=function(t,e){const n=new nn;return n.x=t.x+e.x,n.y=t.y+e.y,n.z=t.z+e.z,n},nn.avg=function(t,e){return new nn((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},nn.scalarProduct=function(t,e){return new nn(t.x*e,t.y*e,t.z*e)},nn.dotProduct=function(t,e){return t.x*e.x+t.y*e.y+t.z*e.z},nn.crossProduct=function(t,e){const n=new nn;return n.x=t.y*e.z-t.z*e.y,n.y=t.z*e.x-t.x*e.z,n.z=t.x*e.y-t.y*e.x,n},nn.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},nn.prototype.normalize=function(){return nn.scalarProduct(this,1/this.length())},rn.prototype.setOffset=function(t,e){const n=Math.abs,r=en,i=this.offsetMultiplier,o=this.armLength*i;n(t)>o&&(t=r(t)*o),n(e)>o&&(e=r(e)*o),this.cameraOffset.x=t,this.cameraOffset.y=e,this.calculateCameraOrientation()},rn.prototype.getOffset=function(){return this.cameraOffset},rn.prototype.setArmLocation=function(t,e,n){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=n,this.calculateCameraOrientation()},rn.prototype.setArmRotation=function(t,e){void 0!==t&&(this.armRotation.horizontal=t),void 0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},rn.prototype.getArmRotation=function(){const t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},rn.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.setOffset(this.cameraOffset.x,this.cameraOffset.y),this.calculateCameraOrientation())},rn.prototype.getArmLength=function(){return this.armLength},rn.prototype.getCameraLocation=function(){return this.cameraLocation},rn.prototype.getCameraRotation=function(){return this.cameraRotation},rn.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal;const t=this.cameraRotation.x,e=this.cameraRotation.z,n=this.cameraOffset.x,r=this.cameraOffset.y,i=Math.sin,o=Math.cos;this.cameraLocation.x=this.cameraLocation.x+n*o(e)+r*-i(e)*o(t),this.cameraLocation.y=this.cameraLocation.y+n*i(e)+r*o(e)*o(t),this.cameraLocation.z=this.cameraLocation.z+r*i(t)};var on,an,sn,un,cn,ln,hn,fn,pn,dn,vn,mn,yn,gn,bn={};function wn(){return an?on:(an=1,on=function(){})}function xn(){return un?sn:(un=1,sn=Object.create?Object.create(null):{})}function _n(){if(ln)return cn;ln=1;var t=w(),e=L(),n=t.WeakMap;return cn=e(n)&&/native code/.test(String(n))}function Sn(){if(fn)return hn;fn=1;var t=me(),e=be(),n=t("keys");return hn=function(t){return n[t]||(n[t]=e(t))}}function Tn(){return dn?pn:(dn=1,pn={})}function Cn(){if(mn)return vn;mn=1;var t,e,n,r=_n(),i=w(),o=Ct(),a=qe(),s=ge(),u=ve(),c=Sn(),l=Tn(),h="Object already initialized",f=i.TypeError,p=i.WeakMap;if(r||u.state){var d=u.state||(u.state=new p);d.get=d.get,d.has=d.has,d.set=d.set,t=function(t,e){if(d.has(t))throw new f(h);return e.facade=t,d.set(t,e),e},e=function(t){return d.get(t)||{}},n=function(t){return d.has(t)}}else{var v=c("state");l[v]=!0,t=function(t,e){if(s(t,v))throw new f(h);return e.facade=t,a(t,v,e),e},e=function(t){return s(t,v)?t[v]:{}},n=function(t){return s(t,v)}}return vn={set:t,get:e,has:n,enforce:function(r){return n(r)?e(r):t(r,{})},getterFor:function(t){return function(n){var r;if(!o(n)||(r=e(n)).type!==t)throw new f("Incompatible receiver, "+t+" required");return r}}}}function En(){if(gn)return yn;gn=1;var t=R(),e=ge(),n=Function.prototype,r=t&&Object.getOwnPropertyDescriptor,i=e(n,"name"),o=i&&"something"===function(){}.name,a=i&&(!t||t&&r(n,"name").configurable);return yn={EXISTS:i,PROPER:o,CONFIGURABLE:a}}var Ln,On,An,Pn,Mn,Dn,Rn,In,zn,kn,jn,Nn,Fn,Bn,Wn,Yn,Gn,Xn,Vn,Un,Zn,Hn,Jn,qn,$n,Qn,Kn,tr,er,nr,rr,ir,or,ar,sr,ur,cr,lr,hr,fr,pr,dr,vr,mr,yr,gr,br,wr,xr,_r,Sr,Tr,Cr,Er,Lr,Or,Ar,Pr,Mr,Dr,Rr,Ir,zr,kr,jr,Nr,Fr,Br,Wr={};function Yr(){if(On)return Ln;On=1;var t=Math.ceil,e=Math.floor;return Ln=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)}}function Gr(){if(Pn)return An;Pn=1;var t=Yr();return An=function(e){var n=+e;return n!=n||0===n?0:t(n)},An}function Xr(){if(Dn)return Mn;Dn=1;var t=Gr(),e=Math.max,n=Math.min;return Mn=function(r,i){var o=t(r);return o<0?e(o+i,0):n(o,i)}}function Vr(){if(In)return Rn;In=1;var t=Gr(),e=Math.min;return Rn=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Ur(){if(kn)return zn;kn=1;var t=Vr();return zn=function(e){return t(e.length)}}function Zr(){if(Nn)return jn;Nn=1;var t=Tt(),e=Xr(),n=Ur(),r=function(r){return function(i,o,a){var s=t(i),u=n(s);if(0===u)return!r&&-1;var c,l=e(a,u);if(r&&o!=o){for(;u>l;)if((c=s[l++])!=c)return!0}else for(;u>l;l++)if((r||l in s)&&s[l]===o)return r||l||0;return!r&&-1}};return jn={includes:r(!0),indexOf:r(!1)}}function Hr(){if(Bn)return Fn;Bn=1;var t=T(),e=ge(),n=Tt(),r=Zr().indexOf,i=Tn(),o=t([].push);return Fn=function(t,a){var s,u=n(t),c=0,l=[];for(s in u)!e(i,s)&&e(u,s)&&o(l,s);for(;a.length>c;)e(u,s=a[c++])&&(~r(l,s)||o(l,s));return l},Fn}function Jr(){return Yn?Wn:(Yn=1,Wn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function qr(){if(Xn)return Gn;Xn=1;var t=Hr(),e=Jr();return Gn=Object.keys||function(n){return t(n,e)}}function $r(){if(Vn)return Wr;Vn=1;var t=R(),e=Ze(),n=Je(),r=He(),i=Tt(),o=qr();return Wr.f=t&&!e?Object.defineProperties:function(t,e){r(t);for(var a,s=i(e),u=o(e),c=u.length,l=0;c>l;)n.f(t,a=u[l++],s[a]);return t},Wr}function Qr(){return Zn?Un:(Zn=1,Un=Lt()("document","documentElement"))}function Kr(){if(Jn)return Hn;Jn=1;var t,e=He(),n=$r(),r=Jr(),i=Tn(),o=Qr(),a=Se(),s="prototype",u="script",c=Sn()("IE_PROTO"),l=function(){},h=function(t){return"<"+u+">"+t+"</"+u+">"},f=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var e,n,i;p="undefined"!=typeof document?document.domain&&t?f(t):(n=a("iframe"),i="java"+u+":",n.style.display="none",o.appendChild(n),n.src=String(i),(e=n.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F):f(t);for(var c=r.length;c--;)delete p[s][r[c]];return p()};return i[c]=!0,Hn=Object.create||function(t,r){var i;return null!==t?(l[s]=e(t),i=new l,l[s]=null,i[c]=t):i=p(),void 0===r?i:n.f(i,r)}}function ti(){return $n?qn:($n=1,qn=!x()(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))}function ei(){if(Kn)return Qn;Kn=1;var t=ge(),e=L(),n=ye(),r=Sn(),i=ti(),o=r("IE_PROTO"),a=Object,s=a.prototype;return Qn=i?a.getPrototypeOf:function(r){var i=n(r);if(t(i,o))return i[o];var u=i.constructor;return e(u)&&i instanceof u?u.prototype:i instanceof a?s:null},Qn}function ni(){if(er)return tr;er=1;var t=qe();return tr=function(e,n,r,i){return i&&i.enumerable?e[n]=r:t(e,n,r),e}}function ri(){if(rr)return nr;rr=1;var t,e,n,r=x(),i=L(),o=Ct(),a=Kr(),s=ei(),u=ni(),c=we(),l=pe(),h=c("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(e=s(s(n)))!==Object.prototype&&(t=e):f=!0),!o(t)||r(function(){var e={};return t[h].call(e)!==e})?t={}:l&&(t=a(t)),i(t[h])||u(t,h,function(){return this}),nr={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:f}}function ii(){if(or)return ir;or=1;var t={};return t[we()("toStringTag")]="z",ir="[object z]"===String(t)}function oi(){if(sr)return ar;sr=1;var t=ii(),e=L(),n=C(),r=we()("toStringTag"),i=Object,o="Arguments"===n(function(){return arguments}());return ar=t?n:function(t){var a,s,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(a=i(t),r))?s:o?n(a):"Object"===(u=n(a))&&e(a.callee)?"Arguments":u}}function ai(){if(cr)return ur;cr=1;var t=ii(),e=oi();return ur=t?{}.toString:function(){return"[object "+e(this)+"]"}}function si(){if(hr)return lr;hr=1;var t=ii(),e=Je().f,n=qe(),r=ge(),i=ai(),o=we()("toStringTag");return lr=function(a,s,u,c){var l=u?a:a&&a.prototype;l&&(r(l,o)||e(l,o,{configurable:!0,value:s}),c&&!t&&n(l,"toString",i))}}function ui(){if(pr)return fr;pr=1;var t=ri().IteratorPrototype,e=Kr(),n=wt(),r=si(),i=xn(),o=function(){return this};return fr=function(a,s,u,c){var l=s+" Iterator";return a.prototype=e(t,{next:n(+!c,u)}),r(a,l,!1,!0),i[l]=o,a}}function ci(){if(vr)return dr;vr=1;var t=T(),e=zt();return dr=function(n,r,i){try{return t(e(Object.getOwnPropertyDescriptor(n,r)[i]))}catch(t){}},dr}function li(){if(yr)return mr;yr=1;var t=Ct();return mr=function(e){return t(e)||null===e}}function hi(){if(br)return gr;br=1;var t=li(),e=String,n=TypeError;return gr=function(r){if(t(r))return r;throw new n("Can't set "+e(r)+" as a prototype")}}function fi(){if(xr)return wr;xr=1;var t=ci(),e=Ct(),n=St(),r=hi();return wr=Object.setPrototypeOf||("__proto__"in{}?function(){var i,o=!1,a={};try{(i=t(Object.prototype,"__proto__","set"))(a,[]),o=a instanceof Array}catch(t){}return function(t,a){return n(t),r(a),e(t)?(o?i(t,a):t.__proto__=a,t):t}}():void 0)}function pi(){if(Sr)return _r;Sr=1;var t=$e(),e=I(),n=pe(),r=En(),i=L(),o=ui(),a=ei(),s=fi(),u=si(),c=qe(),l=ni(),h=we(),f=xn(),p=ri(),d=r.PROPER,v=r.CONFIGURABLE,m=p.IteratorPrototype,y=p.BUGGY_SAFARI_ITERATORS,g=h("iterator"),b="keys",w="values",x="entries",_=function(){return this};return _r=function(r,h,p,S,T,C,E){o(p,h,S);var L,O,A,P=function(t){if(t===T&&z)return z;if(!y&&t&&t in R)return R[t];switch(t){case b:case w:case x:return function(){return new p(this,t)}}return function(){return new p(this)}},M=h+" Iterator",D=!1,R=r.prototype,I=R[g]||R["@@iterator"]||T&&R[T],z=!y&&I||P(T),k="Array"===h&&R.entries||I;if(k&&(L=a(k.call(new r)))!==Object.prototype&&L.next&&(n||a(L)===m||(s?s(L,m):i(L[g])||l(L,g,_)),u(L,M,!0,!0),n&&(f[M]=_)),d&&T===w&&I&&I.name!==w&&(!n&&v?c(R,"name",w):(D=!0,z=function(){return e(I,this)})),T)if(O={values:P(w),keys:C?z:P(b),entries:P(x)},E)for(A in O)(y||D||!(A in R))&&l(R,A,O[A]);else t({target:h,proto:!0,forced:y||D},O);return n&&!E||R[g]===z||l(R,g,z,{name:T}),f[h]=z,O}}function di(){return Cr?Tr:(Cr=1,Tr=function(t,e){return{value:t,done:e}})}function vi(){if(Lr)return Er;Lr=1;var t=Tt(),e=wn(),n=xn(),r=Cn(),i=Je().f,o=pi(),a=di(),s=pe(),u=R(),c="Array Iterator",l=r.set,h=r.getterFor(c);Er=o(Array,"Array",function(e,n){l(this,{type:c,target:t(e),index:0,kind:n})},function(){var t=h(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,a(void 0,!0);switch(t.kind){case"keys":return a(n,!1);case"values":return a(e[n],!1)}return a([n,e[n]],!1)},"values");var f=n.Arguments=n.Array;if(e("keys"),e("values"),e("entries"),!s&&u&&"values"!==f.name)try{i(f,"name",{value:"values"})}catch(t){}return Er}function mi(){return Ar?Or:(Ar=1,Or={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function yi(){if(Pr)return bn;Pr=1,vi();var t=mi(),e=w(),n=si(),r=xn();for(var i in t)n(e[i],i),r[i]=r.Array;return bn}function gi(){if(Dr)return Mr;Dr=1;var t=w(),e=Et();return Mr=function(n,r){var i=e[n+"Prototype"],o=i&&i[r];if(o)return o;var a=t[n],s=a&&a.prototype;return s&&s[r]}}function bi(){return Ir?Rr:(Ir=1,vi(),Rr=gi()("Array","values"))}function wi(){return kr?zr:(kr=1,zr=bi())}function xi(){if(Nr)return jr;Nr=1,yi();var t=oi(),e=ge(),n=Ot(),r=wi(),i=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return jr=function(a){var s=a.values;return a===i||n(i,a)&&s===i.values||e(o,t(a))?r:s}}var _i,Si,Ti,Ci,Ei,Li,Oi,Ai,Pi,Mi=r(Br?Fr:(Br=1,Fr=xi())),Di={},Ri={};function Ii(){if(Si)return _i;Si=1;var t=w(),e=At(),n=C(),r=function(t){return e.slice(0,t.length)===t};return _i=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":t.Bun&&"string"==typeof Bun.version?"BUN":t.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(t.process)?"NODE":t.window&&t.document?"BROWSER":"REST"}function zi(){return Ci?Ti:(Ci=1,Ti=T()([].slice))}function ki(){if(Li)return Ei;Li=1;var t=TypeError;return Ei=function(e,n){if(e<n)throw new t("Not enough arguments");return e}}function ji(){if(Ai)return Oi;Ai=1;var t,e=w(),n=S(),r=L(),i=Ii(),o=At(),a=zi(),s=ki(),u=e.Function,c=/MSIE .\./.test(o)||"BUN"===i&&((t=e.Bun.version.split(".")).length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2]));return Oi=function(t,e){var i=e?2:1;return c?function(o,c){var l=s(arguments.length,1)>i,h=r(o)?o:u(o),f=l?a(arguments,i):[],p=l?function(){n(h,this,f)}:h;return e?t(p,c):t(p)}:t},Oi}var Ni,Fi,Bi,Wi,Yi,Gi,Xi={};function Vi(){return Fi||(Fi=1,function(){if(Pi)return Ri;Pi=1;var t=$e(),e=w(),n=ji()(e.setInterval,!0);t({global:!0,bind:!0,forced:e.setInterval!==n},{setInterval:n})}(),function(){if(Ni)return Xi;Ni=1;var t=$e(),e=w(),n=ji()(e.setTimeout,!0);t({global:!0,bind:!0,forced:e.setTimeout!==n},{setTimeout:n})}()),Di}function Ui(){return Wi?Bi:(Wi=1,Vi(),Bi=Et().setTimeout)}var Zi=r(Gi?Yi:(Gi=1,Yi=Ui()));function Hi(t,e,n){this.dataGroup=t,this.column=e,this.graph=n,this.index=void 0,this.value=void 0,this.values=t.getDistinctValues(this.column),Mi(this).length>0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,n.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}Hi.prototype.isLoaded=function(){return this.loaded},Hi.prototype.getLoadedProgress=function(){const t=Mi(this).length;let e=0;for(;this.dataPoints[e];)e++;return Math.round(e/t*100)},Hi.prototype.getLabel=function(){return this.graph.filterLabel},Hi.prototype.getColumn=function(){return this.column},Hi.prototype.getSelectedValue=function(){if(void 0!==this.index)return Mi(this)[this.index]},Hi.prototype.getValues=function(){return Mi(this)},Hi.prototype.getValue=function(t){if(t>=Mi(this).length)throw new Error("Index out of range");return Mi(this)[t]},Hi.prototype._getDataPoints=function(t){if(void 0===t&&(t=this.index),void 0===t)return[];let n;if(this.dataPoints[t])n=this.dataPoints[t];else{const r={};r.column=this.column,r.value=Mi(this)[t];const i=new e.DataView(this.dataGroup.getDataSet(),{filter:function(t){return t[r.column]==r.value}}).get();n=this.dataGroup._getDataPoints(i),this.dataPoints[t]=n}return n},Hi.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},Hi.prototype.selectValue=function(t){if(t>=Mi(this).length)throw new Error("Index out of range");this.index=t,this.value=Mi(this)[t]},Hi.prototype.loadInBackground=function(t){void 0===t&&(t=0);const e=this.graph.frame;if(t<Mi(this).length){void 0===e.progress&&(e.progress=document.createElement("DIV"),e.progress.style.position="absolute",e.progress.style.color="gray",e.appendChild(e.progress));const n=this.getLoadedProgress();e.progress.innerHTML="Loading animation... "+n+"%",e.progress.style.bottom="60px",e.progress.style.left="10px";const r=this;Zi(function(){r.loadInBackground(t+1)},10),this.loaded=!1}else this.loaded=!0,void 0!==e.progress&&(e.removeChild(e.progress),e.progress=void 0),this.onLoadCallback&&this.onLoadCallback()};var Ji,qi,$i,Qi,Ki,to,eo,no,ro,io,oo,ao,so,uo,co,lo,ho,fo,po,vo,mo,yo,go,bo={};function wo(){if(qi)return Ji;qi=1;var t=It(),e=TypeError;return Ji=function(n,r){if(!delete n[r])throw new e("Cannot delete property "+t(r)+" of "+t(n))}}function xo(){if(Qi)return $i;Qi=1;var t=oi(),e=String;return $i=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function _o(){if(to)return Ki;to=1;var t=zi(),e=Math.floor,n=function(r,i){var o=r.length;if(o<8)for(var a,s,u=1;u<o;){for(s=u,a=r[u];s&&i(r[s-1],a)>0;)r[s]=r[--s];s!==u++&&(r[s]=a)}else for(var c=e(o/2),l=n(t(r,0,c),i),h=n(t(r,c),i),f=l.length,p=h.length,d=0,v=0;d<f||v<p;)r[d+v]=d<f&&v<p?i(l[d],h[v])<=0?l[d++]:h[v++]:d<f?l[d++]:h[v++];return r};return Ki=n}function So(){if(no)return eo;no=1;var t=x();return eo=function(e,n){var r=[][e];return!!r&&t(function(){r.call(null,n||function(){return 1},1)})}}function To(){if(io)return ro;io=1;var t=At().match(/firefox\/(\d+)/i);return ro=!!t&&+t[1]}function Co(){return ao?oo:(ao=1,oo=/MSIE|Trident/.test(At()))}function Eo(){if(uo)return so;uo=1;var t=At().match(/AppleWebKit\/(\d+)\./);return so=!!t&&+t[1]}function Lo(){if(co)return bo;co=1;var t=$e(),e=T(),n=zt(),r=ye(),i=Ur(),o=wo(),a=xo(),s=x(),u=_o(),c=So(),l=To(),h=Co(),f=Pt(),p=Eo(),d=[],v=e(d.sort),m=e(d.push),y=s(function(){d.sort(void 0)}),g=s(function(){d.sort(null)}),b=c("sort"),w=!s(function(){if(f)return f<70;if(!(l&&l>3)){if(h)return!0;if(p)return p<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)d.push({k:e+r,v:n})}for(d.sort(function(t,e){return e.v-t.v}),r=0;r<d.length;r++)e=d[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}});return t({target:"Array",proto:!0,forced:y||!g||!b||!w},{sort:function(t){void 0!==t&&n(t);var e=r(this);if(w)return void 0===t?v(e):v(e,t);var s,c,l=[],h=i(e);for(c=0;c<h;c++)c in e&&m(l,e[c]);for(u(l,function(t){return function(e,n){if(void 0===n)return-1;if(void 0===e)return 1;if(void 0!==t)return+t(e,n)||0;var r=a(e),i=a(n);return r===i?0:r>i?1:-1}}(t)),s=i(l),c=0;c<s;)e[c]=l[c++];for(;c<h;)o(e,c++);return e}}),bo}function Oo(){return ho?lo:(ho=1,Lo(),lo=gi()("Array","sort"))}function Ao(){if(po)return fo;po=1;var t=Ot(),e=Oo(),n=Array.prototype;return fo=function(r){var i=r.sort;return r===n||t(n,r)&&i===n.sort?e:i}}function Po(){return mo?vo:(mo=1,vo=Ao())}var Mo,Do,Ro,Io,zo,ko,jo,No,Fo,Bo=r(go?yo:(go=1,yo=Po())),Wo={};function Yo(){return Ro?Do:(Ro=1,function(){if(Mo)return Wo;Mo=1;var t=$e(),e=E(),n=Zr().indexOf,r=So(),i=e([].indexOf),o=!!i&&1/i([1],1,-0)<0;t({target:"Array",proto:!0,forced:o||!r("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return o?i(this,t,e)||0:n(this,t,e)}})}(),Do=gi()("Array","indexOf"))}function Go(){if(zo)return Io;zo=1;var t=Ot(),e=Yo(),n=Array.prototype;return Io=function(r){var i=r.indexOf;return r===n||t(n,r)&&i===n.indexOf?e:i}}function Xo(){return jo?ko:(jo=1,ko=Go())}var Vo,Uo,Zo,Ho,Jo,qo,$o,Qo,Ko,ta,ea,na,ra,ia,oa,aa,sa,ua,ca,la,ha,fa,pa,da,va,ma=r(Fo?No:(Fo=1,No=Xo())),ya={};function ga(){if(Uo)return Vo;Uo=1;var t=C();return Vo=Array.isArray||function(e){return"Array"===t(e)}}function ba(){if(Ho)return Zo;Ho=1;var t=T(),e=L(),n=ve(),r=t(Function.toString);return e(n.inspectSource)||(n.inspectSource=function(t){return r(t)}),Zo=n.inspectSource}function wa(){if(qo)return Jo;qo=1;var t=T(),e=x(),n=L(),r=oi(),i=Lt(),o=ba(),a=function(){},s=i("Reflect","construct"),u=/^\s*(?:class|function)\b/,c=t(u.exec),l=!u.test(a),h=function(t){if(!n(t))return!1;try{return s(a,[],t),!0}catch(t){return!1}},f=function(t){if(!n(t))return!1;switch(r(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return l||!!c(u,o(t))}catch(t){return!0}};return f.sham=!0,Jo=!s||e(function(){var t;return h(h.call)||!h(Object)||!h(function(){t=!0})||t})?f:h}function xa(){if(Qo)return $o;Qo=1;var t=ga(),e=wa(),n=Ct(),r=we()("species"),i=Array;return $o=function(o){var a;return t(o)&&(a=o.constructor,(e(a)&&(a===i||t(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?i:a}}function _a(){if(ta)return Ko;ta=1;var t=xa();return Ko=function(e,n){return new(t(e))(0===n?0:n)}}function Sa(){if(na)return ea;na=1;var t=R(),e=Je(),n=wt();return ea=function(r,i,o){t?e.f(r,i,n(0,o)):r[i]=o},ea}function Ta(){if(ia)return ra;ia=1;var t=Le(),e=xt(),n=ye(),r=Ur(),i=_a(),o=Sa(),a=function(a){var s=1===a,u=2===a,c=3===a,l=4===a,h=6===a,f=7===a,p=5===a||h;return function(d,v,m){for(var y,g,b=n(d),w=e(b),x=r(w),_=t(v,m),S=0,T=0,C=s?i(d,x):u||f?i(d,0):void 0;x>S;S++)if((p||S in w)&&(g=_(y=w[S],S,b),a))if(s)o(C,S,g);else if(g)switch(a){case 3:return!0;case 5:return y;case 6:return S;case 2:o(C,T++,y)}else switch(a){case 4:return!1;case 7:o(C,T++,y)}return h?-1:c||l?l:C}};return ra={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}function Ca(){if(aa)return oa;aa=1;var t=x(),e=we(),n=Pt(),r=e("species");return oa=function(e){return n>=51||!t(function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo})},oa}function Ea(){return ca?ua:(ca=1,function(){if(sa)return ya;sa=1;var t=$e(),e=Ta().filter;t({target:"Array",proto:!0,forced:!Ca()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),ua=gi()("Array","filter"))}function La(){if(ha)return la;ha=1;var t=Ot(),e=Ea(),n=Array.prototype;return la=function(r){var i=r.filter;return r===n||t(n,r)&&i===n.filter?e:i}}function Oa(){return pa?fa:(pa=1,fa=La())}var Aa,Pa,Ma,Da,Ra,Ia,za,ka,ja,Na,Fa,Ba,Wa,Ya=r(va?da:(va=1,da=Oa())),Ga={};function Xa(){return Pa?Aa:(Pa=1,Aa="\t\n\v\f\r \u2028\u2029\ufeff")}function Va(){if(Da)return Ma;Da=1;var t=T(),e=St(),n=xo(),r=Xa(),i=t("".replace),o=RegExp("^["+r+"]+"),a=RegExp("(^|[^"+r+"])["+r+"]+$"),s=function(t){return function(r){var s=n(e(r));return 1&t&&(s=i(s,o,"")),2&t&&(s=i(s,a,"$1")),s}};return Ma={start:s(1),end:s(2),trim:s(3)}}function Ua(){if(Ia)return Ra;Ia=1;var t=w(),e=x(),n=T(),r=xo(),i=Va().trim,o=Xa(),a=n("".charAt),s=t.parseFloat,u=t.Symbol,c=u&&u.iterator,l=1/s(o+"-0")!=-1/0||c&&!e(function(){s(Object(c))});return Ra=l?function(t){var e=i(r(t)),n=s(e);return 0===n&&"-"===a(e,0)?-0:n}:s,Ra}function Za(){return ja?ka:(ja=1,function(){if(za)return Ga;za=1;var t=$e(),e=Ua();t({global:!0,forced:parseFloat!==e},{parseFloat:e})}(),ka=Et().parseFloat)}function Ha(){return Fa?Na:(Fa=1,Na=Za())}var Ja,qa,$a,Qa,Ka,ts,es,ns,rs,is,os,as=r(Wa?Ba:(Wa=1,Ba=Ha())),ss={};function us(){if(qa)return Ja;qa=1;var t=ye(),e=Xr(),n=Ur();return Ja=[].fill||function(r){for(var i=t(this),o=n(i),a=arguments.length,s=e(a>1?arguments[1]:void 0,o),u=a>2?arguments[2]:void 0,c=void 0===u?o:e(u,o);c>s;)i[s++]=r;return i},Ja}function cs(){return Ka?Qa:(Ka=1,function(){if($a)return ss;$a=1;var t=$e(),e=us(),n=wn();t({target:"Array",proto:!0},{fill:e}),n("fill")}(),Qa=gi()("Array","fill"))}function ls(){if(es)return ts;es=1;var t=Ot(),e=cs(),n=Array.prototype;return ts=function(r){var i=r.fill;return r===n||t(n,r)&&i===n.fill?e:i}}function hs(){return rs?ns:(rs=1,ns=ls())}var fs,ps,ds,vs,ms,ys,gs,bs,ws,xs,_s,Ss=r(os?is:(os=1,is=hs())),Ts={};function Cs(){if(ps)return fs;ps=1;var t=Ta().forEach,e=So()("forEach");return fs=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},fs}function Es(){return ms?vs:(ms=1,function(){if(ds)return Ts;ds=1;var t=$e(),e=Cs();t({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e})}(),vs=gi()("Array","forEach"))}function Ls(){return gs?ys:(gs=1,ys=Es())}function Os(){if(ws)return bs;ws=1;var t=oi(),e=ge(),n=Ot(),r=Ls(),i=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return bs=function(a){var s=a.forEach;return a===i||n(i,a)&&s===i.forEach||e(o,t(a))?r:s}}var As,Ps,Ms,Ds,Rs,Is,zs,ks=r(_s?xs:(_s=1,xs=Os()));function js(){return Ms?Ps:(Ms=1,As||(As=1,$e()({target:"Array",stat:!0},{isArray:ga()})),Ps=Et().Array.isArray)}function Ns(){return Rs?Ds:(Rs=1,Ds=js())}var Fs,Bs,Ws,Ys,Gs,Xs,Vs,Us=r(zs?Is:(zs=1,Is=Ns()));function Zs(){return Ws?Bs:(Ws=1,Fs||(Fs=1,$e()({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})),Bs=Et().Number.isNaN)}function Hs(){return Gs?Ys:(Gs=1,Ys=Zs())}var Js,qs,$s,Qs,Ks,tu,eu,nu,ru,iu,ou,au,su,uu=r(Vs?Xs:(Vs=1,Xs=Hs())),cu={};function lu(){if(qs)return Js;qs=1;var t=TypeError;return Js=function(e){if(e>9007199254740991)throw new t("Maximum allowed index exceeded");return e}}function hu(){if(Qs)return $s;Qs=1;var t=R(),e=ga(),n=TypeError,r=Object.getOwnPropertyDescriptor,i=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();return $s=i?function(t,i){if(e(t)&&!r(t,"length").writable)throw new n("Cannot set read only .length");return t.length=i}:function(t,e){return t.length=e}}function fu(){if(Ks)return cu;Ks=1;var t=$e(),e=x(),n=ga(),r=Ct(),i=ye(),o=Ur(),a=lu(),s=Sa(),u=hu(),c=_a(),l=Ca(),h=we(),f=Pt(),p=h("isConcatSpreadable"),d=f>=51||!e(function(){var t=[];return t[p]=!1,t.concat()[0]!==t}),v=function(t){if(!r(t))return!1;var e=t[p];return void 0!==e?!!e:n(t)};return t({target:"Array",proto:!0,arity:1,forced:!d||!l("concat")},{concat:function(t){var e,n,r,l,h,f=i(this),p=c(f,0),d=0;for(e=-1,r=arguments.length;e<r;e++)if(v(h=-1===e?f:arguments[e]))for(l=o(h),a(d+l),n=0;n<l;n++,d++)n in h&&s(p,d,h[n]);else a(d+1),s(p,d++,h);return u(p,d),p}}),cu}function pu(){return eu?tu:(eu=1,fu(),tu=gi()("Array","concat"))}function du(){if(ru)return nu;ru=1;var t=Ot(),e=pu(),n=Array.prototype;return nu=function(r){var i=r.concat;return r===n||t(n,r)&&i===n.concat?e:i}}function vu(){return ou?iu:(ou=1,iu=du())}var mu,yu,gu,bu,wu,xu,_u,Su,Tu,Cu,Eu=r(su?au:(su=1,au=vu())),Lu={},Ou={};function Au(){return mu||(mu=1,Ou.f=Object.getOwnPropertySymbols),Ou}function Pu(){if(gu)return yu;gu=1;var t=R(),e=T(),n=I(),r=x(),i=qr(),o=Au(),a=bt(),s=ye(),u=xt(),c=Object.assign,l=Object.defineProperty,h=e([].concat);return yu=!c||r(function(){if(t&&1!==c({b:1},c(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},n={},r=Symbol("assign detection"),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach(function(t){n[t]=t}),7!==c({},e)[r]||i(c({},n)).join("")!==o})?function(e,r){for(var c=s(e),l=arguments.length,f=1,p=o.f,d=a.f;l>f;)for(var v,m=u(arguments[f++]),y=p?h(i(m),p(m)):i(m),g=y.length,b=0;g>b;)v=y[b++],t&&!n(d,m,v)||(c[v]=m[v]);return c}:c,yu}function Mu(){return xu?wu:(xu=1,function(){if(bu)return Lu;bu=1;var t=$e(),e=Pu();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}(),wu=Et().Object.assign)}function Du(){return Su?_u:(Su=1,_u=Mu())}var Ru,Iu=r(Cu?Tu:(Cu=1,Tu=Du())),zu={exports:{}};function ku(){return Ru||(Ru=1,function(t){function e(t){if(t)return function(t){return Object.assign(t,e.prototype),t._callbacks=new Map,t}(t);this._callbacks=new Map}e.prototype.on=function(t,e){const n=this._callbacks.get(t)??[];return n.push(e),this._callbacks.set(t,n),this},e.prototype.once=function(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return n.fn=e,this.on(t,n),this},e.prototype.off=function(t,e){if(void 0===t&&void 0===e)return this._callbacks.clear(),this;if(void 0===e)return this._callbacks.delete(t),this;const n=this._callbacks.get(t);if(n){for(const[t,r]of n.entries())if(r===e||r.fn===e){n.splice(t,1);break}0===n.length?this._callbacks.delete(t):this._callbacks.set(t,n)}return this},e.prototype.emit=function(t,...e){const n=this._callbacks.get(t);if(n){const t=[...n];for(const n of t)n.apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks.get(t)??[]},e.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let e=0;for(const t of this._callbacks.values())e+=t.length;return e},e.prototype.hasListeners=function(t){return this.listenerCount(t)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,t.exports=e}(zu)),zu.exports}var ju,Nu=r(ku()),Fu={},Bu={},Wu={};function Yu(){if(ju)return Wu;ju=1;var t=Hr(),e=Jr().concat("length","prototype");return Wu.f=Object.getOwnPropertyNames||function(n){return t(n,e)},Wu}var Gu,Xu,Vu,Uu={};function Zu(){if(Gu)return Uu;Gu=1;var t=C(),e=Tt(),n=Yu().f,r=zi(),i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Uu.f=function(o){return i&&"Window"===t(o)?function(t){try{return n(t)}catch(t){return r(i)}}(o):n(e(o))},Uu}function Hu(){if(Vu)return Xu;Vu=1;var t=Je();return Xu=function(e,n,r){return t.f(e,n,r)}}var Ju,qu,$u,Qu,Ku,tc,ec={};function nc(){if(Ju)return ec;Ju=1;var t=we();return ec.f=t,ec}function rc(){if($u)return qu;$u=1;var t=Et(),e=ge(),n=nc(),r=Je().f;return qu=function(i){var o=t.Symbol||(t.Symbol={});e(o,i)||r(o,i,{value:n.f(i)})}}function ic(){if(Ku)return Qu;Ku=1;var t=I(),e=Lt(),n=we(),r=ni();return Qu=function(){var i=e("Symbol"),o=i&&i.prototype,a=o&&o.valueOf,s=n("toPrimitive");o&&!o[s]&&r(o,s,function(e){return t(a,this)},{arity:1})}}var oc,ac,sc,uc={};function cc(){return ac?oc:(ac=1,oc=Mt()&&!!Symbol.for&&!!Symbol.keyFor)}var lc,hc={};var fc,pc,dc,vc,mc,yc,gc,bc,wc,xc={};function _c(){if(pc)return fc;pc=1;var t=Ct(),e=Cn().get;return fc=function(n){if(!t(n))return!1;var r=e(n);return!!r&&"RawJSON"===r.type}}function Sc(){return vc?dc:(vc=1,dc=T()(1.1.valueOf))}function Tc(){if(yc)return mc;yc=1;var t=T(),e=ge(),n=SyntaxError,r=parseInt,i=String.fromCharCode,o=t("".charAt),a=t("".slice),s=t(/./.exec),u={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},c=/^[\da-f]{4}$/i,l=/^[\u0000-\u001F]$/;return mc=function(t,h){for(var f=!0,p="";h<t.length;){var d=o(t,h);if("\\"===d){var v=a(t,h,h+2);if(e(u,v))p+=u[v],h+=2;else{if("\\u"!==v)throw new n('Unknown escape sequence: "'+v+'"');var m=a(t,h+=2,h+4);if(!s(c,m))throw new n("Bad Unicode escape at: "+h);p+=i(r(m,16)),h+=4}}else{if('"'===d){f=!1,h++;break}if(s(l,d))throw new n("Bad control character in string literal at: "+h);p+=d,h++}}if(f)throw new n("Unterminated string at: "+h);return{value:p,end:h}}}function Cc(){return bc?gc:(bc=1,gc=!x()(function(){var t="9007199254740993",e=JSON.rawJSON(t);return!JSON.isRawJSON(e)||JSON.stringify(e)!==t}))}function Ec(){if(wc)return xc;wc=1;var t=$e(),e=Lt(),n=I(),r=T(),i=x(),o=ga(),a=L(),s=Ct(),u=Kr(),c=_c(),l=Rt(),h=C(),f=Sc(),p=Zr().includes,d=ge(),v=xo(),m=Tc(),y=be(),g=Mt(),b=Cc(),w=String,_=TypeError,S=e("JSON","stringify"),E=e("BigInt"),O=r("".valueOf),A=r((!0).valueOf),P=E&&r(E.prototype.valueOf),M=r(/./.exec),D=r("".charAt),R=r("".charCodeAt),z=r("".replace),k=r("".slice),j=r([].push),N=r([].pop),F=r(1.1.toString),B=/[\uD800-\uDFFF]/g,W=/^[\uD800-\uDBFF]$/,Y=/^[\uDC00-\uDFFF]$/,G=/^\d+$/,X=y(),V=y(),U=y(),Z=X.length,H=V.length,J=!g||i(function(){var t=e("Symbol")("stringify detection");return"[null]"!==S([t])||"{}"!==S({a:t})||"{}"!==S(Object(t))}),q=i(function(){return'"\\udf06\\ud834"'!==S("\udf06\ud834")||'"\\udead"'!==S("\udead")}),$=b?e("JSON","isRawJSON"):c,Q=J?function(t,e,r){return S(t,function(t,r){var i=n(e,this,t,r);if(!l(i))return i},r)}:S,K=function(t,e,n){var r=D(n,e-1),i=D(n,e+1);return M(W,t)&&!M(Y,i)||M(Y,t)&&!M(W,r)?"\\u"+F(R(t,0),16):t},tt=function(t,e){try{return t(e),!0}catch(t){return!1}},et=function(t){if(!s(t)||a(t)||o(t))return!1;try{return!function(t){var e=h(t);return"Number"===e&&tt(f,t)||"String"===e&&tt(O,t)||"Boolean"===e&&tt(A,t)||!!P&&"BigInt"===e&&tt(P,t)}(t)}catch(t){return!0}},nt=function(t,e){return{toJSON:function(){var r=t[e];if(s(r)||"bigint"==typeof r){var i=r.toJSON;a(i)&&(r=n(i,r,e))}return r}}};return S&&t({target:"JSON",stat:!0,arity:3,forced:J||q||!b},{stringify:function(t,e,r){var i,s=a(e)?e:void 0,c=s?void 0:function(t){if(o(t)){for(var e=t.length,n=[],r=u(null),i=0;i<e;i++){var a,s=t[i];if("string"==typeof s)a=s;else{if("number"!=typeof s&&"Number"!==h(s)&&"String"!==h(s))continue;a=v(s)}d(r,a)||(r[a]=!0,j(n,a))}return n}}(e),l=c&&function(t){for(var e=0,n=t.length;e<n;e++)if(M(G,t[e]))return V;return""}(c),f=[],y=[],g=[],x=!1,S=!0,T=Q(t,function(t,e){if(t=w(t),c){if(t===U)return N(y),void(i=N(g));if(S)S=!1;else if(this!==i&&!o(this)&&!p(c,t))return}else s&&(e=n(s,this,t,e));if($(e))return b?e:(x=!0,X+(j(f,e.rawJSON)-1));if(c&&et(e)){if(p(y,e))throw new _("Converting circular structure to JSON");var r=function(t,e,n){for(var r=u(null),i=0,o=e.length;i<o;i++){var a=e[i];r[n+a]=nt(t,a)}return r[U]=null,r}(e,c,l);return j(y,e),j(g,i),i=r,l&&(x=!0),r}return e},r);if("string"!=typeof T)return T;if(q&&(T=z(T,B,K)),!x)return T;for(var C="",E=T.length,L=0;L<E;L++){var O=D(T,L);if('"'===O){var A=m(T,++L).end-1,P=k(T,L,A);k(P,0,Z)===X?C+=f[k(P,Z)]:k(P,0,H)===V?C+='"'+k(P,H)+'"':C+='"'+P+'"',L=A}else C+=O}return C}}),xc}var Lc,Oc,Ac={};function Pc(){return Oc||(Oc=1,function(){if(tc)return Bu;tc=1;var t=$e(),e=w(),n=I(),r=T(),i=pe(),o=R(),a=Mt(),s=x(),u=ge(),c=Ot(),l=He(),h=Tt(),f=_e(),p=xo(),d=wt(),v=Kr(),m=qr(),y=Yu(),g=Zu(),b=Au(),_=Ce(),S=Je(),C=$r(),E=bt(),L=ni(),O=Hu(),A=me(),P=Sn(),M=Tn(),D=be(),z=we(),k=nc(),j=rc(),N=ic(),F=si(),B=Cn(),W=Ta().forEach,Y=P("hidden"),G="Symbol",X="prototype",V=B.set,U=B.getterFor(G),Z=Object[X],H=e.Symbol,J=H&&H[X],q=e.RangeError,$=e.TypeError,Q=e.QObject,K=_.f,tt=S.f,et=g.f,nt=E.f,rt=r([].push),it=A("symbols"),ot=A("op-symbols"),at=A("wks"),st=!Q||!Q[X]||!Q[X].findChild,ut=function(t,e,n){var r=K(Z,e);return r&&delete Z[e],tt(t,e,n),r&&t!==Z&&tt(Z,e,r),t},ct=o&&s(function(){return 7!==v(tt({},"a",{get:function(){return tt(this,"a",{value:7}).a}})).a})?ut:tt,lt=function(t,e){var n=it[t]=v(J);return V(n,{type:G,tag:t,description:e}),o||(n.description=e),n},ht=function(t,e,n){t===Z&&ht(ot,e,n),l(t);var r=f(e);return l(n),u(it,r)?(("enumerable"in n?!n.enumerable:!u(t,r)||u(t,Y)&&t[Y][r])?(u(t,Y)||tt(t,Y,d(1,v(null))),t[Y][r]=!0):(u(t,Y)&&t[Y][r]&&(t[Y][r]=!1),n=v(n,{enumerable:d(0,!1)})),ct(t,r,n)):tt(t,r,n)},ft=function(t,e){l(t);var r=h(e),i=m(r).concat(mt(r));return W(i,function(e){o&&!n(pt,r,e)||ht(t,e,r[e])}),t},pt=function(t){var e=f(t),r=n(nt,this,e);return!(this===Z&&u(it,e)&&!u(ot,e))&&(!(r||!u(this,e)||!u(it,e)||u(this,Y)&&this[Y][e])||r)},dt=function(t,e){var n=h(t),r=f(e);if(n!==Z||!u(it,r)||u(ot,r)){var i=K(n,r);return!i||!u(it,r)||u(n,Y)&&n[Y][r]||(i.enumerable=!0),i}},vt=function(t){var e=et(h(t)),n=[];return W(e,function(t){u(it,t)||u(M,t)||rt(n,t)}),n},mt=function(t){var e=t===Z,n=et(e?ot:h(t)),r=[];return W(n,function(t){!u(it,t)||e&&!u(Z,t)||rt(r,it[t])}),r};a||(H=function(){if(c(J,this))throw new $("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,r=D(t),i=function(t){var o=void 0===this?e:this;o===Z&&n(i,ot,t),u(o,Y)&&u(o[Y],r)&&(o[Y][r]=!1);var a=d(1,t);try{ct(o,r,a)}catch(t){if(!(t instanceof q))throw t;ut(o,r,a)}};return o&&st&&ct(Z,r,{configurable:!0,set:i}),lt(r,t)},L(J=H[X],"toString",function(){return U(this).tag}),L(H,"withoutSetter",function(t){return lt(D(t),t)}),E.f=pt,S.f=ht,C.f=ft,_.f=dt,y.f=g.f=vt,b.f=mt,k.f=function(t){return lt(z(t),t)},o&&(O(J,"description",{configurable:!0,get:function(){return U(this).description}}),i||L(Z,"propertyIsEnumerable",pt,{unsafe:!0}))),t({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:H}),W(m(at),function(t){j(t)}),t({target:G,stat:!0,forced:!a},{useSetter:function(){st=!0},useSimple:function(){st=!1}}),t({target:"Object",stat:!0,forced:!a,sham:!o},{create:function(t,e){return void 0===e?v(t):ft(v(t),e)},defineProperty:ht,defineProperties:ft,getOwnPropertyDescriptor:dt}),t({target:"Object",stat:!0,forced:!a},{getOwnPropertyNames:vt}),N(),F(H,G),M[Y]=!0}(),function(){if(sc)return uc;sc=1;var t=$e(),e=Lt(),n=ge(),r=xo(),i=me(),o=cc(),a=i("string-to-symbol-registry"),s=i("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!o},{for:function(t){var i=r(t);if(n(a,i))return a[i];var o=e("Symbol")(i);return a[i]=o,s[o]=i,o}})}(),function(){if(lc)return hc;lc=1;var t=$e(),e=ge(),n=Rt(),r=It(),i=me(),o=cc(),a=i("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!o},{keyFor:function(t){if(!n(t))throw new TypeError(r(t)+" is not a symbol");if(e(a,t))return a[t]}})}(),Ec(),function(){if(Lc)return Ac;Lc=1;var t=$e(),e=Mt(),n=x(),r=Au(),i=ye();t({target:"Object",stat:!0,forced:!e||n(function(){r.f(1)})},{getOwnPropertySymbols:function(t){var e=r.f;return e?e(i(t)):[]}})}()),Fu}var Mc;var Dc;var Rc;var Ic;var zc;var kc;var jc;var Nc;var Fc;var Bc;var Wc;var Yc;var Gc,Xc={};var Vc,Uc={};var Zc;var Hc,Jc,qc,$c,Qc,Kc={};function tl(){return qc?Jc:(qc=1,fu(),Pc(),Mc||(Mc=1,rc()("asyncDispose")),Dc||(Dc=1,rc()("asyncIterator")),Rc||(Rc=1,rc()("dispose")),Ic||(Ic=1,rc()("hasInstance")),zc||(zc=1,rc()("isConcatSpreadable")),kc||(kc=1,rc()("iterator")),jc||(jc=1,rc()("match")),Nc||(Nc=1,rc()("matchAll")),Fc||(Fc=1,rc()("replace")),Bc||(Bc=1,rc()("search")),Wc||(Wc=1,rc()("species")),Yc||(Yc=1,rc()("split")),function(){if(Gc)return Xc;Gc=1;var t=rc(),e=ic();t("toPrimitive"),e()}(),function(){if(Vc)return Uc;Vc=1;var t=Lt(),e=rc(),n=si();e("toStringTag"),n(t("Symbol"),"Symbol")}(),Zc||(Zc=1,rc()("unscopables")),function(){if(Hc)return Kc;Hc=1;var t=w();si()(t.JSON,"JSON",!0)}(),Jc=Et().Symbol)}function el(){if(Qc)return $c;Qc=1;var t=tl();return yi(),$c=t}var nl,rl,il,ol,al,sl,ul,cl,ll,hl={};function fl(){return il?rl:(il=1,function(){if(nl)return hl;nl=1;var t=$e(),e=ga(),n=wa(),r=Ct(),i=Xr(),o=Ur(),a=Tt(),s=Sa(),u=hu(),c=we(),l=Ca(),h=zi(),f=l("slice"),p=c("species"),d=Array,v=Math.max;t({target:"Array",proto:!0,forced:!f},{slice:function(t,c){var l,f,m,y=a(this),g=o(y),b=i(t,g),w=i(void 0===c?g:c,g);if(e(y)&&(l=y.constructor,(n(l)&&(l===d||e(l.prototype))||r(l)&&null===(l=l[p]))&&(l=void 0),l===d||void 0===l))return h(y,b,w);for(f=new(void 0===l?d:l)(v(w-b,0)),m=0;b<w;b++,m++)b in y&&s(f,m,y[b]);return u(f,m),f}})}(),rl=gi()("Array","slice"))}function pl(){if(al)return ol;al=1;var t=Ot(),e=fl(),n=Array.prototype;return ol=function(r){var i=r.slice;return r===n||t(n,r)&&i===n.slice?e:i}}function dl(){return ul?sl:(ul=1,sl=pl())}var vl,ml,yl=r(ll?cl:(ll=1,cl=el()));var gl,bl,wl,xl,_l,Sl,Tl,Cl,El,Ll=r(ml?vl:(ml=1,vl=dl())),Ol={};function Al(){return wl?bl:(wl=1,function(){if(gl)return Ol;gl=1;var t=$e(),e=Ta().map;t({target:"Array",proto:!0,forced:!Ca()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),bl=gi()("Array","map"))}function Pl(){if(_l)return xl;_l=1;var t=Ot(),e=Al(),n=Array.prototype;return xl=function(r){var i=r.map;return r===n||t(n,r)&&i===n.map?e:i}}function Ml(){return Tl?Sl:(Tl=1,Sl=Pl())}var Dl,Rl,Il,zl,kl,jl,Nl,Fl=r(El?Cl:(El=1,Cl=Ml())),Bl={};function Wl(){return Il?Rl:(Il=1,function(){if(Dl)return Bl;Dl=1;var t=$e(),e=ye(),n=qr();t({target:"Object",stat:!0,forced:x()(function(){n(1)})},{keys:function(t){return n(e(t))}})}(),Rl=Et().Object.keys)}function Yl(){return kl?zl:(kl=1,zl=Wl())}var Gl,Xl,Vl,Ul,Zl,Hl,Jl,ql,$l,Ql,Kl,th=r(Nl?jl:(Nl=1,jl=Yl())),eh={};function nh(){if(Xl)return Gl;Xl=1;var t=T(),e=zt(),n=Ct(),r=ge(),i=zi(),o=_(),a=Function,s=t([].concat),u=t([].join),c={};return Gl=o?a.bind:function(t){var o=e(this),l=o.prototype,h=i(arguments,1),f=function(){var e=s(h,i(arguments));return this instanceof f?function(t,e,n){if(!r(c,e)){for(var i=[],o=0;o<e;o++)i[o]="a["+o+"]";c[e]=a("C,a","return new C("+u(i,",")+")")}return c[e](t,n)}(o,e.length,e):o.apply(t,e)};return n(l)&&(f.prototype=l),f},Gl}function rh(){return Zl?Ul:(Zl=1,function(){if(Vl)return eh;Vl=1;var t=$e(),e=nh();t({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e})}(),Ul=gi()("Function","bind"))}function ih(){if(Jl)return Hl;Jl=1;var t=Ot(),e=rh(),n=Function.prototype;return Hl=function(r){var i=r.bind;return r===n||t(n,r)&&i===n.bind?e:i}}function oh(){return $l?ql:($l=1,ql=ih())}var ah,sh,uh,ch,lh,hh,fh,ph,dh,vh=r(Kl?Ql:(Kl=1,Ql=oh())),mh={};function yh(){return uh?sh:(uh=1,function(){if(ah)return mh;ah=1;var t=$e(),e=ye(),n=Xr(),r=Gr(),i=Ur(),o=hu(),a=lu(),s=_a(),u=Sa(),c=wo(),l=Ca()("splice"),h=Math.max,f=Math.min;t({target:"Array",proto:!0,forced:!l},{splice:function(t,l){var p,d,v,m,y,g,b=e(this),w=i(b),x=n(t,w),_=arguments.length;for(0===_?p=d=0:1===_?(p=0,d=w-x):(p=_-2,d=f(h(r(l),0),w-x)),a(w+p-d),v=s(b,d),m=0;m<d;m++)(y=x+m)in b&&u(v,m,b[y]);if(o(v,d),p<d){for(m=x;m<w-d;m++)g=m+p,(y=m+d)in b?b[g]=b[y]:c(b,g);for(m=w;m>w-d+p;m--)c(b,m-1)}else if(p>d)for(m=w-d;m>x;m--)g=m+p-1,(y=m+d-1)in b?b[g]=b[y]:c(b,g);for(m=0;m<p;m++)b[m+x]=arguments[m+2];return o(b,w-d+p),v}})}(),sh=gi()("Array","splice"))}function gh(){if(lh)return ch;lh=1;var t=Ot(),e=yh(),n=Array.prototype;return ch=function(r){var i=r.splice;return r===n||t(n,r)&&i===n.splice?e:i}}function bh(){return fh?hh:(fh=1,hh=gh())}var wh,xh,_h,Sh,Th,Ch,Eh,Lh=r(dh?ph:(dh=1,ph=bh())),Oh={};function Ah(){return _h?xh:(_h=1,function(){if(wh)return Oh;wh=1;var t=$e(),e=x(),n=ye(),r=ei(),i=ti();t({target:"Object",stat:!0,forced:e(function(){r(1)}),sham:!i},{getPrototypeOf:function(t){return r(n(t))}})}(),xh=Et().Object.getPrototypeOf)}function Ph(){return Th?Sh:(Th=1,Sh=Ah())}var Mh,Dh,Rh,Ih,zh,kh,jh,Nh,Fh,Bh=r(Eh?Ch:(Eh=1,Ch=Ph())),Wh={};function Yh(){if(Dh)return Mh;Dh=1;var t=w(),e=x(),n=T(),r=xo(),i=Va().trim,o=Xa(),a=t.parseInt,s=t.Symbol,u=s&&s.iterator,c=/^[+-]?0x/i,l=n(c.exec),h=8!==a(o+"08")||22!==a(o+"0x16")||u&&!e(function(){a(Object(u))});return Mh=h?function(t,e){var n=i(r(t));return a(n,e>>>0||(l(c,n)?16:10))}:a,Mh}function Gh(){return zh?Ih:(zh=1,function(){if(Rh)return Wh;Rh=1;var t=$e(),e=Yh();t({global:!0,forced:parseInt!==e},{parseInt:e})}(),Ih=Et().parseInt)}function Xh(){return jh?kh:(jh=1,kh=Gh())}var Vh,Uh,Zh,Hh,Jh,qh,$h,Qh,Kh,tf,ef,nf,rf,of=r(Fh?Nh:(Fh=1,Nh=Xh())),af={};function sf(){if(Uh)return Vh;Uh=1;var t=Gr(),e=xo(),n=St(),r=RangeError,i=Math.floor;return Vh=function(o){var a=e(n(this)),s="",u=t(o);if(u<0||u===1/0)throw new r("Wrong number of repetitions");for(;u>0;(u=i(u/2))&&(a+=a))u%2&&(s+=a);return s}}function uf(){if(Hh)return Zh;Hh=1;var t=T(),e=Vr(),n=xo(),r=sf(),i=St(),o=t(r),a=t("".slice),s=Math.ceil,u=function(t){return function(r,u,c){var l=n(i(r)),h=e(u),f=l.length;if(h<=f)return l;var p,d,v=void 0===c?" ":n(c);return""===v?l:((d=o(v,s((p=h-f)/v.length))).length>p&&(d=a(d,0,p)),t?l+d:d+l)}};return Zh={start:u(!1),end:u(!0)}}function cf(){if(qh)return Jh;qh=1;var t=T(),e=x(),n=uf().start,r=RangeError,i=isFinite,o=Math.abs,a=Date.prototype,s=a.toISOString,u=t(a.getTime),c=t(a.getUTCDate),l=t(a.getUTCFullYear),h=t(a.getUTCHours),f=t(a.getUTCMilliseconds),p=t(a.getUTCMinutes),d=t(a.getUTCMonth),v=t(a.getUTCSeconds);return Jh=e(function(){return"0385-07-25T07:06:39.999Z"!==s.call(new Date(-50000000000001))})||!e(function(){s.call(new Date(NaN))})?function(){if(!i(u(this)))throw new r("Invalid time value");var t=this,e=l(t),a=f(t),s=e<0?"-":e>9999?"+":"";return s+n(o(e),s?6:4,0)+"-"+n(d(t)+1,2,0)+"-"+n(c(t),2,0)+"T"+n(h(t),2,0)+":"+n(p(t),2,0)+":"+n(v(t),2,0)+"."+n(a,3,0)+"Z"}:s,Jh}function lf(){if(Kh)return Qh;Kh=1,function(){if($h)return af;$h=1;var t=$e(),e=I(),n=ye(),r=xe(),i=cf(),o=C();t({target:"Date",proto:!0,forced:x()(function(){return null!==new Date(NaN).toJSON()||1!==e(Date.prototype.toJSON,{toISOString:function(){return 1}})})},{toJSON:function(t){var a=n(this),s=r(a,"number");return"number"!=typeof s||isFinite(s)?"toISOString"in a||"Date"!==o(a)?a.toISOString():e(i,a):null}})}(),Ec();var t=Et(),e=S();return t.JSON||(t.JSON={stringify:JSON.stringify}),Qh=function(n,r,i){return e(t.JSON.stringify,null,arguments)},Qh}function hf(){return ef?tf:(ef=1,tf=lf())}var ff,pf=r(rf?nf:(rf=1,nf=hf()));
/*! Hammer.JS - v2.0.17-rc - 2019-12-16
* http://naver.github.io/egjs
*
* Forked By Naver egjs
* Copyright (c) hammerjs
* Licensed under the MIT license */
function df(){return df=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},df.apply(this,arguments)}function vf(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function mf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}ff="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var yf,gf=ff,bf=["","webkit","Moz","MS","ms","o"],wf="undefined"==typeof document?{style:{}}:document.createElement("div"),xf=Math.round,_f=Math.abs,Sf=Date.now;function Tf(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<bf.length;){if((r=(n=bf[o])?n+i:e)in t)return r;o++}}yf="undefined"==typeof window?{}:window;var Cf=Tf(wf.style,"touchAction"),Ef=void 0!==Cf;var Lf="compute",Of="auto",Af="manipulation",Pf="none",Mf="pan-x",Df="pan-y",Rf=function(){if(!Ef)return!1;var t={},e=yf.CSS&&yf.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){return t[n]=!e||yf.CSS.supports("touch-action",n)}),t}(),If="ontouchstart"in yf,zf=void 0!==Tf(yf,"PointerEvent"),kf=If&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),jf="touch",Nf="mouse",Ff=16,Bf=24,Wf=["x","y"],Yf=["clientX","clientY"];function Gf(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function Xf(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function Vf(t,e){return t.indexOf(e)>-1}var Uf=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===Lf&&(t=this.compute()),Ef&&this.manager.element.style&&Rf[t]&&(this.manager.element.style[Cf]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return Gf(this.manager.recognizers,function(e){Xf(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(Vf(t,Pf))return Pf;var e=Vf(t,Mf),n=Vf(t,Df);return e&&n?Pf:e||n?e?Mf:Df:Vf(t,Af)?Af:Of}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var r=this.actions,i=Vf(r,Pf)&&!Rf[Pf],o=Vf(r,Df)&&!Rf[Df],a=Vf(r,Mf)&&!Rf[Mf];if(i){var s=1===t.pointers.length,u=t.distance<2,c=t.deltaTime<250;if(s&&u&&c)return}if(!a||!o)return i||o&&6&n||a&&n&Bf?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Zf(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Hf(t){var e=t.length;if(1===e)return{x:xf(t[0].clientX),y:xf(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:xf(n/e),y:xf(r/e)}}function Jf(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:xf(t.pointers[n].clientX),clientY:xf(t.pointers[n].clientY)},n++;return{timeStamp:Sf(),pointers:e,center:Hf(e),deltaX:t.deltaX,deltaY:t.deltaY}}function qf(t,e,n){n||(n=Wf);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function $f(t,e,n){n||(n=Wf);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}function Qf(t,e){return t===e?1:_f(t)>=_f(e)?t<0?2:4:e<0?8:Ff}function Kf(t,e,n){return{x:e/t||0,y:n/t||0}}function tp(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=Jf(e)),i>1&&!n.firstMultiple?n.firstMultiple=Jf(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,u=e.center=Hf(r);e.timeStamp=Sf(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=$f(s,u),e.distance=qf(s,u),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=Qf(e.deltaX,e.deltaY);var c,l,h=Kf(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=_f(h.x)>_f(h.y)?h.x:h.y,e.scale=a?(c=a.pointers,qf((l=r)[0],l[1],Yf)/qf(c[0],c[1],Yf)):1,e.rotation=a?function(t,e){return $f(e[1],e[0],Yf)+$f(t[1],t[0],Yf)}(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,a=t.lastInterval||e,s=e.timeStamp-a.timeStamp;if(8!==e.eventType&&(s>25||void 0===a.velocity)){var u=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,l=Kf(s,u,c);r=l.x,i=l.y,n=_f(l.x)>_f(l.y)?l.x:l.y,o=Qf(u,c),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var f,p=t.element,d=e.srcEvent;Zf(f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target,p)&&(p=f),e.target=p}function ep(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=1&e&&r-i===0,a=12&e&&r-i===0;n.isFirst=!!o,n.isFinal=!!a,o&&(t.session={}),n.eventType=e,tp(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function np(t){return t.trim().split(/\s+/g)}function rp(t,e,n){Gf(np(e),function(e){t.addEventListener(e,n,!1)})}function ip(t,e,n){Gf(np(e),function(e){t.removeEventListener(e,n,!1)})}function op(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var ap=function(){function t(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){Xf(t.options.enable,[t])&&n.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&rp(this.element,this.evEl,this.domHandler),this.evTarget&&rp(this.target,this.evTarget,this.domHandler),this.evWin&&rp(op(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&ip(this.element,this.evEl,this.domHandler),this.evTarget&&ip(this.target,this.evTarget,this.domHandler),this.evWin&&ip(op(this.element),this.evWin,this.domHandler)},t}();function sp(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}var up={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},cp={2:jf,3:"pen",4:Nf,5:"kinect"},lp="pointerdown",hp="pointermove pointerup pointercancel";yf.MSPointerEvent&&!yf.PointerEvent&&(lp="MSPointerDown",hp="MSPointerMove MSPointerUp MSPointerCancel");var fp=function(t){function e(){var n,r=e.prototype;return r.evEl=lp,r.evWin=hp,(n=t.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return vf(e,t),e.prototype.handler=function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=up[r],o=cp[t.pointerType]||t.pointerType,a=o===jf,s=sp(e,t.pointerId,"pointerId");1&i&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):12&i&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))},e}(ap);function pp(t){return Array.prototype.slice.call(t,0)}function dp(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];sp(i,a)<0&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort(function(t,n){return t[e]>n[e]}):r.sort()),r}var vp={touchstart:1,touchmove:2,touchend:4,touchcancel:8},mp=function(t){function e(){var n;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(n=t.apply(this,arguments)||this).targetIds={},n}return vf(e,t),e.prototype.handler=function(t){var e=vp[t.type],n=yp.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:jf,srcEvent:t})},e}(ap);function yp(t,e){var n,r,i=pp(t.touches),o=this.targetIds;if(3&e&&1===i.length)return o[i[0].identifier]=!0,[i,i];var a=pp(t.changedTouches),s=[],u=this.target;if(r=i.filter(function(t){return Zf(t.target,u)}),1===e)for(n=0;n<r.length;)o[r[n].identifier]=!0,n++;for(n=0;n<a.length;)o[a[n].identifier]&&s.push(a[n]),12&e&&delete o[a[n].identifier],n++;return s.length?[dp(r.concat(s),"identifier",!0),s]:void 0}var gp={mousedown:1,mousemove:2,mouseup:4},bp=function(t){function e(){var n,r=e.prototype;return r.evEl="mousedown",r.evWin="mousemove mouseup",(n=t.apply(this,arguments)||this).pressed=!1,n}return vf(e,t),e.prototype.handler=function(t){var e=gp[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Nf,srcEvent:t}))},e}(ap);function wp(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY},r=this.lastTouches;this.lastTouches.push(n);setTimeout(function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)},2500)}}function xp(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,wp.call(this,e)):12&t&&wp.call(this,e)}function _p(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}var Sp=function(){return function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).handler=function(t,e,n){var i=n.pointerType===jf,o=n.pointerType===Nf;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)xp.call(mf(mf(r)),e,n);else if(o&&_p.call(mf(mf(r)),n))return;r.callback(t,e,n)}},r.touch=new mp(r.manager,r.handler),r.mouse=new bp(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}return vf(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(ap)}();function Tp(t,e,n){return!!Array.isArray(t)&&(Gf(t,n[e],n),!0)}var Cp=32,Ep=1;function Lp(t,e){var n=e.manager;return n?n.get(t):t}function Op(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var Ap=function(){function t(t){void 0===t&&(t={}),this.options=df({enable:!0},t),this.id=Ep++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return gf(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(Tp(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Lp(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return Tp(t,"dropRecognizeWith",this)||(t=Lp(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(Tp(t,"requireFailure",this))return this;var e=this.requireFail;return-1===sp(e,t=Lp(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(Tp(t,"dropRequireFailure",this))return this;t=Lp(t,this);var e=sp(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+Op(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+Op(n))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=Cp},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=gf({},t);if(!Xf(this.options.enable,[this,e]))return this.reset(),void(this.state=Cp);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Pp=function(t){function e(e){var n;return void 0===e&&(e={}),(n=t.call(this,df({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}vf(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Af]},n.process=function(t){var e=this,n=this.options,r=t.pointers.length===n.pointers,i=t.distance<n.threshold,o=t.deltaTime<n.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(i&&o&&r){if(4!==t.eventType)return this.failTimeout();var a=!this.pTime||t.timeStamp-this.pTime<n.interval,s=!this.pCenter||qf(this.pCenter,t.center)<n.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&a?this.count+=1:this.count=1,this._input=t,0===this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout(function(){e.state=8,e.tryEmit()},n.interval),2):8}return Cp},n.failTimeout=function(){var t=this;return this._timer=setTimeout(function(){t.state=Cp},this.options.interval),Cp},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(Ap),Mp=function(t){function e(e){return void 0===e&&(e={}),t.call(this,df({pointers:1},e))||this}vf(e,t);var n=e.prototype;return n.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},n.process=function(t){var e=this.state,n=t.eventType,r=6&e,i=this.attrTest(t);return r&&(8&n||!i)?16|e:r||i?4&n?8|e:2&e?4|e:2:Cp},e}(Ap);function Dp(t){return t===Ff?"down":8===t?"up":2===t?"left":4===t?"right":""}var Rp=function(t){function e(e){var n;return void 0===e&&(e={}),(n=t.call(this,df({event:"pan",threshold:10,pointers:1,direction:30},e))||this).pX=null,n.pY=null,n}vf(e,t);var n=e.prototype;return n.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(Df),t&Bf&&e.push(Mf),e},n.directionTest=function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(6&e.direction?(i=0===o?1:o<0?2:4,n=o!==this.pX,r=Math.abs(t.deltaX)):(i=0===a?1:a<0?8:Ff,n=a!==this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},n.attrTest=function(t){return Mp.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},n.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var n=Dp(e.direction);n&&(e.additionalEvent=this.options.event+n),t.prototype.emit.call(this,e)},e}(Mp),Ip=function(t){function e(e){return void 0===e&&(e={}),t.call(this,df({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}vf(e,t);var n=e.prototype;return n.getTouchAction=function(){return Rp.prototype.getTouchAction.call(this)},n.attrTest=function(e){var n,r=this.options.direction;return 30&r?n=e.overallVelocity:6&r?n=e.overallVelocityX:r&Bf&&(n=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&r&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&_f(n)>this.options.velocity&&4&e.eventType},n.emit=function(t){var e=Dp(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(Mp),zp=function(t){function e(e){return void 0===e&&(e={}),t.call(this,df({event:"pinch",threshold:0,pointers:2},e))||this}vf(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Pf]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},n.emit=function(e){if(1!==e.scale){var n=e.scale<1?"in":"out";e.additionalEvent=this.options.event+n}t.prototype.emit.call(this,e)},e}(Mp),kp=function(t){function e(e){return void 0===e&&(e={}),t.call(this,df({event:"rotate",threshold:0,pointers:2},e))||this}vf(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Pf]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Mp),jp=function(t){function e(e){var n;return void 0===e&&(e={}),(n=t.call(this,df({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,n._input=null,n}vf(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Of]},n.process=function(t){var e=this,n=this.options,r=t.pointers.length===n.pointers,i=t.distance<n.threshold,o=t.deltaTime>n.time;if(this._input=t,!i||!r||12&t.eventType&&!o)this.reset();else if(1&t.eventType)this.reset(),this._timer=setTimeout(function(){e.state=8,e.tryEmit()},n.time);else if(4&t.eventType)return 8;return Cp},n.reset=function(){clearTimeout(this._timer)},n.emit=function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=Sf(),this.manager.emit(this.options.event,this._input)))},e}(Ap),Np={domEvents:!1,touchAction:Lf,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Fp=[[kp,{enable:!1}],[zp,{enable:!1},["rotate"]],[Ip,{direction:6}],[Rp,{direction:6},["swipe"]],[Pp],[Pp,{event:"doubletap",taps:2},["tap"]],[jp]];function Bp(t,e){var n,r=t.element;r.style&&(Gf(t.options.cssProps,function(i,o){n=Tf(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={}))}var Wp=function(){function t(t,e){var n,r=this;this.options=gf({},Np,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(zf?fp:kf?mp:If?Sp:bp))(n,ep),this.touchAction=new Uf(this,this.options.touchAction),Bp(this,!0),Gf(this.options.recognizers,function(t){var e=r.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;return e.set=function(t){return gf(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var r=this.recognizers,i=e.curRecognizer;(!i||i&&8&i.state)&&(e.curRecognizer=null,i=null);for(var o=0;o<r.length;)n=r[o],2===e.stopped||i&&n!==i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&14&n.state&&(e.curRecognizer=n,i=n),o++}},e.get=function(t){if(t instanceof Ap)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event===t)return e[n];return null},e.add=function(t){if(Tp(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(Tp(t,"remove",this))return this;var e=this.get(t);if(t){var n=this.recognizers,r=sp(n,e);-1!==r&&(n.splice(r,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var n=this.handlers;return Gf(np(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this},e.off=function(t,e){if(void 0===t)return this;var n=this.handlers;return Gf(np(t),function(t){e?n[t]&&n[t].splice(sp(n[t],e),1):delete n[t]}),this},e.emit=function(t,e){this.options.domEvents&&function(t,e){var n=document.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},e.destroy=function(){this.element&&Bp(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Yp={touchstart:1,touchmove:2,touchend:4,touchcancel:8},Gp=function(t){function e(){var n,r=e.prototype;return r.evTarget="touchstart",r.evWin="touchstart touchmove touchend touchcancel",(n=t.apply(this,arguments)||this).started=!1,n}return vf(e,t),e.prototype.handler=function(t){var e=Yp[t.type];if(1===e&&(this.started=!0),this.started){var n=Xp.call(this,t,e);12&e&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:jf,srcEvent:t})}},e}(ap);function Xp(t,e){var n=pp(t.touches),r=pp(t.changedTouches);return 12&e&&(n=dp(n.concat(r),"identifier",!0)),[n,r]}function Vp(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),t.apply(this,arguments)}}var Up=Vp(function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&void 0===t[r[i]])&&(t[r[i]]=e[r[i]]),i++;return t},"extend","Use `assign`."),Zp=Vp(function(t,e){return Up(t,e,!0)},"merge","Use `assign`.");function Hp(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&gf(r,n)}function Jp(t,e){return function(){return t.apply(e,arguments)}}var qp=function(){var t=function(t,e){return void 0===e&&(e={}),new Wp(t,df({recognizers:Fp.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=30,t.DIRECTION_DOWN=Ff,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=Bf,t.DIRECTION_NONE=1,t.DIRECTION_DOWN=Ff,t.INPUT_START=1,t.INPUT_MOVE=2,t.INPUT_END=4,t.INPUT_CANCEL=8,t.STATE_POSSIBLE=1,t.STATE_BEGAN=2,t.STATE_CHANGED=4,t.STATE_ENDED=8,t.STATE_RECOGNIZED=8,t.STATE_CANCELLED=16,t.STATE_FAILED=Cp,t.Manager=Wp,t.Input=ap,t.TouchAction=Uf,t.TouchInput=mp,t.MouseInput=bp,t.PointerEventInput=fp,t.TouchMouseInput=Sp,t.SingleTouchInput=Gp,t.Recognizer=Ap,t.AttrRecognizer=Mp,t.Tap=Pp,t.Pan=Rp,t.Swipe=Ip,t.Pinch=zp,t.Rotate=kp,t.Press=jp,t.on=rp,t.off=ip,t.each=Gf,t.merge=Zp,t.extend=Up,t.bindFn=Jp,t.assign=gf,t.inherit=Hp,t.bindFn=Jp,t.prefixed=Tf,t.toArray=pp,t.inArray=sp,t.uniqueArray=dp,t.splitStr=np,t.boolOrFn=Xf,t.hasParent=Zf,t.addEventListeners=rp,t.removeEventListeners=ip,t.defaults=gf({},Np,{preset:Fp}),t}();yl("DELETE");const $p="undefined"!=typeof window?window.Hammer||qp:function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};function Qp(t){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const n=$p(this._dom.overlay);n.on("tap",vh(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{n.destroy()});const r=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];ks(r).call(r,t=>{n.on(t,t=>{t.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=e=>{(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=t=>{("key"in t?"Escape"===t.key:27===t.keyCode)&&this.deactivate()}}Nu(Qp.prototype),Qp.current=null,Qp.prototype.destroy=function(){this.deactivate();for(const e of Lh(t=this._cleanupQueue).call(t,0).toReversed()){var t;e()}},Qp.prototype.activate=function(){Qp.current&&Qp.current.deactivate(),Qp.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)},Qp.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")},Qp.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};const Kp=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,td=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;function ed(t,e,n,r){let i=!1;!0===r&&(i=null===e[n]&&void 0!==t[n]),i?delete t[n]:t[n]=e[n]}function nd(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)||!0===n)if("object"==typeof e[o]&&null!==e[o]&&Bh(e[o])===Object.prototype)void 0===t[o]?t[o]=nd({},e[o],n):"object"==typeof t[o]&&null!==t[o]&&Bh(t[o])===Object.prototype?nd(t[o],e[o],n):ed(t,e,o,r);else if(Us(e[o])){var i;t[o]=Ll(i=e[o]).call(i)}else ed(t,e,o,r);return t}function rd(t,e){return[...t,e]}function id(t){return Ll(t).call(t)}function od(t){t||(t=window.event),t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)}function ad(t,e,n){let r,i,o;const a=Math.floor(6*t),s=6*t-a,u=n*(1-e),c=n*(1-s*e),l=n*(1-(1-s)*e);switch(a%6){case 0:r=n,i=l,o=u;break;case 1:r=c,i=n,o=u;break;case 2:r=u,i=n,o=l;break;case 3:r=u,i=c,o=n;break;case 4:r=l,i=u,o=n;break;case 5:r=n,i=u,o=c}return{r:Math.floor(255*r),g:Math.floor(255*i),b:Math.floor(255*o)}}let sd,ud=!1;const cd="background: #FFeeee; color: #dd0000";const ld=cd,hd=class t{static validate(e,n,r){ud=!1,sd=n;let i=n;return void 0!==r&&(i=n[r]),t.parse(e,i,[]),ud}static parse(e,n,r){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.check(i,e,n,r)}static check(e,n,r,i){if(void 0===r[e]&&void 0===r.__any__)return void t.getSuggestion(e,r,i);let o=e,a=!0;void 0===r[e]&&void 0!==r.__any__&&(o="__any__",a="object"===t.getType(n[e]));let s=r[o];a&&void 0!==s.__type__&&(s=s.__type__),t.checkFields(e,n,r,o,s,i)}static checkFields(e,n,r,i,o,a){const s=function(n){console.error("%c"+n+t.printLocation(a,e),cd)},u=t.getType(n[e]),c=o[u];void 0!==c?"array"===t.getType(c)&&-1===ma(c).call(c,n[e])?(s('Invalid option detected in "'+e+'". Allowed values are:'+t.print(c)+' not "'+n[e]+'". '),ud=!0):"object"===u&&"__any__"!==i&&(a=rd(a,e),t.parse(n[e],r[i],a)):void 0===o.any&&(s('Invalid type received for "'+e+'". Expected: '+t.print(th(o))+". Received ["+u+'] "'+n[e]+'"'),ud=!0)}static getType(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Us(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}static getSuggestion(e,n,r){const i=t.findInOptions(e,n,r,!1),o=t.findInOptions(e,sd,[],!0);let a;a=void 0!==i.indexMatch?" in "+t.printLocation(i.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+i.indexMatch+'"?\n\n':o.distance<=4&&i.distance>o.distance?" in "+t.printLocation(i.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(o.path,o.closestMatch,""):i.distance<=8?'. Did you mean "'+i.closestMatch+'"?'+t.printLocation(i.path,e):". Did you mean one of these: "+t.print(th(n))+t.printLocation(r,e),console.error('%cUnknown option detected: "'+e+'"'+a,cd),ud=!0}static findInOptions(e,n,r){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=1e9,a="",s=[];const u=e.toLowerCase();let c;for(const h in n){let f;if(void 0!==n[h].__type__&&!0===i){const i=t.findInOptions(e,n[h],rd(r,h));o>i.distance&&(a=i.closestMatch,s=i.path,o=i.distance,c=i.indexMatch)}else{var l;-1!==ma(l=h.toLowerCase()).call(l,u)&&(c=h),f=t.levenshteinDistance(e,h),o>f&&(a=h,s=id(r),o=f)}}return{closestMatch:a,path:s,distance:o,indexMatch:c}}static printLocation(t,e){let n="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n";for(let e=0;e<t.length;e++){for(let t=0;t<e+1;t++)n+=" ";n+=t[e]+": {\n"}for(let e=0;e<t.length+1;e++)n+=" ";n+=e+"\n";for(let e=0;e<t.length+1;e++){for(let r=0;r<t.length-e;r++)n+=" ";n+="}\n"}return n+"\n\n"}static print(t){return pf(t).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const n=[];let r,i;for(r=0;r<=e.length;r++)n[r]=[r];for(i=0;i<=t.length;i++)n[0][i]=i;for(r=1;r<=e.length;r++)for(i=1;i<=t.length;i++)e.charAt(r-1)==t.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[e.length][t.length]}};function fd(){this.min=void 0,this.max=void 0}fd.prototype.adjust=function(t){void 0!==t&&((void 0===this.min||this.min>t)&&(this.min=t),(void 0===this.max||this.max<t)&&(this.max=t))},fd.prototype.combine=function(t){this.add(t.min),this.add(t.max)},fd.prototype.expand=function(t){if(void 0===t)return;const e=this.min-t,n=this.max+t;if(e>n)throw new Error("Passed expansion value makes range invalid");this.min=e,this.max=n},fd.prototype.range=function(){return this.max-this.min},fd.prototype.center=function(){return(this.min+this.max)/2};var pd,dd,vd,md,yd,gd,bd,wd,xd,_d={};function Sd(){return vd?dd:(vd=1,function(){if(pd)return _d;pd=1;var t=$e(),e=T(),n=ga(),r=e([].reverse),i=[1,2];t({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}})}(),dd=gi()("Array","reverse"))}function Td(){if(yd)return md;yd=1;var t=Ot(),e=Sd(),n=Array.prototype;return md=function(r){var i=r.reverse;return r===n||t(n,r)&&i===n.reverse?e:i}}function Cd(){return bd?gd:(bd=1,gd=Td())}var Ed=r(xd?wd:(xd=1,wd=Cd()));const Ld={BAR:0,BARCOLOR:1,BARSIZE:2,DOT:3,DOTLINE:4,DOTCOLOR:5,DOTSIZE:6,GRID:7,LINE:8,SURFACE:9},Od={dot:Ld.DOT,"dot-line":Ld.DOTLINE,"dot-color":Ld.DOTCOLOR,"dot-size":Ld.DOTSIZE,line:Ld.LINE,grid:Ld.GRID,surface:Ld.SURFACE,bar:Ld.BAR,"bar-color":Ld.BARCOLOR,"bar-size":Ld.BARSIZE},Ad=["width","height","filterLabel","legendLabel","xLabel","yLabel","zLabel","xValueLabel","yValueLabel","zValueLabel","showXAxis","showYAxis","showZAxis","showGrayBottom","showGrid","showPerspective","showShadow","showSurfaceGrid","keepAspectRatio","rotateAxisLabels","verticalRatio","dotSizeRatio","dotSizeMinFraction","dotSizeMaxFraction","showAnimationControls","animationInterval","animationPreload","animationAutoStart","axisColor","axisFontSize","axisFontType","gridColor","xCenter","yCenter","zoomable","tooltipDelay","ctrlToZoom"],Pd=["xBarWidth","yBarWidth","valueMin","valueMax","xMin","xMax","xStep","yMin","yMax","yStep","zMin","zMax","zStep"];let Md;function Dd(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Rd(t,e){return void 0===t||""===t?e:t+(void 0===(n=e)||""===n||"string"!=typeof n?n:n.charAt(0).toUpperCase()+Ll(n).call(n,1));var n}function Id(t,e,n,r){let i,o;for(let a=0;a<n.length;++a)i=n[a],o=Rd(r,i),e[o]=t[i]}function zd(t,e,n,r){let i,o;for(let a=0;a<n.length;++a)i=n[a],void 0!==t[i]&&(o=Rd(r,i),e[o]=t[i])}function kd(t,e){if(void 0!==t.backgroundColor&&function(t,e){let n="white",r="gray",i=1;if("string"==typeof t)n=t,r="none",i=0;else{if("object"!=typeof t)throw new Error("Unsupported type of backgroundColor");void 0!==Ss(t)&&(n=Ss(t)),void 0!==t.stroke&&(r=t.stroke),void 0!==t.strokeWidth&&(i=t.strokeWidth)}e.frame.style.backgroundColor=n,e.frame.style.borderColor=r,e.frame.style.borderWidth=i+"px",e.frame.style.borderStyle="solid"}(t.backgroundColor,e),function(t,e){if(void 0===t)return;void 0===e.dataColor&&(e.dataColor={});"string"==typeof t?(e.dataColor.fill=t,e.dataColor.stroke=t):(Ss(t)&&(e.dataColor.fill=Ss(t)),t.stroke&&(e.dataColor.stroke=t.stroke),void 0!==t.strokeWidth&&(e.dataColor.strokeWidth=t.strokeWidth))}(t.dataColor,e),function(t,e){if(void 0===t)return;let n;if("string"==typeof t){if(n=function(t){const e=Od[t];if(void 0===e)return-1;return e}(t),-1===n)throw new Error("Style '"+t+"' is invalid")}else{if(!function(t){let e=!1;for(const n in Ld)if(Ld[n]===t){e=!0;break}return e}(t))throw new Error("Style '"+t+"' is invalid");n=t}e.style=n}(t.style,e),void 0!==t.surfaceColors){if(console.warn("`options.surfaceColors` is deprecated and may be removed in a future version. Please use `options.colormap` instead. Note that the `colormap` option uses the inverse array ordering (running from vMin to vMax)."),void 0!==t.colormap)throw new Error("The `colormap` and `surfaceColors` options are mutually exclusive.");"surface"!==e.style?console.warn("Ignoring `surfaceColors` in graph style `"+e.style+"` for backward compatibility (only effective in `surface` plots)."):function(t,e){if(void 0===t||!0===t)return;if(!1===t)return void(e.surfaceColors=void 0);void 0===e.surfaceColors&&(e.surfaceColors={});let n;if(Us(t))n=jd(t);else{if("object"!=typeof t)throw new Error("Unsupported type of surfaceColors");n=Nd(t.hue)}Ed(n).call(n),e.colormap=n}(t.surfaceColors,e)}else!function(t,e){if(void 0===t)return;let n;if(Us(t))n=jd(t);else if("object"==typeof t)n=Nd(t.hue);else{if("function"!=typeof t)throw new Error("Unsupported type of colormap");n=t}e.colormap=n}(t.colormap,e);!function(t,e){if(void 0===t){if(void 0===Md.showLegend){const t=e.style===Ld.DOTCOLOR||e.style===Ld.DOTSIZE;e.showLegend=t}}else e.showLegend=t}(t.showLegend,e),Fd(t.cameraPosition,e),void 0!==t.tooltip&&(e.showTooltip=t.tooltip),null!=t.onclick&&(e.onclick_callback=t.onclick,console.warn("`options.onclick` is deprecated and may be removed in a future version. Please use `Graph3d.on('click', handler)` instead.")),void 0!==t.tooltipStyle&&function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Us(n))throw new TypeError("Arrays are not supported by deepExtend");for(let i=0;i<t.length;i++){const o=t[i];if(Object.prototype.hasOwnProperty.call(n,o))if(n[o]&&n[o].constructor===Object)void 0===e[o]&&(e[o]={}),e[o].constructor===Object?nd(e[o],n[o],!1,r):ed(e,n,o,r);else{if(Us(n[o]))throw new TypeError("Arrays are not supported by deepExtend");ed(e,n,o,r)}}}(["tooltipStyle"],e,t)}function jd(t){if(t.length<2)throw new Error("Colormap array length must be 2 or above.");return Fl(t).call(t,function(t){if(!/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t))throw new Error("Invalid hex color code supplied to colormap.");return function(t){let e;switch(t.length){case 3:case 4:return e=td.exec(t),e?{r:of(e[1]+e[1],16),g:of(e[2]+e[2],16),b:of(e[3]+e[3],16)}:null;case 6:case 7:return e=Kp.exec(t),e?{r:of(e[1],16),g:of(e[2],16),b:of(e[3],16)}:null;default:return null}}(t)})}function Nd(t){if(void 0===t)throw new Error("Unsupported type of colormap");if(!(t.saturation>=0&&t.saturation<=100))throw new Error("Saturation is out of bounds. Expected range is 0-100.");if(!(t.brightness>=0&&t.brightness<=100))throw new Error("Brightness is out of bounds. Expected range is 0-100.");if(!(t.colorStops>=2))throw new Error("colorStops is out of bounds. Expected 2 or above.");const e=(t.end-t.start)/(t.colorStops-1),n=[];for(let r=0;r<t.colorStops;++r){const i=(t.start+e*r)%360/360;n.push(ad(i<0?i+1:i,t.saturation/100,t.brightness/100))}return n}function Fd(t,e){const n=t;void 0!==n&&(void 0===e.camera&&(e.camera=new rn),e.camera.setArmRotation(n.horizontal,n.vertical),e.camera.setArmLength(n.distance))}function Bd(){this.dataTable=null}Bd.prototype.initializeData=function(t,n,r){if(void 0===n)return;let i;if(Us(n)&&(n=new e.DataSet(n)),!(n instanceof e.DataSet||n instanceof e.DataView))throw new Error("Array, DataSet, or DataView expected");if(i=n.get(),0==i.length)return;this.style=r,this.dataSet&&this.dataSet.off("*",this._onChange),this.dataSet=n,this.dataTable=i;const o=this;this._onChange=function(){t.setData(o.dataSet)},this.dataSet.on("*",this._onChange),this.colX="x",this.colY="y",this.colZ="z";const a=t.hasBars(r);if(a&&(void 0!==t.defaultXBarWidth?this.xBarWidth=t.defaultXBarWidth:this.xBarWidth=this.getSmallestDifference(i,this.colX)||1,void 0!==t.defaultYBarWidth?this.yBarWidth=t.defaultYBarWidth:this.yBarWidth=this.getSmallestDifference(i,this.colY)||1),this._initializeRange(i,this.colX,t,a),this._initializeRange(i,this.colY,t,a),this._initializeRange(i,this.colZ,t,!1),Object.prototype.hasOwnProperty.call(i[0],"style")){this.colValue="style";const e=this.getColumnRange(i,this.colValue);this._setRangeDefaults(e,t.defaultValueMin,t.defaultValueMax),this.valueRange=e}else this.colValue="z",this.valueRange=this.zRange;const s=this.getDataTable();let u;return Object.prototype.hasOwnProperty.call(s[0],"filter")&&void 0===this.dataFilter&&(this.dataFilter=new Hi(this,"filter",t),this.dataFilter.setOnLoadCallback(function(){t.redraw()})),u=this.dataFilter?this.dataFilter._getDataPoints():this._getDataPoints(this.getDataTable()),u},Bd.prototype._collectRangeSettings=function(t,e){var n;if(-1==ma(n=["x","y","z"]).call(n,t))throw new Error("Column '"+t+"' invalid");const r=t.toUpperCase();return{barWidth:this[t+"BarWidth"],min:e["default"+r+"Min"],max:e["default"+r+"Max"],step:e["default"+r+"Step"],range_label:t+"Range",step_label:t+"Step"}},Bd.prototype._initializeRange=function(t,e,n,r){const i=this._collectRangeSettings(e,n),o=this.getColumnRange(t,e);r&&"z"!=e&&o.expand(i.barWidth/2),this._setRangeDefaults(o,i.min,i.max),this[i.range_label]=o,this[i.step_label]=void 0!==i.step?i.step:o.range()/5},Bd.prototype.getDistinctValues=function(t,e){void 0===e&&(e=this.dataTable);const n=[];for(let r=0;r<e.length;r++){const i=e[r][t]||0;-1===ma(n).call(n,i)&&n.push(i)}return n.toSorted(function(t,e){return t-e})},Bd.prototype.getSmallestDifference=function(t,e){const n=this.getDistinctValues(t,e);let r=null;for(let t=1;t<n.length;t++){const e=n[t]-n[t-1];(null==r||r>e)&&(r=e)}return r},Bd.prototype.getColumnRange=function(t,e){const n=new fd;for(let r=0;r<t.length;r++){const i=t[r][e];n.adjust(i)}return n},Bd.prototype.getNumberOfRows=function(){return this.dataTable.length},Bd.prototype._setRangeDefaults=function(t,e,n){void 0!==e&&(t.min=e),void 0!==n&&(t.max=n),t.max<=t.min&&(t.max=t.min+1)},Bd.prototype.getDataTable=function(){return this.dataTable},Bd.prototype.getDataSet=function(){return this.dataSet},Bd.prototype.getDataPoints=function(t){const e=[];for(let n=0;n<t.length;n++){const r=new nn;r.x=t[n][this.colX]||0,r.y=t[n][this.colY]||0,r.z=t[n][this.colZ]||0,r.data=t[n],r.value=t[n][this.colValue]||0;const i={};i.point=r,i.bottom=new nn(r.x,r.y,this.zRange.min),i.trans=void 0,i.screen=void 0,e.push(i)}return e},Bd.prototype.initDataAsMatrix=function(t){let e,n,r,i;const o=this.getDistinctValues(this.colX,t),a=this.getDistinctValues(this.colY,t),s=this.getDataPoints(t),u=[];for(r=0;r<s.length;r++){i=s[r];const t=ma(o).call(o,i.point.x),e=ma(a).call(a,i.point.y);void 0===u[t]&&(u[t]=[]),u[t][e]=i}for(e=0;e<u.length;e++)for(n=0;n<u[e].length;n++)u[e][n]&&(u[e][n].pointRight=e<u.length-1?u[e+1][n]:void 0,u[e][n].pointTop=n<u[e].length-1?u[e][n+1]:void 0,u[e][n].pointCross=e<u.length-1&&n<u[e].length-1?u[e+1][n+1]:void 0);return s},Bd.prototype.getInfo=function(){const t=this.dataFilter;if(t)return t.getLabel()+": "+t.getSelectedValue()},Bd.prototype.reload=function(){this.dataTable&&this.setData(this.dataTable)},Bd.prototype._getDataPoints=function(t){let e=[];if(this.style===Ld.GRID||this.style===Ld.SURFACE)e=this.initDataAsMatrix(t);else if(e=this.getDataPoints(t),this.style===Ld.LINE)for(let t=0;t<e.length;t++)t>0&&(e[t-1].pointNext=e[t]);return e};const Wd="string",Yd="boolean",Gd="number",Xd="object",Vd="array",Ud={fill:{string:Wd},stroke:{string:Wd},strokeWidth:{number:Gd},__type__:{string:Wd,object:Xd,undefined:"undefined"}},Zd={animationAutoStart:{boolean:Yd,undefined:"undefined"},animationInterval:{number:Gd},animationPreload:{boolean:Yd},axisColor:{string:Wd},axisFontSize:{number:Gd},axisFontType:{string:Wd},backgroundColor:Ud,xBarWidth:{number:Gd,undefined:"undefined"},yBarWidth:{number:Gd,undefined:"undefined"},cameraPosition:{distance:{number:Gd},horizontal:{number:Gd},vertical:{number:Gd},__type__:{object:Xd}},zoomable:{boolean:Yd},ctrlToZoom:{boolean:Yd},xCenter:{string:Wd},yCenter:{string:Wd},colormap:{hue:{start:{number:Gd},end:{number:Gd},saturation:{number:Gd},brightness:{number:Gd},colorStops:{number:Gd},__type__:{object:Xd}},__type__:{array:Vd,object:Xd,function:"function",undefined:"undefined"}},dataColor:Ud,dotSizeMinFraction:{number:Gd},dotSizeMaxFraction:{number:Gd},dotSizeRatio:{number:Gd},filterLabel:{string:Wd},gridColor:{string:Wd},onclick:{function:"function"},keepAspectRatio:{boolean:Yd},xLabel:{string:Wd},yLabel:{string:Wd},zLabel:{string:Wd},legendLabel:{string:Wd},xMin:{number:Gd,undefined:"undefined"},yMin:{number:Gd,undefined:"undefined"},zMin:{number:Gd,undefined:"undefined"},xMax:{number:Gd,undefined:"undefined"},yMax:{number:Gd,undefined:"undefined"},zMax:{number:Gd,undefined:"undefined"},showAnimationControls:{boolean:Yd,undefined:"undefined"},showGrayBottom:{boolean:Yd},showGrid:{boolean:Yd},showLegend:{boolean:Yd,undefined:"undefined"},showPerspective:{boolean:Yd},showShadow:{boolean:Yd},showSurfaceGrid:{boolean:Yd},showXAxis:{boolean:Yd},showYAxis:{boolean:Yd},showZAxis:{boolean:Yd},rotateAxisLabels:{boolean:Yd},surfaceColors:{hue:{start:{number:Gd},end:{number:Gd},saturation:{number:Gd},brightness:{number:Gd},colorStops:{number:Gd},__type__:{object:Xd}},__type__:{boolean:Yd,array:Vd,object:Xd,undefined:"undefined"}},xStep:{number:Gd,undefined:"undefined"},yStep:{number:Gd,undefined:"undefined"},zStep:{number:Gd,undefined:"undefined"},style:{number:Gd,string:["bar","bar-color","bar-size","dot","dot-line","dot-color","dot-size","line","grid","surface"]},tooltip:{boolean:Yd,function:"function"},tooltipDelay:{number:Gd},tooltipStyle:{content:{color:{string:Wd},background:{string:Wd},border:{string:Wd},borderRadius:{string:Wd},boxShadow:{string:Wd},padding:{string:Wd},__type__:{object:Xd}},line:{borderLeft:{string:Wd},height:{string:Wd},width:{string:Wd},pointerEvents:{string:Wd},__type__:{object:Xd}},dot:{border:{string:Wd},borderRadius:{string:Wd},height:{string:Wd},width:{string:Wd},pointerEvents:{string:Wd},__type__:{object:Xd}},__type__:{object:Xd}},xValueLabel:{function:"function"},yValueLabel:{function:"function"},zValueLabel:{function:"function"},valueMax:{number:Gd,undefined:"undefined"},valueMin:{number:Gd,undefined:"undefined"},verticalRatio:{number:Gd},height:{string:Wd},width:{string:Wd},__type__:{object:Xd}};function Hd(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}function Jd(t,e){if(void 0===t)throw new Error("No container element defined");if(this.container=t,this.visible=!e||null==e.visible||e.visible,this.visible){this.frame=document.createElement("DIV"),this.frame.style.width="100%",this.frame.style.position="relative",this.container.appendChild(this.frame),this.frame.prev=document.createElement("INPUT"),this.frame.prev.type="BUTTON",this.frame.prev.value="Prev",this.frame.appendChild(this.frame.prev),this.frame.play=document.createElement("INPUT"),this.frame.play.type="BUTTON",this.frame.play.value="Play",this.frame.appendChild(this.frame.play),this.frame.next=document.createElement("INPUT"),this.frame.next.type="BUTTON",this.frame.next.value="Next",this.frame.appendChild(this.frame.next),this.frame.bar=document.createElement("INPUT"),this.frame.bar.type="BUTTON",this.frame.bar.style.position="absolute",this.frame.bar.style.border="1px solid red",this.frame.bar.style.width="100px",this.frame.bar.style.height="6px",this.frame.bar.style.borderRadius="2px",this.frame.bar.style.MozBorderRadius="2px",this.frame.bar.style.border="1px solid #7F7F7F",this.frame.bar.style.backgroundColor="#E5E5E5",this.frame.appendChild(this.frame.bar),this.frame.slide=document.createElement("INPUT"),this.frame.slide.type="BUTTON",this.frame.slide.style.margin="0px",this.frame.slide.value=" ",this.frame.slide.style.position="relative",this.frame.slide.style.left="-100px",this.frame.appendChild(this.frame.slide);const t=this;this.frame.slide.onmousedown=function(e){t._onMouseDown(e)},this.frame.prev.onclick=function(e){t.prev(e)},this.frame.play.onclick=function(e){t.togglePlay(e)},this.frame.next.onclick=function(e){t.next(e)}}this.onChangeCallback=void 0,this.values=[],this.index=void 0,this.playTimeout=void 0,this.playInterval=1e3,this.playLoop=!0}function qd(t,e,n,r){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,n,r)}Jd.prototype.prev=function(){let t=this.getIndex();t>0&&(t--,this.setIndex(t))},Jd.prototype.next=function(){let t=this.getIndex();t<Mi(this).length-1&&(t++,this.setIndex(t))},Jd.prototype.playNext=function(){const t=new Date;let e=this.getIndex();e<Mi(this).length-1?(e++,this.setIndex(e)):this.playLoop&&(e=0,this.setIndex(e));const n=new Date-t,r=Math.max(this.playInterval-n,0),i=this;this.playTimeout=Zi(function(){i.playNext()},r)},Jd.prototype.togglePlay=function(){void 0===this.playTimeout?this.play():this.stop()},Jd.prototype.play=function(){this.playTimeout||(this.playNext(),this.frame&&(this.frame.play.value="Stop"))},Jd.prototype.stop=function(){clearInterval(this.playTimeout),this.playTimeout=void 0,this.frame&&(this.frame.play.value="Play")},Jd.prototype.setOnChangeCallback=function(t){this.onChangeCallback=t},Jd.prototype.setPlayInterval=function(t){this.playInterval=t},Jd.prototype.getPlayInterval=function(){return this.playInterval},Jd.prototype.setPlayLoop=function(t){this.playLoop=t},Jd.prototype.onChange=function(){void 0!==this.onChangeCallback&&this.onChangeCallback()},Jd.prototype.redraw=function(){if(this.frame){this.frame.bar.style.top=this.frame.clientHeight/2-this.frame.bar.offsetHeight/2+"px",this.frame.bar.style.width=this.frame.clientWidth-this.frame.prev.clientWidth-this.frame.play.clientWidth-this.frame.next.clientWidth-30+"px";const t=this.indexToLeft(this.index);this.frame.slide.style.left=t+"px"}},Jd.prototype.setValues=function(t){this.values=t,Mi(this).length>0?this.setIndex(0):this.index=void 0},Jd.prototype.setIndex=function(t){if(!(t<Mi(this).length))throw new Error("Index out of range");this.index=t,this.redraw(),this.onChange()},Jd.prototype.getIndex=function(){return this.index},Jd.prototype.get=function(){return Mi(this)[this.index]},Jd.prototype._onMouseDown=function(t){if(!(t.which?1===t.which:1===t.button))return;this.startClientX=t.clientX,this.startSlideX=as(this.frame.slide.style.left),this.frame.style.cursor="move";const e=this;this.onmousemove=function(t){e._onMouseMove(t)},this.onmouseup=function(t){e._onMouseUp(t)},document.addEventListener("mousemove",this.onmousemove),document.addEventListener("mouseup",this.onmouseup),od(t)},Jd.prototype.leftToIndex=function(t){const e=as(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,n=t-3;let r=Math.round(n/e*(Mi(this).length-1));return r<0&&(r=0),r>Mi(this).length-1&&(r=Mi(this).length-1),r},Jd.prototype.indexToLeft=function(t){const e=as(this.frame.bar.style.width)-this.frame.slide.clientWidth-10;return t/(Mi(this).length-1)*e+3},Jd.prototype._onMouseMove=function(t){const e=t.clientX-this.startClientX,n=this.startSlideX+e,r=this.leftToIndex(n);this.setIndex(r),od()},Jd.prototype._onMouseUp=function(){this.frame.style.cursor="auto",document.removeEventListener("mousemove",this.onmousemove),document.removeEventListener("mouseup",this.onmouseup),od()},qd.prototype.isNumeric=function(t){return!isNaN(as(t))&&isFinite(t)},qd.prototype.setRange=function(t,e,n,r){if(!this.isNumeric(t))throw new Error("Parameter 'start' is not numeric; value: "+t);if(!this.isNumeric(e))throw new Error("Parameter 'end' is not numeric; value: "+t);if(!this.isNumeric(n))throw new Error("Parameter 'step' is not numeric; value: "+t);this._start=t||0,this._end=e||0,this.setStep(n,r)},qd.prototype.setStep=function(t,e){void 0===t||t<=0||(void 0!==e&&(this.prettyStep=e),!0===this.prettyStep?this._step=qd.calculatePrettyStep(t):this._step=t)},qd.calculatePrettyStep=function(t){const e=function(t){return Math.log(t)/Math.LN10},n=Math.pow(10,Math.round(e(t))),r=2*Math.pow(10,Math.round(e(t/2))),i=5*Math.pow(10,Math.round(e(t/5)));let o=n;return Math.abs(r-t)<=Math.abs(o-t)&&(o=r),Math.abs(i-t)<=Math.abs(o-t)&&(o=i),o<=0&&(o=1),o},qd.prototype.getCurrent=function(){return as(this._current.toPrecision(this.precision))},qd.prototype.getStep=function(){return this._step},qd.prototype.start=function(t){void 0===t&&(t=!1),this._current=this._start-this._start%this._step,t&&this.getCurrent()<this._start&&this.next()},qd.prototype.next=function(){this._current+=this._step},qd.prototype.end=function(){return this._current>this._end},Qd.STYLE=Ld;const $d=void 0;function Qd(t,e,n){if(!(this instanceof Qd))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.dataGroup=new Bd,this.dataPoints=null,this.create(),function(t,e){if(void 0===t||Dd(t))throw new Error("No DEFAULTS passed");if(void 0===e)throw new Error("No dst passed");Md=t,Id(t,e,Ad),Id(t,e,Pd,"default"),kd(t,e),e.margin=10,e.showTooltip=!1,e.onclick_callback=null,e.eye=new nn(0,0,-1)}(Qd.DEFAULTS,this),this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.setOptions(n),this.setData(e)}function Kd(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function tv(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}Qd.DEFAULTS={width:"400px",height:"400px",filterLabel:"time",legendLabel:"value",xLabel:"x",yLabel:"y",zLabel:"z",xValueLabel:function(t){return t},yValueLabel:function(t){return t},zValueLabel:function(t){return t},showXAxis:!0,showYAxis:!0,showZAxis:!0,showGrayBottom:!1,showGrid:!0,showPerspective:!0,showShadow:!1,showSurfaceGrid:!0,keepAspectRatio:!0,rotateAxisLabels:!0,verticalRatio:.5,dotSizeRatio:.02,dotSizeMinFraction:.5,dotSizeMaxFraction:2.5,showAnimationControls:$d,animationInterval:1e3,animationPreload:!1,animationAutoStart:$d,axisFontSize:14,axisFontType:"arial",axisColor:"#4D4D4D",gridColor:"#D3D3D3",xCenter:"55%",yCenter:"50%",style:Qd.STYLE.DOT,tooltip:!1,tooltipDelay:300,tooltipStyle:{content:{padding:"10px",border:"1px solid #4d4d4d",color:"#1a1a1a",background:"rgba(255,255,255,0.7)",borderRadius:"2px",boxShadow:"5px 5px 10px rgba(128,128,128,0.5)"},line:{height:"40px",width:"0",borderLeft:"1px solid #4d4d4d",pointerEvents:"none"},dot:{height:"0",width:"0",border:"5px solid #4d4d4d",borderRadius:"5px",pointerEvents:"none"}},dataColor:{fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},surfaceColors:$d,colormap:$d,cameraPosition:{horizontal:1,vertical:.5,distance:1.7},zoomable:!0,ctrlToZoom:!1,showLegend:$d,backgroundColor:$d,xBarWidth:$d,yBarWidth:$d,valueMin:$d,valueMax:$d,xMin:$d,xMax:$d,xStep:$d,yMin:$d,yMax:$d,yStep:$d,zMin:$d,zMax:$d,zStep:$d},Nu(Qd.prototype),Qd.prototype._setScale=function(){this.scale=new nn(1/this.xRange.range(),1/this.yRange.range(),1/this.zRange.range()),this.keepAspectRatio&&(this.scale.x<this.scale.y?this.scale.y=this.scale.x:this.scale.x=this.scale.y),this.scale.z*=this.verticalRatio,void 0!==this.valueRange&&(this.scale.value=1/this.valueRange.range());const t=this.xRange.center()*this.scale.x,e=this.yRange.center()*this.scale.y,n=this.zRange.center()*this.scale.z;this.camera.setArmLocation(t,e,n)},Qd.prototype._convert3Dto2D=function(t){const e=this._convertPointToTranslation(t);return this._convertTranslationToScreen(e)},Qd.prototype._convertPointToTranslation=function(t){const e=this.camera.getCameraLocation(),n=this.camera.getCameraRotation(),r=t.x*this.scale.x,i=t.y*this.scale.y,o=t.z*this.scale.z,a=e.x,s=e.y,u=e.z,c=Math.sin(n.x),l=Math.cos(n.x),h=Math.sin(n.y),f=Math.cos(n.y),p=Math.sin(n.z),d=Math.cos(n.z);return new nn(f*(p*(i-s)+d*(r-a))-h*(o-u),c*(f*(o-u)+h*(p*(i-s)+d*(r-a)))+l*(d*(i-s)-p*(r-a)),l*(f*(o-u)+h*(p*(i-s)+d*(r-a)))-c*(d*(i-s)-p*(r-a)))},Qd.prototype._convertTranslationToScreen=function(t){const e=this.eye.x,n=this.eye.y,r=this.eye.z,i=t.x,o=t.y,a=t.z;let s,u;return this.showPerspective?(s=r/a*(i-e),u=r/a*(o-n)):(s=i*(-r/this.camera.getArmLength()),u=o*(-r/this.camera.getArmLength())),new Hd(this.currentXCenter+s*this.frame.canvas.clientWidth,this.currentYCenter-u*this.frame.canvas.clientWidth)},Qd.prototype._calcTranslations=function(t){for(let e=0;e<t.length;e++){const n=t[e];n.trans=this._convertPointToTranslation(n.point),n.screen=this._convertTranslationToScreen(n.trans);const r=this._convertPointToTranslation(n.bottom);n.dist=this.showPerspective?r.length():-r.z}Bo(t).call(t,function(t,e){return e.dist-t.dist})},Qd.prototype._initializeRanges=function(){const t=this.dataGroup;this.xRange=t.xRange,this.yRange=t.yRange,this.zRange=t.zRange,this.valueRange=t.valueRange,this.xStep=t.xStep,this.yStep=t.yStep,this.zStep=t.zStep,this.xBarWidth=t.xBarWidth,this.yBarWidth=t.yBarWidth,this.colX=t.colX,this.colY=t.colY,this.colZ=t.colZ,this.colValue=t.colValue,this._setScale()},Qd.prototype.getDataPoints=function(t){const e=[];for(let n=0;n<t.length;n++){const r=new nn;r.x=t[n][this.colX]||0,r.y=t[n][this.colY]||0,r.z=t[n][this.colZ]||0,r.data=t[n],r.value=t[n][this.colValue]||0;const i={};i.point=r,i.bottom=new nn(r.x,r.y,this.zRange.min),i.trans=void 0,i.screen=void 0,e.push(i)}return e},Qd.prototype._getDataPoints=function(t){let e,n,r,i,o=[];if(this.style===Qd.STYLE.GRID||this.style===Qd.STYLE.SURFACE){const a=this.dataGroup.getDistinctValues(this.colX,t),s=this.dataGroup.getDistinctValues(this.colY,t);o=this.getDataPoints(t);const u=[];for(r=0;r<o.length;r++){i=o[r];const t=ma(a).call(a,i.point.x),e=ma(s).call(s,i.point.y);void 0===u[t]&&(u[t]=[]),u[t][e]=i}for(e=0;e<u.length;e++)for(n=0;n<u[e].length;n++)u[e][n]&&(u[e][n].pointRight=e<u.length-1?u[e+1][n]:void 0,u[e][n].pointTop=n<u[e].length-1?u[e][n+1]:void 0,u[e][n].pointCross=e<u.length-1&&n<u[e].length-1?u[e+1][n+1]:void 0)}else if(o=this.getDataPoints(t),this.style===Qd.STYLE.LINE)for(r=0;r<o.length;r++)r>0&&(o[r-1].pointNext=o[r]);return o},Qd.prototype.create=function(){for(;this.containerElement.hasChildNodes();)this.containerElement.removeChild(this.containerElement.firstChild);this.frame=document.createElement("div"),this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas);{const t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t)}this.frame.filter=document.createElement("div"),Ya(this.frame).style.position="absolute",Ya(this.frame).style.bottom="0px",Ya(this.frame).style.left="0px",Ya(this.frame).style.width="100%",this.frame.appendChild(Ya(this.frame));const t=this;this.frame.canvas.addEventListener("mousedown",function(e){t._onMouseDown(e)}),this.frame.canvas.addEventListener("touchstart",function(e){t._onTouchStart(e)}),this.frame.canvas.addEventListener("mousewheel",function(e){t._onWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t._onTooltip(e)}),this.frame.canvas.addEventListener("click",function(e){t._onClick(e)}),this.containerElement.appendChild(this.frame)},Qd.prototype._setSize=function(t,e){this.frame.style.width=t,this.frame.style.height=e,this._resizeCanvas()},Qd.prototype._resizeCanvas=function(){this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=this.frame.canvas.clientWidth,this.frame.canvas.height=this.frame.canvas.clientHeight,Ya(this.frame).style.width=this.frame.canvas.clientWidth-20+"px"},Qd.prototype.animationStart=function(){if(this.animationAutoStart&&this.dataGroup.dataFilter){if(!Ya(this.frame)||!Ya(this.frame).slider)throw new Error("No animation available");Ya(this.frame).slider.play()}},Qd.prototype.animationStop=function(){Ya(this.frame)&&Ya(this.frame).slider&&Ya(this.frame).slider.stop()},Qd.prototype._resizeCenter=function(){"%"===this.xCenter.charAt(this.xCenter.length-1)?this.currentXCenter=as(this.xCenter)/100*this.frame.canvas.clientWidth:this.currentXCenter=as(this.xCenter),"%"===this.yCenter.charAt(this.yCenter.length-1)?this.currentYCenter=as(this.yCenter)/100*(this.frame.canvas.clientHeight-Ya(this.frame).clientHeight):this.currentYCenter=as(this.yCenter)},Qd.prototype.getCameraPosition=function(){const t=this.camera.getArmRotation();return t.distance=this.camera.getArmLength(),t},Qd.prototype._readData=function(t){this.dataPoints=this.dataGroup.initializeData(this,t,this.style),this._initializeRanges(),this._redrawFilter()},Qd.prototype.setData=function(t){null!=t&&(this._readData(t),this.redraw(),this.animationStart())},Qd.prototype.setOptions=function(t){if(void 0===t)return;!0===hd.validate(t,Zd)&&console.error("%cErrors have been found in the supplied options object.",ld),this.animationStop(),function(t,e){if(void 0!==t){if(void 0===e)throw new Error("No dst passed");if(void 0===Md||Dd(Md))throw new Error("DEFAULTS not set for module Settings");zd(t,e,Ad),zd(t,e,Pd,"default"),kd(t,e)}}(t,this),this.setPointDrawingMethod(),this._setSize(this.width,this.height),this.setAxisLabelMethod(),this.setData(this.dataGroup.getDataTable()),this.animationStart()},Qd.prototype.setPointDrawingMethod=function(){let t;switch(this.style){case Qd.STYLE.BAR:t=this._redrawBarGraphPoint;break;case Qd.STYLE.BARCOLOR:t=this._redrawBarColorGraphPoint;break;case Qd.STYLE.BARSIZE:t=this._redrawBarSizeGraphPoint;break;case Qd.STYLE.DOT:t=this._redrawDotGraphPoint;break;case Qd.STYLE.DOTLINE:t=this._redrawDotLineGraphPoint;break;case Qd.STYLE.DOTCOLOR:t=this._redrawDotColorGraphPoint;break;case Qd.STYLE.DOTSIZE:t=this._redrawDotSizeGraphPoint;break;case Qd.STYLE.SURFACE:t=this._redrawSurfaceGraphPoint;break;case Qd.STYLE.GRID:t=this._redrawGridGraphPoint;break;case Qd.STYLE.LINE:t=this._redrawLineGraphPoint;break;default:throw new Error("Can not determine point drawing method for graph style '"+this.style+"'")}this._pointDrawingMethod=t},Qd.prototype.setAxisLabelMethod=function(){this.rotateAxisLabels?(this._drawAxisLabelX=this.drawAxisLabelXRotate,this._drawAxisLabelY=this.drawAxisLabelYRotate,this._drawAxisLabelZ=this.drawAxisLabelZRotate):(this._drawAxisLabelX=this.drawAxisLabelX,this._drawAxisLabelY=this.drawAxisLabelY,this._drawAxisLabelZ=this.drawAxisLabelZ)},Qd.prototype.redraw=function(){if(void 0===this.dataPoints)throw new Error("Graph data not initialized");this._resizeCanvas(),this._resizeCenter(),this._redrawSlider(),this._redrawClear(),this._redrawAxis(),this._redrawDataGraph(),this._redrawInfo(),this._redrawLegend()},Qd.prototype._getContext=function(){const t=this.frame.canvas.getContext("2d");return t.lineJoin="round",t.lineCap="round",t},Qd.prototype._redrawClear=function(){const t=this.frame.canvas;t.getContext("2d").clearRect(0,0,t.width,t.height)},Qd.prototype._dotSize=function(){return this.frame.clientWidth*this.dotSizeRatio},Qd.prototype._getLegendWidth=function(){let t;if(this.style===Qd.STYLE.DOTSIZE){t=this._dotSize()*this.dotSizeMaxFraction}else t=this.style===Qd.STYLE.BARSIZE?this.xBarWidth:20;return t},Qd.prototype._redrawLegend=function(){if(!0!==this.showLegend)return;if(this.style===Qd.STYLE.LINE||this.style===Qd.STYLE.BARSIZE)return;const t=this.style===Qd.STYLE.BARSIZE||this.style===Qd.STYLE.DOTSIZE,e=this.style===Qd.STYLE.DOTSIZE||this.style===Qd.STYLE.DOTCOLOR||this.style===Qd.STYLE.SURFACE||this.style===Qd.STYLE.BARCOLOR,n=Math.max(.25*this.frame.clientHeight,100),r=this.margin,i=this._getLegendWidth(),o=this.frame.clientWidth-this.margin,a=o-i,s=r+n,u=this._getContext();if(u.lineWidth=1,u.font="14px arial",!1===t){const t=0,e=n;let s;for(s=t;s<e;s++){const n=1-(s-t)/(e-t),i=this._colormap(n,1);u.strokeStyle=i,u.beginPath(),u.moveTo(a,r+s),u.lineTo(o,r+s),u.stroke()}u.strokeStyle=this.axisColor,u.strokeRect(a,r,i,n)}else{let t;this.style===Qd.STYLE.DOTSIZE?t=i*(this.dotSizeMinFraction/this.dotSizeMaxFraction):(this.style,Qd.STYLE.BARSIZE),u.strokeStyle=this.axisColor,u.fillStyle=Ss(this.dataColor),u.beginPath(),u.moveTo(a,r),u.lineTo(o,r),u.lineTo(a+t,s),u.lineTo(a,s),u.closePath(),Ss(u).call(u),u.stroke()}const c=e?this.valueRange.min:this.zRange.min,l=e?this.valueRange.max:this.zRange.max,h=new qd(c,l,(l-c)/5,!0);for(h.start(!0);!h.end();){const t=s-(h.getCurrent()-c)/(l-c)*n,e=new Hd(a-5,t),r=new Hd(a,t);this._line(u,e,r),u.textAlign="right",u.textBaseline="middle",u.fillStyle=this.axisColor,u.fillText(h.getCurrent(),a-10,t),h.next()}u.textAlign="right",u.textBaseline="top";const f=this.legendLabel;u.fillText(f,o,s+this.margin)},Qd.prototype._redrawFilter=function(){const t=this.dataGroup.dataFilter,e=Ya(this.frame);if(e.innerHTML="",!t)return void(e.slider=void 0);const n=new Jd(e,{visible:this.showAnimationControls});e.slider=n,e.style.padding="10px",n.setValues(Mi(t)),n.setPlayInterval(this.animationInterval);const r=this;n.setOnChangeCallback(function(){const t=r.dataGroup.dataFilter,e=n.getIndex();t.selectValue(e),r.dataPoints=t._getDataPoints(),r.redraw()})},Qd.prototype._redrawSlider=function(){void 0!==Ya(this.frame).slider&&Ya(this.frame).slider.redraw()},Qd.prototype._redrawInfo=function(){const t=this.dataGroup.getInfo();if(void 0===t)return;const e=this._getContext();e.font="14px arial",e.lineStyle="gray",e.fillStyle="gray",e.textAlign="left",e.textBaseline="top";const n=this.margin,r=this.margin;e.fillText(t,n,r)},Qd.prototype._line=function(t,e,n,r){void 0!==r&&(t.strokeStyle=r),t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(n.x,n.y),t.stroke()},Qd.prototype.drawAxisLabelX=function(t,e,n,r,i){void 0===i&&(i=0);const o=this._convert3Dto2D(e);Math.cos(2*r)>0?(t.textAlign="center",t.textBaseline="top",o.y+=i):Math.sin(2*r)<0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(n,o.x,o.y)},Qd.prototype.drawAxisLabelY=function(t,e,n,r,i){void 0===i&&(i=0);const o=this._convert3Dto2D(e);Math.cos(2*r)<0?(t.textAlign="center",t.textBaseline="top",o.y+=i):Math.sin(2*r)>0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(n,o.x,o.y)},Qd.prototype.drawAxisLabelZ=function(t,e,n,r){void 0===r&&(r=0);const i=this._convert3Dto2D(e);t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(n,i.x-r,i.y)},Qd.prototype.drawAxisLabelXRotate=function(t,e,n,r,i){const o=this._convert3Dto2D(e);Math.cos(2*r)>0?(t.save(),t.translate(o.x,o.y),t.rotate(-Math.PI/2),t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(n,0,0),t.restore()):Math.sin(2*r)<0?(t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(n,o.x,o.y)):(t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(n,o.x,o.y))},Qd.prototype.drawAxisLabelYRotate=function(t,e,n,r,i){const o=this._convert3Dto2D(e);Math.cos(2*r)<0?(t.save(),t.translate(o.x,o.y),t.rotate(-Math.PI/2),t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(n,0,0),t.restore()):Math.sin(2*r)>0?(t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(n,o.x,o.y)):(t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(n,o.x,o.y))},Qd.prototype.drawAxisLabelZRotate=function(t,e,n,r){void 0===r&&(r=0);const i=this._convert3Dto2D(e);t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(n,i.x-r,i.y)},Qd.prototype._line3d=function(t,e,n,r){const i=this._convert3Dto2D(e),o=this._convert3Dto2D(n);this._line(t,i,o,r)},Qd.prototype._redrawAxis=function(){const t=this._getContext();let e,n,r,i,o,a,s,u,c,l,h;t.font=this.axisFontSize/this.camera.getArmLength()+"px "+this.axisFontType;const f=.025/this.scale.x,p=.025/this.scale.y,d=5/this.camera.getArmLength(),v=this.camera.getArmRotation().horizontal,m=new Hd(Math.cos(v),Math.sin(v)),y=this.xRange,g=this.yRange,b=this.zRange;let w;for(t.lineWidth=1,i=void 0===this.defaultXStep,r=new qd(y.min,y.max,this.xStep,i),r.start(!0);!r.end();){const i=r.getCurrent();if(this.showGrid?(e=new nn(i,g.min,b.min),n=new nn(i,g.max,b.min),this._line3d(t,e,n,this.gridColor)):this.showXAxis&&(e=new nn(i,g.min,b.min),n=new nn(i,g.min+f,b.min),this._line3d(t,e,n,this.axisColor),e=new nn(i,g.max,b.min),n=new nn(i,g.max-f,b.min),this._line3d(t,e,n,this.axisColor)),this.showXAxis){s=m.x>0?g.min:g.max,w=new nn(i,s,b.min);const e=" "+this.xValueLabel(i)+" ";this._drawAxisLabelX.call(this,t,w,e,v,d)}r.next()}for(t.lineWidth=1,i=void 0===this.defaultYStep,r=new qd(g.min,g.max,this.yStep,i),r.start(!0);!r.end();){const i=r.getCurrent();if(this.showGrid?(e=new nn(y.min,i,b.min),n=new nn(y.max,i,b.min),this._line3d(t,e,n,this.gridColor)):this.showYAxis&&(e=new nn(y.min,i,b.min),n=new nn(y.min+p,i,b.min),this._line3d(t,e,n,this.axisColor),e=new nn(y.max,i,b.min),n=new nn(y.max-p,i,b.min),this._line3d(t,e,n,this.axisColor)),this.showYAxis){a=m.y>0?y.min:y.max,w=new nn(a,i,b.min);const e=" "+this.yValueLabel(i)+" ";this._drawAxisLabelY.call(this,t,w,e,v,d)}r.next()}if(this.showZAxis){for(t.lineWidth=1,i=void 0===this.defaultZStep,r=new qd(b.min,b.max,this.zStep,i),r.start(!0),a=m.x>0?y.min:y.max,s=m.y<0?g.min:g.max;!r.end();){const e=r.getCurrent(),i=new nn(a,s,e),o=this._convert3Dto2D(i);n=new Hd(o.x-d,o.y),this._line(t,o,n,this.axisColor);const u=this.zValueLabel(e)+" ";this._drawAxisLabelZ.call(this,t,i,u,5),r.next()}t.lineWidth=1,e=new nn(a,s,b.min),n=new nn(a,s,b.max),this._line3d(t,e,n,this.axisColor)}if(this.showXAxis){let e,n;t.lineWidth=1,e=new nn(y.min,g.min,b.min),n=new nn(y.max,g.min,b.min),this._line3d(t,e,n,this.axisColor),e=new nn(y.min,g.max,b.min),n=new nn(y.max,g.max,b.min),this._line3d(t,e,n,this.axisColor)}this.showYAxis&&(t.lineWidth=1,e=new nn(y.min,g.min,b.min),n=new nn(y.min,g.max,b.min),this._line3d(t,e,n,this.axisColor),e=new nn(y.max,g.min,b.min),n=new nn(y.max,g.max,b.min),this._line3d(t,e,n,this.axisColor));const x=this.xLabel;x.length>0&&this.showXAxis&&(h=.1/this.scale.y,a=(y.max+3*y.min)/4,s=m.x>0?g.min-h:g.max+h,o=new nn(a,s,b.min),this.drawAxisLabelX(t,o,x,v));const _=this.yLabel;_.length>0&&this.showYAxis&&(l=.1/this.scale.x,a=m.y>0?y.min-l:y.max+l,s=(g.max+3*g.min)/4,o=new nn(a,s,b.min),this.drawAxisLabelY(t,o,_,v));const S=this.zLabel;S.length>0&&this.showZAxis&&(c=30,a=m.x>0?y.min:y.max,s=m.y<0?g.min:g.max,u=(b.max+3*b.min)/4,o=new nn(a,s,u),this.drawAxisLabelZ(t,o,S,30))},Qd.prototype._getStrokeWidth=function(t){return void 0!==t?this.showPerspective?1/-t.trans.z*this.dataColor.strokeWidth:-this.eye.z/this.camera.getArmLength()*this.dataColor.strokeWidth:this.dataColor.strokeWidth},Qd.prototype._redrawBar=function(t,e,n,r,i,o){let a;const s=this,u=e.point,c=this.zRange.min,l=[{point:new nn(u.x-n,u.y-r,u.z)},{point:new nn(u.x+n,u.y-r,u.z)},{point:new nn(u.x+n,u.y+r,u.z)},{point:new nn(u.x-n,u.y+r,u.z)}],h=[{point:new nn(u.x-n,u.y-r,c)},{point:new nn(u.x+n,u.y-r,c)},{point:new nn(u.x+n,u.y+r,c)},{point:new nn(u.x-n,u.y+r,c)}];ks(l).call(l,function(t){t.screen=s._convert3Dto2D(t.point)}),ks(h).call(h,function(t){t.screen=s._convert3Dto2D(t.point)});const f=[{corners:l,center:nn.avg(h[0].point,h[2].point)},{corners:[l[0],l[1],h[1],h[0]],center:nn.avg(h[1].point,h[0].point)},{corners:[l[1],l[2],h[2],h[1]],center:nn.avg(h[2].point,h[1].point)},{corners:[l[2],l[3],h[3],h[2]],center:nn.avg(h[3].point,h[2].point)},{corners:[l[3],l[0],h[0],h[3]],center:nn.avg(h[0].point,h[3].point)}];e.surfaces=f;for(let t=0;t<f.length;t++){a=f[t];const e=this._convertPointToTranslation(a.center);a.dist=this.showPerspective?e.length():-e.z}Bo(f).call(f,function(t,e){const n=e.dist-t.dist;return n||(t.corners===l?1:e.corners===l?-1:0)}),t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=o,t.fillStyle=i;for(let e=2;e<f.length;e++)a=f[e],this._polygon(t,a.corners)},Qd.prototype._polygon=function(t,e,n,r){if(!(e.length<2)){void 0!==n&&(t.fillStyle=n),void 0!==r&&(t.strokeStyle=r),t.beginPath(),t.moveTo(e[0].screen.x,e[0].screen.y);for(let n=1;n<e.length;++n){const r=e[n];t.lineTo(r.screen.x,r.screen.y)}t.closePath(),Ss(t).call(t),t.stroke()}},Qd.prototype._drawCircle=function(t,e,n,r,i){const o=this._calcRadius(e,i);t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=r,t.fillStyle=n,t.beginPath(),t.arc(e.screen.x,e.screen.y,o,0,2*Math.PI,!0),Ss(t).call(t),t.stroke()},Qd.prototype._getColorsRegular=function(t){const e=(t.point.value-this.valueRange.min)*this.scale.value;return{fill:this._colormap(e,1),border:this._colormap(e,.8)}},Qd.prototype._getColorsColor=function(t){let e,n,r;if(t&&t.point&&t.point.data&&t.point.data.style&&(r=t.point.data.style),r&&"object"==typeof r&&Ss(r)&&r.stroke)return{fill:Ss(r),border:r.stroke};if("string"==typeof t.point.value)e=t.point.value,n=t.point.value;else{const r=(t.point.value-this.valueRange.min)*this.scale.value;e=this._colormap(r,1),n=this._colormap(r,.8)}return{fill:e,border:n}},Qd.prototype._getColorsSize=function(){return{fill:Ss(this.dataColor),border:this.dataColor.stroke}},Qd.prototype._colormap=function(t){let e,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const a=this.colormap;if(Us(a)){const i=a.length-1,o=Math.max(Math.floor(t*i),0),s=Math.min(o+1,i),u=t*i-o,c=a[o],l=a[s];e=c.r+u*(l.r-c.r),n=c.g+u*(l.g-c.g),r=c.b+u*(l.b-c.b)}else if("function"==typeof a){var s=a(t);e=s.r,n=s.g,r=s.b,i=s.a}else{var u=ad(240*(1-t)/360,1,1);e=u.r,n=u.g,r=u.b}var c,l,h,f,p;return"number"!=typeof i||uu(i)?Eu(c=Eu(l="RGB(".concat(Math.round(e*o),", ")).call(l,Math.round(n*o),", ")).call(c,Math.round(r*o),")"):Eu(h=Eu(f=Eu(p="RGBA(".concat(Math.round(e*o),", ")).call(p,Math.round(n*o),", ")).call(f,Math.round(r*o),", ")).call(h,i,")")},Qd.prototype._calcRadius=function(t,e){let n;return void 0===e&&(e=this._dotSize()),n=this.showPerspective?e/-t.trans.z:e*(-this.eye.z/this.camera.getArmLength()),n<0&&(n=0),n},Qd.prototype._redrawBarGraphPoint=function(t,e){const n=this.xBarWidth/2,r=this.yBarWidth/2,i=this._getColorsRegular(e);this._redrawBar(t,e,n,r,Ss(i),i.border)},Qd.prototype._redrawBarColorGraphPoint=function(t,e){const n=this.xBarWidth/2,r=this.yBarWidth/2,i=this._getColorsColor(e);this._redrawBar(t,e,n,r,Ss(i),i.border)},Qd.prototype._redrawBarSizeGraphPoint=function(t,e){const n=(e.point.value-this.valueRange.min)/this.valueRange.range(),r=this.xBarWidth/2*(.8*n+.2),i=this.yBarWidth/2*(.8*n+.2),o=this._getColorsSize();this._redrawBar(t,e,r,i,Ss(o),o.border)},Qd.prototype._redrawDotGraphPoint=function(t,e){const n=this._getColorsRegular(e);this._drawCircle(t,e,Ss(n),n.border)},Qd.prototype._redrawDotLineGraphPoint=function(t,e){const n=this._convert3Dto2D(e.bottom);t.lineWidth=1,this._line(t,n,e.screen,this.gridColor),this._redrawDotGraphPoint(t,e)},Qd.prototype._redrawDotColorGraphPoint=function(t,e){const n=this._getColorsColor(e);this._drawCircle(t,e,Ss(n),n.border)},Qd.prototype._redrawDotSizeGraphPoint=function(t,e){const n=this._dotSize(),r=(e.point.value-this.valueRange.min)/this.valueRange.range(),i=n*this.dotSizeMinFraction,o=i+(n*this.dotSizeMaxFraction-i)*r,a=this._getColorsSize();this._drawCircle(t,e,Ss(a),a.border,o)},Qd.prototype._redrawSurfaceGraphPoint=function(t,e){const n=e.pointRight,r=e.pointTop,i=e.pointCross;if(void 0===e||void 0===n||void 0===r||void 0===i)return;let o,a,s,u=!0;if(this.showGrayBottom||this.showShadow){const t=nn.subtract(i.trans,e.trans),o=nn.subtract(r.trans,n.trans),a=nn.crossProduct(t,o);if(this.showPerspective){const t=nn.avg(nn.avg(e.trans,i.trans),nn.avg(n.trans,r.trans));s=-nn.dotProduct(a.normalize(),t.normalize())}else s=a.z/a.length();u=s>0}if(u||!this.showGrayBottom){const t=((e.point.value+n.point.value+r.point.value+i.point.value)/4-this.valueRange.min)*this.scale.value,a=this.showShadow?(1+s)/2:1;o=this._colormap(t,a)}else o="gray";a=this.showSurfaceGrid?this.axisColor:o,t.lineWidth=this._getStrokeWidth(e);const c=[e,n,i,r];this._polygon(t,c,o,a)},Qd.prototype._drawGridLine=function(t,e,n){if(void 0===e||void 0===n)return;const r=((e.point.value+n.point.value)/2-this.valueRange.min)*this.scale.value;t.lineWidth=2*this._getStrokeWidth(e),t.strokeStyle=this._colormap(r,1),this._line(t,e.screen,n.screen)},Qd.prototype._redrawGridGraphPoint=function(t,e){this._drawGridLine(t,e,e.pointRight),this._drawGridLine(t,e,e.pointTop)},Qd.prototype._redrawLineGraphPoint=function(t,e){void 0!==e.pointNext&&(t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=this.dataColor.stroke,this._line(t,e.screen,e.pointNext.screen))},Qd.prototype._redrawDataGraph=function(){const t=this._getContext();let e;if(!(void 0===this.dataPoints||this.dataPoints.length<=0))for(this._calcTranslations(this.dataPoints),e=0;e<this.dataPoints.length;e++){const n=this.dataPoints[e];this._pointDrawingMethod.call(this,t,n)}},Qd.prototype._storeMousePosition=function(t){this.startMouseX=Kd(t),this.startMouseY=tv(t),this._startCameraOffset=this.camera.getOffset()},Qd.prototype._onMouseDown=function(t){if(t=t||window.event,this.leftButtonDown&&this._onMouseUp(t),this.leftButtonDown=t.which?1===t.which:1===t.button,!this.leftButtonDown&&!this.touchDown)return;this._storeMousePosition(t),this.startStart=new Date(this.start),this.startEnd=new Date(this.end),this.startArmRotation=this.camera.getArmRotation(),this.frame.style.cursor="move";const e=this;this.onmousemove=function(t){e._onMouseMove(t)},this.onmouseup=function(t){e._onMouseUp(t)},document.addEventListener("mousemove",e.onmousemove),document.addEventListener("mouseup",e.onmouseup),od(t)},Qd.prototype._onMouseMove=function(t){this.moving=!0,t=t||window.event;const e=as(Kd(t))-this.startMouseX,n=as(tv(t))-this.startMouseY;if(t&&!0===t.ctrlKey){const r=.5*this.frame.clientWidth,i=.5*this.frame.clientHeight,o=(this._startCameraOffset.x||0)-e/r*this.camera.armLength*.8,a=(this._startCameraOffset.y||0)+n/i*this.camera.armLength*.8;this.camera.setOffset(o,a),this._storeMousePosition(t)}else{let t=this.startArmRotation.horizontal+e/200,r=this.startArmRotation.vertical+n/200;const i=4,o=Math.sin(i/360*2*Math.PI);Math.abs(Math.sin(t))<o&&(t=Math.round(t/Math.PI)*Math.PI-.001),Math.abs(Math.cos(t))<o&&(t=(Math.round(t/Math.PI-.5)+.5)*Math.PI-.001),Math.abs(Math.sin(r))<o&&(r=Math.round(r/Math.PI)*Math.PI),Math.abs(Math.cos(r))<o&&(r=(Math.round(r/Math.PI-.5)+.5)*Math.PI),this.camera.setArmRotation(t,r)}this.redraw();const r=this.getCameraPosition();this.emit("cameraPositionChange",r),od(t)},Qd.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",this.leftButtonDown=!1,document.removeEventListener("mousemove",this.onmousemove),document.removeEventListener("mouseup",this.onmouseup),od(t)},Qd.prototype._onClick=function(t){if(this.onclick_callback||this.hasListeners("click")){if(this.moving)this.moving=!1;else{const e=this.frame.getBoundingClientRect(),n=Kd(t)-e.left,r=tv(t)-e.top,i=this._dataPointFromXY(n,r);i&&(this.onclick_callback&&this.onclick_callback(i.point.data),this.emit("click",i.point.data))}od(t)}},Qd.prototype._onTooltip=function(t){const e=this.tooltipDelay,n=this.frame.getBoundingClientRect(),r=Kd(t)-n.left,i=tv(t)-n.top;if(this.showTooltip)if(this.tooltipTimeout&&clearTimeout(this.tooltipTimeout),this.leftButtonDown)this._hideTooltip();else if(this.tooltip&&this.tooltip.dataPoint){const t=this._dataPointFromXY(r,i);t!==this.tooltip.dataPoint&&(t?this._showTooltip(t):this._hideTooltip())}else{const t=this;this.tooltipTimeout=Zi(function(){t.tooltipTimeout=null;const e=t._dataPointFromXY(r,i);e&&t._showTooltip(e)},e)}},Qd.prototype._onTouchStart=function(t){this.touchDown=!0;const e=this;this.ontouchmove=function(t){e._onTouchMove(t)},this.ontouchend=function(t){e._onTouchEnd(t)},document.addEventListener("touchmove",e.ontouchmove),document.addEventListener("touchend",e.ontouchend),this._onMouseDown(t)},Qd.prototype._onTouchMove=function(t){this._onMouseMove(t)},Qd.prototype._onTouchEnd=function(t){this.touchDown=!1,document.removeEventListener("touchmove",this.ontouchmove),document.removeEventListener("touchend",this.ontouchend),this._onMouseUp(t)},Qd.prototype._onWheel=function(t){if(t||(t=window.event),this.zoomable&&(!this.ctrlToZoom||t.ctrlKey)){let e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e){const t=this.camera.getArmLength()*(1-e/10);this.camera.setArmLength(t),this.redraw(),this._hideTooltip()}const n=this.getCameraPosition();this.emit("cameraPositionChange",n),od(t)}},Qd.prototype._insideTriangle=function(t,e){const n=e[0],r=e[1],i=e[2];function o(t){return t>0?1:t<0?-1:0}const a=o((r.x-n.x)*(t.y-n.y)-(r.y-n.y)*(t.x-n.x)),s=o((i.x-r.x)*(t.y-r.y)-(i.y-r.y)*(t.x-r.x)),u=o((n.x-i.x)*(t.y-i.y)-(n.y-i.y)*(t.x-i.x));return!(0!=a&&0!=s&&a!=s||0!=s&&0!=u&&s!=u||0!=a&&0!=u&&a!=u)},Qd.prototype._dataPointFromXY=function(t,e){const n=new Hd(t,e);let r,i=null,o=null,a=null;if(this.style===Qd.STYLE.BAR||this.style===Qd.STYLE.BARCOLOR||this.style===Qd.STYLE.BARSIZE)for(r=this.dataPoints.length-1;r>=0;r--){i=this.dataPoints[r];const t=i.surfaces;if(t)for(let e=t.length-1;e>=0;e--){const r=t[e].corners,o=[r[0].screen,r[1].screen,r[2].screen],a=[r[2].screen,r[3].screen,r[0].screen];if(this._insideTriangle(n,o)||this._insideTriangle(n,a))return i}}else for(r=0;r<this.dataPoints.length;r++){i=this.dataPoints[r];const n=i.screen;if(n){const r=Math.abs(t-n.x),s=Math.abs(e-n.y),u=Math.sqrt(r*r+s*s);(null===a||u<a)&&u<100&&(a=u,o=i)}}return o},Qd.prototype.hasBars=function(t){return t==Qd.STYLE.BAR||t==Qd.STYLE.BARCOLOR||t==Qd.STYLE.BARSIZE},Qd.prototype._showTooltip=function(t){let e,n,r;this.tooltip?(e=this.tooltip.dom.content,n=this.tooltip.dom.line,r=this.tooltip.dom.dot):(e=document.createElement("div"),Iu(e.style,{},this.tooltipStyle.content),e.style.position="absolute",n=document.createElement("div"),Iu(n.style,{},this.tooltipStyle.line),n.style.position="absolute",r=document.createElement("div"),Iu(r.style,{},this.tooltipStyle.dot),r.style.position="absolute",this.tooltip={dataPoint:null,dom:{content:e,line:n,dot:r}}),this._hideTooltip(),this.tooltip.dataPoint=t,"function"==typeof this.showTooltip?e.innerHTML=this.showTooltip(t.point):e.innerHTML="<table><tr><td>"+this.xLabel+":</td><td>"+t.point.x+"</td></tr><tr><td>"+this.yLabel+":</td><td>"+t.point.y+"</td></tr><tr><td>"+this.zLabel+":</td><td>"+t.point.z+"</td></tr></table>",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(n),this.frame.appendChild(r);const i=e.offsetWidth,o=e.offsetHeight,a=n.offsetHeight,s=r.offsetWidth,u=r.offsetHeight;let c=t.screen.x-i/2;c=Math.min(Math.max(c,10),this.frame.clientWidth-10-i),n.style.left=t.screen.x+"px",n.style.top=t.screen.y-a+"px",e.style.left=c+"px",e.style.top=t.screen.y-a-o+"px",r.style.left=t.screen.x-s/2+"px",r.style.top=t.screen.y-u/2+"px"},Qd.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(const t in this.tooltip.dom)if(Object.prototype.hasOwnProperty.call(this.tooltip.dom,t)){const e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},Qd.prototype.setCameraPosition=function(t){Fd(t,this),this.redraw()},Qd.prototype.setSize=function(t,e){this._setSize(t,e),this.redraw()},t.Graph3d=Qd,t.Graph3dCamera=rn,t.Graph3dFilter=Hi,t.Graph3dPoint2d=Hd,t.Graph3dPoint3d=nn,t.Graph3dSlider=Jd,t.Graph3dStepNumber=qd});
//# sourceMappingURL=vis-graph3d.min.js.map