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

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.18; author: NextGIS */
2
2
  var domain;
3
3
 
4
4
  // This constructor is used to store event handlers. Instantiating this is
@@ -15029,15 +15029,15 @@ function createFeaturePositionOptions(features) {
15029
15029
  };
15030
15030
  }
15031
15031
 
15032
- var __defProp$12 = Object.defineProperty;
15033
- var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15034
- var __publicField$I = (obj, key, value) => __defNormalProp$12(obj, typeof key !== "symbol" ? key + "" : key, value);
15032
+ var __defProp$13 = Object.defineProperty;
15033
+ var __defNormalProp$13 = (obj, key, value) => key in obj ? __defProp$13(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15034
+ var __publicField$J = (obj, key, value) => __defNormalProp$13(obj, typeof key !== "symbol" ? key + "" : key, value);
15035
15035
  class BaseAdapter {
15036
15036
  constructor(map, options) {
15037
15037
  this.map = map;
15038
15038
  this.options = options;
15039
- __publicField$I(this, "layer");
15040
- __publicField$I(this, "pane", "order-0");
15039
+ __publicField$J(this, "layer");
15040
+ __publicField$J(this, "pane", "order-0");
15041
15041
  if (options.order !== void 0) {
15042
15042
  const pane = "order-" + options.order;
15043
15043
  let exist = map.getPane(pane);
@@ -15066,19 +15066,19 @@ function convertMapClickEvent(evt) {
15066
15066
  };
15067
15067
  }
15068
15068
 
15069
- var __defProp$11 = Object.defineProperty;
15070
- var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
15071
- var __hasOwnProp$I = Object.prototype.hasOwnProperty;
15072
- var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
15073
- var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15074
- var __spreadValues$H = (a, b) => {
15069
+ var __defProp$12 = Object.defineProperty;
15070
+ var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
15071
+ var __hasOwnProp$J = Object.prototype.hasOwnProperty;
15072
+ var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
15073
+ var __defNormalProp$12 = (obj, key, value) => key in obj ? __defProp$12(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15074
+ var __spreadValues$I = (a, b) => {
15075
15075
  for (var prop in b || (b = {}))
15076
- if (__hasOwnProp$I.call(b, prop))
15077
- __defNormalProp$11(a, prop, b[prop]);
15078
- if (__getOwnPropSymbols$I)
15079
- for (var prop of __getOwnPropSymbols$I(b)) {
15080
- if (__propIsEnum$I.call(b, prop))
15081
- __defNormalProp$11(a, prop, b[prop]);
15076
+ if (__hasOwnProp$J.call(b, prop))
15077
+ __defNormalProp$12(a, prop, b[prop]);
15078
+ if (__getOwnPropSymbols$J)
15079
+ for (var prop of __getOwnPropSymbols$J(b)) {
15080
+ if (__propIsEnum$J.call(b, prop))
15081
+ __defNormalProp$12(a, prop, b[prop]);
15082
15082
  }
15083
15083
  return a;
15084
15084
  };
@@ -15088,7 +15088,7 @@ function createMouseEvent({
15088
15088
  }) {
15089
15089
  const layer_ = source.target;
15090
15090
  const feature = layer_.feature;
15091
- const opt = __spreadValues$H({
15091
+ const opt = __spreadValues$I({
15092
15092
  layer,
15093
15093
  feature,
15094
15094
  event: convertMapClickEvent(source),
@@ -15097,30 +15097,30 @@ function createMouseEvent({
15097
15097
  return opt;
15098
15098
  }
15099
15099
 
15100
- var __defProp$10 = Object.defineProperty;
15101
- var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
15102
- var __hasOwnProp$H = Object.prototype.hasOwnProperty;
15103
- var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
15104
- var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15105
- var __spreadValues$G = (a, b) => {
15100
+ var __defProp$11 = Object.defineProperty;
15101
+ var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
15102
+ var __hasOwnProp$I = Object.prototype.hasOwnProperty;
15103
+ var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
15104
+ var __defNormalProp$11 = (obj, key, value) => key in obj ? __defProp$11(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15105
+ var __spreadValues$H = (a, b) => {
15106
15106
  for (var prop in b || (b = {}))
15107
- if (__hasOwnProp$H.call(b, prop))
15108
- __defNormalProp$10(a, prop, b[prop]);
15109
- if (__getOwnPropSymbols$H)
15110
- for (var prop of __getOwnPropSymbols$H(b)) {
15111
- if (__propIsEnum$H.call(b, prop))
15112
- __defNormalProp$10(a, prop, b[prop]);
15107
+ if (__hasOwnProp$I.call(b, prop))
15108
+ __defNormalProp$11(a, prop, b[prop]);
15109
+ if (__getOwnPropSymbols$I)
15110
+ for (var prop of __getOwnPropSymbols$I(b)) {
15111
+ if (__propIsEnum$I.call(b, prop))
15112
+ __defNormalProp$11(a, prop, b[prop]);
15113
15113
  }
15114
15114
  return a;
15115
15115
  };
15116
- var __publicField$H = (obj, key, value) => __defNormalProp$10(obj, typeof key !== "symbol" ? key + "" : key, value);
15116
+ var __publicField$I = (obj, key, value) => __defNormalProp$11(obj, typeof key !== "symbol" ? key + "" : key, value);
15117
15117
  class GeoJsonEvents {
15118
15118
  constructor(layer) {
15119
- __publicField$H(this, "layer");
15120
- __publicField$H(this, "_onclick");
15121
- __publicField$H(this, "_ondblclick");
15122
- __publicField$H(this, "_mouseout");
15123
- __publicField$H(this, "_mouseover");
15119
+ __publicField$I(this, "layer");
15120
+ __publicField$I(this, "_onclick");
15121
+ __publicField$I(this, "_ondblclick");
15122
+ __publicField$I(this, "_mouseout");
15123
+ __publicField$I(this, "_mouseover");
15124
15124
  this.layer = layer;
15125
15125
  }
15126
15126
  handleMouseEvents(layer) {
@@ -15129,7 +15129,7 @@ class GeoJsonEvents {
15129
15129
  if (onClick_) {
15130
15130
  this._onclick = (e) => {
15131
15131
  const selected = !!this.layer._getSelected(layer);
15132
- onClick_(__spreadValues$G({
15132
+ onClick_(__spreadValues$H({
15133
15133
  selected
15134
15134
  }, this._createMouseEvent(e)));
15135
15135
  };
@@ -15139,7 +15139,7 @@ class GeoJsonEvents {
15139
15139
  this._ondblclick = (e) => {
15140
15140
  leafletSrcExports.DomEvent.stopPropagation(e);
15141
15141
  const selected = !!this.layer._getSelected(layer);
15142
- onDoubleClick(__spreadValues$G({
15142
+ onDoubleClick(__spreadValues$H({
15143
15143
  selected
15144
15144
  }, this._createMouseEvent(e)));
15145
15145
  };
@@ -15798,19 +15798,19 @@ const typeExpressions = {
15798
15798
  typeof: evaluateArgs(([arg]) => typeOfValue(arg))
15799
15799
  };
15800
15800
 
15801
- var __defProp$$ = Object.defineProperty;
15802
- var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
15803
- var __hasOwnProp$G = Object.prototype.hasOwnProperty;
15804
- var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
15805
- var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15806
- var __spreadValues$F = (a, b) => {
15801
+ var __defProp$10 = Object.defineProperty;
15802
+ var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
15803
+ var __hasOwnProp$H = Object.prototype.hasOwnProperty;
15804
+ var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
15805
+ var __defNormalProp$10 = (obj, key, value) => key in obj ? __defProp$10(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15806
+ var __spreadValues$G = (a, b) => {
15807
15807
  for (var prop in b || (b = {}))
15808
- if (__hasOwnProp$G.call(b, prop))
15809
- __defNormalProp$$(a, prop, b[prop]);
15810
- if (__getOwnPropSymbols$G)
15811
- for (var prop of __getOwnPropSymbols$G(b)) {
15812
- if (__propIsEnum$G.call(b, prop))
15813
- __defNormalProp$$(a, prop, b[prop]);
15808
+ if (__hasOwnProp$H.call(b, prop))
15809
+ __defNormalProp$10(a, prop, b[prop]);
15810
+ if (__getOwnPropSymbols$H)
15811
+ for (var prop of __getOwnPropSymbols$H(b)) {
15812
+ if (__propIsEnum$H.call(b, prop))
15813
+ __defNormalProp$10(a, prop, b[prop]);
15814
15814
  }
15815
15815
  return a;
15816
15816
  };
@@ -15822,7 +15822,7 @@ function isExpression(value) {
15822
15822
  }
15823
15823
  return false;
15824
15824
  }
15825
- const expressions = __spreadValues$F(__spreadValues$F(__spreadValues$F(__spreadValues$F(__spreadValues$F(__spreadValues$F({}, mathExpressions), typeExpressions), stringExpressions), lookupExpressions), decisionExpressions), interpolationExpressions);
15825
+ const expressions = __spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G(__spreadValues$G({}, mathExpressions), typeExpressions), stringExpressions), lookupExpressions), decisionExpressions), interpolationExpressions);
15826
15826
  function evaluate(expression, data = {}) {
15827
15827
  const [name, ...args] = expression;
15828
15828
  const expressionFun = expressions[name];
@@ -15835,19 +15835,19 @@ function evaluate(expression, data = {}) {
15835
15835
  throw new Error(`Expression "${name}" is not supported.`);
15836
15836
  }
15837
15837
 
15838
- var __defProp$_ = Object.defineProperty;
15839
- var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
15840
- var __hasOwnProp$F = Object.prototype.hasOwnProperty;
15841
- var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
15842
- var __defNormalProp$_ = (obj, key, value) => key in obj ? __defProp$_(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15843
- var __spreadValues$E = (a, b) => {
15838
+ var __defProp$$ = Object.defineProperty;
15839
+ var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
15840
+ var __hasOwnProp$G = Object.prototype.hasOwnProperty;
15841
+ var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
15842
+ var __defNormalProp$$ = (obj, key, value) => key in obj ? __defProp$$(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15843
+ var __spreadValues$F = (a, b) => {
15844
15844
  for (var prop in b || (b = {}))
15845
- if (__hasOwnProp$F.call(b, prop))
15846
- __defNormalProp$_(a, prop, b[prop]);
15847
- if (__getOwnPropSymbols$F)
15848
- for (var prop of __getOwnPropSymbols$F(b)) {
15849
- if (__propIsEnum$F.call(b, prop))
15850
- __defNormalProp$_(a, prop, b[prop]);
15845
+ if (__hasOwnProp$G.call(b, prop))
15846
+ __defNormalProp$$(a, prop, b[prop]);
15847
+ if (__getOwnPropSymbols$G)
15848
+ for (var prop of __getOwnPropSymbols$G(b)) {
15849
+ if (__propIsEnum$G.call(b, prop))
15850
+ __defNormalProp$$(a, prop, b[prop]);
15851
15851
  }
15852
15852
  return a;
15853
15853
  };
@@ -15880,25 +15880,25 @@ function createExpressionCallback(paint) {
15880
15880
  for (const p in expressions) {
15881
15881
  fromCb[p] = expressions[p](feature);
15882
15882
  }
15883
- return __spreadValues$E(__spreadValues$E({}, paint), fromCb);
15883
+ return __spreadValues$F(__spreadValues$F({}, paint), fromCb);
15884
15884
  };
15885
15885
  }
15886
15886
  return;
15887
15887
  }
15888
15888
 
15889
- var __defProp$Z = Object.defineProperty;
15890
- var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
15891
- var __hasOwnProp$E = Object.prototype.hasOwnProperty;
15892
- var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
15893
- var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15894
- var __spreadValues$D = (a, b) => {
15889
+ var __defProp$_ = Object.defineProperty;
15890
+ var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
15891
+ var __hasOwnProp$F = Object.prototype.hasOwnProperty;
15892
+ var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
15893
+ var __defNormalProp$_ = (obj, key, value) => key in obj ? __defProp$_(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
15894
+ var __spreadValues$E = (a, b) => {
15895
15895
  for (var prop in b || (b = {}))
15896
- if (__hasOwnProp$E.call(b, prop))
15897
- __defNormalProp$Z(a, prop, b[prop]);
15898
- if (__getOwnPropSymbols$E)
15899
- for (var prop of __getOwnPropSymbols$E(b)) {
15900
- if (__propIsEnum$E.call(b, prop))
15901
- __defNormalProp$Z(a, prop, b[prop]);
15896
+ if (__hasOwnProp$F.call(b, prop))
15897
+ __defNormalProp$_(a, prop, b[prop]);
15898
+ if (__getOwnPropSymbols$F)
15899
+ for (var prop of __getOwnPropSymbols$F(b)) {
15900
+ if (__propIsEnum$F.call(b, prop))
15901
+ __defNormalProp$_(a, prop, b[prop]);
15902
15902
  }
15903
15903
  return a;
15904
15904
  };
@@ -15945,7 +15945,7 @@ function isPropertyFilter(filter) {
15945
15945
  return false;
15946
15946
  }
15947
15947
  function featureFilter(feature, filters) {
15948
- const properties = __spreadValues$D({}, feature.properties);
15948
+ const properties = __spreadValues$E({}, feature.properties);
15949
15949
  if (properties) {
15950
15950
  properties.$id = feature.id;
15951
15951
  return propertiesFilter(properties, filters);
@@ -15999,19 +15999,19 @@ function isPaintCallback(paint) {
15999
15999
  return false;
16000
16000
  }
16001
16001
 
16002
- var __defProp$Y = Object.defineProperty;
16003
- var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16004
- var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16005
- var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16006
- var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16007
- var __spreadValues$C = (a, b) => {
16002
+ var __defProp$Z = Object.defineProperty;
16003
+ var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
16004
+ var __hasOwnProp$E = Object.prototype.hasOwnProperty;
16005
+ var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
16006
+ var __defNormalProp$Z = (obj, key, value) => key in obj ? __defProp$Z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16007
+ var __spreadValues$D = (a, b) => {
16008
16008
  for (var prop in b || (b = {}))
16009
- if (__hasOwnProp$D.call(b, prop))
16010
- __defNormalProp$Y(a, prop, b[prop]);
16011
- if (__getOwnPropSymbols$D)
16012
- for (var prop of __getOwnPropSymbols$D(b)) {
16013
- if (__propIsEnum$D.call(b, prop))
16014
- __defNormalProp$Y(a, prop, b[prop]);
16009
+ if (__hasOwnProp$E.call(b, prop))
16010
+ __defNormalProp$Z(a, prop, b[prop]);
16011
+ if (__getOwnPropSymbols$E)
16012
+ for (var prop of __getOwnPropSymbols$E(b)) {
16013
+ if (__propIsEnum$E.call(b, prop))
16014
+ __defNormalProp$Z(a, prop, b[prop]);
16015
16015
  }
16016
16016
  return a;
16017
16017
  };
@@ -16040,7 +16040,7 @@ function createPropertiesPaint(propertiesPaint) {
16040
16040
  return (feature) => {
16041
16041
  const paint = paintsFilters.find((x) => featureFilter(feature, x[0]));
16042
16042
  if (paint) {
16043
- return __spreadValues$C(__spreadValues$C({}, mask), paint[1]);
16043
+ return __spreadValues$D(__spreadValues$D({}, mask), paint[1]);
16044
16044
  }
16045
16045
  return mask;
16046
16046
  };
@@ -16064,8 +16064,8 @@ function expressionCallback({
16064
16064
  }
16065
16065
  function finalizePaint({ paint, defaultPaint }) {
16066
16066
  var _a;
16067
- let newPaint = __spreadValues$C({}, defaultPaint);
16068
- newPaint = __spreadValues$C(__spreadValues$C({}, newPaint), paint);
16067
+ let newPaint = __spreadValues$D({}, defaultPaint);
16068
+ newPaint = __spreadValues$D(__spreadValues$D({}, newPaint), paint);
16069
16069
  newPaint.fill = (_a = newPaint.fill) != null ? _a : true;
16070
16070
  newPaint.stroke = newPaint.stroke !== void 0 ? newPaint.stroke : !newPaint.fill || !!(newPaint.strokeColor || newPaint.strokeOpacity);
16071
16071
  return newPaint;
@@ -16078,7 +16078,7 @@ function preparePaint({
16078
16078
  if (!paint) {
16079
16079
  throw new Error("paint is empty");
16080
16080
  }
16081
- let newPaint = __spreadValues$C({}, defaultPaint);
16081
+ let newPaint = __spreadValues$D({}, defaultPaint);
16082
16082
  if (isPaintCallback(paint)) {
16083
16083
  const getPaintFunction = (feature) => {
16084
16084
  const getPaint = preparePaint({
@@ -16135,41 +16135,41 @@ function preparePaint({
16135
16135
  return newPaint;
16136
16136
  }
16137
16137
 
16138
- var __defProp$X = Object.defineProperty;
16139
- var __defProps$p = Object.defineProperties;
16140
- var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
16141
- var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16142
- var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16143
- var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16144
- var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16145
- var __spreadValues$B = (a, b) => {
16138
+ var __defProp$Y = Object.defineProperty;
16139
+ var __defProps$q = Object.defineProperties;
16140
+ var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
16141
+ var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
16142
+ var __hasOwnProp$D = Object.prototype.hasOwnProperty;
16143
+ var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
16144
+ var __defNormalProp$Y = (obj, key, value) => key in obj ? __defProp$Y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16145
+ var __spreadValues$C = (a, b) => {
16146
16146
  for (var prop in b || (b = {}))
16147
- if (__hasOwnProp$C.call(b, prop))
16148
- __defNormalProp$X(a, prop, b[prop]);
16149
- if (__getOwnPropSymbols$C)
16150
- for (var prop of __getOwnPropSymbols$C(b)) {
16151
- if (__propIsEnum$C.call(b, prop))
16152
- __defNormalProp$X(a, prop, b[prop]);
16147
+ if (__hasOwnProp$D.call(b, prop))
16148
+ __defNormalProp$Y(a, prop, b[prop]);
16149
+ if (__getOwnPropSymbols$D)
16150
+ for (var prop of __getOwnPropSymbols$D(b)) {
16151
+ if (__propIsEnum$D.call(b, prop))
16152
+ __defNormalProp$Y(a, prop, b[prop]);
16153
16153
  }
16154
16154
  return a;
16155
16155
  };
16156
- var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
16156
+ var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
16157
16157
  var __objRest$8 = (source, exclude) => {
16158
16158
  var target = {};
16159
16159
  for (var prop in source)
16160
- if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
16160
+ if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
16161
16161
  target[prop] = source[prop];
16162
- if (source != null && __getOwnPropSymbols$C)
16163
- for (var prop of __getOwnPropSymbols$C(source)) {
16164
- if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
16162
+ if (source != null && __getOwnPropSymbols$D)
16163
+ for (var prop of __getOwnPropSymbols$D(source)) {
16164
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
16165
16165
  target[prop] = source[prop];
16166
16166
  }
16167
16167
  return target;
16168
16168
  };
16169
- var __publicField$G = (obj, key, value) => __defNormalProp$X(obj, key + "" , value);
16169
+ var __publicField$H = (obj, key, value) => __defNormalProp$Y(obj, key + "" , value);
16170
16170
  class GeoJsonPaint {
16171
16171
  constructor(layer) {
16172
- __publicField$G(this, "layer");
16172
+ __publicField$H(this, "layer");
16173
16173
  this.layer = layer;
16174
16174
  }
16175
16175
  setPaintEachLayer(paint) {
@@ -16248,7 +16248,7 @@ class GeoJsonPaint {
16248
16248
  if (html) {
16249
16249
  element.innerHTML = html;
16250
16250
  }
16251
- const divIcon = new leafletSrcExports.DivIcon(__spreadProps$p(__spreadValues$B({
16251
+ const divIcon = new leafletSrcExports.DivIcon(__spreadProps$q(__spreadValues$C({
16252
16252
  className: ""
16253
16253
  }, toLIconOpt), {
16254
16254
  html: element
@@ -16274,7 +16274,7 @@ class GeoJsonPaint {
16274
16274
  }
16275
16275
  return (_, latlng) => {
16276
16276
  const p = PAINT;
16277
- return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$B(__spreadValues$B({}, p), icon)));
16277
+ return new leafletSrcExports.CircleMarker(latlng, this.preparePaint(__spreadValues$C(__spreadValues$C({}, p), icon)));
16278
16278
  };
16279
16279
  }
16280
16280
  createPaintOptions(paint) {
@@ -16296,27 +16296,27 @@ class GeoJsonPaint {
16296
16296
  }
16297
16297
  }
16298
16298
 
16299
- var __defProp$W = Object.defineProperty;
16300
- var __defProps$o = Object.defineProperties;
16301
- var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
16302
- var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
16303
- var __hasOwnProp$B = Object.prototype.hasOwnProperty;
16304
- var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
16305
- var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16306
- var __spreadValues$A = (a, b) => {
16299
+ var __defProp$X = Object.defineProperty;
16300
+ var __defProps$p = Object.defineProperties;
16301
+ var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
16302
+ var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
16303
+ var __hasOwnProp$C = Object.prototype.hasOwnProperty;
16304
+ var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
16305
+ var __defNormalProp$X = (obj, key, value) => key in obj ? __defProp$X(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16306
+ var __spreadValues$B = (a, b) => {
16307
16307
  for (var prop in b || (b = {}))
16308
- if (__hasOwnProp$B.call(b, prop))
16309
- __defNormalProp$W(a, prop, b[prop]);
16310
- if (__getOwnPropSymbols$B)
16311
- for (var prop of __getOwnPropSymbols$B(b)) {
16312
- if (__propIsEnum$B.call(b, prop))
16313
- __defNormalProp$W(a, prop, b[prop]);
16308
+ if (__hasOwnProp$C.call(b, prop))
16309
+ __defNormalProp$X(a, prop, b[prop]);
16310
+ if (__getOwnPropSymbols$C)
16311
+ for (var prop of __getOwnPropSymbols$C(b)) {
16312
+ if (__propIsEnum$C.call(b, prop))
16313
+ __defNormalProp$X(a, prop, b[prop]);
16314
16314
  }
16315
16315
  return a;
16316
16316
  };
16317
- var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
16318
- var __publicField$F = (obj, key, value) => __defNormalProp$W(obj, typeof key !== "symbol" ? key + "" : key, value);
16319
- var __async$v = (__this, __arguments, generator) => {
16317
+ var __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b));
16318
+ var __publicField$G = (obj, key, value) => __defNormalProp$X(obj, typeof key !== "symbol" ? key + "" : key, value);
16319
+ var __async$w = (__this, __arguments, generator) => {
16320
16320
  return new Promise((resolve, reject) => {
16321
16321
  var fulfilled = (value) => {
16322
16322
  try {
@@ -16339,22 +16339,22 @@ var __async$v = (__this, __arguments, generator) => {
16339
16339
  class GeoJsonAdapter extends BaseAdapter {
16340
16340
  constructor(map, options) {
16341
16341
  super(map, options);
16342
- __publicField$F(this, "layer");
16343
- __publicField$F(this, "selected", false);
16344
- __publicField$F(this, "type");
16345
- __publicField$F(this, "_layers", []);
16346
- __publicField$F(this, "_events");
16347
- __publicField$F(this, "paint");
16348
- __publicField$F(this, "selectedPaint");
16349
- __publicField$F(this, "_selectedLayers", []);
16350
- __publicField$F(this, "_filteredLayers", []);
16351
- __publicField$F(this, "_filterFun");
16352
- __publicField$F(this, "_openedPopup", []);
16353
- __publicField$F(this, "_paint");
16354
- __publicField$F(this, "$updateTooltip", debounce(() => {
16342
+ __publicField$G(this, "layer");
16343
+ __publicField$G(this, "selected", false);
16344
+ __publicField$G(this, "type");
16345
+ __publicField$G(this, "_layers", []);
16346
+ __publicField$G(this, "_events");
16347
+ __publicField$G(this, "paint");
16348
+ __publicField$G(this, "selectedPaint");
16349
+ __publicField$G(this, "_selectedLayers", []);
16350
+ __publicField$G(this, "_filteredLayers", []);
16351
+ __publicField$G(this, "_filterFun");
16352
+ __publicField$G(this, "_openedPopup", []);
16353
+ __publicField$G(this, "_paint");
16354
+ __publicField$G(this, "$updateTooltip", debounce(() => {
16355
16355
  this.updateTooltip();
16356
16356
  }, 300));
16357
- __publicField$F(this, "$unselect", () => {
16357
+ __publicField$G(this, "$unselect", () => {
16358
16358
  this.unselect();
16359
16359
  });
16360
16360
  this._events = new GeoJsonEvents(this);
@@ -16363,7 +16363,7 @@ class GeoJsonAdapter extends BaseAdapter {
16363
16363
  addLayer(options) {
16364
16364
  Object.assign(this.options, options);
16365
16365
  this.paint = options.paint;
16366
- this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$o(__spreadValues$A({}, options.nativeOptions), {
16366
+ this.layer = new leafletSrcExports.FeatureGroup([], __spreadProps$p(__spreadValues$B({}, options.nativeOptions), {
16367
16367
  pane: this.pane
16368
16368
  }));
16369
16369
  this.selectedPaint = options.selectedPaint;
@@ -16412,7 +16412,7 @@ class GeoJsonAdapter extends BaseAdapter {
16412
16412
  }
16413
16413
  getSelected() {
16414
16414
  return this._selectedLayers.map((x) => {
16415
- return __spreadValues$A({
16415
+ return __spreadValues$B({
16416
16416
  target: this,
16417
16417
  feature: x.feature,
16418
16418
  layer: x
@@ -16431,14 +16431,14 @@ class GeoJsonAdapter extends BaseAdapter {
16431
16431
  const filteredLayers = [];
16432
16432
  this._layers.forEach(({ feature, layer }) => {
16433
16433
  if (layer) {
16434
- const ok = fun ? fun(__spreadValues$A({
16434
+ const ok = fun ? fun(__spreadValues$B({
16435
16435
  target: this,
16436
16436
  feature,
16437
16437
  layer
16438
16438
  }, createFeaturePositionOptions(feature))) : true;
16439
16439
  if (ok) {
16440
16440
  layer_.addLayer(layer);
16441
- filteredLayers.push(__spreadValues$A({
16441
+ filteredLayers.push(__spreadValues$B({
16442
16442
  target: this,
16443
16443
  feature,
16444
16444
  layer
@@ -16459,7 +16459,7 @@ class GeoJsonAdapter extends BaseAdapter {
16459
16459
  getLayers() {
16460
16460
  return this._layers.map(({ layer, feature }) => {
16461
16461
  const visible = layer && !!layer._map;
16462
- return __spreadValues$A({
16462
+ return __spreadValues$B({
16463
16463
  feature,
16464
16464
  layer,
16465
16465
  visible,
@@ -16577,13 +16577,13 @@ class GeoJsonAdapter extends BaseAdapter {
16577
16577
  }
16578
16578
  }
16579
16579
  updatePaint(paint) {
16580
- this.paint = __spreadValues$A(__spreadValues$A({}, this.paint), paint);
16580
+ this.paint = __spreadValues$B(__spreadValues$B({}, this.paint), paint);
16581
16581
  for (const l of this._layers) {
16582
16582
  this._paint.setPaint(l, this.paint);
16583
16583
  }
16584
16584
  }
16585
16585
  updateSelectedPaint(paint) {
16586
- this.selectedPaint = __spreadValues$A(__spreadValues$A({}, this.selectedPaint), paint);
16586
+ this.selectedPaint = __spreadValues$B(__spreadValues$B({}, this.selectedPaint), paint);
16587
16587
  for (const l of this._selectedLayers) {
16588
16588
  this._paint.setPaint(l, this.selectedPaint);
16589
16589
  }
@@ -16600,7 +16600,7 @@ class GeoJsonAdapter extends BaseAdapter {
16600
16600
  if (feature.properties && labelField) {
16601
16601
  message = feature.properties[labelField];
16602
16602
  } else if (label) {
16603
- message = label(__spreadValues$A(__spreadValues$A({
16603
+ message = label(__spreadValues$B(__spreadValues$B({
16604
16604
  target: this
16605
16605
  }, layerDef), createFeaturePositionOptions(feature)));
16606
16606
  }
@@ -16611,7 +16611,7 @@ class GeoJsonAdapter extends BaseAdapter {
16611
16611
  }
16612
16612
  }
16613
16613
  _openPopup(_0) {
16614
- return __async$v(this, arguments, function* (def, options = {}, type, latLng) {
16614
+ return __async$w(this, arguments, function* (def, options = {}, type, latLng) {
16615
16615
  var _a, _b;
16616
16616
  const { feature, layer } = def;
16617
16617
  const {
@@ -16619,7 +16619,7 @@ class GeoJsonAdapter extends BaseAdapter {
16619
16619
  autoPan,
16620
16620
  maxWidth,
16621
16621
  closeButton: closeButton_
16622
- } = __spreadValues$A({
16622
+ } = __spreadValues$B({
16623
16623
  minWidth: 300
16624
16624
  }, options);
16625
16625
  const closeButton = closeButton_ != null ? closeButton_ : !this.options.selectOnHover;
@@ -16635,7 +16635,7 @@ class GeoJsonAdapter extends BaseAdapter {
16635
16635
  };
16636
16636
  let content;
16637
16637
  if (options.createPopupContent) {
16638
- content = yield options.createPopupContent(__spreadValues$A({
16638
+ content = yield options.createPopupContent(__spreadValues$B({
16639
16639
  layer,
16640
16640
  feature,
16641
16641
  target: this,
@@ -16713,9 +16713,9 @@ class GeoJsonAdapter extends BaseAdapter {
16713
16713
  lopt = {
16714
16714
  style: (feature) => {
16715
16715
  if (feature) {
16716
- return this._paint.preparePaint(__spreadValues$A(__spreadValues$A({}, PAINT), paint(feature)));
16716
+ return this._paint.preparePaint(__spreadValues$B(__spreadValues$B({}, PAINT), paint(feature)));
16717
16717
  } else {
16718
- return this._paint.preparePaint(__spreadProps$o(__spreadValues$A({}, PAINT), { type: "path" }));
16718
+ return this._paint.preparePaint(__spreadProps$p(__spreadValues$B({}, PAINT), { type: "path" }));
16719
16719
  }
16720
16720
  }
16721
16721
  };
@@ -16731,7 +16731,7 @@ class GeoJsonAdapter extends BaseAdapter {
16731
16731
  _onEachFeature(feature, layer) {
16732
16732
  const layer_ = this.layer;
16733
16733
  if (layer_) {
16734
- const def = __spreadValues$A({
16734
+ const def = __spreadValues$B({
16735
16735
  target: this,
16736
16736
  feature,
16737
16737
  layer
@@ -16766,7 +16766,7 @@ class GeoJsonAdapter extends BaseAdapter {
16766
16766
  setTimeout(() => {
16767
16767
  if (popup) {
16768
16768
  this._openPopup(
16769
- __spreadValues$A({
16769
+ __spreadValues$B({
16770
16770
  target: this,
16771
16771
  layer,
16772
16772
  feature
@@ -16784,7 +16784,7 @@ class GeoJsonAdapter extends BaseAdapter {
16784
16784
  leafletSrcExports.DomEvent.stopPropagation(e);
16785
16785
  const layer = e.target;
16786
16786
  const feature = layer.feature;
16787
- const def = __spreadValues$A({
16787
+ const def = __spreadValues$B({
16788
16788
  target: this,
16789
16789
  layer,
16790
16790
  feature
@@ -16817,7 +16817,7 @@ class GeoJsonAdapter extends BaseAdapter {
16817
16817
  }
16818
16818
  if (this.options.onSelect) {
16819
16819
  const features = def.feature ? [def.feature] : [];
16820
- this.options.onSelect(__spreadValues$A({
16820
+ this.options.onSelect(__spreadValues$B({
16821
16821
  type,
16822
16822
  layer: this,
16823
16823
  features
@@ -16909,20 +16909,20 @@ function callAjax({
16909
16909
  return [promise, abortFunc];
16910
16910
  }
16911
16911
 
16912
- var __defProp$V = Object.defineProperty;
16913
- var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16914
- var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, typeof key !== "symbol" ? key + "" : key, value);
16912
+ var __defProp$W = Object.defineProperty;
16913
+ var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16914
+ var __publicField$F = (obj, key, value) => __defNormalProp$W(obj, typeof key !== "symbol" ? key + "" : key, value);
16915
16915
  class Queue {
16916
16916
  /**
16917
16917
  * @param {PromiseQueueOptions} options - Configuration options for the queue.
16918
16918
  */
16919
16919
  constructor({ concurrency = 1, delay = 0 } = {}) {
16920
- __publicField$E(this, "queue", []);
16921
- __publicField$E(this, "concurrency");
16922
- __publicField$E(this, "activeCount", 0);
16923
- __publicField$E(this, "timeoutId");
16924
- __publicField$E(this, "delay");
16925
- __publicField$E(this, "toAbort", []);
16920
+ __publicField$F(this, "queue", []);
16921
+ __publicField$F(this, "concurrency");
16922
+ __publicField$F(this, "activeCount", 0);
16923
+ __publicField$F(this, "timeoutId");
16924
+ __publicField$F(this, "delay");
16925
+ __publicField$F(this, "toAbort", []);
16926
16926
  this.concurrency = concurrency;
16927
16927
  this.delay = delay;
16928
16928
  }
@@ -16998,13 +16998,13 @@ class Queue {
16998
16998
 
16999
16999
  const imageQueue = new Queue({ concurrency: 6, delay: 200 });
17000
17000
 
17001
- var __defProp$U = Object.defineProperty;
17002
- var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17003
- var __publicField$D = (obj, key, value) => __defNormalProp$U(obj, key + "" , value);
17001
+ var __defProp$V = Object.defineProperty;
17002
+ var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17003
+ var __publicField$E = (obj, key, value) => __defNormalProp$V(obj, key + "" , value);
17004
17004
  class ImageOverlay extends leafletSrcExports.ImageOverlay {
17005
17005
  constructor(imageUrl, bounds, options) {
17006
17006
  super(imageUrl, bounds, options);
17007
- __publicField$D(this, "_aborter");
17007
+ __publicField$E(this, "_aborter");
17008
17008
  }
17009
17009
  cancelLoad() {
17010
17010
  if (this._aborter) {
@@ -17033,14 +17033,13 @@ class ImageOverlay extends leafletSrcExports.ImageOverlay {
17033
17033
  }
17034
17034
  }
17035
17035
 
17036
- var __defProp$T = Object.defineProperty;
17037
- var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17038
- var __publicField$C = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
17036
+ var __defProp$U = Object.defineProperty;
17037
+ var __defNormalProp$U = (obj, key, value) => key in obj ? __defProp$U(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17038
+ var __publicField$D = (obj, key, value) => __defNormalProp$U(obj, typeof key !== "symbol" ? key + "" : key, value);
17039
17039
  class ImageLayer extends leafletSrcExports.Layer {
17040
17040
  constructor(url, options) {
17041
- var _a;
17042
17041
  super(options);
17043
- __publicField$C(this, "defaultWmsParams", {
17042
+ __publicField$D(this, "defaultWmsParams", {
17044
17043
  service: "WMS",
17045
17044
  request: "GetMap",
17046
17045
  version: "1.1.1",
@@ -17049,7 +17048,7 @@ class ImageLayer extends leafletSrcExports.Layer {
17049
17048
  format: "image/jpeg",
17050
17049
  transparent: false
17051
17050
  });
17052
- __publicField$C(this, "options", {
17051
+ __publicField$D(this, "options", {
17053
17052
  crs: null,
17054
17053
  uppercase: false,
17055
17054
  attribution: "",
@@ -17063,28 +17062,31 @@ class ImageLayer extends leafletSrcExports.Layer {
17063
17062
  viewPortBuffer: 0,
17064
17063
  setViewDelay: 100
17065
17064
  });
17066
- __publicField$C(this, "wmsParams");
17067
- __publicField$C(this, "_url");
17068
- __publicField$C(this, "_currentUrl");
17069
- __publicField$C(this, "_currentOverlay");
17070
- __publicField$C(this, "_loadedOverlay");
17065
+ __publicField$D(this, "wmsParams");
17066
+ __publicField$D(this, "_url");
17067
+ __publicField$D(this, "_currentUrl");
17068
+ __publicField$D(this, "_currentOverlay");
17069
+ __publicField$D(this, "_loadedOverlay");
17071
17070
  this._url = url;
17072
17071
  const params = {};
17073
17072
  const opts = {};
17074
17073
  let opt;
17075
17074
  for (opt in options) {
17075
+ const val = options[opt];
17076
17076
  if (opt in this.options) {
17077
- opts[opt] = options[opt];
17078
- } else {
17079
- params[opt] = options[opt];
17077
+ opts[opt] = val;
17078
+ }
17079
+ }
17080
+ if (options.params) {
17081
+ for (const param in options.params) {
17082
+ const val = options.params[param];
17083
+ if (!isObject$1(val) && !Array.isArray(val) && typeof val !== "function") {
17084
+ params[param] = val;
17085
+ }
17080
17086
  }
17081
17087
  }
17082
17088
  leafletSrcExports.Util.setOptions(this, opts);
17083
- this.wmsParams = leafletSrcExports.Util.extend(
17084
- {},
17085
- this.defaultWmsParams,
17086
- (_a = params == null ? void 0 : params.params) != null ? _a : {}
17087
- );
17089
+ this.wmsParams = leafletSrcExports.Util.extend({}, this.defaultWmsParams, params);
17088
17090
  }
17089
17091
  setParams(params) {
17090
17092
  leafletSrcExports.Util.extend(this.wmsParams, params);
@@ -17231,41 +17233,41 @@ class ImageLayer extends leafletSrcExports.Layer {
17231
17233
  }
17232
17234
  }
17233
17235
 
17234
- var __defProp$S = Object.defineProperty;
17235
- var __defProps$n = Object.defineProperties;
17236
- var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
17237
- var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
17238
- var __hasOwnProp$A = Object.prototype.hasOwnProperty;
17239
- var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
17240
- var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17241
- var __spreadValues$z = (a, b) => {
17236
+ var __defProp$T = Object.defineProperty;
17237
+ var __defProps$o = Object.defineProperties;
17238
+ var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
17239
+ var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
17240
+ var __hasOwnProp$B = Object.prototype.hasOwnProperty;
17241
+ var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
17242
+ var __defNormalProp$T = (obj, key, value) => key in obj ? __defProp$T(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17243
+ var __spreadValues$A = (a, b) => {
17242
17244
  for (var prop in b || (b = {}))
17243
- if (__hasOwnProp$A.call(b, prop))
17244
- __defNormalProp$S(a, prop, b[prop]);
17245
- if (__getOwnPropSymbols$A)
17246
- for (var prop of __getOwnPropSymbols$A(b)) {
17247
- if (__propIsEnum$A.call(b, prop))
17248
- __defNormalProp$S(a, prop, b[prop]);
17245
+ if (__hasOwnProp$B.call(b, prop))
17246
+ __defNormalProp$T(a, prop, b[prop]);
17247
+ if (__getOwnPropSymbols$B)
17248
+ for (var prop of __getOwnPropSymbols$B(b)) {
17249
+ if (__propIsEnum$B.call(b, prop))
17250
+ __defNormalProp$T(a, prop, b[prop]);
17249
17251
  }
17250
17252
  return a;
17251
17253
  };
17252
- var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
17253
- var __publicField$B = (obj, key, value) => __defNormalProp$S(obj, typeof key !== "symbol" ? key + "" : key, value);
17254
+ var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
17255
+ var __publicField$C = (obj, key, value) => __defNormalProp$T(obj, typeof key !== "symbol" ? key + "" : key, value);
17254
17256
  class ImageAdapter extends BaseAdapter {
17255
17257
  constructor() {
17256
17258
  super(...arguments);
17257
- __publicField$B(this, "layer");
17259
+ __publicField$C(this, "layer");
17258
17260
  }
17259
17261
  addLayer(options) {
17260
17262
  var _a;
17261
17263
  const url = options && options.url;
17262
17264
  if (url) {
17263
17265
  const updateWmsParamsFromOpt = options.updateWmsParams;
17264
- this.layer = new ImageLayer(url, __spreadValues$z(__spreadValues$z(__spreadValues$z({
17266
+ this.layer = new ImageLayer(url, __spreadValues$A(__spreadValues$A(__spreadValues$A({
17265
17267
  pane: this.pane,
17266
17268
  headers: options.headers,
17267
17269
  setViewDelay: options.setViewDelay
17268
- }, __spreadProps$n(__spreadValues$z({
17270
+ }, __spreadProps$o(__spreadValues$A({
17269
17271
  transparent: true
17270
17272
  }, options), {
17271
17273
  opacity: (_a = options.opacity) != null ? _a : void 0
@@ -17288,7 +17290,7 @@ class ImageAdapter extends BaseAdapter {
17288
17290
  }
17289
17291
  }
17290
17292
  }
17291
- __publicField$B(ImageAdapter, "queue", imageQueue);
17293
+ __publicField$C(ImageAdapter, "queue", imageQueue);
17292
17294
 
17293
17295
  function makeRemote(Base) {
17294
17296
  return class RemoteTileLayer extends Base {
@@ -17350,33 +17352,33 @@ class TileLayerBase extends leafletSrcExports.TileLayer {
17350
17352
  }
17351
17353
  const TileLayer = makeRemote(TileLayerBase);
17352
17354
 
17353
- var __defProp$R = Object.defineProperty;
17354
- var __defProps$m = Object.defineProperties;
17355
- var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
17356
- var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
17357
- var __hasOwnProp$z = Object.prototype.hasOwnProperty;
17358
- var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
17359
- var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17360
- var __spreadValues$y = (a, b) => {
17355
+ var __defProp$S = Object.defineProperty;
17356
+ var __defProps$n = Object.defineProperties;
17357
+ var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
17358
+ var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
17359
+ var __hasOwnProp$A = Object.prototype.hasOwnProperty;
17360
+ var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
17361
+ var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17362
+ var __spreadValues$z = (a, b) => {
17361
17363
  for (var prop in b || (b = {}))
17362
- if (__hasOwnProp$z.call(b, prop))
17363
- __defNormalProp$R(a, prop, b[prop]);
17364
- if (__getOwnPropSymbols$z)
17365
- for (var prop of __getOwnPropSymbols$z(b)) {
17366
- if (__propIsEnum$z.call(b, prop))
17367
- __defNormalProp$R(a, prop, b[prop]);
17364
+ if (__hasOwnProp$A.call(b, prop))
17365
+ __defNormalProp$S(a, prop, b[prop]);
17366
+ if (__getOwnPropSymbols$A)
17367
+ for (var prop of __getOwnPropSymbols$A(b)) {
17368
+ if (__propIsEnum$A.call(b, prop))
17369
+ __defNormalProp$S(a, prop, b[prop]);
17368
17370
  }
17369
17371
  return a;
17370
17372
  };
17371
- var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
17373
+ var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
17372
17374
  var __objRest$7 = (source, exclude) => {
17373
17375
  var target = {};
17374
17376
  for (var prop in source)
17375
- if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
17377
+ if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
17376
17378
  target[prop] = source[prop];
17377
- if (source != null && __getOwnPropSymbols$z)
17378
- for (var prop of __getOwnPropSymbols$z(source)) {
17379
- if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
17379
+ if (source != null && __getOwnPropSymbols$A)
17380
+ for (var prop of __getOwnPropSymbols$A(source)) {
17381
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
17380
17382
  target[prop] = source[prop];
17381
17383
  }
17382
17384
  return target;
@@ -17387,7 +17389,7 @@ class TileAdapter extends BaseAdapter {
17387
17389
  if (options) {
17388
17390
  const _a = options, { url } = _a, opt = __objRest$7(_a, ["url"]);
17389
17391
  if (url) {
17390
- const tileLayerOptions = __spreadValues$y({
17392
+ const tileLayerOptions = __spreadValues$z({
17391
17393
  pane: this.pane,
17392
17394
  attribution: opt.attribution,
17393
17395
  minZoom: opt.minZoom,
@@ -17398,7 +17400,7 @@ class TileAdapter extends BaseAdapter {
17398
17400
  }
17399
17401
  let layer;
17400
17402
  if (opt.headers || opt.withCredentials) {
17401
- layer = new TileLayer(url, __spreadProps$m(__spreadValues$y({}, tileLayerOptions), {
17403
+ layer = new TileLayer(url, __spreadProps$n(__spreadValues$z({}, tileLayerOptions), {
17402
17404
  headers: opt.headers,
17403
17405
  withCredentials: opt.withCredentials,
17404
17406
  setViewDelay: opt.setViewDelay
@@ -17421,29 +17423,29 @@ class TileAdapter extends BaseAdapter {
17421
17423
  }
17422
17424
  }
17423
17425
 
17424
- var __defProp$Q = Object.defineProperty;
17425
- var __defProps$l = Object.defineProperties;
17426
- var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
17427
- var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
17428
- var __hasOwnProp$y = Object.prototype.hasOwnProperty;
17429
- var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
17430
- var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17431
- var __spreadValues$x = (a, b) => {
17426
+ var __defProp$R = Object.defineProperty;
17427
+ var __defProps$m = Object.defineProperties;
17428
+ var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
17429
+ var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
17430
+ var __hasOwnProp$z = Object.prototype.hasOwnProperty;
17431
+ var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
17432
+ var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17433
+ var __spreadValues$y = (a, b) => {
17432
17434
  for (var prop in b || (b = {}))
17433
- if (__hasOwnProp$y.call(b, prop))
17434
- __defNormalProp$Q(a, prop, b[prop]);
17435
- if (__getOwnPropSymbols$y)
17436
- for (var prop of __getOwnPropSymbols$y(b)) {
17437
- if (__propIsEnum$y.call(b, prop))
17438
- __defNormalProp$Q(a, prop, b[prop]);
17435
+ if (__hasOwnProp$z.call(b, prop))
17436
+ __defNormalProp$R(a, prop, b[prop]);
17437
+ if (__getOwnPropSymbols$z)
17438
+ for (var prop of __getOwnPropSymbols$z(b)) {
17439
+ if (__propIsEnum$z.call(b, prop))
17440
+ __defNormalProp$R(a, prop, b[prop]);
17439
17441
  }
17440
17442
  return a;
17441
17443
  };
17442
- var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
17444
+ var __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b));
17443
17445
  class OsmAdapter extends TileAdapter {
17444
17446
  addLayer(options) {
17445
17447
  const url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
17446
- return super.addLayer(__spreadProps$l(__spreadValues$x({
17448
+ return super.addLayer(__spreadProps$m(__spreadValues$y({
17447
17449
  name: "OpenStreetMap",
17448
17450
  attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
17449
17451
  }, options), {
@@ -17459,33 +17461,33 @@ class WmsLayerBase extends leafletSrcExports.TileLayer.WMS {
17459
17461
  }
17460
17462
  const WmsLayer = makeRemote(WmsLayerBase);
17461
17463
 
17462
- var __defProp$P = Object.defineProperty;
17463
- var __defProps$k = Object.defineProperties;
17464
- var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
17465
- var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
17466
- var __hasOwnProp$x = Object.prototype.hasOwnProperty;
17467
- var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
17468
- var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17469
- var __spreadValues$w = (a, b) => {
17464
+ var __defProp$Q = Object.defineProperty;
17465
+ var __defProps$l = Object.defineProperties;
17466
+ var __getOwnPropDescs$l = Object.getOwnPropertyDescriptors;
17467
+ var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
17468
+ var __hasOwnProp$y = Object.prototype.hasOwnProperty;
17469
+ var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
17470
+ var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17471
+ var __spreadValues$x = (a, b) => {
17470
17472
  for (var prop in b || (b = {}))
17471
- if (__hasOwnProp$x.call(b, prop))
17472
- __defNormalProp$P(a, prop, b[prop]);
17473
- if (__getOwnPropSymbols$x)
17474
- for (var prop of __getOwnPropSymbols$x(b)) {
17475
- if (__propIsEnum$x.call(b, prop))
17476
- __defNormalProp$P(a, prop, b[prop]);
17473
+ if (__hasOwnProp$y.call(b, prop))
17474
+ __defNormalProp$Q(a, prop, b[prop]);
17475
+ if (__getOwnPropSymbols$y)
17476
+ for (var prop of __getOwnPropSymbols$y(b)) {
17477
+ if (__propIsEnum$y.call(b, prop))
17478
+ __defNormalProp$Q(a, prop, b[prop]);
17477
17479
  }
17478
17480
  return a;
17479
17481
  };
17480
- var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
17482
+ var __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b));
17481
17483
  var __objRest$6 = (source, exclude) => {
17482
17484
  var target = {};
17483
17485
  for (var prop in source)
17484
- if (__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0)
17486
+ if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0)
17485
17487
  target[prop] = source[prop];
17486
- if (source != null && __getOwnPropSymbols$x)
17487
- for (var prop of __getOwnPropSymbols$x(source)) {
17488
- if (exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop))
17488
+ if (source != null && __getOwnPropSymbols$y)
17489
+ for (var prop of __getOwnPropSymbols$y(source)) {
17490
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop))
17489
17491
  target[prop] = source[prop];
17490
17492
  }
17491
17493
  return target;
@@ -17495,7 +17497,7 @@ class WmsAdapter extends BaseAdapter {
17495
17497
  Object.assign(this.options, options);
17496
17498
  const _a = options, { url } = _a, opt = __objRest$6(_a, ["url"]);
17497
17499
  if (url) {
17498
- const layerOptions = __spreadValues$w({
17500
+ const layerOptions = __spreadValues$x({
17499
17501
  pane: this.pane,
17500
17502
  attribution: opt.attribution,
17501
17503
  minZoom: opt.minZoom,
@@ -17506,7 +17508,7 @@ class WmsAdapter extends BaseAdapter {
17506
17508
  }, options.nativeOptions);
17507
17509
  let layer;
17508
17510
  if (opt.headers || opt.withCredentials) {
17509
- layer = new WmsLayer(url, __spreadProps$k(__spreadValues$w({}, layerOptions), {
17511
+ layer = new WmsLayer(url, __spreadProps$l(__spreadValues$x({}, layerOptions), {
17510
17512
  headers: opt.headers,
17511
17513
  withCredentials: opt.withCredentials
17512
17514
  }));
@@ -17526,33 +17528,33 @@ function arrayToBoundsExpression(bounds) {
17526
17528
  ];
17527
17529
  }
17528
17530
 
17529
- var __defProp$O = Object.defineProperty;
17530
- var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
17531
- var __hasOwnProp$w = Object.prototype.hasOwnProperty;
17532
- var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
17533
- var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17534
- var __spreadValues$v = (a, b) => {
17531
+ var __defProp$P = Object.defineProperty;
17532
+ var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
17533
+ var __hasOwnProp$x = Object.prototype.hasOwnProperty;
17534
+ var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
17535
+ var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17536
+ var __spreadValues$w = (a, b) => {
17535
17537
  for (var prop in b || (b = {}))
17536
- if (__hasOwnProp$w.call(b, prop))
17537
- __defNormalProp$O(a, prop, b[prop]);
17538
- if (__getOwnPropSymbols$w)
17539
- for (var prop of __getOwnPropSymbols$w(b)) {
17540
- if (__propIsEnum$w.call(b, prop))
17541
- __defNormalProp$O(a, prop, b[prop]);
17538
+ if (__hasOwnProp$x.call(b, prop))
17539
+ __defNormalProp$P(a, prop, b[prop]);
17540
+ if (__getOwnPropSymbols$x)
17541
+ for (var prop of __getOwnPropSymbols$x(b)) {
17542
+ if (__propIsEnum$x.call(b, prop))
17543
+ __defNormalProp$P(a, prop, b[prop]);
17542
17544
  }
17543
17545
  return a;
17544
17546
  };
17545
- var __publicField$A = (obj, key, value) => __defNormalProp$O(obj, typeof key !== "symbol" ? key + "" : key, value);
17547
+ var __publicField$B = (obj, key, value) => __defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
17546
17548
  const _LeafletMapAdapter = class _LeafletMapAdapter {
17547
17549
  constructor() {
17548
- __publicField$A(this, "options", { target: "map" });
17549
- __publicField$A(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
17550
- __publicField$A(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
17551
- __publicField$A(this, "emitter", new EventEmitter());
17552
- __publicField$A(this, "map");
17553
- __publicField$A(this, "_resizeObserver");
17554
- __publicField$A(this, "_unselectCb", []);
17555
- __publicField$A(this, "_universalEvents", [
17550
+ __publicField$B(this, "options", { target: "map" });
17551
+ __publicField$B(this, "layerAdapters", _LeafletMapAdapter.layerAdapters);
17552
+ __publicField$B(this, "controlAdapters", _LeafletMapAdapter.controlAdapters);
17553
+ __publicField$B(this, "emitter", new EventEmitter());
17554
+ __publicField$B(this, "map");
17555
+ __publicField$B(this, "_resizeObserver");
17556
+ __publicField$B(this, "_unselectCb", []);
17557
+ __publicField$B(this, "_universalEvents", [
17556
17558
  "move",
17557
17559
  "zoom",
17558
17560
  "zoomend",
@@ -17560,14 +17562,14 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17560
17562
  "moveend",
17561
17563
  "movestart"
17562
17564
  ]);
17563
- __publicField$A(this, "_positionEvents", [
17565
+ __publicField$B(this, "_positionEvents", [
17564
17566
  "mousemove",
17565
17567
  "mouseout",
17566
17568
  "mouseover"
17567
17569
  ]);
17568
17570
  }
17569
17571
  create(options) {
17570
- this.options = __spreadValues$v({}, options);
17572
+ this.options = __spreadValues$w({}, options);
17571
17573
  if (this.options.target) {
17572
17574
  const {
17573
17575
  zoom,
@@ -17577,7 +17579,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17577
17579
  maxBounds: mb,
17578
17580
  mapAdapterOptions
17579
17581
  } = this.options;
17580
- this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$v({
17582
+ this.map = this.options.map || new leafletSrcExports.Map(this.options.target, __spreadValues$w({
17581
17583
  attributionControl: false,
17582
17584
  zoomControl: false,
17583
17585
  maxBounds: mb ? arrayToBoundsExpression(mb) : void 0,
@@ -17860,7 +17862,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
17860
17862
  }
17861
17863
  }
17862
17864
  };
17863
- __publicField$A(_LeafletMapAdapter, "layerAdapters", {
17865
+ __publicField$B(_LeafletMapAdapter, "layerAdapters", {
17864
17866
  GEOJSON: GeoJsonAdapter,
17865
17867
  IMAGE: ImageAdapter,
17866
17868
  TILE: TileAdapter,
@@ -17868,11 +17870,11 @@ __publicField$A(_LeafletMapAdapter, "layerAdapters", {
17868
17870
  // // MVT: MvtAdapter,
17869
17871
  OSM: OsmAdapter
17870
17872
  });
17871
- __publicField$A(_LeafletMapAdapter, "controlAdapters", {
17873
+ __publicField$B(_LeafletMapAdapter, "controlAdapters", {
17872
17874
  ZOOM: leafletSrcExports.Control.Zoom,
17873
17875
  ATTRIBUTION: AttributionControl
17874
17876
  });
17875
- __publicField$A(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
17877
+ __publicField$B(_LeafletMapAdapter, "Map", leafletSrcExports.Map);
17876
17878
  let LeafletMapAdapter = _LeafletMapAdapter;
17877
17879
 
17878
17880
  const svgPath = {
@@ -17960,23 +17962,23 @@ function template(str, data) {
17960
17962
  });
17961
17963
  }
17962
17964
 
17963
- var __defProp$N = Object.defineProperty;
17964
- var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
17965
- var __hasOwnProp$v = Object.prototype.hasOwnProperty;
17966
- var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
17967
- var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17968
- var __spreadValues$u = (a, b) => {
17965
+ var __defProp$O = Object.defineProperty;
17966
+ var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
17967
+ var __hasOwnProp$w = Object.prototype.hasOwnProperty;
17968
+ var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
17969
+ var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17970
+ var __spreadValues$v = (a, b) => {
17969
17971
  for (var prop in b || (b = {}))
17970
- if (__hasOwnProp$v.call(b, prop))
17971
- __defNormalProp$N(a, prop, b[prop]);
17972
- if (__getOwnPropSymbols$v)
17973
- for (var prop of __getOwnPropSymbols$v(b)) {
17974
- if (__propIsEnum$v.call(b, prop))
17975
- __defNormalProp$N(a, prop, b[prop]);
17972
+ if (__hasOwnProp$w.call(b, prop))
17973
+ __defNormalProp$O(a, prop, b[prop]);
17974
+ if (__getOwnPropSymbols$w)
17975
+ for (var prop of __getOwnPropSymbols$w(b)) {
17976
+ if (__propIsEnum$w.call(b, prop))
17977
+ __defNormalProp$O(a, prop, b[prop]);
17976
17978
  }
17977
17979
  return a;
17978
17980
  };
17979
- var __async$u = (__this, __arguments, generator) => {
17981
+ var __async$v = (__this, __arguments, generator) => {
17980
17982
  return new Promise((resolve, reject) => {
17981
17983
  var fulfilled = (value) => {
17982
17984
  try {
@@ -17997,7 +17999,7 @@ var __async$u = (__this, __arguments, generator) => {
17997
17999
  });
17998
18000
  };
17999
18001
  function apiRequest(opt) {
18000
- return __async$u(this, null, function* () {
18002
+ return __async$v(this, null, function* () {
18001
18003
  const { params, name, connector, requestOptions } = opt;
18002
18004
  const apiItems = yield connector.connect();
18003
18005
  let apiItem = apiItems && apiItems[name];
@@ -18035,7 +18037,7 @@ function apiRequest(opt) {
18035
18037
  }
18036
18038
  }
18037
18039
  if (url) {
18038
- return connector.makeQuery(url, params, __spreadValues$u({
18040
+ return connector.makeQuery(url, params, __spreadValues$v({
18039
18041
  cacheName: name
18040
18042
  }, requestOptions));
18041
18043
  } else {
@@ -18047,12 +18049,12 @@ function apiRequest(opt) {
18047
18049
  });
18048
18050
  }
18049
18051
 
18050
- var __defProp$M = Object.defineProperty;
18051
- var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18052
- var __publicField$z = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
18052
+ var __defProp$N = Object.defineProperty;
18053
+ var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18054
+ var __publicField$A = (obj, key, value) => __defNormalProp$N(obj, typeof key !== "symbol" ? key + "" : key, value);
18053
18055
  const _Cache = class _Cache {
18054
18056
  constructor(options = {}) {
18055
- __publicField$z(this, "cache", []);
18057
+ __publicField$A(this, "cache", []);
18056
18058
  var _a;
18057
18059
  const namespace = (_a = options.namespace) != null ? _a : "default";
18058
18060
  if (_Cache.instance[namespace]) {
@@ -18183,12 +18185,12 @@ const _Cache = class _Cache {
18183
18185
  return objectDeepEqual(itemProps || {}, objectRemoveEmpty(props));
18184
18186
  }
18185
18187
  };
18186
- __publicField$z(_Cache, "instance", {});
18188
+ __publicField$A(_Cache, "instance", {});
18187
18189
  let Cache = _Cache;
18188
18190
 
18189
18191
  var pkg = {
18190
18192
  name: "@nextgis/ngw-connector",
18191
- version: "3.0.0-alpha.16",
18193
+ version: "3.0.0-alpha.18",
18192
18194
  _priority: 12,
18193
18195
  description: "A lightweight HTTP client optimized for use with NextGIS Web API",
18194
18196
  main: "index.js",
@@ -18197,15 +18199,15 @@ var pkg = {
18197
18199
  jsdelivr: "lib/ngw-connector.global.prod.js",
18198
18200
  types: "lib/index.d.ts",
18199
18201
  dependencies: {
18200
- "@nextgis/cache": "^3.0.0-alpha.13",
18201
- "@nextgis/cancelable-promise": "^3.0.0-alpha.13",
18202
- "@nextgis/utils": "^3.0.0-alpha.13",
18202
+ "@nextgis/cache": "^3.0.0-alpha.17",
18203
+ "@nextgis/cancelable-promise": "^3.0.0-alpha.17",
18204
+ "@nextgis/utils": "^3.0.0-alpha.17",
18203
18205
  "@types/events": "^3.0.0",
18204
18206
  events: "*",
18205
18207
  "form-data": "^4.0.0"
18206
18208
  },
18207
18209
  devDependencies: {
18208
- "@nextgis/build-tools": "^3.0.0-alpha.13"
18210
+ "@nextgis/build-tools": "^3.0.0-alpha.17"
18209
18211
  },
18210
18212
  scripts: {
18211
18213
  clean: "rimraf ./lib",
@@ -18252,46 +18254,46 @@ class AbortError extends Error {
18252
18254
  }
18253
18255
  }
18254
18256
 
18255
- var __defProp$L = Object.defineProperty;
18256
- var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18257
- var __publicField$y = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
18257
+ var __defProp$M = Object.defineProperty;
18258
+ var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18259
+ var __publicField$z = (obj, key, value) => __defNormalProp$M(obj, typeof key !== "symbol" ? key + "" : key, value);
18258
18260
  class NgwError extends Error {
18259
18261
  constructor(er) {
18260
18262
  super();
18261
- __publicField$y(this, "name", "NgwError");
18262
- __publicField$y(this, "title");
18263
- __publicField$y(this, "message");
18264
- __publicField$y(this, "detail");
18265
- __publicField$y(this, "exception");
18266
- __publicField$y(this, "status_code");
18267
- __publicField$y(this, "data");
18268
- __publicField$y(this, "guru_meditation");
18263
+ __publicField$z(this, "name", "NgwError");
18264
+ __publicField$z(this, "title");
18265
+ __publicField$z(this, "message");
18266
+ __publicField$z(this, "detail");
18267
+ __publicField$z(this, "exception");
18268
+ __publicField$z(this, "status_code");
18269
+ __publicField$z(this, "data");
18270
+ __publicField$z(this, "guru_meditation");
18269
18271
  Object.assign(this, er);
18270
18272
  Object.setPrototypeOf(this, NgwError.prototype);
18271
18273
  }
18272
18274
  }
18273
18275
 
18274
- var __defProp$K = Object.defineProperty;
18275
- var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18276
- var __publicField$x = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
18276
+ var __defProp$L = Object.defineProperty;
18277
+ var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18278
+ var __publicField$y = (obj, key, value) => __defNormalProp$L(obj, typeof key !== "symbol" ? key + "" : key, value);
18277
18279
  class InsufficientPermissionsError extends NgwError {
18278
18280
  constructor(obj) {
18279
18281
  super(obj);
18280
- __publicField$x(this, "name", "InsufficientPermissionsError");
18281
- __publicField$x(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
18282
+ __publicField$y(this, "name", "InsufficientPermissionsError");
18283
+ __publicField$y(this, "exception", "nextgisweb.core.exception.InsufficientPermissions");
18282
18284
  Object.setPrototypeOf(this, InsufficientPermissionsError.prototype);
18283
18285
  }
18284
18286
  }
18285
18287
 
18286
- var __defProp$J = Object.defineProperty;
18287
- var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18288
- var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, typeof key !== "symbol" ? key + "" : key, value);
18288
+ var __defProp$K = Object.defineProperty;
18289
+ var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18290
+ var __publicField$x = (obj, key, value) => __defNormalProp$K(obj, typeof key !== "symbol" ? key + "" : key, value);
18289
18291
  let NetworksResponseError$1 = class NetworksResponseError extends NgwError {
18290
18292
  constructor(obj) {
18291
18293
  super(obj);
18292
- __publicField$w(this, "message", "There is no response from the server or problem connecting to server.");
18293
- __publicField$w(this, "title", "Network error");
18294
- __publicField$w(this, "detail", "Check network connectivity and try again later.");
18294
+ __publicField$x(this, "message", "There is no response from the server or problem connecting to server.");
18295
+ __publicField$x(this, "title", "Network error");
18296
+ __publicField$x(this, "detail", "Check network connectivity and try again later.");
18295
18297
  Object.setPrototypeOf(this, NetworksResponseError.prototype);
18296
18298
  }
18297
18299
  };
@@ -18328,27 +18330,27 @@ function isError(error) {
18328
18330
  return false;
18329
18331
  }
18330
18332
 
18331
- var __defProp$I = Object.defineProperty;
18332
- var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18333
- var __publicField$v = (obj, key, value) => __defNormalProp$I(obj, key + "" , value);
18333
+ var __defProp$J = Object.defineProperty;
18334
+ var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18335
+ var __publicField$w = (obj, key, value) => __defNormalProp$J(obj, key + "" , value);
18334
18336
  class NetworkError extends Error {
18335
18337
  constructor(url) {
18336
18338
  super();
18337
- __publicField$v(this, "name", "NetworkError");
18339
+ __publicField$w(this, "name", "NetworkError");
18338
18340
  Object.setPrototypeOf(this, NetworkError.prototype);
18339
18341
  this.message = `Unable to request ${url}.
18340
18342
  Possibly invalid NGW URL entered or CORS not configured to get request from ${location.origin}`;
18341
18343
  }
18342
18344
  }
18343
18345
 
18344
- var __defProp$H = Object.defineProperty;
18345
- var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18346
- var __publicField$u = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
18346
+ var __defProp$I = Object.defineProperty;
18347
+ var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18348
+ var __publicField$v = (obj, key, value) => __defNormalProp$I(obj, typeof key !== "symbol" ? key + "" : key, value);
18347
18349
  class ResourceNotFoundError extends NgwError {
18348
18350
  constructor(obj) {
18349
18351
  super(obj);
18350
- __publicField$u(this, "name", "ResourceNotFoundError");
18351
- __publicField$u(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
18352
+ __publicField$v(this, "name", "ResourceNotFoundError");
18353
+ __publicField$v(this, "exception", "nextgisweb.resource.exception.ResourceNotFound");
18352
18354
  Object.setPrototypeOf(this, ResourceNotFoundError.prototype);
18353
18355
  }
18354
18356
  }
@@ -18365,13 +18367,13 @@ var errors = /*#__PURE__*/Object.freeze({
18365
18367
  isError: isError
18366
18368
  });
18367
18369
 
18368
- var __defProp$G = Object.defineProperty;
18369
- var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18370
- var __publicField$t = (obj, key, value) => __defNormalProp$G(obj, typeof key !== "symbol" ? key + "" : key, value);
18370
+ var __defProp$H = Object.defineProperty;
18371
+ var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18372
+ var __publicField$u = (obj, key, value) => __defNormalProp$H(obj, typeof key !== "symbol" ? key + "" : key, value);
18371
18373
  class BaseAPIError extends Error {
18372
18374
  constructor(message) {
18373
18375
  super(message || "Something went wrong.");
18374
- __publicField$t(this, "title");
18376
+ __publicField$u(this, "title");
18375
18377
  this.name = "BaseAPIError";
18376
18378
  this.title = "Unknown API error";
18377
18379
  if (Error.captureStackTrace) {
@@ -18383,7 +18385,7 @@ class NetworksResponseError extends BaseAPIError {
18383
18385
  // prettier-ignore
18384
18386
  constructor(message) {
18385
18387
  super(message || "There is no response from the server or problem connecting to server.");
18386
- __publicField$t(this, "detail");
18388
+ __publicField$u(this, "detail");
18387
18389
  this.title = "Network error";
18388
18390
  this.detail = "Check network connectivity and try again later.";
18389
18391
  }
@@ -18397,8 +18399,8 @@ class InvalidResponseError extends BaseAPIError {
18397
18399
  class ServerResponseError extends BaseAPIError {
18398
18400
  constructor(data) {
18399
18401
  super(data.message);
18400
- __publicField$t(this, "detail");
18401
- __publicField$t(this, "data");
18402
+ __publicField$u(this, "detail");
18403
+ __publicField$u(this, "data");
18402
18404
  this.title = data.title || this.title;
18403
18405
  this.detail = data.detail || null;
18404
18406
  this.data = data;
@@ -18408,8 +18410,8 @@ class LunkwillError extends Error {
18408
18410
  // prettier-ignore
18409
18411
  constructor(message, data = {}) {
18410
18412
  super(message || "Unexpected error while processing long-running request.");
18411
- __publicField$t(this, "title");
18412
- __publicField$t(this, "data");
18413
+ __publicField$u(this, "title");
18414
+ __publicField$u(this, "data");
18413
18415
  this.name = "LunkwillError";
18414
18416
  this.title = "Long-running request error";
18415
18417
  this.data = data;
@@ -18429,35 +18431,35 @@ class LunkwillRequestFailed extends LunkwillError {
18429
18431
  }
18430
18432
  }
18431
18433
 
18432
- var __defProp$F = Object.defineProperty;
18433
- var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
18434
- var __hasOwnProp$u = Object.prototype.hasOwnProperty;
18435
- var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
18436
- var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18437
- var __spreadValues$t = (a, b) => {
18434
+ var __defProp$G = Object.defineProperty;
18435
+ var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
18436
+ var __hasOwnProp$v = Object.prototype.hasOwnProperty;
18437
+ var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
18438
+ var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18439
+ var __spreadValues$u = (a, b) => {
18438
18440
  for (var prop in b || (b = {}))
18439
- if (__hasOwnProp$u.call(b, prop))
18440
- __defNormalProp$F(a, prop, b[prop]);
18441
- if (__getOwnPropSymbols$u)
18442
- for (var prop of __getOwnPropSymbols$u(b)) {
18443
- if (__propIsEnum$u.call(b, prop))
18444
- __defNormalProp$F(a, prop, b[prop]);
18441
+ if (__hasOwnProp$v.call(b, prop))
18442
+ __defNormalProp$G(a, prop, b[prop]);
18443
+ if (__getOwnPropSymbols$v)
18444
+ for (var prop of __getOwnPropSymbols$v(b)) {
18445
+ if (__propIsEnum$v.call(b, prop))
18446
+ __defNormalProp$G(a, prop, b[prop]);
18445
18447
  }
18446
18448
  return a;
18447
18449
  };
18448
18450
  var __objRest$5 = (source, exclude) => {
18449
18451
  var target = {};
18450
18452
  for (var prop in source)
18451
- if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
18453
+ if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0)
18452
18454
  target[prop] = source[prop];
18453
- if (source != null && __getOwnPropSymbols$u)
18454
- for (var prop of __getOwnPropSymbols$u(source)) {
18455
- if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
18455
+ if (source != null && __getOwnPropSymbols$v)
18456
+ for (var prop of __getOwnPropSymbols$v(source)) {
18457
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop))
18456
18458
  target[prop] = source[prop];
18457
18459
  }
18458
18460
  return target;
18459
18461
  };
18460
- var __async$t = (__this, __arguments, generator) => {
18462
+ var __async$u = (__this, __arguments, generator) => {
18461
18463
  return new Promise((resolve, reject) => {
18462
18464
  var fulfilled = (value) => {
18463
18465
  try {
@@ -18482,7 +18484,7 @@ function lunkwillCheckResponse(lwResp) {
18482
18484
  return ct !== void 0 && ct !== null && ct.includes("application/vnd.lunkwill.request-summary+json");
18483
18485
  }
18484
18486
  function responseJson(response) {
18485
- return __async$t(this, null, function* () {
18487
+ return __async$u(this, null, function* () {
18486
18488
  try {
18487
18489
  return response.json();
18488
18490
  } catch (e) {
@@ -18491,7 +18493,7 @@ function responseJson(response) {
18491
18493
  });
18492
18494
  }
18493
18495
  function lunkwillResponseUrl(lwResp) {
18494
- return __async$t(this, null, function* () {
18496
+ return __async$u(this, null, function* () {
18495
18497
  const lwData = yield responseJson(lwResp);
18496
18498
  let delay = lwData.delay_ms;
18497
18499
  const retry = lwData.retry_ms !== void 0 ? lwData.retry_ms : 2e3;
@@ -18535,7 +18537,7 @@ function lunkwillResponseUrl(lwResp) {
18535
18537
  });
18536
18538
  }
18537
18539
  function lunkwillFetch(lwRespUrl) {
18538
- return __async$t(this, null, function* () {
18540
+ return __async$u(this, null, function* () {
18539
18541
  try {
18540
18542
  return yield window.fetch(lwRespUrl, { credentials: "same-origin" });
18541
18543
  } catch (e) {
@@ -18583,14 +18585,14 @@ function generateUrl(path, query) {
18583
18585
  return path + urlParams;
18584
18586
  }
18585
18587
  function request(path, options, cacheEngine) {
18586
- return __async$t(this, null, function* () {
18588
+ return __async$u(this, null, function* () {
18587
18589
  var _b, _c;
18588
18590
  const defaults = {
18589
18591
  method: "GET",
18590
18592
  credentials: "same-origin",
18591
18593
  headers: {}
18592
18594
  };
18593
- const _a = __spreadValues$t(__spreadValues$t({}, defaults), options), {
18595
+ const _a = __spreadValues$u(__spreadValues$u({}, defaults), options), {
18594
18596
  withCredentials,
18595
18597
  responseType,
18596
18598
  cacheProps,
@@ -18627,7 +18629,7 @@ function request(path, options, cacheEngine) {
18627
18629
  opt.headers = headers;
18628
18630
  }
18629
18631
  const url = generateUrl(path, query);
18630
- const makeRequest = () => __async$t(this, null, function* () {
18632
+ const makeRequest = () => __async$u(this, null, function* () {
18631
18633
  let response;
18632
18634
  try {
18633
18635
  response = yield fetch(url, opt);
@@ -18670,7 +18672,7 @@ function request(path, options, cacheEngine) {
18670
18672
  if (cacheEngine) {
18671
18673
  if (((_c = opt.method) == null ? void 0 : _c.toUpperCase()) === "GET") {
18672
18674
  if (cache !== false) {
18673
- const props = cacheProps ? cacheProps : __spreadValues$t({}, objectRemoveEmpty({
18675
+ const props = cacheProps ? cacheProps : __spreadValues$u({}, objectRemoveEmpty({
18674
18676
  withCredentials,
18675
18677
  responseType
18676
18678
  }));
@@ -18690,38 +18692,38 @@ function request(path, options, cacheEngine) {
18690
18692
  });
18691
18693
  }
18692
18694
 
18693
- var __defProp$E = Object.defineProperty;
18694
- var __defProps$j = Object.defineProperties;
18695
- var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
18696
- var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
18697
- var __hasOwnProp$t = Object.prototype.hasOwnProperty;
18698
- var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
18699
- var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18700
- var __spreadValues$s = (a, b) => {
18695
+ var __defProp$F = Object.defineProperty;
18696
+ var __defProps$k = Object.defineProperties;
18697
+ var __getOwnPropDescs$k = Object.getOwnPropertyDescriptors;
18698
+ var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
18699
+ var __hasOwnProp$u = Object.prototype.hasOwnProperty;
18700
+ var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
18701
+ var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18702
+ var __spreadValues$t = (a, b) => {
18701
18703
  for (var prop in b || (b = {}))
18702
- if (__hasOwnProp$t.call(b, prop))
18703
- __defNormalProp$E(a, prop, b[prop]);
18704
- if (__getOwnPropSymbols$t)
18705
- for (var prop of __getOwnPropSymbols$t(b)) {
18706
- if (__propIsEnum$t.call(b, prop))
18707
- __defNormalProp$E(a, prop, b[prop]);
18704
+ if (__hasOwnProp$u.call(b, prop))
18705
+ __defNormalProp$F(a, prop, b[prop]);
18706
+ if (__getOwnPropSymbols$u)
18707
+ for (var prop of __getOwnPropSymbols$u(b)) {
18708
+ if (__propIsEnum$u.call(b, prop))
18709
+ __defNormalProp$F(a, prop, b[prop]);
18708
18710
  }
18709
18711
  return a;
18710
18712
  };
18711
- var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
18713
+ var __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b));
18712
18714
  var __objRest$4 = (source, exclude) => {
18713
18715
  var target = {};
18714
18716
  for (var prop in source)
18715
- if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
18717
+ if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
18716
18718
  target[prop] = source[prop];
18717
- if (source != null && __getOwnPropSymbols$t)
18718
- for (var prop of __getOwnPropSymbols$t(source)) {
18719
- if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
18719
+ if (source != null && __getOwnPropSymbols$u)
18720
+ for (var prop of __getOwnPropSymbols$u(source)) {
18721
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
18720
18722
  target[prop] = source[prop];
18721
18723
  }
18722
18724
  return target;
18723
18725
  };
18724
- var __async$s = (__this, __arguments, generator) => {
18726
+ var __async$t = (__this, __arguments, generator) => {
18725
18727
  return new Promise((resolve, reject) => {
18726
18728
  var fulfilled = (value) => {
18727
18729
  try {
@@ -18772,7 +18774,7 @@ function routeURL(name, baseUrl, routeData, ...rest) {
18772
18774
  }
18773
18775
  function route(name, connector, ...rest) {
18774
18776
  const result = {
18775
- url: (opt) => __async$s(this, null, function* () {
18777
+ url: (opt) => __async$t(this, null, function* () {
18776
18778
  var _a;
18777
18779
  const routeData = yield connector.connect();
18778
18780
  const template = routeURL(
@@ -18800,10 +18802,10 @@ function route(name, connector, ...rest) {
18800
18802
  routeData,
18801
18803
  ...rest
18802
18804
  );
18803
- const headers = objectRemoveEmpty(__spreadValues$s(__spreadValues$s({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
18805
+ const headers = objectRemoveEmpty(__spreadValues$t(__spreadValues$t({}, connector.getAuthorizationHeaders()), optHeaders != null ? optHeaders : {}));
18804
18806
  return request(
18805
18807
  template,
18806
- __spreadProps$j(__spreadValues$s({
18808
+ __spreadProps$k(__spreadValues$t({
18807
18809
  headers
18808
18810
  }, restOpt), {
18809
18811
  method
@@ -18927,39 +18929,39 @@ function removeConnector(connector) {
18927
18929
  }
18928
18930
  }
18929
18931
 
18930
- var __defProp$D = Object.defineProperty;
18931
- var __defProps$i = Object.defineProperties;
18932
- var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
18933
- var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
18934
- var __hasOwnProp$s = Object.prototype.hasOwnProperty;
18935
- var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
18936
- var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18937
- var __spreadValues$r = (a, b) => {
18932
+ var __defProp$E = Object.defineProperty;
18933
+ var __defProps$j = Object.defineProperties;
18934
+ var __getOwnPropDescs$j = Object.getOwnPropertyDescriptors;
18935
+ var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
18936
+ var __hasOwnProp$t = Object.prototype.hasOwnProperty;
18937
+ var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
18938
+ var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18939
+ var __spreadValues$s = (a, b) => {
18938
18940
  for (var prop in b || (b = {}))
18939
- if (__hasOwnProp$s.call(b, prop))
18940
- __defNormalProp$D(a, prop, b[prop]);
18941
- if (__getOwnPropSymbols$s)
18942
- for (var prop of __getOwnPropSymbols$s(b)) {
18943
- if (__propIsEnum$s.call(b, prop))
18944
- __defNormalProp$D(a, prop, b[prop]);
18941
+ if (__hasOwnProp$t.call(b, prop))
18942
+ __defNormalProp$E(a, prop, b[prop]);
18943
+ if (__getOwnPropSymbols$t)
18944
+ for (var prop of __getOwnPropSymbols$t(b)) {
18945
+ if (__propIsEnum$t.call(b, prop))
18946
+ __defNormalProp$E(a, prop, b[prop]);
18945
18947
  }
18946
18948
  return a;
18947
18949
  };
18948
- var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
18950
+ var __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b));
18949
18951
  var __objRest$3 = (source, exclude) => {
18950
18952
  var target = {};
18951
18953
  for (var prop in source)
18952
- if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
18954
+ if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
18953
18955
  target[prop] = source[prop];
18954
- if (source != null && __getOwnPropSymbols$s)
18955
- for (var prop of __getOwnPropSymbols$s(source)) {
18956
- if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
18956
+ if (source != null && __getOwnPropSymbols$t)
18957
+ for (var prop of __getOwnPropSymbols$t(source)) {
18958
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
18957
18959
  target[prop] = source[prop];
18958
18960
  }
18959
18961
  return target;
18960
18962
  };
18961
- var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
18962
- var __async$r = (__this, __arguments, generator) => {
18963
+ var __publicField$t = (obj, key, value) => __defNormalProp$E(obj, typeof key !== "symbol" ? key + "" : key, value);
18964
+ var __async$s = (__this, __arguments, generator) => {
18963
18965
  return new Promise((resolve, reject) => {
18964
18966
  var fulfilled = (value) => {
18965
18967
  try {
@@ -18984,18 +18986,18 @@ let REQUEST_ID = 0;
18984
18986
  class NgwConnector {
18985
18987
  constructor(options) {
18986
18988
  this.options = options;
18987
- __publicField$s(this, "id", ID$2++);
18988
- __publicField$s(this, "emitter", new EventEmitter());
18989
- __publicField$s(this, "user");
18990
- __publicField$s(this, "cache");
18991
- __publicField$s(this, "withCredentials");
18989
+ __publicField$t(this, "id", ID$2++);
18990
+ __publicField$t(this, "emitter", new EventEmitter());
18991
+ __publicField$t(this, "user");
18992
+ __publicField$t(this, "cache");
18993
+ __publicField$t(this, "withCredentials");
18992
18994
  // Dedicated cache for route requests, as these are executed before any other requests.
18993
18995
  // This cache does not need to be cleared during the session.
18994
- __publicField$s(this, "routeCache");
18995
- __publicField$s(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18996
- __publicField$s(this, "routeStr", "/api/component/pyramid/route");
18997
- __publicField$s(this, "activeRequests", {});
18998
- __publicField$s(this, "requestTransform");
18996
+ __publicField$t(this, "routeCache");
18997
+ __publicField$t(this, "client", `NextGIS-NGW-Connector/${pkg.version}`);
18998
+ __publicField$t(this, "routeStr", "/api/component/pyramid/route");
18999
+ __publicField$t(this, "activeRequests", {});
19000
+ __publicField$t(this, "requestTransform");
18999
19001
  const exist = findConnector(options);
19000
19002
  this.cache = new Cache({ namespace: options.cacheId });
19001
19003
  this.routeCache = new Cache({ namespace: "routecache" });
@@ -19048,7 +19050,7 @@ class NgwConnector {
19048
19050
  * ```
19049
19051
  */
19050
19052
  connect() {
19051
- return __async$r(this, arguments, function* ({
19053
+ return __async$s(this, arguments, function* ({
19052
19054
  signal
19053
19055
  } = {}) {
19054
19056
  const auth = this.options.auth;
@@ -19087,14 +19089,14 @@ class NgwConnector {
19087
19089
  this.emitter.emit("logout");
19088
19090
  }
19089
19091
  getUserInfo(credentials, options) {
19090
- return __async$r(this, null, function* () {
19092
+ return __async$s(this, null, function* () {
19091
19093
  if (this.user && this.user.id) {
19092
19094
  return this.user;
19093
19095
  }
19094
19096
  if (credentials) {
19095
19097
  this.options.auth = credentials;
19096
19098
  }
19097
- const options_ = __spreadValues$r({
19099
+ const options_ = __spreadValues$s({
19098
19100
  headers: this.getAuthorizationHeaders(credentials),
19099
19101
  cache: true
19100
19102
  }, options);
@@ -19135,7 +19137,7 @@ class NgwConnector {
19135
19137
  this.activeRequests = {};
19136
19138
  }
19137
19139
  getActiveApiRequests() {
19138
- return __spreadValues$r({}, this.activeRequests);
19140
+ return __spreadValues$s({}, this.activeRequests);
19139
19141
  }
19140
19142
  route(name, ...rest) {
19141
19143
  return route(name, this, ...rest);
@@ -19147,7 +19149,7 @@ class NgwConnector {
19147
19149
  * @param options - Request options
19148
19150
  */
19149
19151
  makeQuery(_0, _1) {
19150
- return __async$r(this, arguments, function* (url, params, options = {}) {
19152
+ return __async$s(this, arguments, function* (url, params, options = {}) {
19151
19153
  var _b;
19152
19154
  url = (this.options.baseUrl ? this.options.baseUrl : "") + url;
19153
19155
  if (!url) {
@@ -19158,7 +19160,7 @@ class NgwConnector {
19158
19160
  url = template(url, restParams);
19159
19161
  }
19160
19162
  url = encodeURI(fixUrlStr(url));
19161
- options = __spreadValues$r({ withCredentials: this.withCredentials }, options);
19163
+ options = __spreadValues$s({ withCredentials: this.withCredentials }, options);
19162
19164
  const {
19163
19165
  cache,
19164
19166
  signal: externalSignal,
@@ -19180,7 +19182,7 @@ class NgwConnector {
19180
19182
  });
19181
19183
  }
19182
19184
  options.signal = internalSignal;
19183
- const createPromise = () => __async$r(this, null, function* () {
19185
+ const createPromise = () => __async$s(this, null, function* () {
19184
19186
  const id = REQUEST_ID++;
19185
19187
  this.activeRequests[id] = internalAbortController;
19186
19188
  try {
@@ -19190,7 +19192,7 @@ class NgwConnector {
19190
19192
  }
19191
19193
  });
19192
19194
  if (method === "GET" && cache !== false) {
19193
- const cacheOptions = cacheProps ? cacheProps : __spreadProps$i(__spreadValues$r({}, objectRemoveEmpty({
19195
+ const cacheOptions = cacheProps ? cacheProps : __spreadProps$j(__spreadValues$s({}, objectRemoveEmpty({
19194
19196
  headers,
19195
19197
  withCredentials,
19196
19198
  responseType,
@@ -19213,7 +19215,7 @@ class NgwConnector {
19213
19215
  var _a;
19214
19216
  if (this.user) {
19215
19217
  options = options || {};
19216
- options.headers = __spreadValues$r(__spreadValues$r({}, this.getAuthorizationHeaders()), options.headers);
19218
+ options.headers = __spreadValues$s(__spreadValues$s({}, this.getAuthorizationHeaders()), options.headers);
19217
19219
  }
19218
19220
  if (this.requestTransform) {
19219
19221
  const [transUrl, transOptions] = this.requestTransform(url, options);
@@ -19244,7 +19246,7 @@ class NgwConnector {
19244
19246
  });
19245
19247
  }
19246
19248
  _login(credentials, options) {
19247
- return __async$r(this, null, function* () {
19249
+ return __async$s(this, null, function* () {
19248
19250
  try {
19249
19251
  const data = yield this.getUserInfo(credentials, options);
19250
19252
  this.user = data;
@@ -19272,7 +19274,7 @@ class NgwConnector {
19272
19274
  return er;
19273
19275
  }
19274
19276
  }
19275
- __publicField$s(NgwConnector, "errors", errors);
19277
+ __publicField$t(NgwConnector, "errors", errors);
19276
19278
 
19277
19279
  function resourceCompare(res1, res2) {
19278
19280
  return objectDeepEqual(res1, res2);
@@ -19302,27 +19304,27 @@ function resourceToQuery(resource, prefix = "") {
19302
19304
  return query;
19303
19305
  }
19304
19306
 
19305
- var __defProp$C = Object.defineProperty;
19306
- var __defProps$h = Object.defineProperties;
19307
- var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
19308
- var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
19309
- var __hasOwnProp$r = Object.prototype.hasOwnProperty;
19310
- var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
19311
- var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19312
- var __spreadValues$q = (a, b) => {
19307
+ var __defProp$D = Object.defineProperty;
19308
+ var __defProps$i = Object.defineProperties;
19309
+ var __getOwnPropDescs$i = Object.getOwnPropertyDescriptors;
19310
+ var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
19311
+ var __hasOwnProp$s = Object.prototype.hasOwnProperty;
19312
+ var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
19313
+ var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19314
+ var __spreadValues$r = (a, b) => {
19313
19315
  for (var prop in b || (b = {}))
19314
- if (__hasOwnProp$r.call(b, prop))
19315
- __defNormalProp$C(a, prop, b[prop]);
19316
- if (__getOwnPropSymbols$r)
19317
- for (var prop of __getOwnPropSymbols$r(b)) {
19318
- if (__propIsEnum$r.call(b, prop))
19319
- __defNormalProp$C(a, prop, b[prop]);
19316
+ if (__hasOwnProp$s.call(b, prop))
19317
+ __defNormalProp$D(a, prop, b[prop]);
19318
+ if (__getOwnPropSymbols$s)
19319
+ for (var prop of __getOwnPropSymbols$s(b)) {
19320
+ if (__propIsEnum$s.call(b, prop))
19321
+ __defNormalProp$D(a, prop, b[prop]);
19320
19322
  }
19321
19323
  return a;
19322
19324
  };
19323
- var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
19324
- var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, typeof key !== "symbol" ? key + "" : key, value);
19325
- var __async$q = (__this, __arguments, generator) => {
19325
+ var __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
19326
+ var __publicField$s = (obj, key, value) => __defNormalProp$D(obj, typeof key !== "symbol" ? key + "" : key, value);
19327
+ var __async$r = (__this, __arguments, generator) => {
19326
19328
  return new Promise((resolve, reject) => {
19327
19329
  var fulfilled = (value) => {
19328
19330
  try {
@@ -19347,8 +19349,8 @@ class ResourcesControl {
19347
19349
  connector,
19348
19350
  cacheId
19349
19351
  }) {
19350
- __publicField$r(this, "cache");
19351
- __publicField$r(this, "connector");
19352
+ __publicField$s(this, "cache");
19353
+ __publicField$s(this, "connector");
19352
19354
  this.connector = connector;
19353
19355
  this.cache = new Cache({ namespace: cacheId });
19354
19356
  }
@@ -19363,7 +19365,7 @@ class ResourcesControl {
19363
19365
  * Fetching resource would be cached to speed up next call
19364
19366
  */
19365
19367
  getOne(resource, requestOptions) {
19366
- const opt = __spreadValues$q({}, requestOptions);
19368
+ const opt = __spreadValues$r({}, requestOptions);
19367
19369
  if (typeof resource === "string") ; else if (typeof resource === "number") ; else if (isObject(resource)) {
19368
19370
  if (resource.id !== void 0) {
19369
19371
  resource.id;
@@ -19440,8 +19442,8 @@ class ResourcesControl {
19440
19442
  } else {
19441
19443
  Object.assign(query, resourceToQuery(resource));
19442
19444
  }
19443
- return this.connector.route("resource.search").get(__spreadProps$h(__spreadValues$q({}, requestOptions), {
19444
- query: __spreadValues$q({
19445
+ return this.connector.route("resource.search").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
19446
+ query: __spreadValues$r({
19445
19447
  serialization: "full"
19446
19448
  }, query)
19447
19449
  })).then((resources) => {
@@ -19494,7 +19496,7 @@ class ResourcesControl {
19494
19496
  });
19495
19497
  }
19496
19498
  _getChildrenOf(_0, _1) {
19497
- return __async$q(this, arguments, function* (parentDef, requestOptions, _items = []) {
19499
+ return __async$r(this, arguments, function* (parentDef, requestOptions, _items = []) {
19498
19500
  let parent = void 0;
19499
19501
  if (typeof parentDef === "string") {
19500
19502
  parent = yield this.getId(parentDef, requestOptions);
@@ -19503,7 +19505,7 @@ class ResourcesControl {
19503
19505
  } else {
19504
19506
  parent = parentDef;
19505
19507
  }
19506
- const items = yield this.connector.route("resource.collection").get(__spreadProps$h(__spreadValues$q({}, requestOptions), {
19508
+ const items = yield this.connector.route("resource.collection").get(__spreadProps$i(__spreadValues$r({}, requestOptions), {
19507
19509
  query: {
19508
19510
  parent
19509
19511
  }
@@ -19531,7 +19533,7 @@ class ResourcesControl {
19531
19533
  });
19532
19534
  }
19533
19535
  _cleanResourceItemCache(id) {
19534
- return __async$q(this, null, function* () {
19536
+ return __async$r(this, null, function* () {
19535
19537
  var _a;
19536
19538
  const all = this.cache.all();
19537
19539
  const toDelete = [];
@@ -19584,13 +19586,13 @@ class ResourcesControl {
19584
19586
  }
19585
19587
  }
19586
19588
 
19587
- var __defProp$B = Object.defineProperty;
19588
- var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19589
- var __publicField$q = (obj, key, value) => __defNormalProp$B(obj, key + "" , value);
19589
+ var __defProp$C = Object.defineProperty;
19590
+ var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19591
+ var __publicField$r = (obj, key, value) => __defNormalProp$C(obj, key + "" , value);
19590
19592
  class NgwConnectorExtended extends NgwConnector {
19591
19593
  constructor(options) {
19592
19594
  super(options);
19593
- __publicField$q(this, "resources");
19595
+ __publicField$r(this, "resources");
19594
19596
  this.resources = new ResourcesControl({
19595
19597
  connector: this,
19596
19598
  cacheId: options.cacheId
@@ -19800,25 +19802,25 @@ class NgwConnectorExtended extends NgwConnector {
19800
19802
  }
19801
19803
  }
19802
19804
 
19803
- var __defProp$A = Object.defineProperty;
19804
- var __defProps$g = Object.defineProperties;
19805
- var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
19806
- var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
19807
- var __hasOwnProp$q = Object.prototype.hasOwnProperty;
19808
- var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
19809
- var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19810
- var __spreadValues$p = (a, b) => {
19805
+ var __defProp$B = Object.defineProperty;
19806
+ var __defProps$h = Object.defineProperties;
19807
+ var __getOwnPropDescs$h = Object.getOwnPropertyDescriptors;
19808
+ var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
19809
+ var __hasOwnProp$r = Object.prototype.hasOwnProperty;
19810
+ var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
19811
+ var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19812
+ var __spreadValues$q = (a, b) => {
19811
19813
  for (var prop in b || (b = {}))
19812
- if (__hasOwnProp$q.call(b, prop))
19813
- __defNormalProp$A(a, prop, b[prop]);
19814
- if (__getOwnPropSymbols$q)
19815
- for (var prop of __getOwnPropSymbols$q(b)) {
19816
- if (__propIsEnum$q.call(b, prop))
19817
- __defNormalProp$A(a, prop, b[prop]);
19814
+ if (__hasOwnProp$r.call(b, prop))
19815
+ __defNormalProp$B(a, prop, b[prop]);
19816
+ if (__getOwnPropSymbols$r)
19817
+ for (var prop of __getOwnPropSymbols$r(b)) {
19818
+ if (__propIsEnum$r.call(b, prop))
19819
+ __defNormalProp$B(a, prop, b[prop]);
19818
19820
  }
19819
19821
  return a;
19820
19822
  };
19821
- var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
19823
+ var __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b));
19822
19824
  function getNgwWebmapExtent(webmap) {
19823
19825
  const bottom = webmap["extent_bottom"];
19824
19826
  const left = webmap["extent_left"];
@@ -19885,14 +19887,14 @@ function fetchNgwResourceExtent(item, connector, options) {
19885
19887
  if (resource.cls && resource.parent && resource.cls.indexOf("style") !== -1) {
19886
19888
  return connector.getResource(resource.parent.id, options).then((res) => {
19887
19889
  if (res) {
19888
- return fetchNgwLayerExtent(__spreadProps$g(__spreadValues$p({}, options), {
19890
+ return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
19889
19891
  resourceId: res.resource.id,
19890
19892
  connector
19891
19893
  }));
19892
19894
  }
19893
19895
  });
19894
19896
  } else {
19895
- return fetchNgwLayerExtent(__spreadProps$g(__spreadValues$p({}, options), {
19897
+ return fetchNgwLayerExtent(__spreadProps$h(__spreadValues$q({}, options), {
19896
19898
  resourceId: resource.id,
19897
19899
  connector
19898
19900
  }));
@@ -19900,10 +19902,10 @@ function fetchNgwResourceExtent(item, connector, options) {
19900
19902
  }
19901
19903
  }
19902
19904
 
19903
- var __defProp$z = Object.defineProperty;
19904
- var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19905
- var __publicField$p = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
19906
- var __async$p = (__this, __arguments, generator) => {
19905
+ var __defProp$A = Object.defineProperty;
19906
+ var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
19907
+ var __publicField$q = (obj, key, value) => __defNormalProp$A(obj, typeof key !== "symbol" ? key + "" : key, value);
19908
+ var __async$q = (__this, __arguments, generator) => {
19907
19909
  return new Promise((resolve, reject) => {
19908
19910
  var fulfilled = (value) => {
19909
19911
  try {
@@ -19925,18 +19927,18 @@ var __async$p = (__this, __arguments, generator) => {
19925
19927
  };
19926
19928
  class NgwResource {
19927
19929
  constructor() {
19928
- __publicField$p(this, "item");
19929
- __publicField$p(this, "connector");
19930
- __publicField$p(this, "_extent");
19930
+ __publicField$q(this, "item");
19931
+ __publicField$q(this, "connector");
19932
+ __publicField$q(this, "_extent");
19931
19933
  }
19932
19934
  /** @deprecated use {@link NgwResource.getBounds} instead */
19933
19935
  getExtent() {
19934
- return __async$p(this, null, function* () {
19936
+ return __async$q(this, null, function* () {
19935
19937
  return this.getBounds();
19936
19938
  });
19937
19939
  }
19938
19940
  getBounds(options) {
19939
- return __async$p(this, null, function* () {
19941
+ return __async$q(this, null, function* () {
19940
19942
  if (this._extent) {
19941
19943
  return this._extent;
19942
19944
  }
@@ -19952,7 +19954,7 @@ class NgwResource {
19952
19954
  }
19953
19955
  }
19954
19956
 
19955
- var __async$o = (__this, __arguments, generator) => {
19957
+ var __async$p = (__this, __arguments, generator) => {
19956
19958
  return new Promise((resolve, reject) => {
19957
19959
  var fulfilled = (value) => {
19958
19960
  try {
@@ -19973,7 +19975,7 @@ var __async$o = (__this, __arguments, generator) => {
19973
19975
  });
19974
19976
  };
19975
19977
  function resourceIdFromLayerOptions(options, connector) {
19976
- return __async$o(this, null, function* () {
19978
+ return __async$p(this, null, function* () {
19977
19979
  const resource = options.resource;
19978
19980
  const item = resource;
19979
19981
  let { keyname, resourceId } = options;
@@ -19998,24 +20000,24 @@ function resourceIdFromLayerOptions(options, connector) {
19998
20000
  });
19999
20001
  }
20000
20002
 
20001
- var __defProp$y = Object.defineProperty;
20002
- var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
20003
- var __hasOwnProp$p = Object.prototype.hasOwnProperty;
20004
- var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
20005
- var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20006
- var __spreadValues$o = (a, b) => {
20003
+ var __defProp$z = Object.defineProperty;
20004
+ var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
20005
+ var __hasOwnProp$q = Object.prototype.hasOwnProperty;
20006
+ var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
20007
+ var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20008
+ var __spreadValues$p = (a, b) => {
20007
20009
  for (var prop in b || (b = {}))
20008
- if (__hasOwnProp$p.call(b, prop))
20009
- __defNormalProp$y(a, prop, b[prop]);
20010
- if (__getOwnPropSymbols$p)
20011
- for (var prop of __getOwnPropSymbols$p(b)) {
20012
- if (__propIsEnum$p.call(b, prop))
20013
- __defNormalProp$y(a, prop, b[prop]);
20010
+ if (__hasOwnProp$q.call(b, prop))
20011
+ __defNormalProp$z(a, prop, b[prop]);
20012
+ if (__getOwnPropSymbols$q)
20013
+ for (var prop of __getOwnPropSymbols$q(b)) {
20014
+ if (__propIsEnum$q.call(b, prop))
20015
+ __defNormalProp$z(a, prop, b[prop]);
20014
20016
  }
20015
20017
  return a;
20016
20018
  };
20017
- var __publicField$o = (obj, key, value) => __defNormalProp$y(obj, typeof key !== "symbol" ? key + "" : key, value);
20018
- var __async$n = (__this, __arguments, generator) => {
20019
+ var __publicField$p = (obj, key, value) => __defNormalProp$z(obj, typeof key !== "symbol" ? key + "" : key, value);
20020
+ var __async$o = (__this, __arguments, generator) => {
20019
20021
  return new Promise((resolve, reject) => {
20020
20022
  var fulfilled = (value) => {
20021
20023
  try {
@@ -20036,7 +20038,7 @@ var __async$n = (__this, __arguments, generator) => {
20036
20038
  });
20037
20039
  };
20038
20040
  function createOnFirstShowAdapter(_0) {
20039
- return __async$n(this, arguments, function* ({
20041
+ return __async$o(this, arguments, function* ({
20040
20042
  webMap,
20041
20043
  adapterOptions = {},
20042
20044
  onLayerAdded,
@@ -20044,10 +20046,10 @@ function createOnFirstShowAdapter(_0) {
20044
20046
  }) {
20045
20047
  class OnFirstShowAdapter {
20046
20048
  constructor() {
20047
- __publicField$o(this, "options", {});
20048
- __publicField$o(this, "layer", []);
20049
- __publicField$o(this, "_removed", false);
20050
- __publicField$o(this, "_creatingInProgress", false);
20049
+ __publicField$p(this, "options", {});
20050
+ __publicField$p(this, "layer", []);
20051
+ __publicField$p(this, "_removed", false);
20052
+ __publicField$p(this, "_creatingInProgress", false);
20051
20053
  }
20052
20054
  addLayer() {
20053
20055
  return this.layer;
@@ -20062,7 +20064,7 @@ function createOnFirstShowAdapter(_0) {
20062
20064
  return this._removed;
20063
20065
  }
20064
20066
  showLayer() {
20065
- return __async$n(this, null, function* () {
20067
+ return __async$o(this, null, function* () {
20066
20068
  this.options.visibility = true;
20067
20069
  if (this.layer.length) {
20068
20070
  for (const x of this.layer) {
@@ -20074,7 +20076,7 @@ function createOnFirstShowAdapter(_0) {
20074
20076
  });
20075
20077
  }
20076
20078
  hideLayer() {
20077
- return __async$n(this, null, function* () {
20079
+ return __async$o(this, null, function* () {
20078
20080
  this.options.visibility = false;
20079
20081
  if (this.layer) {
20080
20082
  for (const x of this.layer) {
@@ -20084,12 +20086,12 @@ function createOnFirstShowAdapter(_0) {
20084
20086
  });
20085
20087
  }
20086
20088
  loadLayer() {
20087
- return __async$n(this, null, function* () {
20089
+ return __async$o(this, null, function* () {
20088
20090
  if (!this.layer.length && !this._creatingInProgress) {
20089
20091
  this._creatingInProgress = true;
20090
20092
  const Adapter = yield createAdapter(this);
20091
20093
  if (Adapter) {
20092
- const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$o({}, adapterOptions));
20094
+ const adapter = new Adapter(webMap.mapAdapter.map, __spreadValues$p({}, adapterOptions));
20093
20095
  const realLayer = yield adapter.addLayer({
20094
20096
  order: this.options.order,
20095
20097
  headers: this.options.headers,
@@ -20118,7 +20120,7 @@ function createOnFirstShowAdapter(_0) {
20118
20120
  });
20119
20121
  }
20120
20122
 
20121
- var __async$m = (__this, __arguments, generator) => {
20123
+ var __async$n = (__this, __arguments, generator) => {
20122
20124
  return new Promise((resolve, reject) => {
20123
20125
  var fulfilled = (value) => {
20124
20126
  try {
@@ -20139,7 +20141,7 @@ var __async$m = (__this, __arguments, generator) => {
20139
20141
  });
20140
20142
  };
20141
20143
  function createOnFirstShowNgwAdapter(_0) {
20142
- return __async$m(this, arguments, function* ({
20144
+ return __async$n(this, arguments, function* ({
20143
20145
  webMap,
20144
20146
  connector,
20145
20147
  item,
@@ -20177,26 +20179,26 @@ const config = {
20177
20179
  defaultRequestLimit: 7e3
20178
20180
  };
20179
20181
 
20180
- var __defProp$x = Object.defineProperty;
20181
- var __defProps$f = Object.defineProperties;
20182
- var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
20183
- var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
20184
- var __hasOwnProp$o = Object.prototype.hasOwnProperty;
20185
- var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
20186
- var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20187
- var __spreadValues$n = (a, b) => {
20182
+ var __defProp$y = Object.defineProperty;
20183
+ var __defProps$g = Object.defineProperties;
20184
+ var __getOwnPropDescs$g = Object.getOwnPropertyDescriptors;
20185
+ var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
20186
+ var __hasOwnProp$p = Object.prototype.hasOwnProperty;
20187
+ var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
20188
+ var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20189
+ var __spreadValues$o = (a, b) => {
20188
20190
  for (var prop in b || (b = {}))
20189
- if (__hasOwnProp$o.call(b, prop))
20190
- __defNormalProp$x(a, prop, b[prop]);
20191
- if (__getOwnPropSymbols$o)
20192
- for (var prop of __getOwnPropSymbols$o(b)) {
20193
- if (__propIsEnum$o.call(b, prop))
20194
- __defNormalProp$x(a, prop, b[prop]);
20191
+ if (__hasOwnProp$p.call(b, prop))
20192
+ __defNormalProp$y(a, prop, b[prop]);
20193
+ if (__getOwnPropSymbols$p)
20194
+ for (var prop of __getOwnPropSymbols$p(b)) {
20195
+ if (__propIsEnum$p.call(b, prop))
20196
+ __defNormalProp$y(a, prop, b[prop]);
20195
20197
  }
20196
20198
  return a;
20197
20199
  };
20198
- var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
20199
- var __async$l = (__this, __arguments, generator) => {
20200
+ var __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b));
20201
+ var __async$m = (__this, __arguments, generator) => {
20200
20202
  return new Promise((resolve, reject) => {
20201
20203
  var fulfilled = (value) => {
20202
20204
  try {
@@ -20263,7 +20265,7 @@ function paramListToQuery(paramList) {
20263
20265
  );
20264
20266
  }
20265
20267
  function createFeatureFieldFilterQueries(opt) {
20266
- return __async$l(this, null, function* () {
20268
+ return __async$m(this, null, function* () {
20267
20269
  const queries = getQueries(opt);
20268
20270
  const itemsParts = yield Promise.all(queries);
20269
20271
  const ids = [];
@@ -20307,13 +20309,13 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20307
20309
  for (const f of filters_) {
20308
20310
  if (isPropertyFilter(f)) {
20309
20311
  _queries.push(
20310
- fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$n({}, opt), {
20312
+ fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
20311
20313
  paramList: [..._parentAllParams, ...paramList, createParam(f)]
20312
20314
  }))
20313
20315
  );
20314
20316
  } else {
20315
20317
  getQueries(
20316
- __spreadProps$f(__spreadValues$n({}, opt), {
20318
+ __spreadProps$g(__spreadValues$o({}, opt), {
20317
20319
  filters: f
20318
20320
  }),
20319
20321
  _queries,
@@ -20334,7 +20336,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20334
20336
  if (propertiesFilterList.length) {
20335
20337
  for (const x of propertiesFilterList) {
20336
20338
  getQueries(
20337
- __spreadProps$f(__spreadValues$n({}, opt), {
20339
+ __spreadProps$g(__spreadValues$o({}, opt), {
20338
20340
  filters: x
20339
20341
  }),
20340
20342
  _queries,
@@ -20343,7 +20345,7 @@ function getQueries(opt, _queries = [], _parentAllParams = []) {
20343
20345
  }
20344
20346
  } else {
20345
20347
  _queries.push(
20346
- fetchNgwLayerItemsRequest(__spreadProps$f(__spreadValues$n({}, opt), {
20348
+ fetchNgwLayerItemsRequest(__spreadProps$g(__spreadValues$o({}, opt), {
20347
20349
  paramList: [..._parentAllParams, ...paramList, ...filters2]
20348
20350
  }))
20349
20351
  );
@@ -20359,7 +20361,7 @@ function createWktFromCoordArray(coord) {
20359
20361
  return `POLYGON((${polygon.join(", ")}))`;
20360
20362
  }
20361
20363
  function fetchNgwLayerItemsRequest(options) {
20362
- const params = __spreadValues$n({}, FEATURE_REQUEST_PARAMS);
20364
+ const params = __spreadValues$o({}, FEATURE_REQUEST_PARAMS);
20363
20365
  const {
20364
20366
  limit,
20365
20367
  query,
@@ -20397,7 +20399,7 @@ function fetchNgwLayerItemsRequest(options) {
20397
20399
  if (paramList) {
20398
20400
  Object.assign(params, paramListToQuery(paramList));
20399
20401
  }
20400
- return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$n(__spreadValues$n({}, params), query), cache, signal });
20402
+ return connector.route("feature_layer.feature.collection", { id: Number(resourceId) }).get({ query: __spreadValues$o(__spreadValues$o({}, params), query), cache, signal });
20401
20403
  }
20402
20404
 
20403
20405
  function prepareNgwFieldsToPropertiesFilter(fields) {
@@ -20426,26 +20428,26 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
20426
20428
  return fields;
20427
20429
  }
20428
20430
 
20429
- var __defProp$w = Object.defineProperty;
20430
- var __defProps$e = Object.defineProperties;
20431
- var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
20432
- var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
20433
- var __hasOwnProp$n = Object.prototype.hasOwnProperty;
20434
- var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
20435
- var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20436
- var __spreadValues$m = (a, b) => {
20431
+ var __defProp$x = Object.defineProperty;
20432
+ var __defProps$f = Object.defineProperties;
20433
+ var __getOwnPropDescs$f = Object.getOwnPropertyDescriptors;
20434
+ var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
20435
+ var __hasOwnProp$o = Object.prototype.hasOwnProperty;
20436
+ var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
20437
+ var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20438
+ var __spreadValues$n = (a, b) => {
20437
20439
  for (var prop in b || (b = {}))
20438
- if (__hasOwnProp$n.call(b, prop))
20439
- __defNormalProp$w(a, prop, b[prop]);
20440
- if (__getOwnPropSymbols$n)
20441
- for (var prop of __getOwnPropSymbols$n(b)) {
20442
- if (__propIsEnum$n.call(b, prop))
20443
- __defNormalProp$w(a, prop, b[prop]);
20440
+ if (__hasOwnProp$o.call(b, prop))
20441
+ __defNormalProp$x(a, prop, b[prop]);
20442
+ if (__getOwnPropSymbols$o)
20443
+ for (var prop of __getOwnPropSymbols$o(b)) {
20444
+ if (__propIsEnum$o.call(b, prop))
20445
+ __defNormalProp$x(a, prop, b[prop]);
20444
20446
  }
20445
20447
  return a;
20446
20448
  };
20447
- var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
20448
- var __async$k = (__this, __arguments, generator) => {
20449
+ var __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b));
20450
+ var __async$l = (__this, __arguments, generator) => {
20449
20451
  return new Promise((resolve, reject) => {
20450
20452
  var fulfilled = (value) => {
20451
20453
  try {
@@ -20466,17 +20468,17 @@ var __async$k = (__this, __arguments, generator) => {
20466
20468
  });
20467
20469
  };
20468
20470
  function fetchNgwLayerItems(options) {
20469
- return __async$k(this, null, function* () {
20471
+ return __async$l(this, null, function* () {
20470
20472
  var _a;
20471
20473
  const filters = options.filters;
20472
20474
  if (filters) {
20473
- let data = yield createFeatureFieldFilterQueries(__spreadProps$e(__spreadValues$m({}, options), {
20475
+ let data = yield createFeatureFieldFilterQueries(__spreadProps$f(__spreadValues$n({}, options), {
20474
20476
  filters
20475
20477
  }));
20476
20478
  const clientFilterValidate = (_a = options.clientFilterValidate) != null ? _a : isFilterWithAnyCase(filters);
20477
20479
  if (clientFilterValidate) {
20478
20480
  data = data.filter((y) => {
20479
- const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$e(__spreadValues$m({}, y.fields), {
20481
+ const fields = prepareNgwFieldsToPropertiesFilter(__spreadProps$f(__spreadValues$n({}, y.fields), {
20480
20482
  id: y.id
20481
20483
  }));
20482
20484
  const result = propertiesFilter(fields, filters);
@@ -20594,26 +20596,26 @@ function ngwApiToAdapterOptions({
20594
20596
  }
20595
20597
  }
20596
20598
 
20597
- var __defProp$v = Object.defineProperty;
20598
- var __defProps$d = Object.defineProperties;
20599
- var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
20600
- var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
20601
- var __hasOwnProp$m = Object.prototype.hasOwnProperty;
20602
- var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
20603
- var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20604
- var __spreadValues$l = (a, b) => {
20599
+ var __defProp$w = Object.defineProperty;
20600
+ var __defProps$e = Object.defineProperties;
20601
+ var __getOwnPropDescs$e = Object.getOwnPropertyDescriptors;
20602
+ var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
20603
+ var __hasOwnProp$n = Object.prototype.hasOwnProperty;
20604
+ var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
20605
+ var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20606
+ var __spreadValues$m = (a, b) => {
20605
20607
  for (var prop in b || (b = {}))
20606
- if (__hasOwnProp$m.call(b, prop))
20607
- __defNormalProp$v(a, prop, b[prop]);
20608
- if (__getOwnPropSymbols$m)
20609
- for (var prop of __getOwnPropSymbols$m(b)) {
20610
- if (__propIsEnum$m.call(b, prop))
20611
- __defNormalProp$v(a, prop, b[prop]);
20608
+ if (__hasOwnProp$n.call(b, prop))
20609
+ __defNormalProp$w(a, prop, b[prop]);
20610
+ if (__getOwnPropSymbols$n)
20611
+ for (var prop of __getOwnPropSymbols$n(b)) {
20612
+ if (__propIsEnum$n.call(b, prop))
20613
+ __defNormalProp$w(a, prop, b[prop]);
20612
20614
  }
20613
20615
  return a;
20614
20616
  };
20615
- var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
20616
- var __async$j = (__this, __arguments, generator) => {
20617
+ var __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b));
20618
+ var __async$k = (__this, __arguments, generator) => {
20617
20619
  return new Promise((resolve, reject) => {
20618
20620
  var fulfilled = (value) => {
20619
20621
  try {
@@ -20634,56 +20636,56 @@ var __async$j = (__this, __arguments, generator) => {
20634
20636
  });
20635
20637
  };
20636
20638
  function fetchNgwLayerItem(options) {
20637
- return __async$j(this, null, function* () {
20638
- const params = __spreadValues$l({}, FEATURE_REQUEST_PARAMS);
20639
+ return __async$k(this, null, function* () {
20640
+ const params = __spreadValues$m({}, FEATURE_REQUEST_PARAMS);
20639
20641
  updateItemRequestParam(params, options);
20640
20642
  const resp = yield options.connector.route("feature_layer.feature.item", {
20641
20643
  id: Number(options.resourceId),
20642
20644
  fid: options.featureId
20643
- }).get(__spreadProps$d(__spreadValues$l({}, options), { query: params }));
20644
- const toGeojson = () => __async$j(this, null, function* () {
20645
+ }).get(__spreadProps$e(__spreadValues$m({}, options), { query: params }));
20646
+ const toGeojson = () => __async$k(this, null, function* () {
20645
20647
  if (resp.geom) {
20646
20648
  return createGeoJsonFeature(resp);
20647
20649
  } else {
20648
- const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$d(__spreadValues$l({}, options), {
20650
+ const onlyGeomItem = yield fetchNgwLayerItem(__spreadProps$e(__spreadValues$m({}, options), {
20649
20651
  geom: true,
20650
20652
  fields: null,
20651
20653
  extensions: null
20652
20654
  }));
20653
20655
  const geom = onlyGeomItem.geom;
20654
- return createGeoJsonFeature(__spreadProps$d(__spreadValues$l({}, resp), { geom }));
20656
+ return createGeoJsonFeature(__spreadProps$e(__spreadValues$m({}, resp), { geom }));
20655
20657
  }
20656
20658
  });
20657
- return __spreadProps$d(__spreadValues$l({}, resp), {
20659
+ return __spreadProps$e(__spreadValues$m({}, resp), {
20658
20660
  toGeojson
20659
20661
  });
20660
20662
  });
20661
20663
  }
20662
20664
 
20663
- var __defProp$u = Object.defineProperty;
20664
- var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
20665
- var __hasOwnProp$l = Object.prototype.hasOwnProperty;
20666
- var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
20667
- var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20668
- var __spreadValues$k = (a, b) => {
20665
+ var __defProp$v = Object.defineProperty;
20666
+ var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
20667
+ var __hasOwnProp$m = Object.prototype.hasOwnProperty;
20668
+ var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
20669
+ var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20670
+ var __spreadValues$l = (a, b) => {
20669
20671
  for (var prop in b || (b = {}))
20670
- if (__hasOwnProp$l.call(b, prop))
20671
- __defNormalProp$u(a, prop, b[prop]);
20672
- if (__getOwnPropSymbols$l)
20673
- for (var prop of __getOwnPropSymbols$l(b)) {
20674
- if (__propIsEnum$l.call(b, prop))
20675
- __defNormalProp$u(a, prop, b[prop]);
20672
+ if (__hasOwnProp$m.call(b, prop))
20673
+ __defNormalProp$v(a, prop, b[prop]);
20674
+ if (__getOwnPropSymbols$m)
20675
+ for (var prop of __getOwnPropSymbols$m(b)) {
20676
+ if (__propIsEnum$m.call(b, prop))
20677
+ __defNormalProp$v(a, prop, b[prop]);
20676
20678
  }
20677
20679
  return a;
20678
20680
  };
20679
- var __publicField$n = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
20681
+ var __publicField$o = (obj, key, value) => __defNormalProp$v(obj, typeof key !== "symbol" ? key + "" : key, value);
20680
20682
  class BookmarkItem {
20681
20683
  constructor(options) {
20682
20684
  this.options = options;
20683
- __publicField$n(this, "name");
20684
- __publicField$n(this, "resourceId");
20685
- __publicField$n(this, "item");
20686
- __publicField$n(this, "_extent");
20685
+ __publicField$o(this, "name");
20686
+ __publicField$o(this, "resourceId");
20687
+ __publicField$o(this, "item");
20688
+ __publicField$o(this, "_extent");
20687
20689
  this.resourceId = options.resourceId;
20688
20690
  const item = options.item;
20689
20691
  this.item = item;
@@ -20713,7 +20715,7 @@ class BookmarkItem {
20713
20715
  if (this.item.geom) {
20714
20716
  return Promise.resolve(createGeoJsonFeature(this.item));
20715
20717
  } else {
20716
- return fetchNgwLayerItem(__spreadValues$k({
20718
+ return fetchNgwLayerItem(__spreadValues$l({
20717
20719
  resourceId: this.resourceId,
20718
20720
  featureId: this.item.id,
20719
20721
  connector: this.options.connector,
@@ -20731,19 +20733,19 @@ class BookmarkItem {
20731
20733
 
20732
20734
  const WEBMAP_BASELAYER_ID_PREFIX = "webmap-baselayer";
20733
20735
 
20734
- var __defProp$t = Object.defineProperty;
20735
- var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20736
- var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, typeof key !== "symbol" ? key + "" : key, value);
20736
+ var __defProp$u = Object.defineProperty;
20737
+ var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20738
+ var __publicField$n = (obj, key, value) => __defNormalProp$u(obj, typeof key !== "symbol" ? key + "" : key, value);
20737
20739
  class BaseProperty {
20738
20740
  constructor(name, item, options) {
20739
- __publicField$m(this, "options");
20740
- __publicField$m(this, "emitter", new EventEmitter());
20741
- __publicField$m(this, "name");
20742
- __publicField$m(this, "item");
20743
- __publicField$m(this, "_blocked", false);
20744
- __publicField$m(this, "_container");
20745
- __publicField$m(this, "_value");
20746
- __publicField$m(this, "_removeEventsListener");
20741
+ __publicField$n(this, "options");
20742
+ __publicField$n(this, "emitter", new EventEmitter());
20743
+ __publicField$n(this, "name");
20744
+ __publicField$n(this, "item");
20745
+ __publicField$n(this, "_blocked", false);
20746
+ __publicField$n(this, "_container");
20747
+ __publicField$n(this, "_value");
20748
+ __publicField$n(this, "_removeEventsListener");
20747
20749
  this.item = item;
20748
20750
  this.options = Object.assign({}, options);
20749
20751
  this.name = name;
@@ -20840,26 +20842,26 @@ class BaseProperty {
20840
20842
  }
20841
20843
  }
20842
20844
 
20843
- var __defProp$s = Object.defineProperty;
20844
- var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
20845
- var __hasOwnProp$k = Object.prototype.hasOwnProperty;
20846
- var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
20847
- var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20848
- var __spreadValues$j = (a, b) => {
20845
+ var __defProp$t = Object.defineProperty;
20846
+ var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
20847
+ var __hasOwnProp$l = Object.prototype.hasOwnProperty;
20848
+ var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
20849
+ var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20850
+ var __spreadValues$k = (a, b) => {
20849
20851
  for (var prop in b || (b = {}))
20850
- if (__hasOwnProp$k.call(b, prop))
20851
- __defNormalProp$s(a, prop, b[prop]);
20852
- if (__getOwnPropSymbols$k)
20853
- for (var prop of __getOwnPropSymbols$k(b)) {
20854
- if (__propIsEnum$k.call(b, prop))
20855
- __defNormalProp$s(a, prop, b[prop]);
20852
+ if (__hasOwnProp$l.call(b, prop))
20853
+ __defNormalProp$t(a, prop, b[prop]);
20854
+ if (__getOwnPropSymbols$l)
20855
+ for (var prop of __getOwnPropSymbols$l(b)) {
20856
+ if (__propIsEnum$l.call(b, prop))
20857
+ __defNormalProp$t(a, prop, b[prop]);
20856
20858
  }
20857
20859
  return a;
20858
20860
  };
20859
- var __publicField$l = (obj, key, value) => __defNormalProp$s(obj, key + "" , value);
20861
+ var __publicField$m = (obj, key, value) => __defNormalProp$t(obj, key + "" , value);
20860
20862
  const _CheckProperty = class _CheckProperty extends BaseProperty {
20861
20863
  constructor(name, item, options) {
20862
- super(name, item, __spreadValues$j(__spreadValues$j({}, _CheckProperty.options), options));
20864
+ super(name, item, __spreadValues$k(__spreadValues$k({}, _CheckProperty.options), options));
20863
20865
  this.set(this.get());
20864
20866
  }
20865
20867
  update(value, options) {
@@ -20955,7 +20957,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
20955
20957
  const child = children[fry];
20956
20958
  const property = child.properties && child.properties.property(this.name);
20957
20959
  if (property) {
20958
- property.set(value, __spreadValues$j(__spreadValues$j({}, options), {
20960
+ property.set(value, __spreadValues$k(__spreadValues$k({}, options), {
20959
20961
  propagation: true,
20960
20962
  bubble: false
20961
20963
  }));
@@ -20964,7 +20966,7 @@ const _CheckProperty = class _CheckProperty extends BaseProperty {
20964
20966
  }
20965
20967
  }
20966
20968
  };
20967
- __publicField$l(_CheckProperty, "options", {
20969
+ __publicField$m(_CheckProperty, "options", {
20968
20970
  hierarchy: true,
20969
20971
  bubble: false,
20970
20972
  propagation: false,
@@ -20973,31 +20975,31 @@ __publicField$l(_CheckProperty, "options", {
20973
20975
  });
20974
20976
  let CheckProperty = _CheckProperty;
20975
20977
 
20976
- var __defProp$r = Object.defineProperty;
20977
- var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
20978
- var __hasOwnProp$j = Object.prototype.hasOwnProperty;
20979
- var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
20980
- var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20981
- var __spreadValues$i = (a, b) => {
20978
+ var __defProp$s = Object.defineProperty;
20979
+ var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
20980
+ var __hasOwnProp$k = Object.prototype.hasOwnProperty;
20981
+ var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
20982
+ var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20983
+ var __spreadValues$j = (a, b) => {
20982
20984
  for (var prop in b || (b = {}))
20983
- if (__hasOwnProp$j.call(b, prop))
20984
- __defNormalProp$r(a, prop, b[prop]);
20985
- if (__getOwnPropSymbols$j)
20986
- for (var prop of __getOwnPropSymbols$j(b)) {
20987
- if (__propIsEnum$j.call(b, prop))
20988
- __defNormalProp$r(a, prop, b[prop]);
20985
+ if (__hasOwnProp$k.call(b, prop))
20986
+ __defNormalProp$s(a, prop, b[prop]);
20987
+ if (__getOwnPropSymbols$k)
20988
+ for (var prop of __getOwnPropSymbols$k(b)) {
20989
+ if (__propIsEnum$k.call(b, prop))
20990
+ __defNormalProp$s(a, prop, b[prop]);
20989
20991
  }
20990
20992
  return a;
20991
20993
  };
20992
- var __publicField$k = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
20994
+ var __publicField$l = (obj, key, value) => __defNormalProp$s(obj, typeof key !== "symbol" ? key + "" : key, value);
20993
20995
  const BOOLEAN_TYPE = "boolean";
20994
20996
  const STRING_TYPE = "string";
20995
20997
  const _ItemProperties = class _ItemProperties {
20996
20998
  constructor(item, propertiesList) {
20997
20999
  this.item = item;
20998
- __publicField$k(this, "options", {});
20999
- __publicField$k(this, "_properties", {});
21000
- __publicField$k(this, "_propertiesList", []);
21000
+ __publicField$l(this, "options", {});
21001
+ __publicField$l(this, "_properties", {});
21002
+ __publicField$l(this, "_propertiesList", []);
21001
21003
  if (propertiesList) {
21002
21004
  propertiesList.forEach(this._setPropertyHandler.bind(this));
21003
21005
  }
@@ -21037,7 +21039,7 @@ const _ItemProperties = class _ItemProperties {
21037
21039
  _setPropertyHandler(propOpt) {
21038
21040
  const Handler = this._getHandler(propOpt);
21039
21041
  if (Handler && propOpt.name) {
21040
- const options = __spreadValues$i({}, propOpt);
21042
+ const options = __spreadValues$j({}, propOpt);
21041
21043
  this._properties[propOpt.name] = new Handler(
21042
21044
  propOpt.name,
21043
21045
  this.item,
@@ -21060,7 +21062,7 @@ const _ItemProperties = class _ItemProperties {
21060
21062
  return Handler;
21061
21063
  }
21062
21064
  };
21063
- __publicField$k(_ItemProperties, "handlers", {
21065
+ __publicField$l(_ItemProperties, "handlers", {
21064
21066
  CheckProperty
21065
21067
  });
21066
21068
  let ItemProperties = _ItemProperties;
@@ -21167,14 +21169,14 @@ function treeEvery_(item, filterFunc = (x) => !!x, relation, _filtered = []) {
21167
21169
  return true;
21168
21170
  }
21169
21171
 
21170
- var __defProp$q = Object.defineProperty;
21171
- var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21172
- var __publicField$j = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
21172
+ var __defProp$r = Object.defineProperty;
21173
+ var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21174
+ var __publicField$k = (obj, key, value) => __defNormalProp$r(obj, typeof key !== "symbol" ? key + "" : key, value);
21173
21175
  class TreeHelper {
21174
21176
  constructor(item) {
21175
- __publicField$j(this, "item");
21176
- __publicField$j(this, "_children", []);
21177
- __publicField$j(this, "_parent");
21177
+ __publicField$k(this, "item");
21178
+ __publicField$k(this, "_children", []);
21179
+ __publicField$k(this, "_parent");
21178
21180
  this.item = item;
21179
21181
  }
21180
21182
  setParent(parent) {
@@ -21237,32 +21239,32 @@ class TreeHelper {
21237
21239
  }
21238
21240
  }
21239
21241
 
21240
- var __defProp$p = Object.defineProperty;
21241
- var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
21242
- var __hasOwnProp$i = Object.prototype.hasOwnProperty;
21243
- var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
21244
- var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21245
- var __spreadValues$h = (a, b) => {
21242
+ var __defProp$q = Object.defineProperty;
21243
+ var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
21244
+ var __hasOwnProp$j = Object.prototype.hasOwnProperty;
21245
+ var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
21246
+ var __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21247
+ var __spreadValues$i = (a, b) => {
21246
21248
  for (var prop in b || (b = {}))
21247
- if (__hasOwnProp$i.call(b, prop))
21248
- __defNormalProp$p(a, prop, b[prop]);
21249
- if (__getOwnPropSymbols$i)
21250
- for (var prop of __getOwnPropSymbols$i(b)) {
21251
- if (__propIsEnum$i.call(b, prop))
21252
- __defNormalProp$p(a, prop, b[prop]);
21249
+ if (__hasOwnProp$j.call(b, prop))
21250
+ __defNormalProp$q(a, prop, b[prop]);
21251
+ if (__getOwnPropSymbols$j)
21252
+ for (var prop of __getOwnPropSymbols$j(b)) {
21253
+ if (__propIsEnum$j.call(b, prop))
21254
+ __defNormalProp$q(a, prop, b[prop]);
21253
21255
  }
21254
21256
  return a;
21255
21257
  };
21256
- var __publicField$i = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
21258
+ var __publicField$j = (obj, key, value) => __defNormalProp$q(obj, typeof key !== "symbol" ? key + "" : key, value);
21257
21259
  let ID$1 = 0;
21258
21260
  class Item {
21259
21261
  constructor(options) {
21260
- __publicField$i(this, "options", {});
21261
- __publicField$i(this, "properties");
21262
- __publicField$i(this, "tree");
21263
- __publicField$i(this, "id", ID$1);
21262
+ __publicField$j(this, "options", {});
21263
+ __publicField$j(this, "properties");
21264
+ __publicField$j(this, "tree");
21265
+ __publicField$j(this, "id", ID$1);
21264
21266
  ID$1 += 1;
21265
- this.options = __spreadValues$h({}, options);
21267
+ this.options = __spreadValues$i({}, options);
21266
21268
  this.tree = new TreeHelper(this);
21267
21269
  }
21268
21270
  initProperties() {
@@ -21314,6 +21316,168 @@ class WebmapLayerOpacityPropertyHandler extends BaseProperty {
21314
21316
  }
21315
21317
  }
21316
21318
 
21319
+ function createLayerSymbolParam(resourceId, intervals) {
21320
+ return { [`symbols[${resourceId}]`]: intervals.join(",") || void 0 };
21321
+ }
21322
+
21323
+ var __defProp$p = Object.defineProperty;
21324
+ var __defProps$d = Object.defineProperties;
21325
+ var __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;
21326
+ var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
21327
+ var __hasOwnProp$i = Object.prototype.hasOwnProperty;
21328
+ var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
21329
+ var __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
21330
+ var __spreadValues$h = (a, b) => {
21331
+ for (var prop in b || (b = {}))
21332
+ if (__hasOwnProp$i.call(b, prop))
21333
+ __defNormalProp$p(a, prop, b[prop]);
21334
+ if (__getOwnPropSymbols$i)
21335
+ for (var prop of __getOwnPropSymbols$i(b)) {
21336
+ if (__propIsEnum$i.call(b, prop))
21337
+ __defNormalProp$p(a, prop, b[prop]);
21338
+ }
21339
+ return a;
21340
+ };
21341
+ var __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));
21342
+ var __publicField$i = (obj, key, value) => __defNormalProp$p(obj, typeof key !== "symbol" ? key + "" : key, value);
21343
+ var __async$j = (__this, __arguments, generator) => {
21344
+ return new Promise((resolve, reject) => {
21345
+ var fulfilled = (value) => {
21346
+ try {
21347
+ step(generator.next(value));
21348
+ } catch (e) {
21349
+ reject(e);
21350
+ }
21351
+ };
21352
+ var rejected = (value) => {
21353
+ try {
21354
+ step(generator.throw(value));
21355
+ } catch (e) {
21356
+ reject(e);
21357
+ }
21358
+ };
21359
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
21360
+ step((generator = generator.apply(__this, __arguments)).next());
21361
+ });
21362
+ };
21363
+ class Legend {
21364
+ constructor({
21365
+ legendSymbols,
21366
+ resourceId,
21367
+ connector,
21368
+ layerId,
21369
+ legend,
21370
+ webMap,
21371
+ layer,
21372
+ onSymbolRenderChange
21373
+ }) {
21374
+ __publicField$i(this, "layerId");
21375
+ __publicField$i(this, "layer");
21376
+ __publicField$i(this, "resourceId");
21377
+ __publicField$i(this, "legendSymbols", "expand");
21378
+ __publicField$i(this, "legend");
21379
+ // private blocked: boolean = false;
21380
+ __publicField$i(this, "layerVisibility", true);
21381
+ // private symbolRenderIndexes?: number[];
21382
+ __publicField$i(this, "onSymbolRenderChange");
21383
+ __publicField$i(this, "webMap");
21384
+ __publicField$i(this, "connector");
21385
+ if (legendSymbols) {
21386
+ this.legendSymbols = legendSymbols;
21387
+ }
21388
+ this.connector = connector;
21389
+ this.layer = layer;
21390
+ this.layerId = layerId;
21391
+ if (legend) {
21392
+ this.legend = this.createLegend(legend);
21393
+ }
21394
+ this.resourceId = resourceId;
21395
+ this.webMap = webMap;
21396
+ this.onSymbolRenderChange = onSymbolRenderChange;
21397
+ }
21398
+ attachLayer(layer) {
21399
+ this.layerId = String(layer.id);
21400
+ this.layer = layer;
21401
+ }
21402
+ create() {
21403
+ return __async$j(this, arguments, function* (options = {}) {
21404
+ if (this.connector) {
21405
+ const ngwLegend = yield this.connector.route("render.legend_symbols", {
21406
+ id: this.resourceId
21407
+ }).get(__spreadValues$h({}, options));
21408
+ this.legend = ngwLegend;
21409
+ return this.createLegend(ngwLegend);
21410
+ }
21411
+ });
21412
+ }
21413
+ createLegend(items) {
21414
+ return items.map((params) => __spreadProps$d(__spreadValues$h({}, params), {
21415
+ /** @deprecated use display_name instead */
21416
+ name: params.display_name,
21417
+ /** @deprecated use icon instead */
21418
+ symbol: params.icon
21419
+ }));
21420
+ }
21421
+ setSymbolRender(symbolIndex, status) {
21422
+ if (this.legend) {
21423
+ const legendItem = this.legend.find((l) => l.index === symbolIndex);
21424
+ if (legendItem) {
21425
+ const render = legendItem.render;
21426
+ if (render !== status) {
21427
+ legendItem.render = status;
21428
+ const newSymbols = this.legend.filter((l) => l.render).map((l) => l.index);
21429
+ this.setLegendSymbol(newSymbols);
21430
+ if (this.onSymbolRenderChange) {
21431
+ this.onSymbolRenderChange(newSymbols);
21432
+ }
21433
+ }
21434
+ }
21435
+ }
21436
+ }
21437
+ setLegendSymbol(symbolRenderIndexes) {
21438
+ const intervals = this._consolidateIntervals(symbolRenderIndexes);
21439
+ if (!intervals.length) {
21440
+ this._hideLayer();
21441
+ }
21442
+ if (this.layer.updateLayer) {
21443
+ this.layer.updateLayer({
21444
+ params: __spreadValues$h({}, createLayerSymbolParam(this.resourceId, intervals))
21445
+ });
21446
+ }
21447
+ if (intervals.length) {
21448
+ this._showLayer();
21449
+ }
21450
+ }
21451
+ _hideLayer() {
21452
+ if (this.layer.options.id) {
21453
+ this.webMap.mapAdapter.hideLayer(this.layer.layer);
21454
+ }
21455
+ }
21456
+ _showLayer() {
21457
+ if (this.layer.options.id) {
21458
+ if (this.layerVisibility) {
21459
+ this.webMap.showLayer(this.layer.options.id, { silent: true });
21460
+ }
21461
+ }
21462
+ }
21463
+ _consolidateIntervals(symbols) {
21464
+ const sortedSymbols = symbols.slice().sort((a, b) => a - b);
21465
+ const intervals = [];
21466
+ let start = sortedSymbols[0];
21467
+ let end = start;
21468
+ for (let i = 1; i <= sortedSymbols.length; i++) {
21469
+ if (sortedSymbols[i] === end + 1) {
21470
+ end = sortedSymbols[i];
21471
+ } else {
21472
+ intervals.push(start === end ? `${start}` : `${start}-${end}`);
21473
+ start = sortedSymbols[i];
21474
+ end = start;
21475
+ }
21476
+ }
21477
+ return intervals;
21478
+ }
21479
+ }
21480
+
21317
21481
  var __defProp$o = Object.defineProperty;
21318
21482
  var __defProps$c = Object.defineProperties;
21319
21483
  var __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;
@@ -21355,14 +21519,23 @@ var __async$i = (__this, __arguments, generator) => {
21355
21519
  });
21356
21520
  };
21357
21521
  const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21358
- constructor(webMap, item, options, connector, parent, noInit) {
21522
+ constructor({
21523
+ webMap,
21524
+ item,
21525
+ options,
21526
+ connector,
21527
+ parent,
21528
+ noInit
21529
+ }) {
21359
21530
  super(__spreadValues$g(__spreadValues$g({}, _NgwWebmapItem.options), options));
21360
- this.webMap = webMap;
21361
21531
  __publicField$h(this, "item");
21532
+ __publicField$h(this, "webMap");
21362
21533
  __publicField$h(this, "connector");
21363
21534
  __publicField$h(this, "layer");
21535
+ __publicField$h(this, "legend");
21364
21536
  __publicField$h(this, "emitter", new EventEmitter());
21365
21537
  __publicField$h(this, "_rootDescendantsCount", 0);
21538
+ this.webMap = webMap;
21366
21539
  if (connector) {
21367
21540
  this.connector = connector;
21368
21541
  }
@@ -21385,14 +21558,14 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21385
21558
  }
21386
21559
  static create(webMap, item, options, connector, parent) {
21387
21560
  return __async$i(this, null, function* () {
21388
- const ngwWebmapItem = new _NgwWebmapItem(
21561
+ const ngwWebmapItem = new _NgwWebmapItem({
21389
21562
  webMap,
21390
21563
  item,
21391
21564
  options,
21392
21565
  connector,
21393
21566
  parent,
21394
- true
21395
- );
21567
+ noInit: true
21568
+ });
21396
21569
  yield ngwWebmapItem._init(item);
21397
21570
  return ngwWebmapItem;
21398
21571
  });
@@ -21414,22 +21587,34 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21414
21587
  }
21415
21588
  getLegend(options) {
21416
21589
  return __async$i(this, null, function* () {
21417
- var _a;
21590
+ var _a, _b;
21418
21591
  const id = (_a = this.layer) == null ? void 0 : _a.id;
21419
21592
  if (id !== void 0) {
21420
21593
  const connector = this.connector;
21421
21594
  if (connector && "resourceId" in this.item) {
21422
- const ngwLegend = yield connector.route("render.legend_symbols", { id: Number(this.item.resourceId) }).get(__spreadValues$g({}, options));
21423
- const legend = {
21424
- layerId: id,
21425
- legend: ngwLegend.map((legend2) => __spreadValues$g({
21426
- /** @deprecated use display_name instead */
21427
- name: legend2.display_name,
21428
- /** @deprecated use icon instead */
21429
- symbol: legend2.icon
21430
- }, legend2))
21431
- };
21432
- return [legend];
21595
+ const resourceId = Number(this.item.resourceId);
21596
+ if (this.item.item_type === "layer") {
21597
+ if (this.layer) {
21598
+ const legend = new Legend({
21599
+ connector: this.connector,
21600
+ layerId: id,
21601
+ layer: this.layer,
21602
+ resourceId,
21603
+ webMap: this.webMap,
21604
+ legendSymbols: (_b = this.item.legend_symbols) != null ? _b : void 0,
21605
+ onSymbolRenderChange: (indexes) => {
21606
+ this.webMap.emitter.emit("event-symbol-render:change", {
21607
+ layerId: id,
21608
+ resourceId,
21609
+ indexes
21610
+ });
21611
+ }
21612
+ });
21613
+ yield legend.create(options);
21614
+ return [legend];
21615
+ }
21616
+ }
21617
+ return [];
21433
21618
  }
21434
21619
  }
21435
21620
  return [];
@@ -21484,13 +21669,13 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21484
21669
  if (group.children && group.children.length) {
21485
21670
  const children = this.getChildren(group);
21486
21671
  for (const child of children) {
21487
- const childItem = new this.constructor(
21488
- this.webMap,
21489
- child,
21490
- this.options,
21491
- this.connector,
21492
- this
21493
- );
21672
+ const childItem = new this.constructor({
21673
+ webMap: this.webMap,
21674
+ item: child,
21675
+ options: this.options,
21676
+ connector: this.connector,
21677
+ parent: this
21678
+ });
21494
21679
  this.tree.addChild(childItem);
21495
21680
  }
21496
21681
  }
@@ -21518,6 +21703,15 @@ const _NgwWebmapItem = class _NgwWebmapItem extends Item {
21518
21703
  }
21519
21704
  if (adapter) {
21520
21705
  return this.webMap.addLayer(adapter, options).then((newLayer) => {
21706
+ this.webMap.emitter.on("layer:toggle", (e) => {
21707
+ if (e.id === newLayer.id) {
21708
+ const enabled = this.properties.get("visibility");
21709
+ const mapVisible = this.webMap.isLayerVisible(newLayer);
21710
+ if (enabled !== mapVisible) {
21711
+ this.properties.set("visibility", mapVisible);
21712
+ }
21713
+ }
21714
+ });
21521
21715
  setNewLayer(newLayer);
21522
21716
  });
21523
21717
  }
@@ -21820,12 +22014,12 @@ class NgwWebmapLayerAdapter {
21820
22014
  headers,
21821
22015
  drawOrderEnabled: (_a = webmap.draw_order_enabled) != null ? _a : false
21822
22016
  });
21823
- const layer = new this.NgwWebmapItem(
21824
- this.options.webMap,
21825
- webmap.root_item,
22017
+ const layer = new this.NgwWebmapItem({
22018
+ webMap: this.options.webMap,
22019
+ item: webmap.root_item,
21826
22020
  options,
21827
22021
  connector
21828
- );
22022
+ });
21829
22023
  layer.emitter.on("init", () => {
21830
22024
  resolve(layer);
21831
22025
  });
@@ -21891,6 +22085,7 @@ class NgwWebmapLayerAdapter {
21891
22085
  }
21892
22086
  }
21893
22087
  _updateItemsParams(item, webMap, data) {
22088
+ var _a;
21894
22089
  if (item) {
21895
22090
  if (item.item_type === "group" || item.item_type === "root") {
21896
22091
  if ("children" in item && item.children) {
@@ -21923,6 +22118,9 @@ class NgwWebmapLayerAdapter {
21923
22118
  item = __spreadValues$f(__spreadValues$f({}, layerItem), layerAdapterOptions);
21924
22119
  }
21925
22120
  }
22121
+ if (typeof ((_a = this.options.nativeOptions) == null ? void 0 : _a.beforeItemCreated) === "function") {
22122
+ item = this.options.nativeOptions.beforeItemCreated(item);
22123
+ }
21926
22124
  return item;
21927
22125
  }
21928
22126
  }
@@ -22808,42 +23006,6 @@ var __async$b = (__this, __arguments, generator) => {
22808
23006
  step((generator = generator.apply(__this, __arguments)).next());
22809
23007
  });
22810
23008
  };
22811
- class Legend {
22812
- constructor({
22813
- layerId,
22814
- legend,
22815
- onSymbolRenderChange
22816
- }) {
22817
- __publicField$c(this, "layerId");
22818
- __publicField$c(this, "legend");
22819
- __publicField$c(this, "onSymbolRenderChange");
22820
- this.layerId = layerId;
22821
- this.legend = this.createLegend(legend);
22822
- this.onSymbolRenderChange = onSymbolRenderChange;
22823
- }
22824
- createLegend(items) {
22825
- return items.map((params) => __spreadProps$7(__spreadValues$9({}, params), {
22826
- /** @deprecated use display_name instead */
22827
- name: params.display_name,
22828
- /** @deprecated use icon instead */
22829
- symbol: params.icon
22830
- }));
22831
- }
22832
- setSymbolRender(symbolIndex, status) {
22833
- const legendItem = this.legend.find((l) => l.index === symbolIndex);
22834
- if (legendItem) {
22835
- const render = legendItem.render;
22836
- if (render !== status) {
22837
- legendItem.render = status;
22838
- if (this.onSymbolRenderChange) {
22839
- this.onSymbolRenderChange(
22840
- this.legend.filter((l) => l.render).map((l) => l.index)
22841
- );
22842
- }
22843
- }
22844
- }
22845
- }
22846
- }
22847
23009
  function createRasterAdapter(_0) {
22848
23010
  return __async$b(this, arguments, function* ({
22849
23011
  layerOptions,
@@ -22879,8 +23041,8 @@ function createRasterAdapter(_0) {
22879
23041
  this.map = map;
22880
23042
  __publicField$c(this, "item", item);
22881
23043
  __publicField$c(this, "resourceId", resourceId);
22882
- __publicField$c(this, "_blocked", false);
22883
- __publicField$c(this, "_layerVisibility");
23044
+ __publicField$c(this, "blocked", false);
23045
+ __publicField$c(this, "layerVisibility");
22884
23046
  const opt = ngwApiToAdapterOptions({
22885
23047
  options: layerOptions,
22886
23048
  webMap,
@@ -22901,24 +23063,6 @@ function createRasterAdapter(_0) {
22901
23063
  addLayer(addOptions) {
22902
23064
  return super.addLayer(__spreadValues$9(__spreadValues$9({}, this.options), addOptions));
22903
23065
  }
22904
- showLayer() {
22905
- this._layerVisibility = true;
22906
- if (!this._blocked) {
22907
- if (super.showLayer) {
22908
- super.showLayer(this.layer);
22909
- } else if (this.layer) {
22910
- webMap.mapAdapter.showLayer(this.layer);
22911
- }
22912
- }
22913
- }
22914
- hideLayer() {
22915
- this._layerVisibility = false;
22916
- if (super.hideLayer) {
22917
- super.hideLayer(this.layer);
22918
- } else if (this.layer) {
22919
- webMap.mapAdapter.hideLayer(this.layer);
22920
- }
22921
- }
22922
23066
  getIdentificationIds() {
22923
23067
  return __async$b(this, null, function* () {
22924
23068
  if (this.item) {
@@ -22944,59 +23088,16 @@ function createRasterAdapter(_0) {
22944
23088
  }, options));
22945
23089
  const legend = new Legend({
22946
23090
  layerId: id,
22947
- legend: ngwLegend,
22948
- onSymbolRenderChange: this._setLegendSymbol.bind(this)
23091
+ layer: this,
23092
+ resourceId,
23093
+ webMap,
23094
+ legend: ngwLegend
22949
23095
  });
22950
23096
  return [legend];
22951
23097
  }
22952
23098
  return [];
22953
23099
  });
22954
23100
  }
22955
- _hideLayer() {
22956
- if (this.options.id) {
22957
- webMap.mapAdapter.hideLayer(this.layer);
22958
- }
22959
- }
22960
- _showLayer() {
22961
- if (this.options.id) {
22962
- if (this._layerVisibility) {
22963
- webMap.showLayer(this.options.id, { silent: true });
22964
- }
22965
- }
22966
- }
22967
- _setLegendSymbol(renderIndexes) {
22968
- const intervals = this._consolidateIntervals(renderIndexes);
22969
- if (!intervals.length) {
22970
- this._hideLayer();
22971
- this._blocked = true;
22972
- } else {
22973
- this._blocked = false;
22974
- this._showLayer();
22975
- }
22976
- if (this.updateLayer) {
22977
- this.updateLayer({
22978
- params: {
22979
- [`symbols[${resourceId}]`]: intervals.join(",") || void 0
22980
- }
22981
- });
22982
- }
22983
- }
22984
- _consolidateIntervals(symbols) {
22985
- const sortedSymbols = symbols.slice().sort((a, b) => a - b);
22986
- const intervals = [];
22987
- let start = sortedSymbols[0];
22988
- let end = start;
22989
- for (let i = 1; i <= sortedSymbols.length; i++) {
22990
- if (sortedSymbols[i] === end + 1) {
22991
- end = sortedSymbols[i];
22992
- } else {
22993
- intervals.push(start === end ? `${start}` : `${start}-${end}`);
22994
- start = sortedSymbols[i];
22995
- end = start;
22996
- }
22997
- }
22998
- return intervals;
22999
- }
23000
23101
  };
23001
23102
  } else {
23002
23103
  throw new Error(adapter + " not supported yet. Only TILE");
@@ -23358,16 +23459,25 @@ class IdentifyItem {
23358
23459
  });
23359
23460
  }
23360
23461
  resource(opt) {
23462
+ return __async$8(this, null, function* () {
23463
+ const composite = yield this.composite(opt);
23464
+ return composite.feature_layer;
23465
+ });
23466
+ }
23467
+ composite(opt) {
23361
23468
  return __async$8(this, null, function* () {
23362
23469
  if (this._resource && this._resource.feature_layer) {
23363
- return this._resource.feature_layer;
23470
+ return this._resource;
23364
23471
  }
23365
23472
  const resp = yield this.connector.getResource(this.layerId, opt);
23366
- if (!(resp == null ? void 0 : resp.feature_layer)) {
23367
- throw new Error("Resource is not avector layer");
23473
+ if (!resp) {
23474
+ throw new Error("Resource does not exist");
23475
+ }
23476
+ if (!resp.feature_layer) {
23477
+ throw new Error("Resource is not a vector layer");
23368
23478
  }
23369
23479
  this._resource = resp;
23370
- return resp.feature_layer;
23480
+ return resp;
23371
23481
  });
23372
23482
  }
23373
23483
  getBounds(opt) {
@@ -23380,7 +23490,7 @@ class IdentifyItem {
23380
23490
  resourceId: this.layerId
23381
23491
  }, opt));
23382
23492
  }
23383
- geojson(options) {
23493
+ geojson(options = {}) {
23384
23494
  if (this._geojson) {
23385
23495
  return Promise.resolve(this._geojson);
23386
23496
  }
@@ -26342,7 +26452,8 @@ const _NgwMap = class _NgwMap extends WebMap {
26342
26452
  const identFunc = typeof layer.getIdentificationIds === "function" ? layer.getIdentificationIds : false;
26343
26453
  const interactive = (_a = layer.options.interactive) != null ? _a : true;
26344
26454
  if (identFunc && layer.options.selectable && interactive && this.isLayerVisible(layer)) {
26345
- promises.push(identFunc.call(layer));
26455
+ const layerIds = identFunc.call(layer);
26456
+ promises.push(layerIds);
26346
26457
  }
26347
26458
  }
26348
26459
  const getIdsPromise = Promise.all(promises);