@neshan-maps-platform/react-openlayers 3.0.2-alpha.1 → 3.0.3-alpha.1

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,6 +1,6 @@
1
- import ge, { forwardRef as Pe, useRef as te, useState as re, useImperativeHandle as Re, useEffect as we } from "react";
2
- import { Map as Te, View as be } from "@neshan-maps-platform/ol";
3
- var G = { exports: {} }, O = {};
1
+ import he, { forwardRef as ge, useRef as ee, useState as te, useImperativeHandle as Pe, useEffect as Re } from "react";
2
+ import { Map as we, View as Te } from "@neshan-maps-platform/ol";
3
+ var j = { exports: {} }, v = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -10,29 +10,29 @@ var G = { exports: {} }, O = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var ne;
14
- function ve() {
15
- if (ne) return O;
16
- ne = 1;
13
+ var re;
14
+ function be() {
15
+ if (re) return v;
16
+ re = 1;
17
17
  var r = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
18
- function n(s, a, i) {
19
- var h = null;
20
- if (i !== void 0 && (h = "" + i), a.key !== void 0 && (h = "" + a.key), "key" in a) {
21
- i = {};
22
- for (var g in a)
23
- g !== "key" && (i[g] = a[g]);
24
- } else i = a;
25
- return a = i.ref, {
18
+ function n(s, o, l) {
19
+ var _ = null;
20
+ if (l !== void 0 && (_ = "" + l), o.key !== void 0 && (_ = "" + o.key), "key" in o) {
21
+ l = {};
22
+ for (var m in o)
23
+ m !== "key" && (l[m] = o[m]);
24
+ } else l = o;
25
+ return o = l.ref, {
26
26
  $$typeof: r,
27
27
  type: s,
28
- key: h,
29
- ref: a !== void 0 ? a : null,
30
- props: i
28
+ key: _,
29
+ ref: o !== void 0 ? o : null,
30
+ props: l
31
31
  };
32
32
  }
33
- return O.Fragment = t, O.jsx = n, O.jsxs = n, O;
33
+ return v.Fragment = t, v.jsx = n, v.jsxs = n, v;
34
34
  }
35
- var A = {};
35
+ var S = {};
36
36
  /**
37
37
  * @license React
38
38
  * react-jsx-runtime.development.js
@@ -42,47 +42,47 @@ var A = {};
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
44
  */
45
- var oe;
46
- function Se() {
47
- return oe || (oe = 1, process.env.NODE_ENV !== "production" && function() {
45
+ var ne;
46
+ function ve() {
47
+ return ne || (ne = 1, process.env.NODE_ENV !== "production" && function() {
48
48
  function r(e) {
49
49
  if (e == null) return null;
50
50
  if (typeof e == "function")
51
- return e.$$typeof === me ? null : e.displayName || e.name || null;
51
+ return e.$$typeof === Ee ? null : e.displayName || e.name || null;
52
52
  if (typeof e == "string") return e;
53
53
  switch (e) {
54
- case v:
54
+ case h:
55
55
  return "Fragment";
56
- case Y:
56
+ case A:
57
57
  return "Profiler";
58
- case S:
58
+ case F:
59
59
  return "StrictMode";
60
- case W:
61
- return "Suspense";
62
60
  case c:
61
+ return "Suspense";
62
+ case k:
63
63
  return "SuspenseList";
64
- case Ee:
64
+ case de:
65
65
  return "Activity";
66
66
  }
67
67
  if (typeof e == "object")
68
68
  switch (typeof e.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
70
  ), e.$$typeof) {
71
- case N:
71
+ case $:
72
72
  return "Portal";
73
73
  case U:
74
- return (e.displayName || "Context") + ".Provider";
75
- case j:
74
+ return e.displayName || "Context";
75
+ case Y:
76
76
  return (e._context.displayName || "Context") + ".Consumer";
77
77
  case D:
78
- var o = e.render;
79
- return e = e.displayName, e || (e = o.displayName || o.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
- case I:
81
- return o = e.displayName || null, o !== null ? o : r(e.type) || "Memo";
82
- case x:
83
- o = e._payload, e = e._init;
78
+ var a = e.render;
79
+ return e = e.displayName, e || (e = a.displayName || a.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
+ case C:
81
+ return a = e.displayName || null, a !== null ? a : r(e.type) || "Memo";
82
+ case W:
83
+ a = e._payload, e = e._init;
84
84
  try {
85
- return r(e(o));
85
+ return r(e(a));
86
86
  } catch {
87
87
  }
88
88
  }
@@ -94,73 +94,74 @@ function Se() {
94
94
  function n(e) {
95
95
  try {
96
96
  t(e);
97
- var o = !1;
97
+ var a = !1;
98
98
  } catch {
99
- o = !0;
99
+ a = !0;
100
100
  }
101
- if (o) {
102
- o = console;
103
- var l = o.error, u = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
- return l.call(
105
- o,
101
+ if (a) {
102
+ a = console;
103
+ var i = a.error, u = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
+ return i.call(
105
+ a,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
107
  u
108
108
  ), t(e);
109
109
  }
110
110
  }
111
111
  function s(e) {
112
- if (e === v) return "<>";
113
- if (typeof e == "object" && e !== null && e.$$typeof === x)
112
+ if (e === h) return "<>";
113
+ if (typeof e == "object" && e !== null && e.$$typeof === W)
114
114
  return "<...>";
115
115
  try {
116
- var o = r(e);
117
- return o ? "<" + o + ">" : "<...>";
116
+ var a = r(e);
117
+ return a ? "<" + a + ">" : "<...>";
118
118
  } catch {
119
119
  return "<...>";
120
120
  }
121
121
  }
122
- function a() {
122
+ function o() {
123
123
  var e = X.A;
124
124
  return e === null ? null : e.getOwner();
125
125
  }
126
- function i() {
126
+ function l() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
- function h(e) {
130
- if (B.call(e, "key")) {
131
- var o = Object.getOwnPropertyDescriptor(e, "key").get;
132
- if (o && o.isReactWarning) return !1;
129
+ function _(e) {
130
+ if (z.call(e, "key")) {
131
+ var a = Object.getOwnPropertyDescriptor(e, "key").get;
132
+ if (a && a.isReactWarning) return !1;
133
133
  }
134
134
  return e.key !== void 0;
135
135
  }
136
- function g(e, o) {
137
- function l() {
138
- H || (H = !0, console.error(
136
+ function m(e, a) {
137
+ function i() {
138
+ B || (B = !0, console.error(
139
139
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
140
- o
140
+ a
141
141
  ));
142
142
  }
143
- l.isReactWarning = !0, Object.defineProperty(e, "key", {
144
- get: l,
143
+ i.isReactWarning = !0, Object.defineProperty(e, "key", {
144
+ get: i,
145
145
  configurable: !0
146
146
  });
147
147
  }
148
- function p() {
148
+ function O() {
149
149
  var e = r(this.type);
150
- return Z[e] || (Z[e] = !0, console.error(
150
+ return H[e] || (H[e] = !0, console.error(
151
151
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
152
  )), e = this.props.ref, e !== void 0 ? e : null;
153
153
  }
154
- function $(e, o, l, u, _, E, q, J) {
155
- return l = E.ref, e = {
156
- $$typeof: m,
154
+ function M(e, a, i, u, N, q) {
155
+ var f = i.ref;
156
+ return e = {
157
+ $$typeof: b,
157
158
  type: e,
158
- key: o,
159
- props: E,
160
- _owner: _
161
- }, (l !== void 0 ? l : null) !== null ? Object.defineProperty(e, "ref", {
159
+ key: a,
160
+ props: i,
161
+ _owner: u
162
+ }, (f !== void 0 ? f : null) !== null ? Object.defineProperty(e, "ref", {
162
163
  enumerable: !1,
163
- get: p
164
+ get: O
164
165
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
165
166
  configurable: !1,
166
167
  enumerable: !1,
@@ -175,33 +176,33 @@ function Se() {
175
176
  configurable: !1,
176
177
  enumerable: !1,
177
178
  writable: !0,
178
- value: q
179
+ value: N
179
180
  }), Object.defineProperty(e, "_debugTask", {
180
181
  configurable: !1,
181
182
  enumerable: !1,
182
183
  writable: !0,
183
- value: J
184
+ value: q
184
185
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
186
  }
186
- function k(e, o, l, u, _, E, q, J) {
187
- var f = o.children;
187
+ function p(e, a, i, u, N, q) {
188
+ var f = a.children;
188
189
  if (f !== void 0)
189
190
  if (u)
190
191
  if (_e(f)) {
191
192
  for (u = 0; u < f.length; u++)
192
- C(f[u]);
193
+ y(f[u]);
193
194
  Object.freeze && Object.freeze(f);
194
195
  } else
195
196
  console.error(
196
197
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
198
  );
198
- else C(f);
199
- if (B.call(o, "key")) {
199
+ else y(f);
200
+ if (z.call(a, "key")) {
200
201
  f = r(e);
201
- var R = Object.keys(o).filter(function(he) {
202
- return he !== "key";
202
+ var P = Object.keys(a).filter(function(me) {
203
+ return me !== "key";
203
204
  });
204
- u = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}", ee[f + u] || (R = 0 < R.length ? "{" + R.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ u = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", K[f + u] || (P = 0 < P.length ? "{" + P.join(": ..., ") + ": ...}" : "{}", console.error(
205
206
  `A props object containing a "key" prop is being spread into JSX:
206
207
  let props = %s;
207
208
  <%s {...props} />
@@ -210,79 +211,76 @@ React keys must be passed directly to JSX without using spread:
210
211
  <%s key={someKey} {...props} />`,
211
212
  u,
212
213
  f,
213
- R,
214
+ P,
214
215
  f
215
- ), ee[f + u] = !0);
216
+ ), K[f + u] = !0);
216
217
  }
217
- if (f = null, l !== void 0 && (n(l), f = "" + l), h(o) && (n(o.key), f = "" + o.key), "key" in o) {
218
- l = {};
219
- for (var V in o)
220
- V !== "key" && (l[V] = o[V]);
221
- } else l = o;
222
- return f && g(
223
- l,
218
+ if (f = null, i !== void 0 && (n(i), f = "" + i), _(a) && (n(a.key), f = "" + a.key), "key" in a) {
219
+ i = {};
220
+ for (var J in a)
221
+ J !== "key" && (i[J] = a[J]);
222
+ } else i = a;
223
+ return f && m(
224
+ i,
224
225
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
225
- ), $(
226
+ ), M(
226
227
  e,
227
228
  f,
228
- E,
229
- _,
230
- a(),
231
- l,
232
- q,
233
- J
229
+ i,
230
+ o(),
231
+ N,
232
+ q
234
233
  );
235
234
  }
236
- function C(e) {
237
- typeof e == "object" && e !== null && e.$$typeof === m && e._store && (e._store.validated = 1);
235
+ function y(e) {
236
+ E(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === W && (e._payload.status === "fulfilled" ? E(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
237
+ }
238
+ function E(e) {
239
+ return typeof e == "object" && e !== null && e.$$typeof === b;
238
240
  }
239
- var d = ge, m = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), Y = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), U = Symbol.for("react.context"), D = Symbol.for("react.forward_ref"), W = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), Ee = Symbol.for("react.activity"), me = Symbol.for("react.client.reference"), X = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, B = Object.prototype.hasOwnProperty, _e = Array.isArray, L = console.createTask ? console.createTask : function() {
241
+ var d = he, b = Symbol.for("react.transitional.element"), $ = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), F = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), Y = Symbol.for("react.consumer"), U = Symbol.for("react.context"), D = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), k = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), de = Symbol.for("react.activity"), Ee = Symbol.for("react.client.reference"), X = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, z = Object.prototype.hasOwnProperty, _e = Array.isArray, L = console.createTask ? console.createTask : function() {
240
242
  return null;
241
243
  };
242
244
  d = {
243
- "react-stack-bottom-frame": function(e) {
245
+ react_stack_bottom_frame: function(e) {
244
246
  return e();
245
247
  }
246
248
  };
247
- var H, Z = {}, Q = d["react-stack-bottom-frame"].bind(
249
+ var B, H = {}, Z = d.react_stack_bottom_frame.bind(
248
250
  d,
249
- i
250
- )(), K = L(s(i)), ee = {};
251
- A.Fragment = v, A.jsx = function(e, o, l, u, _) {
252
- var E = 1e4 > X.recentlyCreatedOwnerStacks++;
253
- return k(
251
+ l
252
+ )(), Q = L(s(l)), K = {};
253
+ S.Fragment = h, S.jsx = function(e, a, i) {
254
+ var u = 1e4 > X.recentlyCreatedOwnerStacks++;
255
+ return p(
254
256
  e,
255
- o,
256
- l,
257
+ a,
258
+ i,
257
259
  !1,
258
- u,
259
- _,
260
- E ? Error("react-stack-top-frame") : Q,
261
- E ? L(s(e)) : K
260
+ u ? Error("react-stack-top-frame") : Z,
261
+ u ? L(s(e)) : Q
262
262
  );
263
- }, A.jsxs = function(e, o, l, u, _) {
264
- var E = 1e4 > X.recentlyCreatedOwnerStacks++;
265
- return k(
263
+ }, S.jsxs = function(e, a, i) {
264
+ var u = 1e4 > X.recentlyCreatedOwnerStacks++;
265
+ return p(
266
266
  e,
267
- o,
268
- l,
267
+ a,
268
+ i,
269
269
  !0,
270
- u,
271
- _,
272
- E ? Error("react-stack-top-frame") : Q,
273
- E ? L(s(e)) : K
270
+ u ? Error("react-stack-top-frame") : Z,
271
+ u ? L(s(e)) : Q
274
272
  );
275
273
  };
276
- }()), A;
274
+ }()), S;
277
275
  }
278
276
  var ae;
279
- function xe() {
280
- return ae || (ae = 1, process.env.NODE_ENV === "production" ? G.exports = ve() : G.exports = Se()), G.exports;
277
+ function Se() {
278
+ return ae || (ae = 1, process.env.NODE_ENV === "production" ? j.exports = be() : j.exports = ve()), j.exports;
281
279
  }
282
- var Oe = xe();
283
- const Ae = "_map_1tyvt_2", ye = {
284
- map: Ae
285
- }, pe = {
280
+ var xe = Se();
281
+ const Oe = "_map_1tyvt_2", pe = {
282
+ map: Oe
283
+ }, ye = {
286
284
  // use the radius of the Normal sphere
287
285
  radians: 6370997 / (2 * Math.PI),
288
286
  degrees: 2 * Math.PI * 6370997 / 360,
@@ -290,7 +288,7 @@ const Ae = "_map_1tyvt_2", ye = {
290
288
  m: 1,
291
289
  "us-ft": 1200 / 3937
292
290
  };
293
- class fe {
291
+ class ue {
294
292
  /**
295
293
  * @param {Options} options Projection options.
296
294
  */
@@ -336,7 +334,7 @@ class fe {
336
334
  * @api
337
335
  */
338
336
  getMetersPerUnit() {
339
- return this.metersPerUnit_ || pe[this.units_];
337
+ return this.metersPerUnit_ || ye[this.units_];
340
338
  }
341
339
  /**
342
340
  * Get the world extent for this projection.
@@ -423,8 +421,8 @@ class fe {
423
421
  return this.getPointResolutionFunc_;
424
422
  }
425
423
  }
426
- const y = 6378137, T = Math.PI * y, ke = [-T, -T, T, T], Ce = [-180, -85, 180, 85], M = y * Math.log(Math.tan(Math.PI / 2));
427
- class w extends fe {
424
+ const x = 6378137, w = Math.PI * x, Ae = [-w, -w, w, w], ke = [-180, -85, 180, 85], I = x * Math.log(Math.tan(Math.PI / 2));
425
+ class R extends ue {
428
426
  /**
429
427
  * @param {string} code Code.
430
428
  */
@@ -432,42 +430,42 @@ class w extends fe {
432
430
  super({
433
431
  code: t,
434
432
  units: "m",
435
- extent: ke,
433
+ extent: Ae,
436
434
  global: !0,
437
- worldExtent: Ce,
435
+ worldExtent: ke,
438
436
  getPointResolution: function(n, s) {
439
- return n / Math.cosh(s[1] / y);
437
+ return n / Math.cosh(s[1] / x);
440
438
  }
441
439
  });
442
440
  }
443
441
  }
444
- const se = [
445
- new w("EPSG:3857"),
446
- new w("EPSG:102100"),
447
- new w("EPSG:102113"),
448
- new w("EPSG:900913"),
449
- new w("http://www.opengis.net/def/crs/EPSG/0/3857"),
450
- new w("http://www.opengis.net/gml/srs/epsg.xml#3857")
442
+ const oe = [
443
+ new R("EPSG:3857"),
444
+ new R("EPSG:102100"),
445
+ new R("EPSG:102113"),
446
+ new R("EPSG:900913"),
447
+ new R("http://www.opengis.net/def/crs/EPSG/0/3857"),
448
+ new R("http://www.opengis.net/gml/srs/epsg.xml#3857")
451
449
  ];
452
- function Ne(r, t, n) {
450
+ function Ce(r, t, n) {
453
451
  const s = r.length;
454
452
  n = n > 1 ? n : 2, t === void 0 && (n > 2 ? t = r.slice() : t = new Array(s));
455
- for (let a = 0; a < s; a += n) {
456
- t[a] = T * r[a] / 180;
457
- let i = y * Math.log(Math.tan(Math.PI * (+r[a + 1] + 90) / 360));
458
- i > M ? i = M : i < -M && (i = -M), t[a + 1] = i;
453
+ for (let o = 0; o < s; o += n) {
454
+ t[o] = w * r[o] / 180;
455
+ let l = x * Math.log(Math.tan(Math.PI * (+r[o + 1] + 90) / 360));
456
+ l > I ? l = I : l < -I && (l = -I), t[o + 1] = l;
459
457
  }
460
458
  return t;
461
459
  }
462
- function je(r, t, n) {
460
+ function Ne(r, t, n) {
463
461
  const s = r.length;
464
462
  n = n > 1 ? n : 2, t === void 0 && (n > 2 ? t = r.slice() : t = new Array(s));
465
- for (let a = 0; a < s; a += n)
466
- t[a] = 180 * r[a] / T, t[a + 1] = 360 * Math.atan(Math.exp(r[a + 1] / y)) / Math.PI - 90;
463
+ for (let o = 0; o < s; o += n)
464
+ t[o] = 180 * r[o] / w, t[o + 1] = 360 * Math.atan(Math.exp(r[o + 1] / x)) / Math.PI - 90;
467
465
  return t;
468
466
  }
469
- const Ie = 6378137, ie = [-180, -90, 180, 90], Ge = Math.PI * Ie / 180;
470
- class P extends fe {
467
+ const je = 6378137, se = [-180, -90, 180, 90], Ie = Math.PI * je / 180;
468
+ class g extends ue {
471
469
  /**
472
470
  * @param {string} code Code.
473
471
  * @param {string} [axisOrientation] Axis orientation.
@@ -476,40 +474,40 @@ class P extends fe {
476
474
  super({
477
475
  code: t,
478
476
  units: "degrees",
479
- extent: ie,
477
+ extent: se,
480
478
  axisOrientation: n,
481
479
  global: !0,
482
- metersPerUnit: Ge,
483
- worldExtent: ie
480
+ metersPerUnit: Ie,
481
+ worldExtent: se
484
482
  });
485
483
  }
486
484
  }
487
485
  const le = [
488
- new P("CRS:84"),
489
- new P("EPSG:4326", "neu"),
490
- new P("urn:ogc:def:crs:OGC:1.3:CRS84"),
491
- new P("urn:ogc:def:crs:OGC:2:84"),
492
- new P("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),
493
- new P("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"),
494
- new P("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
486
+ new g("CRS:84"),
487
+ new g("EPSG:4326", "neu"),
488
+ new g("urn:ogc:def:crs:OGC:1.3:CRS84"),
489
+ new g("urn:ogc:def:crs:OGC:2:84"),
490
+ new g("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),
491
+ new g("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"),
492
+ new g("http://www.opengis.net/def/crs/EPSG/0/4326", "neu")
495
493
  ];
496
- let z = {};
497
- function Me(r) {
498
- return z[r] || z[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
494
+ let V = {};
495
+ function Ge(r) {
496
+ return V[r] || V[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null;
499
497
  }
500
- function Fe(r, t) {
501
- z[r] = t;
498
+ function Me(r, t) {
499
+ V[r] = t;
502
500
  }
503
- let b = {};
504
- function F(r, t, n) {
505
- const s = r.getCode(), a = t.getCode();
506
- s in b || (b[s] = {}), b[s][a] = n;
501
+ let T = {};
502
+ function G(r, t, n) {
503
+ const s = r.getCode(), o = t.getCode();
504
+ s in T || (T[s] = {}), T[s][o] = n;
507
505
  }
508
506
  function $e(r, t) {
509
507
  let n;
510
- return r in b && t in b[r] && (n = b[r][t]), n;
508
+ return r in T && t in T[r] && (n = T[r][t]), n;
511
509
  }
512
- function de(r, t) {
510
+ function fe(r, t) {
513
511
  if (t !== void 0) {
514
512
  for (let n = 0, s = r.length; n < s; ++n)
515
513
  t[n] = r[n];
@@ -518,7 +516,7 @@ function de(r, t) {
518
516
  t = r.slice();
519
517
  return t;
520
518
  }
521
- function Ye(r, t) {
519
+ function Fe(r, t) {
522
520
  if (t !== void 0 && r !== t) {
523
521
  for (let n = 0, s = r.length; n < s; ++n)
524
522
  t[n] = r[n];
@@ -526,14 +524,14 @@ function Ye(r, t) {
526
524
  }
527
525
  return r;
528
526
  }
529
- function Ue(r) {
530
- Fe(r.getCode(), r), F(r, r, de);
527
+ function Ye(r) {
528
+ Me(r.getCode(), r), G(r, r, fe);
531
529
  }
532
- function De(r) {
533
- r.forEach(Ue);
530
+ function Ue(r) {
531
+ r.forEach(Ye);
534
532
  }
535
- function ce(r) {
536
- return typeof r == "string" ? Me(
533
+ function ie(r) {
534
+ return typeof r == "string" ? Ge(
537
535
  /** @type {string} */
538
536
  r
539
537
  ) : (
@@ -541,120 +539,120 @@ function ce(r) {
541
539
  r || null
542
540
  );
543
541
  }
544
- function ue(r) {
545
- De(r), r.forEach(function(t) {
542
+ function ce(r) {
543
+ Ue(r), r.forEach(function(t) {
546
544
  r.forEach(function(n) {
547
- t !== n && F(t, n, de);
545
+ t !== n && G(t, n, fe);
548
546
  });
549
547
  });
550
548
  }
551
- function We(r, t, n, s) {
552
- r.forEach(function(a) {
553
- t.forEach(function(i) {
554
- F(a, i, n), F(i, a, s);
549
+ function De(r, t, n, s) {
550
+ r.forEach(function(o) {
551
+ t.forEach(function(l) {
552
+ G(o, l, n), G(l, o, s);
555
553
  });
556
554
  });
557
555
  }
558
- function Xe(r, t) {
559
- return Je(
556
+ function We(r, t) {
557
+ return qe(
560
558
  r,
561
559
  "EPSG:4326",
562
560
  "EPSG:3857"
563
561
  );
564
562
  }
565
- function Le(r, t) {
563
+ function Xe(r, t) {
566
564
  const n = r.getCode(), s = t.getCode();
567
- let a = $e(n, s);
568
- return a || (a = Ye), a;
565
+ let o = $e(n, s);
566
+ return o || (o = Fe), o;
569
567
  }
570
- function qe(r, t) {
571
- const n = ce(r), s = ce(t);
572
- return Le(n, s);
568
+ function Le(r, t) {
569
+ const n = ie(r), s = ie(t);
570
+ return Xe(n, s);
573
571
  }
574
- function Je(r, t, n) {
575
- return qe(t, n)(r, void 0, r.length);
572
+ function qe(r, t, n) {
573
+ return Le(t, n)(r, void 0, r.length);
576
574
  }
577
- function Ve() {
578
- ue(se), ue(le), We(
575
+ function Je() {
576
+ ce(oe), ce(le), De(
579
577
  le,
580
- se,
581
- Ne,
582
- je
578
+ oe,
579
+ Ce,
580
+ Ne
583
581
  );
584
582
  }
585
- Ve();
586
- const He = Pe(
583
+ Je();
584
+ const Be = ge(
587
585
  ({
588
586
  options: r,
589
587
  mapKey: t,
590
588
  zoom: n,
591
589
  defaultType: s,
592
- scale: a,
593
- center: i,
594
- poi: h,
595
- traffic: g,
596
- onInit: p,
597
- className: $,
598
- style: k
599
- }, C) => {
600
- const d = te(null), m = te(null), [N, v] = re(!1), [S, Y] = re(null);
601
- Re(
602
- C,
590
+ scale: o,
591
+ center: l,
592
+ poi: _,
593
+ traffic: m,
594
+ onInit: O,
595
+ className: M,
596
+ style: p
597
+ }, y) => {
598
+ const E = ee(null), d = ee(null), [b, $] = te(!1), [h, F] = te(null);
599
+ Pe(
600
+ y,
603
601
  () => ({
604
602
  get mapContainer() {
605
- return d;
603
+ return E;
606
604
  },
607
605
  get map() {
608
- return m.current;
606
+ return d.current;
609
607
  },
610
608
  get isInitiated() {
611
- return N;
609
+ return b;
612
610
  }
613
611
  }),
614
- [N, m.current]
612
+ [b, d.current]
615
613
  );
616
- const j = () => {
617
- var I, x;
618
- if (S) return S;
619
- const c = (x = (I = d.current) == null ? void 0 : I.querySelector(".ol-viewport")) == null ? void 0 : x.querySelectorAll("div:last-child");
614
+ const A = () => {
615
+ var k, C;
616
+ if (h) return h;
617
+ const c = (C = (k = E.current) == null ? void 0 : k.querySelector(".ol-viewport")) == null ? void 0 : C.querySelectorAll("div:last-child");
620
618
  if (c)
621
- return Y(
619
+ return F(
622
620
  Array.from(c)[c.length - 1]
623
- ), S;
621
+ ), h;
622
+ }, Y = () => {
623
+ const c = A();
624
+ c == null || c.style.setProperty("scale", "" + o);
624
625
  }, U = () => {
625
- const c = j();
626
- c == null || c.style.setProperty("scale", "" + a);
627
- }, D = () => {
628
- const c = j();
626
+ const c = A();
629
627
  c == null || c.style.setProperty("bottom", "0.2em"), c == null || c.style.setProperty("left", "0.4em");
630
- }, W = () => {
631
- if (m.current != null || !d.current) return;
628
+ }, D = () => {
629
+ if (d.current != null || !E.current) return;
632
630
  const c = {};
633
- i != null && i.longitude && i.latitude && (c.center = Xe([i == null ? void 0 : i.longitude, i == null ? void 0 : i.latitude])), n && (c.zoom = n), m.current = new Te({
634
- target: d.current,
631
+ l != null && l.longitude && l.latitude && (c.center = We([l == null ? void 0 : l.longitude, l == null ? void 0 : l.latitude])), n && (c.zoom = n), d.current = new we({
632
+ target: E.current,
635
633
  key: t || "",
636
634
  mapType: s,
637
635
  // poi: store.state.poiLayer,
638
- poi: h,
636
+ poi: _,
639
637
  // traffic: store.state.trafficLayer,
640
- traffic: g,
641
- view: new be(c),
638
+ traffic: m,
639
+ view: new Te(c),
642
640
  controls: [],
643
641
  ...r
644
- }), v(!0), p && p(m.current);
642
+ }), $(!0), O && O(d.current);
645
643
  };
646
- return we(() => {
647
- W(), U(), D();
648
- }, []), /* @__PURE__ */ Oe.jsx(
644
+ return Re(() => {
645
+ D(), Y(), U();
646
+ }, []), /* @__PURE__ */ xe.jsx(
649
647
  "div",
650
648
  {
651
- ref: d,
652
- className: $ || ye.map,
653
- style: k
649
+ ref: E,
650
+ className: M || pe.map,
651
+ style: p
654
652
  }
655
653
  );
656
654
  }
657
655
  );
658
656
  export {
659
- He as default
657
+ Be as default
660
658
  };
@@ -1,4 +1,4 @@
1
- (function(d,T){typeof exports=="object"&&typeof module<"u"?module.exports=T(require("react"),require("@neshan-maps-platform/ol")):typeof define=="function"&&define.amd?define(["react","@neshan-maps-platform/ol"],T):(d=typeof globalThis<"u"?globalThis:d||self,d["neshan-ol-react-sdk"]=T(d.require$$0,d.ol))})(this,function(d,T){"use strict";var N={exports:{}},x={};/**
1
+ (function(d,P){typeof exports=="object"&&typeof module<"u"?module.exports=P(require("react"),require("@neshan-maps-platform/ol")):typeof define=="function"&&define.amd?define(["react","@neshan-maps-platform/ol"],P):(d=typeof globalThis<"u"?globalThis:d||self,d["neshan-ol-react-sdk"]=P(d.require$$0,d.ol))})(this,function(d,P){"use strict";var y={exports:{}},S={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Z;function Ee(){if(Z)return x;Z=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,a,i){var R=null;if(i!==void 0&&(R=""+i),a.key!==void 0&&(R=""+a.key),"key"in a){i={};for(var P in a)P!=="key"&&(i[P]=a[P])}else i=a;return a=i.ref,{$$typeof:r,type:s,key:R,ref:a!==void 0?a:null,props:i}}return x.Fragment=t,x.jsx=n,x.jsxs=n,x}var O={};/**
9
+ */var H;function de(){if(H)return S;H=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(s,o,l){var h=null;if(l!==void 0&&(h=""+l),o.key!==void 0&&(h=""+o.key),"key"in o){l={};for(var g in o)g!=="key"&&(l[g]=o[g])}else l=o;return o=l.ref,{$$typeof:r,type:s,key:h,ref:o!==void 0?o:null,props:l}}return S.Fragment=t,S.jsx=n,S.jsxs=n,S}var x={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,9 +14,9 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Q;function me(){return Q||(Q=1,process.env.NODE_ENV!=="production"&&function(){function r(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ye?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case X:return"Profiler";case y:return"StrictMode";case $:return"Suspense";case c:return"SuspenseList";case Fe:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case F:return"Portal";case L:return(e.displayName||"Context")+".Provider";case Y:return(e._context.displayName||"Context")+".Consumer";case J:var o=e.render;return e=e.displayName,e||(e=o.displayName||o.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return o=e.displayName||null,o!==null?o:r(e.type)||"Memo";case k:o=e._payload,e=e._init;try{return r(e(o))}catch{}}return null}function t(e){return""+e}function n(e){try{t(e);var o=!1}catch{o=!0}if(o){o=console;var l=o.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return l.call(o,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),t(e)}}function s(e){if(e===A)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===k)return"<...>";try{var o=r(e);return o?"<"+o+">":"<...>"}catch{return"<...>"}}function a(){var e=V.A;return e===null?null:e.getOwner()}function i(){return Error("react-stack-top-frame")}function R(e){if(ie.call(e,"key")){var o=Object.getOwnPropertyDescriptor(e,"key").get;if(o&&o.isReactWarning)return!1}return e.key!==void 0}function P(e,o){function l(){le||(le=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",o))}l.isReactWarning=!0,Object.defineProperty(e,"key",{get:l,configurable:!0})}function I(){var e=r(this.type);return ce[e]||(ce[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function W(e,o,l,u,_,m,z,B){return l=m.ref,e={$$typeof:h,type:e,key:o,props:m,_owner:_},(l!==void 0?l:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:I}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:B}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function G(e,o,l,u,_,m,z,B){var f=o.children;if(f!==void 0)if(u)if(Ue(f)){for(u=0;u<f.length;u++)M(f[u]);Object.freeze&&Object.freeze(f)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(f);if(ie.call(o,"key")){f=r(e);var v=Object.keys(o).filter(function(De){return De!=="key"});u=0<v.length?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}",de[f+u]||(v=0<v.length?"{"+v.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Z;function Ee(){return Z||(Z=1,process.env.NODE_ENV!=="production"&&function(){function r(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Fe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case I:return"Profiler";case W:return"StrictMode";case c:return"Suspense";case G:return"SuspenseList";case Me:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case D:return"Portal";case L:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case $:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case M:return a=e.displayName||null,a!==null?a:r(e.type)||"Memo";case J:a=e._payload,e=e._init;try{return r(e(a))}catch{}}return null}function t(e){return""+e}function n(e){try{t(e);var a=!1}catch{a=!0}if(a){a=console;var i=a.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i.call(a,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),t(e)}}function s(e){if(e===R)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===J)return"<...>";try{var a=r(e);return a?"<"+a+">":"<...>"}catch{return"<...>"}}function o(){var e=V.A;return e===null?null:e.getOwner()}function l(){return Error("react-stack-top-frame")}function h(e){if(se.call(e,"key")){var a=Object.getOwnPropertyDescriptor(e,"key").get;if(a&&a.isReactWarning)return!1}return e.key!==void 0}function g(e,a){function i(){le||(le=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",a))}i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}function N(){var e=r(this.type);return ie[e]||(ie[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function U(e,a,i,u,F,z){var f=i.ref;return e={$$typeof:O,type:e,key:a,props:i,_owner:u},(f!==void 0?f:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:N}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:F}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function C(e,a,i,u,F,z){var f=a.children;if(f!==void 0)if(u)if(Ye(f)){for(u=0;u<f.length;u++)j(f[u]);Object.freeze&&Object.freeze(f)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else j(f);if(se.call(a,"key")){f=r(e);var v=Object.keys(a).filter(function(Ue){return Ue!=="key"});u=0<v.length?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}",fe[f+u]||(v=0<v.length?"{"+v.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,u,f,v,f),de[f+u]=!0)}if(f=null,l!==void 0&&(n(l),f=""+l),R(o)&&(n(o.key),f=""+o.key),"key"in o){l={};for(var H in o)H!=="key"&&(l[H]=o[H])}else l=o;return f&&P(l,typeof e=="function"?e.displayName||e.name||"Unknown":e),W(e,f,m,_,a(),l,z,B)}function M(e){typeof e=="object"&&e!==null&&e.$$typeof===h&&e._store&&(e._store.validated=1)}var E=d,h=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),L=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),Fe=Symbol.for("react.activity"),Ye=Symbol.for("react.client.reference"),V=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=Object.prototype.hasOwnProperty,Ue=Array.isArray,q=console.createTask?console.createTask:function(){return null};E={"react-stack-bottom-frame":function(e){return e()}};var le,ce={},ue=E["react-stack-bottom-frame"].bind(E,i)(),fe=q(s(i)),de={};O.Fragment=A,O.jsx=function(e,o,l,u,_){var m=1e4>V.recentlyCreatedOwnerStacks++;return G(e,o,l,!1,u,_,m?Error("react-stack-top-frame"):ue,m?q(s(e)):fe)},O.jsxs=function(e,o,l,u,_){var m=1e4>V.recentlyCreatedOwnerStacks++;return G(e,o,l,!0,u,_,m?Error("react-stack-top-frame"):ue,m?q(s(e)):fe)}}()),O}var K;function he(){return K||(K=1,process.env.NODE_ENV==="production"?N.exports=Ee():N.exports=me()),N.exports}var _e=he();const ge={map:"_map_1tyvt_2"},Re={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class ee{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Re[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const p=6378137,w=Math.PI*p,Pe=[-w,-w,w,w],Te=[-180,-85,180,85],C=p*Math.log(Math.tan(Math.PI/2));class b extends ee{constructor(t){super({code:t,units:"m",extent:Pe,global:!0,worldExtent:Te,getPointResolution:function(n,s){return n/Math.cosh(s[1]/p)}})}}const te=[new b("EPSG:3857"),new b("EPSG:102100"),new b("EPSG:102113"),new b("EPSG:900913"),new b("http://www.opengis.net/def/crs/EPSG/0/3857"),new b("http://www.opengis.net/gml/srs/epsg.xml#3857")];function we(r,t,n){const s=r.length;n=n>1?n:2,t===void 0&&(n>2?t=r.slice():t=new Array(s));for(let a=0;a<s;a+=n){t[a]=w*r[a]/180;let i=p*Math.log(Math.tan(Math.PI*(+r[a+1]+90)/360));i>C?i=C:i<-C&&(i=-C),t[a+1]=i}return t}function be(r,t,n){const s=r.length;n=n>1?n:2,t===void 0&&(n>2?t=r.slice():t=new Array(s));for(let a=0;a<s;a+=n)t[a]=180*r[a]/w,t[a+1]=360*Math.atan(Math.exp(r[a+1]/p))/Math.PI-90;return t}const Se=6378137,re=[-180,-90,180,90],ve=Math.PI*Se/180;class g extends ee{constructor(t,n){super({code:t,units:"degrees",extent:re,axisOrientation:n,global:!0,metersPerUnit:ve,worldExtent:re})}}const ne=[new g("CRS:84"),new g("EPSG:4326","neu"),new g("urn:ogc:def:crs:OGC:1.3:CRS84"),new g("urn:ogc:def:crs:OGC:2:84"),new g("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new g("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new g("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let D={};function xe(r){return D[r]||D[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Oe(r,t){D[r]=t}let S={};function j(r,t,n){const s=r.getCode(),a=t.getCode();s in S||(S[s]={}),S[s][a]=n}function pe(r,t){let n;return r in S&&t in S[r]&&(n=S[r][t]),n}function oe(r,t){if(t!==void 0){for(let n=0,s=r.length;n<s;++n)t[n]=r[n];t=t}else t=r.slice();return t}function Ae(r,t){if(t!==void 0&&r!==t){for(let n=0,s=r.length;n<s;++n)t[n]=r[n];r=t}return r}function ye(r){Oe(r.getCode(),r),j(r,r,oe)}function ke(r){r.forEach(ye)}function ae(r){return typeof r=="string"?xe(r):r||null}function se(r){ke(r),r.forEach(function(t){r.forEach(function(n){t!==n&&j(t,n,oe)})})}function Ne(r,t,n,s){r.forEach(function(a){t.forEach(function(i){j(a,i,n),j(i,a,s)})})}function Ce(r,t){return Ge(r,"EPSG:4326","EPSG:3857")}function je(r,t){const n=r.getCode(),s=t.getCode();let a=pe(n,s);return a||(a=Ae),a}function Ie(r,t){const n=ae(r),s=ae(t);return je(n,s)}function Ge(r,t,n){return Ie(t,n)(r,void 0,r.length)}function Me(){se(te),se(ne),Ne(ne,te,we,be)}return Me(),d.forwardRef(({options:r,mapKey:t,zoom:n,defaultType:s,scale:a,center:i,poi:R,traffic:P,onInit:I,className:W,style:G},M)=>{const E=d.useRef(null),h=d.useRef(null),[F,A]=d.useState(!1),[y,X]=d.useState(null);d.useImperativeHandle(M,()=>({get mapContainer(){return E},get map(){return h.current},get isInitiated(){return F}}),[F,h.current]);const Y=()=>{var U,k;if(y)return y;const c=(k=(U=E.current)==null?void 0:U.querySelector(".ol-viewport"))==null?void 0:k.querySelectorAll("div:last-child");if(c)return X(Array.from(c)[c.length-1]),y},L=()=>{const c=Y();c==null||c.style.setProperty("scale",""+a)},J=()=>{const c=Y();c==null||c.style.setProperty("bottom","0.2em"),c==null||c.style.setProperty("left","0.4em")},$=()=>{if(h.current!=null||!E.current)return;const c={};i!=null&&i.longitude&&i.latitude&&(c.center=Ce([i==null?void 0:i.longitude,i==null?void 0:i.latitude])),n&&(c.zoom=n),h.current=new T.Map({target:E.current,key:t||"",mapType:s,poi:R,traffic:P,view:new T.View(c),controls:[],...r}),A(!0),I&&I(h.current)};return d.useEffect(()=>{$(),L(),J()},[]),_e.jsx("div",{ref:E,className:W||ge.map,style:G})})});
22
+ <%s key={someKey} {...props} />`,u,f,v,f),fe[f+u]=!0)}if(f=null,i!==void 0&&(n(i),f=""+i),h(a)&&(n(a.key),f=""+a.key),"key"in a){i={};for(var B in a)B!=="key"&&(i[B]=a[B])}else i=a;return f&&g(i,typeof e=="function"?e.displayName||e.name||"Unknown":e),U(e,f,i,o(),F,z)}function j(e){m(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===J&&(e._payload.status==="fulfilled"?m(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function m(e){return typeof e=="object"&&e!==null&&e.$$typeof===O}var E=d,O=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),L=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),Me=Symbol.for("react.activity"),Fe=Symbol.for("react.client.reference"),V=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=Object.prototype.hasOwnProperty,Ye=Array.isArray,q=console.createTask?console.createTask:function(){return null};E={react_stack_bottom_frame:function(e){return e()}};var le,ie={},ce=E.react_stack_bottom_frame.bind(E,l)(),ue=q(s(l)),fe={};x.Fragment=R,x.jsx=function(e,a,i){var u=1e4>V.recentlyCreatedOwnerStacks++;return C(e,a,i,!1,u?Error("react-stack-top-frame"):ce,u?q(s(e)):ue)},x.jsxs=function(e,a,i){var u=1e4>V.recentlyCreatedOwnerStacks++;return C(e,a,i,!0,u?Error("react-stack-top-frame"):ce,u?q(s(e)):ue)}}()),x}var Q;function me(){return Q||(Q=1,process.env.NODE_ENV==="production"?y.exports=de():y.exports=Ee()),y.exports}var _e=me();const he={map:"_map_1tyvt_2"},ge={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class K{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||ge[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const p=6378137,T=Math.PI*p,Re=[-T,-T,T,T],Pe=[-180,-85,180,85],A=p*Math.log(Math.tan(Math.PI/2));class w extends K{constructor(t){super({code:t,units:"m",extent:Re,global:!0,worldExtent:Pe,getPointResolution:function(n,s){return n/Math.cosh(s[1]/p)}})}}const ee=[new w("EPSG:3857"),new w("EPSG:102100"),new w("EPSG:102113"),new w("EPSG:900913"),new w("http://www.opengis.net/def/crs/EPSG/0/3857"),new w("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Te(r,t,n){const s=r.length;n=n>1?n:2,t===void 0&&(n>2?t=r.slice():t=new Array(s));for(let o=0;o<s;o+=n){t[o]=T*r[o]/180;let l=p*Math.log(Math.tan(Math.PI*(+r[o+1]+90)/360));l>A?l=A:l<-A&&(l=-A),t[o+1]=l}return t}function we(r,t,n){const s=r.length;n=n>1?n:2,t===void 0&&(n>2?t=r.slice():t=new Array(s));for(let o=0;o<s;o+=n)t[o]=180*r[o]/T,t[o+1]=360*Math.atan(Math.exp(r[o+1]/p))/Math.PI-90;return t}const be=6378137,te=[-180,-90,180,90],ve=Math.PI*be/180;class _ extends K{constructor(t,n){super({code:t,units:"degrees",extent:te,axisOrientation:n,global:!0,metersPerUnit:ve,worldExtent:te})}}const re=[new _("CRS:84"),new _("EPSG:4326","neu"),new _("urn:ogc:def:crs:OGC:1.3:CRS84"),new _("urn:ogc:def:crs:OGC:2:84"),new _("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new _("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new _("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Y={};function Se(r){return Y[r]||Y[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function xe(r,t){Y[r]=t}let b={};function k(r,t,n){const s=r.getCode(),o=t.getCode();s in b||(b[s]={}),b[s][o]=n}function pe(r,t){let n;return r in b&&t in b[r]&&(n=b[r][t]),n}function ne(r,t){if(t!==void 0){for(let n=0,s=r.length;n<s;++n)t[n]=r[n];t=t}else t=r.slice();return t}function Oe(r,t){if(t!==void 0&&r!==t){for(let n=0,s=r.length;n<s;++n)t[n]=r[n];r=t}return r}function ye(r){xe(r.getCode(),r),k(r,r,ne)}function Ae(r){r.forEach(ye)}function ae(r){return typeof r=="string"?Se(r):r||null}function oe(r){Ae(r),r.forEach(function(t){r.forEach(function(n){t!==n&&k(t,n,ne)})})}function ke(r,t,n,s){r.forEach(function(o){t.forEach(function(l){k(o,l,n),k(l,o,s)})})}function Ne(r,t){return Ie(r,"EPSG:4326","EPSG:3857")}function Ce(r,t){const n=r.getCode(),s=t.getCode();let o=pe(n,s);return o||(o=Oe),o}function je(r,t){const n=ae(r),s=ae(t);return Ce(n,s)}function Ie(r,t,n){return je(t,n)(r,void 0,r.length)}function Ge(){oe(ee),oe(re),ke(re,ee,Te,we)}return Ge(),d.forwardRef(({options:r,mapKey:t,zoom:n,defaultType:s,scale:o,center:l,poi:h,traffic:g,onInit:N,className:U,style:C},j)=>{const m=d.useRef(null),E=d.useRef(null),[O,D]=d.useState(!1),[R,W]=d.useState(null);d.useImperativeHandle(j,()=>({get mapContainer(){return m},get map(){return E.current},get isInitiated(){return O}}),[O,E.current]);const I=()=>{var G,M;if(R)return R;const c=(M=(G=m.current)==null?void 0:G.querySelector(".ol-viewport"))==null?void 0:M.querySelectorAll("div:last-child");if(c)return W(Array.from(c)[c.length-1]),R},X=()=>{const c=I();c==null||c.style.setProperty("scale",""+o)},L=()=>{const c=I();c==null||c.style.setProperty("bottom","0.2em"),c==null||c.style.setProperty("left","0.4em")},$=()=>{if(E.current!=null||!m.current)return;const c={};l!=null&&l.longitude&&l.latitude&&(c.center=Ne([l==null?void 0:l.longitude,l==null?void 0:l.latitude])),n&&(c.zoom=n),E.current=new P.Map({target:m.current,key:t||"",mapType:s,poi:h,traffic:g,view:new P.View(c),controls:[],...r}),D(!0),N&&N(E.current)};return d.useEffect(()=>{$(),X(),L()},[]),_e.jsx("div",{ref:m,className:U||he.map,style:C})})});
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "title": "react-neshanmap-openlayers",
4
4
  "description": "A react map component wrapping neshan openlayers map.",
5
5
  "private": false,
6
- "version": "3.0.2-alpha.1",
6
+ "version": "3.0.3-alpha.1",
7
7
  "type": "module",
8
8
  "types": "./dist/types/components/index.d.ts",
9
9
  "files": [
@@ -19,8 +19,8 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@neshan-maps-platform/ol": "1.0.5",
22
- "react": "19.1.0",
23
- "react-dom": "19.1.0"
22
+ "react": "^19.2.1",
23
+ "react-dom": "^19.2.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^22.14.1",