UNPKG

@visactor/vdataset

Version:

data processing tool

1 lines 138 kB
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).VDataset={})}(this,(function(t){"use strict";var n=Math.PI/3,r=[0,n,2*n,3*n,4*n,5*n];function e(t){return t[0]}function i(t){return t[1]}function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function a(t){if(t.__esModule)return t;var n=t.default;if("function"==typeof n){var r=function t(){if(this instanceof t){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(n,r))}return n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(n){var e=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,e.get?e:{enumerable:!0,get:function(){return t[n]}})})),r}var s={exports:{}};!function(t){var n=Object.prototype.hasOwnProperty,r="~";function e(){}function i(t,n,r){this.fn=t,this.context=n,this.once=r||!1}function o(t,n,e,o,a){if("function"!=typeof e)throw new TypeError("The listener must be a function");var s=new i(e,o||t,a),u=r?r+n:n;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function a(t,n){0==--t._eventsCount?t._events=new e:delete t._events[n]}function s(){this._events=new e,this._eventsCount=0}Object.create&&(e.prototype=Object.create(null),(new e).__proto__||(r=!1)),s.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var n=r?r+t:t,e=this._events[n];if(!e)return[];if(e.fn)return[e.fn];for(var i=0,o=e.length,a=new Array(o);i<o;i++)a[i]=e[i].fn;return a},s.prototype.listenerCount=function(t){var n=r?r+t:t,e=this._events[n];return e?e.fn?1:e.length:0},s.prototype.emit=function(t,n,e,i,o,a){var s=r?r+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,n),!0;case 3:return c.fn.call(c.context,n,e),!0;case 4:return c.fn.call(c.context,n,e,i),!0;case 5:return c.fn.call(c.context,n,e,i,o),!0;case 6:return c.fn.call(c.context,n,e,i,o,a),!0}for(l=1,u=new Array(f-1);l<f;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var h,p=c.length;for(l=0;l<p;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),f){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,n);break;case 3:c[l].fn.call(c[l].context,n,e);break;case 4:c[l].fn.call(c[l].context,n,e,i);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(t,n,r){return o(this,t,n,r,!1)},s.prototype.once=function(t,n,r){return o(this,t,n,r,!0)},s.prototype.removeListener=function(t,n,e,i){var o=r?r+t:t;if(!this._events[o])return this;if(!n)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==n||i&&!s.once||e&&s.context!==e||a(this,o);else{for(var u=0,l=[],c=s.length;u<c;u++)(s[u].fn!==n||i&&!s[u].once||e&&s[u].context!==e)&&l.push(s[u]);l.length?this._events[o]=1===l.length?l[0]:l:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var n;return t?(n=r?r+t:t,this._events[n]&&a(this,n)):(this._events=new e,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,t.exports=s}(s);var u=o(s.exports);var l=(t,n)=>Object.prototype.toString.call(t)===`[object ${n}]`;var c=function(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"boolean"==typeof t:!0===t||!1===t||l(t,"Boolean")};var f=t=>"function"==typeof t;var h=t=>null==t;var p=t=>null!=t;var g=t=>{const n=typeof t;return null!==t&&"object"===n||"function"===n};var d=t=>"object"==typeof t&&null!==t;var v=function(t){if(!d(t)||!l(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n};var y=function(t){const n=typeof t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"string"===n:"string"===n||l(t,"String")};var m=t=>Array.isArray?Array.isArray(t):l(t,"Array");var w=function(t){return null!==t&&"function"!=typeof t&&Number.isFinite(t.length)};var b=t=>l(t,"Date");var M=function(t){const n=typeof t;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?"number"===n:"number"===n||l(t,"Number")};var x=t=>M(t)&&Number.isFinite(t);function E(t,n,r){let e;if(!p(t)||"object"!=typeof t||n&&n(t))return t;const i=m(t),o=t.length;e=i?new Array(o):"object"==typeof t?{}:c(t)||M(t)||y(t)?t:b(t)?new Date(+t):void 0;const a=i?void 0:Object.keys(Object(t));let s=-1;if(e)for(;++s<(a||t).length;){const i=a?a[s]:s,o=t[i];r&&r.includes(i.toString())?e[i]=o:e[i]=E(o,n,r)}return e}function S(t,n){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(n){if(t===n)return;if(p(n)&&"object"==typeof n){const i=Object(n),o=[];for(const t in i)o.push(t);let{length:a}=o,s=-1;for(;a--;){const a=o[++s];!p(i[a])||"object"!=typeof i[a]||e&&m(t[a])?P(t,a,i[a]):_(t,n,a,r,e)}}}}function _(t,n,r){let e=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=t[r],a=n[r];let s=n[r],u=!0;if(m(a)){if(e)s=[];else if(m(o))s=o;else if(w(o)){s=new Array(o.length);let t=-1;const n=o.length;for(;++t<n;)s[t]=o[t]}}else v(a)?(s=null!=o?o:{},"function"!=typeof o&&"object"==typeof o||(s={})):u=!1;u&&S(s,a,e,i),P(t,r,s)}function P(t,n,r){(void 0!==r&&!function(t,n){return t===n||Number.isNaN(t)&&Number.isNaN(n)}(t[n],r)||void 0===r&&!(n in t))&&(t[n]=r)}function k(t){let n=-1;const r=arguments.length<=1?0:arguments.length-1;for(;++n<r;)S(t,n+1<1||arguments.length<=n+1?void 0:arguments[n+1],!0);return t}function A(t){return Object.prototype.toString.call(t)}function F(t){return Object.keys(t)}function C(t,n,r){if(t===n)return!0;if(typeof t!=typeof n)return!1;if(null==t||null==n)return!1;if(Number.isNaN(t)&&Number.isNaN(n))return!0;if(A(t)!==A(n))return!1;if(f(t))return!!(null==r?void 0:r.skipFunction);if("object"!=typeof t)return!1;if(m(t)){if(t.length!==n.length)return!1;for(let e=t.length-1;e>=0;e--)if(!C(t[e],n[e],r))return!1;return!0}if(!v(t))return!1;const e=F(t),i=F(n);if(e.length!==i.length)return!1;e.sort(),i.sort();for(let t=e.length-1;t>=0;t--)if(e[t]!=i[t])return!1;for(let i=e.length-1;i>=0;i--){const o=e[i];if(!C(t[o],n[o],r))return!1}return!0}function D(t){return t&&m(t)?Array.from(new Set(function(t){return p(t)?m(t)?t:[t]:[]}(t))):t}function N(t){if(!m(t))return[t];const n=[];for(const r of t)n.push(...N(r));return n}const L="undefined"!=typeof console;function O(t,n,r){const e=[n].concat([].slice.call(r));L&&console[t].apply(console,e)}var j;!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Info=3]="Info",t[t.Debug=4]="Debug"}(j||(j={}));class V{static getInstance(t,n){return V._instance&&M(t)?V._instance.level(t):V._instance||(V._instance=new V(t,n)),V._instance}static setInstance(t){return V._instance=t}static setInstanceLevel(t){V._instance?V._instance.level(t):V._instance=new V(t)}static clearInstance(){V._instance=null}constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j.None,n=arguments.length>1?arguments[1]:void 0;this._onErrorHandler=[],this._level=t,this._method=n}addErrorHandler(t){this._onErrorHandler.find((n=>n===t))||this._onErrorHandler.push(t)}removeErrorHandler(t){const n=this._onErrorHandler.findIndex((n=>n===t));n<0||this._onErrorHandler.splice(n,1)}callErrorHandler(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];this._onErrorHandler.forEach((t=>t(...n)))}canLogInfo(){return this._level>=j.Info}canLogDebug(){return this._level>=j.Debug}canLogError(){return this._level>=j.Error}canLogWarn(){return this._level>=j.Warn}level(t){return arguments.length?(this._level=+t,this):this._level}error(){for(var t,n=arguments.length,r=new Array(n),e=0;e<n;e++)r[e]=arguments[e];return this._level>=j.Error&&(this._onErrorHandler.length?this.callErrorHandler(...r):O(null!==(t=this._method)&&void 0!==t?t:"error","ERROR",r)),this}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._level>=j.Warn&&O(this._method||"warn","WARN",n),this}info(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._level>=j.Info&&O(this._method||"log","INFO",n),this}debug(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._level>=j.Debug&&O(this._method||"log","DEBUG",n),this}}V._instance=null;var T=function(t,n,r){return t<n?n:t>r?r:t};class R{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;this.a=t,this.b=n,this.c=r,this.d=e,this.e=i,this.f=o}equalToMatrix(t){return!(this.e!==t.e||this.f!==t.f||this.a!==t.a||this.d!==t.d||this.b!==t.b||this.c!==t.c)}equalTo(t,n,r,e,i,o){return!(this.e!==i||this.f!==o||this.a!==t||this.d!==e||this.b!==n||this.c!==r)}setValue(t,n,r,e,i,o){return this.a=t,this.b=n,this.c=r,this.d=e,this.e=i,this.f=o,this}reset(){return this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0,this}getInverse(){const t=this.a,n=this.b,r=this.c,e=this.d,i=this.e,o=this.f,a=new R,s=t*e-n*r;return a.a=e/s,a.b=-n/s,a.c=-r/s,a.d=t/s,a.e=(r*o-e*i)/s,a.f=-(t*o-n*i)/s,a}rotate(t){const n=Math.cos(t),r=Math.sin(t),e=this.a*n+this.c*r,i=this.b*n+this.d*r,o=this.a*-r+this.c*n,a=this.b*-r+this.d*n;return this.a=e,this.b=i,this.c=o,this.d=a,this}rotateByCenter(t,n,r){const e=Math.cos(t),i=Math.sin(t),o=(1-e)*n+i*r,a=(1-e)*r-i*n,s=e*this.a-i*this.b,u=i*this.a+e*this.b,l=e*this.c-i*this.d,c=i*this.c+e*this.d,f=e*this.e-i*this.f+o,h=i*this.e+e*this.f+a;return this.a=s,this.b=u,this.c=l,this.d=c,this.e=f,this.f=h,this}scale(t,n){return this.a*=t,this.b*=t,this.c*=n,this.d*=n,this}setScale(t,n){return this.b=this.b/this.a*t,this.c=this.c/this.d*n,this.a=t,this.d=n,this}transform(t,n,r,e,i,o){return this.multiply(t,n,r,e,i,o),this}translate(t,n){return this.e+=this.a*t+this.c*n,this.f+=this.b*t+this.d*n,this}transpose(){const{a:t,b:n,c:r,d:e,e:i,f:o}=this;return this.a=n,this.b=t,this.c=e,this.d=r,this.e=o,this.f=i,this}multiply(t,n,r,e,i,o){const a=this.a,s=this.b,u=this.c,l=this.d,c=a*t+u*n,f=s*t+l*n,h=a*r+u*e,p=s*r+l*e,g=a*i+u*o+this.e,d=s*i+l*o+this.f;return this.a=c,this.b=f,this.c=h,this.d=p,this.e=g,this.f=d,this}interpolate(t,n){const r=new R;return r.a=this.a+(t.a-this.a)*n,r.b=this.b+(t.b-this.b)*n,r.c=this.c+(t.c-this.c)*n,r.d=this.d+(t.d-this.d)*n,r.e=this.e+(t.e-this.e)*n,r.f=this.f+(t.f-this.f)*n,r}transformPoint(t,n){const{a:r,b:e,c:i,d:o,e:a,f:s}=this,u=r*o-e*i,l=o/u,c=-e/u,f=-i/u,h=r/u,p=(i*s-o*a)/u,g=-(r*s-e*a)/u,{x:d,y:v}=t;n.x=d*l+v*f+p,n.y=d*c+v*h+g}onlyTranslate(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.a===t&&0===this.b&&0===this.c&&this.d===t}clone(){return new R(this.a,this.b,this.c,this.d,this.e,this.f)}toTransformAttrs(){const t=this.a,n=this.b,r=this.c,e=this.d,i=t*e-n*r,o={x:this.e,y:this.f,rotateDeg:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!==t||0!==n){const a=Math.sqrt(t*t+n*n);o.rotateDeg=n>0?Math.acos(t/a):-Math.acos(t/a),o.scaleX=a,o.scaleY=i/a,o.skewX=(t*r+n*e)/i,o.skewY=0}else if(0!==r||0!==e){const a=Math.sqrt(r*r+e*e);o.rotateDeg=Math.PI/2-(e>0?Math.acos(-r/a):-Math.acos(r/a)),o.scaleX=i/a,o.scaleY=a,o.skewX=0,o.skewY=(t*r+n*e)/i}return o.rotateDeg=180*o.rotateDeg/Math.PI,o}}function q(t,n,r){n/=100,r/=100;const e=(1-Math.abs(2*r-1))*n,i=e*(1-Math.abs(t/60%2-1)),o=r-e/2;let a=0,s=0,u=0;return 0<=t&&t<60?(a=e,s=i,u=0):60<=t&&t<120?(a=i,s=e,u=0):120<=t&&t<180?(a=0,s=e,u=i):180<=t&&t<240?(a=0,s=i,u=e):240<=t&&t<300?(a=i,s=0,u=e):300<=t&&t<360&&(a=e,s=0,u=i),a=Math.round(255*(a+o)),s=Math.round(255*(s+o)),u=Math.round(255*(u+o)),{r:a,g:s,b:u}}function B(t,n,r){t/=255,n/=255,r/=255;const e=Math.min(t,n,r),i=Math.max(t,n,r),o=i-e;let a=0,s=0,u=0;return a=0===o?0:i===t?(n-r)/o%6:i===n?(r-t)/o+2:(t-n)/o+4,a=Math.round(60*a),a<0&&(a+=360),u=(i+e)/2,s=0===o?0:o/(1-Math.abs(2*u-1)),s=+(100*s).toFixed(1),u=+(100*u).toFixed(1),{h:a,s:s,l:u}}const G=/^#([0-9a-f]{3,8})$/,I={transparent:4294967040},H={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function $(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function z(t){return M(t)?new Y(t>>16,t>>8&255,255&t,1):m(t)?new Y(t[0],t[1],t[2]):new Y(255,255,255)}function U(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function W(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}const J=(t,n)=>{const r=G.exec(t);if(n||r){const t=parseInt(r[1],16),n=r[1].length;return 3===n?new Y((t>>8&15)+((t>>8&15)<<4),(t>>4&15)+((t>>4&15)<<4),(15&t)+((15&t)<<4),1):6===n?z(t):8===n?new Y(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):null}};class X{static Brighter(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===n?t:new X(t).brighter(n).toRGBA()}static SetOpacity(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===n?t:new X(t).setOpacity(n).toRGBA()}static getColorBrightness(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hsl";const r=t instanceof X?t:new X(t);switch(n){case"hsv":default:return r.getHSVBrightness();case"hsl":return r.getHSLBrightness();case"lum":return r.getLuminance();case"lum2":return r.getLuminance2();case"lum3":return r.getLuminance3();case"wcag":return r.getLuminanceWCAG()}}static parseColorString(t){if(p(I[t]))return function(t){return M(t)?new Y(t>>>24,t>>>16&255,t>>>8&255,255&t):m(t)?new Y(t[0],t[1],t[2],t[3]):new Y(255,255,255,1)}(I[t]);if(p(H[t]))return z(H[t]);const n=`${t}`.trim().toLowerCase(),r=J(n);if(void 0!==r)return r;if(/^(rgb|RGB|rgba|RGBA)/.test(n)){const t=n.replace(/(?:\(|\)|rgba|RGBA|rgb|RGB)*/g,"").split(",");return new Y(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),parseFloat(t[3]))}if(/^(hsl|HSL|hsla|HSLA)/.test(n)){const t=n.replace(/(?:\(|\)|hsla|HSLA|hsl|HSL)*/g,"").split(","),r=q(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10));return new Y(r.r,r.g,r.b,parseFloat(t[3]))}}constructor(t){const n=X.parseColorString(t);n?this.color=n:(console.warn(`Warn: 传入${t}无法解析为Color`),this.color=new Y(255,255,255))}toRGBA(){return this.color.formatRgb()}toString(){return this.color.formatRgb()}toHex(){return this.color.formatHex()}toHsl(){return this.color.formatHsl()}brighter(t){const{r:n,g:r,b:e}=this.color;return this.color.r=Math.max(0,Math.min(255,Math.floor(n*t))),this.color.g=Math.max(0,Math.min(255,Math.floor(r*t))),this.color.b=Math.max(0,Math.min(255,Math.floor(e*t))),this}add(t){const{r:n,g:r,b:e}=this.color;return this.color.r+=Math.min(255,n+t.color.r),this.color.g+=Math.min(255,r+t.color.g),this.color.b+=Math.min(255,e+t.color.b),this}sub(t){return this.color.r=Math.max(0,this.color.r-t.color.r),this.color.g=Math.max(0,this.color.g-t.color.g),this.color.b=Math.max(0,this.color.b-t.color.b),this}multiply(t){const{r:n,g:r,b:e}=this.color;return this.color.r=Math.max(0,Math.min(255,Math.floor(n*t.color.r))),this.color.g=Math.max(0,Math.min(255,Math.floor(r*t.color.g))),this.color.b=Math.max(0,Math.min(255,Math.floor(e*t.color.b))),this}getHSVBrightness(){return Math.max(this.color.r,this.color.g,this.color.b)/255}getHSLBrightness(){return.5*(Math.max(this.color.r,this.color.g,this.color.b)/255+Math.min(this.color.r,this.color.g,this.color.b)/255)}setHsl(t,n,r){const e=this.color.opacity,i=B(this.color.r,this.color.g,this.color.b),o=q(h(t)?i.h:T(t,0,360),h(n)?i.s:n>=0&&n<=1?100*n:n,h(r)?i.l:r<=1&&r>=0?100*r:r);return this.color=new Y(o.r,o.g,o.b,e),this}setRGB(t,n,r){return!h(t)&&(this.color.r=t),!h(n)&&(this.color.g=n),!h(r)&&(this.color.b=r),this}setHex(t){const n=`${t}`.trim().toLowerCase(),r=J(n,!0);return null!=r?r:this}setColorName(t){const n=H[t.toLowerCase()];return void 0!==n?this.setHex(n):console.warn("THREE.Color: Unknown color "+t),this}setScalar(t){return this.color.r=t,this.color.g=t,this.color.b=t,this}setOpacity(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.color.opacity=t,this}getLuminance(){return(.2126*this.color.r+.7152*this.color.g+.0722*this.color.b)/255}getLuminance2(){return(.2627*this.color.r+.678*this.color.g+.0593*this.color.b)/255}getLuminance3(){return(.299*this.color.r+.587*this.color.g+.114*this.color.b)/255}getLuminanceWCAG(){const t=this.color.r/255,n=this.color.g/255,r=this.color.b/255;let e,i,o;return e=t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4),i=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4),o=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4),.2126*e+.7152*i+.0722*o}clone(){return new X(this.color.toString())}copyGammaToLinear(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return this.color.r=Math.pow(t.color.r,n),this.color.g=Math.pow(t.color.g,n),this.color.b=Math.pow(t.color.b,n),this}copyLinearToGamma(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;const r=n>0?1/n:1;return this.color.r=Math.pow(t.color.r,r),this.color.g=Math.pow(t.color.g,r),this.color.b=Math.pow(t.color.b,r),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.color.r=U(t.color.r),this.color.g=U(t.color.g),this.color.b=U(t.color.b),this}copyLinearToSRGB(t){return this.color.r=W(t.color.r),this.color.g=W(t.color.g),this.color.b=W(t.color.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}}class Y{constructor(t,n,r,e){this.r=isNaN(+t)?255:Math.max(0,Math.min(255,+t)),this.g=isNaN(+n)?255:Math.max(0,Math.min(255,+n)),this.b=isNaN(+r)?255:Math.max(0,Math.min(255,+r)),p(e)?this.opacity=isNaN(+e)?1:Math.max(0,Math.min(1,+e)):this.opacity=1}formatHex(){return`#${$(this.r)+$(this.g)+$(this.b)+(1===this.opacity?"":$(255*this.opacity))}`}formatRgb(){const t=this.opacity;return`${1===t?"rgb(":"rgba("}${this.r},${this.g},${this.b}${1===t?")":`,${t})`}`}formatHsl(){const t=this.opacity,{h:n,s:r,l:e}=B(this.r,this.g,this.b);return`${1===t?"hsl(":"hsla("}${n},${r}%,${e}%${1===t?")":`,${t})`}`}toString(){return this.formatHex()}}function Z(t){return t.replace(/-([a-z])/g,((t,n)=>n.toUpperCase()))}function K(t,n,r){void 0===r&&(r={});var e={type:"Feature"};return(0===r.id||r.id)&&(e.id=r.id),r.bbox&&(e.bbox=r.bbox),e.properties=n||{},e.geometry=t,e}function Q(t,n){void 0===n&&(n={});var r={type:"FeatureCollection"};return n.id&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.features=t,r}function tt(t){let n;return/^(rgba|RGBA)/.test(t)&&(n=function(t){const n=t.replace(/(?:\(|\)|rgba|RGBA)*/g,"").split(",");return{r:Number(n[0]),g:Number(n[1]),b:Number(n[2]),a:Number(n[3])}}(t)),{color:new X(t),transparent:!!n,opacity:n?n.a:1}}function nt(){return new rt}function rt(){this.reset()}rt.prototype={constructor:rt,reset:function(){this.s=this.t=0},add:function(t){it(et,t,this.t),it(this,et.s,this.s),this.s?this.t+=et.t:this.s=et.t},valueOf:function(){return this.s}};var et=new rt;function it(t,n,r){var e=t.s=n+r,i=e-n,o=e-i;t.t=n-o+(r-i)}var ot=1e-6,at=Math.PI,st=at/2,ut=at/4,lt=2*at,ct=180/at,ft=at/180,ht=Math.abs,pt=Math.atan,gt=Math.atan2,dt=Math.cos,vt=Math.exp,yt=Math.log,mt=Math.pow,wt=Math.sin,bt=Math.sign||function(t){return t>0?1:t<0?-1:0},Mt=Math.sqrt,xt=Math.tan;function Et(t){return t>1?0:t<-1?at:Math.acos(t)}function St(t){return t>1?st:t<-1?-st:Math.asin(t)}function _t(){}function Pt(t,n){t&&At.hasOwnProperty(t.type)&&At[t.type](t,n)}var kt={Feature:function(t,n){Pt(t.geometry,n)},FeatureCollection:function(t,n){for(var r=t.features,e=-1,i=r.length;++e<i;)Pt(r[e].geometry,n)}},At={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var r=t.coordinates,e=-1,i=r.length;++e<i;)t=r[e],n.point(t[0],t[1],t[2])},LineString:function(t,n){Ft(t.coordinates,n,0)},MultiLineString:function(t,n){for(var r=t.coordinates,e=-1,i=r.length;++e<i;)Ft(r[e],n,0)},Polygon:function(t,n){Ct(t.coordinates,n)},MultiPolygon:function(t,n){for(var r=t.coordinates,e=-1,i=r.length;++e<i;)Ct(r[e],n)},GeometryCollection:function(t,n){for(var r=t.geometries,e=-1,i=r.length;++e<i;)Pt(r[e],n)}};function Ft(t,n,r){var e,i=-1,o=t.length-r;for(n.lineStart();++i<o;)e=t[i],n.point(e[0],e[1],e[2]);n.lineEnd()}function Ct(t,n){var r=-1,e=t.length;for(n.polygonStart();++r<e;)Ft(t[r],n,1);n.polygonEnd()}function Dt(t,n){t&&kt.hasOwnProperty(t.type)?kt[t.type](t,n):Pt(t,n)}function Nt(t){return[gt(t[1],t[0]),St(t[2])]}function Lt(t){var n=t[0],r=t[1],e=dt(r);return[e*dt(n),e*wt(n),wt(r)]}function Ot(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function jt(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function Vt(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Tt(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Rt(t){var n=Mt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function qt(t,n){function r(r,e){return r=t(r,e),n(r[0],r[1])}return t.invert&&n.invert&&(r.invert=function(r,e){return(r=n.invert(r,e))&&t.invert(r[0],r[1])}),r}function Bt(t,n){return[ht(t)>at?t+Math.round(-t/lt)*lt:t,n]}function Gt(t,n,r){return(t%=lt)?n||r?qt(Ht(t),$t(n,r)):Ht(t):n||r?$t(n,r):Bt}function It(t){return function(n,r){return[(n+=t)>at?n-lt:n<-at?n+lt:n,r]}}function Ht(t){var n=It(t);return n.invert=It(-t),n}function $t(t,n){var r=dt(t),e=wt(t),i=dt(n),o=wt(n);function a(t,n){var a=dt(n),s=dt(t)*a,u=wt(t)*a,l=wt(n),c=l*r+s*e;return[gt(u*i-c*o,s*r-l*e),St(c*i+u*o)]}return a.invert=function(t,n){var a=dt(n),s=dt(t)*a,u=wt(t)*a,l=wt(n),c=l*i-u*o;return[gt(u*i+l*o,s*r+c*e),St(c*r-s*e)]},a}function zt(t,n){(n=Lt(n))[0]-=t,Rt(n);var r=Et(-n[1]);return((-n[2]<0?-r:r)+lt-ot)%lt}function Ut(){var t,n=[];return{point:function(n,r,e){t.push([n,r,e])},lineStart:function(){n.push(t=[])},lineEnd:_t,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var r=n;return n=[],t=null,r}}}function Wt(t,n){return ht(t[0]-n[0])<ot&&ht(t[1]-n[1])<ot}function Jt(t,n,r,e){this.x=t,this.z=n,this.o=r,this.e=e,this.v=!1,this.n=this.p=null}function Xt(t,n,r,e,i){var o,a,s=[],u=[];if(t.forEach((function(t){if(!((n=t.length-1)<=0)){var n,r,e=t[0],a=t[n];if(Wt(e,a)){if(!e[2]&&!a[2]){for(i.lineStart(),o=0;o<n;++o)i.point((e=t[o])[0],e[1]);return void i.lineEnd()}a[0]+=2*ot}s.push(r=new Jt(e,t,null,!0)),u.push(r.o=new Jt(e,null,r,!1)),s.push(r=new Jt(a,t,null,!1)),u.push(r.o=new Jt(a,null,r,!0))}})),s.length){for(u.sort(n),Yt(s),Yt(u),o=0,a=u.length;o<a;++o)u[o].e=r=!r;for(var l,c,f=s[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=l.length;o<a;++o)i.point((c=l[o])[0],c[1]);else e(h.x,h.n.x,1,i);h=h.n}else{if(p)for(l=h.p.z,o=l.length-1;o>=0;--o)i.point((c=l[o])[0],c[1]);else e(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function Yt(t){if(n=t.length){for(var n,r,e=0,i=t[0];++e<n;)i.n=r=t[e],r.p=i,i=r;i.n=r=t[0],r.p=i}}Bt.invert=Bt;var Zt=nt();function Kt(t){return ht(t[0])<=at?t[0]:bt(t[0])*((ht(t[0])+at)%lt-at)}function Qt(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function tn(t){for(var n,r,e,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(r=new Array(a);--i>=0;)for(n=(e=t[i]).length;--n>=0;)r[--a]=e[n];return r}function nn(t,n,r,e){return function(i){var o,a,s,u=n(i),l=Ut(),c=n(l),f=!1,h={point:p,lineStart:d,lineEnd:v,polygonStart:function(){h.point=y,h.lineStart=m,h.lineEnd=w,a=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=d,h.lineEnd=v,a=tn(a);var t=function(t,n){var r=Kt(n),e=n[1],i=wt(e),o=[wt(r),-dt(r),0],a=0,s=0;Zt.reset(),1===i?e=st+ot:-1===i&&(e=-st-ot);for(var u=0,l=t.length;u<l;++u)if(f=(c=t[u]).length)for(var c,f,h=c[f-1],p=Kt(h),g=h[1]/2+ut,d=wt(g),v=dt(g),y=0;y<f;++y,p=w,d=M,v=x,h=m){var m=c[y],w=Kt(m),b=m[1]/2+ut,M=wt(b),x=dt(b),E=w-p,S=E>=0?1:-1,_=S*E,P=_>at,k=d*M;if(Zt.add(gt(k*S*wt(_),v*x+k*dt(_))),a+=P?E+S*lt:E,P^p>=r^w>=r){var A=jt(Lt(h),Lt(m));Rt(A);var F=jt(o,A);Rt(F);var C=(P^E>=0?-1:1)*St(F[2]);(e>C||e===C&&(A[0]||A[1]))&&(s+=P^E>=0?1:-1)}}return(a<-ot||a<ot&&Zt<-ot)^1&s}(o,e);a.length?(f||(i.polygonStart(),f=!0),Xt(a,en,t,r,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),r(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),r(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(n,r){t(n,r)&&i.point(n,r)}function g(t,n){u.point(t,n)}function d(){h.point=g,u.lineStart()}function v(){h.point=p,u.lineEnd()}function y(t,n){s.push([t,n]),c.point(t,n)}function m(){c.lineStart(),s=[]}function w(){y(s[0][0],s[0][1]),c.lineEnd();var t,n,r,e,u=c.clean(),h=l.result(),p=h.length;if(s.pop(),o.push(s),s=null,p)if(1&u){if((n=(r=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<n;++t)i.point((e=r[t])[0],e[1]);i.lineEnd()}}else p>1&&2&u&&h.push(h.pop().concat(h.shift())),a.push(h.filter(rn))}return h}}function rn(t){return t.length>1}function en(t,n){return((t=t.x)[0]<0?t[1]-st-ot:st-t[1])-((n=n.x)[0]<0?n[1]-st-ot:st-n[1])}!function(t){var n;1===t.length&&(n=t,t=function(t,r){return Qt(n(t),r)})}(Qt);var on=nn((function(){return!0}),(function(t){var n,r=NaN,e=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var s=o>0?at:-at,u=ht(o-r);ht(u-at)<ot?(t.point(r,e=(e+a)/2>0?st:-st),t.point(i,e),t.lineEnd(),t.lineStart(),t.point(s,e),t.point(o,e),n=0):i!==s&&u>=at&&(ht(r-i)<ot&&(r-=i*ot),ht(o-s)<ot&&(o-=s*ot),e=function(t,n,r,e){var i,o,a=wt(t-r);return ht(a)>ot?pt((wt(n)*(o=dt(e))*wt(r)-wt(e)*(i=dt(n))*wt(t))/(i*o*a)):(n+e)/2}(r,e,o,a),t.point(i,e),t.lineEnd(),t.lineStart(),t.point(s,e),n=0),t.point(r=o,e=a),i=s},lineEnd:function(){t.lineEnd(),r=e=NaN},clean:function(){return 2-n}}}),(function(t,n,r,e){var i;if(null==t)i=r*st,e.point(-at,i),e.point(0,i),e.point(at,i),e.point(at,0),e.point(at,-i),e.point(0,-i),e.point(-at,-i),e.point(-at,0),e.point(-at,i);else if(ht(t[0]-n[0])>ot){var o=t[0]<n[0]?at:-at;i=r*o/2,e.point(-o,i),e.point(0,i),e.point(o,i)}else e.point(n[0],n[1])}),[-at,-st]);function an(t){var n=dt(t),r=6*ft,e=n>0,i=ht(n)>ot;function o(t,r){return dt(t)*dt(r)>n}function a(t,r,e){var i=[1,0,0],o=jt(Lt(t),Lt(r)),a=Ot(o,o),s=o[0],u=a-s*s;if(!u)return!e&&t;var l=n*a/u,c=-n*s/u,f=jt(i,o),h=Tt(i,l);Vt(h,Tt(o,c));var p=f,g=Ot(h,p),d=Ot(p,p),v=g*g-d*(Ot(h,h)-1);if(!(v<0)){var y=Mt(v),m=Tt(p,(-g-y)/d);if(Vt(m,h),m=Nt(m),!e)return m;var w,b=t[0],M=r[0],x=t[1],E=r[1];M<b&&(w=b,b=M,M=w);var S=M-b,_=ht(S-at)<ot;if(!_&&E<x&&(w=x,x=E,E=w),_||S<ot?_?x+E>0^m[1]<(ht(m[0]-b)<ot?x:E):x<=m[1]&&m[1]<=E:S>at^(b<=m[0]&&m[0]<=M)){var P=Tt(p,(-g+y)/d);return Vt(P,h),[m,Nt(P)]}}}function s(n,r){var i=e?t:at-t,o=0;return n<-i?o|=1:n>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}return nn(o,(function(t){var n,r,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(f,h){var p,g=[f,h],d=o(f,h),v=e?d?0:s(f,h):d?s(f+(f<0?at:-at),h):0;if(!n&&(l=u=d)&&t.lineStart(),d!==u&&(!(p=a(n,g))||Wt(n,p)||Wt(g,p))&&(g[2]=1),d!==u)c=0,d?(t.lineStart(),p=a(g,n),t.point(p[0],p[1])):(p=a(n,g),t.point(p[0],p[1],2),t.lineEnd()),n=p;else if(i&&n&&e^d){var y;v&r||!(y=a(g,n,!0))||(c=0,e?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!d||n&&Wt(n,g)||t.point(g[0],g[1]),n=g,u=d,r=v},lineEnd:function(){u&&t.lineEnd(),n=null},clean:function(){return c|(l&&u)<<1}}}),(function(n,e,i,o){!function(t,n,r,e,i,o){if(r){var a=dt(n),s=wt(n),u=e*r;null==i?(i=n+e*lt,o=n-u/2):(i=zt(a,i),o=zt(a,o),(e>0?i<o:i>o)&&(i+=e*lt));for(var l,c=i;e>0?c>o:c<o;c-=u)l=Nt([a,-s*dt(c),-s*wt(c)]),t.point(l[0],l[1])}}(o,t,r,i,n,e)}),e?[0,-t]:[-at,t-at])}var sn=1e9,un=-sn;function ln(t,n,r,e){function i(i,o){return t<=i&&i<=r&&n<=o&&o<=e}function o(i,o,s,l){var c=0,f=0;if(null==i||(c=a(i,s))!==(f=a(o,s))||u(i,o)<0^s>0)do{l.point(0===c||3===c?t:r,c>1?e:n)}while((c=(c+s+4)%4)!==f);else l.point(o[0],o[1])}function a(e,i){return ht(e[0]-t)<ot?i>0?0:3:ht(e[0]-r)<ot?i>0?2:1:ht(e[1]-n)<ot?i>0?1:0:i>0?3:2}function s(t,n){return u(t.x,n.x)}function u(t,n){var r=a(t,1),e=a(n,1);return r!==e?r-e:0===r?n[1]-t[1]:1===r?t[0]-n[0]:2===r?t[1]-n[1]:n[0]-t[0]}return function(a){var u,l,c,f,h,p,g,d,v,y,m,w=a,b=Ut(),M={point:x,lineStart:function(){M.point=E,l&&l.push(c=[]);y=!0,v=!1,g=d=NaN},lineEnd:function(){u&&(E(f,h),p&&v&&b.rejoin(),u.push(b.result()));M.point=x,v&&w.lineEnd()},polygonStart:function(){w=b,u=[],l=[],m=!0},polygonEnd:function(){var n=function(){for(var n=0,r=0,i=l.length;r<i;++r)for(var o,a,s=l[r],u=1,c=s.length,f=s[0],h=f[0],p=f[1];u<c;++u)o=h,a=p,h=(f=s[u])[0],p=f[1],a<=e?p>e&&(h-o)*(e-a)>(p-a)*(t-o)&&++n:p<=e&&(h-o)*(e-a)<(p-a)*(t-o)&&--n;return n}(),r=m&&n,i=(u=tn(u)).length;(r||i)&&(a.polygonStart(),r&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&Xt(u,s,n,o,a),a.polygonEnd());w=a,u=l=c=null}};function x(t,n){i(t,n)&&w.point(t,n)}function E(o,a){var s=i(o,a);if(l&&c.push([o,a]),y)f=o,h=a,p=s,y=!1,s&&(w.lineStart(),w.point(o,a));else if(s&&v)w.point(o,a);else{var u=[g=Math.max(un,Math.min(sn,g)),d=Math.max(un,Math.min(sn,d))],b=[o=Math.max(un,Math.min(sn,o)),a=Math.max(un,Math.min(sn,a))];!function(t,n,r,e,i,o){var a,s=t[0],u=t[1],l=0,c=1,f=n[0]-s,h=n[1]-u;if(a=r-s,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<c&&(c=a)}else if(f>0){if(a>c)return;a>l&&(l=a)}if(a=i-s,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<c&&(c=a)}if(a=e-u,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<c&&(c=a)}else if(h>0){if(a>c)return;a>l&&(l=a)}if(a=o-u,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<c&&(c=a)}return l>0&&(t[0]=s+l*f,t[1]=u+l*h),c<1&&(n[0]=s+c*f,n[1]=u+c*h),!0}}}}}(u,b,t,n,r,e)?s&&(w.lineStart(),w.point(o,a),m=!1):(v||(w.lineStart(),w.point(u[0],u[1])),w.point(b[0],b[1]),s||w.lineEnd(),m=!1)}g=o,d=a,v=s}return M}}function cn(t){return t}var fn,hn,pn,gn,dn=nt(),vn=nt(),yn={point:_t,lineStart:_t,lineEnd:_t,polygonStart:function(){yn.lineStart=mn,yn.lineEnd=Mn},polygonEnd:function(){yn.lineStart=yn.lineEnd=yn.point=_t,dn.add(ht(vn)),vn.reset()},result:function(){var t=dn/2;return dn.reset(),t}};function mn(){yn.point=wn}function wn(t,n){yn.point=bn,fn=pn=t,hn=gn=n}function bn(t,n){vn.add(gn*t-pn*n),pn=t,gn=n}function Mn(){bn(fn,hn)}var xn=yn,En=1/0,Sn=En,_n=-En,Pn=_n,kn={point:function(t,n){t<En&&(En=t);t>_n&&(_n=t);n<Sn&&(Sn=n);n>Pn&&(Pn=n)},lineStart:_t,lineEnd:_t,polygonStart:_t,polygonEnd:_t,result:function(){var t=[[En,Sn],[_n,Pn]];return _n=Pn=-(Sn=En=1/0),t}};var An,Fn,Cn,Dn,Nn=kn,Ln=0,On=0,jn=0,Vn=0,Tn=0,Rn=0,qn=0,Bn=0,Gn=0,In={point:Hn,lineStart:$n,lineEnd:Wn,polygonStart:function(){In.lineStart=Jn,In.lineEnd=Xn},polygonEnd:function(){In.point=Hn,In.lineStart=$n,In.lineEnd=Wn},result:function(){var t=Gn?[qn/Gn,Bn/Gn]:Rn?[Vn/Rn,Tn/Rn]:jn?[Ln/jn,On/jn]:[NaN,NaN];return Ln=On=jn=Vn=Tn=Rn=qn=Bn=Gn=0,t}};function Hn(t,n){Ln+=t,On+=n,++jn}function $n(){In.point=zn}function zn(t,n){In.point=Un,Hn(Cn=t,Dn=n)}function Un(t,n){var r=t-Cn,e=n-Dn,i=Mt(r*r+e*e);Vn+=i*(Cn+t)/2,Tn+=i*(Dn+n)/2,Rn+=i,Hn(Cn=t,Dn=n)}function Wn(){In.point=Hn}function Jn(){In.point=Yn}function Xn(){Zn(An,Fn)}function Yn(t,n){In.point=Zn,Hn(An=Cn=t,Fn=Dn=n)}function Zn(t,n){var r=t-Cn,e=n-Dn,i=Mt(r*r+e*e);Vn+=i*(Cn+t)/2,Tn+=i*(Dn+n)/2,Rn+=i,qn+=(i=Dn*t-Cn*n)*(Cn+t),Bn+=i*(Dn+n),Gn+=3*i,Hn(Cn=t,Dn=n)}var Kn=In;function Qn(t){this._context=t}Qn.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,lt)}},result:_t};var tr,nr,rr,er,ir,or=nt(),ar={point:_t,lineStart:function(){ar.point=sr},lineEnd:function(){tr&&ur(nr,rr),ar.point=_t},polygonStart:function(){tr=!0},polygonEnd:function(){tr=null},result:function(){var t=+or;return or.reset(),t}};function sr(t,n){ar.point=ur,nr=er=t,rr=ir=n}function ur(t,n){er-=t,ir-=n,or.add(Mt(er*er+ir*ir)),er=t,ir=n}var lr=ar;function cr(){this._string=[]}function fr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function hr(t,n){var r,e,i=4.5;function o(t){return t&&("function"==typeof i&&e.pointRadius(+i.apply(this,arguments)),Dt(t,r(e))),e.result()}return o.area=function(t){return Dt(t,r(xn)),xn.result()},o.measure=function(t){return Dt(t,r(lr)),lr.result()},o.bounds=function(t){return Dt(t,r(Nn)),Nn.result()},o.centroid=function(t){return Dt(t,r(Kn)),Kn.result()},o.projection=function(n){return arguments.length?(r=null==n?(t=null,cn):(t=n).stream,o):t},o.context=function(t){return arguments.length?(e=null==t?(n=null,new cr):new Qn(n=t),"function"!=typeof i&&e.pointRadius(i),o):n},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(e.pointRadius(+t),+t),o):i},o.projection(t).context(n)}function pr(t){return function(n){var r=new gr;for(var e in t)r[e]=t[e];return r.stream=n,r}}function gr(){}function dr(t,n,r){var e=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=e&&t.clipExtent(null),Dt(r,t.stream(Nn)),n(Nn.result()),null!=e&&t.clipExtent(e),t}function vr(t,n,r){return dr(t,(function(r){var e=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(e/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),a=+n[0][0]+(e-o*(r[1][0]+r[0][0]))/2,s=+n[0][1]+(i-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])}),r)}function yr(t,n,r){return vr(t,[[0,0],n],r)}function mr(t,n,r){return dr(t,(function(r){var e=+n,i=e/(r[1][0]-r[0][0]),o=(e-i*(r[1][0]+r[0][0]))/2,a=-i*r[0][1];t.scale(150*i).translate([o,a])}),r)}function wr(t,n,r){return dr(t,(function(r){var e=+n,i=e/(r[1][1]-r[0][1]),o=-i*r[0][0],a=(e-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([o,a])}),r)}cr.prototype={_radius:4.5,_circle:fr(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=fr(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},gr.prototype={constructor:gr,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var br=16,Mr=dt(30*ft);function xr(t,n){return+n?function(t,n){function r(e,i,o,a,s,u,l,c,f,h,p,g,d,v){var y=l-e,m=c-i,w=y*y+m*m;if(w>4*n&&d--){var b=a+h,M=s+p,x=u+g,E=Mt(b*b+M*M+x*x),S=St(x/=E),_=ht(ht(x)-1)<ot||ht(o-f)<ot?(o+f)/2:gt(M,b),P=t(_,S),k=P[0],A=P[1],F=k-e,C=A-i,D=m*F-y*C;(D*D/w>n||ht((y*F+m*C)/w-.5)>.3||a*h+s*p+u*g<Mr)&&(r(e,i,o,a,s,u,k,A,_,b/=E,M/=E,x,d,v),v.point(k,A),r(k,A,_,b,M,x,l,c,f,h,p,g,d,v))}}return function(n){var e,i,o,a,s,u,l,c,f,h,p,g,d={point:v,lineStart:y,lineEnd:w,polygonStart:function(){n.polygonStart(),d.lineStart=b},polygonEnd:function(){n.polygonEnd(),d.lineStart=y}};function v(r,e){r=t(r,e),n.point(r[0],r[1])}function y(){c=NaN,d.point=m,n.lineStart()}function m(e,i){var o=Lt([e,i]),a=t(e,i);r(c,f,l,h,p,g,c=a[0],f=a[1],l=e,h=o[0],p=o[1],g=o[2],br,n),n.point(c,f)}function w(){d.point=v,n.lineEnd()}function b(){y(),d.point=M,d.lineEnd=x}function M(t,n){m(e=t,n),i=c,o=f,a=h,s=p,u=g,d.point=m}function x(){r(c,f,l,h,p,g,i,o,e,a,s,u,br,n),d.lineEnd=w,w()}return d}}(t,n):function(t){return pr({point:function(n,r){n=t(n,r),this.stream.point(n[0],n[1])}})}(t)}var Er=pr({point:function(t,n){this.stream.point(t*ft,n*ft)}});function Sr(t,n,r,e,i){function o(o,a){return[n+t*(o*=e),r-t*(a*=i)]}return o.invert=function(o,a){return[(o-n)/t*e,(r-a)/t*i]},o}function _r(t,n,r,e,i,o){var a=dt(o),s=wt(o),u=a*t,l=s*t,c=a/t,f=s/t,h=(s*r-a*n)/t,p=(s*n+a*r)/t;function g(t,o){return[u*(t*=e)-l*(o*=i)+n,r-l*t-u*o]}return g.invert=function(t,n){return[e*(c*t-f*n+h),i*(p-f*t-c*n)]},g}function Pr(t){return kr((function(){return t}))()}function kr(t){var n,r,e,i,o,a,s,u,l,c,f=150,h=480,p=250,g=0,d=0,v=0,y=0,m=0,w=0,b=1,M=1,x=null,E=on,S=null,_=cn,P=.5;function k(t){return u(t[0]*ft,t[1]*ft)}function A(t){return(t=u.invert(t[0],t[1]))&&[t[0]*ct,t[1]*ct]}function F(){var t=_r(f,0,0,b,M,w).apply(null,n(g,d)),e=(w?_r:Sr)(f,h-t[0],p-t[1],b,M,w);return r=Gt(v,y,m),s=qt(n,e),u=qt(r,s),a=xr(s,P),C()}function C(){return l=c=null,k}return k.stream=function(t){return l&&c===t?l:l=Er(function(t){return pr({point:function(n,r){var e=t(n,r);return this.stream.point(e[0],e[1])}})}(r)(E(a(_(c=t)))))},k.preclip=function(t){return arguments.length?(E=t,x=void 0,C()):E},k.postclip=function(t){return arguments.length?(_=t,S=e=i=o=null,C()):_},k.clipAngle=function(t){return arguments.length?(E=+t?an(x=t*ft):(x=null,on),C()):x*ct},k.clipExtent=function(t){return arguments.length?(_=null==t?(S=e=i=o=null,cn):ln(S=+t[0][0],e=+t[0][1],i=+t[1][0],o=+t[1][1]),C()):null==S?null:[[S,e],[i,o]]},k.scale=function(t){return arguments.length?(f=+t,F()):f},k.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],F()):[h,p]},k.center=function(t){return arguments.length?(g=t[0]%360*ft,d=t[1]%360*ft,F()):[g*ct,d*ct]},k.rotate=function(t){return arguments.length?(v=t[0]%360*ft,y=t[1]%360*ft,m=t.length>2?t[2]%360*ft:0,F()):[v*ct,y*ct,m*ct]},k.angle=function(t){return arguments.length?(w=t%360*ft,F()):w*ct},k.reflectX=function(t){return arguments.length?(b=t?-1:1,F()):b<0},k.reflectY=function(t){return arguments.length?(M=t?-1:1,F()):M<0},k.precision=function(t){return arguments.length?(a=xr(s,P=t*t),C()):Mt(P)},k.fitExtent=function(t,n){return vr(k,t,n)},k.fitSize=function(t,n){return yr(k,t,n)},k.fitWidth=function(t,n){return mr(k,t,n)},k.fitHeight=function(t,n){return wr(k,t,n)},function(){return n=t.apply(this,arguments),k.invert=n.invert&&A,F()}}function Ar(t){var n=0,r=at/3,e=kr(t),i=e(n,r);return i.parallels=function(t){return arguments.length?e(n=t[0]*ft,r=t[1]*ft):[n*ct,r*ct]},i}function Fr(t,n){var r=wt(t),e=(r+wt(n))/2;if(ht(e)<ot)return function(t){var n=dt(t);function r(t,r){return[t*n,wt(r)/n]}return r.invert=function(t,r){return[t/n,St(r*n)]},r}(t);var i=1+r*(2*e-r),o=Mt(i)/e;function a(t,n){var r=Mt(i-2*e*wt(n))/e;return[r*wt(t*=e),o-r*dt(t)]}return a.invert=function(t,n){var r=o-n,a=gt(t,ht(r))*bt(r);return r*e<0&&(a-=at*bt(t)*bt(r)),[a/e,St((i-(t*t+r*r)*e*e)/(2*e))]},a}function Cr(){return Ar(Fr).scale(155.424).center([0,33.6442])}function Dr(){return Cr().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Nr(t){return function(n,r){var e=dt(n),i=dt(r),o=t(e*i);return[o*i*wt(n),o*wt(r)]}}function Lr(t){return function(n,r){var e=Mt(n*n+r*r),i=t(e),o=wt(i),a=dt(i);return[gt(n*o,e*a),St(e&&r*o/e)]}}var Or=Nr((function(t){return Mt(2/(1+t))}));Or.invert=Lr((function(t){return 2*St(t/2)}));var jr=Nr((function(t){return(t=Et(t))&&t/wt(t)}));function Vr(t,n){return[t,yt(xt((st+n)/2))]}function Tr(){return Rr(Vr).scale(961/lt)}function Rr(t){var n,r,e,i=Pr(t),o=i.center,a=i.scale,s=i.translate,u=i.clipExtent,l=null;function c(){var o=at*a(),s=i(function(t){function n(n){return(n=t(n[0]*ft,n[1]*ft))[0]*=ct,n[1]*=ct,n}return t=Gt(t[0]*ft,t[1]*ft,t.length>2?t[2]*ft:0),n.invert=function(n){return(n=t.invert(n[0]*ft,n[1]*ft))[0]*=ct,n[1]*=ct,n},n}(i.rotate()).invert([0,0]));return u(null==l?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===Vr?[[Math.max(s[0]-o,l),n],[Math.min(s[0]+o,r),e]]:[[l,Math.max(s[1]-o,n)],[r,Math.min(s[1]+o,e)]])}return i.scale=function(t){return arguments.length?(a(t),c()):a()},i.translate=function(t){return arguments.length?(s(t),c()):s()},i.center=function(t){return arguments.length?(o(t),c()):o()},i.clipExtent=function(t){return arguments.length?(null==t?l=n=r=e=null:(l=+t[0][0],n=+t[0][1],r=+t[1][0],e=+t[1][1]),c()):null==l?null:[[l,n],[r,e]]},c()}function qr(t){return xt((st+t)/2)}function Br(t,n){var r=dt(t),e=t===n?wt(t):yt(r/dt(n))/yt(qr(n)/qr(t)),i=r*mt(qr(t),e)/e;if(!e)return Vr;function o(t,n){i>0?n<-st+ot&&(n=-st+ot):n>st-ot&&(n=st-ot);var r=i/mt(qr(n),e);return[r*wt(e*t),i-r*dt(e*t)]}return o.invert=function(t,n){var r=i-n,o=bt(e)*Mt(t*t+r*r),a=gt(t,ht(r))*bt(r);return r*e<0&&(a-=at*bt(t)*bt(r)),[a/e,2*pt(mt(i/o,1/e))-st]},o}function Gr(t,n){return[t,n]}function Ir(t,n){var r=dt(t),e=t===n?wt(t):(r-dt(n))/(n-t),i=r/e+t;if(ht(e)<ot)return Gr;function o(t,n){var r=i-n,o=e*t;return[r*wt(o),i-r*dt(o)]}return o.invert=function(t,n){var r=i-n,o=gt(t,ht(r))*bt(r);return r*e<0&&(o-=at*bt(t)*bt(r)),[o/e,i-bt(e)*Mt(t*t+r*r)]},o}jr.invert=Lr((function(t){return t})),Vr.invert=function(t,n){return[t,2*pt(vt(n))-st]},Gr.invert=Gr;var Hr=1.340264,$r=-.081106,zr=893e-6,Ur=.003796,Wr=Mt(3)/2;function Jr(t,n){var r=St(Wr*wt(n)),e=r*r,i=e*e*e;return[t*dt(r)/(Wr*(Hr+3*$r*e+i*(7*zr+9*Ur*e))),r*(Hr+$r*e+i*(zr+Ur*e))]}function Xr(t,n){var r=dt(n),e=dt(t)*r;return[r*wt(t)/e,wt(n)/e]}function Yr(t,n){var r=n*n,e=r*r;return[t*(.8707-.131979*r+e*(e*(.003971*r-.001529*e)-.013791)),n*(1.007226+r*(.015085+e*(.028874*r-.044475-.005916*e)))]}function Zr(t,n){return[dt(n)*wt(t),wt(n)]}function Kr(t,n){var r=dt(n),e=1+dt(t)*r;return[r*wt(t)/e,wt(n)/e]}function Qr(t,n){return[yt(xt((st+n)/2)),-t]}Jr.invert=function(t,n){for(var r,e=n,i=e*e,o=i*i*i,a=0;a<12&&(o=(i=(e-=r=(e*(Hr+$r*i+o*(zr+Ur*i))-n)/(Hr+3*$r*i+o*(7*zr+9*Ur*i)))*e)*i*i,!(ht(r)<1e-12));++a);return[Wr*t*(Hr+3*$r*i+o*(7*zr+9*Ur*i))/dt(e),St(wt(e)/Wr)]},Xr.invert=Lr(pt),Yr.invert=function(t,n){var r,e=n,i=25;do{var o=e*e,a=o*o;e-=r=(e*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-n)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(ht(r)>ot&&--i>0);return[t/(.8707+(o=e*e)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),e]},Zr.invert=Lr(St),Kr.invert=Lr((function(t){return 2*pt(t)})),Qr.invert=function(t,n){return[-n,2*pt(vt(t))-st]};const te=Tr().translate([0,0]).center([0,0]).scale(63781);function ne(t){const n=te;if(void 0===t[2]){const r=n(t);return r[1]*=-1,r}const r=n(t);return r[1]*=-1,r.push(t[2]),r}const re={webmercator:ne};var ee=Object.prototype.hasOwnProperty;function ie(t,n,r,e,i,o){3===arguments.length&&(e=o=Array,i=null);for(var a=new e(t=1<<Math.max(4,Math.ceil(Math.log(t)/Math.LN2))),s=new o(t),u=t-1,l=0;l<t;++l)a[l]=i;return{set:function(e,o){for(var l=n(e)&u,c=a[l],f=0;c!=i;){if(r(c,e))return s[l]=o;if(++f>=t)throw new Error("full hashmap");c=a[l=l+1&u]}return a[l]=e,s[l]=o,o},maybeSet:function(e,o){for(var l=n(e)&u,c=a[l],f=0;c!=i;){if(r(c,e))return s[l];if(++f>=t)throw new Error("full hashmap");c=a[l=l+1&u]}return a[l]=e,s[l]=o,o},get:function(e,o){for(var l=n(e)&u,c=a[l],f=0;c!=i;){if(r(c,e))return s[l];if(++f>=t)break;c=a[l=l+1&u]}return o},keys:function(){for(var t=[],n=0,r=a.length;n<r;++n){var e=a[n];e!=i&&t.push(e)}return t}}}function oe(t,n){return t[0]===n[0]&&t[1]===n[1]}var ae=new ArrayBuffer(16),se=new Float64Array(ae),ue=new Uint32Array(ae);function le(t){se[0]=t[0],se[1]=t[1];var n=ue[0]^ue[1];return 2147483647&(n=n<<5^n>>7^ue[2]^ue[3])}function ce(t){var n,r,e,i,o=t.coordinates,a=t.lines,s=t.rings,u=function(){for(var t=ie(1.4*o.length,M,x,Int32Array,-1,Int32Array),n=new Int32Array(o.length),r=0,e=o.length;r<e;++r)n[r]=t.maybeSet(r,r);return n}(),l=new Int32Array(o.length),c=new Int32Array(o.length),f=new Int32Array(o.length),h=new Int8Array(o.length),p=0;for(n=0,r=o.length;n<r;++n)l[n]=c[n]=f[n]=-1;for(n=0,r=a.length;n<r;++n){var g=a[n],d=g[0],v=g[1];for(e=u[d],i=u[++d],++p,h[e]=1;++d<=v;)b(n,e,e=i,i=u[d]);++p,h[i]=1}for(n=0,r=o.length;n<r;++n)l[n]=-1;for(n=0,r=s.length;n<r;++n){var y=s[n],m=y[0]+1,w=y[1];for(b(n,u[w-1],e=u[m-1],i=u[m]);++m<=w;)b(n,e,e=i,i=u[m])}function b(t,n,r,e){if(l[r]!==t){l[r]=t;var i=c[r];if(i>=0){var o=f[r];i===n&&o===e||i===e&&o===n||(++p,h[r]=1)}else c[r]=n,f[r]=e}}function M(t){return le(o[t])}function x(t,n){return oe(o[t],o[n])}l=c=f=null;var E,S=function(t,n,r,e,i){3===arguments.length&&(e=Array,i=null);for(var o=new e(t=1<<Math.max(4,Math.ceil(Math.log(t)/Math.LN2))),a=t-1,s=0;s<t;++s)o[s]=i;return{add:function(e){for(var s=n(e)&a,u=o[s],l=0;u!=i;){if(r(u,e))return!0;if(++l>=t)throw new Error("full hashset");u=o[s=s+1&a]}return o[s]=e,!0},has:function(e){for(var s=n(e)&a,u=o[s],l=0;u!=i;){if(r(u,e))return!0;if(++l>=t)break;u=o[s=s+1&a]}return!1},values:function(){for(var t=[],n=0,r=o.length;n<r;++n){var e=o[n];e!=i&&t.push(e)}return t}}}(1.4*p,le,oe);for(n=0,r=o.length;n<r;++n)h[E=u[n]]&&S.add(o[E]);return S}function fe(t,n,r,e){he(t,n,r),he(t,n,n+e),he(t,n+e,r)}function he(t,n,r){for(var e,i=n+(r---n>>1);n<i;++n,--r)e=t[n],t[n]=t[r],t[r]=e}function pe(t){var n,r,e={};for(n in t)e[n]=null==(r=t[n])?{type:null}:("FeatureCollection"===r.type?ge:"Feature"===r.type?de:ve)(r);return e}function ge(t){var n={type:"GeometryCollection",geometries:t.features.map(de)};return null!=t.bbox&&(n.bbox=t.bbox),n}function de(t){var n,r=ve(t.geometry);for(n in null!=t.id&&(r.id=t.id),null!=t.bbox&&(r.bbox=t.bbox),t.properties){r.properties=t.properties;break}return r}function ve(t){if(null==t)return{type:null};var n="GeometryCollection"===t.type?{type:"GeometryCollection",geometries:t.geometries.map(ve)}:"Point"===t.type||"MultiPoint"===t.type?{type:t.type,coordinates:t.coordinates}:{type:t.type,arcs:t.coordinates};return null!=t.bbox&&(n.bbox=t.bbox),n}function ye(t){var n,r=t[0],e=t[1];return e<r&&(n=r,r=e,e=n),r+31*e}function me(t,n){var r,e=t[0],i=t[1],o=n[0],a=n[1];return i<e&&(r=e,e=i,i=r),a<o&&(r=o,o=a,a=r),e===o&&i===a}var we=Object.freeze({__proto__:null,topology:function(t,n){var r=function(t){var n=1/0,r=1/0,e=-1/0,i=-1/0;function o(t){null!=t&&ee.call(a,t.type)&&a[t.type](t)}var a={GeometryCollection:function(t){t.geometries.forEach(o)},Point:function(t){s(t.coordinates)},MultiPoint:function(t){t.coordinates.forEach(s)},LineString:function(t){u(t.arcs)},MultiLineString:function(t){t.arcs.forEach(u)},Polygon:function(t){t.arcs.forEach(u)},MultiPolygon:function(t){t.arcs.forEach(l)}};function s(t){var o=t[0],a=t[1];o<n&&(n=o),o>e&&(e=o),a<r&&(r=a),a>i&&(i=a)}function u(t){t.forEach(s)}function l(t){t.forEach(u)}for(var c in t)o(t[c]);return e>=n&&i>=r?[n,r,e,i]:void 0}(t=pe(t)),e=n>0&&r&&function(t,n,r){var e=n[0],i=n[1],o=n[2],a=n[3],s=o-e?(r-1)/(o-e):1,u=a-i?(r-1)/(a-i):1;function l(t){return[Math.round((t[0]-e)*s),Math.round((t[1]-i)*u)]}function c(t,n){for(var r,o,a,l,c,f=-1,h=0,p=