New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@camptocamp/ogc-client

Package Overview
Dependencies
Maintainers
5
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@camptocamp/ogc-client - npm Package Compare versions

Comparing version 0.3.2 to 0.3.3

34

dist/shared/http-utils.js

@@ -64,1 +64,35 @@ import { parseXmlString } from './xml-utils';

}
/**
* Add or replace query params in the url; note that params are considered case insensitive,
* meaning that existing params in different cases will be removed as well.
* Also, if the url ends with an encoded URL (typically in the case of urls run through a CORS
* proxy, which is an aberration and should be forbidden btw), then the encoded URL
* will be modified instead.
* @param {string} url
* @param {Object.<string, string>} params
* @returns {string}
*/
export function setQueryParams(url, params) {
const encodedUrlMatch = url.match(/(https?%3A%2F%2F[^/]+)$/);
if (encodedUrlMatch) {
const encodedUrl = encodedUrlMatch[1];
const modifiedUrl = setQueryParams(decodeURIComponent(encodedUrl), params);
return url.replace(encodedUrl, encodeURIComponent(modifiedUrl));
}
const urlObj = new URL(url);
const keys = Object.keys(params);
const keysLower = keys.map((key) => key.toLowerCase());
const toDelete = [];
for (const param of urlObj.searchParams.keys()) {
if (keysLower.indexOf(param.toLowerCase()) > -1) {
toDelete.push(param);
}
}
toDelete.map((param) => urlObj.searchParams.delete(param));
keys.forEach((key) =>
urlObj.searchParams.set(key, params[key] === true ? '' : params[key])
);
return urlObj.toString();
}

13

dist/wfs/endpoint.js
import { EndpointError } from '../shared/errors';
import { parseWfsCapabilities, queryWfsFeatureTypeDetails } from '../worker';
import { queryXmlDocument } from '../shared/http-utils';
import { queryXmlDocument, setQueryParams } from '../shared/http-utils';
import { parseFeatureTypeInfo } from './featuretypeinfo';

@@ -96,8 +96,2 @@ import { useCache } from '../shared/cache';

