FeiXianKuangChanJianGuan/public/turf/turf-7.0.0.min.js

61 lines
619 KiB
JavaScript
Raw Normal View History

2026-02-04 11:06:40 +08:00
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).turf={})}(this,(function(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function o(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=u(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function h(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var f="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function g(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})})),n}var y,v,d=Object.prototype.toString,m=function(t){
/**
* splaytree v3.1.2
* Fast Splay tree for Node and browser
*
* @author Alexander Milevski <info@w8r.name>
* @license MIT
* @preserve
*/
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function nd(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Wv(Hv,"lineDissolve"),Wv(Zv,"coordId"),Wv(Jv,"mergeLineStrings"),Wv($v,"polygonDissolve"),Wv(Qv,"dissolve"),Wv(Kv,"getHomogenousType"),Wv(td,"concave"),Wv(ed,"removeDuplicates");var rd=function(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null};function id(t,e){return t>e?1:t<e?-1:0}function od(t,e,n){for(var r=new rd(null,null),i=r,o=r;;){var a=n(t,e.key);if(a<0){if(null===e.left)break;if(n(t,e.left.key)<0){var s=e.left;if(e.left=s.right,s.right=e,null===(e=s).left)break}o.left=e,o=e,e=e.left}else{if(!(a>0))break;if(null===e.right)break;if(n(t,e.right.key)>0){s=e.right;if(e.right=s.left,s.left=e,null===(e=s).right)break}i.right=e,i=e,e=e.right}}return i.right=e.left,o.left=e.right,e.left=r.right,e.right=r.left,e}function ad(t,e,n,r){var i=new rd(t,e);if(null===n)return i.left=i.right=null,i;var o=r(t,(n=od(t,n,r)).key);return o<0?(i.left=n.left,i.right=n,n.left=null):o>=0&&(i.right=n.right,i.left=n,n.right=null),i}function sd(t,e,n){var r=null,i=null;if(e){var o=n((e=od(t,e,n)).key,t);0===o?(r=e.left,i=e.right):o<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function ud(t,e,n,r,i){if(t){r(e+(n?"└── ":"├── ")+i(t)+"\n");var o=e+(n?" ":"│ ");t.left&&ud(t.left,o,!1,r,i),t.right&&ud(t.right,o,!0,r,i)}}var ld=function(){function t(t){void 0===t&&(t=id),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=ad(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new rd(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,i=od(t,this._root,r),o=r(t,i.key);return 0===o?this._root=i:(o<0?(n.left=i.left,n.right=i,i.left=null):o>0&&(n.right=i.right,n.left=i,i.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var r;return null===e?null:0===n(t,(e=od(t,e,n)).key)?(null===e.left?r=e.right:(r=od(t,e.left,n)).right=e.right,this._size--,r):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=od(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=od(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},t.prototype.range=function(t,e,n,r){for(var i=[],o=this._comparator,a=this._root;0!==i.length||a;)if(a)i.push(a),a=a.lef
/*!
* Copyright (c) 2019, Dane Springmeyer
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var Lm=Object.defineProperty;function Rm(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];if(jl(t,(function(t){n.push(t.coordinates)})),n.length<2)throw new Error("Must specify at least 2 geometries");var r=Ud.intersection.apply(Ud,[n[0]].concat(s(n.slice(1))));return 0===r.length?null:1===r.length?Cu(r[0],e.properties):qu(r,e.properties)}!function(t,e){Lm(t,"name",{value:e,configurable:!0})}(Rm,"intersect");var Cm=Object.defineProperty,Tm=function(t,e){return Cm(t,"name",{value:e,configurable:!0})};function Am(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=JSON.stringify(n.properties||{}),i=a(t,4),o=i[0],s=i[1],u=i[2],l=i[3],c=(s+l)/2,h=(o+u)/2,f=2*e/_l([o,c],[u,c],n)*(u-o),p=2*e/_l([h,s],[h,l],n)*(l-s),g=f/2,y=2*g,v=Math.sqrt(3)/2*p,d=u-o,m=l-s,_=3/4*y,b=v,x=(d-y)/(y-g/2),E=Math.floor(x),w=(E*_-g/2-d)/2-g/2+_/2,k=Math.floor((m-v)/v),S=(m-k*v)/2,I=k*v-m>v/2;I&&(S-=v/4);for(var P=[],N=[],M=0;M<6;M++){var O=2*Math.PI/6*M;P.push(Math.cos(O)),N.push(Math.sin(O))}for(var L=[],R=0;R<=E;R++)for(var C=0;C<=k;C++){var T=R%2==1;if((0!==C||!T)&&(0!==C||!I)){var A=R*_+o-w,D=C*b+s+S;if(T&&(D-=v/2),!0===n.triangles)jm([A,D],f/2,p/2,JSON.parse(r),P,N).forEach((function(t){n.mask?Rm(ju([n.mask,t]))&&L.push(t):L.push(t)}));else{var j=Dm([A,D],f/2,p/2,JSON.parse(r),P,N);n.mask?Rm(ju([n.mask,j]))&&L.push(j):L.push(j)}}}return ju(L)}function Dm(t,e,n,r,i,o){for(var a=[],s=0;s<6;s++){var u=t[0]+e*i[s],l=t[1]+n*o[s];a.push([u,l])}return a.push(a[0].slice()),Cu([a],r)}function jm(t,e,n,r,i,o){for(var a=[],s=0;s<6;s++){var u=[];u.push(t),u.push([t[0]+e*i[s],t[1]+n*o[s]]),u.push([t[0]+e*i[(s+1)%6],t[1]+n*o[(s+1)%6]]),u.push(t),a.push(Cu([u],r))}return a}Tm(Am,"hexGrid"),Tm(Dm,"hexagon"),Tm(jm,"hexTriangles");var Fm=Object.defineProperty;function Bm(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.mask&&!n.units&&(n.units="kilometers");for(var r=[],i=t[0],o=t[1],a=t[2],s=t[3],u=e/_l([i,o],[a,o],n)*(a-i),l=e/_l([i,o],[i,s],n)*(s-o),c=a-i,h=s-o,f=Math.floor(c/u),p=(h-Math.floor(h/l)*l)/2,g=i+(c-f*u)/2;g<=a;){for(var y=o+p;y<=s;){var v=Lu([g,y],n.properties);n.mask?Jf(v,n.mask)&&r.push(v):r.push(v),y+=l}g+=u}return ju(r)}!function(t,e){Fm(t,"name",{value:e,configurable:!0})}(Bm,"pointGrid");var qm=Object.defineProperty;function Vm(t,e,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=[],o=t[0],a=t[1],s=t[2],u=t[3],l=s-o,c=Zu(e,r.units,"degrees"),h=u-a,f=Zu(n,r.units,"degrees"),p=Math.floor(Math.abs(l)/c),g=Math.floor(Math.abs(h)/f),y=(h-g*f)/2,v=o+(l-p*c)/2,d=0;d<p;d++){for(var m=a+y,_=0;_<g;_++){var b=Cu([[[v,m],[v,m+f],[v+c,m+f],[v+c,m],[v,m]]],r.properties);r.mask?Gh(r.mask,b)&&i.push(b):i.push(b),m+=f}v+=c}return ju(i)}!function(t,e){qm(t,"name",{value:e,configurable:!0})}(Vm,"rectangleGrid");var Gm=Object.defineProperty;function Ym(t,e){return Vm(t,e,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}!function(t,e){Gm(t,"name",{value:e,configurable:!0})}(Ym,"squareGrid");var zm=Object.defineProperty;function Um(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=[],i=e/_l([t[0],t[1]],[t[2],t[1]],n)*(t[2]-t[0]),o=e/_l([t[0],t[1]],[t[0],t[3]],n)*(t[3]-t[1]),a=0,s=t[0];s<=t[2];){for(var u=0,l=t[1];l<=t[3];){var c=null,h=null;a%2==0&&u%2==0?(c=Cu([[[s,l],[s,l+o],[s+i,l],[s,l]]],n.properties),h=Cu([[[s,l+o],[s+i,l+o],[s+i,l],[s,l+o]]],n.properties)):a%2==0&&u%2==1?(c=Cu([[[s,l],[s+i,l+o],[s+i,l],[s,l]]],n.properties),h=Cu([[[s,l],[s,l+o],[s+i,l+o],[s,l]]],n.properties)):u%2==0&&a%2==1?(c=Cu([[[s,l],[s,l+o],[s+i,l+o],[s,l]]],n.properties),h=Cu([[[s,l],[s+i,l+o],[s+i,l],[s,l]]],n.properties)):u%2==1&&a%2==1&&(c=Cu([[[s,l],[s,l+o],[s+i,l],[s,l]]],n.properties),h=Cu([[[s,l+o],[s+i,l+o],[s+i,l],[s,l+o]]],n.properties)),n.mask?(Rm(ju([n.mask,c]))&&r.push(c),Rm(ju([n.mask,h]))&&r.push(h)):(r.push(c),r.push(h)),l+=o,u++}a++,s+=i}return ju(r)}!function(t,e){zm(t,"name",{value:e,configurable:!0})}(Um,"triangleGrid");var Xm=Object.defineProperty;function Wm(t,n,r){if("object"!==e(r=r||{}))throw new Error("options is invalid");var i=r.g
/*!
* MarchingSquaresJS
* version 1.3.3
* https://github.com/RaumZeit/MarchingSquares.js
*
* @license GNU Affero General Public License.
* Copyright (c) 2015-2019 Ronny Lorenz <ronny@tbi.univie.ac.at>
*/
function Hm(t,e,n){return t<e?(n-t)/(e-t):(t-n)/(t-e)}function Zm(t,e,n,r){var i;return n>r&&(i=n,n=r,r=i),t<e?t<n?(n-t)/(e-t):(r-t)/(e-t):t>r?(t-r)/(t-e):(t-n)/(t-e)}function Jm(t,e,n,r){return t<e?(n-t)/(e-t):(t-r)/(t-e)}function $m(t,e,n,r){return t<e?(r-t)/(e-t):(t-n)/(t-e)}function Qm(){this.successCallback=null,this.verbose=!1,this.polygons=!1,this.polygons_full=!1,this.linearRing=!0,this.noQuadTree=!1,this.noFrame=!1}function Km(t,e,n,r){var i=[];return t.polygons.forEach((function(t){t.forEach((function(t){t[0]+=e,t[1]+=n})),r.linearRing&&t.push(t[0]),i.push(t)})),i}function t_(t,e,n,r){return 0===n?(t+=1,e+=r[0][1]):1===n?t+=r[0][0]:2===n?e+=r[0][1]:3===n&&(t+=r[0][0],e+=1),[t,e]}function e_(t,e,n){return 0===n?t++:1===n||(2===n?e++:3===n&&(t++,e++)),[t,e]}function n_(t,e,n,r,i){var o=r,a=i,s=0,u=0;if(this.x=e,this.y=n,this.lowerBound=null,this.upperBound=null,this.childA=null,this.childB=null,this.childC=null,this.childD=null,1===r&&1===i)this.lowerBound=Math.min(t[n][e],t[n][e+1],t[n+1][e+1],t[n+1][e]),this.upperBound=Math.max(t[n][e],t[n][e+1],t[n+1][e+1],t[n+1][e]);else{if(r>1){for(;0!==o;)o>>=1,s++;r===1<<s-1&&s--,o=1<<s-1}if(i>1){for(;0!==a;)a>>=1,u++;i===1<<u-1&&u--,a=1<<u-1}this.childA=new n_(t,e,n,o,a),this.lowerBound=this.childA.lowerBound,this.upperBound=this.childA.upperBound,r-o>0&&(this.childB=new n_(t,e+o,n,r-o,a),this.lowerBound=Math.min(this.lowerBound,this.childB.lowerBound),this.upperBound=Math.max(this.upperBound,this.childB.upperBound),i-a>0&&(this.childC=new n_(t,e+o,n+a,r-o,i-a),this.lowerBound=Math.min(this.lowerBound,this.childC.lowerBound),this.upperBound=Math.max(this.upperBound,this.childC.upperBound))),i-a>0&&(this.childD=new n_(t,e,n+a,o,i-a),this.lowerBound=Math.min(this.lowerBound,this.childD.lowerBound),this.upperBound=Math.max(this.upperBound,this.childD.upperBound))}}function r_(t){var e,n;if(!t)throw new Error("data is required");if(!Array.isArray(t)||!Array.isArray(t[0]))throw new Error("data must be scalar field, i.e. array of arrays");if(t.length<2)throw new Error("data must contain at least two rows");if((n=t[0].length)<2)throw new Error("data must contain at least two columns");for(e=1;e<t.length;e++){if(!Array.isArray(t[e]))throw new Error("Row "+e+" is not an array");if(t[e].length!=n)throw new Error("unequal row lengths detected, please provide a regular grid")}this.data=t,this.root=new n_(t,0,0,t[0].length-1,t.length-1)}function i_(t,n,r){var i,o,a,s=!1,u=!1,l=null,c=null,h=null,f=null,p=null,g=[];if(!t)throw new Error("data is required");if(null==n)throw new Error("threshold is required");if(r&&"object"!==e(r))throw new Error("options must be an object");if(i=function(t){var e,n,r,i,o;for(i=new Qm,t=t||{},o=Object.keys(i),e=0;e<o.length;e++)null!=(r=t[n=o[e]])&&(i[n]=r);return i.polygons_full=!i.polygons,i.interpolate=Hm,i}(r),t instanceof r_)l=t,c=t.root,h=t.data,i.noQuadTree||(s=!0);else{if(!Array.isArray(t)||!Array.isArray(t[0]))throw new Error("input is neither array of arrays nor object retrieved from 'QuadTree()'");h=t}if(Array.isArray(n)){for(u=!0,i.noQuadTree||(s=!0),o=0;o<n.length;o++)if(isNaN(+n[o]))throw new Error("threshold["+o+"] is not a number")}else{if(isNaN(+n))throw new Error("threshold must be a number or array of numbers");n=[n]}return s&&!c&&(l=new r_(h),c=l.root,h=l.data),i.verbose&&(i.polygons?console.log("MarchingSquaresJS-isoLines: returning single lines (polygons) for each grid cell"):console.log("MarchingSquaresJS-isoLines: returning line paths (polygons) for entire data grid"),u&&console.log("MarchingSquaresJS-isoLines: multiple lines requested, returning array of line paths instead of lines for a single threshold")),n.forEach((function(t,n){if(p=[],i.threshold=t,i.verbose&&console.log("MarchingSquaresJS-isoLines: computing iso lines for threshold "+t),i.polygons)if(s)c.cellsBelowThreshold(i.threshold,!0).forEach((function(t){p=p.concat(Km(o_(h,t.x,t.y,i),t.x,t.y,i))}));else for(a=0;a<h.length-1;++a)for(n=0;n<h[0].length-1;++n)p=p.concat(Km(o_(h,n,a,i),n,a,i));else{for(f=[],n=0;n<h[0].length-1;++n)f[n]=[];if(s)c.cellsBelowThreshold(i.thre