1function l(n){const t=Number(n);return Number.isFinite(t)?t:null}function i(n){if(!n)return null;const t=l(n.lat??n.latitude),r=l(n.lon??n.longitude);return t===null||r===null?null:{lat:t,lon:r}}function p(n,t=3){if(!n||n.lat==null||n.lon==null)return;const r=10**t;return{lat:Math.round(Number(n.lat)*r)/r,lon:Math.round(Number(n.lon)*r)/r}}function e(n,t){const r=i(n),u=i(t);if(!r||!u)return null;const a=M=>M*Math.PI/180,s=6371e3,o=a(u.lat-r.lat),c=a(u.lon-r.lon),f=a(r.lat),d=a(u.lat),h=Math.sin(o/2)**2+Math.cos(f)*Math.cos(d)*Math.sin(c/2)**2;return 2*s*Math.asin(Math.min(1,Math.sqrt(h)))}function N(n,t,r,u){return n?b(e(t,r),u):null}function b(n,t){return!Number.isFinite(n)||n==null||n<0?null:n<1e3?t("placeListing.distanceM",{m:Math.round(n)}):t("placeListing.distanceKm",{km:(n/1e3).toFixed(1)})}function L(n,t,r){const u=e(n,t),a=e(n,r);return u==null&&a==null?0:u==null?1:a==null?-1:u-a}function g(n,t,r){return t?[...n].sort((u,a)=>L(t,r(u),r(a))):n}export{N as g,p as r,g as s};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.