constructor(url) {
const capabilitiesUrl = new URL(url);
capabilitiesUrl.searchParams.delete('service');
capabilitiesUrl.searchParams.set('SERVICE', 'WFS');
capabilitiesUrl.searchParams.delete('request');
capabilitiesUrl.searchParams.set('REQUEST', 'GetCapabilities');
/**

@@ -107,3 +101,6 @@ * @type {string}

*/
this._capabilitiesUrl = capabilitiesUrl.toString();
this._capabilitiesUrl = setQueryParams(url, {
SERVICE: 'WFS',
REQUEST: 'GetCapabilities',
});

@@ -110,0 +107,0 @@ /**

@@ -0,1 +1,3 @@

import { setQueryParams } from '../shared/http-utils';
/**

@@ -30,27 +32,25 @@ * Generates an URL for a GetFeature operation

const countParam = version === '2.0.0' ? 'COUNT' : 'MAXFEATURES';
const url = new URL(serviceUrl);
url.searchParams.set('SERVICE', 'WFS');
url.searchParams.set('REQUEST', 'GetFeature');
url.searchParams.set('VERSION', version);
url.searchParams.set(typeParam, featureType);
if (outputFormat !== undefined)
url.searchParams.set('OUTPUTFORMAT', outputFormat);
if (attributes !== undefined)
url.searchParams.set('PROPERTYNAME', attributes.join(','));
const newParams = {
SERVICE: 'WFS',
REQUEST: 'GetFeature',
VERSION: version,
[typeParam]: featureType,
};
if (outputFormat !== undefined) newParams.OUTPUTFORMAT = outputFormat;
if (attributes !== undefined) newParams.PROPERTYNAME = attributes.join(',');
if (hitsOnly) {
url.searchParams.set('RESULTTYPE', 'hits');
url.searchParams.set(countParam, '1'); // in case the RESULTTYPE param is not supported
newParams.RESULTTYPE = 'hits';
newParams[countParam] = '1'; // in case the RESULTTYPE param is not supported
} else if (maxFeatures !== undefined)
url.searchParams.set(countParam, maxFeatures.toString(10));
newParams[countParam] = maxFeatures.toString(10);
if (outputCrs) {
url.searchParams.set('SRSNAME', outputCrs);
newParams.SRSNAME = outputCrs;
}
if (extent) {
const extentJoined = extent.join(',');
url.searchParams.set(
'BBOX',
extentCrs ? `${extentJoined},${extentCrs}` : extentJoined
);
newParams.BBOX = extentCrs ? `${extentJoined},${extentCrs}` : extentJoined;
}
return url.toString();
return setQueryParams(serviceUrl, newParams);
}

@@ -71,8 +71,8 @@

const typeParam = version === '2.0.0' ? 'TYPENAMES' : 'TYPENAME';
const url = new URL(serviceUrl);
url.searchParams.set('SERVICE', 'WFS');
url.searchParams.set('REQUEST', 'DescribeFeatureType');
url.searchParams.set('VERSION', version);
url.searchParams.set(typeParam, featureType);
return url.toString();
return setQueryParams(serviceUrl, {
SERVICE: 'WFS',
REQUEST: 'DescribeFeatureType',
VERSION: version,
[typeParam]: featureType,
});
}
import { EndpointError } from '../shared/errors';
import { parseWmsCapabilities } from '../worker';
import { useCache } from '../shared/cache';
import { setQueryParams } from '../shared/http-utils';

@@ -52,7 +53,6 @@ /**

constructor(url) {
const capabilitiesUrl = new URL(url);
capabilitiesUrl.searchParams.delete('service');
capabilitiesUrl.searchParams.set('SERVICE', 'WMS');
capabilitiesUrl.searchParams.delete('request');
capabilitiesUrl.searchParams.set('REQUEST', 'GetCapabilities');
const capabilitiesUrl = setQueryParams(url, {
SERVICE: 'WMS',
REQUEST: 'GetCapabilities',
});

@@ -65,6 +65,6 @@ /**

this._capabilitiesPromise = useCache(
() => parseWmsCapabilities(capabilitiesUrl.toString()),
() => parseWmsCapabilities(capabilitiesUrl),
'WMS',
'CAPABILITIES',
capabilitiesUrl.toString()
capabilitiesUrl
).then(({ info, layers, version }) => {

@@ -71,0 +71,0 @@ this._info = info;

@@ -8,3 +8,3 @@ import { sendTaskRequest } from './utils';

if (!workerInstance) {
workerInstance = new Worker(URL.createObjectURL(new Blob(["function t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function e(t,e,r,n,i,o,a){try{var c=t[o](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,i)}function r(t){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=t.apply(r,n);function c(t){e(a,i,o,c,u,\"next\",t)}function u(t){e(a,i,o,c,u,\"throw\",t)}c(void 0)}))}}function n(t){return n=\"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},n(t)}var i={exports:{}};!function(t){var e=function(t){var e,r=Object.prototype,i=r.hasOwnProperty,o=\"function\"==typeof Symbol?Symbol:{},a=o.iterator||\"@@iterator\",c=o.asyncIterator||\"@@asyncIterator\",u=o.toStringTag||\"@@toStringTag\";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},\"\")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),a=new T(n||[]);return o._invoke=function(t,e,r){var n=h;return function(i,o){if(n===v)throw new Error(\"Generator is already running\");if(n===m){if(\"throw\"===i)throw o;return N()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===d)continue;return c}}if(\"next\"===r.method)r.sent=r._sent=r.arg;else if(\"throw\"===r.method){if(n===h)throw n=m,r.arg;r.dispatchException(r.arg)}else\"return\"===r.method&&r.abrupt(\"return\",r.arg);n=v;var u=l(t,e,r);if(\"normal\"===u.type){if(n=r.done?m:p,u.arg===d)continue;return{value:u.arg,done:r.done}}\"throw\"===u.type&&(n=m,r.method=\"throw\",r.arg=u.arg)}}}(t,r,a),o}function l(t,e,r){try{return{type:\"normal\",arg:t.call(e,r)}}catch(t){return{type:\"throw\",arg:t}}}t.wrap=f;var h=\"suspendedStart\",p=\"suspendedYield\",v=\"executing\",m=\"completed\",d={};function y(){}function g(){}function S(){}var b={};b[a]=function(){return this};var E=Object.getPrototypeOf,P=E&&E(E(j([])));P&&P!==r&&i.call(P,a)&&(b=P);var O=S.prototype=y.prototype=Object.create(b);function x(t){[\"next\",\"throw\",\"return\"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,a,c,u){var s=l(t[o],t,a);if(\"throw\"!==s.type){var f=s.arg,h=f.value;return h&&\"object\"===n(h)&&i.call(h,\"__await\")?e.resolve(h.__await).then((function(t){r(\"next\",t,c,u)}),(function(t){r(\"throw\",t,c,u)})):e.resolve(h).then((function(t){f.value=t,c(f)}),(function(t){return r(\"throw\",t,c,u)}))}u(s.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}}function k(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,\"throw\"===r.method){if(t.iterator.return&&(r.method=\"return\",r.arg=e,k(t,r),\"throw\"===r.method))return d;r.method=\"throw\",r.arg=new TypeError(\"The iterator does not provide a 'throw' method\")}return d}var i=l(n,t.iterator,r.arg);if(\"throw\"===i.type)return r.method=\"throw\",r.arg=i.arg,r.delegate=null,d;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,\"return\"!==r.method&&(r.method=\"next\",r.arg=e),r.delegate=null,d):o:(r.method=\"throw\",r.arg=new TypeError(\"iterator result is not an object\"),r.delegate=null,d)}function R(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function G(t){var e=t.completion||{};e.type=\"normal\",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:\"root\"}],t.forEach(R,this),this.reset(!0)}function j(t){if(t){var r=t[a];if(r)return r.call(t);if(\"function\"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function r(){for(;++n<t.length;)if(i.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:N}}function N(){return{value:e,done:!0}}return g.prototype=O.constructor=S,S.constructor=g,g.displayName=s(S,u,\"GeneratorFunction\"),t.isGeneratorFunction=function(t){var e=\"function\"==typeof t&&t.constructor;return!!e&&(e===g||\"GeneratorFunction\"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,s(t,u,\"GeneratorFunction\")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},x(w.prototype),w.prototype[c]=function(){return this},t.AsyncIterator=w,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new w(f(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(O),s(O,u,\"Generator\"),O[a]=function(){return this},O.toString=function(){return\"[object Generator]\"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=e,this.tryEntries.forEach(G),!t)for(var r in this)\"t\"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(\"throw\"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,i){return c.type=\"throw\",c.arg=t,r.next=n,i&&(r.method=\"next\",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if(\"root\"===a.tryLoc)return n(\"end\");if(a.tryLoc<=this.prev){var u=i.call(a,\"catchLoc\"),s=i.call(a,\"finallyLoc\");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error(\"try statement without catch or finally\");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,\"finallyLoc\")&&this.prev<n.finallyLoc){var o=n;break}}o&&(\"break\"===t||\"continue\"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method=\"next\",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,e){if(\"throw\"===t.type)throw t.arg;return\"break\"===t.type||\"continue\"===t.type?this.next=t.arg:\"return\"===t.type?(this.rval=this.arg=t.arg,this.method=\"return\",this.next=\"end\"):\"normal\"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),G(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if(\"throw\"===n.type){var i=n.arg;G(r)}return i}}throw new Error(\"illegal catch attempt\")},delegateYield:function(t,r,n){return this.delegate={iterator:j(t),resultName:r,nextLoc:n},\"next\"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function(\"r\",\"regeneratorRuntime = r\")(e)}}(i);var o=i.exports;function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?a(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(t,e,n){var i=function(){var i=r(o.mark((function r(i){var a,u,s;return o.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if((a=i.data).taskName!==t){r.next=12;break}return r.prev=2,r.next=5,n(a.params);case 5:u=r.sent,r.next=11;break;case 8:r.prev=8,r.t0=r.catch(2),s=r.t0;case 11:e.postMessage(c(c({taskName:t,requestId:a.requestId},u&&{response:u}),s&&{error:s}));case 12:case\"end\":return r.stop()}}),r,null,[[2,8]])})));return function(t){return i.apply(this,arguments)}}();e.addEventListener(\"message\",i)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if(\"string\"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(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 l(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function p(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}function v(t,e){return!e||\"object\"!==n(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function d(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function y(t,e,r){return y=d()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&h(i,r.prototype),i},y.apply(null,arguments)}function g(t){var e=\"function\"==typeof Map?new Map:void 0;return g=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf(\"[native code]\")))return t;var r;if(\"function\"!=typeof t)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return y(t,arguments,m(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,t)},g(t)}function S(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e,r){return e&&S(t.prototype,e),r&&S(t,r),t}var E=function(){function t(e){l(this,t),this.chars=f(e),this.charCount=this.chars.length,this.charIndex=0,this.charsToBytes=new Array(this.charCount),this.multiByteMode=!1,this.string=e;var r=this.chars,n=this.charCount,i=this.charsToBytes;if(n===e.length)for(var o=0;o<n;++o)i[o]=o;else{for(var a=0,c=0;c<n;++c)i[c]=a,a+=r[c].length;this.multiByteMode=!0}}return b(t,[{key:\"isEnd\",get:function(){return this.charIndex>=this.charCount}},{key:\"_charLength\",value:function(t){var e=t.length;return e<2||!this.multiByteMode?e:t.replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\"_\").length}},{key:\"advance\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.charIndex=Math.min(this.charCount,this.charIndex+t)}},{key:\"consume\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.peek(t);return this.advance(t),e}},{key:\"consumeMatch\",value:function(t){if(!t.sticky)throw new Error('`regex` must have a sticky flag (\"y\")');t.lastIndex=this.charsToBytes[this.charIndex];var e=t.exec(this.string);if(null===e)return\"\";var r=e[0];return this.advance(this._charLength(r)),r}},{key:\"consumeMatchFn\",value:function(t){for(var e=this.charIndex;!this.isEnd&&t(this.peek());)this.advance();return this.charIndex>e?this.string.slice(this.charsToBytes[e],this.charsToBytes[this.charIndex]):\"\"}},{key:\"consumeString\",value:function(t){if(this.consumeStringFast(t))return t;if(!this.multiByteMode)return\"\";var e=t.length,r=this._charLength(t);return r!==e&&t===this.peek(r)?(this.advance(r),t):\"\"}},{key:\"consumeStringFast\",value:function(t){if(this.peek()===t[0]){var e=t.length;if(1===e)return this.advance(),t;if(this.peek(e)===t)return this.advance(e),t}return\"\"}},{key:\"consumeUntilMatch\",value:function(t){if(!t.global)throw new Error('`regex` must have a global flag (\"g\")');var e=this.charsToBytes[this.charIndex];t.lastIndex=e;var r=t.exec(this.string);if(null===r||r.index===e)return\"\";var n=this.string.slice(e,r.index);return this.advance(this._charLength(n)),n}},{key:\"consumeUntilString\",value:function(t){var e=this.charIndex,r=this.charsToBytes,n=this.string,i=r[e],o=n.indexOf(t,i);if(o<=0)return\"\";var a=n.slice(i,o);return this.advance(this._charLength(a)),a}},{key:\"peek\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(this.charIndex>=this.charCount)return\"\";if(1===t)return this.chars[this.charIndex];var e=this.charsToBytes,r=this.charIndex;return this.string.slice(e[r],e[r+t])}},{key:\"reset\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.charIndex=t>=0?Math.min(this.charCount,t):Math.max(0,this.charIndex+t)}}]),t}(),P=E,O={},x=Object.freeze(Object.assign(Object.create(null),{amp:\"&\",apos:\"'\",gt:\">\",lt:\"<\",quot:'\"'}));function w(t){if(k(t))return!0;var e=G(t);return 45===e||46===e||e>=48&&e<=57||183===e||e>=768&&e<=879||e>=8255&&e<=8256}function k(t){var e=G(t);return 58===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function R(t){var e=G(t);return 9===e||10===e||13===e||e>=32&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111}function G(t){return t.codePointAt(0)||-1}O.predefinedEntities=x,O.isNameChar=w,O.isNameStartChar=k,O.isNotXmlChar=function(t){return!R(t)},O.isReferenceChar=function(t){return\"#\"===t||w(t)},O.isWhitespace=function(t){var e=G(t);return 32===e||9===e||10===e||13===e},O.isXmlChar=R;var T=function(){function t(){l(this,t),this.parent=null}return b(t,[{key:\"document\",get:function(){return this.parent?this.parent.document:null}},{key:\"isRootNode\",get:function(){return!!this.parent&&this.parent===this.document}},{key:\"preserveWhitespace\",get:function(){return Boolean(this.parent&&this.parent.preserveWhitespace)}},{key:\"type\",get:function(){return\"\"}},{key:\"toJSON\",value:function(){var t={type:this.type};return this.isRootNode&&(t.isRootNode=!0),this.preserveWhitespace&&(t.preserveWhitespace=!0),t}}]),t}();T.TYPE_CDATA=\"cdata\",T.TYPE_COMMENT=\"comment\",T.TYPE_DOCUMENT=\"document\",T.TYPE_ELEMENT=\"element\",T.TYPE_PROCESSING_INSTRUCTION=\"pi\",T.TYPE_TEXT=\"text\";var j=T;function N(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}var C=j,F=function(t){p(r,C);var e=N(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";return l(this,r),(t=e.call(this)).text=n,t}return b(r,[{key:\"type\",get:function(){return C.TYPE_TEXT}},{key:\"toJSON\",value:function(){return Object.assign(C.prototype.toJSON.call(this),{text:this.text})}}]),r}(),L=F;function I(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}var A=j,M=L,B=function(t){p(r,M);var e=I(r);function r(){return l(this,r),e.apply(this,arguments)}return b(r,[{key:\"type\",get:function(){return A.TYPE_CDATA}}]),r}(),_=B;function D(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}var U=j,W=function(t){p(r,U);var e=D(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";return l(this,r),(t=e.call(this)).content=n,t}return b(r,[{key:\"type\",get:function(){return U.TYPE_COMMENT}},{key:\"toJSON\",value:function(){return Object.assign(U.prototype.toJSON.call(this),{content:this.content})}}]),r}(),X=W;function Y(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}var q=j,J=function(t){p(r,q);var e=Y(r);function r(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.create(null),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return l(this,r),(n=e.call(this)).name=t,n.attributes=i,n.children=o,n}return b(r,[{key:\"isEmpty\",get:function(){return 0===this.children.length}},{key:\"preserveWhitespace\",get:function(){for(var t=this;t instanceof r;){if(\"xml:space\"in t.attributes)return\"preserve\"===t.attributes[\"xml:space\"];t=t.parent}return!1}},{key:\"text\",get:function(){return this.children.map((function(t){return\"text\"in t?t.text:\"\"})).join(\"\")}},{key:\"type\",get:function(){return q.TYPE_ELEMENT}},{key:\"toJSON\",value:function(){return Object.assign(q.prototype.toJSON.call(this),{name:this.name,attributes:this.attributes,children:this.children.map((function(t){return t.toJSON()}))})}}]),r}(),V=J;function K(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}var $=V,z=j,H=function(t){p(r,z);var e=K(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return l(this,r),(t=e.call(this)).children=n,t}return b(r,[{key:\"document\",get:function(){return this}},{key:\"root\",get:function(){return this.children.find((function(t){return t instanceof $}))||null}},{key:\"text\",get:function(){return this.children.map((function(t){return\"text\"in t?t.text:\"\"})).join(\"\")}},{key:\"type\",get:function(){return z.TYPE_DOCUMENT}},{key:\"toJSON\",value:function(){return Object.assign(z.prototype.toJSON.call(this),{children:this.children.map((function(t){return t.toJSON()}))})}}]),r}(),Q=H;function Z(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}var tt=j,et=function(t){p(r,tt);var e=Z(r);function r(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";return l(this,r),(n=e.call(this)).name=t,n.content=i,n}return b(r,[{key:\"type\",get:function(){return tt.TYPE_PROCESSING_INSTRUCTION}},{key:\"toJSON\",value:function(){return Object.assign(tt.prototype.toJSON.call(this),{name:this.name,content:this.content})}}]),r}(),rt=et;function nt(t,e){var r;if(\"undefined\"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if(\"string\"==typeof t)return it(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===r&&t.constructor&&(r=t.constructor.name);if(\"Map\"===r||\"Set\"===r)return Array.from(t);if(\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return it(t,e)}(t))||e&&t&&\"number\"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},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,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw o}}}}function it(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ot=P,at=O,ct=_,ut=X,st=Q,ft=V,lt=rt,ht=L,pt=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(l(this,t),this.document=new st,this.currentNode=this.document,this.options=r,this.scanner=new ot(vt(e)),this.consumeProlog(),this.consumeElement()||this.error(\"Root element is missing or invalid\");this.consumeMisc(););this.scanner.isEnd||this.error(\"Extra content at the end of the document\")}return b(t,[{key:\"addNode\",value:function(t){t.parent=this.currentNode,this.currentNode.children.push(t)}},{key:\"addText\",value:function(t){var e=this.currentNode.children;if(e.length>0){var r=e[e.length-1];if(r instanceof ht)return void(r.text+=t)}this.addNode(new ht(t))}},{key:\"consumeAttributeValue\",value:function(){var t,e=this.scanner,r=e.peek();if('\"'!==r&&\"'\"!==r)return!1;e.advance();var n=!1,i=\"\",o='\"'===r?new RegExp('[^\"&<]+',\"y\"):new RegExp(\"[^'&<]+\",\"y\");t:for(;!e.isEnd;){switch((t=e.consumeMatch(o))&&(this.validateChars(t),i+=t.replace(/[\\t\\r\\n]/g,\" \")),e.peek()){case r:n=!0;break t;case\"&\":i+=this.consumeReference();continue;case\"<\":this.error(\"Unescaped `<` is not allowed in an attribute value\");break;case\"\":this.error(\"Unclosed attribute\")}}return n||this.error(\"Unclosed attribute\"),e.advance(),i}},{key:\"consumeCdataSection\",value:function(){var t=this.scanner;if(!t.consumeStringFast(\"<![CDATA[\"))return!1;var e=t.consumeUntilString(\"]]>\");return this.validateChars(e),t.consumeStringFast(\"]]>\")||this.error(\"Unclosed CDATA section\"),this.options.preserveCdata?this.addNode(new ct(e)):this.addText(e),!0}},{key:\"consumeCharData\",value:function(){var t=this.scanner,e=t.consumeUntilMatch(/<|&|]]>/g);return!!e&&(this.validateChars(e),\"]\"===t.peek()&&\"]]>\"===t.peek(3)&&this.error(\"Element content may not contain the CDATA section close delimiter `]]>`\"),this.addText(e),!0)}},{key:\"consumeComment\",value:function(){var t=this.scanner;if(!t.consumeStringFast(\"\\x3c!--\"))return!1;var e=t.consumeUntilString(\"--\");return this.validateChars(e),t.consumeStringFast(\"--\\x3e\")||(\"--\"===t.peek(2)?this.error(\"The string `--` isn't allowed inside a comment\"):this.error(\"Unclosed comment\")),this.options.preserveComments&&this.addNode(new ut(e.trim())),!0}},{key:\"consumeContentReference\",value:function(){var t=this.consumeReference();return!!t&&(this.addText(t),!0)}},{key:\"consumeDoctypeDeclaration\",value:function(){var t=this.scanner;return!(!t.consumeStringFast(\"<!DOCTYPE\")||!this.consumeWhitespace())&&(t.consumeMatch(new RegExp(\"[^[>]+\",\"y\")),t.consumeMatch(new RegExp(\"\\\\[[\\\\s\\\\S]+?\\\\][\\\\x20\\\\t\\\\r\\\\n]*>\",\"y\"))||t.consumeStringFast(\">\")||this.error(\"Unclosed doctype declaration\"),!0)}},{key:\"consumeElement\",value:function(){var t=this.scanner,e=t.charIndex;if(\"<\"!==t.peek())return!1;t.advance();var r=this.consumeName();if(!r)return t.reset(e),!1;for(var n=Object.create(null);this.consumeWhitespace();){var i=this.consumeName();if(i){var o=this.consumeEqual()&&this.consumeAttributeValue();!1===o&&this.error(\"Attribute value expected\"),i in n&&this.error(\"Duplicate attribute: \".concat(i)),\"xml:space\"===i&&\"default\"!==o&&\"preserve\"!==o&&this.error('Value of the `xml:space` attribute must be \"default\" or \"preserve\"'),n[i]=o}}if(this.options.sortAttributes){for(var a=Object.keys(n).sort(),c=Object.create(null),u=0;u<a.length;++u){var s=a[u];c[s]=n[s]}n=c}var f=Boolean(t.consumeStringFast(\"/>\")),l=new ft(r,n);if(l.parent=this.currentNode,!f){for(t.consumeStringFast(\">\")||this.error(\"Unclosed start tag for element `\".concat(r,\"`\")),this.currentNode=l,this.consumeCharData();this.consumeElement()||this.consumeContentReference()||this.consumeCdataSection()||this.consumeProcessingInstruction()||this.consumeComment();)this.consumeCharData();var h,p=t.charIndex;t.consumeStringFast(\"</\")&&(h=this.consumeName())&&h===r||(t.reset(p),this.error(\"Missing end tag for element \".concat(r))),this.consumeWhitespace(),t.consumeStringFast(\">\")||this.error(\"Unclosed end tag for element \".concat(r)),this.currentNode=l.parent}return this.addNode(l),!0}},{key:\"consumeEqual\",value:function(){return this.consumeWhitespace(),!!this.scanner.consumeStringFast(\"=\")&&(this.consumeWhitespace(),!0)}},{key:\"consumeMisc\",value:function(){return this.consumeComment()||this.consumeProcessingInstruction()||this.consumeWhitespace()}},{key:\"consumeName\",value:function(){return at.isNameStartChar(this.scanner.peek())?this.scanner.consumeMatchFn(at.isNameChar):\"\"}},{key:\"consumeProcessingInstruction\",value:function(){var t=this.scanner,e=t.charIndex;if(!t.consumeStringFast(\"<?\"))return!1;var r=this.consumeName();if(r?\"xml\"===r.toLowerCase()&&(t.reset(e),this.error(\"XML declaration isn't allowed here\")):this.error(\"Invalid processing instruction\"),!this.consumeWhitespace()){if(t.consumeStringFast(\"?>\"))return this.addNode(new lt(r)),!0;this.error(\"Whitespace is required after a processing instruction name\")}var n=t.consumeUntilString(\"?>\");return this.validateChars(n),t.consumeStringFast(\"?>\")||this.error(\"Unterminated processing instruction\"),this.addNode(new lt(r,n)),!0}},{key:\"consumeProlog\",value:function(){var t=this.scanner,e=t.charIndex;for(this.consumeXmlDeclaration();this.consumeMisc(););if(this.consumeDoctypeDeclaration())for(;this.consumeMisc(););return e<t.charIndex}},{key:\"consumeReference\",value:function(){var t=this.scanner;if(\"&\"!==t.peek())return!1;t.advance();var e,r=t.consumeMatchFn(at.isReferenceChar);if(\";\"!==t.consume()&&this.error(\"Unterminated reference (a reference must end with `;`)\"),\"#\"===r[0]){var i=\"x\"===r[1]?parseInt(r.slice(2),16):parseInt(r.slice(1),10);isNaN(i)&&this.error(\"Invalid character reference\"),e=String.fromCodePoint(i),at.isXmlChar(e)||this.error(\"Character reference resolves to an invalid character\")}else if(void 0===(e=at.predefinedEntities[r])){var o=this.options,a=o.ignoreUndefinedEntities,c=o.resolveUndefinedEntity,u=\"&\".concat(r,\";\");if(c){var s=c(u);if(null!=s){var f=n(s);if(\"string\"!==f)throw new TypeError(\"`resolveUndefinedEntity()` must return a string, `null`, or `undefined`, but returned a value of type \".concat(f));return s}}if(a)return u;t.reset(-u.length),this.error(\"Named entity isn't defined: \".concat(u))}return e}},{key:\"consumeSystemLiteral\",value:function(){var t=this.scanner,e=t.consumeStringFast('\"')||t.consumeStringFast(\"'\");if(!e)return!1;var r=t.consumeUntilString(e);return this.validateChars(r),t.consumeStringFast(e)||this.error(\"Missing end quote\"),r}},{key:\"consumeWhitespace\",value:function(){return Boolean(this.scanner.consumeMatchFn(at.isWhitespace))}},{key:\"consumeXmlDeclaration\",value:function(){var t=this.scanner;if(!t.consumeStringFast(\"<?xml\"))return!1;this.consumeWhitespace()||this.error(\"Invalid XML declaration\");var e=Boolean(t.consumeStringFast(\"version\"))&&this.consumeEqual()&&this.consumeSystemLiteral();if(!1===e?this.error(\"XML version is missing or invalid\"):/^1\\.[0-9]+$/.test(e)||this.error(\"Invalid character in version number\"),this.consumeWhitespace()){Boolean(t.consumeStringFast(\"encoding\"))&&this.consumeEqual()&&this.consumeSystemLiteral()&&this.consumeWhitespace();var r=Boolean(t.consumeStringFast(\"standalone\"))&&this.consumeEqual()&&this.consumeSystemLiteral();r&&(\"yes\"!==r&&\"no\"!==r&&this.error('Only \"yes\" and \"no\" are permitted as values of `standalone`'),this.consumeWhitespace())}return t.consumeStringFast(\"?>\")||this.error(\"Invalid or unclosed XML declaration\"),!0}},{key:\"error\",value:function(t){for(var e=this.scanner,r=e.charIndex,n=e.string,i=1,o=\"\",a=1,c=0;c<r;++c){var u=n[c];\"\\n\"===u?(i=1,o=\"\",a+=1):(i+=1,o+=u)}var s=n.indexOf(\"\\n\",r),f=0;(o+=-1===s?n.slice(r):n.slice(r,s)).length>50&&(i<40?o=o.slice(0,50):(f=i-20,o=o.slice(f,i+30)));var l=new Error(\"\".concat(t,\" (line \").concat(a,\", column \").concat(i,\")\\n\")+\" \".concat(o,\"\\n\")+\" \".repeat(i-f+1)+\"^\\n\");throw Object.assign(l,{column:i,excerpt:o,line:a,pos:r}),l}},{key:\"validateChars\",value:function(t){var e,r=0,n=nt(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;at.isNotXmlChar(i)&&(this.scanner.reset(-(f(t).length-r)),this.error(\"Invalid character\")),r+=1}}catch(t){n.e(t)}finally{n.f()}}}]),t}();function vt(t){return\"\\ufeff\"===t[0]&&(t=t.slice(1)),t.replace(/\\r\\n?/g,\"\\n\")}var mt=pt,dt=_,yt=X,gt=Q,St=V,bt=j,Et=rt,Pt=L;function Ot(t,e){return new mt(t,e).document}Ot.XmlCdata=dt,Ot.XmlComment=yt,Ot.XmlDocument=gt,Ot.XmlElement=St,Ot.XmlNode=bt,Ot.XmlProcessingInstruction=Et,Ot.XmlText=Pt;var xt=Ot;function wt(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var i=m(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return v(this,r)}}var kt=function(t){p(r,g(Error));var e=wt(r);function r(t){return l(this,r),e.call(this,t)}return r}();function Rt(t){return t.children[0]}function Gt(t){var e=t.indexOf(\":\");return e>-1?t.substr(e+1):t}function Tt(t){return t.name||\"\"}function jt(t,e,r){var n=Gt(e);return t&&Array.isArray(t.children)?t.children.reduce((function t(e,i){return Gt(Tt(i))===n&&e.push(i),r&&Array.isArray(i.children)?[].concat(f(e),f(i.children.reduce(t,[]))):e}),[]):[]}function Nt(t,e,r){return jt(t,e,r)[0]||null}function Ct(t){return t&&Array.isArray(t.children)?f(t.children.filter((function(t){return\"XmlElement\"===t.constructor.name}))):[]}function Ft(t){var e=t&&Array.isArray(t.children)?t.children.find((function(t){return\"text\"===t.type})):null;return e?e.text:\"\"}function Lt(t,e){return t&&t.attributes[e]||\"\"}var It=function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l(this,t),this.message=e,this.httpStatus=r,this.isCrossOriginRelated=n},At=new Map;function Mt(t){return function(t){if(At.has(t))return At.get(t);var e=fetch(t);return e.finally((function(){return At.delete(t)})),At.set(t,e),e}(t).catch((function(){return fetch(t,{method:\"HEAD\",mode:\"no-cors\"}).catch((function(t){throw new It(\"Fetching the document failed either due to network errors or unreachable host, error is: \".concat(t.message),0,!1)})).then((function(){throw new It(\"The document could not be fetched due to CORS limitations\",0,!0)}))})).then(function(){var t=r(o.mark((function t(e){var r;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.text();case 2:if(r=t.sent,e.ok){t.next=5;break}throw new It(\"Received an error with code \".concat(e.status,\": \").concat(r),e.status,!1);case 5:return t.abrupt(\"return\",r);case 6:case\"end\":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then((function(t){return function(t){var e=null;try{e=xt(t)}catch(t){throw new kt(t.message)}return e}(t)}))}var Bt=[\"EPSG:4046\",\"EPSG:4075\",\"EPSG:4120\",\"EPSG:4122\",\"EPSG:4124\",\"EPSG:4126\",\"EPSG:4149\",\"EPSG:4151\",\"EPSG:4153\",\"EPSG:4155\",\"EPSG:4157\",\"EPSG:4159\",\"EPSG:4161\",\"EPSG:4163\",\"EPSG:4165\",\"EPSG:4167\",\"EPSG:4169\",\"EPSG:4171\",\"EPSG:4173\",\"EPSG:4175\",\"EPSG:4178\",\"EPSG:4180\",\"EPSG:4182\",\"EPSG:4184\",\"EPSG:4188\",\"EPSG:4190\",\"EPSG:4191\",\"EPSG:4196\",\"EPSG:4198\",\"EPSG:4202\",\"EPSG:4210\",\"EPSG:4211\",\"EPSG:4214\",\"EPSG:4226\",\"EPSG:4229\",\"EPSG:4231\",\"EPSG:4233\",\"EPSG:4236\",\"EPSG:4238\",\"EPSG:4240\",\"EPSG:4242\",\"EPSG:4244\",\"EPSG:4246\",\"EPSG:4248\",\"EPSG:4250\",\"EPSG:4252\",\"EPSG:4255\",\"EPSG:4258\",\"EPSG:4261\",\"EPSG:4264\",\"EPSG:4267\",\"EPSG:4270\",\"EPSG:4273\",\"EPSG:4276\",\"EPSG:4279\",\"EPSG:4281\",\"EPSG:4284\",\"EPSG:4286\",\"EPSG:4288\",\"EPSG:4292\",\"EPSG:4295\",\"EPSG:4297\",\"EPSG:4299\",\"EPSG:4302\",\"EPSG:4324\",\"EPSG:4326\"];function _t(t){return Bt.indexOf(Dt(t))>-1}function Dt(t){if(/^urn:(?:x-)?ogc:def:crs:epsg:/.test(t.toLowerCase())){var e=/([0-9]+)$/.exec(t)[1];return\"EPSG:\".concat(e)}return t}function Ut(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Wt(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ut(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xt(t){return Rt(t).attributes.version}function Yt(t){var e=Xt(t);return jt(Nt(Rt(t),\"Capability\"),\"Layer\").map((function(t){return qt(t,e)}))}function qt(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=\"1.3.0\"===r?\"CRS\":\"SRS\",c=jt(e,a).map(Ft),u=c.length>0?c:n,s=jt(e,\"Style\").map(Jt),f=s.length>0?s:i;function l(t){return(_t(Lt(t,a))&&\"1.3.0\"===r?[\"miny\",\"minx\",\"maxy\",\"maxx\"]:[\"minx\",\"miny\",\"maxx\",\"maxy\"]).map((function(e){return Lt(t,e)}))}var h=Nt(e,\"Attribution\"),p=null!==h?Vt(h):o,v=jt(e,\"Layer\").map((function(t){return qt(t,r,u,f,p)}));return Wt({name:Ft(Nt(e,\"Name\")),title:Ft(Nt(e,\"Title\")),abstract:Ft(Nt(e,\"Abstract\")),availableCrs:u,styles:f,attribution:p,boundingBoxes:jt(e,\"BoundingBox\").reduce((function(e,r){return Wt(Wt({},e),{},t({},Lt(r,a),l(r)))}),{})},v.length&&{children:v})}function Jt(t){var e=Lt(Nt(Nt(t,\"LegendURL\"),\"OnlineResource\"),\"xlink:href\");return Wt({name:Ft(Nt(t,\"Name\")),title:Ft(Nt(t,\"Title\"))},e&&{legendUrl:e})}function Vt(t){var e=Lt(Nt(Nt(t,\"LogoURL\"),\"OnlineResource\"),\"xlink:href\"),r=Lt(Nt(t,\"OnlineResource\"),\"xlink:href\"),n=Ft(Nt(t,\"Title\"));return Wt(Wt(Wt({},n&&{title:n}),r&&{url:r}),e&&{logoUrl:e})}function Kt(t){return Rt(t).attributes.version}function $t(t){var e;if(Kt(t).startsWith(\"1.0\")){var r=Nt(Nt(Nt(Rt(t),\"Capability\"),\"Request\"),\"GetFeature\");e=Ct(Nt(r,\"ResultFormat\")).map(Tt)}else{var n=jt(Nt(Rt(t),\"OperationsMetadata\"),\"Operation\").find((function(t){return\"GetFeature\"===Lt(t,\"name\")})),i=jt(n,\"Parameter\").find((function(t){return\"outputFormat\"===Lt(t,\"name\")}));e=jt(i,\"Value\",!0).map(Ft)}return e}function zt(t){var e=Kt(t),r=$t(t);return jt(Nt(Rt(t),\"FeatureTypeList\"),\"FeatureType\").map((function(t){return function(t,e,r){var n=e.startsWith(\"2.\")?\"CRS\":\"SRS\",i=e.startsWith(\"1.0\")?\"SRS\":\"Default\".concat(n);function o(){var e=Nt(t,\"LatLongBoundingBox\");return[\"minx\",\"miny\",\"maxx\",\"maxy\"].map((function(t){return Lt(e,t)})).map(parseFloat)}function a(){var e=Nt(t,\"WGS84BoundingBox\");return[\"LowerCorner\",\"UpperCorner\"].map((function(t){return Nt(e,t)})).map((function(t){return Ft(t).split(\" \")})).reduce((function(t,e){return[].concat(f(t),f(e))})).map(parseFloat)}var c=e.startsWith(\"1.0\")?[]:jt(t,\"Other\".concat(n)).map(Ft).map(Dt),u=e.startsWith(\"1.0\")?[]:jt(Nt(t,\"OutputFormats\"),\"Format\").map(Ft);return{name:Ft(Nt(t,\"Name\")),title:Ft(Nt(t,\"Title\")),abstract:Ft(Nt(t,\"Abstract\")),defaultCrs:Dt(Ft(Nt(t,i))),otherCrs:c,outputFormats:u.length>0?u:r,latLonBoundingBox:e.startsWith(\"1.0\")?o():a()}}(t,e,r)}))}function Ht(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Qt(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Ht(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zt(e,r,n){var i,o=Rt(e);if(n.startsWith(\"2.0\"))i=jt(o,\"member\").map((function(t){return Ct(t)[0]}));else{var a=Nt(o,\"featureMembers\");i=a?Ct(a):jt(o,\"featureMember\").map((function(t){return Ct(t)[0]}))}var c=\"1.0.0\"===n?\"fid\":\"gml:id\";function u(e){return Ct(e).filter((function(t){return Gt(Tt(t))in r.properties})).reduce((function(e,n){var i=Gt(Tt(n));return Qt(Qt({},e),{},t({},i,function(t,e){switch(r.properties[t]){case\"integer\":return parseInt(e);case\"float\":return parseFloat(e);case\"boolean\":return\"true\"===e;default:return e}}(i,Ft(n))))}),{})}return i.map((function(t){return{id:Lt(t,c),properties:u(t)}}))}u(\"parseWmsCapabilities\",self,(function(t){return Mt(t.url).then((function(t){return{info:(e=t,r=Nt(Rt(e),\"Service\"),n=jt(Nt(r,\"KeywordList\"),\"Keyword\").map(Ft).filter((function(t,e,r){return r.indexOf(t)===e})),{title:Ft(Nt(r,\"Title\")),name:Ft(Nt(r,\"Name\")),abstract:Ft(Nt(r,\"Abstract\")),fees:Ft(Nt(r,\"Fees\")),constraints:Ft(Nt(r,\"AccessConstraints\")),keywords:n}),layers:Yt(t),version:Xt(t)};var e,r,n}))})),u(\"parseWfsCapabilities\",self,(function(t){return Mt(t.url).then((function(t){return{info:(e=t,n=Kt(e),i=n.startsWith(\"1.0\")?\"Service\":\"ServiceIdentification\",o=n.startsWith(\"1.0\")?\"Name\":\"ServiceType\",a=Nt(Rt(e),i),r=n.startsWith(\"1.0\")?Ft(Nt(a,\"Keywords\")).split(\",\").map((function(t){return t.trim()})):jt(Nt(a,\"Keywords\"),\"Keyword\").map(Ft),{title:Ft(Nt(a,\"Title\")),name:Ft(Nt(a,o)),abstract:Ft(Nt(a,\"Abstract\")),fees:Ft(Nt(a,\"Fees\")),constraints:Ft(Nt(a,\"AccessConstraints\")),keywords:r,outputFormats:$t(e)}),featureTypes:zt(t),version:Kt(t)};var e,r,n,i,o,a}))})),u(\"queryWfsFeatureTypeDetails\",self,(function(t){var e=t.url,r=t.serviceVersion,n=t.featureTypeFull,i=function(t,e,r,n,i,o,a,c,u,s){var f=\"2.0.0\"===e?\"TYPENAMES\":\"TYPENAME\",l=\"2.0.0\"===e?\"COUNT\":\"MAXFEATURES\",h=new URL(t);if(h.searchParams.set(\"SERVICE\",\"WFS\"),h.searchParams.set(\"REQUEST\",\"GetFeature\"),h.searchParams.set(\"VERSION\",e),h.searchParams.set(f,r),void 0!==n&&h.searchParams.set(\"OUTPUTFORMAT\",n),void 0!==o&&h.searchParams.set(\"PROPERTYNAME\",o.join(\",\")),a?(h.searchParams.set(\"RESULTTYPE\",\"hits\"),h.searchParams.set(l,\"1\")):void 0!==i&&h.searchParams.set(l,i.toString(10)),c&&h.searchParams.set(\"SRSNAME\",c),u){var p=u.join(\",\");h.searchParams.set(\"BBOX\",s?\"\".concat(p,\",\").concat(s):p)}return h.toString()}(e,r,n.name,void 0,Object.keys(n.properties));return Mt(i).then((function(t){return{props:(e=Zt(t,n,r),e.reduce((function(t,e){var r=function(r){var n=e.properties[r];r in t||(t[r]={uniqueValues:[]});var i=t[r].uniqueValues.find((function(t){return t.value===n}));i?i.count++:t[r].uniqueValues.push({value:n,count:1})};for(var n in e.properties)r(n);return t}),{}))};var e}))}));\n"], {type: 'application/javascript'})), {
workerInstance = new Worker(URL.createObjectURL(new Blob(["function t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function e(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function r(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function c(t){e(a,o,i,c,u,\"next\",t)}function u(t){e(a,o,i,c,u,\"throw\",t)}c(void 0)}))}}function n(t){return n=\"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},n(t)}var o={exports:{}};!function(t){var e=function(t){var e,r=Object.prototype,o=r.hasOwnProperty,i=\"function\"==typeof Symbol?Symbol:{},a=i.iterator||\"@@iterator\",c=i.asyncIterator||\"@@asyncIterator\",u=i.toStringTag||\"@@toStringTag\";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},\"\")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new C(n||[]);return i._invoke=function(t,e,r){var n=h;return function(o,i){if(n===v)throw new Error(\"Generator is already running\");if(n===m){if(\"throw\"===o)throw i;return G()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=k(a,r);if(c){if(c===y)continue;return c}}if(\"next\"===r.method)r.sent=r._sent=r.arg;else if(\"throw\"===r.method){if(n===h)throw n=m,r.arg;r.dispatchException(r.arg)}else\"return\"===r.method&&r.abrupt(\"return\",r.arg);n=v;var u=l(t,e,r);if(\"normal\"===u.type){if(n=r.done?m:p,u.arg===y)continue;return{value:u.arg,done:r.done}}\"throw\"===u.type&&(n=m,r.method=\"throw\",r.arg=u.arg)}}}(t,r,a),i}function l(t,e,r){try{return{type:\"normal\",arg:t.call(e,r)}}catch(t){return{type:\"throw\",arg:t}}}t.wrap=f;var h=\"suspendedStart\",p=\"suspendedYield\",v=\"executing\",m=\"completed\",y={};function d(){}function g(){}function b(){}var S={};S[a]=function(){return this};var E=Object.getPrototypeOf,O=E&&E(E(T([])));O&&O!==r&&o.call(O,a)&&(S=O);var w=b.prototype=d.prototype=Object.create(S);function P(t){[\"next\",\"throw\",\"return\"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(i,a,c,u){var s=l(t[i],t,a);if(\"throw\"!==s.type){var f=s.arg,h=f.value;return h&&\"object\"===n(h)&&o.call(h,\"__await\")?e.resolve(h.__await).then((function(t){r(\"next\",t,c,u)}),(function(t){r(\"throw\",t,c,u)})):e.resolve(h).then((function(t){f.value=t,c(f)}),(function(t){return r(\"throw\",t,c,u)}))}u(s.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}}function k(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,\"throw\"===r.method){if(t.iterator.return&&(r.method=\"return\",r.arg=e,k(t,r),\"throw\"===r.method))return y;r.method=\"throw\",r.arg=new TypeError(\"The iterator does not provide a 'throw' method\")}return y}var o=l(n,t.iterator,r.arg);if(\"throw\"===o.type)return r.method=\"throw\",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,\"return\"!==r.method&&(r.method=\"next\",r.arg=e),r.delegate=null,y):i:(r.method=\"throw\",r.arg=new TypeError(\"iterator result is not an object\"),r.delegate=null,y)}function R(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type=\"normal\",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:\"root\"}],t.forEach(R,this),this.reset(!0)}function T(t){if(t){var r=t[a];if(r)return r.call(t);if(\"function\"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(o.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:G}}function G(){return{value:e,done:!0}}return g.prototype=w.constructor=b,b.constructor=g,g.displayName=s(b,u,\"GeneratorFunction\"),t.isGeneratorFunction=function(t){var e=\"function\"==typeof t&&t.constructor;return!!e&&(e===g||\"GeneratorFunction\"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,u,\"GeneratorFunction\")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},P(x.prototype),x.prototype[c]=function(){return this},t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(f(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},P(w),s(w,u,\"Generator\"),w[a]=function(){return this},w.toString=function(){return\"[object Generator]\"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=T,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=e,this.tryEntries.forEach(j),!t)for(var r in this)\"t\"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(\"throw\"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return c.type=\"throw\",c.arg=t,r.next=n,o&&(r.method=\"next\",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if(\"root\"===a.tryLoc)return n(\"end\");if(a.tryLoc<=this.prev){var u=o.call(a,\"catchLoc\"),s=o.call(a,\"finallyLoc\");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw new Error(\"try statement without catch or finally\");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,\"finallyLoc\")&&this.prev<n.finallyLoc){var i=n;break}}i&&(\"break\"===t||\"continue\"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method=\"next\",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if(\"throw\"===t.type)throw t.arg;return\"break\"===t.type||\"continue\"===t.type?this.next=t.arg:\"return\"===t.type?(this.rval=this.arg=t.arg,this.method=\"return\",this.next=\"end\"):\"normal\"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if(\"throw\"===n.type){var o=n.arg;j(r)}return o}}throw new Error(\"illegal catch attempt\")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},\"next\"===this.method&&(this.arg=e),y}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function(\"r\",\"regeneratorRuntime = r\")(e)}}(o);var i=o.exports;function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?a(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(t,e,n){var o=function(){var o=r(i.mark((function r(o){var a,u,s;return i.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if((a=o.data).taskName!==t){r.next=12;break}return r.prev=2,r.next=5,n(a.params);case 5:u=r.sent,r.next=11;break;case 8:r.prev=8,r.t0=r.catch(2),s=r.t0;case 11:e.postMessage(c(c({taskName:t,requestId:a.requestId},u&&{response:u}),s&&{error:s}));case 12:case\"end\":return r.stop()}}),r,null,[[2,8]])})));return function(t){return o.apply(this,arguments)}}();e.addEventListener(\"message\",o)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if(\"string\"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===r&&t.constructor&&(r=t.constructor.name),\"Map\"===r||\"Set\"===r?Array.from(t):\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(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 l(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function p(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function\");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}function v(t,e){return!e||\"object\"!==n(e)&&\"function\"!=typeof e?function(t){if(void 0===t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return t}(t):e}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function y(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function d(t,e,r){return d=y()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&h(o,r.prototype),o},d.apply(null,arguments)}function g(t){var e=\"function\"==typeof Map?new Map:void 0;return g=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf(\"[native code]\")))return t;var r;if(\"function\"!=typeof t)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return d(t,arguments,m(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,t)},g(t)}function b(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function S(t,e,r){return e&&b(t.prototype,e),r&&b(t,r),t}var E=function(){function t(e){l(this,t),this.chars=f(e),this.charCount=this.chars.length,this.charIndex=0,this.charsToBytes=new Array(this.charCount),this.multiByteMode=!1,this.string=e;var r=this.chars,n=this.charCount,o=this.charsToBytes;if(n===e.length)for(var i=0;i<n;++i)o[i]=i;else{for(var a=0,c=0;c<n;++c)o[c]=a,a+=r[c].length;this.multiByteMode=!0}}return S(t,[{key:\"isEnd\",get:function(){return this.charIndex>=this.charCount}},{key:\"_charLength\",value:function(t){var e=t.length;return e<2||!this.multiByteMode?e:t.replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\"_\").length}},{key:\"advance\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.charIndex=Math.min(this.charCount,this.charIndex+t)}},{key:\"consume\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this.peek(t);return this.advance(t),e}},{key:\"consumeMatch\",value:function(t){if(!t.sticky)throw new Error('`regex` must have a sticky flag (\"y\")');t.lastIndex=this.charsToBytes[this.charIndex];var e=t.exec(this.string);if(null===e)return\"\";var r=e[0];return this.advance(this._charLength(r)),r}},{key:\"consumeMatchFn\",value:function(t){for(var e=this.charIndex;!this.isEnd&&t(this.peek());)this.advance();return this.charIndex>e?this.string.slice(this.charsToBytes[e],this.charsToBytes[this.charIndex]):\"\"}},{key:\"consumeString\",value:function(t){if(this.consumeStringFast(t))return t;if(!this.multiByteMode)return\"\";var e=t.length,r=this._charLength(t);return r!==e&&t===this.peek(r)?(this.advance(r),t):\"\"}},{key:\"consumeStringFast\",value:function(t){if(this.peek()===t[0]){var e=t.length;if(1===e)return this.advance(),t;if(this.peek(e)===t)return this.advance(e),t}return\"\"}},{key:\"consumeUntilMatch\",value:function(t){if(!t.global)throw new Error('`regex` must have a global flag (\"g\")');var e=this.charsToBytes[this.charIndex];t.lastIndex=e;var r=t.exec(this.string);if(null===r||r.index===e)return\"\";var n=this.string.slice(e,r.index);return this.advance(this._charLength(n)),n}},{key:\"consumeUntilString\",value:function(t){var e=this.charIndex,r=this.charsToBytes,n=this.string,o=r[e],i=n.indexOf(t,o);if(i<=0)return\"\";var a=n.slice(o,i);return this.advance(this._charLength(a)),a}},{key:\"peek\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(this.charIndex>=this.charCount)return\"\";if(1===t)return this.chars[this.charIndex];var e=this.charsToBytes,r=this.charIndex;return this.string.slice(e[r],e[r+t])}},{key:\"reset\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.charIndex=t>=0?Math.min(this.charCount,t):Math.max(0,this.charIndex+t)}}]),t}(),O=E,w={},P=Object.freeze(Object.assign(Object.create(null),{amp:\"&\",apos:\"'\",gt:\">\",lt:\"<\",quot:'\"'}));function x(t){if(k(t))return!0;var e=j(t);return 45===e||46===e||e>=48&&e<=57||183===e||e>=768&&e<=879||e>=8255&&e<=8256}function k(t){var e=j(t);return 58===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function R(t){var e=j(t);return 9===e||10===e||13===e||e>=32&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111}function j(t){return t.codePointAt(0)||-1}w.predefinedEntities=P,w.isNameChar=x,w.isNameStartChar=k,w.isNotXmlChar=function(t){return!R(t)},w.isReferenceChar=function(t){return\"#\"===t||x(t)},w.isWhitespace=function(t){var e=j(t);return 32===e||9===e||10===e||13===e},w.isXmlChar=R;var C=function(){function t(){l(this,t),this.parent=null}return S(t,[{key:\"document\",get:function(){return this.parent?this.parent.document:null}},{key:\"isRootNode\",get:function(){return!!this.parent&&this.parent===this.document}},{key:\"preserveWhitespace\",get:function(){return Boolean(this.parent&&this.parent.preserveWhitespace)}},{key:\"type\",get:function(){return\"\"}},{key:\"toJSON\",value:function(){var t={type:this.type};return this.isRootNode&&(t.isRootNode=!0),this.preserveWhitespace&&(t.preserveWhitespace=!0),t}}]),t}();C.TYPE_CDATA=\"cdata\",C.TYPE_COMMENT=\"comment\",C.TYPE_DOCUMENT=\"document\",C.TYPE_ELEMENT=\"element\",C.TYPE_PROCESSING_INSTRUCTION=\"pi\",C.TYPE_TEXT=\"text\";var T=C;function G(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}var N=T,F=function(t){p(r,N);var e=G(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";return l(this,r),(t=e.call(this)).text=n,t}return S(r,[{key:\"type\",get:function(){return N.TYPE_TEXT}},{key:\"toJSON\",value:function(){return Object.assign(N.prototype.toJSON.call(this),{text:this.text})}}]),r}(),L=F;function A(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}var I=T,M=L,B=function(t){p(r,M);var e=A(r);function r(){return l(this,r),e.apply(this,arguments)}return S(r,[{key:\"type\",get:function(){return I.TYPE_CDATA}}]),r}(),_=B;function U(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}var D=T,W=function(t){p(r,D);var e=U(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\";return l(this,r),(t=e.call(this)).content=n,t}return S(r,[{key:\"type\",get:function(){return D.TYPE_COMMENT}},{key:\"toJSON\",value:function(){return Object.assign(D.prototype.toJSON.call(this),{content:this.content})}}]),r}(),X=W;function Y(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}var q=T,J=function(t){p(r,q);var e=Y(r);function r(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.create(null),i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return l(this,r),(n=e.call(this)).name=t,n.attributes=o,n.children=i,n}return S(r,[{key:\"isEmpty\",get:function(){return 0===this.children.length}},{key:\"preserveWhitespace\",get:function(){for(var t=this;t instanceof r;){if(\"xml:space\"in t.attributes)return\"preserve\"===t.attributes[\"xml:space\"];t=t.parent}return!1}},{key:\"text\",get:function(){return this.children.map((function(t){return\"text\"in t?t.text:\"\"})).join(\"\")}},{key:\"type\",get:function(){return q.TYPE_ELEMENT}},{key:\"toJSON\",value:function(){return Object.assign(q.prototype.toJSON.call(this),{name:this.name,attributes:this.attributes,children:this.children.map((function(t){return t.toJSON()}))})}}]),r}(),V=J;function $(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}var K=V,z=T,H=function(t){p(r,z);var e=$(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return l(this,r),(t=e.call(this)).children=n,t}return S(r,[{key:\"document\",get:function(){return this}},{key:\"root\",get:function(){return this.children.find((function(t){return t instanceof K}))||null}},{key:\"text\",get:function(){return this.children.map((function(t){return\"text\"in t?t.text:\"\"})).join(\"\")}},{key:\"type\",get:function(){return z.TYPE_DOCUMENT}},{key:\"toJSON\",value:function(){return Object.assign(z.prototype.toJSON.call(this),{children:this.children.map((function(t){return t.toJSON()}))})}}]),r}(),Q=H;function Z(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}var tt=T,et=function(t){p(r,tt);var e=Z(r);function r(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";return l(this,r),(n=e.call(this)).name=t,n.content=o,n}return S(r,[{key:\"type\",get:function(){return tt.TYPE_PROCESSING_INSTRUCTION}},{key:\"toJSON\",value:function(){return Object.assign(tt.prototype.toJSON.call(this),{name:this.name,content:this.content})}}]),r}(),rt=et;function nt(t,e){var r;if(\"undefined\"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if(\"string\"==typeof t)return ot(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===r&&t.constructor&&(r=t.constructor.name);if(\"Map\"===r||\"Set\"===r)return Array.from(t);if(\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ot(t,e)}(t))||e&&t&&\"number\"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,a=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var it=O,at=w,ct=_,ut=X,st=Q,ft=V,lt=rt,ht=L,pt=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(l(this,t),this.document=new st,this.currentNode=this.document,this.options=r,this.scanner=new it(vt(e)),this.consumeProlog(),this.consumeElement()||this.error(\"Root element is missing or invalid\");this.consumeMisc(););this.scanner.isEnd||this.error(\"Extra content at the end of the document\")}return S(t,[{key:\"addNode\",value:function(t){t.parent=this.currentNode,this.currentNode.children.push(t)}},{key:\"addText\",value:function(t){var e=this.currentNode.children;if(e.length>0){var r=e[e.length-1];if(r instanceof ht)return void(r.text+=t)}this.addNode(new ht(t))}},{key:\"consumeAttributeValue\",value:function(){var t,e=this.scanner,r=e.peek();if('\"'!==r&&\"'\"!==r)return!1;e.advance();var n=!1,o=\"\",i='\"'===r?new RegExp('[^\"&<]+',\"y\"):new RegExp(\"[^'&<]+\",\"y\");t:for(;!e.isEnd;){switch((t=e.consumeMatch(i))&&(this.validateChars(t),o+=t.replace(/[\\t\\r\\n]/g,\" \")),e.peek()){case r:n=!0;break t;case\"&\":o+=this.consumeReference();continue;case\"<\":this.error(\"Unescaped `<` is not allowed in an attribute value\");break;case\"\":this.error(\"Unclosed attribute\")}}return n||this.error(\"Unclosed attribute\"),e.advance(),o}},{key:\"consumeCdataSection\",value:function(){var t=this.scanner;if(!t.consumeStringFast(\"<![CDATA[\"))return!1;var e=t.consumeUntilString(\"]]>\");return this.validateChars(e),t.consumeStringFast(\"]]>\")||this.error(\"Unclosed CDATA section\"),this.options.preserveCdata?this.addNode(new ct(e)):this.addText(e),!0}},{key:\"consumeCharData\",value:function(){var t=this.scanner,e=t.consumeUntilMatch(/<|&|]]>/g);return!!e&&(this.validateChars(e),\"]\"===t.peek()&&\"]]>\"===t.peek(3)&&this.error(\"Element content may not contain the CDATA section close delimiter `]]>`\"),this.addText(e),!0)}},{key:\"consumeComment\",value:function(){var t=this.scanner;if(!t.consumeStringFast(\"\\x3c!--\"))return!1;var e=t.consumeUntilString(\"--\");return this.validateChars(e),t.consumeStringFast(\"--\\x3e\")||(\"--\"===t.peek(2)?this.error(\"The string `--` isn't allowed inside a comment\"):this.error(\"Unclosed comment\")),this.options.preserveComments&&this.addNode(new ut(e.trim())),!0}},{key:\"consumeContentReference\",value:function(){var t=this.consumeReference();return!!t&&(this.addText(t),!0)}},{key:\"consumeDoctypeDeclaration\",value:function(){var t=this.scanner;return!(!t.consumeStringFast(\"<!DOCTYPE\")||!this.consumeWhitespace())&&(t.consumeMatch(new RegExp(\"[^[>]+\",\"y\")),t.consumeMatch(new RegExp(\"\\\\[[\\\\s\\\\S]+?\\\\][\\\\x20\\\\t\\\\r\\\\n]*>\",\"y\"))||t.consumeStringFast(\">\")||this.error(\"Unclosed doctype declaration\"),!0)}},{key:\"consumeElement\",value:function(){var t=this.scanner,e=t.charIndex;if(\"<\"!==t.peek())return!1;t.advance();var r=this.consumeName();if(!r)return t.reset(e),!1;for(var n=Object.create(null);this.consumeWhitespace();){var o=this.consumeName();if(o){var i=this.consumeEqual()&&this.consumeAttributeValue();!1===i&&this.error(\"Attribute value expected\"),o in n&&this.error(\"Duplicate attribute: \".concat(o)),\"xml:space\"===o&&\"default\"!==i&&\"preserve\"!==i&&this.error('Value of the `xml:space` attribute must be \"default\" or \"preserve\"'),n[o]=i}}if(this.options.sortAttributes){for(var a=Object.keys(n).sort(),c=Object.create(null),u=0;u<a.length;++u){var s=a[u];c[s]=n[s]}n=c}var f=Boolean(t.consumeStringFast(\"/>\")),l=new ft(r,n);if(l.parent=this.currentNode,!f){for(t.consumeStringFast(\">\")||this.error(\"Unclosed start tag for element `\".concat(r,\"`\")),this.currentNode=l,this.consumeCharData();this.consumeElement()||this.consumeContentReference()||this.consumeCdataSection()||this.consumeProcessingInstruction()||this.consumeComment();)this.consumeCharData();var h,p=t.charIndex;t.consumeStringFast(\"</\")&&(h=this.consumeName())&&h===r||(t.reset(p),this.error(\"Missing end tag for element \".concat(r))),this.consumeWhitespace(),t.consumeStringFast(\">\")||this.error(\"Unclosed end tag for element \".concat(r)),this.currentNode=l.parent}return this.addNode(l),!0}},{key:\"consumeEqual\",value:function(){return this.consumeWhitespace(),!!this.scanner.consumeStringFast(\"=\")&&(this.consumeWhitespace(),!0)}},{key:\"consumeMisc\",value:function(){return this.consumeComment()||this.consumeProcessingInstruction()||this.consumeWhitespace()}},{key:\"consumeName\",value:function(){return at.isNameStartChar(this.scanner.peek())?this.scanner.consumeMatchFn(at.isNameChar):\"\"}},{key:\"consumeProcessingInstruction\",value:function(){var t=this.scanner,e=t.charIndex;if(!t.consumeStringFast(\"<?\"))return!1;var r=this.consumeName();if(r?\"xml\"===r.toLowerCase()&&(t.reset(e),this.error(\"XML declaration isn't allowed here\")):this.error(\"Invalid processing instruction\"),!this.consumeWhitespace()){if(t.consumeStringFast(\"?>\"))return this.addNode(new lt(r)),!0;this.error(\"Whitespace is required after a processing instruction name\")}var n=t.consumeUntilString(\"?>\");return this.validateChars(n),t.consumeStringFast(\"?>\")||this.error(\"Unterminated processing instruction\"),this.addNode(new lt(r,n)),!0}},{key:\"consumeProlog\",value:function(){var t=this.scanner,e=t.charIndex;for(this.consumeXmlDeclaration();this.consumeMisc(););if(this.consumeDoctypeDeclaration())for(;this.consumeMisc(););return e<t.charIndex}},{key:\"consumeReference\",value:function(){var t=this.scanner;if(\"&\"!==t.peek())return!1;t.advance();var e,r=t.consumeMatchFn(at.isReferenceChar);if(\";\"!==t.consume()&&this.error(\"Unterminated reference (a reference must end with `;`)\"),\"#\"===r[0]){var o=\"x\"===r[1]?parseInt(r.slice(2),16):parseInt(r.slice(1),10);isNaN(o)&&this.error(\"Invalid character reference\"),e=String.fromCodePoint(o),at.isXmlChar(e)||this.error(\"Character reference resolves to an invalid character\")}else if(void 0===(e=at.predefinedEntities[r])){var i=this.options,a=i.ignoreUndefinedEntities,c=i.resolveUndefinedEntity,u=\"&\".concat(r,\";\");if(c){var s=c(u);if(null!=s){var f=n(s);if(\"string\"!==f)throw new TypeError(\"`resolveUndefinedEntity()` must return a string, `null`, or `undefined`, but returned a value of type \".concat(f));return s}}if(a)return u;t.reset(-u.length),this.error(\"Named entity isn't defined: \".concat(u))}return e}},{key:\"consumeSystemLiteral\",value:function(){var t=this.scanner,e=t.consumeStringFast('\"')||t.consumeStringFast(\"'\");if(!e)return!1;var r=t.consumeUntilString(e);return this.validateChars(r),t.consumeStringFast(e)||this.error(\"Missing end quote\"),r}},{key:\"consumeWhitespace\",value:function(){return Boolean(this.scanner.consumeMatchFn(at.isWhitespace))}},{key:\"consumeXmlDeclaration\",value:function(){var t=this.scanner;if(!t.consumeStringFast(\"<?xml\"))return!1;this.consumeWhitespace()||this.error(\"Invalid XML declaration\");var e=Boolean(t.consumeStringFast(\"version\"))&&this.consumeEqual()&&this.consumeSystemLiteral();if(!1===e?this.error(\"XML version is missing or invalid\"):/^1\\.[0-9]+$/.test(e)||this.error(\"Invalid character in version number\"),this.consumeWhitespace()){Boolean(t.consumeStringFast(\"encoding\"))&&this.consumeEqual()&&this.consumeSystemLiteral()&&this.consumeWhitespace();var r=Boolean(t.consumeStringFast(\"standalone\"))&&this.consumeEqual()&&this.consumeSystemLiteral();r&&(\"yes\"!==r&&\"no\"!==r&&this.error('Only \"yes\" and \"no\" are permitted as values of `standalone`'),this.consumeWhitespace())}return t.consumeStringFast(\"?>\")||this.error(\"Invalid or unclosed XML declaration\"),!0}},{key:\"error\",value:function(t){for(var e=this.scanner,r=e.charIndex,n=e.string,o=1,i=\"\",a=1,c=0;c<r;++c){var u=n[c];\"\\n\"===u?(o=1,i=\"\",a+=1):(o+=1,i+=u)}var s=n.indexOf(\"\\n\",r),f=0;(i+=-1===s?n.slice(r):n.slice(r,s)).length>50&&(o<40?i=i.slice(0,50):(f=o-20,i=i.slice(f,o+30)));var l=new Error(\"\".concat(t,\" (line \").concat(a,\", column \").concat(o,\")\\n\")+\" \".concat(i,\"\\n\")+\" \".repeat(o-f+1)+\"^\\n\");throw Object.assign(l,{column:o,excerpt:i,line:a,pos:r}),l}},{key:\"validateChars\",value:function(t){var e,r=0,n=nt(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;at.isNotXmlChar(o)&&(this.scanner.reset(-(f(t).length-r)),this.error(\"Invalid character\")),r+=1}}catch(t){n.e(t)}finally{n.f()}}}]),t}();function vt(t){return\"\\ufeff\"===t[0]&&(t=t.slice(1)),t.replace(/\\r\\n?/g,\"\\n\")}var mt=pt,yt=_,dt=X,gt=Q,bt=V,St=T,Et=rt,Ot=L;function wt(t,e){return new mt(t,e).document}wt.XmlCdata=yt,wt.XmlComment=dt,wt.XmlDocument=gt,wt.XmlElement=bt,wt.XmlNode=St,wt.XmlProcessingInstruction=Et,wt.XmlText=Ot;var Pt=wt;function xt(t){var e=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}var kt=function(t){p(r,g(Error));var e=xt(r);function r(t){return l(this,r),e.call(this,t)}return r}();function Rt(t){return t.children[0]}function jt(t){var e=t.indexOf(\":\");return e>-1?t.substr(e+1):t}function Ct(t){return t.name||\"\"}function Tt(t,e,r){var n=jt(e);return t&&Array.isArray(t.children)?t.children.reduce((function t(e,o){return jt(Ct(o))===n&&e.push(o),r&&Array.isArray(o.children)?[].concat(f(e),f(o.children.reduce(t,[]))):e}),[]):[]}function Gt(t,e,r){return Tt(t,e,r)[0]||null}function Nt(t){return t&&Array.isArray(t.children)?f(t.children.filter((function(t){return\"XmlElement\"===t.constructor.name}))):[]}function Ft(t){var e=t&&Array.isArray(t.children)?t.children.find((function(t){return\"text\"===t.type})):null;return e?e.text:\"\"}function Lt(t,e){return t&&t.attributes[e]||\"\"}var At=function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l(this,t),this.message=e,this.httpStatus=r,this.isCrossOriginRelated=n};function It(t,e){var r;if(\"undefined\"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if(\"string\"==typeof t)return Mt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);\"Object\"===r&&t.constructor&&(r=t.constructor.name);if(\"Map\"===r||\"Set\"===r)return Array.from(t);if(\"Arguments\"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mt(t,e)}(t))||e&&t&&\"number\"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,a=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Bt=new Map;function _t(t){return function(t){if(Bt.has(t))return Bt.get(t);var e=fetch(t);return e.finally((function(){return Bt.delete(t)})),Bt.set(t,e),e}(t).catch((function(){return fetch(t,{method:\"HEAD\",mode:\"no-cors\"}).catch((function(t){throw new At(\"Fetching the document failed either due to network errors or unreachable host, error is: \".concat(t.message),0,!1)})).then((function(){throw new At(\"The document could not be fetched due to CORS limitations\",0,!0)}))})).then(function(){var t=r(i.mark((function t(e){var r;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.text();case 2:if(r=t.sent,e.ok){t.next=5;break}throw new At(\"Received an error with code \".concat(e.status,\": \").concat(r),e.status,!1);case 5:return t.abrupt(\"return\",r);case 6:case\"end\":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then((function(t){return function(t){var e=null;try{e=Pt(t)}catch(t){throw new kt(t.message)}return e}(t)}))}function Ut(t,e){var r=t.match(/(https?%3A%2F%2F[^/]+)$/);if(r){var n=r[1],o=Ut(decodeURIComponent(n),e);return t.replace(n,encodeURIComponent(o))}var i,a=new URL(t),c=Object.keys(e),u=c.map((function(t){return t.toLowerCase()})),s=[],f=It(a.searchParams.keys());try{for(f.s();!(i=f.n()).done;){var l=i.value;u.indexOf(l.toLowerCase())>-1&&s.push(l)}}catch(t){f.e(t)}finally{f.f()}return s.map((function(t){return a.searchParams.delete(t)})),c.forEach((function(t){return a.searchParams.set(t,!0===e[t]?\"\":e[t])})),a.toString()}var Dt=[\"EPSG:4046\",\"EPSG:4075\",\"EPSG:4120\",\"EPSG:4122\",\"EPSG:4124\",\"EPSG:4126\",\"EPSG:4149\",\"EPSG:4151\",\"EPSG:4153\",\"EPSG:4155\",\"EPSG:4157\",\"EPSG:4159\",\"EPSG:4161\",\"EPSG:4163\",\"EPSG:4165\",\"EPSG:4167\",\"EPSG:4169\",\"EPSG:4171\",\"EPSG:4173\",\"EPSG:4175\",\"EPSG:4178\",\"EPSG:4180\",\"EPSG:4182\",\"EPSG:4184\",\"EPSG:4188\",\"EPSG:4190\",\"EPSG:4191\",\"EPSG:4196\",\"EPSG:4198\",\"EPSG:4202\",\"EPSG:4210\",\"EPSG:4211\",\"EPSG:4214\",\"EPSG:4226\",\"EPSG:4229\",\"EPSG:4231\",\"EPSG:4233\",\"EPSG:4236\",\"EPSG:4238\",\"EPSG:4240\",\"EPSG:4242\",\"EPSG:4244\",\"EPSG:4246\",\"EPSG:4248\",\"EPSG:4250\",\"EPSG:4252\",\"EPSG:4255\",\"EPSG:4258\",\"EPSG:4261\",\"EPSG:4264\",\"EPSG:4267\",\"EPSG:4270\",\"EPSG:4273\",\"EPSG:4276\",\"EPSG:4279\",\"EPSG:4281\",\"EPSG:4284\",\"EPSG:4286\",\"EPSG:4288\",\"EPSG:4292\",\"EPSG:4295\",\"EPSG:4297\",\"EPSG:4299\",\"EPSG:4302\",\"EPSG:4324\",\"EPSG:4326\"];function Wt(t){return Dt.indexOf(Xt(t))>-1}function Xt(t){if(/^urn:(?:x-)?ogc:def:crs:epsg:/.test(t.toLowerCase())){var e=/([0-9]+)$/.exec(t)[1];return\"EPSG:\".concat(e)}return t}function Yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function qt(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Yt(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jt(t){return Rt(t).attributes.version}function Vt(t){var e=Jt(t);return Tt(Gt(Rt(t),\"Capability\"),\"Layer\").map((function(t){return $t(t,e)}))}function $t(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=\"1.3.0\"===r?\"CRS\":\"SRS\",c=Tt(e,a).map(Ft),u=c.length>0?c:n,s=Tt(e,\"Style\").map(Kt),f=s.length>0?s:o;function l(t){return(Wt(Lt(t,a))&&\"1.3.0\"===r?[\"miny\",\"minx\",\"maxy\",\"maxx\"]:[\"minx\",\"miny\",\"maxx\",\"maxy\"]).map((function(e){return Lt(t,e)}))}var h=Gt(e,\"Attribution\"),p=null!==h?zt(h):i,v=Tt(e,\"Layer\").map((function(t){return $t(t,r,u,f,p)}));return qt({name:Ft(Gt(e,\"Name\")),title:Ft(Gt(e,\"Title\")),abstract:Ft(Gt(e,\"Abstract\")),availableCrs:u,styles:f,attribution:p,boundingBoxes:Tt(e,\"BoundingBox\").reduce((function(e,r){return qt(qt({},e),{},t({},Lt(r,a),l(r)))}),{})},v.length&&{children:v})}function Kt(t){var e=Lt(Gt(Gt(t,\"LegendURL\"),\"OnlineResource\"),\"xlink:href\");return qt({name:Ft(Gt(t,\"Name\")),title:Ft(Gt(t,\"Title\"))},e&&{legendUrl:e})}function zt(t){var e=Lt(Gt(Gt(t,\"LogoURL\"),\"OnlineResource\"),\"xlink:href\"),r=Lt(Gt(t,\"OnlineResource\"),\"xlink:href\"),n=Ft(Gt(t,\"Title\"));return qt(qt(qt({},n&&{title:n}),r&&{url:r}),e&&{logoUrl:e})}function Ht(t){return Rt(t).attributes.version}function Qt(t){var e;if(Ht(t).startsWith(\"1.0\")){var r=Gt(Gt(Gt(Rt(t),\"Capability\"),\"Request\"),\"GetFeature\");e=Nt(Gt(r,\"ResultFormat\")).map(Ct)}else{var n=Tt(Gt(Rt(t),\"OperationsMetadata\"),\"Operation\").find((function(t){return\"GetFeature\"===Lt(t,\"name\")})),o=Tt(n,\"Parameter\").find((function(t){return\"outputFormat\"===Lt(t,\"name\")}));e=Tt(o,\"Value\",!0).map(Ft)}return e}function Zt(t){var e=Ht(t),r=Qt(t);return Tt(Gt(Rt(t),\"FeatureTypeList\"),\"FeatureType\").map((function(t){return function(t,e,r){var n=e.startsWith(\"2.\")?\"CRS\":\"SRS\",o=e.startsWith(\"1.0\")?\"SRS\":\"Default\".concat(n);function i(){var e=Gt(t,\"LatLongBoundingBox\");return[\"minx\",\"miny\",\"maxx\",\"maxy\"].map((function(t){return Lt(e,t)})).map(parseFloat)}function a(){var e=Gt(t,\"WGS84BoundingBox\");return[\"LowerCorner\",\"UpperCorner\"].map((function(t){return Gt(e,t)})).map((function(t){return Ft(t).split(\" \")})).reduce((function(t,e){return[].concat(f(t),f(e))})).map(parseFloat)}var c=e.startsWith(\"1.0\")?[]:Tt(t,\"Other\".concat(n)).map(Ft).map(Xt),u=e.startsWith(\"1.0\")?[]:Tt(Gt(t,\"OutputFormats\"),\"Format\").map(Ft);return{name:Ft(Gt(t,\"Name\")),title:Ft(Gt(t,\"Title\")),abstract:Ft(Gt(t,\"Abstract\")),defaultCrs:Xt(Ft(Gt(t,o))),otherCrs:c,outputFormats:u.length>0?u:r,latLonBoundingBox:e.startsWith(\"1.0\")?i():a()}}(t,e,r)}))}function te(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ee(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?te(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,r,n){var o,i=Rt(e);if(n.startsWith(\"2.0\"))o=Tt(i,\"member\").map((function(t){return Nt(t)[0]}));else{var a=Gt(i,\"featureMembers\");o=a?Nt(a):Tt(i,\"featureMember\").map((function(t){return Nt(t)[0]}))}var c=\"1.0.0\"===n?\"fid\":\"gml:id\";function u(e){return Nt(e).filter((function(t){return jt(Ct(t))in r.properties})).reduce((function(e,n){var o=jt(Ct(n));return ee(ee({},e),{},t({},o,function(t,e){switch(r.properties[t]){case\"integer\":return parseInt(e);case\"float\":return parseFloat(e);case\"boolean\":return\"true\"===e;default:return e}}(o,Ft(n))))}),{})}return o.map((function(t){return{id:Lt(t,c),properties:u(t)}}))}function ne(e,r,n,o,i,a,c,u,s,f){var l=\"2.0.0\"===r?\"COUNT\":\"MAXFEATURES\",h=t({SERVICE:\"WFS\",REQUEST:\"GetFeature\",VERSION:r},\"2.0.0\"===r?\"TYPENAMES\":\"TYPENAME\",n);if(void 0!==o&&(h.OUTPUTFORMAT=o),void 0!==a&&(h.PROPERTYNAME=a.join(\",\")),c?(h.RESULTTYPE=\"hits\",h[l]=\"1\"):void 0!==i&&(h[l]=i.toString(10)),u&&(h.SRSNAME=u),s){var p=s.join(\",\");h.BBOX=f?\"\".concat(p,\",\").concat(f):p}return Ut(e,h)}u(\"parseWmsCapabilities\",self,(function(t){return _t(t.url).then((function(t){return{info:(e=t,r=Gt(Rt(e),\"Service\"),n=Tt(Gt(r,\"KeywordList\"),\"Keyword\").map(Ft).filter((function(t,e,r){return r.indexOf(t)===e})),{title:Ft(Gt(r,\"Title\")),name:Ft(Gt(r,\"Name\")),abstract:Ft(Gt(r,\"Abstract\")),fees:Ft(Gt(r,\"Fees\")),constraints:Ft(Gt(r,\"AccessConstraints\")),keywords:n}),layers:Vt(t),version:Jt(t)};var e,r,n}))})),u(\"parseWfsCapabilities\",self,(function(t){return _t(t.url).then((function(t){return{info:(e=t,n=Ht(e),o=n.startsWith(\"1.0\")?\"Service\":\"ServiceIdentification\",i=n.startsWith(\"1.0\")?\"Name\":\"ServiceType\",a=Gt(Rt(e),o),r=n.startsWith(\"1.0\")?Ft(Gt(a,\"Keywords\")).split(\",\").map((function(t){return t.trim()})):Tt(Gt(a,\"Keywords\"),\"Keyword\").map(Ft),{title:Ft(Gt(a,\"Title\")),name:Ft(Gt(a,i)),abstract:Ft(Gt(a,\"Abstract\")),fees:Ft(Gt(a,\"Fees\")),constraints:Ft(Gt(a,\"AccessConstraints\")),keywords:r,outputFormats:Qt(e)}),featureTypes:Zt(t),version:Ht(t)};var e,r,n,o,i,a}))})),u(\"queryWfsFeatureTypeDetails\",self,(function(t){var e=t.url,r=t.serviceVersion,n=t.featureTypeFull;return _t(ne(e,r,n.name,void 0,Object.keys(n.properties))).then((function(t){return{props:(e=re(t,n,r),e.reduce((function(t,e){var r=function(r){var n=e.properties[r];r in t||(t[r]={uniqueValues:[]});var o=t[r].uniqueValues.find((function(t){return t.value===n}));o?o.count++:t[r].uniqueValues.push({value:n,count:1})};for(var n in e.properties)r(n);return t}),{}))};var e}))}));\n"], {type: 'application/javascript'})), {
type: 'module',

@@ -11,0 +11,0 @@ });

{
"name": "@camptocamp/ogc-client",
"version": "0.3.2",
"version": "0.3.3",
"description": "A pure JS library for interacting with geospatial services.",

@@ -45,4 +45,4 @@ "main": "./dist/dist-node.js",

"test": "jest",
"format:write": "prettier --write src demo",
"format:check": "prettier --check src demo",
"format:write": "prettier --write .",
"format:check": "prettier --check .",
"generate-dist": "cd build && node ./generate-dist.js",

@@ -49,0 +49,0 @@ "prepublishOnly": "npm test && npm run generate-dist"

@@ -9,5 +9,6 @@ # ogc-client

The following standards are partially implemented:
* WMS - *Web Map Service*
* WFS - *Web Feature Service*
- WMS - _Web Map Service_
- WFS - _Web Feature Service_
Why no WMTS support? Because [openlayers](https://www.github.com/openlayers/openlayers) has a incredibly thorough and well-tested WMTS capabilities parser and you should just use it.

@@ -24,5 +25,5 @@ Reimplementing it in **ogc-client** currently does not bring any significant value.

4. **ogc-client** will run heavy tasks in a worker to avoid blocking the main thread
4. **ogc-client** will keep a persistent cache of operations to minimize requests and processing
5. **ogc-client** will handle errors in a graceful way and extract relevant messages for you
6. **ogc-client** will tell you if a service is not usable for [CORS-related issues](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
5. **ogc-client** will keep a persistent cache of operations to minimize requests and processing
6. **ogc-client** will handle errors in a graceful way and extract relevant messages for you
7. **ogc-client** will tell you if a service is not usable for [CORS-related issues](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)

@@ -41,8 +42,9 @@ ## Instructions

### Demo
### Application
The demo app is located in the `demo` folder. To start it locally, clone the repository and run the following commands:
A provided application containing the documentation and demo is located in the `app` folder.
To start it locally, clone the repository and run the following commands:
```bash
$ cd demo
$ cd app
$ npm install

@@ -49,0 +51,0 @@ $ npm run serve

@@ -64,1 +64,35 @@ import { parseXmlString } from './xml-utils';

}
/**
* Add or replace query params in the url; note that params are considered case insensitive,
* meaning that existing params in different cases will be removed as well.
* Also, if the url ends with an encoded URL (typically in the case of urls run through a CORS
* proxy, which is an aberration and should be forbidden btw), then the encoded URL
* will be modified instead.
* @param {string} url
* @param {Object.<string, string>} params
* @returns {string}
*/
export function setQueryParams(url, params) {
const encodedUrlMatch = url.match(/(https?%3A%2F%2F[^/]+)$/);
if (encodedUrlMatch) {
const encodedUrl = encodedUrlMatch[1];
const modifiedUrl = setQueryParams(decodeURIComponent(encodedUrl), params);
return url.replace(encodedUrl, encodeURIComponent(modifiedUrl));
}
const urlObj = new URL(url);
const keys = Object.keys(params);
const keysLower = keys.map((key) => key.toLowerCase());
const toDelete = [];
for (const param of urlObj.searchParams.keys()) {
if (keysLower.indexOf(param.toLowerCase()) > -1) {
toDelete.push(param);
}
}
toDelete.map((param) => urlObj.searchParams.delete(param));
keys.forEach((key) =>
urlObj.searchParams.set(key, params[key] === true ? '' : params[key])
);
return urlObj.toString();
}
import { EndpointError } from './errors';
import { queryXmlDocument } from './http-utils';
import { queryXmlDocument, setQueryParams } from './http-utils';

@@ -131,2 +131,51 @@ describe('HTTP utils', () => {

});
describe('setQueryParams', () => {
it('adds new parameters if not present', () => {
expect(
setQueryParams('https://my.host/service?arg1=123', {
ARG2: '45',
Arg3: 'hello',
})
).toBe('https://my.host/service?arg1=123&ARG2=45&Arg3=hello');
});
it('replaces existing parameters regardless of case', () => {
expect(
setQueryParams('https://my.host/service?ARG1=123&Arg2=bla&arg3', {
ARG2: '45',
Arg3: 'hello',
})
).toBe('https://my.host/service?ARG1=123&ARG2=45&Arg3=hello');
});
it('sets a parameter without value if true', () => {
expect(
setQueryParams('https://my.host/service', {
ARG2: true,
})
).toBe('https://my.host/service?ARG2=');
});
it('appends an encoded URL if found (HTTP)', () => {
expect(
setQueryParams('http://bad.proxy/?url=http%3A%2F%2Fmy.host%2Fservice', {
ARG2: '45',
Arg3: 'hello',
})
).toBe(
'http://bad.proxy/?url=http%3A%2F%2Fmy.host%2Fservice%3FARG2%3D45%26Arg3%3Dhello'
);
});
it('appends an encoded URL if found (HTTPS)', () => {
expect(
setQueryParams(
'http://bad.proxy/?url=https%3A%2F%2Fmy.host%2Fservice',
{
ARG2: '45',
Arg3: 'hello',
}
)
).toBe(
'http://bad.proxy/?url=https%3A%2F%2Fmy.host%2Fservice%3FARG2%3D45%26Arg3%3Dhello'
);
});
});
});
import { EndpointError } from '../shared/errors';
import { parseWfsCapabilities, queryWfsFeatureTypeDetails } from '../worker';
import { queryXmlDocument } from '../shared/http-utils';
import { queryXmlDocument, setQueryParams } from '../shared/http-utils';
import { parseFeatureTypeInfo } from './featuretypeinfo';

