@nextgis/ngw-map 4.0.0-alpha.1 → 4.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.1; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.4; author: NextGIS */
2
2
  const svgPath = {
3
3
  brill: '<path d="m6 0-5 6 5 6 5-6z"/>',
4
4
  circle: '<circle cx="6" cy="6" r="6"/>',
@@ -379,23 +379,23 @@ function template(str, data) {
379
379
  });
380
380
  }
381
381
 
382
- var __defProp$T = Object.defineProperty;
383
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
384
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
385
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
386
- var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
387
- var __spreadValues$A = (a, b) => {
382
+ var __defProp$U = Object.defineProperty;
383
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
384
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
385
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
386
+ var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
387
+ var __spreadValues$z = (a, b) => {
388
388
  for (var prop in b || (b = {}))
389
- if (__hasOwnProp$B.call(b, prop))
390
- __defNormalProp$T(a, prop, b[prop]);
391
- if (__getOwnPropSymbols$B)
392
- for (var prop of __getOwnPropSymbols$B(b)) {
393
- if (__propIsEnum$B.call(b, prop))
394
- __defNormalProp$T(a, prop, b[prop]);
389
+ if (__hasOwnProp$A.call(b, prop))
390
+ __defNormalProp$U(a, prop, b[prop]);
391
+ if (__getOwnPropSymbols$A)
392
+ for (var prop of __getOwnPropSymbols$A(b)) {
393
+ if (__propIsEnum$A.call(b, prop))
394
+ __defNormalProp$U(a, prop, b[prop]);
395
395
  }
396
396
  return a;
397
397
  };
398
- var __async$w = (__this, __arguments, generator) => {
398
+ var __async$x = (__this, __arguments, generator) => {
399
399
  return new Promise((resolve, reject) => {
400
400
  var fulfilled = (value) => {
401
401
  try {
@@ -416,7 +416,7 @@ var __async$w = (__this, __arguments, generator) => {
416
416
  });
417
417
  };
418
418
  function apiRequest(opt) {
419
- return __async$w(this, null, function* () {
419
+ return __async$x(this, null, function* () {
420
420
  const { params, name, connector, requestOptions } = opt;
421
421
  const apiItems = yield connector.connect();
422
422
  let apiItem = apiItems && apiItems[name];
@@ -454,7 +454,7 @@ function apiRequest(opt) {
454
454
  }
455
455
  }
456
456
  if (url) {
457
- return connector.makeQuery(url, params, __spreadValues$A({
457
+ return connector.makeQuery(url, params, __spreadValues$z({
458
458
  cacheName: name
459
459
  }, requestOptions));
460
460
  } else {
@@ -466,12 +466,12 @@ function apiRequest(opt) {
466
466
  });
467
467
  }
468
468
 
469
- var __defProp$S = Object.defineProperty;
470
- var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
471
- var __publicField$A = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
469
+ var __defProp$T = Object.defineProperty;
470
+ var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
471
+ var __publicField$B = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
472
472
  const _Cache = class _Cache {
473
473
  constructor(options = {}) {
474
- __publicField$A(this, "cache", []);
474
+ __publicField$B(this, "cache", []);
475
475
  var _a;
476
476
  const namespace = (_a = options.namespace) != null ? _a : "default";
477
477
  if (_Cache.instance[namespace]) {
@@ -602,7 +602,7 @@ const _Cache = class _Cache {
602
602
  return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
603
603
  }
604
604
  };
605
- __publicField$A(_Cache, "instance", {});
605
+ __publicField$B(_Cache, "instance", {});
606
606
  let Cache = _Cache;
607
607
 
608
608
  var domain;
@@ -1080,7 +1080,7 @@ function unwrapListeners(arr) {
1080
1080
  }
1081
1081
 
1082
1082
  var pkg = {
1083
- version: "3.0.1"};
1083
+ version: "4.0.0-alpha.2"};
1084
1084
 
1085
1085
  class AbortError extends Error {
1086
1086
  constructor(message = "AbortError") {
@@ -1089,46 +1089,46 @@ class AbortError extends Error {
1089
1089
  }
1090
1090
  }
1091
1091
 
1092
- var __defProp$R = Object.defineProperty;
1093
- var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1094
- var __publicField$z = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
1092
+ var __defProp$S = Object.defineProperty;
1093
+ var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1094
+ var __publicField$A = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
1095
1095
  class NgwError extends Error {
1096
1096
  constructor(er) {
1097
1097
  super();
1098
- __publicField$z(this, "name", "NgwError");
1099
- __publicField$z(this, "title");
1100
- __publicField$z(this, "message");
1101
- __publicField$z(this, "detail");
1102
- __publicField$z(this, "exception");
1103
- __publicField$z(this, "status_code");
1104
- __publicField$z(this, "data");
1105
- __publicField$z(this, "guru_meditation");
1098
+ __publicField$A(this, "name", "NgwError");
1099
+ __publicField$A(this, "title");
1100
+ __publicField$A(this, "message");
1101
+ __publicField$A(this, "detail");
1102
+ __publicField$A(this, "exception");
1103
+ __publicField$A(this, "status_code");
1104
+ __publicField$A(this, "data");
1105
+ __publicField$A(this, "guru_meditation");
1106
1106
  Object.assign(this, er);
1107
1107
  Object.setPrototypeOf(this, NgwError.prototype);
1108
1108
  }
1109
1109
  }
1110
1110
 
1111
- var __defProp$Q = Object.defineProperty;
1112
- var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1113
- var __publicField$y = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
1111
+ var __defProp$R = Object.defineProperty;
1112
+ var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1113
+ var __publicField$z = (obj, key, value) => __defNormalProp$R(obj, typeof key !== "symbol" ? key + "" : key, value);
1114
1114
  class InsufficientPermissionsError extends NgwError {
1115
1115
  constructor(obj) {
1116
1116
  super(obj);
1117
- __publicField$y(this, "name", "InsufficientPermissionsError");
1118
- __publicField$y(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
1117
+ __publicField$z(this, "name", "InsufficientPermissionsError");
1118
+ __publicField$z(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
1119
1119
  Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
1120
1120
  }
1121
1121
  }
1122
1122
 
1123
- var __defProp$P = Object.defineProperty;
1124
- var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1125
- var __publicField$x = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
1123
+ var __defProp$Q = Object.defineProperty;
1124
+ var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1125
+ var __publicField$y = (obj, key, value) => __defNormalProp$Q(obj, typeof key !== "symbol" ? key + "" : key, value);
1126
1126
  let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
1127
1127
  constructor(obj) {
1128
1128
  super(obj);
1129
- __publicField$x(this, "message", "There is no response from the server or problem connecting to server.");
1130
- __publicField$x(this, "title", "Network error");
1131
- __publicField$x(this, "detail", "Check network connectivity and try again later.");
1129
+ __publicField$y(this, "message", "There is no response from the server or problem connecting to server.");
1130
+ __publicField$y(this, "title", "Network error");
1131
+ __publicField$y(this, "detail", "Check network connectivity and try again later.");
1132
1132
  Object.setPrototypeOf(this, NetworksResponseError.prototype);
1133
1133
  }
1134
1134
  };
@@ -1165,27 +1165,27 @@ function isError(error) {
1165
1165
  return false;
1166
1166
  }
1167
1167
 
1168
- var __defProp$O = Object.defineProperty;
1169
- var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1170
- var __publicField$w = (obj, key, value) => __defNormalProp$O(obj, key + "" , value);
1168
+ var __defProp$P = Object.defineProperty;
1169
+ var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1170
+ var __publicField$x = (obj, key, value) => __defNormalProp$P(obj, key + "" , value);
1171
1171
  class NetworkError extends Error {
1172
1172
  constructor(url) {
1173
1173
  super();
1174
- __publicField$w(this, "name", "NetworkError");
1174
+ __publicField$x(this, "name", "NetworkError");
1175
1175
  Object.setPrototypeOf(this, NetworkError.prototype);
1176
1176
  this.message = `Unable to request ${url}.
1177
1177
  Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
1178
1178
  }
1179
1179
  }
1180
1180
 
1181
- var __defProp$N = Object.defineProperty;
1182
- var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1183
- var __publicField$v = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
1181
+ var __defProp$O = Object.defineProperty;
1182
+ var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1183
+ var __publicField$w = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
1184
1184
  class ResourceNotFoundError extends NgwError {
1185
1185
  constructor(obj) {
1186
1186
  super(obj);
1187
- __publicField$v(this, "name", "ResourceNotFoundError");
1188
- __publicField$v(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
1187
+ __publicField$w(this, "name", "ResourceNotFoundError");
1188
+ __publicField$w(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
1189
1189
  Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
1190
1190
  }
1191
1191
  }
@@ -1202,13 +1202,13 @@ var errors = /*#__PURE__*/Object.freeze({
1202
1202
  isError: isError
1203
1203
  });
1204
1204
 
1205
- var __defProp$M = Object.defineProperty;
1206
- var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1207
- var __publicField$u = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
1205
+ var __defProp$N = Object.defineProperty;
1206
+ var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1207
+ var __publicField$v = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
1208
1208
  class BaseAPIError extends Error {
1209
1209
  constructor(message) {
1210
1210
  super(message || "Something went wrong.");
1211
- __publicField$u(this, "title");
1211
+ __publicField$v(this, "title");
1212
1212
  this.name = "BaseAPIError";
1213
1213
  this.title = "Unknown API error";
1214
1214
  if (Error.captureStackTrace) {
@@ -1220,7 +1220,7 @@ class NetworksResponseError extends BaseAPIError {
1220
1220
  // prettier-ignore
1221
1221
  constructor(message) {
1222
1222
  super(message || "There is no response from the server or problem connecting to server.");
1223
- __publicField$u(this, "detail");
1223
+ __publicField$v(this, "detail");
1224
1224
  this.title = "Network error";
1225
1225
  this.detail = "Check network connectivity and try again later.";
1226
1226
  }
@@ -1234,8 +1234,8 @@ class InvalidResponseError extends BaseAPIError {
1234
1234
  class ServerResponseError extends BaseAPIError {
1235
1235
  constructor(data) {
1236
1236
  super(data.message);
1237
- __publicField$u(this, "detail");
1238
- __publicField$u(this, "data");
1237
+ __publicField$v(this, "detail");
1238
+ __publicField$v(this, "data");
1239
1239
  this.title = data.title || this.title;
1240
1240
  this.detail = data.detail || null;
1241
1241
  this.data = data;
@@ -1245,8 +1245,8 @@ class LunkwillError extends Error {
1245
1245
  // prettier-ignore
1246
1246
  constructor(message, data = {}) {
1247
1247
  super(message || "Unexpected error while processing long-running request.");
1248
- __publicField$u(this, "title");
1249
- __publicField$u(this, "data");
1248
+ __publicField$v(this, "title");
1249
+ __publicField$v(this, "data");
1250
1250
  this.name = "LunkwillError";
1251
1251
  this.title = "Long-running request error";
1252
1252
  this.data = data;
@@ -1266,35 +1266,35 @@ class LunkwillRequestFailed extends LunkwillError {
1266
1266
  }
1267
1267
  }
1268
1268
 
1269
- var __defProp$L = Object.defineProperty;
1270
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
1271
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
1272
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
1273
- var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1274
- var __spreadValues$z = (a, b) => {
1269
+ var __defProp$M = Object.defineProperty;
1270
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
1271
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
1272
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
1273
+ var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1274
+ var __spreadValues$y = (a, b) => {
1275
1275
  for (var prop in b || (b = {}))
1276
- if (__hasOwnProp$A.call(b, prop))
1277
- __defNormalProp$L(a, prop, b[prop]);
1278
- if (__getOwnPropSymbols$A)
1279
- for (var prop of __getOwnPropSymbols$A(b)) {
1280
- if (__propIsEnum$A.call(b, prop))
1281
- __defNormalProp$L(a, prop, b[prop]);
1276
+ if (__hasOwnProp$z.call(b, prop))
1277
+ __defNormalProp$M(a, prop, b[prop]);
1278
+ if (__getOwnPropSymbols$z)
1279
+ for (var prop of __getOwnPropSymbols$z(b)) {
1280
+ if (__propIsEnum$z.call(b, prop))
1281
+ __defNormalProp$M(a, prop, b[prop]);
1282
1282
  }
1283
1283
  return a;
1284
1284
  };
1285
1285
  var __objRest$7 = (source, exclude) => {
1286
1286
  var target = {};
1287
1287
  for (var prop in source)
1288
- if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
1288
+ if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
1289
1289
  target[prop] = source[prop];
1290
- if (source != null && __getOwnPropSymbols$A)
1291
- for (var prop of __getOwnPropSymbols$A(source)) {
1292
- if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
1290
+ if (source != null && __getOwnPropSymbols$z)
1291
+ for (var prop of __getOwnPropSymbols$z(source)) {
1292
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
1293
1293
  target[prop] = source[prop];
1294
1294
  }
1295
1295
  return target;
1296
1296
  };
1297
- var __async$v = (__this, __arguments, generator) => {
1297
+ var __async$w = (__this, __arguments, generator) => {
1298
1298
  return new Promise((resolve, reject) => {
1299
1299
  var fulfilled = (value) => {
1300
1300
  try {
@@ -1319,7 +1319,7 @@ function lunkwillCheckResponse(lwResp) {
1319
1319
  return ct !== void 0 && ct !== null && ct.includes("application/vnd.lunkwill.request-summary+json");
1320
1320
  }
1321
1321
  function responseJson(response) {
1322
- return __async$v(this, null, function* () {
1322
+ return __async$w(this, null, function* () {
1323
1323
  try {
1324
1324
  return response.json();
1325
1325
  } catch (e) {
@@ -1328,7 +1328,7 @@ function responseJson(response) {
1328
1328
  });
1329
1329
  }
1330
1330
  function lunkwillResponseUrl(lwResp) {
1331
- return __async$v(this, null, function* () {
1331
+ return __async$w(this, null, function* () {
1332
1332
  const lwData = yield responseJson(lwResp);
1333
1333
  let delay = lwData.delay_ms;
1334
1334
  const retry = lwData.retry_ms !== void 0 ? lwData.retry_ms : 2e3;
@@ -1372,7 +1372,7 @@ function lunkwillResponseUrl(lwResp) {
1372
1372
  });
1373
1373
  }
1374
1374
  function lunkwillFetch(lwRespUrl) {
1375
- return __async$v(this, null, function* () {
1375
+ return __async$w(this, null, function* () {
1376
1376
  try {
1377
1377
  return yield window.fetch(lwRespUrl, { credentials: "same-origin" });
1378
1378
  } catch (e) {
@@ -1420,14 +1420,14 @@ function generateUrl(path, query) {
1420
1420
  return path + urlParams;
1421
1421
  }
1422
1422
  function request(path, options, cacheEngine) {
1423
- return __async$v(this, null, function* () {
1423
+ return __async$w(this, null, function* () {
1424
1424
  var _b, _c;
1425
1425
  const defaults = {
1426
1426
  method: "GET",
1427
1427
  credentials: "same-origin",
1428
1428
  headers: {}
1429
1429
  };
1430
- const _a = __spreadValues$z(__spreadValues$z({}, defaults), options), {
1430
+ const _a = __spreadValues$y(__spreadValues$y({}, defaults), options), {
1431
1431
  withCredentials,
1432
1432
  responseType,
1433
1433
  cacheProps,
@@ -1464,7 +1464,7 @@ function request(path, options, cacheEngine) {
1464
1464
  opt.headers = headers;
1465
1465
  }
1466
1466
  const url = generateUrl(path, query);
1467
- const makeRequest = () => __async$v(null, null, function* () {
1467
+ const makeRequest = () => __async$w(null, null, function* () {
1468
1468
  let response;
1469
1469
  try {
1470
1470
  response = yield fetch(url, opt);
@@ -1507,7 +1507,7 @@ function request(path, options, cacheEngine) {
1507
1507
  if (cacheEngine) {
1508
1508
  if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
1509
1509
  if (cache !== false) {
1510
- const props = cacheProps ? cacheProps : __spreadValues$z({}, objectRemoveEmpty({
1510
+ const props = cacheProps ? cacheProps : __spreadValues$y({}, objectRemoveEmpty({
1511
1511
  withCredentials,
1512
1512
  responseType
1513
1513
  }));
@@ -1527,38 +1527,38 @@ function request(path, options, cacheEngine) {
1527
1527
  });
1528
1528
  }
1529
1529
 
1530
- var __defProp$K = Object.defineProperty;
1531
- var __defProps$l = Object.defineProperties;
1532
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
1533
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
1534
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
1535
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
1536
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1537
- var __spreadValues$y = (a, b) => {
1530
+ var __defProp$L = Object.defineProperty;
1531
+ var __defProps$m = Object.defineProperties;
1532
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
1533
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
1534
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
1535
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
1536
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1537
+ var __spreadValues$x = (a, b) => {
1538
1538
  for (var prop in b || (b = {}))
1539
- if (__hasOwnProp$z.call(b, prop))
1540
- __defNormalProp$K(a, prop, b[prop]);
1541
- if (__getOwnPropSymbols$z)
1542
- for (var prop of __getOwnPropSymbols$z(b)) {
1543
- if (__propIsEnum$z.call(b, prop))
1544
- __defNormalProp$K(a, prop, b[prop]);
1539
+ if (__hasOwnProp$y.call(b, prop))
1540
+ __defNormalProp$L(a, prop, b[prop]);
1541
+ if (__getOwnPropSymbols$y)
1542
+ for (var prop of __getOwnPropSymbols$y(b)) {
1543
+ if (__propIsEnum$y.call(b, prop))
1544
+ __defNormalProp$L(a, prop, b[prop]);
1545
1545
  }
1546
1546
  return a;
1547
1547
  };
1548
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
1548
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
1549
1549
  var __objRest$6 = (source, exclude) => {
1550
1550
  var target = {};
1551
1551
  for (var prop in source)
1552
- if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
1552
+ if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
1553
1553
  target[prop] = source[prop];
1554
- if (source != null && __getOwnPropSymbols$z)
1555
- for (var prop of __getOwnPropSymbols$z(source)) {
1556
- if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
1554
+ if (source != null && __getOwnPropSymbols$y)
1555
+ for (var prop of __getOwnPropSymbols$y(source)) {
1556
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
1557
1557
  target[prop] = source[prop];
1558
1558
  }
1559
1559
  return target;
1560
1560
  };
1561
- var __async$u = (__this, __arguments, generator) => {
1561
+ var __async$v = (__this, __arguments, generator) => {
1562
1562
  return new Promise((resolve, reject) => {
1563
1563
  var fulfilled = (value) => {
1564
1564
  try {
@@ -1609,7 +1609,7 @@ function routeURL(name, baseUrl, routeData, ...rest) {
1609
1609
  }
1610
1610
  function route(name, connector, ...rest) {
1611
1611
  const result = {
1612
- url: (opt) => __async$u(null, null, function* () {
1612
+ url: (opt) => __async$v(null, null, function* () {
1613
1613
  var _a;
1614
1614
  const routeData = yield connector.connect();
1615
1615
  const template = routeURL(
@@ -1637,10 +1637,10 @@ function route(name, connector, ...rest) {
1637
1637
  routeData,
1638
1638
  ...rest
1639
1639
  );
1640
- const headers = objectRemoveEmpty(__spreadValues$y(__spreadValues$y({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
1640
+ const headers = objectRemoveEmpty(__spreadValues$x(__spreadValues$x({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
1641
1641
  return request(
1642
1642
  template,
1643
- __spreadProps$l(__spreadValues$y({
1643
+ __spreadProps$m(__spreadValues$x({
1644
1644
  headers
1645
1645
  }, restOpt), {
1646
1646
  method
@@ -1764,39 +1764,39 @@ function removeConnector(connector) {
1764
1764
  }
1765
1765
  }
1766
1766
 
1767
- var __defProp$J = Object.defineProperty;
1768
- var __defProps$k = Object.defineProperties;
1769
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
1770
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
1771
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
1772
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
1773
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1774
- var __spreadValues$x = (a, b) => {
1767
+ var __defProp$K = Object.defineProperty;
1768
+ var __defProps$l = Object.defineProperties;
1769
+ var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
1770
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
1771
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
1772
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
1773
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1774
+ var __spreadValues$w = (a, b) => {
1775
1775
  for (var prop in b || (b = {}))
1776
- if (__hasOwnProp$y.call(b, prop))
1777
- __defNormalProp$J(a, prop, b[prop]);
1778
- if (__getOwnPropSymbols$y)
1779
- for (var prop of __getOwnPropSymbols$y(b)) {
1780
- if (__propIsEnum$y.call(b, prop))
1781
- __defNormalProp$J(a, prop, b[prop]);
1776
+ if (__hasOwnProp$x.call(b, prop))
1777
+ __defNormalProp$K(a, prop, b[prop]);
1778
+ if (__getOwnPropSymbols$x)
1779
+ for (var prop of __getOwnPropSymbols$x(b)) {
1780
+ if (__propIsEnum$x.call(b, prop))
1781
+ __defNormalProp$K(a, prop, b[prop]);
1782
1782
  }
1783
1783
  return a;
1784
1784
  };
1785
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
1785
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
1786
1786
  var __objRest$5 = (source, exclude) => {
1787
1787
  var target = {};
1788
1788
  for (var prop in source)
1789
- if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
1789
+ if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
1790
1790
  target[prop] = source[prop];
1791
- if (source != null && __getOwnPropSymbols$y)
1792
- for (var prop of __getOwnPropSymbols$y(source)) {
1793
- if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
1791
+ if (source != null && __getOwnPropSymbols$x)
1792
+ for (var prop of __getOwnPropSymbols$x(source)) {
1793
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
1794
1794
  target[prop] = source[prop];
1795
1795
  }
1796
1796
  return target;
1797
1797
  };
1798
- var __publicField$t = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
1799
- var __async$t = (__this, __arguments, generator) => {
1798
+ var __publicField$u = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
1799
+ var __async$u = (__this, __arguments, generator) => {
1800
1800
  return new Promise((resolve, reject) => {
1801
1801
  var fulfilled = (value) => {
1802
1802
  try {
@@ -1821,18 +1821,18 @@ let REQUEST_ID = 0;
1821
1821
  class NgwConnector {
1822
1822
  constructor(options) {
1823
1823
  this.options = options;
1824
- __publicField$t(this, "id", ID$2++);
1825
- __publicField$t(this, "emitter", new EventEmitter());
1826
- __publicField$t(this, "user");
1827
- __publicField$t(this, "cache");
1828
- __publicField$t(this, "withCredentials");
1824
+ __publicField$u(this, "id", ID$2++);
1825
+ __publicField$u(this, "emitter", new EventEmitter());
1826
+ __publicField$u(this, "user");
1827
+ __publicField$u(this, "cache");
1828
+ __publicField$u(this, "withCredentials");
1829
1829
  // Dedicated cache for route requests, as these are executed before any other requests.
1830
1830
  // This cache does not need to be cleared during the session.
1831
- __publicField$t(this, "routeCache");
1832
- __publicField$t(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
1833
- __publicField$t(this, "routeStr", "/api/component/pyramid/route");
1834
- __publicField$t(this, "activeRequests", {});
1835
- __publicField$t(this, "requestTransform");
1831
+ __publicField$u(this, "routeCache");
1832
+ __publicField$u(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
1833
+ __publicField$u(this, "routeStr", "/api/component/pyramid/route");
1834
+ __publicField$u(this, "activeRequests", {});
1835
+ __publicField$u(this, "requestTransform");
1836
1836
  const exist = findConnector(options);
1837
1837
  this.cache = new Cache({ namespace: options.cacheId });
1838
1838
  this.routeCache = new Cache({ namespace: "routecache" });
@@ -1885,7 +1885,7 @@ class NgwConnector {
1885
1885
  * ```
1886
1886
  */
1887
1887
  connect() {
1888
- return __async$t(this, arguments, function* ({
1888
+ return __async$u(this, arguments, function* ({
1889
1889
  signal
1890
1890
  } = {}) {
1891
1891
  const auth = this.options.auth;
@@ -1924,14 +1924,14 @@ class NgwConnector {
1924
1924
  this.emitter.emit("logout");
1925
1925
  }
1926
1926
  getUserInfo(credentials, options) {
1927
- return __async$t(this, null, function* () {
1927
+ return __async$u(this, null, function* () {
1928
1928
  if (this.user && this.user.id) {
1929
1929
  return this.user;
1930
1930
  }
1931
1931
  if (credentials) {
1932
1932
  this.options.auth = credentials;
1933
1933
  }
1934
- const options_ = __spreadValues$x({
1934
+ const options_ = __spreadValues$w({
1935
1935
  headers: this.getAuthorizationHeaders(credentials),
1936
1936
  cache: true
1937
1937
  }, options);
@@ -1972,7 +1972,7 @@ class NgwConnector {
1972
1972
  this.activeRequests = {};
1973
1973
  }
1974
1974
  getActiveApiRequests() {
1975
- return __spreadValues$x({}, this.activeRequests);
1975
+ return __spreadValues$w({}, this.activeRequests);
1976
1976
  }
1977
1977
  route(name, ...rest) {
1978
1978
  return route(name, this, ...rest);
@@ -1984,7 +1984,7 @@ class NgwConnector {
1984
1984
  * @param options - Request options
1985
1985
  */
1986
1986
  makeQuery(_0, _1) {
1987
- return __async$t(this, arguments, function* (url, params, options = {}) {
1987
+ return __async$u(this, arguments, function* (url, params, options = {}) {
1988
1988
  var _b;
1989
1989
  url = (this.options.baseUrl ? this.options.baseUrl : "") + url;
1990
1990
  if (!url) {
@@ -1995,7 +1995,7 @@ class NgwConnector {
1995
1995
  url = template(url, restParams);
1996
1996
  }
1997
1997
  url = encodeURI(fixUrlStr(url));
1998
- options = __spreadValues$x({ withCredentials: this.withCredentials }, options);
1998
+ options = __spreadValues$w({ withCredentials: this.withCredentials }, options);
1999
1999
  const {
2000
2000
  cache,
2001
2001
  signal: externalSignal,
@@ -2017,7 +2017,7 @@ class NgwConnector {
2017
2017
  });
2018
2018
  }
2019
2019
  options.signal = internalSignal;
2020
- const createPromise = () => __async$t(this, null, function* () {
2020
+ const createPromise = () => __async$u(this, null, function* () {
2021
2021
  const id = REQUEST_ID++;
2022
2022
  this.activeRequests[id] = internalAbortController;
2023
2023
  try {
@@ -2027,7 +2027,7 @@ class NgwConnector {
2027
2027
  }
2028
2028
  });
2029
2029
  if (method === "GET" && cache !== false) {
2030
- const cacheOptions = cacheProps ? cacheProps : __spreadProps$k(__spreadValues$x({}, objectRemoveEmpty({
2030
+ const cacheOptions = cacheProps ? cacheProps : __spreadProps$l(__spreadValues$w({}, objectRemoveEmpty({
2031
2031
  headers,
2032
2032
  withCredentials,
2033
2033
  responseType,
@@ -2050,7 +2050,7 @@ class NgwConnector {
2050
2050
  var _a;
2051
2051
  if (this.user) {
2052
2052
  options = options || {};
2053
- options.headers = __spreadValues$x(__spreadValues$x({}, this.getAuthorizationHeaders()), options.headers);
2053
+ options.headers = __spreadValues$w(__spreadValues$w({}, this.getAuthorizationHeaders()), options.headers);
2054
2054
  }
2055
2055
  if (this.requestTransform) {
2056
2056
  const [transUrl, transOptions] = this.requestTransform(url, options);
@@ -2081,7 +2081,7 @@ class NgwConnector {
2081
2081
  });
2082
2082
  }
2083
2083
  _login(credentials, options) {
2084
- return __async$t(this, null, function* () {
2084
+ return __async$u(this, null, function* () {
2085
2085
  try {
2086
2086
  const data = yield this.getUserInfo(credentials, options);
2087
2087
  this.user = data;
@@ -2109,7 +2109,7 @@ class NgwConnector {
2109
2109
  return er;
2110
2110
  }
2111
2111
  }
2112
- __publicField$t(NgwConnector, "errors", errors);
2112
+ __publicField$u(NgwConnector, "errors", errors);
2113
2113
 
2114
2114
  function resourceCompare(res1, res2) {
2115
2115
  return objectDeepEqual(res1, res2);
@@ -2139,27 +2139,27 @@ function resourceToQuery(resource, prefix = "") {
2139
2139
  return query;
2140
2140
  }
2141
2141
 
2142
- var __defProp$I = Object.defineProperty;
2143
- var __defProps$j = Object.defineProperties;
2144
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
2145
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
2146
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
2147
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
2148
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2149
- var __spreadValues$w = (a, b) => {
2142
+ var __defProp$J = Object.defineProperty;
2143
+ var __defProps$k = Object.defineProperties;
2144
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
2145
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
2146
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
2147
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
2148
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2149
+ var __spreadValues$v = (a, b) => {
2150
2150
  for (var prop in b || (b = {}))
2151
- if (__hasOwnProp$x.call(b, prop))
2152
- __defNormalProp$I(a, prop, b[prop]);
2153
- if (__getOwnPropSymbols$x)
2154
- for (var prop of __getOwnPropSymbols$x(b)) {
2155
- if (__propIsEnum$x.call(b, prop))
2156
- __defNormalProp$I(a, prop, b[prop]);
2151
+ if (__hasOwnProp$w.call(b, prop))
2152
+ __defNormalProp$J(a, prop, b[prop]);
2153
+ if (__getOwnPropSymbols$w)
2154
+ for (var prop of __getOwnPropSymbols$w(b)) {
2155
+ if (__propIsEnum$w.call(b, prop))
2156
+ __defNormalProp$J(a, prop, b[prop]);
2157
2157
  }
2158
2158
  return a;
2159
2159
  };
2160
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
2161
- var __publicField$s = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
2162
- var __async$s = (__this, __arguments, generator) => {
2160
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
2161
+ var __publicField$t = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
2162
+ var __async$t = (__this, __arguments, generator) => {
2163
2163
  return new Promise((resolve, reject) => {
2164
2164
  var fulfilled = (value) => {
2165
2165
  try {
@@ -2184,8 +2184,8 @@ class ResourcesControl {
2184
2184
  connector,
2185
2185
  cacheId
2186
2186
  }) {
2187
- __publicField$s(this, "cache");
2188
- __publicField$s(this, "connector");
2187
+ __publicField$t(this, "cache");
2188
+ __publicField$t(this, "connector");
2189
2189
  this.connector = connector;
2190
2190
  this.cache = new Cache({ namespace: cacheId });
2191
2191
  }
@@ -2200,7 +2200,7 @@ class ResourcesControl {
2200
2200
  * Fetching resource would be cached to speed up next call
2201
2201
  */
2202
2202
  getOne(resource, requestOptions) {
2203
- const opt = __spreadValues$w({}, requestOptions);
2203
+ const opt = __spreadValues$v({}, requestOptions);
2204
2204
  if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
2205
2205
  if (resource.id !== void 0) {
2206
2206
  resource.id;
@@ -2277,8 +2277,8 @@ class ResourcesControl {
2277
2277
  } else {
2278
2278
  Object.assign(query, resourceToQuery(resource));
2279
2279
  }
2280
- return this.connector.route("resource.search").get(__spreadProps$j(__spreadValues$w({}, requestOptions), {
2281
- query: __spreadValues$w({
2280
+ return this.connector.route("resource.search").get(__spreadProps$k(__spreadValues$v({}, requestOptions), {
2281
+ query: __spreadValues$v({
2282
2282
  serialization: "full"
2283
2283
  }, query)
2284
2284
  })).then((resources) => {
@@ -2331,7 +2331,7 @@ class ResourcesControl {
2331
2331
  });
2332
2332
  }
2333
2333
  _getChildrenOf(_0, _1) {
2334
- return __async$s(this, arguments, function* (parentDef, requestOptions, _items = []) {
2334
+ return __async$t(this, arguments, function* (parentDef, requestOptions, _items = []) {
2335
2335
  let parent = void 0;
2336
2336
  if (typeof parentDef === "string") {
2337
2337
  parent = yield this.getId(parentDef, requestOptions);
@@ -2340,7 +2340,7 @@ class ResourcesControl {
2340
2340
  } else {
2341
2341
  parent = parentDef;
2342
2342
  }
2343
- const items = yield this.connector.route("resource.collection").get(__spreadProps$j(__spreadValues$w({}, requestOptions), {
2343
+ const items = yield this.connector.route("resource.collection").get(__spreadProps$k(__spreadValues$v({}, requestOptions), {
2344
2344
  query: {
2345
2345
  parent
2346
2346
  }
@@ -2368,7 +2368,7 @@ class ResourcesControl {
2368
2368
  });
2369
2369
  }
2370
2370
  _cleanResourceItemCache(id) {
2371
- return __async$s(this, null, function* () {
2371
+ return __async$t(this, null, function* () {
2372
2372
  var _a;
2373
2373
  const all = this.cache.all();
2374
2374
  const toDelete = [];
@@ -2421,13 +2421,13 @@ class ResourcesControl {
2421
2421
  }
2422
2422
  }
2423
2423
 
2424
- var __defProp$H = Object.defineProperty;
2425
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2426
- var __publicField$r = (obj, key, value) => __defNormalProp$H(obj, key + "" , value);
2424
+ var __defProp$I = Object.defineProperty;
2425
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2426
+ var __publicField$s = (obj, key, value) => __defNormalProp$I(obj, key + "" , value);
2427
2427
  class NgwConnectorExtended extends NgwConnector {
2428
2428
  constructor(options) {
2429
2429
  super(options);
2430
- __publicField$r(this, "resources");
2430
+ __publicField$s(this, "resources");
2431
2431
  this.resources = new ResourcesControl({
2432
2432
  connector: this,
2433
2433
  cacheId: options.cacheId
@@ -2637,25 +2637,25 @@ class NgwConnectorExtended extends NgwConnector {
2637
2637
  }
2638
2638
  }
2639
2639
 
2640
- var __defProp$G = Object.defineProperty;
2641
- var __defProps$i = Object.defineProperties;
2642
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
2643
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
2644
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
2645
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
2646
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2647
- var __spreadValues$v = (a, b) => {
2640
+ var __defProp$H = Object.defineProperty;
2641
+ var __defProps$j = Object.defineProperties;
2642
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
2643
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
2644
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
2645
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
2646
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2647
+ var __spreadValues$u = (a, b) => {
2648
2648
  for (var prop in b || (b = {}))
2649
- if (__hasOwnProp$w.call(b, prop))
2650
- __defNormalProp$G(a, prop, b[prop]);
2651
- if (__getOwnPropSymbols$w)
2652
- for (var prop of __getOwnPropSymbols$w(b)) {
2653
- if (__propIsEnum$w.call(b, prop))
2654
- __defNormalProp$G(a, prop, b[prop]);
2649
+ if (__hasOwnProp$v.call(b, prop))
2650
+ __defNormalProp$H(a, prop, b[prop]);
2651
+ if (__getOwnPropSymbols$v)
2652
+ for (var prop of __getOwnPropSymbols$v(b)) {
2653
+ if (__propIsEnum$v.call(b, prop))
2654
+ __defNormalProp$H(a, prop, b[prop]);
2655
2655
  }
2656
2656
  return a;
2657
2657
  };
2658
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
2658
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
2659
2659
  function getNgwWebmapExtent(webmap) {
2660
2660
  const bottom = webmap["extent_bottom"];
2661
2661
  const left = webmap["extent_left"];
@@ -2722,14 +2722,14 @@ function fetchNgwResourceExtent(item, connector, options) {
2722
2722
  if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
2723
2723
  return connector.getResource(resource.parent.id, options).then((res) => {
2724
2724
  if (res) {
2725
- return fetchNgwLayerExtent(__spreadProps$i(__spreadValues$v({}, options), {
2725
+ return fetchNgwLayerExtent(__spreadProps$j(__spreadValues$u({}, options), {
2726
2726
  resourceId: res.resource.id,
2727
2727
  connector
2728
2728
  }));
2729
2729
  }
2730
2730
  });
2731
2731
  } else {
2732
- return fetchNgwLayerExtent(__spreadProps$i(__spreadValues$v({}, options), {
2732
+ return fetchNgwLayerExtent(__spreadProps$j(__spreadValues$u({}, options), {
2733
2733
  resourceId: resource.id,
2734
2734
  connector
2735
2735
  }));
@@ -2737,10 +2737,10 @@ function fetchNgwResourceExtent(item, connector, options) {
2737
2737
  }
2738
2738
  }
2739
2739
 
2740
- var __defProp$F = Object.defineProperty;
2741
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2742
- var __publicField$q = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
2743
- var __async$r = (__this, __arguments, generator) => {
2740
+ var __defProp$G = Object.defineProperty;
2741
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2742
+ var __publicField$r = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
2743
+ var __async$s = (__this, __arguments, generator) => {
2744
2744
  return new Promise((resolve, reject) => {
2745
2745
  var fulfilled = (value) => {
2746
2746
  try {
@@ -2762,18 +2762,18 @@ var __async$r = (__this, __arguments, generator) => {
2762
2762
  };
2763
2763
  class NgwResource {
2764
2764
  constructor() {
2765
- __publicField$q(this, "item");
2766
- __publicField$q(this, "connector");
2767
- __publicField$q(this, "_extent");
2765
+ __publicField$r(this, "item");
2766
+ __publicField$r(this, "connector");
2767
+ __publicField$r(this, "_extent");
2768
2768
  }
2769
2769
  /** @deprecated use {@link NgwResource.getBounds} instead */
2770
2770
  getExtent() {
2771
- return __async$r(this, null, function* () {
2771
+ return __async$s(this, null, function* () {
2772
2772
  return this.getBounds();
2773
2773
  });
2774
2774
  }
2775
2775
  getBounds(options) {
2776
- return __async$r(this, null, function* () {
2776
+ return __async$s(this, null, function* () {
2777
2777
  if (this._extent) {
2778
2778
  return this._extent;
2779
2779
  }
@@ -2789,7 +2789,7 @@ class NgwResource {
2789
2789
  }
2790
2790
  }
2791
2791
 
2792
- var __async$q = (__this, __arguments, generator) => {
2792
+ var __async$r = (__this, __arguments, generator) => {
2793
2793
  return new Promise((resolve, reject) => {
2794
2794
  var fulfilled = (value) => {
2795
2795
  try {
@@ -2810,7 +2810,7 @@ var __async$q = (__this, __arguments, generator) => {
2810
2810
  });
2811
2811
  };
2812
2812
  function resourceIdFromLayerOptions(options, connector) {
2813
- return __async$q(this, null, function* () {
2813
+ return __async$r(this, null, function* () {
2814
2814
  const resource = options.resource;
2815
2815
  const item = resource;
2816
2816
  let { keyname, resourceId } = options;
@@ -2835,25 +2835,25 @@ function resourceIdFromLayerOptions(options, connector) {
2835
2835
  });
2836
2836
  }
2837
2837
 
2838
- var __defProp$E = Object.defineProperty;
2839
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
2840
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
2841
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
2842
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2843
- var __spreadValues$u = (a, b) => {
2838
+ var __defProp$F = Object.defineProperty;
2839
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
2840
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
2841
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
2842
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2843
+ var __spreadValues$t = (a, b) => {
2844
2844
  for (var prop in b || (b = {}))
2845
- if (__hasOwnProp$v.call(b, prop))
2846
- __defNormalProp$E(a, prop, b[prop]);
2847
- if (__getOwnPropSymbols$v)
2848
- for (var prop of __getOwnPropSymbols$v(b)) {
2849
- if (__propIsEnum$v.call(b, prop))
2850
- __defNormalProp$E(a, prop, b[prop]);
2845
+ if (__hasOwnProp$u.call(b, prop))
2846
+ __defNormalProp$F(a, prop, b[prop]);
2847
+ if (__getOwnPropSymbols$u)
2848
+ for (var prop of __getOwnPropSymbols$u(b)) {
2849
+ if (__propIsEnum$u.call(b, prop))
2850
+ __defNormalProp$F(a, prop, b[prop]);
2851
2851
  }
2852
2852
  return a;
2853
2853
  };
2854
- var __publicField$p = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
2855
- var __async$p = (__this, __arguments, generator) => {
2856
- return new Promise((resolve, reject) => {
2854
+ var __publicField$q = (obj, key, value) => __defNormalProp$F(obj, typeof key !== "symbol" ? key + "" : key, value);
2855
+ var __async$q = (__this, __arguments, generator) => {
2856
+ return new Promise((resolve, reject) => {
2857
2857
  var fulfilled = (value) => {
2858
2858
  try {
2859
2859
  step(generator.next(value));
@@ -2873,7 +2873,7 @@ var __async$p = (__this, __arguments, generator) => {
2873
2873
  });
2874
2874
  };
2875
2875
  function createOnFirstShowAdapter(_0) {
2876
- return __async$p(this, arguments, function* ({
2876
+ return __async$q(this, arguments, function* ({
2877
2877
  webMap,
2878
2878
  adapterOptions = {},
2879
2879
  onLayerAdded,
@@ -2881,10 +2881,10 @@ function createOnFirstShowAdapter(_0) {
2881
2881
  }) {
2882
2882
  class OnFirstShowAdapter {
2883
2883
  constructor() {
2884
- __publicField$p(this, "options", {});
2885
- __publicField$p(this, "layer", []);
2886
- __publicField$p(this, "_removed", false);
2887
- __publicField$p(this, "_creatingInProgress", false);
2884
+ __publicField$q(this, "options", {});
2885
+ __publicField$q(this, "layer", []);
2886
+ __publicField$q(this, "_removed", false);
2887
+ __publicField$q(this, "_creatingInProgress", false);
2888
2888
  }
2889
2889
  addLayer() {
2890
2890
  return this.layer;
@@ -2899,7 +2899,7 @@ function createOnFirstShowAdapter(_0) {
2899
2899
  return this._removed;
2900
2900
  }
2901
2901
  showLayer() {
2902
- return __async$p(this, null, function* () {
2902
+ return __async$q(this, null, function* () {
2903
2903
  this.options.visibility = true;
2904
2904
  if (this.layer.length) {
2905
2905
  for (const x of this.layer) {
@@ -2911,7 +2911,7 @@ function createOnFirstShowAdapter(_0) {
2911
2911
  });
2912
2912
  }
2913
2913
  hideLayer() {
2914
- return __async$p(this, null, function* () {
2914
+ return __async$q(this, null, function* () {
2915
2915
  this.options.visibility = false;
2916
2916
  if (this.layer) {
2917
2917
  for (const x of this.layer) {
@@ -2921,12 +2921,12 @@ function createOnFirstShowAdapter(_0) {
2921
2921
  });
2922
2922
  }
2923
2923
  loadLayer() {
2924
- return __async$p(this, null, function* () {
2924
+ return __async$q(this, null, function* () {
2925
2925
  if (!this.layer.length && !this._creatingInProgress) {
2926
2926
  this._creatingInProgress = true;
2927
2927
  const Adapter = yield createAdapter(this);
2928
2928
  if (Adapter) {
2929
- const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$u({}, adapterOptions));
2929
+ const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$t({}, adapterOptions));
2930
2930
  const realLayer = yield adapter.addLayer({
2931
2931
  order: this.options.order,
2932
2932
  headers: this.options.headers,
@@ -2955,7 +2955,7 @@ function createOnFirstShowAdapter(_0) {
2955
2955
  });
2956
2956
  }
2957
2957
 
2958
- var __async$o = (__this, __arguments, generator) => {
2958
+ var __async$p = (__this, __arguments, generator) => {
2959
2959
  return new Promise((resolve, reject) => {
2960
2960
  var fulfilled = (value) => {
2961
2961
  try {
@@ -2976,7 +2976,7 @@ var __async$o = (__this, __arguments, generator) => {
2976
2976
  });
2977
2977
  };
2978
2978
  function createOnFirstShowNgwAdapter(_0) {
2979
- return __async$o(this, arguments, function* ({
2979
+ return __async$p(this, arguments, function* ({
2980
2980
  webMap,
2981
2981
  connector,
2982
2982
  item,
@@ -3010,19 +3010,19 @@ function createOnFirstShowNgwAdapter(_0) {
3010
3010
  });
3011
3011
  }
3012
3012
 
3013
- var __defProp$D = Object.defineProperty;
3014
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
3015
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
3016
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
3017
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3018
- var __spreadValues$t = (a, b) => {
3013
+ var __defProp$E = Object.defineProperty;
3014
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
3015
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
3016
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
3017
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3018
+ var __spreadValues$s = (a, b) => {
3019
3019
  for (var prop in b || (b = {}))
3020
- if (__hasOwnProp$u.call(b, prop))
3021
- __defNormalProp$D(a, prop, b[prop]);
3022
- if (__getOwnPropSymbols$u)
3023
- for (var prop of __getOwnPropSymbols$u(b)) {
3024
- if (__propIsEnum$u.call(b, prop))
3025
- __defNormalProp$D(a, prop, b[prop]);
3020
+ if (__hasOwnProp$t.call(b, prop))
3021
+ __defNormalProp$E(a, prop, b[prop]);
3022
+ if (__getOwnPropSymbols$t)
3023
+ for (var prop of __getOwnPropSymbols$t(b)) {
3024
+ if (__propIsEnum$t.call(b, prop))
3025
+ __defNormalProp$E(a, prop, b[prop]);
3026
3026
  }
3027
3027
  return a;
3028
3028
  };
@@ -3069,7 +3069,7 @@ function isPropertyFilter$1(filter) {
3069
3069
  return false;
3070
3070
  }
3071
3071
  function featureFilter(feature, filters) {
3072
- const properties = __spreadValues$t({}, feature.properties);
3072
+ const properties = __spreadValues$s({}, feature.properties);
3073
3073
  if (properties) {
3074
3074
  properties.$id = feature.id;
3075
3075
  return propertiesFilter(properties, filters);
@@ -3104,26 +3104,26 @@ function propertiesFilter(properties, filters) {
3104
3104
  return logic === "any" ? filters_.some(filterFunction) : filters_.every(filterFunction);
3105
3105
  }
3106
3106
 
3107
- var __defProp$C = Object.defineProperty;
3108
- var __defProps$h = Object.defineProperties;
3109
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
3110
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
3111
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
3112
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
3113
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3114
- var __spreadValues$s = (a, b) => {
3107
+ var __defProp$D = Object.defineProperty;
3108
+ var __defProps$i = Object.defineProperties;
3109
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
3110
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
3111
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
3112
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
3113
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3114
+ var __spreadValues$r = (a, b) => {
3115
3115
  for (var prop in b || (b = {}))
3116
- if (__hasOwnProp$t.call(b, prop))
3117
- __defNormalProp$C(a, prop, b[prop]);
3118
- if (__getOwnPropSymbols$t)
3119
- for (var prop of __getOwnPropSymbols$t(b)) {
3120
- if (__propIsEnum$t.call(b, prop))
3121
- __defNormalProp$C(a, prop, b[prop]);
3116
+ if (__hasOwnProp$s.call(b, prop))
3117
+ __defNormalProp$D(a, prop, b[prop]);
3118
+ if (__getOwnPropSymbols$s)
3119
+ for (var prop of __getOwnPropSymbols$s(b)) {
3120
+ if (__propIsEnum$s.call(b, prop))
3121
+ __defNormalProp$D(a, prop, b[prop]);
3122
3122
  }
3123
3123
  return a;
3124
3124
  };
3125
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
3126
- var __async$n = (__this, __arguments, generator) => {
3125
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
3126
+ var __async$o = (__this, __arguments, generator) => {
3127
3127
  return new Promise((resolve, reject) => {
3128
3128
  var fulfilled = (value) => {
3129
3129
  try {
@@ -3190,7 +3190,7 @@ function paramListToQuery(paramList) {
3190
3190
  );
3191
3191
  }
3192
3192
  function createFeatureFieldFilterQueries(opt) {
3193
- return __async$n(this, null, function* () {
3193
+ return __async$o(this, null, function* () {
3194
3194
  const queries = getQueries(opt);
3195
3195
  const itemsParts = yield Promise.all(queries);
3196
3196
  const ids = [];
@@ -3234,12 +3234,12 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
3234
3234
  for (const f of filters_) {
3235
3235
  if (isPropertyFilter$1(f)) {
3236
3236
  _queries.push(
3237
- fetchNgwLayerItemsRequest(__spreadProps$h(__spreadValues$s({}, opt), {
3237
+ fetchNgwLayerItemsRequest(__spreadProps$i(__spreadValues$r({}, opt), {
3238
3238
  paramList: [..._parentAllParams, ...paramList, createParam(f)]
3239
3239
  }))
3240
3240
  );
3241
3241
  } else {
3242
- getQueries(__spreadProps$h(__spreadValues$s({}, opt), { filters: f }), _queries, [..._parentAllParams]);
3242
+ getQueries(__spreadProps$i(__spreadValues$r({}, opt), { filters: f }), _queries, [..._parentAllParams]);
3243
3243
  }
3244
3244
  }
3245
3245
  } else if (logic === "all") {
@@ -3254,14 +3254,14 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
3254
3254
  }
3255
3255
  if (propertiesFilterList.length) {
3256
3256
  for (const x of propertiesFilterList) {
3257
- getQueries(__spreadProps$h(__spreadValues$s({}, opt), { filters: x }), _queries, [
3257
+ getQueries(__spreadProps$i(__spreadValues$r({}, opt), { filters: x }), _queries, [
3258
3258
  ..._parentAllParams,
3259
3259
  ...filters2
3260
3260
  ]);
3261
3261
  }
3262
3262
  } else {
3263
3263
  _queries.push(
3264
- fetchNgwLayerItemsRequest(__spreadProps$h(__spreadValues$s({}, opt), {
3264
+ fetchNgwLayerItemsRequest(__spreadProps$i(__spreadValues$r({}, opt), {
3265
3265
  paramList: [..._parentAllParams, ...paramList, ...filters2]
3266
3266
  }))
3267
3267
  );
@@ -3277,7 +3277,7 @@ function createWktFromCoordArray(coord) {
3277
3277
  return `POLYGON((${polygon.join(", ")}))`;
3278
3278
  }
3279
3279
  function fetchNgwLayerItemsRequest(options) {
3280
- const params = __spreadValues$s({}, FEATURE_REQUEST_PARAMS);
3280
+ const params = __spreadValues$r({}, FEATURE_REQUEST_PARAMS);
3281
3281
  const {
3282
3282
  limit,
3283
3283
  query,
@@ -3313,7 +3313,7 @@ function fetchNgwLayerItemsRequest(options) {
3313
3313
  if (paramList) {
3314
3314
  Object.assign(params, paramListToQuery(paramList));
3315
3315
  }
3316
- return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$s(__spreadValues$s({}, params), query), cache, signal });
3316
+ return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$r(__spreadValues$r({}, params), query), cache, signal });
3317
3317
  }
3318
3318
 
3319
3319
  function prepareNgwFieldsToPropertiesFilter(fields) {
@@ -3342,26 +3342,26 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
3342
3342
  return fields;
3343
3343
  }
3344
3344
 
3345
- var __defProp$B = Object.defineProperty;
3346
- var __defProps$g = Object.defineProperties;
3347
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
3348
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
3349
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
3350
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
3351
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3352
- var __spreadValues$r = (a, b) => {
3345
+ var __defProp$C = Object.defineProperty;
3346
+ var __defProps$h = Object.defineProperties;
3347
+ var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
3348
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
3349
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
3350
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
3351
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3352
+ var __spreadValues$q = (a, b) => {
3353
3353
  for (var prop in b || (b = {}))
3354
- if (__hasOwnProp$s.call(b, prop))
3355
- __defNormalProp$B(a, prop, b[prop]);
3356
- if (__getOwnPropSymbols$s)
3357
- for (var prop of __getOwnPropSymbols$s(b)) {
3358
- if (__propIsEnum$s.call(b, prop))
3359
- __defNormalProp$B(a, prop, b[prop]);
3354
+ if (__hasOwnProp$r.call(b, prop))
3355
+ __defNormalProp$C(a, prop, b[prop]);
3356
+ if (__getOwnPropSymbols$r)
3357
+ for (var prop of __getOwnPropSymbols$r(b)) {
3358
+ if (__propIsEnum$r.call(b, prop))
3359
+ __defNormalProp$C(a, prop, b[prop]);
3360
3360
  }
3361
3361
  return a;
3362
3362
  };
3363
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
3364
- var __async$m = (__this, __arguments, generator) => {
3363
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
3364
+ var __async$n = (__this, __arguments, generator) => {
3365
3365
  return new Promise((resolve, reject) => {
3366
3366
  var fulfilled = (value) => {
3367
3367
  try {
@@ -3382,17 +3382,17 @@ var __async$m = (__this, __arguments, generator) => {
3382
3382
  });
3383
3383
  };
3384
3384
  function fetchNgwLayerItems(options) {
3385
- return __async$m(this, null, function* () {
3385
+ return __async$n(this, null, function* () {
3386
3386
  var _a;
3387
3387
  const filters = options.filters;
3388
3388
  if (filters) {
3389
- let data = yield createFeatureFieldFilterQueries(__spreadProps$g(__spreadValues$r({}, options), {
3389
+ let data = yield createFeatureFieldFilterQueries(__spreadProps$h(__spreadValues$q({}, options), {
3390
3390
  filters
3391
3391
  }));
3392
3392
  const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
3393
3393
  if (clientFilterValidate) {
3394
3394
  data = data.filter((y) => {
3395
- const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$g(__spreadValues$r({}, y.fields), {
3395
+ const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$h(__spreadValues$q({}, y.fields), {
3396
3396
  id: y.id
3397
3397
  }));
3398
3398
  const result = propertiesFilter(fields, filters);
@@ -3510,26 +3510,26 @@ function ngwApiToAdapterOptions({
3510
3510
  }
3511
3511
  }
3512
3512
 
3513
- var __defProp$A = Object.defineProperty;
3514
- var __defProps$f = Object.defineProperties;
3515
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
3516
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
3517
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
3518
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
3519
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3520
- var __spreadValues$q = (a, b) => {
3513
+ var __defProp$B = Object.defineProperty;
3514
+ var __defProps$g = Object.defineProperties;
3515
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
3516
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
3517
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
3518
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
3519
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3520
+ var __spreadValues$p = (a, b) => {
3521
3521
  for (var prop in b || (b = {}))
3522
- if (__hasOwnProp$r.call(b, prop))
3523
- __defNormalProp$A(a, prop, b[prop]);
3524
- if (__getOwnPropSymbols$r)
3525
- for (var prop of __getOwnPropSymbols$r(b)) {
3526
- if (__propIsEnum$r.call(b, prop))
3527
- __defNormalProp$A(a, prop, b[prop]);
3522
+ if (__hasOwnProp$q.call(b, prop))
3523
+ __defNormalProp$B(a, prop, b[prop]);
3524
+ if (__getOwnPropSymbols$q)
3525
+ for (var prop of __getOwnPropSymbols$q(b)) {
3526
+ if (__propIsEnum$q.call(b, prop))
3527
+ __defNormalProp$B(a, prop, b[prop]);
3528
3528
  }
3529
3529
  return a;
3530
3530
  };
3531
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
3532
- var __async$l = (__this, __arguments, generator) => {
3531
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
3532
+ var __async$m = (__this, __arguments, generator) => {
3533
3533
  return new Promise((resolve, reject) => {
3534
3534
  var fulfilled = (value) => {
3535
3535
  try {
@@ -3550,56 +3550,56 @@ var __async$l = (__this, __arguments, generator) => {
3550
3550
  });
3551
3551
  };
3552
3552
  function fetchNgwLayerItem(options) {
3553
- return __async$l(this, null, function* () {
3554
- const params = __spreadValues$q({}, FEATURE_REQUEST_PARAMS);
3553
+ return __async$m(this, null, function* () {
3554
+ const params = __spreadValues$p({}, FEATURE_REQUEST_PARAMS);
3555
3555
  updateItemRequestParam(params, options);
3556
3556
  const resp = yield options.connector.route("feature_layer.feature.item", {
3557
3557
  id: Number(options.resourceId),
3558
3558
  fid: options.featureId
3559
- }).get(__spreadProps$f(__spreadValues$q({}, options), { query: params }));
3560
- const toGeojson = () => __async$l(null, null, function* () {
3559
+ }).get(__spreadProps$g(__spreadValues$p({}, options), { query: params }));
3560
+ const toGeojson = () => __async$m(null, null, function* () {
3561
3561
  if (resp.geom) {
3562
3562
  return createGeoJsonFeature(resp);
3563
3563
  } else {
3564
- const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$f(__spreadValues$q({}, options), {
3564
+ const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$g(__spreadValues$p({}, options), {
3565
3565
  geom: true,
3566
3566
  fields: null,
3567
3567
  extensions: null
3568
3568
  }));
3569
3569
  const geom = onlyGeomItem.geom;
3570
- return createGeoJsonFeature(__spreadProps$f(__spreadValues$q({}, resp), { geom }));
3570
+ return createGeoJsonFeature(__spreadProps$g(__spreadValues$p({}, resp), { geom }));
3571
3571
  }
3572
3572
  });
3573
- return __spreadProps$f(__spreadValues$q({}, resp), {
3573
+ return __spreadProps$g(__spreadValues$p({}, resp), {
3574
3574
  toGeojson
3575
3575
  });
3576
3576
  });
3577
3577
  }
3578
3578
 
3579
- var __defProp$z = Object.defineProperty;
3580
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
3581
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
3582
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
3583
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3584
- var __spreadValues$p = (a, b) => {
3579
+ var __defProp$A = Object.defineProperty;
3580
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
3581
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
3582
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
3583
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3584
+ var __spreadValues$o = (a, b) => {
3585
3585
  for (var prop in b || (b = {}))
3586
- if (__hasOwnProp$q.call(b, prop))
3587
- __defNormalProp$z(a, prop, b[prop]);
3588
- if (__getOwnPropSymbols$q)
3589
- for (var prop of __getOwnPropSymbols$q(b)) {
3590
- if (__propIsEnum$q.call(b, prop))
3591
- __defNormalProp$z(a, prop, b[prop]);
3586
+ if (__hasOwnProp$p.call(b, prop))
3587
+ __defNormalProp$A(a, prop, b[prop]);
3588
+ if (__getOwnPropSymbols$p)
3589
+ for (var prop of __getOwnPropSymbols$p(b)) {
3590
+ if (__propIsEnum$p.call(b, prop))
3591
+ __defNormalProp$A(a, prop, b[prop]);
3592
3592
  }
3593
3593
  return a;
3594
3594
  };
3595
- var __publicField$o = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
3595
+ var __publicField$p = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
3596
3596
  class BookmarkItem {
3597
3597
  constructor(options) {
3598
3598
  this.options = options;
3599
- __publicField$o(this, "name");
3600
- __publicField$o(this, "resourceId");
3601
- __publicField$o(this, "item");
3602
- __publicField$o(this, "_extent");
3599
+ __publicField$p(this, "name");
3600
+ __publicField$p(this, "resourceId");
3601
+ __publicField$p(this, "item");
3602
+ __publicField$p(this, "_extent");
3603
3603
  this.resourceId = options.resourceId;
3604
3604
  const item = options.item;
3605
3605
  this.item = item;
@@ -3629,7 +3629,7 @@ class BookmarkItem {
3629
3629
  if (this.item.geom) {
3630
3630
  return Promise.resolve(createGeoJsonFeature(this.item));
3631
3631
  } else {
3632
- return fetchNgwLayerItem(__spreadValues$p({
3632
+ return fetchNgwLayerItem(__spreadValues$o({
3633
3633
  resourceId: this.resourceId,
3634
3634
  featureId: this.item.id,
3635
3635
  connector: this.options.connector,
@@ -3647,19 +3647,19 @@ class BookmarkItem {
3647
3647
 
3648
3648
  const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
3649
3649
 
3650
- var __defProp$y = Object.defineProperty;
3651
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3652
- var __publicField$n = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
3650
+ var __defProp$z = Object.defineProperty;
3651
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3652
+ var __publicField$o = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
3653
3653
  class BaseProperty {
3654
3654
  constructor(name, item, options) {
3655
- __publicField$n(this, "options");
3656
- __publicField$n(this, "emitter", new EventEmitter());
3657
- __publicField$n(this, "name");
3658
- __publicField$n(this, "item");
3659
- __publicField$n(this, "_blocked", false);
3660
- __publicField$n(this, "_container");
3661
- __publicField$n(this, "__value");
3662
- __publicField$n(this, "_removeEventsListener");
3655
+ __publicField$o(this, "options");
3656
+ __publicField$o(this, "emitter", new EventEmitter());
3657
+ __publicField$o(this, "name");
3658
+ __publicField$o(this, "item");
3659
+ __publicField$o(this, "_blocked", false);
3660
+ __publicField$o(this, "_container");
3661
+ __publicField$o(this, "__value");
3662
+ __publicField$o(this, "_removeEventsListener");
3663
3663
  this.item = item;
3664
3664
  this.options = Object.assign({}, options);
3665
3665
  this.name = name;
@@ -3762,26 +3762,26 @@ class BaseProperty {
3762
3762
  }
3763
3763
  }
3764
3764
 
3765
- var __defProp$x = Object.defineProperty;
3766
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
3767
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
3768
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
3769
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3770
- var __spreadValues$o = (a, b) => {
3765
+ var __defProp$y = Object.defineProperty;
3766
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
3767
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
3768
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
3769
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3770
+ var __spreadValues$n = (a, b) => {
3771
3771
  for (var prop in b || (b = {}))
3772
- if (__hasOwnProp$p.call(b, prop))
3773
- __defNormalProp$x(a, prop, b[prop]);
3774
- if (__getOwnPropSymbols$p)
3775
- for (var prop of __getOwnPropSymbols$p(b)) {
3776
- if (__propIsEnum$p.call(b, prop))
3777
- __defNormalProp$x(a, prop, b[prop]);
3772
+ if (__hasOwnProp$o.call(b, prop))
3773
+ __defNormalProp$y(a, prop, b[prop]);
3774
+ if (__getOwnPropSymbols$o)
3775
+ for (var prop of __getOwnPropSymbols$o(b)) {
3776
+ if (__propIsEnum$o.call(b, prop))
3777
+ __defNormalProp$y(a, prop, b[prop]);
3778
3778
  }
3779
3779
  return a;
3780
3780
  };
3781
- var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, key + "" , value);
3781
+ var __publicField$n = (obj, key, value) => __defNormalProp$y(obj, key + "" , value);
3782
3782
  const _CheckProperty = class _CheckProperty extends BaseProperty {
3783
3783
  constructor(name, item, options) {
3784
- super(name, item, __spreadValues$o(__spreadValues$o({}, _CheckProperty.options), options));
3784
+ super(name, item, __spreadValues$n(__spreadValues$n({}, _CheckProperty.options), options));
3785
3785
  this.set(this.get());
3786
3786
  }
3787
3787
  update(value, options) {
@@ -3862,13 +3862,13 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
3862
3862
  _blockChild(item, options) {
3863
3863
  const prop = item.properties && item.properties.property(this.name);
3864
3864
  if (prop && prop.block) {
3865
- prop.block(__spreadValues$o({ silent: true }, options || {}));
3865
+ prop.block(__spreadValues$n({ silent: true }, options || {}));
3866
3866
  }
3867
3867
  }
3868
3868
  _unBlockChild(item, options) {
3869
3869
  const prop = item.properties && item.properties.property(this.name);
3870
3870
  if (prop && prop.unBlock) {
3871
- prop.unBlock(__spreadValues$o({ silent: true }, options || {}));
3871
+ prop.unBlock(__spreadValues$n({ silent: true }, options || {}));
3872
3872
  }
3873
3873
  }
3874
3874
  _propagation(value, options) {
@@ -3878,7 +3878,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
3878
3878
  const child = children[fry];
3879
3879
  const property = child.properties && child.properties.property(this.name);
3880
3880
  if (property) {
3881
- property.set(value, __spreadValues$o(__spreadValues$o({}, options), {
3881
+ property.set(value, __spreadValues$n(__spreadValues$n({}, options), {
3882
3882
  propagation: true,
3883
3883
  bubble: false
3884
3884
  }));
@@ -3887,7 +3887,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
3887
3887
  }
3888
3888
  }
3889
3889
  };
3890
- __publicField$m(_CheckProperty, "options", {
3890
+ __publicField$n(_CheckProperty, "options", {
3891
3891
  hierarchy: true,
3892
3892
  bubble: false,
3893
3893
  propagation: false,
@@ -3896,31 +3896,31 @@ __publicField$m(_CheckProperty, "options", {
3896
3896
  });
3897
3897
  let CheckProperty = _CheckProperty;
3898
3898
 
3899
- var __defProp$w = Object.defineProperty;
3900
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
3901
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
3902
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
3903
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3904
- var __spreadValues$n = (a, b) => {
3899
+ var __defProp$x = Object.defineProperty;
3900
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
3901
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
3902
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
3903
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3904
+ var __spreadValues$m = (a, b) => {
3905
3905
  for (var prop in b || (b = {}))
3906
- if (__hasOwnProp$o.call(b, prop))
3907
- __defNormalProp$w(a, prop, b[prop]);
3908
- if (__getOwnPropSymbols$o)
3909
- for (var prop of __getOwnPropSymbols$o(b)) {
3910
- if (__propIsEnum$o.call(b, prop))
3911
- __defNormalProp$w(a, prop, b[prop]);
3906
+ if (__hasOwnProp$n.call(b, prop))
3907
+ __defNormalProp$x(a, prop, b[prop]);
3908
+ if (__getOwnPropSymbols$n)
3909
+ for (var prop of __getOwnPropSymbols$n(b)) {
3910
+ if (__propIsEnum$n.call(b, prop))
3911
+ __defNormalProp$x(a, prop, b[prop]);
3912
3912
  }
3913
3913
  return a;
3914
3914
  };
3915
- var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
3915
+ var __publicField$m = (obj, key, value) => __defNormalProp$x(obj, typeof key !== "symbol" ? key + "" : key, value);
3916
3916
  const BOOLEAN_TYPE = "boolean";
3917
3917
  const STRING_TYPE = "string";
3918
3918
  const _ItemProperties = class _ItemProperties {
3919
3919
  constructor(item, propertiesList) {
3920
3920
  this.item = item;
3921
- __publicField$l(this, "options", {});
3922
- __publicField$l(this, "_properties", {});
3923
- __publicField$l(this, "_propertiesList", []);
3921
+ __publicField$m(this, "options", {});
3922
+ __publicField$m(this, "_properties", {});
3923
+ __publicField$m(this, "_propertiesList", []);
3924
3924
  if (propertiesList) {
3925
3925
  propertiesList.forEach(this._setPropertyHandler.bind(this));
3926
3926
  }
@@ -3960,7 +3960,7 @@ const _ItemProperties = class _ItemProperties {
3960
3960
  _setPropertyHandler(propOpt) {
3961
3961
  const Handler = this._getHandler(propOpt);
3962
3962
  if (Handler && propOpt.name) {
3963
- const options = __spreadValues$n({}, propOpt);
3963
+ const options = __spreadValues$m({}, propOpt);
3964
3964
  this._properties[propOpt.name] = new Handler(
3965
3965
  propOpt.name,
3966
3966
  this.item,
@@ -3983,7 +3983,7 @@ const _ItemProperties = class _ItemProperties {
3983
3983
  return Handler;
3984
3984
  }
3985
3985
  };
3986
- __publicField$l(_ItemProperties, "handlers", {
3986
+ __publicField$m(_ItemProperties, "handlers", {
3987
3987
  CheckProperty
3988
3988
  });
3989
3989
  let ItemProperties = _ItemProperties;
@@ -4090,14 +4090,14 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
4090
4090
  return true;
4091
4091
  }
4092
4092
 
4093
- var __defProp$v = Object.defineProperty;
4094
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4095
- var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
4093
+ var __defProp$w = Object.defineProperty;
4094
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4095
+ var __publicField$l = (obj, key, value) => __defNormalProp$w(obj, typeof key !== "symbol" ? key + "" : key, value);
4096
4096
  class TreeHelper {
4097
4097
  constructor(item) {
4098
- __publicField$k(this, "item");
4099
- __publicField$k(this, "_children", []);
4100
- __publicField$k(this, "_parent");
4098
+ __publicField$l(this, "item");
4099
+ __publicField$l(this, "_children", []);
4100
+ __publicField$l(this, "_parent");
4101
4101
  this.item = item;
4102
4102
  }
4103
4103
  setParent(parent) {
@@ -4160,32 +4160,32 @@ class TreeHelper {
4160
4160
  }
4161
4161
  }
4162
4162
 
4163
- var __defProp$u = Object.defineProperty;
4164
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
4165
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
4166
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
4167
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4168
- var __spreadValues$m = (a, b) => {
4163
+ var __defProp$v = Object.defineProperty;
4164
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
4165
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
4166
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
4167
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4168
+ var __spreadValues$l = (a, b) => {
4169
4169
  for (var prop in b || (b = {}))
4170
- if (__hasOwnProp$n.call(b, prop))
4171
- __defNormalProp$u(a, prop, b[prop]);
4172
- if (__getOwnPropSymbols$n)
4173
- for (var prop of __getOwnPropSymbols$n(b)) {
4174
- if (__propIsEnum$n.call(b, prop))
4175
- __defNormalProp$u(a, prop, b[prop]);
4170
+ if (__hasOwnProp$m.call(b, prop))
4171
+ __defNormalProp$v(a, prop, b[prop]);
4172
+ if (__getOwnPropSymbols$m)
4173
+ for (var prop of __getOwnPropSymbols$m(b)) {
4174
+ if (__propIsEnum$m.call(b, prop))
4175
+ __defNormalProp$v(a, prop, b[prop]);
4176
4176
  }
4177
4177
  return a;
4178
4178
  };
4179
- var __publicField$j = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
4179
+ var __publicField$k = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
4180
4180
  let ID$1 = 0;
4181
4181
  class Item {
4182
4182
  constructor(options) {
4183
- __publicField$j(this, "options", {});
4184
- __publicField$j(this, "properties");
4185
- __publicField$j(this, "tree");
4186
- __publicField$j(this, "id", ID$1);
4183
+ __publicField$k(this, "options", {});
4184
+ __publicField$k(this, "properties");
4185
+ __publicField$k(this, "tree");
4186
+ __publicField$k(this, "id", ID$1);
4187
4187
  ID$1 += 1;
4188
- this.options = __spreadValues$m({}, options);
4188
+ this.options = __spreadValues$l({}, options);
4189
4189
  this.tree = new TreeHelper(this);
4190
4190
  }
4191
4191
  initProperties() {
@@ -4241,27 +4241,27 @@ function createLayerSymbolParam(resourceId, intervals) {
4241
4241
  return { [`symbols[${resourceId}]`]: intervals.join(",") || void 0 };
4242
4242
  }
4243
4243
 
4244
- var __defProp$t = Object.defineProperty;
4245
- var __defProps$e = Object.defineProperties;
4246
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
4247
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
4248
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
4249
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
4250
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4251
- var __spreadValues$l = (a, b) => {
4244
+ var __defProp$u = Object.defineProperty;
4245
+ var __defProps$f = Object.defineProperties;
4246
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
4247
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
4248
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
4249
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
4250
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4251
+ var __spreadValues$k = (a, b) => {
4252
4252
  for (var prop in b || (b = {}))
4253
- if (__hasOwnProp$m.call(b, prop))
4254
- __defNormalProp$t(a, prop, b[prop]);
4255
- if (__getOwnPropSymbols$m)
4256
- for (var prop of __getOwnPropSymbols$m(b)) {
4257
- if (__propIsEnum$m.call(b, prop))
4258
- __defNormalProp$t(a, prop, b[prop]);
4253
+ if (__hasOwnProp$l.call(b, prop))
4254
+ __defNormalProp$u(a, prop, b[prop]);
4255
+ if (__getOwnPropSymbols$l)
4256
+ for (var prop of __getOwnPropSymbols$l(b)) {
4257
+ if (__propIsEnum$l.call(b, prop))
4258
+ __defNormalProp$u(a, prop, b[prop]);
4259
4259
  }
4260
4260
  return a;
4261
4261
  };
4262
- var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
4263
- var __publicField$i = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
4264
- var __async$k = (__this, __arguments, generator) => {
4262
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
4263
+ var __publicField$j = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
4264
+ var __async$l = (__this, __arguments, generator) => {
4265
4265
  return new Promise((resolve, reject) => {
4266
4266
  var fulfilled = (value) => {
4267
4267
  try {
@@ -4292,17 +4292,17 @@ class Legend {
4292
4292
  layer,
4293
4293
  onSymbolRenderChange
4294
4294
  }) {
4295
- __publicField$i(this, "layerId");
4296
- __publicField$i(this, "layer");
4297
- __publicField$i(this, "resourceId");
4298
- __publicField$i(this, "legendSymbols", "expand");
4299
- __publicField$i(this, "legend");
4295
+ __publicField$j(this, "layerId");
4296
+ __publicField$j(this, "layer");
4297
+ __publicField$j(this, "resourceId");
4298
+ __publicField$j(this, "legendSymbols", "expand");
4299
+ __publicField$j(this, "legend");
4300
4300
  // private blocked: boolean = false;
4301
- __publicField$i(this, "layerVisibility", true);
4301
+ __publicField$j(this, "layerVisibility", true);
4302
4302
  // private symbolRenderIndexes?: number[];
4303
- __publicField$i(this, "onSymbolRenderChange");
4304
- __publicField$i(this, "webMap");
4305
- __publicField$i(this, "connector");
4303
+ __publicField$j(this, "onSymbolRenderChange");
4304
+ __publicField$j(this, "webMap");
4305
+ __publicField$j(this, "connector");
4306
4306
  if (legendSymbols) {
4307
4307
  this.legendSymbols = legendSymbols;
4308
4308
  }
@@ -4321,18 +4321,18 @@ class Legend {
4321
4321
  this.layer = layer;
4322
4322
  }
4323
4323
  create() {
4324
- return __async$k(this, arguments, function* (options = {}) {
4324
+ return __async$l(this, arguments, function* (options = {}) {
4325
4325
  if (this.connector) {
4326
4326
  const ngwLegend = yield this.connector.route("render.legend_symbols", {
4327
4327
  id: this.resourceId
4328
- }).get(__spreadValues$l({}, options));
4328
+ }).get(__spreadValues$k({}, options));
4329
4329
  this.legend = ngwLegend;
4330
4330
  return this.createLegend(ngwLegend);
4331
4331
  }
4332
4332
  });
4333
4333
  }
4334
4334
  createLegend(items) {
4335
- return items.map((params) => __spreadProps$e(__spreadValues$l({}, params), {
4335
+ return items.map((params) => __spreadProps$f(__spreadValues$k({}, params), {
4336
4336
  /** @deprecated use display_name instead */
4337
4337
  name: params.display_name,
4338
4338
  /** @deprecated use icon instead */
@@ -4362,7 +4362,7 @@ class Legend {
4362
4362
  }
4363
4363
  if (this.layer.updateLayer) {
4364
4364
  this.layer.updateLayer({
4365
- params: __spreadValues$l({}, createLayerSymbolParam(this.resourceId, intervals))
4365
+ params: __spreadValues$k({}, createLayerSymbolParam(this.resourceId, intervals))
4366
4366
  });
4367
4367
  }
4368
4368
  if (intervals.length) {
@@ -4399,27 +4399,27 @@ class Legend {
4399
4399
  }
4400
4400
  }
4401
4401
 
4402
- var __defProp$s = Object.defineProperty;
4403
- var __defProps$d = Object.defineProperties;
4404
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
4405
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
4406
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
4407
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
4408
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4409
- var __spreadValues$k = (a, b) => {
4402
+ var __defProp$t = Object.defineProperty;
4403
+ var __defProps$e = Object.defineProperties;
4404
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
4405
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
4406
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
4407
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
4408
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4409
+ var __spreadValues$j = (a, b) => {
4410
4410
  for (var prop in b || (b = {}))
4411
- if (__hasOwnProp$l.call(b, prop))
4412
- __defNormalProp$s(a, prop, b[prop]);
4413
- if (__getOwnPropSymbols$l)
4414
- for (var prop of __getOwnPropSymbols$l(b)) {
4415
- if (__propIsEnum$l.call(b, prop))
4416
- __defNormalProp$s(a, prop, b[prop]);
4411
+ if (__hasOwnProp$k.call(b, prop))
4412
+ __defNormalProp$t(a, prop, b[prop]);
4413
+ if (__getOwnPropSymbols$k)
4414
+ for (var prop of __getOwnPropSymbols$k(b)) {
4415
+ if (__propIsEnum$k.call(b, prop))
4416
+ __defNormalProp$t(a, prop, b[prop]);
4417
4417
  }
4418
4418
  return a;
4419
4419
  };
4420
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
4421
- var __publicField$h = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
4422
- var __async$j = (__this, __arguments, generator) => {
4420
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
4421
+ var __publicField$i = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
4422
+ var __async$k = (__this, __arguments, generator) => {
4423
4423
  return new Promise((resolve, reject) => {
4424
4424
  var fulfilled = (value) => {
4425
4425
  try {
@@ -4448,14 +4448,14 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
4448
4448
  parent,
4449
4449
  noInit
4450
4450
  }) {
4451
- super(__spreadValues$k(__spreadValues$k({}, _NgwWebmapItem.options), options));
4452
- __publicField$h(this, "item");
4453
- __publicField$h(this, "webMap");
4454
- __publicField$h(this, "connector");
4455
- __publicField$h(this, "layer");
4456
- __publicField$h(this, "legend");
4457
- __publicField$h(this, "emitter", new EventEmitter());
4458
- __publicField$h(this, "_rootDescendantsCount", 0);
4451
+ super(__spreadValues$j(__spreadValues$j({}, _NgwWebmapItem.options), options));
4452
+ __publicField$i(this, "item");
4453
+ __publicField$i(this, "webMap");
4454
+ __publicField$i(this, "connector");
4455
+ __publicField$i(this, "layer");
4456
+ __publicField$i(this, "legend");
4457
+ __publicField$i(this, "emitter", new EventEmitter());
4458
+ __publicField$i(this, "_rootDescendantsCount", 0);
4459
4459
  this.webMap = webMap;
4460
4460
  if (connector) {
4461
4461
  this.connector = connector;
@@ -4478,7 +4478,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
4478
4478
  }
4479
4479
  }
4480
4480
  static create(webMap, item, options, connector, parent) {
4481
- return __async$j(this, null, function* () {
4481
+ return __async$k(this, null, function* () {
4482
4482
  const ngwWebmapItem = new _NgwWebmapItem({
4483
4483
  webMap,
4484
4484
  item,
@@ -4507,7 +4507,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
4507
4507
  return this.layer;
4508
4508
  }
4509
4509
  getLegend(options) {
4510
- return __async$j(this, null, function* () {
4510
+ return __async$k(this, null, function* () {
4511
4511
  var _a, _b;
4512
4512
  const id = (_a = this.layer) == null ? void 0 : _a.id;
4513
4513
  if (id !== void 0) {
@@ -4544,7 +4544,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
4544
4544
  getItemOptions(item) {
4545
4545
  const transparency = item.item_type === "layer" && item.layer_transparency;
4546
4546
  const opacity = typeof transparency === "number" ? (100 - transparency) / 100 : void 0;
4547
- const options = __spreadProps$d(__spreadValues$k({
4547
+ const options = __spreadProps$e(__spreadValues$j({
4548
4548
  visibility: false,
4549
4549
  name: item.display_name
4550
4550
  }, this.options), {
@@ -4564,7 +4564,7 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
4564
4564
  }
4565
4565
  if (item.item_type === "layer") {
4566
4566
  const { maxZoom, minZoom } = this._getZoomRange(item);
4567
- Object.assign(options, __spreadProps$d(__spreadValues$k({
4567
+ Object.assign(options, __spreadProps$e(__spreadValues$j({
4568
4568
  updateWmsParams: item.updateWmsParams
4569
4569
  }, options), {
4570
4570
  url: item.url,
@@ -4667,8 +4667,8 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
4667
4667
  return totalValue;
4668
4668
  }
4669
4669
  };
4670
- __publicField$h(_NgwWebmapItem, "GetAdapterFromLayerType", {});
4671
- __publicField$h(_NgwWebmapItem, "options", {
4670
+ __publicField$i(_NgwWebmapItem, "GetAdapterFromLayerType", {});
4671
+ __publicField$i(_NgwWebmapItem, "options", {
4672
4672
  properties: [
4673
4673
  {
4674
4674
  type: "boolean",
@@ -4708,27 +4708,27 @@ __publicField$h(_NgwWebmapItem, "options", {
4708
4708
  });
4709
4709
  let NgwWebmapItem = _NgwWebmapItem;
4710
4710
 
4711
- var __defProp$r = Object.defineProperty;
4712
- var __defProps$c = Object.defineProperties;
4713
- var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
4714
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
4715
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
4716
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
4717
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4718
- var __spreadValues$j = (a, b) => {
4711
+ var __defProp$s = Object.defineProperty;
4712
+ var __defProps$d = Object.defineProperties;
4713
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
4714
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
4715
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
4716
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
4717
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4718
+ var __spreadValues$i = (a, b) => {
4719
4719
  for (var prop in b || (b = {}))
4720
- if (__hasOwnProp$k.call(b, prop))
4721
- __defNormalProp$r(a, prop, b[prop]);
4722
- if (__getOwnPropSymbols$k)
4723
- for (var prop of __getOwnPropSymbols$k(b)) {
4724
- if (__propIsEnum$k.call(b, prop))
4725
- __defNormalProp$r(a, prop, b[prop]);
4720
+ if (__hasOwnProp$j.call(b, prop))
4721
+ __defNormalProp$s(a, prop, b[prop]);
4722
+ if (__getOwnPropSymbols$j)
4723
+ for (var prop of __getOwnPropSymbols$j(b)) {
4724
+ if (__propIsEnum$j.call(b, prop))
4725
+ __defNormalProp$s(a, prop, b[prop]);
4726
4726
  }
4727
4727
  return a;
4728
4728
  };
4729
- var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
4730
- var __publicField$g = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
4731
- var __async$i = (__this, __arguments, generator) => {
4729
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
4730
+ var __publicField$h = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
4731
+ var __async$j = (__this, __arguments, generator) => {
4732
4732
  return new Promise((resolve, reject) => {
4733
4733
  var fulfilled = (value) => {
4734
4734
  try {
@@ -4752,20 +4752,20 @@ class NgwWebmapLayerAdapter {
4752
4752
  constructor(map, options) {
4753
4753
  this.map = map;
4754
4754
  this.options = options;
4755
- __publicField$g(this, "layer");
4756
- __publicField$g(this, "NgwWebmapItem", NgwWebmapItem);
4755
+ __publicField$h(this, "layer");
4756
+ __publicField$h(this, "NgwWebmapItem", NgwWebmapItem);
4757
4757
  /**
4758
4758
  * Radius for searching objects in pixels
4759
4759
  */
4760
- __publicField$g(this, "pixelRadius", 10);
4760
+ __publicField$h(this, "pixelRadius", 10);
4761
4761
  // webmapSettings.identify_radius,
4762
- __publicField$g(this, "resourceId");
4763
- __publicField$g(this, "webmapClassName", "webmap");
4764
- __publicField$g(this, "emitter", new EventEmitter());
4765
- __publicField$g(this, "_extent");
4766
- __publicField$g(this, "webmapResource");
4767
- __publicField$g(this, "_webmapBaselayersIds", []);
4768
- __publicField$g(this, "_lastActiveBaselayer");
4762
+ __publicField$h(this, "resourceId");
4763
+ __publicField$h(this, "webmapClassName", "webmap");
4764
+ __publicField$h(this, "emitter", new EventEmitter());
4765
+ __publicField$h(this, "_extent");
4766
+ __publicField$h(this, "webmapResource");
4767
+ __publicField$h(this, "_webmapBaselayersIds", []);
4768
+ __publicField$h(this, "_lastActiveBaselayer");
4769
4769
  const r = options.resourceId;
4770
4770
  if (Array.isArray(r)) {
4771
4771
  this.resourceId = r[0];
@@ -4778,9 +4778,9 @@ class NgwWebmapLayerAdapter {
4778
4778
  }
4779
4779
  }
4780
4780
  addLayer(options) {
4781
- return __async$i(this, null, function* () {
4781
+ return __async$j(this, null, function* () {
4782
4782
  var _a;
4783
- this.options = __spreadValues$j(__spreadValues$j({}, this.options), options);
4783
+ this.options = __spreadValues$i(__spreadValues$i({}, this.options), options);
4784
4784
  this.layer = yield this._getWebMapLayerItem();
4785
4785
  const extentConstrained = (_a = this.webmapResource) == null ? void 0 : _a.constraining_extent;
4786
4786
  if (this.options.useExtentConstrained && this._extent && extentConstrained) {
@@ -4810,21 +4810,21 @@ class NgwWebmapLayerAdapter {
4810
4810
  delete this.webmapResource;
4811
4811
  }
4812
4812
  showLayer() {
4813
- return __async$i(this, null, function* () {
4813
+ return __async$j(this, null, function* () {
4814
4814
  if (this.layer && this.layer.properties) {
4815
4815
  return this.layer.properties.property("visibility").set(true);
4816
4816
  }
4817
4817
  });
4818
4818
  }
4819
4819
  hideLayer() {
4820
- return __async$i(this, null, function* () {
4820
+ return __async$j(this, null, function* () {
4821
4821
  if (this.layer && this.layer.properties) {
4822
4822
  return this.layer.properties.property("visibility").set(false);
4823
4823
  }
4824
4824
  });
4825
4825
  }
4826
4826
  setOpacity(val) {
4827
- return __async$i(this, null, function* () {
4827
+ return __async$j(this, null, function* () {
4828
4828
  if (this.layer && this.layer.properties) {
4829
4829
  return this.layer.properties.property("opacity").set(val);
4830
4830
  }
@@ -4859,7 +4859,7 @@ class NgwWebmapLayerAdapter {
4859
4859
  (x) => x.label_field
4860
4860
  );
4861
4861
  const keyname = labelField && labelField.keyname;
4862
- return fetchNgwLayerItems(__spreadValues$j({
4862
+ return fetchNgwLayerItems(__spreadValues$i({
4863
4863
  connector,
4864
4864
  resourceId: bookmarkResId,
4865
4865
  geom: false,
@@ -4884,7 +4884,7 @@ class NgwWebmapLayerAdapter {
4884
4884
  );
4885
4885
  }
4886
4886
  getLegend(options) {
4887
- return __async$i(this, null, function* () {
4887
+ return __async$j(this, null, function* () {
4888
4888
  const legends = [];
4889
4889
  let deps = this.getDependLayers();
4890
4890
  deps = deps.sort((a, b) => b.id - a.id);
@@ -4896,7 +4896,7 @@ class NgwWebmapLayerAdapter {
4896
4896
  });
4897
4897
  }
4898
4898
  getIdentificationIds(options) {
4899
- return __async$i(this, null, function* () {
4899
+ return __async$j(this, null, function* () {
4900
4900
  const visibleLayers = [];
4901
4901
  let deps = this.getDependLayers();
4902
4902
  deps = deps.sort((a, b) => b.id - a.id);
@@ -4915,7 +4915,7 @@ class NgwWebmapLayerAdapter {
4915
4915
  });
4916
4916
  }
4917
4917
  _getWebMapLayerItem() {
4918
- return __async$i(this, null, function* () {
4918
+ return __async$j(this, null, function* () {
4919
4919
  if (!this.resourceId) {
4920
4920
  return void 0;
4921
4921
  }
@@ -4928,7 +4928,7 @@ class NgwWebmapLayerAdapter {
4928
4928
  const connector = this.options.connector;
4929
4929
  const headers = (connector == null ? void 0 : connector.options.auth) ? connector.getAuthorizationHeaders() : void 0;
4930
4930
  const withCredentials = connector.withCredentials;
4931
- const options = __spreadProps$c(__spreadValues$j({}, this.options), {
4931
+ const options = __spreadProps$d(__spreadValues$i({}, this.options), {
4932
4932
  withCredentials,
4933
4933
  headers,
4934
4934
  drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
@@ -4946,7 +4946,7 @@ class NgwWebmapLayerAdapter {
4946
4946
  });
4947
4947
  }
4948
4948
  getWebMapConfig(id) {
4949
- return __async$i(this, null, function* () {
4949
+ return __async$j(this, null, function* () {
4950
4950
  var _a;
4951
4951
  const data = yield this.options.connector.getResource(id);
4952
4952
  if (data) {
@@ -5034,7 +5034,7 @@ class NgwWebmapLayerAdapter {
5034
5034
  webMap,
5035
5035
  baseUrl: this.options.connector.options.baseUrl || ""
5036
5036
  });
5037
- item = __spreadValues$j(__spreadValues$j({}, layerItem), layerAdapterOptions);
5037
+ item = __spreadValues$i(__spreadValues$i({}, layerItem), layerAdapterOptions);
5038
5038
  }
5039
5039
  }
5040
5040
  if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
@@ -5044,40 +5044,40 @@ class NgwWebmapLayerAdapter {
5044
5044
  }
5045
5045
  }
5046
5046
 
5047
- var __defProp$q = Object.defineProperty;
5048
- var __defProps$b = Object.defineProperties;
5049
- var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
5050
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
5051
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
5052
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
5053
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5054
- var __spreadValues$i = (a, b) => {
5047
+ var __defProp$r = Object.defineProperty;
5048
+ var __defProps$c = Object.defineProperties;
5049
+ var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
5050
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
5051
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
5052
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
5053
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5054
+ var __spreadValues$h = (a, b) => {
5055
5055
  for (var prop in b || (b = {}))
5056
- if (__hasOwnProp$j.call(b, prop))
5057
- __defNormalProp$q(a, prop, b[prop]);
5058
- if (__getOwnPropSymbols$j)
5059
- for (var prop of __getOwnPropSymbols$j(b)) {
5060
- if (__propIsEnum$j.call(b, prop))
5061
- __defNormalProp$q(a, prop, b[prop]);
5056
+ if (__hasOwnProp$i.call(b, prop))
5057
+ __defNormalProp$r(a, prop, b[prop]);
5058
+ if (__getOwnPropSymbols$i)
5059
+ for (var prop of __getOwnPropSymbols$i(b)) {
5060
+ if (__propIsEnum$i.call(b, prop))
5061
+ __defNormalProp$r(a, prop, b[prop]);
5062
5062
  }
5063
5063
  return a;
5064
5064
  };
5065
- var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
5065
+ var __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
5066
5066
  var __objRest$4 = (source, exclude) => {
5067
5067
  var target = {};
5068
5068
  for (var prop in source)
5069
- if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
5069
+ if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
5070
5070
  target[prop] = source[prop];
5071
- if (source != null && __getOwnPropSymbols$j)
5072
- for (var prop of __getOwnPropSymbols$j(source)) {
5073
- if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
5071
+ if (source != null && __getOwnPropSymbols$i)
5072
+ for (var prop of __getOwnPropSymbols$i(source)) {
5073
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
5074
5074
  target[prop] = source[prop];
5075
5075
  }
5076
5076
  return target;
5077
5077
  };
5078
5078
  function updateImageParams(params, resourceId) {
5079
5079
  const _a = params, { bbox, width, height, nd } = _a, rest = __objRest$4(_a, ["bbox", "width", "height", "nd"]);
5080
- return __spreadProps$b(__spreadValues$i({}, rest), {
5080
+ return __spreadProps$c(__spreadValues$h({}, rest), {
5081
5081
  resource: Array.isArray(resourceId) ? resourceId.join(",") : resourceId,
5082
5082
  extent: bbox,
5083
5083
  size: width + "," + height,
@@ -5112,7 +5112,7 @@ function createNgwLayerAdapter(options, webMap, connector) {
5112
5112
  function extendNgwWebmapLayerAdapter(opt) {
5113
5113
  class A extends NgwWebmapLayerAdapter {
5114
5114
  constructor(map, options) {
5115
- options = __spreadValues$i(__spreadValues$i({}, opt), options);
5115
+ options = __spreadValues$h(__spreadValues$h({}, opt), options);
5116
5116
  super(map, options);
5117
5117
  }
5118
5118
  }
@@ -5143,78 +5143,174 @@ function setScaleRatio(scale, lat = 0) {
5143
5143
  return zoom;
5144
5144
  }
5145
5145
 
5146
+ function parseQmsExtent(value) {
5147
+ if (!value) {
5148
+ return void 0;
5149
+ }
5150
+ const match = value.match(/^(?:SRID=(\d+);)?POLYGON\s*\(\((.+)\)\)\s*$/i);
5151
+ if (!match || match[1] && match[1] !== "4326") {
5152
+ return void 0;
5153
+ }
5154
+ const coordinates = match[2].split(",").map((coordinate) => coordinate.trim().split(/\s+/).map(Number)).filter(
5155
+ (coordinate) => coordinate.length >= 2 && Number.isFinite(coordinate[0]) && Number.isFinite(coordinate[1])
5156
+ );
5157
+ if (!coordinates.length) {
5158
+ return void 0;
5159
+ }
5160
+ const xs = coordinates.map((coordinate) => coordinate[0]);
5161
+ const ys = coordinates.map((coordinate) => coordinate[1]);
5162
+ return [Math.min(...xs), Math.min(...ys), Math.max(...xs), Math.max(...ys)];
5163
+ }
5164
+ function normalizeQmsUrl(url) {
5165
+ return url.replace(/^(http|ftp):\/\//, "https://");
5166
+ }
5146
5167
  function getSubdomainsOriginUrl(originUrl) {
5147
- const submodules = [];
5148
- originUrl = originUrl.replace(/{switch:(.*?)}/, (m, group) => {
5168
+ const subdomains = [];
5169
+ originUrl = originUrl.replace(/{switch:(.*?)}/, (match, group) => {
5149
5170
  if (typeof group === "string") {
5150
- group.split(",").forEach((s) => submodules.push(s));
5171
+ group.split(",").forEach((subdomain) => subdomains.push(subdomain));
5151
5172
  }
5152
5173
  return "{s}";
5153
5174
  });
5154
- return [originUrl, submodules];
5175
+ return [originUrl, subdomains];
5176
+ }
5177
+ function parseQmsWmsParams(params) {
5178
+ if (!params) {
5179
+ return {};
5180
+ }
5181
+ return Object.fromEntries(new URLSearchParams(params).entries());
5182
+ }
5183
+ function prepareQmsTmsLayer(service) {
5184
+ var _a, _b;
5185
+ const [url, subdomains] = getSubdomainsOriginUrl(
5186
+ normalizeQmsUrl(service.origin_url || service.url)
5187
+ );
5188
+ return {
5189
+ type: "tms",
5190
+ service,
5191
+ url,
5192
+ subdomains,
5193
+ scheme: service.y_origin_top ? "xyz" : "tms",
5194
+ name: service.name,
5195
+ attribution: service.copyright_text || void 0,
5196
+ extent: parseQmsExtent(service.extent),
5197
+ minZoom: (_a = service.z_min) != null ? _a : void 0,
5198
+ maxZoom: (_b = service.z_max) != null ? _b : void 0
5199
+ };
5200
+ }
5201
+ function prepareQmsWmsLayer(service) {
5202
+ const params = parseQmsWmsParams(service.params);
5203
+ const versionEntry = Object.entries(params).find(
5204
+ ([key]) => key.toLowerCase() === "version"
5205
+ );
5206
+ return {
5207
+ type: "wms",
5208
+ service,
5209
+ url: normalizeQmsUrl(service.url),
5210
+ layers: service.layers,
5211
+ format: service.format || "image/png",
5212
+ version: (versionEntry == null ? void 0 : versionEntry[1]) || "1.3.0",
5213
+ params,
5214
+ name: service.name,
5215
+ attribution: service.copyright_text || void 0,
5216
+ extent: parseQmsExtent(service.extent)
5217
+ };
5155
5218
  }
5156
5219
 
5157
- function loadJson(url) {
5220
+ var __defProp$q = Object.defineProperty;
5221
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5222
+ var __publicField$g = (obj, key, value) => __defNormalProp$q(obj, key + "" , value);
5223
+ var __async$i = (__this, __arguments, generator) => {
5158
5224
  return new Promise((resolve, reject) => {
5159
- const xmlHttp = new XMLHttpRequest();
5160
- xmlHttp.onreadystatechange = () => {
5161
- if (xmlHttp.readyState === 4 && xmlHttp.status === 200) {
5162
- if (xmlHttp.responseText) {
5163
- try {
5164
- resolve(JSON.parse(xmlHttp.responseText));
5165
- } catch (er) {
5166
- reject(er);
5167
- }
5168
- }
5225
+ var fulfilled = (value) => {
5226
+ try {
5227
+ step(generator.next(value));
5228
+ } catch (e) {
5229
+ reject(e);
5169
5230
  }
5170
5231
  };
5171
- xmlHttp.open("GET", fixUrlStr(url), true);
5172
- xmlHttp.send();
5232
+ var rejected = (value) => {
5233
+ try {
5234
+ step(generator.throw(value));
5235
+ } catch (e) {
5236
+ reject(e);
5237
+ }
5238
+ };
5239
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
5240
+ step((generator = generator.apply(__this, __arguments)).next());
5173
5241
  });
5174
- }
5175
-
5176
- const alias = {
5177
- tms: "TILE"
5178
5242
  };
5179
- function updateQmsOptions(qms) {
5180
- const protocol = (location.protocol === "https:" ? "https" : "http") + "://";
5181
- let serviceUrl = qms.url.replace(/^(https?|ftp):\/\//, protocol);
5182
- if (!qms.y_origin_top) {
5183
- serviceUrl = serviceUrl.replace("{y}", "{-y}");
5243
+ const QMS_URL = "https://qms.nextgis.com";
5244
+ const _QmsClient = class _QmsClient {
5245
+ constructor() {
5246
+ __publicField$g(this, "url");
5247
+ this.url = _QmsClient.url.replace(/\/$/, "").trim();
5184
5248
  }
5185
- return {
5186
- url: serviceUrl,
5187
- name: qms.name,
5188
- attribution: qms.copyright_text,
5189
- maxZoom: qms.z_max,
5190
- minZoom: qms.z_min
5191
- };
5192
- }
5249
+ getService(_0) {
5250
+ return __async$i(this, arguments, function* (id, options = {}) {
5251
+ const service = yield this._getJson(
5252
+ `${this.url}/api/v1/geoservices/${id}`,
5253
+ options
5254
+ );
5255
+ if (service.type !== "tms" && service.type !== "wms") {
5256
+ throw new Error("Unsupported QMS service type.");
5257
+ }
5258
+ return service;
5259
+ });
5260
+ }
5261
+ getLayer(_0) {
5262
+ return __async$i(this, arguments, function* (id, options = {}) {
5263
+ const service = yield this.getService(id, options);
5264
+ if (service.type === "tms") {
5265
+ return prepareQmsTmsLayer(service);
5266
+ }
5267
+ return prepareQmsWmsLayer(service);
5268
+ });
5269
+ }
5270
+ _getJson(_0, _1) {
5271
+ return __async$i(this, arguments, function* (url, { signal }) {
5272
+ const response = yield fetch(url, {
5273
+ signal
5274
+ });
5275
+ if (!response.ok) {
5276
+ throw new Error(
5277
+ `QMS request failed with status ${response.status}: ${url}`
5278
+ );
5279
+ }
5280
+ return response.json();
5281
+ });
5282
+ }
5283
+ };
5284
+ __publicField$g(_QmsClient, "url", QMS_URL);
5285
+ let QmsClient = _QmsClient;
5193
5286
 
5194
5287
  var __defProp$p = Object.defineProperty;
5195
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
5196
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
5197
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
5288
+ var __defProps$b = Object.defineProperties;
5289
+ var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
5290
+ var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
5291
+ var __hasOwnProp$h = Object.prototype.hasOwnProperty;
5292
+ var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
5198
5293
  var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5199
- var __spreadValues$h = (a, b) => {
5294
+ var __spreadValues$g = (a, b) => {
5200
5295
  for (var prop in b || (b = {}))
5201
- if (__hasOwnProp$i.call(b, prop))
5296
+ if (__hasOwnProp$h.call(b, prop))
5202
5297
  __defNormalProp$p(a, prop, b[prop]);
5203
- if (__getOwnPropSymbols$i)
5204
- for (var prop of __getOwnPropSymbols$i(b)) {
5205
- if (__propIsEnum$i.call(b, prop))
5298
+ if (__getOwnPropSymbols$h)
5299
+ for (var prop of __getOwnPropSymbols$h(b)) {
5300
+ if (__propIsEnum$h.call(b, prop))
5206
5301
  __defNormalProp$p(a, prop, b[prop]);
5207
5302
  }
5208
5303
  return a;
5209
5304
  };
5305
+ var __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));
5210
5306
  var __objRest$3 = (source, exclude) => {
5211
5307
  var target = {};
5212
5308
  for (var prop in source)
5213
- if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
5309
+ if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)
5214
5310
  target[prop] = source[prop];
5215
- if (source != null && __getOwnPropSymbols$i)
5216
- for (var prop of __getOwnPropSymbols$i(source)) {
5217
- if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
5311
+ if (source != null && __getOwnPropSymbols$h)
5312
+ for (var prop of __getOwnPropSymbols$h(source)) {
5313
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))
5218
5314
  target[prop] = source[prop];
5219
5315
  }
5220
5316
  return target;
@@ -5240,31 +5336,48 @@ var __async$h = (__this, __arguments, generator) => {
5240
5336
  step((generator = generator.apply(__this, __arguments)).next());
5241
5337
  });
5242
5338
  };
5243
- const URL$1 = "https://qms.nextgis.com";
5244
- function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
5339
+ const alias = {
5340
+ tms: "TILE",
5341
+ wms: "WMS"
5342
+ };
5343
+ function qmsLayerToOptions(layer) {
5344
+ if (layer.type === "tms") {
5345
+ return {
5346
+ url: layer.scheme === "tms" ? layer.url.replace("{y}", "{-y}") : layer.url,
5347
+ subdomains: layer.subdomains,
5348
+ maxZoom: layer.maxZoom,
5349
+ minZoom: layer.minZoom,
5350
+ name: layer.name,
5351
+ attribution: layer.attribution
5352
+ };
5353
+ }
5354
+ return {
5355
+ url: layer.url,
5356
+ layers: layer.layers,
5357
+ format: layer.format,
5358
+ version: layer.version,
5359
+ params: layer.params,
5360
+ name: layer.name,
5361
+ attribution: layer.attribution
5362
+ };
5363
+ }
5364
+ function createQmsAdapter(webMapOrOptions, createOpt = {}) {
5245
5365
  let webMap;
5246
5366
  if ("webMap" in webMapOrOptions) {
5247
- const _a = webMapOrOptions, { webMap: webMap_, url: url_ } = _a, adapterOptions = __objRest$3(_a, ["webMap", "url"]);
5367
+ const _a = webMapOrOptions, { webMap: webMap_ } = _a, adapterOptions = __objRest$3(_a, ["webMap"]);
5248
5368
  webMap = webMap_;
5249
- if (url_) {
5250
- url = url_;
5251
- }
5252
- if (adapterOptions) {
5253
- createOpt = adapterOptions;
5254
- }
5369
+ createOpt = adapterOptions;
5255
5370
  } else {
5256
5371
  webMap = webMapOrOptions;
5257
5372
  }
5258
- if (!url) {
5259
- url = URL$1;
5260
- }
5373
+ const client = new QmsClient();
5261
5374
  class QmsAdapter {
5262
5375
  constructor(map, options) {
5263
5376
  __publicField$f(this, "qms");
5264
5377
  __publicField$f(this, "options");
5265
5378
  __publicField$f(this, "map");
5266
5379
  this.map = map;
5267
- const opt = __spreadValues$h(__spreadValues$h({}, createOpt), options);
5380
+ const opt = __spreadValues$g(__spreadValues$g({}, createOpt), options);
5268
5381
  this.options = opt;
5269
5382
  this.options.baselayer = true;
5270
5383
  if (opt.qms) {
@@ -5273,42 +5386,38 @@ function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
5273
5386
  }
5274
5387
  addLayer(options) {
5275
5388
  return __async$h(this, null, function* () {
5276
- if (!this.qms && options.qmsId) {
5277
- try {
5278
- this.qms = yield loadJson(
5279
- url + "/api/v1/geoservices/" + options.qmsId
5280
- );
5281
- } catch (er) {
5282
- console.error(er);
5283
- }
5389
+ var _a2, _b, _c;
5390
+ const signal = (_a2 = options.signal) != null ? _a2 : this.options.signal;
5391
+ const qmsId = (_c = options.qmsId) != null ? _c : (_b = this.qms) == null ? void 0 : _b.id;
5392
+ if (qmsId === void 0) {
5393
+ return;
5284
5394
  }
5285
- const qms = this.qms;
5286
- if (qms) {
5287
- const type = alias[qms.type || "tms"];
5395
+ try {
5396
+ const layer = yield client.getLayer(qmsId, { signal });
5397
+ this.qms = layer.service;
5398
+ const type = alias[layer.type];
5288
5399
  const WebMapAdapter = webMap.mapAdapter.layerAdapters[type];
5289
5400
  if (WebMapAdapter) {
5290
5401
  mixinProperties(QmsAdapter, WebMapAdapter, [
5291
5402
  "showLayer",
5292
5403
  "hideLayer"
5293
5404
  ]);
5294
- if (type === "TILE") {
5295
- options = __spreadValues$h(__spreadValues$h({
5296
- order: 0,
5297
- maxZoom: webMap.options.maxZoom,
5298
- minZoom: webMap.options.minZoom
5299
- }, this.options), updateQmsOptions(qms));
5300
- if (qms.origin_url) {
5301
- const [url2, subdomains] = getSubdomainsOriginUrl(qms.origin_url);
5302
- if (subdomains.length) {
5303
- options.subdomains = subdomains;
5304
- options.url = url2;
5305
- }
5306
- }
5307
- this.options = options;
5308
- const adapter = new WebMapAdapter(this.map, options);
5309
- return adapter.addLayer(options);
5310
- }
5405
+ options = __spreadProps$b(__spreadValues$g(__spreadValues$g(__spreadValues$g({}, type === "TILE" ? {
5406
+ order: 0,
5407
+ maxZoom: webMap.options.maxZoom,
5408
+ minZoom: webMap.options.minZoom
5409
+ } : {}), this.options), qmsLayerToOptions(layer)), {
5410
+ signal
5411
+ });
5412
+ this.options = options;
5413
+ const adapter = new WebMapAdapter(this.map, options);
5414
+ return adapter.addLayer(options);
5415
+ }
5416
+ } catch (er) {
5417
+ if (signal == null ? void 0 : signal.aborted) {
5418
+ throw er;
5311
5419
  }
5420
+ console.error(er);
5312
5421
  }
5313
5422
  });
5314
5423
  }
@@ -5317,31 +5426,9 @@ function createQmsAdapter(webMapOrOptions, url = URL$1, createOpt = {}) {
5317
5426
  }
5318
5427
 
5319
5428
  var __defProp$o = Object.defineProperty;
5320
- var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
5321
- var __hasOwnProp$h = Object.prototype.hasOwnProperty;
5322
- var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
5323
5429
  var __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5324
- var __spreadValues$g = (a, b) => {
5325
- for (var prop in b || (b = {}))
5326
- if (__hasOwnProp$h.call(b, prop))
5327
- __defNormalProp$o(a, prop, b[prop]);
5328
- if (__getOwnPropSymbols$h)
5329
- for (var prop of __getOwnPropSymbols$h(b)) {
5330
- if (__propIsEnum$h.call(b, prop))
5331
- __defNormalProp$o(a, prop, b[prop]);
5332
- }
5333
- return a;
5334
- };
5335
- var __publicField$e = (obj, key, value) => __defNormalProp$o(obj, typeof key !== "symbol" ? key + "" : key, value);
5430
+ var __publicField$e = (obj, key, value) => __defNormalProp$o(obj, key + "" , value);
5336
5431
  class QmsKit {
5337
- constructor(options) {
5338
- __publicField$e(this, "options", {
5339
- url: "https://qms.nextgis.com"
5340
- });
5341
- __publicField$e(this, "url");
5342
- this.options = __spreadValues$g(__spreadValues$g({}, this.options), options);
5343
- this.url = this.options.url;
5344
- }
5345
5432
  getLayerAdapters() {
5346
5433
  return Promise.resolve([
5347
5434
  {
@@ -5351,7 +5438,7 @@ class QmsKit {
5351
5438
  ]);
5352
5439
  }
5353
5440
  _createAdapter(webMap) {
5354
- return createQmsAdapter({ webMap, url: this.url });
5441
+ return createQmsAdapter({ webMap });
5355
5442
  }
5356
5443
  }
5357
5444
  __publicField$e(QmsKit, "utils", {
@@ -5411,7 +5498,7 @@ function createBasemapLayerAdapter(_0) {
5411
5498
  if (qms) {
5412
5499
  const qms_ = JSON.parse(qms);
5413
5500
  const adapter = Promise.resolve(
5414
- QmsKit.utils.createQmsAdapter(webMap, void 0, {
5501
+ QmsKit.utils.createQmsAdapter(webMap, {
5415
5502
  qms: qms_,
5416
5503
  baselayer: true
5417
5504
  })
@@ -9530,7 +9617,8 @@ class WebMapLayers extends WebMapMain {
9530
9617
  maxZoom: tileJson.maxzoom,
9531
9618
  minZoom: tileJson.minzoom,
9532
9619
  subdomains: tileJson.scheme,
9533
- attribution: tileJson.attribution
9620
+ attribution: tileJson.attribution,
9621
+ request: tileJson.request
9534
9622
  });
9535
9623
  }
9536
9624
  /**