bcgis-base
Version:
The SDK is based on Cesium for secondary development of 2, 3D all-in-one WebGis application framework, the framework optimizes the use of Cesium and add some additional features, designed for developers to quickly build WebGis applications.
2 lines • 4.51 MB
JavaScript
/*! For license information please see bcgis.base.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("BC",[],t):"object"==typeof exports?exports.BC=t():e.BC=t()}(self,(()=>(()=>{var __webpack_modules__={9705:(e,t,n)=>{"use strict";var i=n(1540);function r(e){var t=[1/0,1/0,-1/0,-1/0];return i.coordEach(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}r.default=r,t.Z=r},7269:function(e){e.exports=function(){"use strict";function e(n,i,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,c=i-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),h=.5*Math.sqrt(l*u*(a-u)/a)*(c-a/2<0?-1:1);e(n,i,Math.max(r,Math.floor(i-c*u/a+h)),Math.min(o,Math.floor(i+(a-c)*u/a+h)),s)}var d=n[i],p=r,f=o;for(t(n,r,i),s(n[o],d)>0&&t(n,r,o);p<f;){for(t(n,p,f),p++,f--;s(n[p],d)<0;)p++;for(;s(n[f],d)>0;)f--}0===s(n[r],d)?t(n,r,f):t(n,++f,o),f<=i&&(r=f+1),i<=f&&(o=f-1)}}function t(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function n(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,o,s){e(t,i,r||0,o||t.length-1,s||n)}}()},67:(e,t,n)=>{"use strict";e.exports=r,e.exports.default=r;var i=n(7269);function r(e,t){if(!(this instanceof r))return new r(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function o(e,t,n){if(!n)return t.indexOf(e);for(var i=0;i<t.length;i++)if(n(e,t[i]))return i;return-1}function s(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,i,r){r||(r=m(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,s=t;s<n;s++)o=e.children[s],c(r,e.leaf?i(o):o);return r}function c(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function f(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function m(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,t,n,r,o){for(var s,a=[t,n];a.length;)(n=a.pop())-(t=a.pop())<=r||(s=t+Math.ceil((n-t)/r/2)*r,i(e,s,t,n,o),a.push(t,s,s,n))}r.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,n=[],i=this.toBBox;if(!f(e,t))return n;for(var r,o,s,a,c=[];t;){for(r=0,o=t.children.length;r<o;r++)s=t.children[r],f(e,a=t.leaf?i(s):s)&&(t.leaf?n.push(s):p(e,a)?this._all(s,n):c.push(s));t=c.pop()}return n},collides:function(e){var t=this.data,n=this.toBBox;if(!f(e,t))return!1;for(var i,r,o,s,a=[];t;){for(i=0,r=t.children.length;i<r;i++)if(o=t.children[i],f(e,s=t.leaf?n(o):o)){if(t.leaf||p(e,s))return!0;a.push(o)}t=a.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}var i=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(e,t){if(!e)return this;for(var n,i,r,s,a=this.data,c=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),i=l[l.length-1],n=u.pop(),s=!0),a.leaf&&-1!==(r=o(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;s||a.leaf||!p(a,c)?i?(n++,a=i.children[n],s=!1):a=null:(l.push(a),u.push(n),n=0,i=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},_build:function(e,t,n,i){var r,o=n-t+1,a=this._maxEntries;if(o<=a)return s(r=m(e.slice(t,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,i-1))),(r=m([])).leaf=!1,r.height=i;var c,l,u,h,d=Math.ceil(o/a),p=d*Math.ceil(Math.sqrt(a));for(g(e,t,n,p,this.compareMinX),c=t;c<=n;c+=p)for(g(e,c,u=Math.min(c+p-1,n),d,this.compareMinY),l=c;l<=u;l+=d)h=Math.min(l+d-1,u),r.children.push(this._build(e,l,h,i-1));return s(r,this.toBBox),r},_chooseSubtree:function(e,t,n,i){for(var r,o,s,a,c,l,u,d,p,f;i.push(t),!t.leaf&&i.length-1!==n;){for(u=d=1/0,r=0,o=t.children.length;r<o;r++)c=h(s=t.children[r]),p=e,f=s,(l=(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-c)<d?(d=l,u=c<u?c:u,a=s):l===d&&c<u&&(u=c,a=s);t=a||t.children[0]}return t},_insert:function(e,t,n){var i=this.toBBox,r=n?e:i(e),o=[],s=this._chooseSubtree(r,this.data,t,o);for(s.children.push(e),c(s,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var n=e[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),a=m(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,s(n,this.toBBox),s(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(e,t){this.data=m([e,t]),this.data.height=e.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,n){var i,r,o,s,c,l,u,d,p,f,m,g,_,y;for(l=u=1/0,i=t;i<=n-t;i++)p=r=a(e,0,i,this.toBBox),f=o=a(e,i,n,this.toBBox),void 0,void 0,void 0,void 0,m=Math.max(p.minX,f.minX),g=Math.max(p.minY,f.minY),_=Math.min(p.maxX,f.maxX),y=Math.min(p.maxY,f.maxY),s=Math.max(0,_-m)*Math.max(0,y-g),c=h(r)+h(o),s<l?(l=s,d=i,u=c<u?c:u):s===l&&c<u&&(u=c,d=i);return d},_chooseSplitAxis:function(e,t,n){var i=e.leaf?this.compareMinX:l,r=e.leaf?this.compareMinY:u;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)},_allDistMargin:function(e,t,n,i){e.children.sort(i);var r,o,s=this.toBBox,l=a(e,0,t,s),u=a(e,n-t,n,s),h=d(l)+d(u);for(r=t;r<n-t;r++)o=e.children[r],c(l,e.leaf?s(o):o),h+=d(l);for(r=n-t-1;r>=t;r--)o=e.children[r],c(u,e.leaf?s(o):o),h+=d(u);return h},_adjustParentBBoxes:function(e,t,n){for(var i=n;i>=0;i--)c(t[i],e)},_condense:function(e){for(var t,n=e.length-1;n>=0;n--)0===e[n].children.length?n>0?(t=e[n-1].children).splice(t.indexOf(e[n]),1):this.clear():s(e[n],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},4102:(e,t)=>{"use strict";function n(e,t,n){void 0===n&&(n={});var i={type:"Feature"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=t||{},i.geometry=e,i}function i(e,t,i){if(void 0===i&&(i={}),!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:e},t,i)}function r(e,t,i){void 0===i&&(i={});for(var r=0,o=e;r<o.length;r++){var s=o[r];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}return n({type:"Polygon",coordinates:e},t,i)}function o(e,t,i){if(void 0===i&&(i={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return n({type:"LineString",coordinates:e},t,i)}function s(e,t){void 0===t&&(t={});var n={type:"FeatureCollection"};return t.id&&(n.id=t.id),t.bbox&&(n.bbox=t.bbox),n.features=e,n}function a(e,t,i){return void 0===i&&(i={}),n({type:"MultiLineString",coordinates:e},t,i)}function c(e,t,i){return void 0===i&&(i={}),n({type:"MultiPoint",coordinates:e},t,i)}function l(e,t,i){return void 0===i&&(i={}),n({type:"MultiPolygon",coordinates:e},t,i)}function u(e,n){void 0===n&&(n="kilometers");var i=t.factors[n];if(!i)throw new Error(n+" units is invalid");return e*i}function h(e,n){void 0===n&&(n="kilometers");var i=t.factors[n];if(!i)throw new Error(n+" units is invalid");return e/i}function d(e){return e%(2*Math.PI)*180/Math.PI}function p(e){return!isNaN(e)&&null!==e&&!Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.earthRadius=6371008.8,t.factors={centimeters:100*t.earthRadius,centimetres:100*t.earthRadius,degrees:t.earthRadius/111325,feet:3.28084*t.earthRadius,inches:39.37*t.earthRadius,kilometers:t.earthRadius/1e3,kilometres:t.earthRadius/1e3,meters:t.earthRadius,metres:t.earthRadius,miles:t.earthRadius/1609.344,millimeters:1e3*t.earthRadius,millimetres:1e3*t.earthRadius,nauticalmiles:t.earthRadius/1852,radians:1,yards:1.0936*t.earthRadius},t.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/t.earthRadius,yards:1.0936133},t.areaFactors={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,millimeters:1e6,millimetres:1e6,yards:1.195990046},t.feature=n,t.geometry=function(e,t,n){switch(void 0===n&&(n={}),e){case"Point":return i(t).geometry;case"LineString":return o(t).geometry;case"Polygon":return r(t).geometry;case"MultiPoint":return c(t).geometry;case"MultiLineString":return a(t).geometry;case"MultiPolygon":return l(t).geometry;default:throw new Error(e+" is invalid")}},t.point=i,t.points=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return i(e,t)})),n)},t.polygon=r,t.polygons=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return r(e,t)})),n)},t.lineString=o,t.lineStrings=function(e,t,n){return void 0===n&&(n={}),s(e.map((function(e){return o(e,t)})),n)},t.featureCollection=s,t.multiLineString=a,t.multiPoint=c,t.multiPolygon=l,t.geometryCollection=function(e,t,i){return void 0===i&&(i={}),n({type:"GeometryCollection",geometries:e},t,i)},t.round=function(e,t){if(void 0===t&&(t=0),t&&!(t>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,t||0);return Math.round(e*n)/n},t.radiansToLength=u,t.lengthToRadians=h,t.lengthToDegrees=function(e,t){return d(h(e,t))},t.bearingToAzimuth=function(e){var t=e%360;return t<0&&(t+=360),t},t.radiansToDegrees=d,t.degreesToRadians=function(e){return e%360*Math.PI/180},t.convertLength=function(e,t,n){if(void 0===t&&(t="kilometers"),void 0===n&&(n="kilometers"),!(e>=0))throw new Error("length must be a positive number");return u(h(e,t),n)},t.convertArea=function(e,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(e>=0))throw new Error("area must be a positive number");var r=t.areaFactors[n];if(!r)throw new Error("invalid original units");var o=t.areaFactors[i];if(!o)throw new Error("invalid final units");return e/r*o},t.isNumber=p,t.isObject=function(e){return!!e&&e.constructor===Object},t.validateBBox=function(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach((function(e){if(!p(e))throw new Error("bbox must only contain numbers")}))},t.validateId=function(e){if(!e)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw new Error("id must be a number or a string")}},1540:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4102);function r(e,t,n){if(null!==e)for(var i,o,s,a,c,l,u,h,d=0,p=0,f=e.type,m="FeatureCollection"===f,g="Feature"===f,_=m?e.features.length:1,y=0;y<_;y++){c=(h=!!(u=m?e.features[y].geometry:g?e.geometry:e)&&"GeometryCollection"===u.type)?u.geometries.length:1;for(var v=0;v<c;v++){var A=0,b=0;if(null!==(a=h?u.geometries[v]:u)){l=a.coordinates;var w=a.type;switch(d=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===t(l,p,y,A,b))return!1;p++,A++;break;case"LineString":case"MultiPoint":for(i=0;i<l.length;i++){if(!1===t(l[i],p,y,A,b))return!1;p++,"MultiPoint"===w&&A++}"LineString"===w&&A++;break;case"Polygon":case"MultiLineString":for(i=0;i<l.length;i++){for(o=0;o<l[i].length-d;o++){if(!1===t(l[i][o],p,y,A,b))return!1;p++}"MultiLineString"===w&&A++,"Polygon"===w&&b++}"Polygon"===w&&A++;break;case"MultiPolygon":for(i=0;i<l.length;i++){for(b=0,o=0;o<l[i].length;o++){for(s=0;s<l[i][o].length-d;s++){if(!1===t(l[i][o][s],p,y,A,b))return!1;p++}b++}A++}break;case"GeometryCollection":for(i=0;i<a.geometries.length;i++)if(!1===r(a.geometries[i],t,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(e,t){var n;switch(e.type){case"FeatureCollection":for(n=0;n<e.features.length&&!1!==t(e.features[n].properties,n);n++);break;case"Feature":t(e.properties,0)}}function s(e,t){if("Feature"===e.type)t(e,0);else if("FeatureCollection"===e.type)for(var n=0;n<e.features.length&&!1!==t(e.features[n],n);n++);}function a(e,t){var n,i,r,o,s,a,c,l,u,h,d=0,p="FeatureCollection"===e.type,f="Feature"===e.type,m=p?e.features.length:1;for(n=0;n<m;n++){for(a=p?e.features[n].geometry:f?e.geometry:e,l=p?e.features[n].properties:f?e.properties:{},u=p?e.features[n].bbox:f?e.bbox:void 0,h=p?e.features[n].id:f?e.id:void 0,s=(c=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,r=0;r<s;r++)if(null!==(o=c?a.geometries[r]:a))switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(o,d,l,u,h))return!1;break;case"GeometryCollection":for(i=0;i<o.geometries.length;i++)if(!1===t(o.geometries[i],d,l,u,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,d,l,u,h))return!1;d++}}function c(e,t){a(e,(function(e,n,r,o,s){var a,c=null===e?null:e.type;switch(c){case null:case"Point":case"LineString":case"Polygon":return!1!==t(i.feature(e,r,{bbox:o,id:s}),n,0)&&void 0}switch(c){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var l=0;l<e.coordinates.length;l++){var u={type:a,coordinates:e.coordinates[l]};if(!1===t(i.feature(u,r),n,l))return!1}}))}function l(e,t){c(e,(function(e,n,o){var s=0;if(e.geometry){var a=e.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var c,l=0,u=0,h=0;return!1!==r(e,(function(r,a,d,p,f){if(void 0===c||n>l||p>u||f>h)return c=r,l=n,u=p,h=f,void(s=0);var m=i.lineString([c,r],e.properties);if(!1===t(m,n,o,f,s))return!1;s++,c=r}))&&void 0}}}))}function u(e,t){if(!e)throw new Error("geojson is required");c(e,(function(e,n,r){if(null!==e.geometry){var o=e.geometry.type,s=e.geometry.coordinates;switch(o){case"LineString":if(!1===t(e,n,r,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===t(i.lineString(s[a],e.properties),n,r,a))return!1}}}))}t.coordAll=function(e){var t=[];return r(e,(function(e){t.push(e)})),t},t.coordEach=r,t.coordReduce=function(e,t,n,i){var o=n;return r(e,(function(e,i,r,s,a){o=0===i&&void 0===n?e:t(o,e,i,r,s,a)}),i),o},t.featureEach=s,t.featureReduce=function(e,t,n){var i=n;return s(e,(function(e,r){i=0===r&&void 0===n?e:t(i,e,r)})),i},t.findPoint=function(e,t){if(t=t||{},!i.isObject(t))throw new Error("options is invalid");var n,r=t.featureIndex||0,o=t.multiFeatureIndex||0,s=t.geometryIndex||0,a=t.coordIndex||0,c=t.properties;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),c=c||e.features[r].properties,n=e.features[r].geometry;break;case"Feature":c=c||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":return i.point(l,c,t);case"MultiPoint":return o<0&&(o=l.length+o),i.point(l[o],c,t);case"LineString":return a<0&&(a=l.length+a),i.point(l[a],c,t);case"Polygon":return s<0&&(s=l.length+s),a<0&&(a=l[s].length+a),i.point(l[s][a],c,t);case"MultiLineString":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a),i.point(l[o][a],c,t);case"MultiPolygon":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),a<0&&(a=l[o][s].length-a),i.point(l[o][s][a],c,t)}throw new Error("geojson is invalid")},t.findSegment=function(e,t){if(t=t||{},!i.isObject(t))throw new Error("options is invalid");var n,r=t.featureIndex||0,o=t.multiFeatureIndex||0,s=t.geometryIndex||0,a=t.segmentIndex||0,c=t.properties;switch(e.type){case"FeatureCollection":r<0&&(r=e.features.length+r),c=c||e.features[r].properties,n=e.features[r].geometry;break;case"Feature":c=c||e.properties,n=e.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=e;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var l=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=l.length+a-1),i.lineString([l[a],l[a+1]],c,t);case"Polygon":return s<0&&(s=l.length+s),a<0&&(a=l[s].length+a-1),i.lineString([l[s][a],l[s][a+1]],c,t);case"MultiLineString":return o<0&&(o=l.length+o),a<0&&(a=l[o].length+a-1),i.lineString([l[o][a],l[o][a+1]],c,t);case"MultiPolygon":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),a<0&&(a=l[o][s].length-a-1),i.lineString([l[o][s][a],l[o][s][a+1]],c,t)}throw new Error("geojson is invalid")},t.flattenEach=c,t.flattenReduce=function(e,t,n){var i=n;return c(e,(function(e,r,o){i=0===r&&0===o&&void 0===n?e:t(i,e,r,o)})),i},t.geomEach=a,t.geomReduce=function(e,t,n){var i=n;return a(e,(function(e,r,o,s,a){i=0===r&&void 0===n?e:t(i,e,r,o,s,a)})),i},t.lineEach=u,t.lineReduce=function(e,t,n){var i=n;return u(e,(function(e,r,o,s){i=0===r&&void 0===n?e:t(i,e,r,o,s)})),i},t.propEach=o,t.propReduce=function(e,t,n){var i=n;return o(e,(function(e,r){i=0===r&&void 0===n?e:t(i,e,r)})),i},t.segmentEach=l,t.segmentReduce=function(e,t,n){var i=n,r=!1;return l(e,(function(e,o,s,a,c){i=!1===r&&void 0===n?e:t(i,e,o,s,a,c),r=!0})),i}},9538:function(e){e.exports=function(){"use strict";function e(n,i,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,c=i-r+1,l=Math.log(a),u=.5*Math.exp(2*l/3),h=.5*Math.sqrt(l*u*(a-u)/a)*(c-a/2<0?-1:1);e(n,i,Math.max(r,Math.floor(i-c*u/a+h)),Math.min(o,Math.floor(i+(a-c)*u/a+h)),s)}var d=n[i],p=r,f=o;for(t(n,r,i),s(n[o],d)>0&&t(n,r,o);p<f;){for(t(n,p,f),p++,f--;s(n[p],d)<0;)p++;for(;s(n[f],d)>0;)f--}0===s(n[r],d)?t(n,r,f):t(n,++f,o),f<=i&&(r=f+1),i<=f&&(o=f-1)}}function t(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function n(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,o,s){e(t,i,r||0,o||t.length-1,s||n)}}()},4860:(e,t,n)=>{"use strict";e.exports=r,e.exports.default=r;var i=n(9538);function r(e,t){if(!(this instanceof r))return new r(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&this._initFormat(t),this.clear()}function o(e,t,n){if(!n)return t.indexOf(e);for(var i=0;i<t.length;i++)if(n(e,t[i]))return i;return-1}function s(e,t){a(e,0,e.children.length,t,e)}function a(e,t,n,i,r){r||(r=m(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,s=t;s<n;s++)o=e.children[s],c(r,e.leaf?i(o):o);return r}function c(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function l(e,t){return e.minX-t.minX}function u(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function d(e){return e.maxX-e.minX+(e.maxY-e.minY)}function p(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function f(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function m(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,t,n,r,o){for(var s,a=[t,n];a.length;)(n=a.pop())-(t=a.pop())<=r||(s=t+Math.ceil((n-t)/r/2)*r,i(e,s,t,n,o),a.push(t,s,s,n))}r.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,n=[],i=this.toBBox;if(!f(e,t))return n;for(var r,o,s,a,c=[];t;){for(r=0,o=t.children.length;r<o;r++)s=t.children[r],f(e,a=t.leaf?i(s):s)&&(t.leaf?n.push(s):p(e,a)?this._all(s,n):c.push(s));t=c.pop()}return n},collides:function(e){var t=this.data,n=this.toBBox;if(!f(e,t))return!1;for(var i,r,o,s,a=[];t;){for(i=0,r=t.children.length;i<r;i++)if(o=t.children[i],f(e,s=t.leaf?n(o):o)){if(t.leaf||p(e,s))return!0;a.push(o)}t=a.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}var i=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(e,t){if(!e)return this;for(var n,i,r,s,a=this.data,c=this.toBBox(e),l=[],u=[];a||l.length;){if(a||(a=l.pop(),i=l[l.length-1],n=u.pop(),s=!0),a.leaf&&-1!==(r=o(e,a.children,t)))return a.children.splice(r,1),l.push(a),this._condense(l),this;s||a.leaf||!p(a,c)?i?(n++,a=i.children[n],s=!1):a=null:(l.push(a),u.push(n),n=0,i=a,a=a.children[0])}return this},toBBox:function(e){return e},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var n=[];e;)e.leaf?t.push.apply(t,e.children):n.push.apply(n,e.children),e=n.pop();return t},_build:function(e,t,n,i){var r,o=n-t+1,a=this._maxEntries;if(o<=a)return s(r=m(e.slice(t,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,i-1))),(r=m([])).leaf=!1,r.height=i;var c,l,u,h,d=Math.ceil(o/a),p=d*Math.ceil(Math.sqrt(a));for(g(e,t,n,p,this.compareMinX),c=t;c<=n;c+=p)for(g(e,c,u=Math.min(c+p-1,n),d,this.compareMinY),l=c;l<=u;l+=d)h=Math.min(l+d-1,u),r.children.push(this._build(e,l,h,i-1));return s(r,this.toBBox),r},_chooseSubtree:function(e,t,n,i){for(var r,o,s,a,c,l,u,d,p,f;i.push(t),!t.leaf&&i.length-1!==n;){for(u=d=1/0,r=0,o=t.children.length;r<o;r++)c=h(s=t.children[r]),p=e,f=s,(l=(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-c)<d?(d=l,u=c<u?c:u,a=s):l===d&&c<u&&(u=c,a=s);t=a||t.children[0]}return t},_insert:function(e,t,n){var i=this.toBBox,r=n?e:i(e),o=[],s=this._chooseSubtree(r,this.data,t,o);for(s.children.push(e),c(s,r);t>=0&&o[t].children.length>this._maxEntries;)this._split(o,t),t--;this._adjustParentBBoxes(r,o,t)},_split:function(e,t){var n=e[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),a=m(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,s(n,this.toBBox),s(a,this.toBBox),t?e[t-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(e,t){this.data=m([e,t]),this.data.height=e.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,n){var i,r,o,s,c,l,u,d,p,f,m,g,_,y;for(l=u=1/0,i=t;i<=n-t;i++)p=r=a(e,0,i,this.toBBox),f=o=a(e,i,n,this.toBBox),void 0,void 0,void 0,void 0,m=Math.max(p.minX,f.minX),g=Math.max(p.minY,f.minY),_=Math.min(p.maxX,f.maxX),y=Math.min(p.maxY,f.maxY),s=Math.max(0,_-m)*Math.max(0,y-g),c=h(r)+h(o),s<l?(l=s,d=i,u=c<u?c:u):s===l&&c<u&&(u=c,d=i);return d},_chooseSplitAxis:function(e,t,n){var i=e.leaf?this.compareMinX:l,r=e.leaf?this.compareMinY:u;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)},_allDistMargin:function(e,t,n,i){e.children.sort(i);var r,o,s=this.toBBox,l=a(e,0,t,s),u=a(e,n-t,n,s),h=d(l)+d(u);for(r=t;r<n-t;r++)o=e.children[r],c(l,e.leaf?s(o):o),h+=d(l);for(r=n-t-1;r>=t;r--)o=e.children[r],c(u,e.leaf?s(o):o),h+=d(u);return h},_adjustParentBBoxes:function(e,t,n){for(var i=n;i>=0;i--)c(t[i],e)},_condense:function(e){for(var t,n=e.length-1;n>=0;n--)0===e[n].children.length?n>0?(t=e[n-1].children).splice(t.indexOf(e[n]),1):this.clear():s(e[n],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}},9282:(e,t,n)=>{"use strict";var i=n(4155),r=n(5108);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var s,a,c=n(2136).codes,l=c.ERR_AMBIGUOUS_ARGUMENT,u=c.ERR_INVALID_ARG_TYPE,h=c.ERR_INVALID_ARG_VALUE,d=c.ERR_INVALID_RETURN_VALUE,p=c.ERR_MISSING_ARGS,f=n(5961),m=n(9539).inspect,g=n(9539).types,_=g.isPromise,y=g.isRegExp,v=Object.assign?Object.assign:n(8091).assign,A=Object.is?Object.is:n(609);function b(){var e=n(9158);s=e.isDeepEqual,a=e.isDeepStrictEqual}new Map;var w=!1,E=e.exports=S,C={};function T(e){if(e.message instanceof Error)throw e.message;throw new f(e)}function x(e,t,n,i){if(!n){var r=!1;if(0===t)r=!0,i="No value argument passed to `assert.ok()`";else if(i instanceof Error)throw i;var o=new f({actual:n,expected:!0,message:i,operator:"==",stackStartFn:e});throw o.generatedMessage=r,o}}function S(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];x.apply(void 0,[S,t.length].concat(t))}E.fail=function e(t,n,o,s,a){var c,l=arguments.length;if(0===l)c="Failed";else if(1===l)o=t,t=void 0;else{if(!1===w){w=!0;var u=i.emitWarning?i.emitWarning:r.warn.bind(r);u("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===l&&(s="!=")}if(o instanceof Error)throw o;var h={actual:t,expected:n,operator:void 0===s?"fail":s,stackStartFn:a||e};void 0!==o&&(h.message=o);var d=new f(h);throw c&&(d.message=c,d.generatedMessage=!0),d},E.AssertionError=f,E.ok=S,E.equal=function e(t,n,i){if(arguments.length<2)throw new p("actual","expected");t!=n&&T({actual:t,expected:n,message:i,operator:"==",stackStartFn:e})},E.notEqual=function e(t,n,i){if(arguments.length<2)throw new p("actual","expected");t==n&&T({actual:t,expected:n,message:i,operator:"!=",stackStartFn:e})},E.deepEqual=function e(t,n,i){if(arguments.length<2)throw new p("actual","expected");void 0===s&&b(),s(t,n)||T({actual:t,expected:n,message:i,operator:"deepEqual",stackStartFn:e})},E.notDeepEqual=function e(t,n,i){if(arguments.length<2)throw new p("actual","expected");void 0===s&&b(),s(t,n)&&T({actual:t,expected:n,message:i,operator:"notDeepEqual",stackStartFn:e})},E.deepStrictEqual=function e(t,n,i){if(arguments.length<2)throw new p("actual","expected");void 0===s&&b(),a(t,n)||T({actual:t,expected:n,message:i,operator:"deepStrictEqual",stackStartFn:e})},E.notDeepStrictEqual=function e(t,n,i){if(arguments.length<2)throw new p("actual","expected");void 0===s&&b(),a(t,n)&&T({actual:t,expected:n,message:i,operator:"notDeepStrictEqual",stackStartFn:e})},E.strictEqual=function e(t,n,i){if(arguments.length<2)throw new p("actual","expected");A(t,n)||T({actual:t,expected:n,message:i,operator:"strictEqual",stackStartFn:e})},E.notStrictEqual=function e(t,n,i){if(arguments.length<2)throw new p("actual","expected");A(t,n)&&T({actual:t,expected:n,message:i,operator:"notStrictEqual",stackStartFn:e})};var I=function e(t,n,i){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n.forEach((function(e){e in t&&(void 0!==i&&"string"==typeof i[e]&&y(t[e])&&t[e].test(i[e])?r[e]=i[e]:r[e]=t[e])}))};function D(e,t,n,i,r,o){if(!(n in e)||!a(e[n],t[n])){if(!i){var s=new I(e,r),c=new I(t,r,e),l=new f({actual:s,expected:c,operator:"deepStrictEqual",stackStartFn:o});throw l.actual=e,l.expected=t,l.operator=o.name,l}T({actual:e,expected:t,message:i,operator:o.name,stackStartFn:o})}}function O(e,t,n,i){if("function"!=typeof t){if(y(t))return t.test(e);if(2===arguments.length)throw new u("expected",["Function","RegExp"],t);if("object"!==o(e)||null===e){var r=new f({actual:e,expected:t,message:n,operator:"deepStrictEqual",stackStartFn:i});throw r.operator=i.name,r}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(0===a.length)throw new h("error",t,"may not be an empty object");return void 0===s&&b(),a.forEach((function(r){"string"==typeof e[r]&&y(t[r])&&t[r].test(e[r])||D(e,t,r,n,a,i)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function P(e){if("function"!=typeof e)throw new u("fn","Function",e);try{e()}catch(e){return e}return C}function R(e){return _(e)||null!==e&&"object"===o(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function M(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!R(t=e()))throw new d("instance of Promise","promiseFn",t)}else{if(!R(e))throw new u("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return C})).catch((function(e){return e}))}))}function N(e,t,n,i){if("string"==typeof n){if(4===arguments.length)throw new u("error",["Object","Error","Function","RegExp"],n);if("object"===o(t)&&null!==t){if(t.message===n)throw new l("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===n)throw new l("error/message",'The error "'.concat(t,'" is identical to the message.'));i=n,n=void 0}else if(null!=n&&"object"!==o(n)&&"function"!=typeof n)throw new u("error",["Object","Error","Function","RegExp"],n);if(t===C){var r="";n&&n.name&&(r+=" (".concat(n.name,")")),r+=i?": ".concat(i):".";var s="rejects"===e.name?"rejection":"exception";T({actual:void 0,expected:n,operator:e.name,message:"Missing expected ".concat(s).concat(r),stackStartFn:e})}if(n&&!O(t,n,i,e))throw t}function L(e,t,n,i){if(t!==C){if("string"==typeof n&&(i=n,n=void 0),!n||O(t,n)){var r=i?": ".concat(i):".",o="doesNotReject"===e.name?"rejection":"exception";T({actual:t,expected:n,operator:e.name,message:"Got unwanted ".concat(o).concat(r,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function B(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];x.apply(void 0,[B,t.length].concat(t))}E.throws=function e(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];N.apply(void 0,[e,P(t)].concat(i))},E.rejects=function e(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return M(t).then((function(t){return N.apply(void 0,[e,t].concat(i))}))},E.doesNotThrow=function e(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];L.apply(void 0,[e,P(t)].concat(i))},E.doesNotReject=function e(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return M(t).then((function(t){return L.apply(void 0,[e,t].concat(i))}))},E.ifError=function e(t){if(null!=t){var n="ifError got unwanted exception: ";"object"===o(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?n+=t.constructor.name:n+=t.message:n+=m(t);var i=new f({actual:t,expected:null,operator:"ifError",message:n,stackStartFn:e}),r=t.stack;if("string"==typeof r){var s=r.split("\n");s.shift();for(var a=i.stack.split("\n"),c=0;c<s.length;c++){var l=a.indexOf(s[c]);if(-1!==l){a=a.slice(0,l);break}}i.stack="".concat(a.join("\n"),"\n").concat(s.join("\n"))}throw i}},E.strict=v(B,E,{equal:E.strictEqual,deepEqual:E.deepStrictEqual,notEqual:E.notStrictEqual,notDeepEqual:E.notDeepStrictEqual}),E.strict.strict=E.strict},5961:(e,t,n)=>{"use strict";var i=n(4155);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function s(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?a(e):t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return u(e,arguments,d(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),h(i,e)},c(e)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=l()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&h(r,n.prototype),r},u.apply(null,arguments)}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}var f=n(9539).inspect,m=n(2136).codes.ERR_INVALID_ARG_TYPE;function g(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}var _="",y="",v="",A="",b={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function E(e){return f(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var C=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==p(e)||null===e)throw new m("options","Object",e);var r=e.message,o=e.operator,c=e.stackStartFn,l=e.actual,u=e.expected,h=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)n=s(this,d(t).call(this,String(r)));else if(i.stderr&&i.stderr.isTTY&&(i.stderr&&i.stderr.getColorDepth&&1!==i.stderr.getColorDepth()?(_="[34m",y="[32m",A="[39m",v="[31m"):(_="",y="",A="",v="")),"object"===p(l)&&null!==l&&"object"===p(u)&&null!==u&&"stack"in l&&l instanceof Error&&"stack"in u&&u instanceof Error&&(l=w(l),u=w(u)),"deepStrictEqual"===o||"strictEqual"===o)n=s(this,d(t).call(this,function(e,t,n){var r="",o="",s=0,a="",c=!1,l=E(e),u=l.split("\n"),h=E(t).split("\n"),d=0,f="";if("strictEqual"===n&&"object"===p(e)&&"object"===p(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===u.length&&1===h.length&&u[0]!==h[0]){var m=u[0].length+h[0].length;if(m<=10){if(!("object"===p(e)&&null!==e||"object"===p(t)&&null!==t||0===e&&0===t))return"".concat(b[n],"\n\n")+"".concat(u[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==n&&m<(i.stderr&&i.stderr.isTTY?i.stderr.columns:80)){for(;u[0][d]===h[0][d];)d++;d>2&&(f="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",d),"^"),d=0)}}for(var w=u[u.length-1],C=h[h.length-1];w===C&&(d++<2?a="\n ".concat(w).concat(a):r=w,u.pop(),h.pop(),0!==u.length&&0!==h.length);)w=u[u.length-1],C=h[h.length-1];var T=Math.max(u.length,h.length);if(0===T){var x=l.split("\n");if(x.length>30)for(x[26]="".concat(_,"...").concat(A);x.length>27;)x.pop();return"".concat(b.notIdentical,"\n\n").concat(x.join("\n"),"\n")}d>3&&(a="\n".concat(_,"...").concat(A).concat(a),c=!0),""!==r&&(a="\n ".concat(r).concat(a),r="");var S=0,I=b[n]+"\n".concat(y,"+ actual").concat(A," ").concat(v,"- expected").concat(A),D=" ".concat(_,"...").concat(A," Lines skipped");for(d=0;d<T;d++){var O=d-s;if(u.length<d+1)O>1&&d>2&&(O>4?(o+="\n".concat(_,"...").concat(A),c=!0):O>3&&(o+="\n ".concat(h[d-2]),S++),o+="\n ".concat(h[d-1]),S++),s=d,r+="\n".concat(v,"-").concat(A," ").concat(h[d]),S++;else if(h.length<d+1)O>1&&d>2&&(O>4?(o+="\n".concat(_,"...").concat(A),c=!0):O>3&&(o+="\n ".concat(u[d-2]),S++),o+="\n ".concat(u[d-1]),S++),s=d,o+="\n".concat(y,"+").concat(A," ").concat(u[d]),S++;else{var P=h[d],R=u[d],M=R!==P&&(!g(R,",")||R.slice(0,-1)!==P);M&&g(P,",")&&P.slice(0,-1)===R&&(M=!1,R+=","),M?(O>1&&d>2&&(O>4?(o+="\n".concat(_,"...").concat(A),c=!0):O>3&&(o+="\n ".concat(u[d-2]),S++),o+="\n ".concat(u[d-1]),S++),s=d,o+="\n".concat(y,"+").concat(A," ").concat(R),r+="\n".concat(v,"-").concat(A," ").concat(P),S+=2):(o+=r,r="",1!==O&&0!==d||(o+="\n ".concat(R),S++))}if(S>20&&d<T-2)return"".concat(I).concat(D,"\n").concat(o,"\n").concat(_,"...").concat(A).concat(r,"\n")+"".concat(_,"...").concat(A)}return"".concat(I).concat(c?D:"","\n").concat(o).concat(r).concat(a).concat(f)}(l,u,o)));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var f=b[o],C=E(l).split("\n");if("notStrictEqual"===o&&"object"===p(l)&&null!==l&&(f=b.notStrictEqualObject),C.length>30)for(C[26]="".concat(_,"...").concat(A);C.length>27;)C.pop();n=1===C.length?s(this,d(t).call(this,"".concat(f," ").concat(C[0]))):s(this,d(t).call(this,"".concat(f,"\n\n").concat(C.join("\n"),"\n")))}else{var T=E(l),x="",S=b[o];"notDeepEqual"===o||"notEqual"===o?(T="".concat(b[o],"\n\n").concat(T)).length>1024&&(T="".concat(T.slice(0,1021),"...")):(x="".concat(E(u)),T.length>512&&(T="".concat(T.slice(0,509),"...")),x.length>512&&(x="".concat(x.slice(0,509),"...")),"deepEqual"===o||"equal"===o?T="".concat(S,"\n\n").concat(T,"\n\nshould equal\n\n"):x=" ".concat(o," ").concat(x)),n=s(this,d(t).call(this,"".concat(T).concat(x)))}return Error.stackTraceLimit=h,n.generatedMessage=!r,Object.defineProperty(a(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=l,n.expected=u,n.operator=o,Error.captureStackTrace&&Error.captureStackTrace(a(n),c),n.stack,n.name="AssertionError",s(n)}var n,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(t,e),n=t,c=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:f.custom,value:function(e,t){return f(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){r(e,t,n[t])}))}return e}({},t,{customInspect:!1,depth:0}))}}],c&&o(n.prototype,c),t}(c(Error));e.exports=C},2136:(e,t,n)=>{"use strict";function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}var s,a,c={};function l(e,t,n){n||(n=Error);var s=function(n){function s(n,o,a){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c=function(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,r(s).call(this,function(e,n,i){return"string"==typeof t?t:t(e,n,i)}(n,o,a))),c.code=e,c}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,n),s}(n);c[e]=s}function u(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",(function(e,t,r){var o,a,c,l,h;if(void 0===s&&(s=n(9282)),s("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))c="The ".concat(e," ").concat(o," ").concat(u(t,"type"));else{var d=("number"!=typeof h&&(h=0),h+".".length>(l=e).length||-1===l.indexOf(".",h)?"argument":"property");c='The "'.concat(e,'" ').concat(d," ").concat(o," ").concat(u(t,"type"))}return c+". Received type ".concat(i(r))}),TypeError),l("ERR_INVALID_ARG_VALUE",(function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===a&&(a=n(9539));var r=a.inspect(t);return r.length>128&&(r="".concat(r.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(i,". Received ").concat(r)}),TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var r;return r=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(i(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(r,".")}),TypeError),l("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];void 0===s&&(s=n(9282)),s(t.length>0,"At least one arg needs to be specified");var r="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:r+="".concat(t[0]," argument");break;case 2:r+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:r+=t.slice(0,o-1).join(", "),r+=", and ".concat(t[o-1]," arguments")}return"".concat(r," must be specified")}),TypeError),e.exports.codes=c},9158:(e,t,n)=>{"use strict";function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{i||null==a.return||a.return()}finally{if(r)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},a=function(e){var t=[];return e.forEach((function(e,n){return t.push([n,e])})),t},c=Object.is?Object.is:n(609),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},u=Number.isNaN?Number.isNaN:n(360);function h(e){return e.call.bind(e)}var d=h(Object.prototype.hasOwnProperty),p=h(Object.prototype.propertyIsEnumerable),f=h(Object.prototype.toString),m=n(9539).types,g=m.isAnyArrayBuffer,_=m.isArrayBufferView,y=m.isDate,v=m.isMap,A=m.isRegExp,b=m.isSet,w=m.isNativeError,E=m.isBoxedPrimitive,C=m.isNumberObject,T=m.isStringObject,x=m.isBooleanObject,S=m.isBigIntObject,I=m.isSymbolObject,D=m.isFloat32Array,O=m.isFloat64Array;function P(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(n<48||n>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function R(e){return Object.keys(e).filter(P).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function M(e,t){if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);r<o;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0}function N(e,t,n,i){if(e===t)return 0!==e||!n||c(e,t);if(n){if("object"!==r(e))return"number"==typeof e&&u(e)&&u(t);if("object"!==r(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==r(e))return(null===t||"object"!==r(t))&&e==t;if(null===t||"object"!==r(t))return!1}var s,a,l,h,d=f(e);if(d!==f(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var p=R(e),m=R(t);return p.length===m.length&&B(e,t,n,i,1,p)}if("[object Object]"===d&&(!v(e)&&v(t)||!b(e)&&b(t)))return!1;if(y(e)){if(!y(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(A(e)){if(!A(t)||(l=e,h=t,!(o?l.source===h.source&&l.flags===h.flags:RegExp.prototype.toString.call(l)===RegExp.prototype.toString.call(h))))return!1}else if(w(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(_(e)){if(n||!D(e)&&!O(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===M(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0}(e,t))return!1;var P=R(e),N=R(t);return P.length===N.length&&B(e,t,n,i,0,P)}if(b(e))return!(!b(t)||e.size!==t.size)&&B(e,t,n,i,2);if(v(e))return!(!v(t)||e.size!==t.size)&&B(e,t,n,i,3);if(g(e)){if(a=t,(s=e).byteLength!==a.byteLength||0!==M(new Uint8Array(s),new Uint8Array(a)))return!1}else if(E(e)&&!function(e,t){return C(e)?C(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):T(e)?T(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):x(e)?x(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):S(e)?S(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):I(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return B(e,t,n,i,0)}function L(e,t){return t.filter((function(t){return p(e,t)}))}function B(e,t,n,i,r,o){if(5===arguments.length){o=Object.keys(e);var s=Object.keys(t);if(o.length!==s.length)return!1}for(var a=0;a<o.length;a++)if(!d(t,o[a]))return!1;if(n&&5===arguments.length){var c=l(e);if(0!==c.length){var u=0;for(a=0;a<c.length;a++){var h=c[a];if(p(e,h)){if(!p(t,h))return!1;o.push(h),u++}else if(p(t,h))return!1}var f=l(t);if(c.length!==f.length&&L(t,f).length!==u)return!1}else{var m=l(t);if(0!==m.length&&0!==L(t,m).length)return!1}}if(0===o.length&&(0===r||1===r&&0===e.length||0===e.size))return!0;if(void 0===i)i={val1:new Map,val2:new Map,position:0};else{var g=i.val1.get(e);if(void 0!==g){var _=i.val2.get(t);if(void 0!==_)return g===_}i.position++}i.val1.set(e,i.position),i.val2.set(t,i.position);var y=G(e,t,n,o,i,r);return i.val1.delete(e),i.val2.delete(t),y}function F(e,t,n,i){for(var r=s(e),o=0;o<r.length;o++){var a=r[o];if(N(t,a,n,i))return e.delete(a),!0}return!1}function k(e){switch(r(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(u(e))return!1}return!0}function z(e,t,n){var i=k(n);return null!=i?i:t.has(i)&&!e.has(i)}function U(e,t,n,i,r){var o=k(n);if(null!=o)return o;var s=t.get(o);return!(void 0===s&&!t.has(o)||!N(i,s,!1,r))&&!e.has(o)&&N(i,s,!1,r)}function V(e,t,n,i,r,o){for(var a=s(e),c=0;c<a.length;c++){var l=a[c];if(N(n,l,r,o)&&N(i,t.get(l),r,o))return e.delete(l),!0}return!1}function G(e,t,n,o,c,l){var u=0;if(2===l){if(!function(e,t,n,i){for(var o=null,a=s(e),c=0;c<a.length;c++){var l=a[c];if("object"===r(l)&&null!==l)null===o&&(o=new Set),o.add(l);else if(!t.has(l)){if(n)return!1;if(!z(e,t,l))return!1;null===o&&(o=new Set),o.add(l)}}if(null!==o){for(var u=s(t),h=0;h<u.length;h++){var d=u[h];if("object"===r(d)&&null!==d){if(!F(o,d,n,i))return!1}else if(!n&&!e.has(d)&&!F(o,d,n,i))return!1}return 0===o.size}return!0}(e,t,n,c))return!1}else if(3===l){if(!function(e,t,n,o){for(var s=null,c=a(e),l=0;l<c.length;l++){var u=i(c[l],2),h=u[0],d=u[1];if("object"===r(h)&&null!==h)null===s&&(s=new Set),s.add(h);else{var p=t.get(h);if(void 0===p&&!t.has(h)||!N(d,p,n,o)){if(n)return!1;if(!U(e,t,h,d,o))return!1;null===s&&(s=new Set),s.add(h)}}}if(null!==s){for(var f=a(t),m=0;m<f.length;m++){var g=i(f[m],2),_=(h=g[0],g[1]);if("object"===r(h)&&null!==h){if(!V(s,e,h,_,n,o))return!1}else if(!(n||e.has(h)&&N(e.get(h),_,!1,o)||V(s,e,h,_,!1,o)))return!1}return 0===s.size}return!0}(e,t,n,c))return!1}else if(1===l)for(;u<e.length;u++){if(!d(e,u)){if(d(t,u))return!1;for(var h=Object.ke