@antv/s2
Version:
effective spreadsheet render core lib
9 lines • 529 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g2"),require("@antv/s2")):"function"==typeof define&&define.amd?define(["exports","@antv/g2","@antv/s2"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).S2Extends={},t.g2,t.S2)}(this,(function(t,e,n){"use strict";var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function a(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((r=r.apply(t,e||[])).next())}))}function s(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function l(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function c(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function d(t){var e=function(t,e){if("object"!=h(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==h(e)?e:e+""}function f(t,e,n){return(e=d(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}function m(t,e,n){return e&&y(t.prototype,e),n&&y(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function w(t,e){if(t){if("string"==typeof t)return x(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}function C(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||w(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function E(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(E=function(){return!!t})()}function _(t,e){if(e&&("object"==h(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function T(t,e,n){return e=b(e),_(t,E()?Reflect.construct(e,n||[],b(t).constructor):e.apply(t,n))}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function k(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}function L(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||w(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}"function"==typeof SuppressedError&&SuppressedError;var M="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function N(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var A={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),l=n?n+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],s]:t._events[l].push(s):(t._events[l]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var l,u,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,i),!0;case 5:return c.fn.call(c.context,e,r,i,o),!0;case 6:return c.fn.call(c.context,e,r,i,o,a),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,r);break;case 4:c[u].fn.call(c[u].context,e,r,i);break;default:if(!l)for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==e||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,t.exports=s}(A);var R=N(A.exports),O=1e-6,I="undefined"!=typeof Float32Array?Float32Array:Array;function P(){var t=new I(9);return I!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function B(){var t=new I(16);return I!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function D(t){var e=new I(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function F(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function H(t,e,n,r,i,o,a,s,l,u,c,h,d,f,p,v,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=l,t[8]=u,t[9]=c,t[10]=h,t[11]=d,t[12]=f,t[13]=p,t[14]=v,t[15]=g,t}function z(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function G(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function W(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],v=e[13],g=e[14],y=e[15],m=n*s-r*a,x=n*l-i*a,w=n*u-o*a,C=r*l-i*s,b=r*u-o*s,E=i*u-o*l,_=c*v-h*p,T=c*g-d*p,S=c*y-f*p,k=h*g-d*v,L=h*y-f*v,M=d*y-f*g,N=m*M-x*L+w*k+C*S-b*T+E*_;return N?(N=1/N,t[0]=(s*M-l*L+u*k)*N,t[1]=(i*L-r*M-o*k)*N,t[2]=(v*E-g*b+y*C)*N,t[3]=(d*b-h*E-f*C)*N,t[4]=(l*S-a*M-u*T)*N,t[5]=(n*M-i*S+o*T)*N,t[6]=(g*w-p*E-y*x)*N,t[7]=(c*E-d*w+f*x)*N,t[8]=(a*L-s*S+u*_)*N,t[9]=(r*S-n*L-o*_)*N,t[10]=(p*b-v*w+y*m)*N,t[11]=(h*w-c*b-f*m)*N,t[12]=(s*T-a*k-l*_)*N,t[13]=(n*k-r*T+i*_)*N,t[14]=(v*x-p*C-g*m)*N,t[15]=(c*C-h*x+d*m)*N,t):null}function V(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return(e*a-n*o)*(h*g-d*v)-(e*s-r*o)*(c*g-d*p)+(e*l-i*o)*(c*v-h*p)+(n*s-r*a)*(u*g-d*f)-(n*l-i*a)*(u*v-h*f)+(r*l-i*s)*(u*p-c*f)}function U(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],v=e[12],g=e[13],y=e[14],m=e[15],x=n[0],w=n[1],C=n[2],b=n[3];return t[0]=x*r+w*s+C*h+b*v,t[1]=x*i+w*l+C*d+b*g,t[2]=x*o+w*u+C*f+b*y,t[3]=x*a+w*c+C*p+b*m,x=n[4],w=n[5],C=n[6],b=n[7],t[4]=x*r+w*s+C*h+b*v,t[5]=x*i+w*l+C*d+b*g,t[6]=x*o+w*u+C*f+b*y,t[7]=x*a+w*c+C*p+b*m,x=n[8],w=n[9],C=n[10],b=n[11],t[8]=x*r+w*s+C*h+b*v,t[9]=x*i+w*l+C*d+b*g,t[10]=x*o+w*u+C*f+b*y,t[11]=x*a+w*c+C*p+b*m,x=n[12],w=n[13],C=n[14],b=n[15],t[12]=x*r+w*s+C*h+b*v,t[13]=x*i+w*l+C*d+b*g,t[14]=x*o+w*u+C*f+b*y,t[15]=x*a+w*c+C*p+b*m,t}function j(t,e,n){var r,i,o,a,s,l,u,c,h,d,f,p,v=n[0],g=n[1],y=n[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*y+e[12],t[13]=e[1]*v+e[5]*g+e[9]*y+e[13],t[14]=e[2]*v+e[6]*g+e[10]*y+e[14],t[15]=e[3]*v+e[7]*g+e[11]*y+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=h,t[9]=d,t[10]=f,t[11]=p,t[12]=r*v+s*g+h*y+e[12],t[13]=i*v+l*g+d*y+e[13],t[14]=o*v+u*g+f*y+e[14],t[15]=a*v+c*g+p*y+e[15]),t}function X(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*r,t[5]=a*i+c*r,t[6]=s*i+h*r,t[7]=l*i+d*r,t[8]=u*i-o*r,t[9]=c*i-a*r,t[10]=h*i-s*r,t[11]=d*i-l*r,t}function q(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[8],c=e[9],h=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-u*r,t[1]=a*i-c*r,t[2]=s*i-h*r,t[3]=l*i-d*r,t[8]=o*r+u*i,t[9]=a*r+c*i,t[10]=s*r+h*i,t[11]=l*r+d*i,t}function Y(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function $(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Z(t,e,n){var r,i,o,a=n[0],s=n[1],l=n[2],u=Math.hypot(a,s,l);return u<O?null:(a*=u=1/u,s*=u,l*=u,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+l*r,t[2]=l*a*o-s*r,t[3]=0,t[4]=a*s*o-l*r,t[5]=s*s*o+i,t[6]=l*s*o+a*r,t[7]=0,t[8]=a*l*o+s*r,t[9]=s*l*o-a*r,t[10]=l*l*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function K(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Q(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function J(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function tt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,l=i+i,u=o+o,c=r*s,h=r*l,d=r*u,f=i*l,p=i*u,v=o*u,g=a*s,y=a*l,m=a*u;return t[0]=1-(f+v),t[1]=h+m,t[2]=d-y,t[3]=0,t[4]=h-m,t[5]=1-(c+v),t[6]=p+g,t[7]=0,t[8]=d+y,t[9]=p-g,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function et(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function nt(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],l=e[8],u=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(l,u,c),t}function rt(t,e){var n=new I(3);nt(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,l=e[2]*o,u=e[4]*r,c=e[5]*i,h=e[6]*o,d=e[8]*r,f=e[9]*i,p=e[10]*o,v=a+c+p,g=0;return v>0?(g=2*Math.sqrt(v+1),t[3]=.25*g,t[0]=(h-f)/g,t[1]=(d-l)/g,t[2]=(s-u)/g):a>c&&a>p?(g=2*Math.sqrt(1+a-c-p),t[3]=(h-f)/g,t[0]=.25*g,t[1]=(s+u)/g,t[2]=(d+l)/g):c>p?(g=2*Math.sqrt(1+c-a-p),t[3]=(d-l)/g,t[0]=(s+u)/g,t[1]=.25*g,t[2]=(h+f)/g):(g=2*Math.sqrt(1+p-a-c),t[3]=(s-u)/g,t[0]=(d+l)/g,t[1]=(h+f)/g,t[2]=.25*g),t}function it(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],l=e[3],u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,v=a*c,g=a*h,y=s*h,m=l*u,x=l*c,w=l*h,C=r[0],b=r[1],E=r[2],_=i[0],T=i[1],S=i[2],k=(1-(v+y))*C,L=(f+w)*C,M=(p-x)*C,N=(f-w)*b,A=(1-(d+y))*b,R=(g+m)*b,O=(p+x)*E,I=(g-m)*E,P=(1-(d+v))*E;return t[0]=k,t[1]=L,t[2]=M,t[3]=0,t[4]=N,t[5]=A,t[6]=R,t[7]=0,t[8]=O,t[9]=I,t[10]=P,t[11]=0,t[12]=n[0]+_-(k*_+N*T+O*S),t[13]=n[1]+T-(L*_+A*T+I*S),t[14]=n[2]+S-(M*_+R*T+P*S),t[15]=1,t}function ot(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,h=r*s,d=i*a,f=i*s,p=i*l,v=o*a,g=o*s,y=o*l;return t[0]=1-h-p,t[1]=c+y,t[2]=d-g,t[3]=0,t[4]=c-y,t[5]=1-u-p,t[6]=f+v,t[7]=0,t[8]=d+g,t[9]=f-v,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function at(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var st=at;function lt(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(a+o)*u,t[15]=1,t}var ut=lt;function ct(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=u,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=o*u,t[15]=1,t}function ht(t,e,n,r){var i,o,a,s,l,u,c,h,d,f,p=e[0],v=e[1],g=e[2],y=r[0],m=r[1],x=r[2],w=n[0],C=n[1],b=n[2];return Math.abs(p-w)<O&&Math.abs(v-C)<O&&Math.abs(g-b)<O?z(t):(c=p-w,h=v-C,d=g-b,i=m*(d*=f=1/Math.hypot(c,h,d))-x*(h*=f),o=x*(c*=f)-y*d,a=y*h-m*c,(f=Math.hypot(i,o,a))?(i*=f=1/f,o*=f,a*=f):(i=0,o=0,a=0),s=h*a-d*o,l=d*i-c*a,u=c*o-h*i,(f=Math.hypot(s,l,u))?(s*=f=1/f,l*=f,u*=f):(s=0,l=0,u=0),t[0]=i,t[1]=s,t[2]=c,t[3]=0,t[4]=o,t[5]=l,t[6]=h,t[7]=0,t[8]=a,t[9]=u,t[10]=d,t[11]=0,t[12]=-(i*p+o*v+a*g),t[13]=-(s*p+l*v+u*g),t[14]=-(c*p+h*v+d*g),t[15]=1,t)}function dt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var ft=U,pt=dt,vt=Object.freeze({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],v=e[13],g=e[14],y=e[15];return t[0]=s*(d*y-f*g)-h*(l*y-u*g)+v*(l*f-u*d),t[1]=-(r*(d*y-f*g)-h*(i*y-o*g)+v*(i*f-o*d)),t[2]=r*(l*y-u*g)-s*(i*y-o*g)+v*(i*u-o*l),t[3]=-(r*(l*f-u*d)-s*(i*f-o*d)+h*(i*u-o*l)),t[4]=-(a*(d*y-f*g)-c*(l*y-u*g)+p*(l*f-u*d)),t[5]=n*(d*y-f*g)-c*(i*y-o*g)+p*(i*f-o*d),t[6]=-(n*(l*y-u*g)-a*(i*y-o*g)+p*(i*u-o*l)),t[7]=n*(l*f-u*d)-a*(i*f-o*d)+c*(i*u-o*l),t[8]=a*(h*y-f*v)-c*(s*y-u*v)+p*(s*f-u*h),t[9]=-(n*(h*y-f*v)-c*(r*y-o*v)+p*(r*f-o*h)),t[10]=n*(s*y-u*v)-a*(r*y-o*v)+p*(r*u-o*s),t[11]=-(n*(s*f-u*h)-a*(r*f-o*h)+c*(r*u-o*s)),t[12]=-(a*(h*g-d*v)-c*(s*g-l*v)+p*(s*d-l*h)),t[13]=n*(h*g-d*v)-c*(r*g-i*v)+p*(r*d-i*h),t[14]=-(n*(s*g-l*v)-a*(r*g-i*v)+p*(r*l-i*s)),t[15]=n*(s*d-l*h)-a*(r*d-i*h)+c*(r*l-i*s),t},clone:D,copy:F,create:B,determinant:V,equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],v=t[13],g=t[14],y=t[15],m=e[0],x=e[1],w=e[2],C=e[3],b=e[4],E=e[5],_=e[6],T=e[7],S=e[8],k=e[9],L=e[10],M=e[11],N=e[12],A=e[13],R=e[14],I=e[15];return Math.abs(n-m)<=O*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-x)<=O*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(i-w)<=O*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(o-C)<=O*Math.max(1,Math.abs(o),Math.abs(C))&&Math.abs(a-b)<=O*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(s-E)<=O*Math.max(1,Math.abs(s),Math.abs(E))&&Math.abs(l-_)<=O*Math.max(1,Math.abs(l),Math.abs(_))&&Math.abs(u-T)<=O*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(c-S)<=O*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(h-k)<=O*Math.max(1,Math.abs(h),Math.abs(k))&&Math.abs(d-L)<=O*Math.max(1,Math.abs(d),Math.abs(L))&&Math.abs(f-M)<=O*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(p-N)<=O*Math.max(1,Math.abs(p),Math.abs(N))&&Math.abs(v-A)<=O*Math.max(1,Math.abs(v),Math.abs(A))&&Math.abs(g-R)<=O*Math.max(1,Math.abs(g),Math.abs(R))&&Math.abs(y-I)<=O*Math.max(1,Math.abs(y),Math.abs(I))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},fromQuat:ot,fromQuat2:function(t,e){var n=new I(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(s*a+c*r+l*o-u*i)/h,n[1]=2*(l*a+c*i+u*r-s*o)/h,n[2]=2*(u*a+c*o+s*i-l*r)/h):(n[0]=2*(s*a+c*r+l*o-u*i),n[1]=2*(l*a+c*i+u*r-s*o),n[2]=2*(u*a+c*o+s*i-l*r)),tt(t,e,n),t},fromRotation:Z,fromRotationTranslation:tt,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],l=i+i,u=o+o,c=a+a,h=i*l,d=i*u,f=i*c,p=o*u,v=o*c,g=a*c,y=s*l,m=s*u,x=s*c,w=r[0],C=r[1],b=r[2];return t[0]=(1-(p+g))*w,t[1]=(d+x)*w,t[2]=(f-m)*w,t[3]=0,t[4]=(d-x)*C,t[5]=(1-(h+g))*C,t[6]=(v+y)*C,t[7]=0,t[8]=(f+m)*b,t[9]=(v-y)*b,t[10]=(1-(h+p))*b,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:it,fromScaling:$,fromTranslation:Y,fromValues:function(t,e,n,r,i,o,a,s,l,u,c,h,d,f,p,v){var g=new I(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=s,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=d,g[13]=f,g[14]=p,g[15]=v,g},fromXRotation:K,fromYRotation:Q,fromZRotation:J,frustum:function(t,e,n,r,i,o,a){var s=1/(n-e),l=1/(i-r),u=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t},getRotation:rt,getScaling:nt,getTranslation:et,identity:z,invert:W,lookAt:ht,mul:ft,multiply:U,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:ut,orthoNO:lt,orthoZO:ct,perspective:st,perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(a-s)*l*.5,t[9]=(i-o)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},perspectiveNO:at,perspectiveZO:function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t},rotate:function(t,e,n,r){var i,o,a,s,l,u,c,h,d,f,p,v,g,y,m,x,w,C,b,E,_,T,S,k,L=r[0],M=r[1],N=r[2],A=Math.hypot(L,M,N);return A<O?null:(L*=A=1/A,M*=A,N*=A,i=Math.sin(n),a=1-(o=Math.cos(n)),s=e[0],l=e[1],u=e[2],c=e[3],h=e[4],d=e[5],f=e[6],p=e[7],v=e[8],g=e[9],y=e[10],m=e[11],x=L*L*a+o,w=M*L*a+N*i,C=N*L*a-M*i,b=L*M*a-N*i,E=M*M*a+o,_=N*M*a+L*i,T=L*N*a+M*i,S=M*N*a-L*i,k=N*N*a+o,t[0]=s*x+h*w+v*C,t[1]=l*x+d*w+g*C,t[2]=u*x+f*w+y*C,t[3]=c*x+p*w+m*C,t[4]=s*b+h*E+v*_,t[5]=l*b+d*E+g*_,t[6]=u*b+f*E+y*_,t[7]=c*b+p*E+m*_,t[8]=s*T+h*S+v*k,t[9]=l*T+d*S+g*k,t[10]=u*T+f*S+y*k,t[11]=c*T+p*S+m*k,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:X,rotateY:q,rotateZ:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],h=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+u*r,t[1]=a*i+c*r,t[2]=s*i+h*r,t[3]=l*i+d*r,t[4]=u*i-o*r,t[5]=c*i-a*r,t[6]=h*i-s*r,t[7]=d*i-l*r,t},scale:function(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},set:H,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:pt,subtract:dt,targetTo:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],l=r[1],u=r[2],c=i-n[0],h=o-n[1],d=a-n[2],f=c*c+h*h+d*d;f>0&&(c*=f=1/Math.sqrt(f),h*=f,d*=f);var p=l*d-u*h,v=u*c-s*d,g=s*h-l*c;return(f=p*p+v*v+g*g)>0&&(p*=f=1/Math.sqrt(f),v*=f,g*=f),t[0]=p,t[1]=v,t[2]=g,t[3]=0,t[4]=h*g-d*v,t[5]=d*p-c*g,t[6]=c*v-h*p,t[7]=0,t[8]=c,t[9]=h,t[10]=d,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},translate:j,transpose:G});function gt(){var t=new I(3);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function yt(t){var e=new I(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function mt(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function xt(t,e,n){var r=new I(3);return r[0]=t,r[1]=e,r[2]=n,r}function wt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ct(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function bt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Et(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function _t(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Tt(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function St(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function kt(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=i*l-o*s,t[1]=o*a-r*l,t[2]=r*s-i*a,t}function Lt(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function Mt(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function Nt(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=O*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=O*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=O*Math.max(1,Math.abs(i),Math.abs(s))}var At=Et,Rt=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)},Ot=mt;function It(){var t=new I(4);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Pt(t,e,n,r){var i=new I(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function Bt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function Dt(){var t=new I(4);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Ft(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Ht(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],l=n[1],u=n[2],c=n[3];return t[0]=r*c+a*s+i*u-o*l,t[1]=i*c+a*l+o*s-r*u,t[2]=o*c+a*u+r*l-i*s,t[3]=a*c-r*s-i*l-o*u,t}function zt(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function Gt(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),l=Math.cos(n),u=Math.sin(r),c=Math.cos(r);return t[0]=o*l*c-a*s*u,t[1]=a*s*c+o*l*u,t[2]=a*l*u-o*s*c,t[3]=a*l*c+o*s*u,t}gt(),function(){var t=It()}();var Wt=Pt,Vt=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},Ut=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t},jt=Ht,Xt=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};function qt(){var t=new I(2);return I!=Float32Array&&(t[0]=0,t[1]=0),t}gt(),xt(1,0,0),xt(0,1,0),Dt(),Dt(),P(),function(){var t=qt()}();var Yt=function(t){return"function"==typeof t},$t=function(t){return null==t},Zt={}.toString,Kt=function(t,e){return Zt.call(t)==="[object "+e+"]"},Qt=function(t){return Array.isArray?Array.isArray(t):Kt(t,"Array")},Jt=function(t){if(Qt(t))return t.reduce((function(t,e){return Math.max(t,e)}),t[0])},te=function(t){if(Qt(t))return t.reduce((function(t,e){return Math.min(t,e)}),t[0])},ee=function(t){return Kt(t,"String")},ne=function(t,e,n){return t<e?e:t>n?n:t},re=function(t){return Kt(t,"Number")},ie=1e-5;function oe(t,e,n){return void 0===n&&(n=ie),Math.abs(t-e)<n}var ae=function(t,e){return(t%e+e)%e},se=function(t){return Kt(t,"Boolean")},le=function(t){return void 0===t},ue={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function ce(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}var he={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function de(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return he[e]===t.length-1&&"achlmqstvz".includes(e)}))}function fe(t){return de(t)&&t.every((function(t){var e=t[0];return e===e.toUpperCase()}))}function pe(t){return fe(t)&&t.every((function(t){var e=t[0];return"ACLMQZ".includes(e)}))}function ve(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=he[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,he[n]))),he[n]););}function ge(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);return 48===r?(t.param=0,void(t.index+=1)):49===r?(t.param=1,void(t.index+=1)):void(t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e)}function ye(t){return t>=48&&t<=57||43===t||45===t||46===t}function me(t){return t>=48&&t<=57}function xe(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,s=!1,l=!1,u=!1;if(o>=n)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(43!==(e=r.charCodeAt(o))&&45!==e||(o+=1,e=r.charCodeAt(o)),me(e)||46===e){if(46!==e){if(a=48===e,o+=1,e=r.charCodeAt(o),a&&o<n&&e&&me(e))return void(t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number');for(;o<n&&me(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;me(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(u&&!s&&!l)return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent');if(o+=1,43!==(e=r.charCodeAt(o))&&45!==e||(o+=1),!(o<n&&me(r.charCodeAt(o))))return void(t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent');for(;o<n&&me(r.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(i,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number'}function we(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Ce(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=he[n[r].toLowerCase()];if(t.segmentStart=r,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i))if(t.index+=1,we(t),t.data=[],o){for(;;){for(var a=o;a>0;a-=1){if(97!=(32|i)||3!==a&&4!==a?xe(t):ge(t),t.err.length)return;t.data.push(t.param),we(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,we(t))}if(t.index>=t.max)break;if(!ye(n.charCodeAt(t.index)))break}ve(t)}else ve(t);else t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command'}var be=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function Ee(t){if(fe(t))return[].concat(t);var e=function(t){if(de(t))return[].concat(t);var e=new be(t);for(we(e);e.index<e.max&&!e.err.length;)Ce(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map((function(t){var e,a=t.slice(1).map(Number),s=t[0],l=s.toUpperCase();if("M"===s)return n=a[0],r=a[1],i=n,o=r,["M",n,r];if(s!==l)switch(l){case"A":e=[l,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[l,a[0]+r];break;case"H":e=[l,a[0]+n];break;default:var u=a.map((function(t,e){return t+(e%2?r:n)}));e=[l].concat(u)}else e=[l].concat(a);var c=e.length;switch(l){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[c-2],r=e[c-1],"M"===l&&(i=n,o=r)}return e}))}function _e(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,s=t.slice(1).map(Number),l=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)l=["L",t[1],i];else if("V"===n)l=["L",r,t[1]];else if("S"===n){var u=2*r-o,c=2*i-a;e.x1=u,e.y1=c,l=["C",u,c].concat(s)}else if("T"===n){var h=2*r-e.qx,d=2*i-e.qy;e.qx=h,e.qy=d,l=["Q",h,d].concat(s)}else if("Q"===n){var f=s[0],p=s[1];e.qx=f,e.qy=p}return l}function Te(t){if(pe(t))return[].concat(t);for(var e=Ee(t),n=o({},ue),r=0;r<e.length;r+=1){e[r]=_e(e[r],n);var i=e[r],a=i.length;n.x1=+i[a-2],n.y1=+i[a-1],n.x2=+i[a-4]||n.x1,n.y2=+i[a-3]||n.y1}return e}function Se(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function ke(t,e,n,r,i,o,a,s,l,u){var c,h,d,f,p,v=t,g=e,y=n,m=r,x=s,w=l,C=120*Math.PI/180,b=Math.PI/180*(+i||0),E=[];if(u)h=u[0],d=u[1],f=u[2],p=u[3];else{v=(c=Se(v,g,-b)).x,g=c.y;var _=(v-(x=(c=Se(x,w,-b)).x))/2,T=(g-(w=c.y))/2,S=_*_/(y*y)+T*T/(m*m);S>1&&(y*=S=Math.sqrt(S),m*=S);var k=y*y,L=m*m,M=(o===a?-1:1)*Math.sqrt(Math.abs((k*L-k*T*T-L*_*_)/(k*T*T+L*_*_)));f=M*y*T/m+(v+x)/2,p=M*-m*_/y+(g+w)/2,h=Math.asin(((g-p)/m*Math.pow(10,9)|0)/Math.pow(10,9)),d=Math.asin(((w-p)/m*Math.pow(10,9)|0)/Math.pow(10,9)),h=v<f?Math.PI-h:h,d=x<f?Math.PI-d:d,h<0&&(h=2*Math.PI+h),d<0&&(d=2*Math.PI+d),a&&h>d&&(h-=2*Math.PI),!a&&d>h&&(d-=2*Math.PI)}var N=d-h;if(Math.abs(N)>C){var A=d,R=x,O=w;d=h+C*(a&&d>h?1:-1),E=ke(x=f+y*Math.cos(d),w=p+m*Math.sin(d),y,m,i,0,a,R,O,[d,A,f,p])}N=d-h;var I=Math.cos(h),P=Math.sin(h),B=Math.cos(d),D=Math.sin(d),F=Math.tan(N/4),H=4/3*y*F,z=4/3*m*F,G=[v,g],W=[v+H*P,g-z*I],V=[x+H*D,w-z*B],U=[x,w];if(W[0]=2*G[0]-W[0],W[1]=2*G[1]-W[1],u)return W.concat(V,U,E);for(var j=[],X=0,q=(E=W.concat(V,U,E)).length;X<q;X+=1)j[X]=X%2?Se(E[X-1],E[X],b).y:Se(E[X],E[X+1],b).x;return j}function Le(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}var Me=function(t,e,n,r){return c(c([],Le([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function Ne(t,e){var n,r,i,o,a,s,l,u,c,h=t[0],d=t.slice(1).map(Number),f=d[0],p=d[1],v=e.x1,g=e.y1,y=e.x,m=e.y;switch("TQ".includes(h)||(e.qx=null,e.qy=null),h){case"M":return e.x=f,e.y=p,t;case"A":return n=[v,g].concat(d),["C"].concat(ke(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9]));case"Q":return e.qx=f,e.qy=p,n=[v,g].concat(d),["C"].concat((r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],[(u=1/3)*r+(c=2/3)*o,u*i+c*a,u*s+c*o,u*l+c*a,s,l]));case"L":return["C"].concat(Me(v,g,f,p));case"Z":return v===y&&g===m?["C",v,g,y,m,y,m]:["C"].concat(Me(v,g,y,m))}return t}function Ae(t,e){if(void 0===e&&(e=!1),function(t){return pe(t)&&t.every((function(t){var e=t[0];return"MC".includes(e)}))}(t)){var n=[].concat(t);return e?[n,[]]:n}for(var r,i,a=Te(t),s=o({},ue),l=[],u="",c=a.length,h=[],d=0;d<c;d+=1){a[d]&&(u=a[d][0]),l[d]=u;var f=Ne(a[d],s);a[d]=f,ce(a,l,d),c=a.length,"Z"===u&&h.push(d),i=(r=a[d]).length,s.x1=+r[i-2],s.y1=+r[i-1],s.x2=+r[i-4]||s.x1,s.y2=+r[i-3]||s.y1}return e?[a,h]:a}function Re(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Oe(t,e,n,r,i){var o=Re([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(i<=0)a={x:t,y:e};else if(i>=o)a={x:n,y:r};else{var s=Le([t,e],[n,r],i/o);a={x:s[0],y:s[1]}}return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function Ie(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=n*i+r*o,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(n*o-r*i<0?-1:1)*Math.acos(a/s)}function Pe(t,e,n,r,i,o,a,s,l,u){var c=Math.abs,h=Math.sin,d=Math.cos,f=Math.sqrt,p=Math.PI,v=c(n),g=c(r),y=(i%360+360)%360*(p/180);if(t===s&&e===l)return{x:t,y:e};if(0===v||0===g)return Oe(t,e,s,l,u).point;var m=(t-s)/2,x=(e-l)/2,w={x:d(y)*m+h(y)*x,y:-h(y)*m+d(y)*x},C=Math.pow(w.x,2)/Math.pow(v,2)+Math.pow(w.y,2)/Math.pow(g,2);C>1&&(v*=f(C),g*=f(C));var b=(Math.pow(v,2)*Math.pow(g,2)-Math.pow(v,2)*Math.pow(w.y,2)-Math.pow(g,2)*Math.pow(w.x,2))/(Math.pow(v,2)*Math.pow(w.y,2)+Math.pow(g,2)*Math.pow(w.x,2)),E=(o!==a?1:-1)*f(b=b<0?0:b),_=E*(v*w.y/g),T=E*(-g*w.x/v),S=d(y)*_-h(y)*T+(t+s)/2,k=h(y)*_+d(y)*T+(e+l)/2,L={x:(w.x-_)/v,y:(w.y-T)/g},M=Ie({x:1,y:0},L),N=Ie(L,{x:(-w.x-_)/v,y:(-w.y-T)/g});!a&&N>0?N-=2*p:a&&N<0&&(N+=2*p);var A=M+(N%=2*p)*u,R=v*d(A),O=g*h(A);return{x:d(y)*R-h(y)*O+S,y:h(y)*R+d(y)*O+k}}function Be(t,e,n,r,i,o,a,s,l,u,c){var h,d=c.bbox,f=void 0===d||d,p=c.length,v=void 0===p||p,g=c.sampleSize,y=void 0===g?30:g,m="number"==typeof u,x=t,w=e,C=0,b=[x,w,C],E=[x,w],_={x:0,y:0},T=[{x:x,y:w}];m&&u<=0&&(_={x:x,y:w});for(var S=0;S<=y;S+=1){if(x=(h=Pe(t,e,n,r,i,o,a,s,l,S/y)).x,w=h.y,f&&T.push({x:x,y:w}),v&&(C+=Re(E,[x,w])),E=[x,w],m&&C>=u&&u>b[2]){var k=(C-u)/(C-b[2]);_={x:E[0]*(1-k)+b[0]*k,y:E[1]*(1-k)+b[1]*k}}b=[x,w,C]}return m&&u>=C&&(_={x:s,y:l}),{length:C,point:_,min:{x:Math.min.apply(null,T.map((function(t){return t.x}))),y:Math.min.apply(null,T.map((function(t){return t.y})))},max:{x:Math.max.apply(null,T.map((function(t){return t.x}))),y:Math.max.apply(null,T.map((function(t){return t.y})))}}}function De(t,e,n,r,i,o,a,s,l){var u=1-l;return{x:Math.pow(u,3)*t+3*Math.pow(u,2)*l*n+3*u*Math.pow(l,2)*i+Math.pow(l,3)*a,y:Math.pow(u,3)*e+3*Math.pow(u,2)*l*r+3*u*Math.pow(l,2)*o+Math.pow(l,3)*s}}function Fe(t,e,n,r,i,o,a,s,l,u){var c,h=u.bbox,d=void 0===h||h,f=u.length,p=void 0===f||f,v=u.sampleSize,g=void 0===v?10:v,y="number"==typeof l,m=t,x=e,w=0,C=[m,x,w],b=[m,x],E={x:0,y:0},_=[{x:m,y:x}];y&&l<=0&&(E={x:m,y:x});for(var T=0;T<=g;T+=1){if(m=(c=De(t,e,n,r,i,o,a,s,T/g)).x,x=c.y,d&&_.push({x:m,y:x}),p&&(w+=Re(b,[m,x])),b=[m,x],y&&w>=l&&l>C[2]){var S=(w-l)/(w-C[2]);E={x:b[0]*(1-S)+C[0]*S,y:b[1]*(1-S)+C[1]*S}}C=[m,x,w]}return y&&l>=w&&(E={x:a,y:s}),{length:w,point:E,min:{x:Math.min.apply(null,_.map((function(t){return t.x}))),y:Math.min.apply(null,_.map((function(t){return t.y})))},max:{x:Math.max.apply(null,_.map((function(t){return t.x}))),y:Math.max.apply(null,_.map((function(t){return t.y})))}}}function He(t,e,n,r,i,o,a){var s=1-a;return{x:Math.pow(s,2)*t+2*s*a*n+Math.pow(a,2)*i,y:Math.pow(s,2)*e+2*s*a*r+Math.pow(a,2)*o}}function ze(t,e,n,r,i,o,a,s){var l,u=s.bbox,c=void 0===u||u,h=s.length,d=void 0===h||h,f=s.sampleSize,p=void 0===f?10:f,v="number"==typeof a,g=t,y=e,m=0,x=[g,y,m],w=[g,y],C={x:0,y:0},b=[{x:g,y:y}];v&&a<=0&&(C={x:g,y:y});for(var E=0;E<=p;E+=1){if(g=(l=He(t,e,n,r,i,o,E/p)).x,y=l.y,c&&b.push({x:g,y:y}),d&&(m+=Re(w,[g,y])),w=[g,y],v&&m>=a&&a>x[2]){var _=(m-a)/(m-x[2]);C={x:w[0]*(1-_)+x[0]*_,y:w[1]*(1-_)+x[1]*_}}x=[g,y,m]}return v&&a>=m&&(C={x:i,y:o}),{length:m,point:C,min:{x:Math.min.apply(null,b.map((function(t){return t.x}))),y:Math.min.apply(null,b.map((function(t){return t.y})))},max:{x:Math.max.apply(null,b.map((function(t){return t.x}))),y:Math.max.apply(null,b.map((function(t){return t.y})))}}}function Ge(t,e,n){for(var r,i,o,a,s,l,u,c,h,d=Te(t),f="number"==typeof e,p=[],v=0,g=0,y=0,m=0,x=[],w=[],C=0,b={x:0,y:0},E=b,_=b,T=b,S=0,k=0,L=d.length;k<L;k+=1)p=(u="M"===(c=(h=d[k])[0]))?p:[v,g].concat(h.slice(1)),u?(E=b={x:y=h[1],y:m=h[2]},C=0,f&&e<.001&&(T=b)):"L"===c?(C=(r=Oe(p[0],p[1],p[2],p[3],(e||0)-S)).length,b=r.min,E=r.max,_=r.point):"A"===c?(C=(i=Be(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],(e||0)-S,n||{})).length,b=i.min,E=i.max,_=i.point):"C"===c?(C=(o=Fe(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],(e||0)-S,n||{})).length,b=o.min,E=o.max,_=o.point):"Q"===c?(C=(a=ze(p[0],p[1],p[2],p[3],p[4],p[5],(e||0)-S,n||{})).length,b=a.min,E=a.max,_=a.point):"Z"===c&&(C=(s=Oe((p=[v,g,y,m])[0],p[1],p[2],p[3],(e||0)-S)).length,b=s.min,E=s.max,_=s.point),f&&S<e&&S+C>=e&&(T=_),w.push(E),x.push(b),S+=C,v=(l="Z"!==c?h.slice(-2):[y,m])[0],g=l[1];return f&&e>=S&&(T={x:v,y:g}),{length:S,point:T,min:{x:Math.min.apply(null,x.map((function(t){return t.x}))),y:Math.min.apply(null,x.map((function(t){return t.y})))},max:{x:Math.max.apply(null,w.map((function(t){return t.x}))),y:Math.max.apply(null,w.map((function(t){return t.y})))}}}function We(t){return function(t){var e=0,n=0,r=0;return Ae(t).map((function(t){var i;if("M"===t[0])return e=t[1],n=t[2],0;var o=t.slice(1),a=o[0],s=o[1],l=o[2],u=o[3],c=o[4],h=o[5];return r=function(t,e,n,r,i,o,a,s){return 3*((s-e)*(n+i)-(a-t)*(r+o)+r*(t-i)-n*(e-o)+s*(i+t/3)-a*(o+e/3))/20}(e,n,a,s,l,u,c,h),i=t.slice(-2),e=i[0],n=i[1],r})).reduce((function(t,e){return t+e}),0)}(t)>=0}function Ve(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?Fe(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],{bbox:!1}).length:0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),o=t.slice(6,8),a=Le(n,r,e),s=Le(r,i,e),l=Le(i,o,e),u=Le(a,s,e),c=Le(s,l,e),h=Le(u,c,e);return[["C"].concat(a,u,h),["C"].concat(c,l,o)]}(r):[t,t]:[t],l:i}}))}function Ue(t,e,n){var r=Ve(t),i=Ve(e),o=r.length,a=i.length,s=r.filter((function(t){return t.l})).length,l=i.filter((function(t){return t.l})).length,u=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,c=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/l||0,h=n||Math.max(o,a),d=[u,c],f=[h-o,h-a],p=0,v=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return p=n&&f[e]&&t.l>=d[e],f[e]-=p?1:0,p?t.ss:[t.s]})).flat()}));return v[0].length===v[1].length?v:Ue(v[0],v[1],h)}function je(){return je="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=b(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},je.apply(null,arguments)}function Xe(t,e,n,r){var i=je(b(t.prototype),e,n);return"function"==typeof i?function(t){return i.apply(n,t)}:i}function qe(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function Ye(t,e){var n=Math.min.apply(Math,c([],u(t),!1)),r=Math.min.apply(Math,c([],u(e),!1));return{x:n,y:r,width:Math.max.apply(Math,c([],u(t),!1))-n,height:Math.max.apply(Math,c([],u(e),!1))-r}}function $e(t,e,n,r,i,o){return n*Math.cos(i)*Math.cos(o)-r*Math.sin(i)*Math.sin(o)+t}function Ze(t,e,n,r,i,o){return n*Math.sin(i)*Math.cos(o)+r*Math.cos(i)*Math.sin(o)+e}function Ke(t,e,n,r,i,o,a){for(var s=function(t,e,n){return Math.atan(-e/t*Math.tan(n))}(n,r,i),l=1/0,u=-1/0,c=[o,a],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var d=s+h;o<a?o<d&&d<a&&c.push(d):a<d&&d<o&&c.push(d)}for(h=0;h<c.length;h++){var f=$e(t,0,n,r,i,c[h]);f<l&&(l=f),f>u&&(u=f)}var p=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,r,i),v=1/0,g=-1/0,y=[o,a];for(h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var m=p+h;o<a?o<m&&m<a&&y.push(m):a<m&&m<o&&y.push(m)}for(h=0;h<y.length;h++){var x=Ze(0,e,n,r,i,y[h]);x<v&&(v=x),x>g&&(g=x)}return{x:l,y:v,width:u-l,height:g-v}}function Qe(t,e,n,r){return qe(t,e,n,r)}function Je(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function tn(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function en(t,e,n,r){var i,o,a,s=-3*t+9*e-9*n+3*r,l=6*t-12*e+6*n,u=3*e-3*t,c=[];if(oe(s,0))oe(l,0)||(i=-u/l)>=0&&i<=1&&c.push(i);else{var h=l*l-4*s*u;oe(h,0)?c.push(-l/(2*s)):h>0&&(o=(-l-(a=Math.sqrt(h)))/(2*s),(i=(-l+a)/(2*s))>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}function nn(t,e,n,r,i,o,a,s){for(var l=[t,a],u=[e,s],c=en(t,n,i,a),h=en(e,r,o,s),d=0;d<c.length;d++)l.push(tn(t,n,i,a,c[d]));for(d=0;d<h.length;d++)u.push(tn(e,r,o,s,h[d]));return Ye(l,u)}function rn(t){return function(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=qe(r[0],r[1],i[0],i[1])}return e}(t)}function on(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function an(t,e,n){var r=t+n-2*e;if(oe(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}function sn(t,e,n,r,i,o){var a=an(t,n,i)[0],s=an(e,r,o)[0],l=[t,i],u=[e,o];return void 0!==a&&l.push(on(t,n,i,a)),void 0!==s&&u.push(on(e,r,o,s)),Ye(l,u)}function ln(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=w(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function un(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.includes(n)||{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}
/*!
* @antv/g-lite
* @description A core module for rendering engine implements DOM API.
* @version 2.2.16
* @date 1/23/2025, 8:31:51 AM
* @author AntVis
* @docs https://g.antv.antgroup.com/
*/"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;!function(t,e){t.exports=function(){function t(t,n,i,o,a){e(t,n,i||0,o||t.length-1,a||r)}function e(t,r,i,o,a){for(;o>i;){if(o-i>600){var s=o-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);e(t,r,Math.max(i,Math.floor(r-l*c/s+h)),Math.min(o,Math.floor(r+(s-l)*c/s+h)),a)}var d=t[r],f=i,p=o;for(n(t,i,r),a(t[o],d)>0&&n(t,i,o);f<p;){for(n(t,f,p),f++,p--;a(t[f],d)<0;)f++;for(;a(t[p],d)>0;)p--}0===a(t[i],d)?n(t,i,p):n(t,++p,o),p<=r&&(i=p+1),r<=p&&(o=p-1)}}function n(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function r(t,e){return t<e?-1:t>e?1:0}var i=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function a(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=y(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var a=t.children[o];l(i,t.leaf?r(a):a)}return i}function l(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function u(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function f(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function p(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function v(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function m(e,n,r,i,o){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=i)){var s=n+Math.ceil((r-n)/i/2)*i;t(e,s,n,r,o),a.push(n,s,s,r)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,n=[];if(!g(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],s=e.leaf?r(a):a;g(t,s)&&(e.leaf?n.push(a):v(t,s)?this._all(a,n):i.push(a))}e=i.pop()}return n},i.prototype.collides=function(t){var e=this.data;if(!g(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(g(t,o)){if(e.leaf||v(t,o))return!0;n.push(i)}}e=n.pop()}return!1},i.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},i.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},i.prototype.clear=functio