import{aQ as d,aN as L,au as M,aR as A,aO as N,a as g,t as O}from"./index.6c049565.js";const f=(r,n,t)=>[n,t],s=(r,n,t)=>[n,t,r[2]],m=(r,n,t)=>[n,t,r[2],r[3]];function T(r){return r?{originPosition:r.originPosition==="upper-left"?"upperLeft":r.originPosition==="lower-left"?"lowerLeft":r.originPosition,scale:r.tolerance?[r.tolerance,r.tolerance]:[1,1],translate:g(r.extent)?[r.extent.xmin,r.extent.ymax]:[0,0]}:null}function h({scale:r,translate:n},t){return Math.round((t-n[0])/r[0])}function x({scale:r,translate:n},t){return Math.round((n[1]-t)/r[1])}function p(r,n,t){const u=[];let o,i,l,e;for(let c=0;c0?(l=h(r,a[0]),e=x(r,a[1]),l===o&&e===i||(u.push(n(a,l-o,e-i)),o=l,i=e)):(o=h(r,a[0]),i=x(r,a[1]),u.push(n(a,o,i)))}return u.length>0?u:null}function b(r,n,t,u){return p(r,t?u?m:s:u?s:f,n)}function q(r,n,t,u){const o=[],i=t?u?m:s:u?s:f;for(let l=0;l=3&&o.push(e)}return o.length?o:null}function v(r,n,t,u){const o=[],i=t?u?m:s:u?s:f;for(let l=0;l=2&&o.push(e)}return o.length?o:null}function y({scale:r,translate:n},t){return t*r[0]+n[0]}function z({scale:r,translate:n},t){return n[1]-t*r[1]}function w(r,n,t){const u=new Array(t.length);if(!t.length)return u;const[o,i]=r.scale;let l=y(r,t[0][0]),e=z(r,t[0][1]);u[0]=n(t[0],l,e);for(let c=1;c