// https://d3js.org/d3-polygon/ v3.0.1 Copyright 2010-2021 Mike Bostock !function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self).d3=n.d3||{})}(this,(function(n){"use strict";function e(n,e){return n[0]-e[0]||n[1]-e[1]}function t(n){const e=n.length,t=[0,1];let o,r=2;for(o=2;o1&&(f=n[t[r-2]],l=n[t[r-1]],u=n[o],(l[0]-f[0])*(u[1]-f[1])-(l[1]-f[1])*(u[0]-f[0])<=0);)--r;t[r++]=o}var f,l,u;return t.slice(0,r)}n.polygonArea=function(n){for(var e,t=-1,o=n.length,r=n[o-1],f=0;++tu!=g>u&&l<(i-t)*(u-o)/(g-o)+t&&(h=!h),i=t,g=o;return h},n.polygonHull=function(n){if((r=n.length)<3)return null;var o,r,f=new Array(r),l=new Array(r);for(o=0;o=0;--o)a.push(n[f[u[o]][2]]);for(o=+g;o