From 485d6381f82eb92b9cef58d8fcf606096159aef5 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 16:40:31 +0000 Subject: [PATCH] Update @turf/helpers to version 7.4.0 --- config/importmap.rb | 2 +- vendor/javascript/@turf--helpers.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/importmap.rb b/config/importmap.rb index 6160d09e..897d59e6 100644 --- a/config/importmap.rb +++ b/config/importmap.rb @@ -82,7 +82,7 @@ # Turf libs needed by mapbox-gl-draw pin "@turf/projection", to: "@turf--projection.js", preload: false # @7.3.5 pin "@turf/clone", to: "@turf--clone.js", preload: false # @7.3.5 -pin "@turf/helpers", to: "@turf--helpers.js" # @7.3.5 +pin "@turf/helpers", to: "@turf--helpers.js" # @7.4.0 pin "@turf/meta", to: "@turf--meta.js" # @7.3.5 # Turf libs needed by app pin "@turf/simplify", to: "@turf--simplify.js", preload: false # @7.3.5 diff --git a/vendor/javascript/@turf--helpers.js b/vendor/javascript/@turf--helpers.js index 133bce62..6fb2c83f 100644 --- a/vendor/javascript/@turf--helpers.js +++ b/vendor/javascript/@turf--helpers.js @@ -1,2 +1,2 @@ -var e=6371008.8,t={centimeters:e*100,centimetres:e*100,degrees:360/(2*Math.PI),feet:e*3.28084,inches:e*39.37,kilometers:e/1e3,kilometres:e/1e3,meters:e,metres:e,miles:e/1609.344,millimeters:e*1e3,millimetres:e*1e3,nauticalmiles:e/1852,radians:1,yards:e*1.0936},n={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function r(e,t,n={}){let r={type:`Feature`};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function i(e,t,n={}){switch(e){case`Point`:return a(t).geometry;case`LineString`:return l(t).geometry;case`Polygon`:return s(t).geometry;case`MultiPoint`:return p(t).geometry;case`MultiLineString`:return f(t).geometry;case`MultiPolygon`:return m(t).geometry;default:throw Error(e+` is invalid`)}}function a(e,t,n={}){if(!e)throw Error(`coordinates is required`);if(!Array.isArray(e))throw Error(`coordinates must be an Array`);if(e.length<2)throw Error(`coordinates must be at least 2 numbers long`);if(!E(e[0])||!E(e[1]))throw Error(`coordinates must contain numbers`);return r({type:`Point`,coordinates:e},t,n)}function o(e,t,n={}){return d(e.map(e=>a(e,t)),n)}function s(e,t,n={}){for(let t of e){if(t.length<4)throw Error(`Each LinearRing of a Polygon must have 4 or more Positions.`);if(t[t.length-1].length!==t[0].length)throw Error(`First and last Position are not equivalent.`);for(let e=0;es(e,t)),n)}function l(e,t,n={}){if(e.length<2)throw Error(`coordinates must be an array of two or more positions`);return r({type:`LineString`,coordinates:e},t,n)}function u(e,t,n={}){return d(e.map(e=>l(e,t)),n)}function d(e,t={}){let n={type:`FeatureCollection`};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function f(e,t,n={}){return r({type:`MultiLineString`,coordinates:e},t,n)}function p(e,t,n={}){return r({type:`MultiPoint`,coordinates:e},t,n)}function m(e,t,n={}){return r({type:`MultiPolygon`,coordinates:e},t,n)}function h(e,t,n={}){return r({type:`GeometryCollection`,geometries:e},t,n)}function g(e,t=0){if(t&&!(t>=0))throw Error(`precision must be a positive number`);let n=10**(t||0);return Math.round(e*n)/n}function _(e,n=`kilometers`){let r=t[n];if(!r)throw Error(n+` units is invalid`);return e*r}function v(e,n=`kilometers`){let r=t[n];if(!r)throw Error(n+` units is invalid`);return e/r}function y(e,t){return S(v(e,t))}function b(e){let t=e%360;return t<0&&(t+=360),t}function x(e){return e%=360,e>180?e-360:e<-180?e+360:e}function S(e){return e%(2*Math.PI)*180/Math.PI}function C(e){return e%360*Math.PI/180}function w(e,t=`kilometers`,n=`kilometers`){if(!(e>=0))throw Error(`length must be a positive number`);return _(v(e,t),n)}function T(e,t=`meters`,r=`kilometers`){if(!(e>=0))throw Error(`area must be a positive number`);let i=n[t];if(!i)throw Error(`invalid original units`);let a=n[r];if(!a)throw Error(`invalid final units`);return e/i*a}function E(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function D(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function O(e){if(!e)throw Error(`bbox is required`);if(!Array.isArray(e))throw Error(`bbox must be an Array`);if(e.length!==4&&e.length!==6)throw Error(`bbox must be an Array of 4 or 6 numbers`);e.forEach(e=>{if(!E(e))throw Error(`bbox must only contain numbers`)})}function k(e){if(!e)throw Error(`id is required`);if([`string`,`number`].indexOf(typeof e)===-1)throw Error(`id must be a number or a string`)}export{n as areaFactors,x as azimuthToBearing,b as bearingToAzimuth,T as convertArea,w as convertLength,C as degreesToRadians,e as earthRadius,t as factors,r as feature,d as featureCollection,i as geometry,h as geometryCollection,E as isNumber,D as isObject,y as lengthToDegrees,v as lengthToRadians,l as lineString,u as lineStrings,f as multiLineString,p as multiPoint,m as multiPolygon,a as point,o as points,s as polygon,c as polygons,S as radiansToDegrees,_ as radiansToLength,g as round,O as validateBBox,k as validateId}; +var e=6371008.8,t={centimeters:e*100,centimetres:e*100,cm:e*100,degrees:360/(2*Math.PI),deg:360/(2*Math.PI),feet:e*3.28084,ft:e*3.28084,inches:e*39.37,in:e*39.37,kilometers:e/1e3,kilometres:e/1e3,km:e/1e3,meters:e,metres:e,m:e,miles:e/1609.344,mi:e/1609.344,millimeters:e*1e3,millimetres:e*1e3,mm:e*1e3,nauticalmiles:e/1852,nmi:e/1852,radians:1,rad:1,yards:e*1.0936,yd:e*1.0936},n={acres:247105e-9,ac:247105e-9,centimeters:1e4,centimetres:1e4,cm:1e4,feet:10.763910417,ft:10.763910417,hectares:1e-4,ha:1e-4,inches:1550.003100006,in:1550.003100006,kilometers:1e-6,kilometres:1e-6,km:1e-6,meters:1,metres:1,m:1,miles:386e-9,mi:386e-9,nauticalmiles:2.9155334959812285e-7,nmi:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,mm:1e6,yards:1.195990046,yd:1.195990046};function r(e,t,n={}){let r={type:`Feature`};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function i(e,t,n={}){switch(e){case`Point`:return a(t).geometry;case`LineString`:return l(t).geometry;case`Polygon`:return s(t).geometry;case`MultiPoint`:return p(t).geometry;case`MultiLineString`:return f(t).geometry;case`MultiPolygon`:return m(t).geometry;default:throw Error(e+` is invalid`)}}function a(e,t,n={}){if(!e)throw Error(`coordinates is required`);if(!Array.isArray(e))throw Error(`coordinates must be an Array`);if(e.length<2)throw Error(`coordinates must be at least 2 numbers long`);if(!E(e[0])||!E(e[1]))throw Error(`coordinates must contain numbers`);return r({type:`Point`,coordinates:e},t,n)}function o(e,t,n={}){return d(e.map(e=>a(e,t)),n)}function s(e,t,n={}){for(let t of e){if(t.length<4)throw Error(`Each LinearRing of a Polygon must have 4 or more Positions.`);if(t[t.length-1].length!==t[0].length)throw Error(`First and last Position are not equivalent.`);for(let e=0;es(e,t)),n)}function l(e,t,n={}){if(e.length<2)throw Error(`coordinates must be an array of two or more positions`);return r({type:`LineString`,coordinates:e},t,n)}function u(e,t,n={}){return d(e.map(e=>l(e,t)),n)}function d(e,t={}){let n={type:`FeatureCollection`};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function f(e,t,n={}){return r({type:`MultiLineString`,coordinates:e},t,n)}function p(e,t,n={}){return r({type:`MultiPoint`,coordinates:e},t,n)}function m(e,t,n={}){return r({type:`MultiPolygon`,coordinates:e},t,n)}function h(e,t,n={}){return r({type:`GeometryCollection`,geometries:e},t,n)}function g(e,t=0){if(t&&!(t>=0))throw Error(`precision must be a positive number`);let n=10**(t||0);return Math.round(e*n)/n}function _(e,n=`kilometers`){let r=t[n];if(!r)throw Error(n+` units is invalid`);return e*r}function v(e,n=`kilometers`){let r=t[n];if(!r)throw Error(n+` units is invalid`);return e/r}function y(e,t){return S(v(e,t))}function b(e){let t=e%360;return t<0&&(t+=360),t}function x(e){return e%=360,e>180?e-360:e<-180?e+360:e}function S(e){return e%(2*Math.PI)*180/Math.PI}function C(e){return e%360*Math.PI/180}function w(e,t=`kilometers`,n=`kilometers`){if(!(e>=0))throw Error(`length must be a positive number`);return _(v(e,t),n)}function T(e,t=`meters`,r=`kilometers`){if(!(e>=0))throw Error(`area must be a positive number`);let i=n[t];if(!i)throw Error(`invalid original units`);let a=n[r];if(!a)throw Error(`invalid final units`);return e/i*a}function E(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function D(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function O(e){delete e.bbox,e.type===`Feature`?e.geometry&&O(e.geometry):e.type===`FeatureCollection`?e.features.forEach(O):e.type===`GeometryCollection`&&e.geometries.forEach(O)}function k(e){if(!e)throw Error(`bbox is required`);if(!Array.isArray(e))throw Error(`bbox must be an Array`);if(e.length!==4&&e.length!==6)throw Error(`bbox must be an Array of 4 or 6 numbers`);e.forEach(e=>{if(!E(e))throw Error(`bbox must only contain numbers`)})}function A(e){if(!e)throw Error(`id is required`);if([`string`,`number`].indexOf(typeof e)===-1)throw Error(`id must be a number or a string`)}export{n as areaFactors,x as azimuthToBearing,b as bearingToAzimuth,T as convertArea,w as convertLength,C as degreesToRadians,e as earthRadius,t as factors,r as feature,d as featureCollection,i as geometry,h as geometryCollection,E as isNumber,D as isObject,y as lengthToDegrees,v as lengthToRadians,l as lineString,u as lineStrings,f as multiLineString,p as multiPoint,m as multiPolygon,a as point,o as points,s as polygon,c as polygons,S as radiansToDegrees,_ as radiansToLength,O as removeBbox,g as round,k as validateBBox,A as validateId};