@@ -96,8 +96,2 @@ import { useCache } from '../shared/cache';

constructor(url) {
const capabilitiesUrl = new URL(url);
capabilitiesUrl.searchParams.delete('service');
capabilitiesUrl.searchParams.set('SERVICE', 'WFS');
capabilitiesUrl.searchParams.delete('request');
capabilitiesUrl.searchParams.set('REQUEST', 'GetCapabilities');
/**

@@ -107,3 +101,6 @@ * @type {string}

*/
this._capabilitiesUrl = capabilitiesUrl.toString();
this._capabilitiesUrl = setQueryParams(url, {
SERVICE: 'WFS',
REQUEST: 'GetCapabilities',
});

@@ -110,0 +107,0 @@ /**

@@ -0,1 +1,3 @@

import { setQueryParams } from '../shared/http-utils';
/**

@@ -30,27 +32,25 @@ * Generates an URL for a GetFeature operation

const countParam = version === '2.0.0' ? 'COUNT' : 'MAXFEATURES';
const url = new URL(serviceUrl);
url.searchParams.set('SERVICE', 'WFS');
url.searchParams.set('REQUEST', 'GetFeature');
url.searchParams.set('VERSION', version);
url.searchParams.set(typeParam, featureType);
if (outputFormat !== undefined)
url.searchParams.set('OUTPUTFORMAT', outputFormat);
if (attributes !== undefined)
url.searchParams.set('PROPERTYNAME', attributes.join(','));
const newParams = {
SERVICE: 'WFS',
REQUEST: 'GetFeature',
VERSION: version,
[typeParam]: featureType,
};
if (outputFormat !== undefined) newParams.OUTPUTFORMAT = outputFormat;
if (attributes !== undefined) newParams.PROPERTYNAME = attributes.join(',');
if (hitsOnly) {
url.searchParams.set('RESULTTYPE', 'hits');
url.searchParams.set(countParam, '1'); // in case the RESULTTYPE param is not supported
newParams.RESULTTYPE = 'hits';
newParams[countParam] = '1'; // in case the RESULTTYPE param is not supported
} else if (maxFeatures !== undefined)
url.searchParams.set(countParam, maxFeatures.toString(10));
newParams[countParam] = maxFeatures.toString(10);
if (outputCrs) {
url.searchParams.set('SRSNAME', outputCrs);
newParams.SRSNAME = outputCrs;
}
if (extent) {
const extentJoined = extent.join(',');
url.searchParams.set(
'BBOX',
extentCrs ? `${extentJoined},${extentCrs}` : extentJoined
);
newParams.BBOX = extentCrs ? `${extentJoined},${extentCrs}` : extentJoined;
}
return url.toString();
return setQueryParams(serviceUrl, newParams);
}

@@ -71,8 +71,8 @@

const typeParam = version === '2.0.0' ? 'TYPENAMES' : 'TYPENAME';
const url = new URL(serviceUrl);
url.searchParams.set('SERVICE', 'WFS');
url.searchParams.set('REQUEST', 'DescribeFeatureType');
url.searchParams.set('VERSION', version);
url.searchParams.set(typeParam, featureType);
return url.toString();
return setQueryParams(serviceUrl, {
SERVICE: 'WFS',
REQUEST: 'DescribeFeatureType',
VERSION: version,
[typeParam]: featureType,
});
}
import { EndpointError } from '../shared/errors';
import { parseWmsCapabilities } from '../worker';
import { useCache } from '../shared/cache';
import { setQueryParams } from '../shared/http-utils';

@@ -52,7 +53,6 @@ /**

constructor(url) {
const capabilitiesUrl = new URL(url);
capabilitiesUrl.searchParams.delete('service');
capabilitiesUrl.searchParams.set('SERVICE', 'WMS');
capabilitiesUrl.searchParams.delete('request');
capabilitiesUrl.searchParams.set('REQUEST', 'GetCapabilities');
const capabilitiesUrl = setQueryParams(url, {
SERVICE: 'WMS',
REQUEST: 'GetCapabilities',
});

@@ -65,6 +65,6 @@ /**

this._capabilitiesPromise = useCache(
() => parseWmsCapabilities(capabilitiesUrl.toString()),
() => parseWmsCapabilities(capabilitiesUrl),
'WMS',
'CAPABILITIES',
capabilitiesUrl.toString()
capabilitiesUrl
).then(({ info, layers, version }) => {

@@ -71,0 +71,0 @@ this._info = info;

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc