@nextgis/ngw-leaflet 3.0.0-alpha.17 → 3.0.0-alpha.18

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-leaflet; version: 3.0.0-alpha.16; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-leaflet; version: 3.0.0-alpha.17; author: NextGIS */
2
2
  var NgwLeaflet = (function () {
3
3
  'use strict';
4
4
 
@@ -15032,15 +15032,15 @@ var NgwLeaflet = (function () {
15032
15032
  };
15033
15033
  }
15034
15034
 
15035
- var __defProp$12 = Object.defineProperty;
15036
- var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15037
- var __publicField$I = (obj, key, value) => __defNormalProp$12(obj, typeof key !== "symbol" ? key + "" : key, value);
15035
+ var __defProp$13 = Object.defineProperty;
15036
+ var __defNormalProp$13 = (obj, key, value) => key in obj ? __defProp$13(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15037
+ var __publicField$J = (obj, key, value) => __defNormalProp$13(obj, typeof key !== "symbol" ? key + "" : key, value);
15038
15038
  class BaseAdapter {
15039
15039
  constructor(map, options) {
15040
15040
  this.map = map;
15041
15041
  this.options = options;
15042
- __publicField$I(this, "layer");
15043
- __publicField$I(this, "pane", "order-0");
15042
+ __publicField$J(this, "layer");
15043
+ __publicField$J(this, "pane", "order-0");
15044
15044
  if (options.order !== void 0) {
15045
15045
  const pane = "order-" + options.order;
15046
15046
  let exist = map.getPane(pane);
@@ -15069,19 +15069,19 @@ var NgwLeaflet = (function () {
15069
15069
  };
15070
15070
  }
15071
15071
 
15072
- var __defProp$11 = Object.defineProperty;
15073
- var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
15074
- var __hasOwnProp$I = Object.prototype.hasOwnProperty;
15075
- var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
15076
- var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15077
- var __spreadValues$H = (a, b) => {
15072
+ var __defProp$12 = Object.defineProperty;
15073
+ var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
15074
+ var __hasOwnProp$J = Object.prototype.hasOwnProperty;
15075
+ var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
15076
+ var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15077
+ var __spreadValues$I = (a, b) => {
15078
15078
  for (var prop in b || (b = {}))
15079
- if (__hasOwnProp$I.call(b, prop))
15080
- __defNormalProp$11(a, prop, b[prop]);
15081
- if (__getOwnPropSymbols$I)
15082
- for (var prop of __getOwnPropSymbols$I(b)) {
15083
- if (__propIsEnum$I.call(b, prop))
15084
- __defNormalProp$11(a, prop, b[prop]);
15079
+ if (__hasOwnProp$J.call(b, prop))
15080
+ __defNormalProp$12(a, prop, b[prop]);
15081
+ if (__getOwnPropSymbols$J)
15082
+ for (var prop of __getOwnPropSymbols$J(b)) {
15083
+ if (__propIsEnum$J.call(b, prop))
15084
+ __defNormalProp$12(a, prop, b[prop]);
15085
15085
  }
15086
15086
  return a;
15087
15087
  };
@@ -15091,7 +15091,7 @@ var NgwLeaflet = (function () {
15091
15091
  }) {
15092
15092
  const layer_ = source.target;
15093
15093
  const feature = layer_.feature;
15094
- const opt = __spreadValues$H({
15094
+ const opt = __spreadValues$I({
15095
15095
  layer,
15096
15096
  feature,
15097
15097
  event: convertMapClickEvent(source),
@@ -15100,30 +15100,30 @@ var NgwLeaflet = (function () {
15100
15100
  return opt;
15101
15101
  }
15102
15102
 
15103
- var __defProp$10 = Object.defineProperty;
15104
- var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
15105
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
15106
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
15107
- var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15108
- var __spreadValues$G = (a, b) => {
15103
+ var __defProp$11 = Object.defineProperty;
15104
+ var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
15105
+ var __hasOwnProp$I = Object.prototype.hasOwnProperty;
15106
+ var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
15107
+ var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15108
+ var __spreadValues$H = (a, b) => {
15109
15109
  for (var prop in b || (b = {}))
15110
- if (__hasOwnProp$H.call(b, prop))
15111
- __defNormalProp$10(a, prop, b[prop]);
15112
- if (__getOwnPropSymbols$H)
15113
- for (var prop of __getOwnPropSymbols$H(b)) {
15114
- if (__propIsEnum$H.call(b, prop))
15115
- __defNormalProp$10(a, prop, b[prop]);
15110
+ if (__hasOwnProp$I.call(b, prop))
15111
+ __defNormalProp$11(a, prop, b[prop]);
15112
+ if (__getOwnPropSymbols$I)
15113
+ for (var prop of __getOwnPropSymbols$I(b)) {
15114
+ if (__propIsEnum$I.call(b, prop))
15115
+ __defNormalProp$11(a, prop, b[prop]);
15116
15116
  }
15117
15117
  return a;
15118
15118
  };
15119
- var __publicField$H = (obj, key, value) => __defNormalProp$10(obj, typeof key !== "symbol" ? key + "" : key, value);
15119
+ var __publicField$I = (obj, key, value) => __defNormalProp$11(obj, typeof key !== "symbol" ? key + "" : key, value);
15120
15120
  class GeoJsonEvents {
15121
15121
  constructor(layer) {
15122
- __publicField$H(this, "layer");
15123
- __publicField$H(this, "_onclick");
15124
- __publicField$H(this, "_ondblclick");
15125
- __publicField$H(this, "_mouseout");
15126
- __publicField$H(this, "_mouseover");
15122
+ __publicField$I(this, "layer");
15123
+ __publicField$I(this, "_onclick");
15124
+ __publicField$I(this, "_ondblclick");
15125
+ __publicField$I(this, "_mouseout");
15126
+ __publicField$I(this, "_mouseover");
15127
15127
  this.layer = layer;
15128
15128
  }
15129
15129
  handleMouseEvents(layer) {
@@ -15132,7 +15132,7 @@ var NgwLeaflet = (function () {
15132
15132
  if (onClick_) {
15133
15133
  this._onclick = (e) => {
15134
15134
  const selected = !!this.layer._getSelected(layer);
15135
- onClick_(__spreadValues$G({
15135
+ onClick_(__spreadValues$H({
15136
15136
  selected
15137
15137
  }, this._createMouseEvent(e)));
15138
15138
  };
@@ -15142,7 +15142,7 @@ var NgwLeaflet = (function () {
15142
15142
  this._ondblclick = (e) => {
15143
15143
  leafletSrcExports.DomEvent.stopPropagation(e);
15144
15144
  const selected = !!this.layer._getSelected(layer);
15145
- onDoubleClick(__spreadValues$G({
15145
+ onDoubleClick(__spreadValues$H({
15146
15146
  selected
15147
15147
  }, this._createMouseEvent(e)));
15148
15148
  };
@@ -15801,19 +15801,19 @@ var NgwLeaflet = (function () {
15801
15801
  typeof: evaluateArgs(([arg]) => typeOfValue(arg))
15802
15802
  };
15803
15803
 
15804
- var __defProp$$ = Object.defineProperty;
15805
- var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
15806
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
15807
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
15808
- var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15809
- var __spreadValues$F = (a, b) => {
15804
+ var __defProp$10 = Object.defineProperty;
15805
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
15806
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
15807
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
15808
+ var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15809
+ var __spreadValues$G = (a, b) => {
15810
15810
  for (var prop in b || (b = {}))
15811
- if (__hasOwnProp$G.call(b, prop))
15812
- __defNormalProp$$(a, prop, b[prop]);
15813
- if (__getOwnPropSymbols$G)
15814
- for (var prop of __getOwnPropSymbols$G(b)) {
15815
- if (__propIsEnum$G.call(b, prop))
15816
- __defNormalProp$$(a, prop, b[prop]);
15811
+ if (__hasOwnProp$H.call(b, prop))
15812
+ __defNormalProp$10(a, prop, b[prop]);
15813
+ if (__getOwnPropSymbols$H)
15814
+ for (var prop of __getOwnPropSymbols$H(b)) {
15815
+ if (__propIsEnum$H.call(b, prop))
15816
+ __defNormalProp$10(a, prop, b[prop]);
15817
15817
  }
15818
15818
  return a;
15819
15819
  };
@@ -15825,7 +15825,7 @@ var NgwLeaflet = (function () {
15825
15825
  }
15826
15826
  return false;
15827
15827
  }
15828
- const expressions = __spreadValues$F(__spreadValues$F(__spreadValues$F(__spreadValues$F(__spreadValues$F(__spreadValues$F({}, mathExpressions), typeExpressions), stringExpressions), lookupExpressions), decisionExpressions), interpolationExpressions);
15828
+ const expressions = __spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G({}, mathExpressions), typeExpressions), stringExpressions), lookupExpressions), decisionExpressions), interpolationExpressions);
15829
15829
  function evaluate(expression, data = {}) {
15830
15830
  const [name, ...args] = expression;
15831
15831
  const expressionFun = expressions[name];
@@ -15838,19 +15838,19 @@ var NgwLeaflet = (function () {
15838
15838
  throw new Error(`Expression "${name}" is not supported.`);
15839
15839
  }
15840
15840
 
15841
- var __defProp$_ = Object.defineProperty;
15842
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
15843
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
15844
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
15845
- var __defNormalProp$_ = (obj, key, value) => key in obj ? __defProp$_(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15846
- var __spreadValues$E = (a, b) => {
15841
+ var __defProp$$ = Object.defineProperty;
15842
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
15843
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
15844
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
15845
+ var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15846
+ var __spreadValues$F = (a, b) => {
15847
15847
  for (var prop in b || (b = {}))
15848
- if (__hasOwnProp$F.call(b, prop))
15849
- __defNormalProp$_(a, prop, b[prop]);
15850
- if (__getOwnPropSymbols$F)
15851
- for (var prop of __getOwnPropSymbols$F(b)) {
15852
- if (__propIsEnum$F.call(b, prop))
15853
- __defNormalProp$_(a, prop, b[prop]);
15848
+ if (__hasOwnProp$G.call(b, prop))
15849
+ __defNormalProp$$(a, prop, b[prop]);
15850
+ if (__getOwnPropSymbols$G)
15851
+ for (var prop of __getOwnPropSymbols$G(b)) {
15852
+ if (__propIsEnum$G.call(b, prop))
15853
+ __defNormalProp$$(a, prop, b[prop]);
15854
15854
  }
15855
15855
  return a;
15856
15856
  };
@@ -15883,25 +15883,25 @@ var NgwLeaflet = (function () {
15883
15883
  for (const p in expressions) {
15884
15884
  fromCb[p] = expressions[p](feature);
15885
15885
  }
15886
- return __spreadValues$E(__spreadValues$E({}, paint), fromCb);
15886
+ return __spreadValues$F(__spreadValues$F({}, paint), fromCb);
15887
15887
  };
15888
15888
  }
15889
15889
  return;
15890
15890
  }
15891
15891
 
15892
- var __defProp$Z = Object.defineProperty;
15893
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
15894
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
15895
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
15896
- var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15897
- var __spreadValues$D = (a, b) => {
15892
+ var __defProp$_ = Object.defineProperty;
15893
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
15894
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
15895
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
15896
+ var __defNormalProp$_ = (obj, key, value) => key in obj ? __defProp$_(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15897
+ var __spreadValues$E = (a, b) => {
15898
15898
  for (var prop in b || (b = {}))
15899
- if (__hasOwnProp$E.call(b, prop))
15900
- __defNormalProp$Z(a, prop, b[prop]);
15901
- if (__getOwnPropSymbols$E)
15902
- for (var prop of __getOwnPropSymbols$E(b)) {
15903
- if (__propIsEnum$E.call(b, prop))
15904
- __defNormalProp$Z(a, prop, b[prop]);
15899
+ if (__hasOwnProp$F.call(b, prop))
15900
+ __defNormalProp$_(a, prop, b[prop]);
15901
+ if (__getOwnPropSymbols$F)
15902
+ for (var prop of __getOwnPropSymbols$F(b)) {
15903
+ if (__propIsEnum$F.call(b, prop))
15904
+ __defNormalProp$_(a, prop, b[prop]);
15905
15905
  }
15906
15906
  return a;
15907
15907
  };
@@ -15948,7 +15948,7 @@ var NgwLeaflet = (function () {
15948
15948
  return false;
15949
15949
  }
15950
15950
  function featureFilter(feature, filters) {
15951
- const properties = __spreadValues$D({}, feature.properties);
15951
+ const properties = __spreadValues$E({}, feature.properties);
15952
15952
  if (properties) {
15953
15953
  properties.$id = feature.id;
15954
15954
  return propertiesFilter(properties, filters);
@@ -16002,19 +16002,19 @@ var NgwLeaflet = (function () {
16002
16002
  return false;
16003
16003
  }
16004
16004
 
16005
- var __defProp$Y = Object.defineProperty;
16006
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16007
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16008
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16009
- var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16010
- var __spreadValues$C = (a, b) => {
16005
+ var __defProp$Z = Object.defineProperty;
16006
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
16007
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
16008
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
16009
+ var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16010
+ var __spreadValues$D = (a, b) => {
16011
16011
  for (var prop in b || (b = {}))
16012
- if (__hasOwnProp$D.call(b, prop))
16013
- __defNormalProp$Y(a, prop, b[prop]);
16014
- if (__getOwnPropSymbols$D)
16015
- for (var prop of __getOwnPropSymbols$D(b)) {
16016
- if (__propIsEnum$D.call(b, prop))
16017
- __defNormalProp$Y(a, prop, b[prop]);
16012
+ if (__hasOwnProp$E.call(b, prop))
16013
+ __defNormalProp$Z(a, prop, b[prop]);
16014
+ if (__getOwnPropSymbols$E)
16015
+ for (var prop of __getOwnPropSymbols$E(b)) {
16016
+ if (__propIsEnum$E.call(b, prop))
16017
+ __defNormalProp$Z(a, prop, b[prop]);
16018
16018
  }
16019
16019
  return a;
16020
16020
  };
@@ -16043,7 +16043,7 @@ var NgwLeaflet = (function () {
16043
16043
  return (feature) => {
16044
16044
  const paint = paintsFilters.find((x) => featureFilter(feature, x[0]));
16045
16045
  if (paint) {
16046
- return __spreadValues$C(__spreadValues$C({}, mask), paint[1]);
16046
+ return __spreadValues$D(__spreadValues$D({}, mask), paint[1]);
16047
16047
  }
16048
16048
  return mask;
16049
16049
  };
@@ -16067,8 +16067,8 @@ var NgwLeaflet = (function () {
16067
16067
  }
16068
16068
  function finalizePaint({ paint, defaultPaint }) {
16069
16069
  var _a;
16070
- let newPaint = __spreadValues$C({}, defaultPaint);
16071
- newPaint = __spreadValues$C(__spreadValues$C({}, newPaint), paint);
16070
+ let newPaint = __spreadValues$D({}, defaultPaint);
16071
+ newPaint = __spreadValues$D(__spreadValues$D({}, newPaint), paint);
16072
16072
  newPaint.fill = (_a = newPaint.fill) != null ? _a : true;
16073
16073
  newPaint.stroke = newPaint.stroke !== void 0 ? newPaint.stroke : !newPaint.fill || !!(newPaint.strokeColor || newPaint.strokeOpacity);
16074
16074
  return newPaint;
@@ -16081,7 +16081,7 @@ var NgwLeaflet = (function () {
16081
16081
  if (!paint) {
16082
16082
  throw new Error("paint is empty");
16083
16083
  }
16084
- let newPaint = __spreadValues$C({}, defaultPaint);
16084
+ let newPaint = __spreadValues$D({}, defaultPaint);
16085
16085
  if (isPaintCallback(paint)) {
16086
16086
  const getPaintFunction = (feature) => {
16087
16087
  const getPaint = preparePaint({
@@ -16138,41 +16138,41 @@ var NgwLeaflet = (function () {
16138
16138
  return newPaint;
16139
16139
  }
16140
16140
 
16141
- var __defProp$X = Object.defineProperty;
16142
- var __defProps$p = Object.defineProperties;
16143
- var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
16144
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16145
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16146
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16147
- var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16148
- var __spreadValues$B = (a, b) => {
16141
+ var __defProp$Y = Object.defineProperty;
16142
+ var __defProps$q = Object.defineProperties;
16143
+ var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
16144
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16145
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16146
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16147
+ var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16148
+ var __spreadValues$C = (a, b) => {
16149
16149
  for (var prop in b || (b = {}))
16150
- if (__hasOwnProp$C.call(b, prop))
16151
- __defNormalProp$X(a, prop, b[prop]);
16152
- if (__getOwnPropSymbols$C)
16153
- for (var prop of __getOwnPropSymbols$C(b)) {
16154
- if (__propIsEnum$C.call(b, prop))
16155
- __defNormalProp$X(a, prop, b[prop]);
16150
+ if (__hasOwnProp$D.call(b, prop))
16151
+ __defNormalProp$Y(a, prop, b[prop]);
16152
+ if (__getOwnPropSymbols$D)
16153
+ for (var prop of __getOwnPropSymbols$D(b)) {
16154
+ if (__propIsEnum$D.call(b, prop))
16155
+ __defNormalProp$Y(a, prop, b[prop]);
16156
16156
  }
16157
16157
  return a;
16158
16158
  };
16159
- var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
16159
+ var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
16160
16160
  var __objRest$8 = (source, exclude) => {
16161
16161
  var target = {};
16162
16162
  for (var prop in source)
16163
- if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
16163
+ if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
16164
16164
  target[prop] = source[prop];
16165
- if (source != null && __getOwnPropSymbols$C)
16166
- for (var prop of __getOwnPropSymbols$C(source)) {
16167
- if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
16165
+ if (source != null && __getOwnPropSymbols$D)
16166
+ for (var prop of __getOwnPropSymbols$D(source)) {
16167
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
16168
16168
  target[prop] = source[prop];
16169
16169
  }
16170
16170
  return target;
16171
16171
  };
16172
- var __publicField$G = (obj, key, value) => __defNormalProp$X(obj, key + "" , value);
16172
+ var __publicField$H = (obj, key, value) => __defNormalProp$Y(obj, key + "" , value);
16173
16173
  class GeoJsonPaint {
16174
16174
  constructor(layer) {
16175
- __publicField$G(this, "layer");
16175
+ __publicField$H(this, "layer");
16176
16176
  this.layer = layer;
16177
16177
  }
16178
16178
  setPaintEachLayer(paint) {
@@ -16251,7 +16251,7 @@ var NgwLeaflet = (function () {
16251
16251
  if (html) {
16252
16252
  element.innerHTML = html;
16253
16253
  }
16254
- const divIcon = new leafletSrcExports.DivIcon(__spreadProps$p(__spreadValues$B({
16254
+ const divIcon = new leafletSrcExports.DivIcon(__spreadProps$q(__spreadValues$C({
16255
16255
  className: ""
16256
16256
  }, toLIconOpt), {
16257
16257
  html: element
@@ -16277,7 +16277,7 @@ var NgwLeaflet = (function () {
16277
16277
  }
16278
16278
  return (_, latlng) => {
16279
16279
  const p = PAINT;
16280
- return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$B(__spreadValues$B({}, p), icon)));
16280
+ return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$C(__spreadValues$C({}, p), icon)));
16281
16281
  };
16282
16282
  }
16283
16283
  createPaintOptions(paint) {
@@ -16299,27 +16299,27 @@ var NgwLeaflet = (function () {
16299
16299
  }
16300
16300
  }
16301
16301
 
16302
- var __defProp$W = Object.defineProperty;
16303
- var __defProps$o = Object.defineProperties;
16304
- var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
16305
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
16306
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
16307
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
16308
- var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16309
- var __spreadValues$A = (a, b) => {
16302
+ var __defProp$X = Object.defineProperty;
16303
+ var __defProps$p = Object.defineProperties;
16304
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
16305
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16306
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16307
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16308
+ var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16309
+ var __spreadValues$B = (a, b) => {
16310
16310
  for (var prop in b || (b = {}))
16311
- if (__hasOwnProp$B.call(b, prop))
16312
- __defNormalProp$W(a, prop, b[prop]);
16313
- if (__getOwnPropSymbols$B)
16314
- for (var prop of __getOwnPropSymbols$B(b)) {
16315
- if (__propIsEnum$B.call(b, prop))
16316
- __defNormalProp$W(a, prop, b[prop]);
16311
+ if (__hasOwnProp$C.call(b, prop))
16312
+ __defNormalProp$X(a, prop, b[prop]);
16313
+ if (__getOwnPropSymbols$C)
16314
+ for (var prop of __getOwnPropSymbols$C(b)) {
16315
+ if (__propIsEnum$C.call(b, prop))
16316
+ __defNormalProp$X(a, prop, b[prop]);
16317
16317
  }
16318
16318
  return a;
16319
16319
  };
16320
- var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
16321
- var __publicField$F = (obj, key, value) => __defNormalProp$W(obj, typeof key !== "symbol" ? key + "" : key, value);
16322
- var __async$v = (__this, __arguments, generator) => {
16320
+ var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
16321
+ var __publicField$G = (obj, key, value) => __defNormalProp$X(obj, typeof key !== "symbol" ? key + "" : key, value);
16322
+ var __async$w = (__this, __arguments, generator) => {
16323
16323
  return new Promise((resolve, reject) => {
16324
16324
  var fulfilled = (value) => {
16325
16325
  try {
@@ -16342,22 +16342,22 @@ var NgwLeaflet = (function () {
16342
16342
  class GeoJsonAdapter extends BaseAdapter {
16343
16343
  constructor(map, options) {
16344
16344
  super(map, options);
16345
- __publicField$F(this, "layer");
16346
- __publicField$F(this, "selected", false);
16347
- __publicField$F(this, "type");
16348
- __publicField$F(this, "_layers", []);
16349
- __publicField$F(this, "_events");
16350
- __publicField$F(this, "paint");
16351
- __publicField$F(this, "selectedPaint");
16352
- __publicField$F(this, "_selectedLayers", []);
16353
- __publicField$F(this, "_filteredLayers", []);
16354
- __publicField$F(this, "_filterFun");
16355
- __publicField$F(this, "_openedPopup", []);
16356
- __publicField$F(this, "_paint");
16357
- __publicField$F(this, "$updateTooltip", debounce(() => {
16345
+ __publicField$G(this, "layer");
16346
+ __publicField$G(this, "selected", false);
16347
+ __publicField$G(this, "type");
16348
+ __publicField$G(this, "_layers", []);
16349
+ __publicField$G(this, "_events");
16350
+ __publicField$G(this, "paint");
16351
+ __publicField$G(this, "selectedPaint");
16352
+ __publicField$G(this, "_selectedLayers", []);
16353
+ __publicField$G(this, "_filteredLayers", []);
16354
+ __publicField$G(this, "_filterFun");
16355
+ __publicField$G(this, "_openedPopup", []);
16356
+ __publicField$G(this, "_paint");
16357
+ __publicField$G(this, "$updateTooltip", debounce(() => {
16358
16358
  this.updateTooltip();
16359
16359
  }, 300));
16360
- __publicField$F(this, "$unselect", () => {
16360
+ __publicField$G(this, "$unselect", () => {
16361
16361
  this.unselect();
16362
16362
  });
16363
16363
  this._events = new GeoJsonEvents(this);
@@ -16366,7 +16366,7 @@ var NgwLeaflet = (function () {
16366
16366
  addLayer(options) {
16367
16367
  Object.assign(this.options, options);
16368
16368
  this.paint = options.paint;
16369
- this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$o(__spreadValues$A({}, options.nativeOptions), {
16369
+ this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$p(__spreadValues$B({}, options.nativeOptions), {
16370
16370
  pane: this.pane
16371
16371
  }));
16372
16372
  this.selectedPaint = options.selectedPaint;
@@ -16415,7 +16415,7 @@ var NgwLeaflet = (function () {
16415
16415
  }
16416
16416
  getSelected() {
16417
16417
  return this._selectedLayers.map((x) => {
16418
- return __spreadValues$A({
16418
+ return __spreadValues$B({
16419
16419
  target: this,
16420
16420
  feature: x.feature,
16421
16421
  layer: x
@@ -16434,14 +16434,14 @@ var NgwLeaflet = (function () {
16434
16434
  const filteredLayers = [];
16435
16435
  this._layers.forEach(({ feature, layer }) => {
16436
16436
  if (layer) {
16437
- const ok = fun ? fun(__spreadValues$A({
16437
+ const ok = fun ? fun(__spreadValues$B({
16438
16438
  target: this,
16439
16439
  feature,
16440
16440
  layer
16441
16441
  }, createFeaturePositionOptions(feature))) : true;
16442
16442
  if (ok) {
16443
16443
  layer_.addLayer(layer);
16444
- filteredLayers.push(__spreadValues$A({
16444
+ filteredLayers.push(__spreadValues$B({
16445
16445
  target: this,
16446
16446
  feature,
16447
16447
  layer
@@ -16462,7 +16462,7 @@ var NgwLeaflet = (function () {
16462
16462
  getLayers() {
16463
16463
  return this._layers.map(({ layer, feature }) => {
16464
16464
  const visible = layer && !!layer._map;
16465
- return __spreadValues$A({
16465
+ return __spreadValues$B({
16466
16466
  feature,
16467
16467
  layer,
16468
16468
  visible,
@@ -16580,13 +16580,13 @@ var NgwLeaflet = (function () {
16580
16580
  }
16581
16581
  }
16582
16582
  updatePaint(paint) {
16583
- this.paint = __spreadValues$A(__spreadValues$A({}, this.paint), paint);
16583
+ this.paint = __spreadValues$B(__spreadValues$B({}, this.paint), paint);
16584
16584
  for (const l of this._layers) {
16585
16585
  this._paint.setPaint(l, this.paint);
16586
16586
  }
16587
16587
  }
16588
16588
  updateSelectedPaint(paint) {
16589
- this.selectedPaint = __spreadValues$A(__spreadValues$A({}, this.selectedPaint), paint);
16589
+ this.selectedPaint = __spreadValues$B(__spreadValues$B({}, this.selectedPaint), paint);
16590
16590
  for (const l of this._selectedLayers) {
16591
16591
  this._paint.setPaint(l, this.selectedPaint);
16592
16592
  }
@@ -16603,7 +16603,7 @@ var NgwLeaflet = (function () {
16603
16603
  if (feature.properties && labelField) {
16604
16604
  message = feature.properties[labelField];
16605
16605
  } else if (label) {
16606
- message = label(__spreadValues$A(__spreadValues$A({
16606
+ message = label(__spreadValues$B(__spreadValues$B({
16607
16607
  target: this
16608
16608
  }, layerDef), createFeaturePositionOptions(feature)));
16609
16609
  }
@@ -16614,7 +16614,7 @@ var NgwLeaflet = (function () {
16614
16614
  }
16615
16615
  }
16616
16616
  _openPopup(_0) {
16617
- return __async$v(this, arguments, function* (def, options = {}, type, latLng) {
16617
+ return __async$w(this, arguments, function* (def, options = {}, type, latLng) {
16618
16618
  var _a, _b;
16619
16619
  const { feature, layer } = def;
16620
16620
  const {
@@ -16622,7 +16622,7 @@ var NgwLeaflet = (function () {
16622
16622
  autoPan,
16623
16623
  maxWidth,
16624
16624
  closeButton: closeButton_
16625
- } = __spreadValues$A({
16625
+ } = __spreadValues$B({
16626
16626
  minWidth: 300
16627
16627
  }, options);
16628
16628
  const closeButton = closeButton_ != null ? closeButton_ : !this.options.selectOnHover;
@@ -16638,7 +16638,7 @@ var NgwLeaflet = (function () {
16638
16638
  };
16639
16639
  let content;
16640
16640
  if (options.createPopupContent) {
16641
- content = yield options.createPopupContent(__spreadValues$A({
16641
+ content = yield options.createPopupContent(__spreadValues$B({
16642
16642
  layer,
16643
16643
  feature,
16644
16644
  target: this,
@@ -16716,9 +16716,9 @@ var NgwLeaflet = (function () {
16716
16716
  lopt = {
16717
16717
  style: (feature) => {
16718
16718
  if (feature) {
16719
- return this._paint.preparePaint(__spreadValues$A(__spreadValues$A({}, PAINT), paint(feature)));
16719
+ return this._paint.preparePaint(__spreadValues$B(__spreadValues$B({}, PAINT), paint(feature)));
16720
16720
  } else {
16721
- return this._paint.preparePaint(__spreadProps$o(__spreadValues$A({}, PAINT), { type: "path" }));
16721
+ return this._paint.preparePaint(__spreadProps$p(__spreadValues$B({}, PAINT), { type: "path" }));
16722
16722
  }
16723
16723
  }
16724
16724
  };
@@ -16734,7 +16734,7 @@ var NgwLeaflet = (function () {
16734
16734
  _onEachFeature(feature, layer) {
16735
16735
  const layer_ = this.layer;
16736
16736
  if (layer_) {
16737
- const def = __spreadValues$A({
16737
+ const def = __spreadValues$B({
16738
16738
  target: this,
16739
16739
  feature,
16740
16740
  layer
@@ -16769,7 +16769,7 @@ var NgwLeaflet = (function () {
16769
16769
  setTimeout(() => {
16770
16770
  if (popup) {
16771
16771
  this._openPopup(
16772
- __spreadValues$A({
16772
+ __spreadValues$B({
16773
16773
  target: this,
16774
16774
  layer,
16775
16775
  feature
@@ -16787,7 +16787,7 @@ var NgwLeaflet = (function () {
16787
16787
  leafletSrcExports.DomEvent.stopPropagation(e);
16788
16788
  const layer = e.target;
16789
16789
  const feature = layer.feature;
16790
- const def = __spreadValues$A({
16790
+ const def = __spreadValues$B({
16791
16791
  target: this,
16792
16792
  layer,
16793
16793
  feature
@@ -16820,7 +16820,7 @@ var NgwLeaflet = (function () {
16820
16820
  }
16821
16821
  if (this.options.onSelect) {
16822
16822
  const features = def.feature ? [def.feature] : [];
16823
- this.options.onSelect(__spreadValues$A({
16823
+ this.options.onSelect(__spreadValues$B({
16824
16824
  type,
16825
16825
  layer: this,
16826
16826
  features
@@ -16912,20 +16912,20 @@ var NgwLeaflet = (function () {
16912
16912
  return [promise, abortFunc];
16913
16913
  }
16914
16914
 
16915
- var __defProp$V = Object.defineProperty;
16916
- var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16917
- var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, typeof key !== "symbol" ? key + "" : key, value);
16915
+ var __defProp$W = Object.defineProperty;
16916
+ var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16917
+ var __publicField$F = (obj, key, value) => __defNormalProp$W(obj, typeof key !== "symbol" ? key + "" : key, value);
16918
16918
  class Queue {
16919
16919
  /**
16920
16920
  * @param {PromiseQueueOptions} options - Configuration options for the queue.
16921
16921
  */
16922
16922
  constructor({ concurrency = 1, delay = 0 } = {}) {
16923
- __publicField$E(this, "queue", []);
16924
- __publicField$E(this, "concurrency");
16925
- __publicField$E(this, "activeCount", 0);
16926
- __publicField$E(this, "timeoutId");
16927
- __publicField$E(this, "delay");
16928
- __publicField$E(this, "toAbort", []);
16923
+ __publicField$F(this, "queue", []);
16924
+ __publicField$F(this, "concurrency");
16925
+ __publicField$F(this, "activeCount", 0);
16926
+ __publicField$F(this, "timeoutId");
16927
+ __publicField$F(this, "delay");
16928
+ __publicField$F(this, "toAbort", []);
16929
16929
  this.concurrency = concurrency;
16930
16930
  this.delay = delay;
16931
16931
  }
@@ -17001,13 +17001,13 @@ var NgwLeaflet = (function () {
17001
17001
 
17002
17002
  const imageQueue = new Queue({ concurrency: 6, delay: 200 });
17003
17003
 
17004
- var __defProp$U = Object.defineProperty;
17005
- var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17006
- var __publicField$D = (obj, key, value) => __defNormalProp$U(obj, key + "" , value);
17004
+ var __defProp$V = Object.defineProperty;
17005
+ var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17006
+ var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, key + "" , value);
17007
17007
  class ImageOverlay extends leafletSrcExports.ImageOverlay {
17008
17008
  constructor(imageUrl, bounds, options) {
17009
17009
  super(imageUrl, bounds, options);
17010
- __publicField$D(this, "_aborter");
17010
+ __publicField$E(this, "_aborter");
17011
17011
  }
17012
17012
  cancelLoad() {
17013
17013
  if (this._aborter) {
@@ -17036,14 +17036,14 @@ var NgwLeaflet = (function () {
17036
17036
  }
17037
17037
  }
17038
17038
 
17039
- var __defProp$T = Object.defineProperty;
17040
- var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17041
- var __publicField$C = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
17039
+ var __defProp$U = Object.defineProperty;
17040
+ var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17041
+ var __publicField$D = (obj, key, value) => __defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
17042
17042
  class ImageLayer extends leafletSrcExports.Layer {
17043
17043
  constructor(url, options) {
17044
17044
  var _a;
17045
17045
  super(options);
17046
- __publicField$C(this, "defaultWmsParams", {
17046
+ __publicField$D(this, "defaultWmsParams", {
17047
17047
  service: "WMS",
17048
17048
  request: "GetMap",
17049
17049
  version: "1.1.1",
@@ -17052,7 +17052,7 @@ var NgwLeaflet = (function () {
17052
17052
  format: "image/jpeg",
17053
17053
  transparent: false
17054
17054
  });
17055
- __publicField$C(this, "options", {
17055
+ __publicField$D(this, "options", {
17056
17056
  crs: null,
17057
17057
  uppercase: false,
17058
17058
  attribution: "",
@@ -17066,11 +17066,11 @@ var NgwLeaflet = (function () {
17066
17066
  viewPortBuffer: 0,
17067
17067
  setViewDelay: 100
17068
17068
  });
17069
- __publicField$C(this, "wmsParams");
17070
- __publicField$C(this, "_url");
17071
- __publicField$C(this, "_currentUrl");
17072
- __publicField$C(this, "_currentOverlay");
17073
- __publicField$C(this, "_loadedOverlay");
17069
+ __publicField$D(this, "wmsParams");
17070
+ __publicField$D(this, "_url");
17071
+ __publicField$D(this, "_currentUrl");
17072
+ __publicField$D(this, "_currentOverlay");
17073
+ __publicField$D(this, "_loadedOverlay");
17074
17074
  this._url = url;
17075
17075
  const params = {};
17076
17076
  const opts = {};
@@ -17078,7 +17078,7 @@ var NgwLeaflet = (function () {
17078
17078
  for (opt in options) {
17079
17079
  if (opt in this.options) {
17080
17080
  opts[opt] = options[opt];
17081
- } else {
17081
+ } else if (!isObject$1(options[opt])) {
17082
17082
  params[opt] = options[opt];
17083
17083
  }
17084
17084
  }
@@ -17234,41 +17234,41 @@ var NgwLeaflet = (function () {
17234
17234
  }
17235
17235
  }
17236
17236
 
17237
- var __defProp$S = Object.defineProperty;
17238
- var __defProps$n = Object.defineProperties;
17239
- var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
17240
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
17241
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
17242
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
17243
- var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17244
- var __spreadValues$z = (a, b) => {
17237
+ var __defProp$T = Object.defineProperty;
17238
+ var __defProps$o = Object.defineProperties;
17239
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
17240
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
17241
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
17242
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
17243
+ var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17244
+ var __spreadValues$A = (a, b) => {
17245
17245
  for (var prop in b || (b = {}))
17246
- if (__hasOwnProp$A.call(b, prop))
17247
- __defNormalProp$S(a, prop, b[prop]);
17248
- if (__getOwnPropSymbols$A)
17249
- for (var prop of __getOwnPropSymbols$A(b)) {
17250
- if (__propIsEnum$A.call(b, prop))
17251
- __defNormalProp$S(a, prop, b[prop]);
17246
+ if (__hasOwnProp$B.call(b, prop))
17247
+ __defNormalProp$T(a, prop, b[prop]);
17248
+ if (__getOwnPropSymbols$B)
17249
+ for (var prop of __getOwnPropSymbols$B(b)) {
17250
+ if (__propIsEnum$B.call(b, prop))
17251
+ __defNormalProp$T(a, prop, b[prop]);
17252
17252
  }
17253
17253
  return a;
17254
17254
  };
17255
- var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
17256
- var __publicField$B = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
17255
+ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
17256
+ var __publicField$C = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
17257
17257
  class ImageAdapter extends BaseAdapter {
17258
17258
  constructor() {
17259
17259
  super(...arguments);
17260
- __publicField$B(this, "layer");
17260
+ __publicField$C(this, "layer");
17261
17261
  }
17262
17262
  addLayer(options) {
17263
17263
  var _a;
17264
17264
  const url = options && options.url;
17265
17265
  if (url) {
17266
17266
  const updateWmsParamsFromOpt = options.updateWmsParams;
17267
- this.layer = new ImageLayer(url, __spreadValues$z(__spreadValues$z(__spreadValues$z({
17267
+ this.layer = new ImageLayer(url, __spreadValues$A(__spreadValues$A(__spreadValues$A({
17268
17268
  pane: this.pane,
17269
17269
  headers: options.headers,
17270
17270
  setViewDelay: options.setViewDelay
17271
- }, __spreadProps$n(__spreadValues$z({
17271
+ }, __spreadProps$o(__spreadValues$A({
17272
17272
  transparent: true
17273
17273
  }, options), {
17274
17274
  opacity: (_a = options.opacity) != null ? _a : void 0
@@ -17291,7 +17291,7 @@ var NgwLeaflet = (function () {
17291
17291
  }
17292
17292
  }
17293
17293
  }
17294
- __publicField$B(ImageAdapter, "queue", imageQueue);
17294
+ __publicField$C(ImageAdapter, "queue", imageQueue);
17295
17295
 
17296
17296
  function makeRemote(Base) {
17297
17297
  return class RemoteTileLayer extends Base {
@@ -17353,33 +17353,33 @@ var NgwLeaflet = (function () {
17353
17353
  }
17354
17354
  const TileLayer = makeRemote(TileLayerBase);
17355
17355
 
17356
- var __defProp$R = Object.defineProperty;
17357
- var __defProps$m = Object.defineProperties;
17358
- var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
17359
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
17360
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
17361
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
17362
- var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17363
- var __spreadValues$y = (a, b) => {
17364
- for (var prop in b || (b = {}))
17365
- if (__hasOwnProp$z.call(b, prop))
17366
- __defNormalProp$R(a, prop, b[prop]);
17367
- if (__getOwnPropSymbols$z)
17368
- for (var prop of __getOwnPropSymbols$z(b)) {
17369
- if (__propIsEnum$z.call(b, prop))
17370
- __defNormalProp$R(a, prop, b[prop]);
17356
+ var __defProp$S = Object.defineProperty;
17357
+ var __defProps$n = Object.defineProperties;
17358
+ var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
17359
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
17360
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
17361
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
17362
+ var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17363
+ var __spreadValues$z = (a, b) => {
17364
+ for (var prop in b || (b = {}))
17365
+ if (__hasOwnProp$A.call(b, prop))
17366
+ __defNormalProp$S(a, prop, b[prop]);
17367
+ if (__getOwnPropSymbols$A)
17368
+ for (var prop of __getOwnPropSymbols$A(b)) {
17369
+ if (__propIsEnum$A.call(b, prop))
17370
+ __defNormalProp$S(a, prop, b[prop]);
17371
17371
  }
17372
17372
  return a;
17373
17373
  };
17374
- var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
17374
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
17375
17375
  var __objRest$7 = (source, exclude) => {
17376
17376
  var target = {};
17377
17377
  for (var prop in source)
17378
- if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
17378
+ if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
17379
17379
  target[prop] = source[prop];
17380
- if (source != null && __getOwnPropSymbols$z)
17381
- for (var prop of __getOwnPropSymbols$z(source)) {
17382
- if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
17380
+ if (source != null && __getOwnPropSymbols$A)
17381
+ for (var prop of __getOwnPropSymbols$A(source)) {
17382
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
17383
17383
  target[prop] = source[prop];
17384
17384
  }
17385
17385
  return target;
@@ -17390,7 +17390,7 @@ var NgwLeaflet = (function () {
17390
17390
  if (options) {
17391
17391
  const _a = options, { url } = _a, opt = __objRest$7(_a, ["url"]);
17392
17392
  if (url) {
17393
- const tileLayerOptions = __spreadValues$y({
17393
+ const tileLayerOptions = __spreadValues$z({
17394
17394
  pane: this.pane,
17395
17395
  attribution: opt.attribution,
17396
17396
  minZoom: opt.minZoom,
@@ -17401,7 +17401,7 @@ var NgwLeaflet = (function () {
17401
17401
  }
17402
17402
  let layer;
17403
17403
  if (opt.headers || opt.withCredentials) {
17404
- layer = new TileLayer(url, __spreadProps$m(__spreadValues$y({}, tileLayerOptions), {
17404
+ layer = new TileLayer(url, __spreadProps$n(__spreadValues$z({}, tileLayerOptions), {
17405
17405
  headers: opt.headers,
17406
17406
  withCredentials: opt.withCredentials,
17407
17407
  setViewDelay: opt.setViewDelay
@@ -17424,29 +17424,29 @@ var NgwLeaflet = (function () {
17424
17424
  }
17425
17425
  }
17426
17426
 
17427
- var __defProp$Q = Object.defineProperty;
17428
- var __defProps$l = Object.defineProperties;
17429
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
17430
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
17431
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
17432
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
17433
- var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17434
- var __spreadValues$x = (a, b) => {
17427
+ var __defProp$R = Object.defineProperty;
17428
+ var __defProps$m = Object.defineProperties;
17429
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
17430
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
17431
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
17432
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
17433
+ var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17434
+ var __spreadValues$y = (a, b) => {
17435
17435
  for (var prop in b || (b = {}))
17436
- if (__hasOwnProp$y.call(b, prop))
17437
- __defNormalProp$Q(a, prop, b[prop]);
17438
- if (__getOwnPropSymbols$y)
17439
- for (var prop of __getOwnPropSymbols$y(b)) {
17440
- if (__propIsEnum$y.call(b, prop))
17441
- __defNormalProp$Q(a, prop, b[prop]);
17436
+ if (__hasOwnProp$z.call(b, prop))
17437
+ __defNormalProp$R(a, prop, b[prop]);
17438
+ if (__getOwnPropSymbols$z)
17439
+ for (var prop of __getOwnPropSymbols$z(b)) {
17440
+ if (__propIsEnum$z.call(b, prop))
17441
+ __defNormalProp$R(a, prop, b[prop]);
17442
17442
  }
17443
17443
  return a;
17444
17444
  };
17445
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
17445
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
17446
17446
  class OsmAdapter extends TileAdapter {
17447
17447
  addLayer(options) {
17448
17448
  const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
17449
- return super.addLayer(__spreadProps$l(__spreadValues$x({
17449
+ return super.addLayer(__spreadProps$m(__spreadValues$y({
17450
17450
  name: "OpenStreetMap",
17451
17451
  attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
17452
17452
  }, options), {
@@ -17462,33 +17462,33 @@ var NgwLeaflet = (function () {
17462
17462
  }
17463
17463
  const WmsLayer = makeRemote(WmsLayerBase);
17464
17464
 
17465
- var __defProp$P = Object.defineProperty;
17466
- var __defProps$k = Object.defineProperties;
17467
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
17468
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
17469
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
17470
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
17471
- var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17472
- var __spreadValues$w = (a, b) => {
17465
+ var __defProp$Q = Object.defineProperty;
17466
+ var __defProps$l = Object.defineProperties;
17467
+ var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
17468
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
17469
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
17470
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
17471
+ var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17472
+ var __spreadValues$x = (a, b) => {
17473
17473
  for (var prop in b || (b = {}))
17474
- if (__hasOwnProp$x.call(b, prop))
17475
- __defNormalProp$P(a, prop, b[prop]);
17476
- if (__getOwnPropSymbols$x)
17477
- for (var prop of __getOwnPropSymbols$x(b)) {
17478
- if (__propIsEnum$x.call(b, prop))
17479
- __defNormalProp$P(a, prop, b[prop]);
17474
+ if (__hasOwnProp$y.call(b, prop))
17475
+ __defNormalProp$Q(a, prop, b[prop]);
17476
+ if (__getOwnPropSymbols$y)
17477
+ for (var prop of __getOwnPropSymbols$y(b)) {
17478
+ if (__propIsEnum$y.call(b, prop))
17479
+ __defNormalProp$Q(a, prop, b[prop]);
17480
17480
  }
17481
17481
  return a;
17482
17482
  };
17483
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
17483
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
17484
17484
  var __objRest$6 = (source, exclude) => {
17485
17485
  var target = {};
17486
17486
  for (var prop in source)
17487
- if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
17487
+ if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
17488
17488
  target[prop] = source[prop];
17489
- if (source != null && __getOwnPropSymbols$x)
17490
- for (var prop of __getOwnPropSymbols$x(source)) {
17491
- if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
17489
+ if (source != null && __getOwnPropSymbols$y)
17490
+ for (var prop of __getOwnPropSymbols$y(source)) {
17491
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
17492
17492
  target[prop] = source[prop];
17493
17493
  }
17494
17494
  return target;
@@ -17498,7 +17498,7 @@ var NgwLeaflet = (function () {
17498
17498
  Object.assign(this.options, options);
17499
17499
  const _a = options, { url } = _a, opt = __objRest$6(_a, ["url"]);
17500
17500
  if (url) {
17501
- const layerOptions = __spreadValues$w({
17501
+ const layerOptions = __spreadValues$x({
17502
17502
  pane: this.pane,
17503
17503
  attribution: opt.attribution,
17504
17504
  minZoom: opt.minZoom,
@@ -17509,7 +17509,7 @@ var NgwLeaflet = (function () {
17509
17509
  }, options.nativeOptions);
17510
17510
  let layer;
17511
17511
  if (opt.headers || opt.withCredentials) {
17512
- layer = new WmsLayer(url, __spreadProps$k(__spreadValues$w({}, layerOptions), {
17512
+ layer = new WmsLayer(url, __spreadProps$l(__spreadValues$x({}, layerOptions), {
17513
17513
  headers: opt.headers,
17514
17514
  withCredentials: opt.withCredentials
17515
17515
  }));
@@ -17529,33 +17529,33 @@ var NgwLeaflet = (function () {
17529
17529
  ];
17530
17530
  }
17531
17531
 
17532
- var __defProp$O = Object.defineProperty;
17533
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
17534
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
17535
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
17536
- var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17537
- var __spreadValues$v = (a, b) => {
17532
+ var __defProp$P = Object.defineProperty;
17533
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
17534
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
17535
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
17536
+ var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17537
+ var __spreadValues$w = (a, b) => {
17538
17538
  for (var prop in b || (b = {}))
17539
- if (__hasOwnProp$w.call(b, prop))
17540
- __defNormalProp$O(a, prop, b[prop]);
17541
- if (__getOwnPropSymbols$w)
17542
- for (var prop of __getOwnPropSymbols$w(b)) {
17543
- if (__propIsEnum$w.call(b, prop))
17544
- __defNormalProp$O(a, prop, b[prop]);
17539
+ if (__hasOwnProp$x.call(b, prop))
17540
+ __defNormalProp$P(a, prop, b[prop]);
17541
+ if (__getOwnPropSymbols$x)
17542
+ for (var prop of __getOwnPropSymbols$x(b)) {
17543
+ if (__propIsEnum$x.call(b, prop))
17544
+ __defNormalProp$P(a, prop, b[prop]);
17545
17545
  }
17546
17546
  return a;
17547
17547
  };
17548
- var __publicField$A = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
17548
+ var __publicField$B = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
17549
17549
  const _LeafletMapAdapter = class _LeafletMapAdapter {
17550
17550
  constructor() {
17551
- __publicField$A(this, "options", { target: "map" });
17552
- __publicField$A(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
17553
- __publicField$A(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
17554
- __publicField$A(this, "emitter", new EventEmitter());
17555
- __publicField$A(this, "map");
17556
- __publicField$A(this, "_resizeObserver");
17557
- __publicField$A(this, "_unselectCb", []);
17558
- __publicField$A(this, "_universalEvents", [
17551
+ __publicField$B(this, "options", { target: "map" });
17552
+ __publicField$B(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
17553
+ __publicField$B(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
17554
+ __publicField$B(this, "emitter", new EventEmitter());
17555
+ __publicField$B(this, "map");
17556
+ __publicField$B(this, "_resizeObserver");
17557
+ __publicField$B(this, "_unselectCb", []);
17558
+ __publicField$B(this, "_universalEvents", [
17559
17559
  "move",
17560
17560
  "zoom",
17561
17561
  "zoomend",
@@ -17563,14 +17563,14 @@ var NgwLeaflet = (function () {
17563
17563
  "moveend",
17564
17564
  "movestart"
17565
17565
  ]);
17566
- __publicField$A(this, "_positionEvents", [
17566
+ __publicField$B(this, "_positionEvents", [
17567
17567
  "mousemove",
17568
17568
  "mouseout",
17569
17569
  "mouseover"
17570
17570
  ]);
17571
17571
  }
17572
17572
  create(options) {
17573
- this.options = __spreadValues$v({}, options);
17573
+ this.options = __spreadValues$w({}, options);
17574
17574
  if (this.options.target) {
17575
17575
  const {
17576
17576
  zoom,
@@ -17580,7 +17580,7 @@ var NgwLeaflet = (function () {
17580
17580
  maxBounds: mb,
17581
17581
  mapAdapterOptions
17582
17582
  } = this.options;
17583
- this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$v({
17583
+ this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$w({
17584
17584
  attributionControl: false,
17585
17585
  zoomControl: false,
17586
17586
  maxBounds: mb ? arrayToBoundsExpression(mb) : void 0,
@@ -17863,7 +17863,7 @@ var NgwLeaflet = (function () {
17863
17863
  }
17864
17864
  }
17865
17865
  };
17866
- __publicField$A(_LeafletMapAdapter, "layerAdapters", {
17866
+ __publicField$B(_LeafletMapAdapter, "layerAdapters", {
17867
17867
  GEOJSON: GeoJsonAdapter,
17868
17868
  IMAGE: ImageAdapter,
17869
17869
  TILE: TileAdapter,
@@ -17871,11 +17871,11 @@ var NgwLeaflet = (function () {
17871
17871
  // // MVT: MvtAdapter,
17872
17872
  OSM: OsmAdapter
17873
17873
  });
17874
- __publicField$A(_LeafletMapAdapter, "controlAdapters", {
17874
+ __publicField$B(_LeafletMapAdapter, "controlAdapters", {
17875
17875
  ZOOM: leafletSrcExports.Control.Zoom,
17876
17876
  ATTRIBUTION: AttributionControl
17877
17877
  });
17878
- __publicField$A(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
17878
+ __publicField$B(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
17879
17879
  let LeafletMapAdapter = _LeafletMapAdapter;
17880
17880
 
17881
17881
  const svgPath = {
@@ -17963,23 +17963,23 @@ var NgwLeaflet = (function () {
17963
17963
  });
17964
17964
  }
17965
17965
 
17966
- var __defProp$N = Object.defineProperty;
17967
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
17968
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
17969
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
17970
- var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17971
- var __spreadValues$u = (a, b) => {
17966
+ var __defProp$O = Object.defineProperty;
17967
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
17968
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
17969
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
17970
+ var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17971
+ var __spreadValues$v = (a, b) => {
17972
17972
  for (var prop in b || (b = {}))
17973
- if (__hasOwnProp$v.call(b, prop))
17974
- __defNormalProp$N(a, prop, b[prop]);
17975
- if (__getOwnPropSymbols$v)
17976
- for (var prop of __getOwnPropSymbols$v(b)) {
17977
- if (__propIsEnum$v.call(b, prop))
17978
- __defNormalProp$N(a, prop, b[prop]);
17973
+ if (__hasOwnProp$w.call(b, prop))
17974
+ __defNormalProp$O(a, prop, b[prop]);
17975
+ if (__getOwnPropSymbols$w)
17976
+ for (var prop of __getOwnPropSymbols$w(b)) {
17977
+ if (__propIsEnum$w.call(b, prop))
17978
+ __defNormalProp$O(a, prop, b[prop]);
17979
17979
  }
17980
17980
  return a;
17981
17981
  };
17982
- var __async$u = (__this, __arguments, generator) => {
17982
+ var __async$v = (__this, __arguments, generator) => {
17983
17983
  return new Promise((resolve, reject) => {
17984
17984
  var fulfilled = (value) => {
17985
17985
  try {
@@ -18000,7 +18000,7 @@ var NgwLeaflet = (function () {
18000
18000
  });
18001
18001
  };
18002
18002
  function apiRequest(opt) {
18003
- return __async$u(this, null, function* () {
18003
+ return __async$v(this, null, function* () {
18004
18004
  const { params, name, connector, requestOptions } = opt;
18005
18005
  const apiItems = yield connector.connect();
18006
18006
  let apiItem = apiItems && apiItems[name];
@@ -18038,7 +18038,7 @@ var NgwLeaflet = (function () {
18038
18038
  }
18039
18039
  }
18040
18040
  if (url) {
18041
- return connector.makeQuery(url, params, __spreadValues$u({
18041
+ return connector.makeQuery(url, params, __spreadValues$v({
18042
18042
  cacheName: name
18043
18043
  }, requestOptions));
18044
18044
  } else {
@@ -18050,12 +18050,12 @@ var NgwLeaflet = (function () {
18050
18050
  });
18051
18051
  }
18052
18052
 
18053
- var __defProp$M = Object.defineProperty;
18054
- var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18055
- var __publicField$z = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
18053
+ var __defProp$N = Object.defineProperty;
18054
+ var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18055
+ var __publicField$A = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
18056
18056
  const _Cache = class _Cache {
18057
18057
  constructor(options = {}) {
18058
- __publicField$z(this, "cache", []);
18058
+ __publicField$A(this, "cache", []);
18059
18059
  var _a;
18060
18060
  const namespace = (_a = options.namespace) != null ? _a : "default";
18061
18061
  if (_Cache.instance[namespace]) {
@@ -18186,12 +18186,12 @@ var NgwLeaflet = (function () {
18186
18186
  return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
18187
18187
  }
18188
18188
  };
18189
- __publicField$z(_Cache, "instance", {});
18189
+ __publicField$A(_Cache, "instance", {});
18190
18190
  let Cache = _Cache;
18191
18191
 
18192
18192
  var pkg = {
18193
18193
  name: "@nextgis/ngw-connector",
18194
- version: "3.0.0-alpha.16",
18194
+ version: "3.0.0-alpha.17",
18195
18195
  _priority: 12,
18196
18196
  description: "A lightweight HTTP client optimized for use with NextGIS Web API",
18197
18197
  main: "index.js",
@@ -18200,15 +18200,15 @@ var NgwLeaflet = (function () {
18200
18200
  jsdelivr: "lib/ngw-connector.global.prod.js",
18201
18201
  types: "lib/index.d.ts",
18202
18202
  dependencies: {
18203
- "@nextgis/cache": "^3.0.0-alpha.13",
18204
- "@nextgis/cancelable-promise": "^3.0.0-alpha.13",
18205
- "@nextgis/utils": "^3.0.0-alpha.13",
18203
+ "@nextgis/cache": "^3.0.0-alpha.17",
18204
+ "@nextgis/cancelable-promise": "^3.0.0-alpha.17",
18205
+ "@nextgis/utils": "^3.0.0-alpha.17",
18206
18206
  "@types/events": "^3.0.0",
18207
18207
  events: "*",
18208
18208
  "form-data": "^4.0.0"
18209
18209
  },
18210
18210
  devDependencies: {
18211
- "@nextgis/build-tools": "^3.0.0-alpha.13"
18211
+ "@nextgis/build-tools": "^3.0.0-alpha.17"
18212
18212
  },
18213
18213
  scripts: {
18214
18214
  clean: "rimraf ./lib",
@@ -18255,46 +18255,46 @@ var NgwLeaflet = (function () {
18255
18255
  }
18256
18256
  }
18257
18257
 
18258
- var __defProp$L = Object.defineProperty;
18259
- var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18260
- var __publicField$y = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
18258
+ var __defProp$M = Object.defineProperty;
18259
+ var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18260
+ var __publicField$z = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
18261
18261
  class NgwError extends Error {
18262
18262
  constructor(er) {
18263
18263
  super();
18264
- __publicField$y(this, "name", "NgwError");
18265
- __publicField$y(this, "title");
18266
- __publicField$y(this, "message");
18267
- __publicField$y(this, "detail");
18268
- __publicField$y(this, "exception");
18269
- __publicField$y(this, "status_code");
18270
- __publicField$y(this, "data");
18271
- __publicField$y(this, "guru_meditation");
18264
+ __publicField$z(this, "name", "NgwError");
18265
+ __publicField$z(this, "title");
18266
+ __publicField$z(this, "message");
18267
+ __publicField$z(this, "detail");
18268
+ __publicField$z(this, "exception");
18269
+ __publicField$z(this, "status_code");
18270
+ __publicField$z(this, "data");
18271
+ __publicField$z(this, "guru_meditation");
18272
18272
  Object.assign(this, er);
18273
18273
  Object.setPrototypeOf(this, NgwError.prototype);
18274
18274
  }
18275
18275
  }
18276
18276
 
18277
- var __defProp$K = Object.defineProperty;
18278
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18279
- var __publicField$x = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
18277
+ var __defProp$L = Object.defineProperty;
18278
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18279
+ var __publicField$y = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
18280
18280
  class InsufficientPermissionsError extends NgwError {
18281
18281
  constructor(obj) {
18282
18282
  super(obj);
18283
- __publicField$x(this, "name", "InsufficientPermissionsError");
18284
- __publicField$x(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
18283
+ __publicField$y(this, "name", "InsufficientPermissionsError");
18284
+ __publicField$y(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
18285
18285
  Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
18286
18286
  }
18287
18287
  }
18288
18288
 
18289
- var __defProp$J = Object.defineProperty;
18290
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18291
- var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
18289
+ var __defProp$K = Object.defineProperty;
18290
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18291
+ var __publicField$x = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
18292
18292
  let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
18293
18293
  constructor(obj) {
18294
18294
  super(obj);
18295
- __publicField$w(this, "message", "There is no response from the server or problem connecting to server.");
18296
- __publicField$w(this, "title", "Network error");
18297
- __publicField$w(this, "detail", "Check network connectivity and try again later.");
18295
+ __publicField$x(this, "message", "There is no response from the server or problem connecting to server.");
18296
+ __publicField$x(this, "title", "Network error");
18297
+ __publicField$x(this, "detail", "Check network connectivity and try again later.");
18298
18298
  Object.setPrototypeOf(this, NetworksResponseError.prototype);
18299
18299
  }
18300
18300
  };
@@ -18331,27 +18331,27 @@ var NgwLeaflet = (function () {
18331
18331
  return false;
18332
18332
  }
18333
18333
 
18334
- var __defProp$I = Object.defineProperty;
18335
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18336
- var __publicField$v = (obj, key, value) => __defNormalProp$I(obj, key + "" , value);
18334
+ var __defProp$J = Object.defineProperty;
18335
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18336
+ var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, key + "" , value);
18337
18337
  class NetworkError extends Error {
18338
18338
  constructor(url) {
18339
18339
  super();
18340
- __publicField$v(this, "name", "NetworkError");
18340
+ __publicField$w(this, "name", "NetworkError");
18341
18341
  Object.setPrototypeOf(this, NetworkError.prototype);
18342
18342
  this.message = `Unable to request ${url}.
18343
18343
  Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
18344
18344
  }
18345
18345
  }
18346
18346
 
18347
- var __defProp$H = Object.defineProperty;
18348
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18349
- var __publicField$u = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
18347
+ var __defProp$I = Object.defineProperty;
18348
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18349
+ var __publicField$v = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
18350
18350
  class ResourceNotFoundError extends NgwError {
18351
18351
  constructor(obj) {
18352
18352
  super(obj);
18353
- __publicField$u(this, "name", "ResourceNotFoundError");
18354
- __publicField$u(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
18353
+ __publicField$v(this, "name", "ResourceNotFoundError");
18354
+ __publicField$v(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
18355
18355
  Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
18356
18356
  }
18357
18357
  }
@@ -18368,13 +18368,13 @@ var NgwLeaflet = (function () {
18368
18368
  isError: isError
18369
18369
  });
18370
18370
 
18371
- var __defProp$G = Object.defineProperty;
18372
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18373
- var __publicField$t = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
18371
+ var __defProp$H = Object.defineProperty;
18372
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18373
+ var __publicField$u = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
18374
18374
  class BaseAPIError extends Error {
18375
18375
  constructor(message) {
18376
18376
  super(message || "Something went wrong.");
18377
- __publicField$t(this, "title");
18377
+ __publicField$u(this, "title");
18378
18378
  this.name = "BaseAPIError";
18379
18379
  this.title = "Unknown API error";
18380
18380
  if (Error.captureStackTrace) {
@@ -18386,7 +18386,7 @@ var NgwLeaflet = (function () {
18386
18386
  // prettier-ignore
18387
18387
  constructor(message) {
18388
18388
  super(message || "There is no response from the server or problem connecting to server.");
18389
- __publicField$t(this, "detail");
18389
+ __publicField$u(this, "detail");
18390
18390
  this.title = "Network error";
18391
18391
  this.detail = "Check network connectivity and try again later.";
18392
18392
  }
@@ -18400,8 +18400,8 @@ var NgwLeaflet = (function () {
18400
18400
  class ServerResponseError extends BaseAPIError {
18401
18401
  constructor(data) {
18402
18402
  super(data.message);
18403
- __publicField$t(this, "detail");
18404
- __publicField$t(this, "data");
18403
+ __publicField$u(this, "detail");
18404
+ __publicField$u(this, "data");
18405
18405
  this.title = data.title || this.title;
18406
18406
  this.detail = data.detail || null;
18407
18407
  this.data = data;
@@ -18411,8 +18411,8 @@ var NgwLeaflet = (function () {
18411
18411
  // prettier-ignore
18412
18412
  constructor(message, data = {}) {
18413
18413
  super(message || "Unexpected error while processing long-running request.");
18414
- __publicField$t(this, "title");
18415
- __publicField$t(this, "data");
18414
+ __publicField$u(this, "title");
18415
+ __publicField$u(this, "data");
18416
18416
  this.name = "LunkwillError";
18417
18417
  this.title = "Long-running request error";
18418
18418
  this.data = data;
@@ -18432,35 +18432,35 @@ var NgwLeaflet = (function () {
18432
18432
  }
18433
18433
  }
18434
18434
 
18435
- var __defProp$F = Object.defineProperty;
18436
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
18437
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
18438
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
18439
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18440
- var __spreadValues$t = (a, b) => {
18435
+ var __defProp$G = Object.defineProperty;
18436
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
18437
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
18438
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
18439
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18440
+ var __spreadValues$u = (a, b) => {
18441
18441
  for (var prop in b || (b = {}))
18442
- if (__hasOwnProp$u.call(b, prop))
18443
- __defNormalProp$F(a, prop, b[prop]);
18444
- if (__getOwnPropSymbols$u)
18445
- for (var prop of __getOwnPropSymbols$u(b)) {
18446
- if (__propIsEnum$u.call(b, prop))
18447
- __defNormalProp$F(a, prop, b[prop]);
18442
+ if (__hasOwnProp$v.call(b, prop))
18443
+ __defNormalProp$G(a, prop, b[prop]);
18444
+ if (__getOwnPropSymbols$v)
18445
+ for (var prop of __getOwnPropSymbols$v(b)) {
18446
+ if (__propIsEnum$v.call(b, prop))
18447
+ __defNormalProp$G(a, prop, b[prop]);
18448
18448
  }
18449
18449
  return a;
18450
18450
  };
18451
18451
  var __objRest$5 = (source, exclude) => {
18452
18452
  var target = {};
18453
18453
  for (var prop in source)
18454
- if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
18454
+ if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
18455
18455
  target[prop] = source[prop];
18456
- if (source != null && __getOwnPropSymbols$u)
18457
- for (var prop of __getOwnPropSymbols$u(source)) {
18458
- if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
18456
+ if (source != null && __getOwnPropSymbols$v)
18457
+ for (var prop of __getOwnPropSymbols$v(source)) {
18458
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
18459
18459
  target[prop] = source[prop];
18460
18460
  }
18461
18461
  return target;
18462
18462
  };
18463
- var __async$t = (__this, __arguments, generator) => {
18463
+ var __async$u = (__this, __arguments, generator) => {
18464
18464
  return new Promise((resolve, reject) => {
18465
18465
  var fulfilled = (value) => {
18466
18466
  try {
@@ -18485,7 +18485,7 @@ var NgwLeaflet = (function () {
18485
18485
  return ct !== void 0 && ct !== null && ct.includes("application/vnd.lunkwill.request-summary+json");
18486
18486
  }
18487
18487
  function responseJson(response) {
18488
- return __async$t(this, null, function* () {
18488
+ return __async$u(this, null, function* () {
18489
18489
  try {
18490
18490
  return response.json();
18491
18491
  } catch (e) {
@@ -18494,7 +18494,7 @@ var NgwLeaflet = (function () {
18494
18494
  });
18495
18495
  }
18496
18496
  function lunkwillResponseUrl(lwResp) {
18497
- return __async$t(this, null, function* () {
18497
+ return __async$u(this, null, function* () {
18498
18498
  const lwData = yield responseJson(lwResp);
18499
18499
  let delay = lwData.delay_ms;
18500
18500
  const retry = lwData.retry_ms !== void 0 ? lwData.retry_ms : 2e3;
@@ -18538,7 +18538,7 @@ var NgwLeaflet = (function () {
18538
18538
  });
18539
18539
  }
18540
18540
  function lunkwillFetch(lwRespUrl) {
18541
- return __async$t(this, null, function* () {
18541
+ return __async$u(this, null, function* () {
18542
18542
  try {
18543
18543
  return yield window.fetch(lwRespUrl, { credentials: "same-origin" });
18544
18544
  } catch (e) {
@@ -18586,14 +18586,14 @@ var NgwLeaflet = (function () {
18586
18586
  return path + urlParams;
18587
18587
  }
18588
18588
  function request(path, options, cacheEngine) {
18589
- return __async$t(this, null, function* () {
18589
+ return __async$u(this, null, function* () {
18590
18590
  var _b, _c;
18591
18591
  const defaults = {
18592
18592
  method: "GET",
18593
18593
  credentials: "same-origin",
18594
18594
  headers: {}
18595
18595
  };
18596
- const _a = __spreadValues$t(__spreadValues$t({}, defaults), options), {
18596
+ const _a = __spreadValues$u(__spreadValues$u({}, defaults), options), {
18597
18597
  withCredentials,
18598
18598
  responseType,
18599
18599
  cacheProps,
@@ -18630,7 +18630,7 @@ var NgwLeaflet = (function () {
18630
18630
  opt.headers = headers;
18631
18631
  }
18632
18632
  const url = generateUrl(path, query);
18633
- const makeRequest = () => __async$t(this, null, function* () {
18633
+ const makeRequest = () => __async$u(this, null, function* () {
18634
18634
  let response;
18635
18635
  try {
18636
18636
  response = yield fetch(url, opt);
@@ -18673,7 +18673,7 @@ var NgwLeaflet = (function () {
18673
18673
  if (cacheEngine) {
18674
18674
  if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
18675
18675
  if (cache !== false) {
18676
- const props = cacheProps ? cacheProps : __spreadValues$t({}, objectRemoveEmpty({
18676
+ const props = cacheProps ? cacheProps : __spreadValues$u({}, objectRemoveEmpty({
18677
18677
  withCredentials,
18678
18678
  responseType
18679
18679
  }));
@@ -18693,38 +18693,38 @@ var NgwLeaflet = (function () {
18693
18693
  });
18694
18694
  }
18695
18695
 
18696
- var __defProp$E = Object.defineProperty;
18697
- var __defProps$j = Object.defineProperties;
18698
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
18699
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
18700
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
18701
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
18702
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18703
- var __spreadValues$s = (a, b) => {
18696
+ var __defProp$F = Object.defineProperty;
18697
+ var __defProps$k = Object.defineProperties;
18698
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
18699
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
18700
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
18701
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
18702
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18703
+ var __spreadValues$t = (a, b) => {
18704
18704
  for (var prop in b || (b = {}))
18705
- if (__hasOwnProp$t.call(b, prop))
18706
- __defNormalProp$E(a, prop, b[prop]);
18707
- if (__getOwnPropSymbols$t)
18708
- for (var prop of __getOwnPropSymbols$t(b)) {
18709
- if (__propIsEnum$t.call(b, prop))
18710
- __defNormalProp$E(a, prop, b[prop]);
18705
+ if (__hasOwnProp$u.call(b, prop))
18706
+ __defNormalProp$F(a, prop, b[prop]);
18707
+ if (__getOwnPropSymbols$u)
18708
+ for (var prop of __getOwnPropSymbols$u(b)) {
18709
+ if (__propIsEnum$u.call(b, prop))
18710
+ __defNormalProp$F(a, prop, b[prop]);
18711
18711
  }
18712
18712
  return a;
18713
18713
  };
18714
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
18714
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
18715
18715
  var __objRest$4 = (source, exclude) => {
18716
18716
  var target = {};
18717
18717
  for (var prop in source)
18718
- if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
18718
+ if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
18719
18719
  target[prop] = source[prop];
18720
- if (source != null && __getOwnPropSymbols$t)
18721
- for (var prop of __getOwnPropSymbols$t(source)) {
18722
- if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
18720
+ if (source != null && __getOwnPropSymbols$u)
18721
+ for (var prop of __getOwnPropSymbols$u(source)) {
18722
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
18723
18723
  target[prop] = source[prop];
18724
18724
  }
18725
18725
  return target;
18726
18726
  };
18727
- var __async$s = (__this, __arguments, generator) => {
18727
+ var __async$t = (__this, __arguments, generator) => {
18728
18728
  return new Promise((resolve, reject) => {
18729
18729
  var fulfilled = (value) => {
18730
18730
  try {
@@ -18775,7 +18775,7 @@ var NgwLeaflet = (function () {
18775
18775
  }
18776
18776
  function route(name, connector, ...rest) {
18777
18777
  const result = {
18778
- url: (opt) => __async$s(this, null, function* () {
18778
+ url: (opt) => __async$t(this, null, function* () {
18779
18779
  var _a;
18780
18780
  const routeData = yield connector.connect();
18781
18781
  const template = routeURL(
@@ -18803,10 +18803,10 @@ var NgwLeaflet = (function () {
18803
18803
  routeData,
18804
18804
  ...rest
18805
18805
  );
18806
- const headers = objectRemoveEmpty(__spreadValues$s(__spreadValues$s({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
18806
+ const headers = objectRemoveEmpty(__spreadValues$t(__spreadValues$t({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
18807
18807
  return request(
18808
18808
  template,
18809
- __spreadProps$j(__spreadValues$s({
18809
+ __spreadProps$k(__spreadValues$t({
18810
18810
  headers
18811
18811
  }, restOpt), {
18812
18812
  method
@@ -18930,39 +18930,39 @@ var NgwLeaflet = (function () {
18930
18930
  }
18931
18931
  }
18932
18932
 
18933
- var __defProp$D = Object.defineProperty;
18934
- var __defProps$i = Object.defineProperties;
18935
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
18936
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
18937
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
18938
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
18939
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18940
- var __spreadValues$r = (a, b) => {
18933
+ var __defProp$E = Object.defineProperty;
18934
+ var __defProps$j = Object.defineProperties;
18935
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
18936
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
18937
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
18938
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
18939
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18940
+ var __spreadValues$s = (a, b) => {
18941
18941
  for (var prop in b || (b = {}))
18942
- if (__hasOwnProp$s.call(b, prop))
18943
- __defNormalProp$D(a, prop, b[prop]);
18944
- if (__getOwnPropSymbols$s)
18945
- for (var prop of __getOwnPropSymbols$s(b)) {
18946
- if (__propIsEnum$s.call(b, prop))
18947
- __defNormalProp$D(a, prop, b[prop]);
18942
+ if (__hasOwnProp$t.call(b, prop))
18943
+ __defNormalProp$E(a, prop, b[prop]);
18944
+ if (__getOwnPropSymbols$t)
18945
+ for (var prop of __getOwnPropSymbols$t(b)) {
18946
+ if (__propIsEnum$t.call(b, prop))
18947
+ __defNormalProp$E(a, prop, b[prop]);
18948
18948
  }
18949
18949
  return a;
18950
18950
  };
18951
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
18951
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
18952
18952
  var __objRest$3 = (source, exclude) => {
18953
18953
  var target = {};
18954
18954
  for (var prop in source)
18955
- if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
18955
+ if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
18956
18956
  target[prop] = source[prop];
18957
- if (source != null && __getOwnPropSymbols$s)
18958
- for (var prop of __getOwnPropSymbols$s(source)) {
18959
- if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
18957
+ if (source != null && __getOwnPropSymbols$t)
18958
+ for (var prop of __getOwnPropSymbols$t(source)) {
18959
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
18960
18960
  target[prop] = source[prop];
18961
18961
  }
18962
18962
  return target;
18963
18963
  };
18964
- var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
18965
- var __async$r = (__this, __arguments, generator) => {
18964
+ var __publicField$t = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
18965
+ var __async$s = (__this, __arguments, generator) => {
18966
18966
  return new Promise((resolve, reject) => {
18967
18967
  var fulfilled = (value) => {
18968
18968
  try {
@@ -18987,18 +18987,18 @@ var NgwLeaflet = (function () {
18987
18987
  class NgwConnector {
18988
18988
  constructor(options) {
18989
18989
  this.options = options;
18990
- __publicField$s(this, "id", ID$2++);
18991
- __publicField$s(this, "emitter", new EventEmitter());
18992
- __publicField$s(this, "user");
18993
- __publicField$s(this, "cache");
18994
- __publicField$s(this, "withCredentials");
18990
+ __publicField$t(this, "id", ID$2++);
18991
+ __publicField$t(this, "emitter", new EventEmitter());
18992
+ __publicField$t(this, "user");
18993
+ __publicField$t(this, "cache");
18994
+ __publicField$t(this, "withCredentials");
18995
18995
  // Dedicated cache for route requests, as these are executed before any other requests.
18996
18996
  // This cache does not need to be cleared during the session.
18997
- __publicField$s(this, "routeCache");
18998
- __publicField$s(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18999
- __publicField$s(this, "routeStr", "/api/component/pyramid/route");
19000
- __publicField$s(this, "activeRequests", {});
19001
- __publicField$s(this, "requestTransform");
18997
+ __publicField$t(this, "routeCache");
18998
+ __publicField$t(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18999
+ __publicField$t(this, "routeStr", "/api/component/pyramid/route");
19000
+ __publicField$t(this, "activeRequests", {});
19001
+ __publicField$t(this, "requestTransform");
19002
19002
  const exist = findConnector(options);
19003
19003
  this.cache = new Cache({ namespace: options.cacheId });
19004
19004
  this.routeCache = new Cache({ namespace: "routecache" });
@@ -19051,7 +19051,7 @@ var NgwLeaflet = (function () {
19051
19051
  * ```
19052
19052
  */
19053
19053
  connect() {
19054
- return __async$r(this, arguments, function* ({
19054
+ return __async$s(this, arguments, function* ({
19055
19055
  signal
19056
19056
  } = {}) {
19057
19057
  const auth = this.options.auth;
@@ -19090,14 +19090,14 @@ var NgwLeaflet = (function () {
19090
19090
  this.emitter.emit("logout");
19091
19091
  }
19092
19092
  getUserInfo(credentials, options) {
19093
- return __async$r(this, null, function* () {
19093
+ return __async$s(this, null, function* () {
19094
19094
  if (this.user && this.user.id) {
19095
19095
  return this.user;
19096
19096
  }
19097
19097
  if (credentials) {
19098
19098
  this.options.auth = credentials;
19099
19099
  }
19100
- const options_ = __spreadValues$r({
19100
+ const options_ = __spreadValues$s({
19101
19101
  headers: this.getAuthorizationHeaders(credentials),
19102
19102
  cache: true
19103
19103
  }, options);
@@ -19138,7 +19138,7 @@ var NgwLeaflet = (function () {
19138
19138
  this.activeRequests = {};
19139
19139
  }
19140
19140
  getActiveApiRequests() {
19141
- return __spreadValues$r({}, this.activeRequests);
19141
+ return __spreadValues$s({}, this.activeRequests);
19142
19142
  }
19143
19143
  route(name, ...rest) {
19144
19144
  return route(name, this, ...rest);
@@ -19150,7 +19150,7 @@ var NgwLeaflet = (function () {
19150
19150
  * @param options - Request options
19151
19151
  */
19152
19152
  makeQuery(_0, _1) {
19153
- return __async$r(this, arguments, function* (url, params, options = {}) {
19153
+ return __async$s(this, arguments, function* (url, params, options = {}) {
19154
19154
  var _b;
19155
19155
  url = (this.options.baseUrl ? this.options.baseUrl : "") + url;
19156
19156
  if (!url) {
@@ -19161,7 +19161,7 @@ var NgwLeaflet = (function () {
19161
19161
  url = template(url, restParams);
19162
19162
  }
19163
19163
  url = encodeURI(fixUrlStr(url));
19164
- options = __spreadValues$r({ withCredentials: this.withCredentials }, options);
19164
+ options = __spreadValues$s({ withCredentials: this.withCredentials }, options);
19165
19165
  const {
19166
19166
  cache,
19167
19167
  signal: externalSignal,
@@ -19183,7 +19183,7 @@ var NgwLeaflet = (function () {
19183
19183
  });
19184
19184
  }
19185
19185
  options.signal = internalSignal;
19186
- const createPromise = () => __async$r(this, null, function* () {
19186
+ const createPromise = () => __async$s(this, null, function* () {
19187
19187
  const id = REQUEST_ID++;
19188
19188
  this.activeRequests[id] = internalAbortController;
19189
19189
  try {
@@ -19193,7 +19193,7 @@ var NgwLeaflet = (function () {
19193
19193
  }
19194
19194
  });
19195
19195
  if (method === "GET" && cache !== false) {
19196
- const cacheOptions = cacheProps ? cacheProps : __spreadProps$i(__spreadValues$r({}, objectRemoveEmpty({
19196
+ const cacheOptions = cacheProps ? cacheProps : __spreadProps$j(__spreadValues$s({}, objectRemoveEmpty({
19197
19197
  headers,
19198
19198
  withCredentials,
19199
19199
  responseType,
@@ -19216,7 +19216,7 @@ var NgwLeaflet = (function () {
19216
19216
  var _a;
19217
19217
  if (this.user) {
19218
19218
  options = options || {};
19219
- options.headers = __spreadValues$r(__spreadValues$r({}, this.getAuthorizationHeaders()), options.headers);
19219
+ options.headers = __spreadValues$s(__spreadValues$s({}, this.getAuthorizationHeaders()), options.headers);
19220
19220
  }
19221
19221
  if (this.requestTransform) {
19222
19222
  const [transUrl, transOptions] = this.requestTransform(url, options);
@@ -19247,7 +19247,7 @@ var NgwLeaflet = (function () {
19247
19247
  });
19248
19248
  }
19249
19249
  _login(credentials, options) {
19250
- return __async$r(this, null, function* () {
19250
+ return __async$s(this, null, function* () {
19251
19251
  try {
19252
19252
  const data = yield this.getUserInfo(credentials, options);
19253
19253
  this.user = data;
@@ -19275,7 +19275,7 @@ var NgwLeaflet = (function () {
19275
19275
  return er;
19276
19276
  }
19277
19277
  }
19278
- __publicField$s(NgwConnector, "errors", errors);
19278
+ __publicField$t(NgwConnector, "errors", errors);
19279
19279
 
19280
19280
  function resourceCompare(res1, res2) {
19281
19281
  return objectDeepEqual(res1, res2);
@@ -19305,27 +19305,27 @@ var NgwLeaflet = (function () {
19305
19305
  return query;
19306
19306
  }
19307
19307
 
19308
- var __defProp$C = Object.defineProperty;
19309
- var __defProps$h = Object.defineProperties;
19310
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
19311
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
19312
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
19313
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
19314
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19315
- var __spreadValues$q = (a, b) => {
19308
+ var __defProp$D = Object.defineProperty;
19309
+ var __defProps$i = Object.defineProperties;
19310
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
19311
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
19312
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
19313
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
19314
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19315
+ var __spreadValues$r = (a, b) => {
19316
19316
  for (var prop in b || (b = {}))
19317
- if (__hasOwnProp$r.call(b, prop))
19318
- __defNormalProp$C(a, prop, b[prop]);
19319
- if (__getOwnPropSymbols$r)
19320
- for (var prop of __getOwnPropSymbols$r(b)) {
19321
- if (__propIsEnum$r.call(b, prop))
19322
- __defNormalProp$C(a, prop, b[prop]);
19317
+ if (__hasOwnProp$s.call(b, prop))
19318
+ __defNormalProp$D(a, prop, b[prop]);
19319
+ if (__getOwnPropSymbols$s)
19320
+ for (var prop of __getOwnPropSymbols$s(b)) {
19321
+ if (__propIsEnum$s.call(b, prop))
19322
+ __defNormalProp$D(a, prop, b[prop]);
19323
19323
  }
19324
19324
  return a;
19325
19325
  };
19326
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
19327
- var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
19328
- var __async$q = (__this, __arguments, generator) => {
19326
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
19327
+ var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
19328
+ var __async$r = (__this, __arguments, generator) => {
19329
19329
  return new Promise((resolve, reject) => {
19330
19330
  var fulfilled = (value) => {
19331
19331
  try {
@@ -19350,8 +19350,8 @@ var NgwLeaflet = (function () {
19350
19350
  connector,
19351
19351
  cacheId
19352
19352
  }) {
19353
- __publicField$r(this, "cache");
19354
- __publicField$r(this, "connector");
19353
+ __publicField$s(this, "cache");
19354
+ __publicField$s(this, "connector");
19355
19355
  this.connector = connector;
19356
19356
  this.cache = new Cache({ namespace: cacheId });
19357
19357
  }
@@ -19366,7 +19366,7 @@ var NgwLeaflet = (function () {
19366
19366
  * Fetching resource would be cached to speed up next call
19367
19367
  */
19368
19368
  getOne(resource, requestOptions) {
19369
- const opt = __spreadValues$q({}, requestOptions);
19369
+ const opt = __spreadValues$r({}, requestOptions);
19370
19370
  if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
19371
19371
  if (resource.id !== void 0) {
19372
19372
  resource.id;
@@ -19443,8 +19443,8 @@ var NgwLeaflet = (function () {
19443
19443
  } else {
19444
19444
  Object.assign(query, resourceToQuery(resource));
19445
19445
  }
19446
- return this.connector.route("resource.search").get(__spreadProps$h(__spreadValues$q({}, requestOptions), {
19447
- query: __spreadValues$q({
19446
+ return this.connector.route("resource.search").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
19447
+ query: __spreadValues$r({
19448
19448
  serialization: "full"
19449
19449
  }, query)
19450
19450
  })).then((resources) => {
@@ -19497,7 +19497,7 @@ var NgwLeaflet = (function () {
19497
19497
  });
19498
19498
  }
19499
19499
  _getChildrenOf(_0, _1) {
19500
- return __async$q(this, arguments, function* (parentDef, requestOptions, _items = []) {
19500
+ return __async$r(this, arguments, function* (parentDef, requestOptions, _items = []) {
19501
19501
  let parent = void 0;
19502
19502
  if (typeof parentDef === "string") {
19503
19503
  parent = yield this.getId(parentDef, requestOptions);
@@ -19506,7 +19506,7 @@ var NgwLeaflet = (function () {
19506
19506
  } else {
19507
19507
  parent = parentDef;
19508
19508
  }
19509
- const items = yield this.connector.route("resource.collection").get(__spreadProps$h(__spreadValues$q({}, requestOptions), {
19509
+ const items = yield this.connector.route("resource.collection").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
19510
19510
  query: {
19511
19511
  parent
19512
19512
  }
@@ -19534,7 +19534,7 @@ var NgwLeaflet = (function () {
19534
19534
  });
19535
19535
  }
19536
19536
  _cleanResourceItemCache(id) {
19537
- return __async$q(this, null, function* () {
19537
+ return __async$r(this, null, function* () {
19538
19538
  var _a;
19539
19539
  const all = this.cache.all();
19540
19540
  const toDelete = [];
@@ -19587,13 +19587,13 @@ var NgwLeaflet = (function () {
19587
19587
  }
19588
19588
  }
19589
19589
 
19590
- var __defProp$B = Object.defineProperty;
19591
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19592
- var __publicField$q = (obj, key, value) => __defNormalProp$B(obj, key + "" , value);
19590
+ var __defProp$C = Object.defineProperty;
19591
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19592
+ var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, key + "" , value);
19593
19593
  class NgwConnectorExtended extends NgwConnector {
19594
19594
  constructor(options) {
19595
19595
  super(options);
19596
- __publicField$q(this, "resources");
19596
+ __publicField$r(this, "resources");
19597
19597
  this.resources = new ResourcesControl({
19598
19598
  connector: this,
19599
19599
  cacheId: options.cacheId
@@ -19803,25 +19803,25 @@ var NgwLeaflet = (function () {
19803
19803
  }
19804
19804
  }
19805
19805
 
19806
- var __defProp$A = Object.defineProperty;
19807
- var __defProps$g = Object.defineProperties;
19808
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
19809
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
19810
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
19811
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
19812
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19813
- var __spreadValues$p = (a, b) => {
19806
+ var __defProp$B = Object.defineProperty;
19807
+ var __defProps$h = Object.defineProperties;
19808
+ var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
19809
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
19810
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
19811
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
19812
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19813
+ var __spreadValues$q = (a, b) => {
19814
19814
  for (var prop in b || (b = {}))
19815
- if (__hasOwnProp$q.call(b, prop))
19816
- __defNormalProp$A(a, prop, b[prop]);
19817
- if (__getOwnPropSymbols$q)
19818
- for (var prop of __getOwnPropSymbols$q(b)) {
19819
- if (__propIsEnum$q.call(b, prop))
19820
- __defNormalProp$A(a, prop, b[prop]);
19815
+ if (__hasOwnProp$r.call(b, prop))
19816
+ __defNormalProp$B(a, prop, b[prop]);
19817
+ if (__getOwnPropSymbols$r)
19818
+ for (var prop of __getOwnPropSymbols$r(b)) {
19819
+ if (__propIsEnum$r.call(b, prop))
19820
+ __defNormalProp$B(a, prop, b[prop]);
19821
19821
  }
19822
19822
  return a;
19823
19823
  };
19824
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
19824
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
19825
19825
  function getNgwWebmapExtent(webmap) {
19826
19826
  const bottom = webmap["extent_bottom"];
19827
19827
  const left = webmap["extent_left"];
@@ -19888,14 +19888,14 @@ var NgwLeaflet = (function () {
19888
19888
  if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
19889
19889
  return connector.getResource(resource.parent.id, options).then((res) => {
19890
19890
  if (res) {
19891
- return fetchNgwLayerExtent(__spreadProps$g(__spreadValues$p({}, options), {
19891
+ return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
19892
19892
  resourceId: res.resource.id,
19893
19893
  connector
19894
19894
  }));
19895
19895
  }
19896
19896
  });
19897
19897
  } else {
19898
- return fetchNgwLayerExtent(__spreadProps$g(__spreadValues$p({}, options), {
19898
+ return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
19899
19899
  resourceId: resource.id,
19900
19900
  connector
19901
19901
  }));
@@ -19903,10 +19903,10 @@ var NgwLeaflet = (function () {
19903
19903
  }
19904
19904
  }
19905
19905
 
19906
- var __defProp$z = Object.defineProperty;
19907
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19908
- var __publicField$p = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
19909
- var __async$p = (__this, __arguments, generator) => {
19906
+ var __defProp$A = Object.defineProperty;
19907
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19908
+ var __publicField$q = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
19909
+ var __async$q = (__this, __arguments, generator) => {
19910
19910
  return new Promise((resolve, reject) => {
19911
19911
  var fulfilled = (value) => {
19912
19912
  try {
@@ -19928,18 +19928,18 @@ var NgwLeaflet = (function () {
19928
19928
  };
19929
19929
  class NgwResource {
19930
19930
  constructor() {
19931
- __publicField$p(this, "item");
19932
- __publicField$p(this, "connector");
19933
- __publicField$p(this, "_extent");
19931
+ __publicField$q(this, "item");
19932
+ __publicField$q(this, "connector");
19933
+ __publicField$q(this, "_extent");
19934
19934
  }
19935
19935
  /** @deprecated use {@link NgwResource.getBounds} instead */
19936
19936
  getExtent() {
19937
- return __async$p(this, null, function* () {
19937
+ return __async$q(this, null, function* () {
19938
19938
  return this.getBounds();
19939
19939
  });
19940
19940
  }
19941
19941
  getBounds(options) {
19942
- return __async$p(this, null, function* () {
19942
+ return __async$q(this, null, function* () {
19943
19943
  if (this._extent) {
19944
19944
  return this._extent;
19945
19945
  }
@@ -19955,7 +19955,7 @@ var NgwLeaflet = (function () {
19955
19955
  }
19956
19956
  }
19957
19957
 
19958
- var __async$o = (__this, __arguments, generator) => {
19958
+ var __async$p = (__this, __arguments, generator) => {
19959
19959
  return new Promise((resolve, reject) => {
19960
19960
  var fulfilled = (value) => {
19961
19961
  try {
@@ -19976,7 +19976,7 @@ var NgwLeaflet = (function () {
19976
19976
  });
19977
19977
  };
19978
19978
  function resourceIdFromLayerOptions(options, connector) {
19979
- return __async$o(this, null, function* () {
19979
+ return __async$p(this, null, function* () {
19980
19980
  const resource = options.resource;
19981
19981
  const item = resource;
19982
19982
  let { keyname, resourceId } = options;
@@ -20001,24 +20001,24 @@ var NgwLeaflet = (function () {
20001
20001
  });
20002
20002
  }
20003
20003
 
20004
- var __defProp$y = Object.defineProperty;
20005
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
20006
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
20007
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
20008
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20009
- var __spreadValues$o = (a, b) => {
20004
+ var __defProp$z = Object.defineProperty;
20005
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
20006
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
20007
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
20008
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20009
+ var __spreadValues$p = (a, b) => {
20010
20010
  for (var prop in b || (b = {}))
20011
- if (__hasOwnProp$p.call(b, prop))
20012
- __defNormalProp$y(a, prop, b[prop]);
20013
- if (__getOwnPropSymbols$p)
20014
- for (var prop of __getOwnPropSymbols$p(b)) {
20015
- if (__propIsEnum$p.call(b, prop))
20016
- __defNormalProp$y(a, prop, b[prop]);
20011
+ if (__hasOwnProp$q.call(b, prop))
20012
+ __defNormalProp$z(a, prop, b[prop]);
20013
+ if (__getOwnPropSymbols$q)
20014
+ for (var prop of __getOwnPropSymbols$q(b)) {
20015
+ if (__propIsEnum$q.call(b, prop))
20016
+ __defNormalProp$z(a, prop, b[prop]);
20017
20017
  }
20018
20018
  return a;
20019
20019
  };
20020
- var __publicField$o = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
20021
- var __async$n = (__this, __arguments, generator) => {
20020
+ var __publicField$p = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
20021
+ var __async$o = (__this, __arguments, generator) => {
20022
20022
  return new Promise((resolve, reject) => {
20023
20023
  var fulfilled = (value) => {
20024
20024
  try {
@@ -20039,7 +20039,7 @@ var NgwLeaflet = (function () {
20039
20039
  });
20040
20040
  };
20041
20041
  function createOnFirstShowAdapter(_0) {
20042
- return __async$n(this, arguments, function* ({
20042
+ return __async$o(this, arguments, function* ({
20043
20043
  webMap,
20044
20044
  adapterOptions = {},
20045
20045
  onLayerAdded,
@@ -20047,10 +20047,10 @@ var NgwLeaflet = (function () {
20047
20047
  }) {
20048
20048
  class OnFirstShowAdapter {
20049
20049
  constructor() {
20050
- __publicField$o(this, "options", {});
20051
- __publicField$o(this, "layer", []);
20052
- __publicField$o(this, "_removed", false);
20053
- __publicField$o(this, "_creatingInProgress", false);
20050
+ __publicField$p(this, "options", {});
20051
+ __publicField$p(this, "layer", []);
20052
+ __publicField$p(this, "_removed", false);
20053
+ __publicField$p(this, "_creatingInProgress", false);
20054
20054
  }
20055
20055
  addLayer() {
20056
20056
  return this.layer;
@@ -20065,7 +20065,7 @@ var NgwLeaflet = (function () {
20065
20065
  return this._removed;
20066
20066
  }
20067
20067
  showLayer() {
20068
- return __async$n(this, null, function* () {
20068
+ return __async$o(this, null, function* () {
20069
20069
  this.options.visibility = true;
20070
20070
  if (this.layer.length) {
20071
20071
  for (const x of this.layer) {
@@ -20077,7 +20077,7 @@ var NgwLeaflet = (function () {
20077
20077
  });
20078
20078
  }
20079
20079
  hideLayer() {
20080
- return __async$n(this, null, function* () {
20080
+ return __async$o(this, null, function* () {
20081
20081
  this.options.visibility = false;
20082
20082
  if (this.layer) {
20083
20083
  for (const x of this.layer) {
@@ -20087,12 +20087,12 @@ var NgwLeaflet = (function () {
20087
20087
  });
20088
20088
  }
20089
20089
  loadLayer() {
20090
- return __async$n(this, null, function* () {
20090
+ return __async$o(this, null, function* () {
20091
20091
  if (!this.layer.length && !this._creatingInProgress) {
20092
20092
  this._creatingInProgress = true;
20093
20093
  const Adapter = yield createAdapter(this);
20094
20094
  if (Adapter) {
20095
- const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$o({}, adapterOptions));
20095
+ const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$p({}, adapterOptions));
20096
20096
  const realLayer = yield adapter.addLayer({
20097
20097
  order: this.options.order,
20098
20098
  headers: this.options.headers,
@@ -20121,7 +20121,7 @@ var NgwLeaflet = (function () {
20121
20121
  });
20122
20122
  }
20123
20123
 
20124
- var __async$m = (__this, __arguments, generator) => {
20124
+ var __async$n = (__this, __arguments, generator) => {
20125
20125
  return new Promise((resolve, reject) => {
20126
20126
  var fulfilled = (value) => {
20127
20127
  try {
@@ -20142,7 +20142,7 @@ var NgwLeaflet = (function () {
20142
20142
  });
20143
20143
  };
20144
20144
  function createOnFirstShowNgwAdapter(_0) {
20145
- return __async$m(this, arguments, function* ({
20145
+ return __async$n(this, arguments, function* ({
20146
20146
  webMap,
20147
20147
  connector,
20148
20148
  item,
@@ -20180,26 +20180,26 @@ var NgwLeaflet = (function () {
20180
20180
  defaultRequestLimit: 7e3
20181
20181
  };
20182
20182
 
20183
- var __defProp$x = Object.defineProperty;
20184
- var __defProps$f = Object.defineProperties;
20185
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
20186
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
20187
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
20188
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
20189
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20190
- var __spreadValues$n = (a, b) => {
20183
+ var __defProp$y = Object.defineProperty;
20184
+ var __defProps$g = Object.defineProperties;
20185
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
20186
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
20187
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
20188
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
20189
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20190
+ var __spreadValues$o = (a, b) => {
20191
20191
  for (var prop in b || (b = {}))
20192
- if (__hasOwnProp$o.call(b, prop))
20193
- __defNormalProp$x(a, prop, b[prop]);
20194
- if (__getOwnPropSymbols$o)
20195
- for (var prop of __getOwnPropSymbols$o(b)) {
20196
- if (__propIsEnum$o.call(b, prop))
20197
- __defNormalProp$x(a, prop, b[prop]);
20192
+ if (__hasOwnProp$p.call(b, prop))
20193
+ __defNormalProp$y(a, prop, b[prop]);
20194
+ if (__getOwnPropSymbols$p)
20195
+ for (var prop of __getOwnPropSymbols$p(b)) {
20196
+ if (__propIsEnum$p.call(b, prop))
20197
+ __defNormalProp$y(a, prop, b[prop]);
20198
20198
  }
20199
20199
  return a;
20200
20200
  };
20201
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
20202
- var __async$l = (__this, __arguments, generator) => {
20201
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
20202
+ var __async$m = (__this, __arguments, generator) => {
20203
20203
  return new Promise((resolve, reject) => {
20204
20204
  var fulfilled = (value) => {
20205
20205
  try {
@@ -20266,7 +20266,7 @@ var NgwLeaflet = (function () {
20266
20266
  );
20267
20267
  }
20268
20268
  function createFeatureFieldFilterQueries(opt) {
20269
- return __async$l(this, null, function* () {
20269
+ return __async$m(this, null, function* () {
20270
20270
  const queries = getQueries(opt);
20271
20271
  const itemsParts = yield Promise.all(queries);
20272
20272
  const ids = [];
@@ -20310,13 +20310,13 @@ var NgwLeaflet = (function () {
20310
20310
  for (const f of filters_) {
20311
20311
  if (isPropertyFilter(f)) {
20312
20312
  _queries.push(
20313
- fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$n({}, opt), {
20313
+ fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
20314
20314
  paramList: [..._parentAllParams, ...paramList, createParam(f)]
20315
20315
  }))
20316
20316
  );
20317
20317
  } else {
20318
20318
  getQueries(
20319
- __spreadProps$f(__spreadValues$n({}, opt), {
20319
+ __spreadProps$g(__spreadValues$o({}, opt), {
20320
20320
  filters: f
20321
20321
  }),
20322
20322
  _queries,
@@ -20337,7 +20337,7 @@ var NgwLeaflet = (function () {
20337
20337
  if (propertiesFilterList.length) {
20338
20338
  for (const x of propertiesFilterList) {
20339
20339
  getQueries(
20340
- __spreadProps$f(__spreadValues$n({}, opt), {
20340
+ __spreadProps$g(__spreadValues$o({}, opt), {
20341
20341
  filters: x
20342
20342
  }),
20343
20343
  _queries,
@@ -20346,7 +20346,7 @@ var NgwLeaflet = (function () {
20346
20346
  }
20347
20347
  } else {
20348
20348
  _queries.push(
20349
- fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$n({}, opt), {
20349
+ fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
20350
20350
  paramList: [..._parentAllParams, ...paramList, ...filters2]
20351
20351
  }))
20352
20352
  );
@@ -20362,7 +20362,7 @@ var NgwLeaflet = (function () {
20362
20362
  return `POLYGON((${polygon.join(", ")}))`;
20363
20363
  }
20364
20364
  function fetchNgwLayerItemsRequest(options) {
20365
- const params = __spreadValues$n({}, FEATURE_REQUEST_PARAMS);
20365
+ const params = __spreadValues$o({}, FEATURE_REQUEST_PARAMS);
20366
20366
  const {
20367
20367
  limit,
20368
20368
  query,
@@ -20400,7 +20400,7 @@ var NgwLeaflet = (function () {
20400
20400
  if (paramList) {
20401
20401
  Object.assign(params, paramListToQuery(paramList));
20402
20402
  }
20403
- return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$n(__spreadValues$n({}, params), query), cache, signal });
20403
+ return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$o(__spreadValues$o({}, params), query), cache, signal });
20404
20404
  }
20405
20405
 
20406
20406
  function prepareNgwFieldsToPropertiesFilter(fields) {
@@ -20429,26 +20429,26 @@ var NgwLeaflet = (function () {
20429
20429
  return fields;
20430
20430
  }
20431
20431
 
20432
- var __defProp$w = Object.defineProperty;
20433
- var __defProps$e = Object.defineProperties;
20434
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
20435
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
20436
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
20437
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
20438
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20439
- var __spreadValues$m = (a, b) => {
20432
+ var __defProp$x = Object.defineProperty;
20433
+ var __defProps$f = Object.defineProperties;
20434
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
20435
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
20436
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
20437
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
20438
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20439
+ var __spreadValues$n = (a, b) => {
20440
20440
  for (var prop in b || (b = {}))
20441
- if (__hasOwnProp$n.call(b, prop))
20442
- __defNormalProp$w(a, prop, b[prop]);
20443
- if (__getOwnPropSymbols$n)
20444
- for (var prop of __getOwnPropSymbols$n(b)) {
20445
- if (__propIsEnum$n.call(b, prop))
20446
- __defNormalProp$w(a, prop, b[prop]);
20441
+ if (__hasOwnProp$o.call(b, prop))
20442
+ __defNormalProp$x(a, prop, b[prop]);
20443
+ if (__getOwnPropSymbols$o)
20444
+ for (var prop of __getOwnPropSymbols$o(b)) {
20445
+ if (__propIsEnum$o.call(b, prop))
20446
+ __defNormalProp$x(a, prop, b[prop]);
20447
20447
  }
20448
20448
  return a;
20449
20449
  };
20450
- var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
20451
- var __async$k = (__this, __arguments, generator) => {
20450
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
20451
+ var __async$l = (__this, __arguments, generator) => {
20452
20452
  return new Promise((resolve, reject) => {
20453
20453
  var fulfilled = (value) => {
20454
20454
  try {
@@ -20469,17 +20469,17 @@ var NgwLeaflet = (function () {
20469
20469
  });
20470
20470
  };
20471
20471
  function fetchNgwLayerItems(options) {
20472
- return __async$k(this, null, function* () {
20472
+ return __async$l(this, null, function* () {
20473
20473
  var _a;
20474
20474
  const filters = options.filters;
20475
20475
  if (filters) {
20476
- let data = yield createFeatureFieldFilterQueries(__spreadProps$e(__spreadValues$m({}, options), {
20476
+ let data = yield createFeatureFieldFilterQueries(__spreadProps$f(__spreadValues$n({}, options), {
20477
20477
  filters
20478
20478
  }));
20479
20479
  const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
20480
20480
  if (clientFilterValidate) {
20481
20481
  data = data.filter((y) => {
20482
- const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$e(__spreadValues$m({}, y.fields), {
20482
+ const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$f(__spreadValues$n({}, y.fields), {
20483
20483
  id: y.id
20484
20484
  }));
20485
20485
  const result = propertiesFilter(fields, filters);
@@ -20597,26 +20597,26 @@ var NgwLeaflet = (function () {
20597
20597
  }
20598
20598
  }
20599
20599
 
20600
- var __defProp$v = Object.defineProperty;
20601
- var __defProps$d = Object.defineProperties;
20602
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
20603
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
20604
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
20605
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
20606
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20607
- var __spreadValues$l = (a, b) => {
20600
+ var __defProp$w = Object.defineProperty;
20601
+ var __defProps$e = Object.defineProperties;
20602
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
20603
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
20604
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
20605
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
20606
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20607
+ var __spreadValues$m = (a, b) => {
20608
20608
  for (var prop in b || (b = {}))
20609
- if (__hasOwnProp$m.call(b, prop))
20610
- __defNormalProp$v(a, prop, b[prop]);
20611
- if (__getOwnPropSymbols$m)
20612
- for (var prop of __getOwnPropSymbols$m(b)) {
20613
- if (__propIsEnum$m.call(b, prop))
20614
- __defNormalProp$v(a, prop, b[prop]);
20609
+ if (__hasOwnProp$n.call(b, prop))
20610
+ __defNormalProp$w(a, prop, b[prop]);
20611
+ if (__getOwnPropSymbols$n)
20612
+ for (var prop of __getOwnPropSymbols$n(b)) {
20613
+ if (__propIsEnum$n.call(b, prop))
20614
+ __defNormalProp$w(a, prop, b[prop]);
20615
20615
  }
20616
20616
  return a;
20617
20617
  };
20618
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
20619
- var __async$j = (__this, __arguments, generator) => {
20618
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
20619
+ var __async$k = (__this, __arguments, generator) => {
20620
20620
  return new Promise((resolve, reject) => {
20621
20621
  var fulfilled = (value) => {
20622
20622
  try {
@@ -20637,56 +20637,56 @@ var NgwLeaflet = (function () {
20637
20637
  });
20638
20638
  };
20639
20639
  function fetchNgwLayerItem(options) {
20640
- return __async$j(this, null, function* () {
20641
- const params = __spreadValues$l({}, FEATURE_REQUEST_PARAMS);
20640
+ return __async$k(this, null, function* () {
20641
+ const params = __spreadValues$m({}, FEATURE_REQUEST_PARAMS);
20642
20642
  updateItemRequestParam(params, options);
20643
20643
  const resp = yield options.connector.route("feature_layer.feature.item", {
20644
20644
  id: Number(options.resourceId),
20645
20645
  fid: options.featureId
20646
- }).get(__spreadProps$d(__spreadValues$l({}, options), { query: params }));
20647
- const toGeojson = () => __async$j(this, null, function* () {
20646
+ }).get(__spreadProps$e(__spreadValues$m({}, options), { query: params }));
20647
+ const toGeojson = () => __async$k(this, null, function* () {
20648
20648
  if (resp.geom) {
20649
20649
  return createGeoJsonFeature(resp);
20650
20650
  } else {
20651
- const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$d(__spreadValues$l({}, options), {
20651
+ const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$m({}, options), {
20652
20652
  geom: true,
20653
20653
  fields: null,
20654
20654
  extensions: null
20655
20655
  }));
20656
20656
  const geom = onlyGeomItem.geom;
20657
- return createGeoJsonFeature(__spreadProps$d(__spreadValues$l({}, resp), { geom }));
20657
+ return createGeoJsonFeature(__spreadProps$e(__spreadValues$m({}, resp), { geom }));
20658
20658
  }
20659
20659
  });
20660
- return __spreadProps$d(__spreadValues$l({}, resp), {
20660
+ return __spreadProps$e(__spreadValues$m({}, resp), {
20661
20661
  toGeojson
20662
20662
  });
20663
20663
  });
20664
20664
  }
20665
20665
 
20666
- var __defProp$u = Object.defineProperty;
20667
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
20668
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
20669
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
20670
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20671
- var __spreadValues$k = (a, b) => {
20666
+ var __defProp$v = Object.defineProperty;
20667
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
20668
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
20669
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
20670
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20671
+ var __spreadValues$l = (a, b) => {
20672
20672
  for (var prop in b || (b = {}))
20673
- if (__hasOwnProp$l.call(b, prop))
20674
- __defNormalProp$u(a, prop, b[prop]);
20675
- if (__getOwnPropSymbols$l)
20676
- for (var prop of __getOwnPropSymbols$l(b)) {
20677
- if (__propIsEnum$l.call(b, prop))
20678
- __defNormalProp$u(a, prop, b[prop]);
20673
+ if (__hasOwnProp$m.call(b, prop))
20674
+ __defNormalProp$v(a, prop, b[prop]);
20675
+ if (__getOwnPropSymbols$m)
20676
+ for (var prop of __getOwnPropSymbols$m(b)) {
20677
+ if (__propIsEnum$m.call(b, prop))
20678
+ __defNormalProp$v(a, prop, b[prop]);
20679
20679
  }
20680
20680
  return a;
20681
20681
  };
20682
- var __publicField$n = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
20682
+ var __publicField$o = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
20683
20683
  class BookmarkItem {
20684
20684
  constructor(options) {
20685
20685
  this.options = options;
20686
- __publicField$n(this, "name");
20687
- __publicField$n(this, "resourceId");
20688
- __publicField$n(this, "item");
20689
- __publicField$n(this, "_extent");
20686
+ __publicField$o(this, "name");
20687
+ __publicField$o(this, "resourceId");
20688
+ __publicField$o(this, "item");
20689
+ __publicField$o(this, "_extent");
20690
20690
  this.resourceId = options.resourceId;
20691
20691
  const item = options.item;
20692
20692
  this.item = item;
@@ -20716,7 +20716,7 @@ var NgwLeaflet = (function () {
20716
20716
  if (this.item.geom) {
20717
20717
  return Promise.resolve(createGeoJsonFeature(this.item));
20718
20718
  } else {
20719
- return fetchNgwLayerItem(__spreadValues$k({
20719
+ return fetchNgwLayerItem(__spreadValues$l({
20720
20720
  resourceId: this.resourceId,
20721
20721
  featureId: this.item.id,
20722
20722
  connector: this.options.connector,
@@ -20734,19 +20734,19 @@ var NgwLeaflet = (function () {
20734
20734
 
20735
20735
  const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
20736
20736
 
20737
- var __defProp$t = Object.defineProperty;
20738
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20739
- var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
20737
+ var __defProp$u = Object.defineProperty;
20738
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20739
+ var __publicField$n = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
20740
20740
  class BaseProperty {
20741
20741
  constructor(name, item, options) {
20742
- __publicField$m(this, "options");
20743
- __publicField$m(this, "emitter", new EventEmitter());
20744
- __publicField$m(this, "name");
20745
- __publicField$m(this, "item");
20746
- __publicField$m(this, "_blocked", false);
20747
- __publicField$m(this, "_container");
20748
- __publicField$m(this, "_value");
20749
- __publicField$m(this, "_removeEventsListener");
20742
+ __publicField$n(this, "options");
20743
+ __publicField$n(this, "emitter", new EventEmitter());
20744
+ __publicField$n(this, "name");
20745
+ __publicField$n(this, "item");
20746
+ __publicField$n(this, "_blocked", false);
20747
+ __publicField$n(this, "_container");
20748
+ __publicField$n(this, "_value");
20749
+ __publicField$n(this, "_removeEventsListener");
20750
20750
  this.item = item;
20751
20751
  this.options = Object.assign({}, options);
20752
20752
  this.name = name;
@@ -20841,28 +20841,28 @@ var NgwLeaflet = (function () {
20841
20841
  });
20842
20842
  return isBlocked;
20843
20843
  }
20844
- }
20845
-
20846
- var __defProp$s = Object.defineProperty;
20847
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
20848
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
20849
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
20850
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20851
- var __spreadValues$j = (a, b) => {
20844
+ }
20845
+
20846
+ var __defProp$t = Object.defineProperty;
20847
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
20848
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
20849
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
20850
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20851
+ var __spreadValues$k = (a, b) => {
20852
20852
  for (var prop in b || (b = {}))
20853
- if (__hasOwnProp$k.call(b, prop))
20854
- __defNormalProp$s(a, prop, b[prop]);
20855
- if (__getOwnPropSymbols$k)
20856
- for (var prop of __getOwnPropSymbols$k(b)) {
20857
- if (__propIsEnum$k.call(b, prop))
20858
- __defNormalProp$s(a, prop, b[prop]);
20853
+ if (__hasOwnProp$l.call(b, prop))
20854
+ __defNormalProp$t(a, prop, b[prop]);
20855
+ if (__getOwnPropSymbols$l)
20856
+ for (var prop of __getOwnPropSymbols$l(b)) {
20857
+ if (__propIsEnum$l.call(b, prop))
20858
+ __defNormalProp$t(a, prop, b[prop]);
20859
20859
  }
20860
20860
  return a;
20861
20861
  };
20862
- var __publicField$l = (obj, key, value) => __defNormalProp$s(obj, key + "" , value);
20862
+ var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, key + "" , value);
20863
20863
  const _CheckProperty = class _CheckProperty extends BaseProperty {
20864
20864
  constructor(name, item, options) {
20865
- super(name, item, __spreadValues$j(__spreadValues$j({}, _CheckProperty.options), options));
20865
+ super(name, item, __spreadValues$k(__spreadValues$k({}, _CheckProperty.options), options));
20866
20866
  this.set(this.get());
20867
20867
  }
20868
20868
  update(value, options) {
@@ -20958,7 +20958,7 @@ var NgwLeaflet = (function () {
20958
20958
  const child = children[fry];
20959
20959
  const property = child.properties && child.properties.property(this.name);
20960
20960
  if (property) {
20961
- property.set(value, __spreadValues$j(__spreadValues$j({}, options), {
20961
+ property.set(value, __spreadValues$k(__spreadValues$k({}, options), {
20962
20962
  propagation: true,
20963
20963
  bubble: false
20964
20964
  }));
@@ -20967,7 +20967,7 @@ var NgwLeaflet = (function () {
20967
20967
  }
20968
20968
  }
20969
20969
  };
20970
- __publicField$l(_CheckProperty, "options", {
20970
+ __publicField$m(_CheckProperty, "options", {
20971
20971
  hierarchy: true,
20972
20972
  bubble: false,
20973
20973
  propagation: false,
@@ -20976,31 +20976,31 @@ var NgwLeaflet = (function () {
20976
20976
  });
20977
20977
  let CheckProperty = _CheckProperty;
20978
20978
 
20979
- var __defProp$r = Object.defineProperty;
20980
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
20981
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
20982
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
20983
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20984
- var __spreadValues$i = (a, b) => {
20979
+ var __defProp$s = Object.defineProperty;
20980
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
20981
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
20982
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
20983
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20984
+ var __spreadValues$j = (a, b) => {
20985
20985
  for (var prop in b || (b = {}))
20986
- if (__hasOwnProp$j.call(b, prop))
20987
- __defNormalProp$r(a, prop, b[prop]);
20988
- if (__getOwnPropSymbols$j)
20989
- for (var prop of __getOwnPropSymbols$j(b)) {
20990
- if (__propIsEnum$j.call(b, prop))
20991
- __defNormalProp$r(a, prop, b[prop]);
20986
+ if (__hasOwnProp$k.call(b, prop))
20987
+ __defNormalProp$s(a, prop, b[prop]);
20988
+ if (__getOwnPropSymbols$k)
20989
+ for (var prop of __getOwnPropSymbols$k(b)) {
20990
+ if (__propIsEnum$k.call(b, prop))
20991
+ __defNormalProp$s(a, prop, b[prop]);
20992
20992
  }
20993
20993
  return a;
20994
20994
  };
20995
- var __publicField$k = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
20995
+ var __publicField$l = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
20996
20996
  const BOOLEAN_TYPE = "boolean";
20997
20997
  const STRING_TYPE = "string";
20998
20998
  const _ItemProperties = class _ItemProperties {
20999
20999
  constructor(item, propertiesList) {
21000
21000
  this.item = item;
21001
- __publicField$k(this, "options", {});
21002
- __publicField$k(this, "_properties", {});
21003
- __publicField$k(this, "_propertiesList", []);
21001
+ __publicField$l(this, "options", {});
21002
+ __publicField$l(this, "_properties", {});
21003
+ __publicField$l(this, "_propertiesList", []);
21004
21004
  if (propertiesList) {
21005
21005
  propertiesList.forEach(this._setPropertyHandler.bind(this));
21006
21006
  }
@@ -21040,7 +21040,7 @@ var NgwLeaflet = (function () {
21040
21040
  _setPropertyHandler(propOpt) {
21041
21041
  const Handler = this._getHandler(propOpt);
21042
21042
  if (Handler && propOpt.name) {
21043
- const options = __spreadValues$i({}, propOpt);
21043
+ const options = __spreadValues$j({}, propOpt);
21044
21044
  this._properties[propOpt.name] = new Handler(
21045
21045
  propOpt.name,
21046
21046
  this.item,
@@ -21063,7 +21063,7 @@ var NgwLeaflet = (function () {
21063
21063
  return Handler;
21064
21064
  }
21065
21065
  };
21066
- __publicField$k(_ItemProperties, "handlers", {
21066
+ __publicField$l(_ItemProperties, "handlers", {
21067
21067
  CheckProperty
21068
21068
  });
21069
21069
  let ItemProperties = _ItemProperties;
@@ -21170,14 +21170,14 @@ var NgwLeaflet = (function () {
21170
21170
  return true;
21171
21171
  }
21172
21172
 
21173
- var __defProp$q = Object.defineProperty;
21174
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21175
- var __publicField$j = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
21173
+ var __defProp$r = Object.defineProperty;
21174
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21175
+ var __publicField$k = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
21176
21176
  class TreeHelper {
21177
21177
  constructor(item) {
21178
- __publicField$j(this, "item");
21179
- __publicField$j(this, "_children", []);
21180
- __publicField$j(this, "_parent");
21178
+ __publicField$k(this, "item");
21179
+ __publicField$k(this, "_children", []);
21180
+ __publicField$k(this, "_parent");
21181
21181
  this.item = item;
21182
21182
  }
21183
21183
  setParent(parent) {
@@ -21240,32 +21240,32 @@ var NgwLeaflet = (function () {
21240
21240
  }
21241
21241
  }
21242
21242
 
21243
- var __defProp$p = Object.defineProperty;
21244
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
21245
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
21246
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
21247
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21248
- var __spreadValues$h = (a, b) => {
21243
+ var __defProp$q = Object.defineProperty;
21244
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
21245
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
21246
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
21247
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21248
+ var __spreadValues$i = (a, b) => {
21249
21249
  for (var prop in b || (b = {}))
21250
- if (__hasOwnProp$i.call(b, prop))
21251
- __defNormalProp$p(a, prop, b[prop]);
21252
- if (__getOwnPropSymbols$i)
21253
- for (var prop of __getOwnPropSymbols$i(b)) {
21254
- if (__propIsEnum$i.call(b, prop))
21255
- __defNormalProp$p(a, prop, b[prop]);
21250
+ if (__hasOwnProp$j.call(b, prop))
21251
+ __defNormalProp$q(a, prop, b[prop]);
21252
+ if (__getOwnPropSymbols$j)
21253
+ for (var prop of __getOwnPropSymbols$j(b)) {
21254
+ if (__propIsEnum$j.call(b, prop))
21255
+ __defNormalProp$q(a, prop, b[prop]);
21256
21256
  }
21257
21257
  return a;
21258
21258
  };
21259
- var __publicField$i = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
21259
+ var __publicField$j = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
21260
21260
  let ID$1 = 0;
21261
21261
  class Item {
21262
21262
  constructor(options) {
21263
- __publicField$i(this, "options", {});
21264
- __publicField$i(this, "properties");
21265
- __publicField$i(this, "tree");
21266
- __publicField$i(this, "id", ID$1);
21263
+ __publicField$j(this, "options", {});
21264
+ __publicField$j(this, "properties");
21265
+ __publicField$j(this, "tree");
21266
+ __publicField$j(this, "id", ID$1);
21267
21267
  ID$1 += 1;
21268
- this.options = __spreadValues$h({}, options);
21268
+ this.options = __spreadValues$i({}, options);
21269
21269
  this.tree = new TreeHelper(this);
21270
21270
  }
21271
21271
  initProperties() {
@@ -21317,6 +21317,161 @@ var NgwLeaflet = (function () {
21317
21317
  }
21318
21318
  }
21319
21319
 
21320
+ var __defProp$p = Object.defineProperty;
21321
+ var __defProps$d = Object.defineProperties;
21322
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
21323
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
21324
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
21325
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
21326
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21327
+ var __spreadValues$h = (a, b) => {
21328
+ for (var prop in b || (b = {}))
21329
+ if (__hasOwnProp$i.call(b, prop))
21330
+ __defNormalProp$p(a, prop, b[prop]);
21331
+ if (__getOwnPropSymbols$i)
21332
+ for (var prop of __getOwnPropSymbols$i(b)) {
21333
+ if (__propIsEnum$i.call(b, prop))
21334
+ __defNormalProp$p(a, prop, b[prop]);
21335
+ }
21336
+ return a;
21337
+ };
21338
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
21339
+ var __publicField$i = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
21340
+ var __async$j = (__this, __arguments, generator) => {
21341
+ return new Promise((resolve, reject) => {
21342
+ var fulfilled = (value) => {
21343
+ try {
21344
+ step(generator.next(value));
21345
+ } catch (e) {
21346
+ reject(e);
21347
+ }
21348
+ };
21349
+ var rejected = (value) => {
21350
+ try {
21351
+ step(generator.throw(value));
21352
+ } catch (e) {
21353
+ reject(e);
21354
+ }
21355
+ };
21356
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
21357
+ step((generator = generator.apply(__this, __arguments)).next());
21358
+ });
21359
+ };
21360
+ class Legend {
21361
+ constructor({
21362
+ legendSymbols,
21363
+ resourceId,
21364
+ connector,
21365
+ layerId,
21366
+ legend,
21367
+ webMap,
21368
+ layer,
21369
+ onSymbolRenderChange
21370
+ }) {
21371
+ __publicField$i(this, "layerId");
21372
+ __publicField$i(this, "layer");
21373
+ __publicField$i(this, "resourceId");
21374
+ __publicField$i(this, "legendSymbols", "expand");
21375
+ __publicField$i(this, "legend");
21376
+ // private blocked: boolean = false;
21377
+ __publicField$i(this, "layerVisibility", true);
21378
+ // private symbolRenderIndexes?: number[];
21379
+ __publicField$i(this, "onSymbolRenderChange");
21380
+ __publicField$i(this, "webMap");
21381
+ __publicField$i(this, "connector");
21382
+ if (legendSymbols) {
21383
+ this.legendSymbols = legendSymbols;
21384
+ }
21385
+ this.connector = connector;
21386
+ this.layer = layer;
21387
+ this.layerId = layerId;
21388
+ this.legend = this.createLegend(legend);
21389
+ this.resourceId = resourceId;
21390
+ this.webMap = webMap;
21391
+ this.onSymbolRenderChange = onSymbolRenderChange;
21392
+ }
21393
+ attachLayer(layer) {
21394
+ this.layerId = String(layer.id);
21395
+ this.layer = layer;
21396
+ }
21397
+ create(options) {
21398
+ return __async$j(this, null, function* () {
21399
+ if (this.connector) {
21400
+ const ngwLegend = yield this.connector.route("render.legend_symbols", {
21401
+ id: this.resourceId
21402
+ }).get(__spreadValues$h({}, options));
21403
+ return this.createLegend(ngwLegend);
21404
+ }
21405
+ });
21406
+ }
21407
+ createLegend(items) {
21408
+ return items.map((params) => __spreadProps$d(__spreadValues$h({}, params), {
21409
+ /** @deprecated use display_name instead */
21410
+ name: params.display_name,
21411
+ /** @deprecated use icon instead */
21412
+ symbol: params.icon
21413
+ }));
21414
+ }
21415
+ setSymbolRender(symbolIndex, status) {
21416
+ const legendItem = this.legend.find((l) => l.index === symbolIndex);
21417
+ if (legendItem) {
21418
+ const render = legendItem.render;
21419
+ if (render !== status) {
21420
+ legendItem.render = status;
21421
+ const newSymbols = this.legend.filter((l) => l.render).map((l) => l.index);
21422
+ this.setLegendSymbol(newSymbols);
21423
+ if (this.onSymbolRenderChange) {
21424
+ this.onSymbolRenderChange(newSymbols);
21425
+ }
21426
+ }
21427
+ }
21428
+ }
21429
+ setLegendSymbol(symbolRenderIndexes) {
21430
+ const intervals = this._consolidateIntervals(symbolRenderIndexes);
21431
+ if (!intervals.length) {
21432
+ this._hideLayer();
21433
+ }
21434
+ if (this.layer.updateLayer) {
21435
+ this.layer.updateLayer({
21436
+ params: {
21437
+ [`symbols[${this.resourceId}]`]: intervals.join(",") || void 0
21438
+ }
21439
+ });
21440
+ }
21441
+ if (intervals.length) {
21442
+ this._showLayer();
21443
+ }
21444
+ }
21445
+ _hideLayer() {
21446
+ if (this.layer.options.id) {
21447
+ this.webMap.mapAdapter.hideLayer(this.layer.layer);
21448
+ }
21449
+ }
21450
+ _showLayer() {
21451
+ if (this.layer.options.id) {
21452
+ if (this.layerVisibility) {
21453
+ this.webMap.showLayer(this.layer.options.id, { silent: true });
21454
+ }
21455
+ }
21456
+ }
21457
+ _consolidateIntervals(symbols) {
21458
+ const sortedSymbols = symbols.slice().sort((a, b) => a - b);
21459
+ const intervals = [];
21460
+ let start = sortedSymbols[0];
21461
+ let end = start;
21462
+ for (let i = 1; i <= sortedSymbols.length; i++) {
21463
+ if (sortedSymbols[i] === end + 1) {
21464
+ end = sortedSymbols[i];
21465
+ } else {
21466
+ intervals.push(start === end ? `${start}` : `${start}-${end}`);
21467
+ start = sortedSymbols[i];
21468
+ end = start;
21469
+ }
21470
+ }
21471
+ return intervals;
21472
+ }
21473
+ }
21474
+
21320
21475
  var __defProp$o = Object.defineProperty;
21321
21476
  var __defProps$c = Object.defineProperties;
21322
21477
  var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
@@ -21358,14 +21513,23 @@ var NgwLeaflet = (function () {
21358
21513
  });
21359
21514
  };
21360
21515
  const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21361
- constructor(webMap, item, options, connector, parent, noInit) {
21516
+ constructor({
21517
+ webMap,
21518
+ item,
21519
+ options,
21520
+ connector,
21521
+ parent,
21522
+ noInit
21523
+ }) {
21362
21524
  super(__spreadValues$g(__spreadValues$g({}, _NgwWebmapItem.options), options));
21363
- this.webMap = webMap;
21364
21525
  __publicField$h(this, "item");
21526
+ __publicField$h(this, "webMap");
21365
21527
  __publicField$h(this, "connector");
21366
21528
  __publicField$h(this, "layer");
21529
+ __publicField$h(this, "legend");
21367
21530
  __publicField$h(this, "emitter", new EventEmitter());
21368
21531
  __publicField$h(this, "_rootDescendantsCount", 0);
21532
+ this.webMap = webMap;
21369
21533
  if (connector) {
21370
21534
  this.connector = connector;
21371
21535
  }
@@ -21388,14 +21552,14 @@ var NgwLeaflet = (function () {
21388
21552
  }
21389
21553
  static create(webMap, item, options, connector, parent) {
21390
21554
  return __async$i(this, null, function* () {
21391
- const ngwWebmapItem = new _NgwWebmapItem(
21555
+ const ngwWebmapItem = new _NgwWebmapItem({
21392
21556
  webMap,
21393
21557
  item,
21394
21558
  options,
21395
21559
  connector,
21396
21560
  parent,
21397
- true
21398
- );
21561
+ noInit: true
21562
+ });
21399
21563
  yield ngwWebmapItem._init(item);
21400
21564
  return ngwWebmapItem;
21401
21565
  });
@@ -21417,22 +21581,36 @@ var NgwLeaflet = (function () {
21417
21581
  }
21418
21582
  getLegend(options) {
21419
21583
  return __async$i(this, null, function* () {
21420
- var _a;
21584
+ var _a, _b;
21421
21585
  const id = (_a = this.layer) == null ? void 0 : _a.id;
21422
21586
  if (id !== void 0) {
21423
21587
  const connector = this.connector;
21424
21588
  if (connector && "resourceId" in this.item) {
21425
- const ngwLegend = yield connector.route("render.legend_symbols", { id: Number(this.item.resourceId) }).get(__spreadValues$g({}, options));
21426
- const legend = {
21427
- layerId: id,
21428
- legend: ngwLegend.map((legend2) => __spreadValues$g({
21429
- /** @deprecated use display_name instead */
21430
- name: legend2.display_name,
21431
- /** @deprecated use icon instead */
21432
- symbol: legend2.icon
21433
- }, legend2))
21434
- };
21435
- return [legend];
21589
+ const resourceId = Number(this.item.resourceId);
21590
+ if (this.item.item_type === "layer") {
21591
+ const ngwLegend = yield connector.route("render.legend_symbols", {
21592
+ id: resourceId
21593
+ }).get(__spreadValues$g({}, options));
21594
+ if (this.layer && ngwLegend) {
21595
+ const legend = new Legend({
21596
+ layerId: id,
21597
+ legend: ngwLegend,
21598
+ layer: this.layer,
21599
+ resourceId,
21600
+ webMap: this.webMap,
21601
+ legendSymbols: (_b = this.item.legend_symbols) != null ? _b : void 0,
21602
+ onSymbolRenderChange: (indexes) => {
21603
+ this.webMap.emitter.emit("event-symbol-render:change", {
21604
+ layerId: id,
21605
+ resourceId,
21606
+ indexes
21607
+ });
21608
+ }
21609
+ });
21610
+ return [legend];
21611
+ }
21612
+ }
21613
+ return [];
21436
21614
  }
21437
21615
  }
21438
21616
  return [];
@@ -21487,13 +21665,13 @@ var NgwLeaflet = (function () {
21487
21665
  if (group.children && group.children.length) {
21488
21666
  const children = this.getChildren(group);
21489
21667
  for (const child of children) {
21490
- const childItem = new this.constructor(
21491
- this.webMap,
21492
- child,
21493
- this.options,
21494
- this.connector,
21495
- this
21496
- );
21668
+ const childItem = new this.constructor({
21669
+ webMap: this.webMap,
21670
+ item: child,
21671
+ options: this.options,
21672
+ connector: this.connector,
21673
+ parent: this
21674
+ });
21497
21675
  this.tree.addChild(childItem);
21498
21676
  }
21499
21677
  }
@@ -21521,6 +21699,15 @@ var NgwLeaflet = (function () {
21521
21699
  }
21522
21700
  if (adapter) {
21523
21701
  return this.webMap.addLayer(adapter, options).then((newLayer) => {
21702
+ this.webMap.emitter.on("layer:toggle", (e) => {
21703
+ if (e.id === newLayer.id) {
21704
+ const enabled = this.properties.get("visibility");
21705
+ const mapVisible = this.webMap.isLayerVisible(newLayer);
21706
+ if (enabled !== mapVisible) {
21707
+ this.properties.set("visibility", mapVisible);
21708
+ }
21709
+ }
21710
+ });
21524
21711
  setNewLayer(newLayer);
21525
21712
  });
21526
21713
  }
@@ -21823,12 +22010,12 @@ var NgwLeaflet = (function () {
21823
22010
  headers,
21824
22011
  drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
21825
22012
  });
21826
- const layer = new this.NgwWebmapItem(
21827
- this.options.webMap,
21828
- webmap.root_item,
22013
+ const layer = new this.NgwWebmapItem({
22014
+ webMap: this.options.webMap,
22015
+ item: webmap.root_item,
21829
22016
  options,
21830
22017
  connector
21831
- );
22018
+ });
21832
22019
  layer.emitter.on("init", () => {
21833
22020
  resolve(layer);
21834
22021
  });
@@ -21894,6 +22081,7 @@ var NgwLeaflet = (function () {
21894
22081
  }
21895
22082
  }
21896
22083
  _updateItemsParams(item, webMap, data) {
22084
+ var _a;
21897
22085
  if (item) {
21898
22086
  if (item.item_type === "group" || item.item_type === "root") {
21899
22087
  if ("children" in item && item.children) {
@@ -21926,6 +22114,9 @@ var NgwLeaflet = (function () {
21926
22114
  item = __spreadValues$f(__spreadValues$f({}, layerItem), layerAdapterOptions);
21927
22115
  }
21928
22116
  }
22117
+ if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
22118
+ item = this.options.nativeOptions.beforeItemCreated(item);
22119
+ }
21929
22120
  return item;
21930
22121
  }
21931
22122
  }
@@ -22811,42 +23002,6 @@ var NgwLeaflet = (function () {
22811
23002
  step((generator = generator.apply(__this, __arguments)).next());
22812
23003
  });
22813
23004
  };
22814
- class Legend {
22815
- constructor({
22816
- layerId,
22817
- legend,
22818
- onSymbolRenderChange
22819
- }) {
22820
- __publicField$c(this, "layerId");
22821
- __publicField$c(this, "legend");
22822
- __publicField$c(this, "onSymbolRenderChange");
22823
- this.layerId = layerId;
22824
- this.legend = this.createLegend(legend);
22825
- this.onSymbolRenderChange = onSymbolRenderChange;
22826
- }
22827
- createLegend(items) {
22828
- return items.map((params) => __spreadProps$7(__spreadValues$9({}, params), {
22829
- /** @deprecated use display_name instead */
22830
- name: params.display_name,
22831
- /** @deprecated use icon instead */
22832
- symbol: params.icon
22833
- }));
22834
- }
22835
- setSymbolRender(symbolIndex, status) {
22836
- const legendItem = this.legend.find((l) => l.index === symbolIndex);
22837
- if (legendItem) {
22838
- const render = legendItem.render;
22839
- if (render !== status) {
22840
- legendItem.render = status;
22841
- if (this.onSymbolRenderChange) {
22842
- this.onSymbolRenderChange(
22843
- this.legend.filter((l) => l.render).map((l) => l.index)
22844
- );
22845
- }
22846
- }
22847
- }
22848
- }
22849
- }
22850
23005
  function createRasterAdapter(_0) {
22851
23006
  return __async$b(this, arguments, function* ({
22852
23007
  layerOptions,
@@ -22882,8 +23037,8 @@ var NgwLeaflet = (function () {
22882
23037
  this.map = map;
22883
23038
  __publicField$c(this, "item", item);
22884
23039
  __publicField$c(this, "resourceId", resourceId);
22885
- __publicField$c(this, "_blocked", false);
22886
- __publicField$c(this, "_layerVisibility");
23040
+ __publicField$c(this, "blocked", false);
23041
+ __publicField$c(this, "layerVisibility");
22887
23042
  const opt = ngwApiToAdapterOptions({
22888
23043
  options: layerOptions,
22889
23044
  webMap,
@@ -22904,24 +23059,6 @@ var NgwLeaflet = (function () {
22904
23059
  addLayer(addOptions) {
22905
23060
  return super.addLayer(__spreadValues$9(__spreadValues$9({}, this.options), addOptions));
22906
23061
  }
22907
- showLayer() {
22908
- this._layerVisibility = true;
22909
- if (!this._blocked) {
22910
- if (super.showLayer) {
22911
- super.showLayer(this.layer);
22912
- } else if (this.layer) {
22913
- webMap.mapAdapter.showLayer(this.layer);
22914
- }
22915
- }
22916
- }
22917
- hideLayer() {
22918
- this._layerVisibility = false;
22919
- if (super.hideLayer) {
22920
- super.hideLayer(this.layer);
22921
- } else if (this.layer) {
22922
- webMap.mapAdapter.hideLayer(this.layer);
22923
- }
22924
- }
22925
23062
  getIdentificationIds() {
22926
23063
  return __async$b(this, null, function* () {
22927
23064
  if (this.item) {
@@ -22947,59 +23084,16 @@ var NgwLeaflet = (function () {
22947
23084
  }, options));
22948
23085
  const legend = new Legend({
22949
23086
  layerId: id,
22950
- legend: ngwLegend,
22951
- onSymbolRenderChange: this._setLegendSymbol.bind(this)
23087
+ layer: this,
23088
+ resourceId,
23089
+ webMap,
23090
+ legend: ngwLegend
22952
23091
  });
22953
23092
  return [legend];
22954
23093
  }
22955
23094
  return [];
22956
23095
  });
22957
23096
  }
22958
- _hideLayer() {
22959
- if (this.options.id) {
22960
- webMap.mapAdapter.hideLayer(this.layer);
22961
- }
22962
- }
22963
- _showLayer() {
22964
- if (this.options.id) {
22965
- if (this._layerVisibility) {
22966
- webMap.showLayer(this.options.id, { silent: true });
22967
- }
22968
- }
22969
- }
22970
- _setLegendSymbol(renderIndexes) {
22971
- const intervals = this._consolidateIntervals(renderIndexes);
22972
- if (!intervals.length) {
22973
- this._hideLayer();
22974
- this._blocked = true;
22975
- } else {
22976
- this._blocked = false;
22977
- this._showLayer();
22978
- }
22979
- if (this.updateLayer) {
22980
- this.updateLayer({
22981
- params: {
22982
- [`symbols[${resourceId}]`]: intervals.join(",") || void 0
22983
- }
22984
- });
22985
- }
22986
- }
22987
- _consolidateIntervals(symbols) {
22988
- const sortedSymbols = symbols.slice().sort((a, b) => a - b);
22989
- const intervals = [];
22990
- let start = sortedSymbols[0];
22991
- let end = start;
22992
- for (let i = 1; i <= sortedSymbols.length; i++) {
22993
- if (sortedSymbols[i] === end + 1) {
22994
- end = sortedSymbols[i];
22995
- } else {
22996
- intervals.push(start === end ? `${start}` : `${start}-${end}`);
22997
- start = sortedSymbols[i];
22998
- end = start;
22999
- }
23000
- }
23001
- return intervals;
23002
- }
23003
23097
  };
23004
23098
  } else {
23005
23099
  throw new Error(adapter + " not supported yet. Only TILE");
@@ -23361,16 +23455,25 @@ var NgwLeaflet = (function () {
23361
23455
  });
23362
23456
  }
23363
23457
  resource(opt) {
23458
+ return __async$8(this, null, function* () {
23459
+ const composite = yield this.composite(opt);
23460
+ return composite.feature_layer;
23461
+ });
23462
+ }
23463
+ composite(opt) {
23364
23464
  return __async$8(this, null, function* () {
23365
23465
  if (this._resource && this._resource.feature_layer) {
23366
- return this._resource.feature_layer;
23466
+ return this._resource;
23367
23467
  }
23368
23468
  const resp = yield this.connector.getResource(this.layerId, opt);
23369
- if (!(resp == null ? void 0 : resp.feature_layer)) {
23370
- throw new Error("Resource is not avector layer");
23469
+ if (!resp) {
23470
+ throw new Error("Resource does not exist");
23471
+ }
23472
+ if (!resp.feature_layer) {
23473
+ throw new Error("Resource is not a vector layer");
23371
23474
  }
23372
23475
  this._resource = resp;
23373
- return resp.feature_layer;
23476
+ return resp;
23374
23477
  });
23375
23478
  }
23376
23479
  getBounds(opt) {
@@ -23383,7 +23486,7 @@ var NgwLeaflet = (function () {
23383
23486
  resourceId: this.layerId
23384
23487
  }, opt));
23385
23488
  }
23386
- geojson(options) {
23489
+ geojson(options = {}) {
23387
23490
  if (this._geojson) {
23388
23491
  return Promise.resolve(this._geojson);
23389
23492
  }
@@ -26345,7 +26448,8 @@ var NgwLeaflet = (function () {
26345
26448
  const identFunc = typeof layer.getIdentificationIds === "function" ? layer.getIdentificationIds : false;
26346
26449
  const interactive = (_a = layer.options.interactive) != null ? _a : true;
26347
26450
  if (identFunc && layer.options.selectable && interactive && this.isLayerVisible(layer)) {
26348
- promises.push(identFunc.call(layer));
26451
+ const layerIds = identFunc.call(layer);
26452
+ promises.push(layerIds);
26349
26453
  }
26350
26454
  }
26351
26455
  const getIdsPromise = Promise.all(promises);