@neshan-maps-platform/react-openlayers 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- import Me, { createContext as fr, useReducer as dr, forwardRef as pr, useContext as vr, useRef as mr, useState as le, useImperativeHandle as yr, useEffect as gr } from "react";
2
- var ce = {}, hr = {
1
+ import Le, { createContext as dr, useReducer as pr, forwardRef as vr, useContext as mr, useRef as yr, useState as ue, useImperativeHandle as hr, useEffect as gr } from "react";
2
+ var ce = {}, _r = {
3
3
  get exports() {
4
4
  return ce;
5
5
  },
6
- set exports(s) {
7
- ce = s;
6
+ set exports(u) {
7
+ ce = u;
8
8
  }
9
- }, $ = {};
9
+ }, N = {};
10
10
  /**
11
11
  * @license React
12
12
  * react-jsx-runtime.production.min.js
@@ -17,24 +17,24 @@ var ce = {}, hr = {
17
17
  * LICENSE file in the root directory of this source tree.
18
18
  */
19
19
  var Fe;
20
- function _r() {
20
+ function Er() {
21
21
  if (Fe)
22
- return $;
22
+ return N;
23
23
  Fe = 1;
24
- var s = Me, y = Symbol.for("react.element"), S = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, d = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, D = { key: !0, ref: !0, __self: !0, __source: !0 };
25
- function A(O, v, x) {
26
- var g, T = {}, j = null, C = null;
27
- x !== void 0 && (j = "" + x), v.key !== void 0 && (j = "" + v.key), v.ref !== void 0 && (C = v.ref);
28
- for (g in v)
29
- E.call(v, g) && !D.hasOwnProperty(g) && (T[g] = v[g]);
24
+ var u = Le, p = Symbol.for("react.element"), S = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, v = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, F = { key: !0, ref: !0, __self: !0, __source: !0 };
25
+ function A(O, m, x) {
26
+ var _, T = {}, j = null, C = null;
27
+ x !== void 0 && (j = "" + x), m.key !== void 0 && (j = "" + m.key), m.ref !== void 0 && (C = m.ref);
28
+ for (_ in m)
29
+ b.call(m, _) && !F.hasOwnProperty(_) && (T[_] = m[_]);
30
30
  if (O && O.defaultProps)
31
- for (g in v = O.defaultProps, v)
32
- T[g] === void 0 && (T[g] = v[g]);
33
- return { $$typeof: y, type: O, key: j, ref: C, props: T, _owner: d.current };
31
+ for (_ in m = O.defaultProps, m)
32
+ T[_] === void 0 && (T[_] = m[_]);
33
+ return { $$typeof: p, type: O, key: j, ref: C, props: T, _owner: v.current };
34
34
  }
35
- return $.Fragment = S, $.jsx = A, $.jsxs = A, $;
35
+ return N.Fragment = S, N.jsx = A, N.jsxs = A, N;
36
36
  }
37
- var L = {};
37
+ var Y = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -45,90 +45,90 @@ var L = {};
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
47
  var Ie;
48
- function Er() {
48
+ function br() {
49
49
  return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && function() {
50
- var s = Me, y = Symbol.for("react.element"), S = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), A = Symbol.for("react.provider"), O = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), P = Symbol.iterator, W = "@@iterator";
51
- function H(e) {
50
+ var u = Le, p = Symbol.for("react.element"), S = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), F = Symbol.for("react.profiler"), A = Symbol.for("react.provider"), O = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), P = Symbol.iterator, $ = "@@iterator";
51
+ function K(e) {
52
52
  if (e === null || typeof e != "object")
53
53
  return null;
54
- var r = P && e[P] || e[W];
54
+ var r = P && e[P] || e[$];
55
55
  return typeof r == "function" ? r : null;
56
56
  }
57
- var w = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58
- function m(e) {
57
+ var w = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58
+ function y(e) {
59
59
  {
60
60
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
61
61
  t[n - 1] = arguments[n];
62
- M("error", e, t);
62
+ fe("error", e, t);
63
63
  }
64
64
  }
65
- function M(e, r, t) {
65
+ function fe(e, r, t) {
66
66
  {
67
67
  var n = w.ReactDebugCurrentFrame, i = n.getStackAddendum();
68
68
  i !== "" && (r += "%s", t = t.concat([i]));
69
- var u = t.map(function(o) {
69
+ var c = t.map(function(o) {
70
70
  return String(o);
71
71
  });
72
- u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
72
+ c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
73
73
  }
74
74
  }
75
- var X = !1, V = !1, Z = !1, Q = !1, ee = !1, B;
76
- B = Symbol.for("react.module.reference");
77
- function U(e) {
78
- return !!(typeof e == "string" || typeof e == "function" || e === E || e === D || ee || e === d || e === x || e === g || Q || e === C || X || V || Z || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === T || e.$$typeof === A || e.$$typeof === O || e.$$typeof === v || // This needs to include all possible module reference object
75
+ var H = !1, W = !1, X = !1, Z = !1, Q = !1, V;
76
+ V = Symbol.for("react.module.reference");
77
+ function B(e) {
78
+ return !!(typeof e == "string" || typeof e == "function" || e === b || e === F || Q || e === v || e === x || e === _ || Z || e === C || H || W || X || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === T || e.$$typeof === A || e.$$typeof === O || e.$$typeof === m || // This needs to include all possible module reference object
79
79
  // types supported by any Flight configuration anywhere since
80
80
  // we don't know which Flight build this will end up being used
81
81
  // with.
82
- e.$$typeof === B || e.getModuleId !== void 0));
82
+ e.$$typeof === V || e.getModuleId !== void 0));
83
83
  }
84
- function l(e, r, t) {
84
+ function s(e, r, t) {
85
85
  var n = e.displayName;
86
86
  if (n)
87
87
  return n;
88
88
  var i = r.displayName || r.name || "";
89
89
  return i !== "" ? t + "(" + i + ")" : t;
90
90
  }
91
- function _(e) {
91
+ function g(e) {
92
92
  return e.displayName || "Context";
93
93
  }
94
- function p(e) {
94
+ function l(e) {
95
95
  if (e == null)
96
96
  return null;
97
- if (typeof e.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
97
+ if (typeof e.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
98
98
  return e.displayName || e.name || null;
99
99
  if (typeof e == "string")
100
100
  return e;
101
101
  switch (e) {
102
- case E:
102
+ case b:
103
103
  return "Fragment";
104
104
  case S:
105
105
  return "Portal";
106
- case D:
106
+ case F:
107
107
  return "Profiler";
108
- case d:
108
+ case v:
109
109
  return "StrictMode";
110
110
  case x:
111
111
  return "Suspense";
112
- case g:
112
+ case _:
113
113
  return "SuspenseList";
114
114
  }
115
115
  if (typeof e == "object")
116
116
  switch (e.$$typeof) {
117
117
  case O:
118
118
  var r = e;
119
- return _(r) + ".Consumer";
119
+ return g(r) + ".Consumer";
120
120
  case A:
121
121
  var t = e;
122
- return _(t._context) + ".Provider";
123
- case v:
124
- return l(e, e.render, "ForwardRef");
122
+ return g(t._context) + ".Provider";
123
+ case m:
124
+ return s(e, e.render, "ForwardRef");
125
125
  case T:
126
126
  var n = e.displayName || null;
127
- return n !== null ? n : p(e.type) || "Memo";
127
+ return n !== null ? n : l(e.type) || "Memo";
128
128
  case j: {
129
- var i = e, u = i._payload, o = i._init;
129
+ var i = e, c = i._payload, o = i._init;
130
130
  try {
131
- return p(o(u));
131
+ return l(o(c));
132
132
  } catch {
133
133
  return null;
134
134
  }
@@ -136,14 +136,14 @@ function Er() {
136
136
  }
137
137
  return null;
138
138
  }
139
- var b = Object.assign, N = 0, de, pe, ve, me, ye, ge, he;
139
+ var h = Object.assign, D = 0, de, pe, ve, me, ye, he, ge;
140
140
  function _e() {
141
141
  }
142
142
  _e.__reactDisabledLog = !0;
143
- function Le() {
143
+ function We() {
144
144
  {
145
- if (N === 0) {
146
- de = console.log, pe = console.info, ve = console.warn, me = console.error, ye = console.group, ge = console.groupCollapsed, he = console.groupEnd;
145
+ if (D === 0) {
146
+ de = console.log, pe = console.info, ve = console.warn, me = console.error, ye = console.group, he = console.groupCollapsed, ge = console.groupEnd;
147
147
  var e = {
148
148
  configurable: !0,
149
149
  enumerable: !0,
@@ -160,77 +160,77 @@ function Er() {
160
160
  groupEnd: e
161
161
  });
162
162
  }
163
- N++;
163
+ D++;
164
164
  }
165
165
  }
166
- function We() {
166
+ function Ve() {
167
167
  {
168
- if (N--, N === 0) {
168
+ if (D--, D === 0) {
169
169
  var e = {
170
170
  configurable: !0,
171
171
  enumerable: !0,
172
172
  writable: !0
173
173
  };
174
174
  Object.defineProperties(console, {
175
- log: b({}, e, {
175
+ log: h({}, e, {
176
176
  value: de
177
177
  }),
178
- info: b({}, e, {
178
+ info: h({}, e, {
179
179
  value: pe
180
180
  }),
181
- warn: b({}, e, {
181
+ warn: h({}, e, {
182
182
  value: ve
183
183
  }),
184
- error: b({}, e, {
184
+ error: h({}, e, {
185
185
  value: me
186
186
  }),
187
- group: b({}, e, {
187
+ group: h({}, e, {
188
188
  value: ye
189
189
  }),
190
- groupCollapsed: b({}, e, {
191
- value: ge
192
- }),
193
- groupEnd: b({}, e, {
190
+ groupCollapsed: h({}, e, {
194
191
  value: he
192
+ }),
193
+ groupEnd: h({}, e, {
194
+ value: ge
195
195
  })
196
196
  });
197
197
  }
198
- N < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
198
+ D < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
199
199
  }
200
200
  }
201
- var re = w.ReactCurrentDispatcher, te;
202
- function q(e, r, t) {
201
+ var ee = w.ReactCurrentDispatcher, re;
202
+ function U(e, r, t) {
203
203
  {
204
- if (te === void 0)
204
+ if (re === void 0)
205
205
  try {
206
206
  throw Error();
207
207
  } catch (i) {
208
208
  var n = i.stack.trim().match(/\n( *(at )?)/);
209
- te = n && n[1] || "";
209
+ re = n && n[1] || "";
210
210
  }
211
211
  return `
212
- ` + te + e;
212
+ ` + re + e;
213
213
  }
214
214
  }
215
- var ne = !1, z;
215
+ var te = !1, q;
216
216
  {
217
- var Ve = typeof WeakMap == "function" ? WeakMap : Map;
218
- z = new Ve();
217
+ var Be = typeof WeakMap == "function" ? WeakMap : Map;
218
+ q = new Be();
219
219
  }
220
220
  function Ee(e, r) {
221
- if (!e || ne)
221
+ if (!e || te)
222
222
  return "";
223
223
  {
224
- var t = z.get(e);
224
+ var t = q.get(e);
225
225
  if (t !== void 0)
226
226
  return t;
227
227
  }
228
228
  var n;
229
- ne = !0;
229
+ te = !0;
230
230
  var i = Error.prepareStackTrace;
231
231
  Error.prepareStackTrace = void 0;
232
- var u;
233
- u = re.current, re.current = null, Le();
232
+ var c;
233
+ c = ee.current, ee.current = null, We();
234
234
  try {
235
235
  if (r) {
236
236
  var o = function() {
@@ -266,102 +266,102 @@ function Er() {
266
266
  } catch (k) {
267
267
  if (k && n && typeof k.stack == "string") {
268
268
  for (var a = k.stack.split(`
269
- `), h = n.stack.split(`
270
- `), c = a.length - 1, f = h.length - 1; c >= 1 && f >= 0 && a[c] !== h[f]; )
271
- f--;
272
- for (; c >= 1 && f >= 0; c--, f--)
273
- if (a[c] !== h[f]) {
274
- if (c !== 1 || f !== 1)
269
+ `), E = n.stack.split(`
270
+ `), f = a.length - 1, d = E.length - 1; f >= 1 && d >= 0 && a[f] !== E[d]; )
271
+ d--;
272
+ for (; f >= 1 && d >= 0; f--, d--)
273
+ if (a[f] !== E[d]) {
274
+ if (f !== 1 || d !== 1)
275
275
  do
276
- if (c--, f--, f < 0 || a[c] !== h[f]) {
276
+ if (f--, d--, d < 0 || a[f] !== E[d]) {
277
277
  var R = `
278
- ` + a[c].replace(" at new ", " at ");
279
- return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, R), R;
278
+ ` + a[f].replace(" at new ", " at ");
279
+ return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, R), R;
280
280
  }
281
- while (c >= 1 && f >= 0);
281
+ while (f >= 1 && d >= 0);
282
282
  break;
283
283
  }
284
284
  }
285
285
  } finally {
286
- ne = !1, re.current = u, We(), Error.prepareStackTrace = i;
286
+ te = !1, ee.current = c, Ve(), Error.prepareStackTrace = i;
287
287
  }
288
- var I = e ? e.displayName || e.name : "", De = I ? q(I) : "";
289
- return typeof e == "function" && z.set(e, De), De;
288
+ var M = e ? e.displayName || e.name : "", De = M ? U(M) : "";
289
+ return typeof e == "function" && q.set(e, De), De;
290
290
  }
291
- function Be(e, r, t) {
291
+ function Ue(e, r, t) {
292
292
  return Ee(e, !1);
293
293
  }
294
- function Ue(e) {
294
+ function qe(e) {
295
295
  var r = e.prototype;
296
296
  return !!(r && r.isReactComponent);
297
297
  }
298
- function J(e, r, t) {
298
+ function z(e, r, t) {
299
299
  if (e == null)
300
300
  return "";
301
301
  if (typeof e == "function")
302
- return Ee(e, Ue(e));
302
+ return Ee(e, qe(e));
303
303
  if (typeof e == "string")
304
- return q(e);
304
+ return U(e);
305
305
  switch (e) {
306
306
  case x:
307
- return q("Suspense");
308
- case g:
309
- return q("SuspenseList");
307
+ return U("Suspense");
308
+ case _:
309
+ return U("SuspenseList");
310
310
  }
311
311
  if (typeof e == "object")
312
312
  switch (e.$$typeof) {
313
- case v:
314
- return Be(e.render);
313
+ case m:
314
+ return Ue(e.render);
315
315
  case T:
316
- return J(e.type, r, t);
316
+ return z(e.type, r, t);
317
317
  case j: {
318
- var n = e, i = n._payload, u = n._init;
318
+ var n = e, i = n._payload, c = n._init;
319
319
  try {
320
- return J(u(i), r, t);
320
+ return z(c(i), r, t);
321
321
  } catch {
322
322
  }
323
323
  }
324
324
  }
325
325
  return "";
326
326
  }
327
- var G = Object.prototype.hasOwnProperty, be = {}, Re = w.ReactDebugCurrentFrame;
328
- function K(e) {
327
+ var J = Object.prototype.hasOwnProperty, be = {}, Re = w.ReactDebugCurrentFrame;
328
+ function G(e) {
329
329
  if (e) {
330
- var r = e._owner, t = J(e.type, e._source, r ? r.type : null);
330
+ var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
331
331
  Re.setExtraStackFrame(t);
332
332
  } else
333
333
  Re.setExtraStackFrame(null);
334
334
  }
335
- function qe(e, r, t, n, i) {
335
+ function ze(e, r, t, n, i) {
336
336
  {
337
- var u = Function.call.bind(G);
337
+ var c = Function.call.bind(J);
338
338
  for (var o in e)
339
- if (u(e, o)) {
339
+ if (c(e, o)) {
340
340
  var a = void 0;
341
341
  try {
342
342
  if (typeof e[o] != "function") {
343
- var h = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
- throw h.name = "Invariant Violation", h;
343
+ var E = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
344
+ throw E.name = "Invariant Violation", E;
345
345
  }
346
346
  a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
347
- } catch (c) {
348
- a = c;
347
+ } catch (f) {
348
+ a = f;
349
349
  }
350
- a && !(a instanceof Error) && (K(i), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), K(null)), a instanceof Error && !(a.message in be) && (be[a.message] = !0, K(i), m("Failed %s type: %s", t, a.message), K(null));
350
+ a && !(a instanceof Error) && (G(i), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), G(null)), a instanceof Error && !(a.message in be) && (be[a.message] = !0, G(i), y("Failed %s type: %s", t, a.message), G(null));
351
351
  }
352
352
  }
353
353
  }
354
- var ze = Array.isArray;
355
- function ae(e) {
356
- return ze(e);
354
+ var Je = Array.isArray;
355
+ function ne(e) {
356
+ return Je(e);
357
357
  }
358
- function Je(e) {
358
+ function Ge(e) {
359
359
  {
360
360
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
361
361
  return t;
362
362
  }
363
363
  }
364
- function Ge(e) {
364
+ function Ke(e) {
365
365
  try {
366
366
  return Te(e), !1;
367
367
  } catch {
@@ -372,42 +372,42 @@ function Er() {
372
372
  return "" + e;
373
373
  }
374
374
  function Ce(e) {
375
- if (Ge(e))
376
- return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(e)), Te(e);
375
+ if (Ke(e))
376
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), Te(e);
377
377
  }
378
- var Y = w.ReactCurrentOwner, Ke = {
378
+ var L = w.ReactCurrentOwner, He = {
379
379
  key: !0,
380
380
  ref: !0,
381
381
  __self: !0,
382
382
  __source: !0
383
- }, Pe, Se, oe;
384
- oe = {};
385
- function He(e) {
386
- if (G.call(e, "ref")) {
383
+ }, Pe, Se, ae;
384
+ ae = {};
385
+ function Xe(e) {
386
+ if (J.call(e, "ref")) {
387
387
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
388
388
  if (r && r.isReactWarning)
389
389
  return !1;
390
390
  }
391
391
  return e.ref !== void 0;
392
392
  }
393
- function Xe(e) {
394
- if (G.call(e, "key")) {
393
+ function Ze(e) {
394
+ if (J.call(e, "key")) {
395
395
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
396
396
  if (r && r.isReactWarning)
397
397
  return !1;
398
398
  }
399
399
  return e.key !== void 0;
400
400
  }
401
- function Ze(e, r) {
402
- if (typeof e.ref == "string" && Y.current && r && Y.current.stateNode !== r) {
403
- var t = p(Y.current.type);
404
- oe[t] || (m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', p(Y.current.type), e.ref), oe[t] = !0);
401
+ function Qe(e, r) {
402
+ if (typeof e.ref == "string" && L.current && r && L.current.stateNode !== r) {
403
+ var t = l(L.current.type);
404
+ ae[t] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', l(L.current.type), e.ref), ae[t] = !0);
405
405
  }
406
406
  }
407
- function Qe(e, r) {
407
+ function er(e, r) {
408
408
  {
409
409
  var t = function() {
410
- Pe || (Pe = !0, m("%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://reactjs.org/link/special-props)", r));
410
+ Pe || (Pe = !0, y("%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://reactjs.org/link/special-props)", r));
411
411
  };
412
412
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
413
413
  get: t,
@@ -415,10 +415,10 @@ function Er() {
415
415
  });
416
416
  }
417
417
  }
418
- function er(e, r) {
418
+ function rr(e, r) {
419
419
  {
420
420
  var t = function() {
421
- Se || (Se = !0, m("%s: `ref` 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://reactjs.org/link/special-props)", r));
421
+ Se || (Se = !0, y("%s: `ref` 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://reactjs.org/link/special-props)", r));
422
422
  };
423
423
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
424
424
  get: t,
@@ -426,17 +426,17 @@ function Er() {
426
426
  });
427
427
  }
428
428
  }
429
- var rr = function(e, r, t, n, i, u, o) {
429
+ var tr = function(e, r, t, n, i, c, o) {
430
430
  var a = {
431
431
  // This tag allows us to uniquely identify this as a React Element
432
- $$typeof: y,
432
+ $$typeof: p,
433
433
  // Built-in properties that belong on the element
434
434
  type: e,
435
435
  key: r,
436
436
  ref: t,
437
437
  props: o,
438
438
  // Record the component responsible for creating this element.
439
- _owner: u
439
+ _owner: c
440
440
  };
441
441
  return a._store = {}, Object.defineProperty(a._store, "validated", {
442
442
  configurable: !1,
@@ -455,41 +455,41 @@ function Er() {
455
455
  value: i
456
456
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
457
457
  };
458
- function tr(e, r, t, n, i) {
458
+ function nr(e, r, t, n, i) {
459
459
  {
460
- var u, o = {}, a = null, h = null;
461
- t !== void 0 && (Ce(t), a = "" + t), Xe(r) && (Ce(r.key), a = "" + r.key), He(r) && (h = r.ref, Ze(r, i));
462
- for (u in r)
463
- G.call(r, u) && !Ke.hasOwnProperty(u) && (o[u] = r[u]);
460
+ var c, o = {}, a = null, E = null;
461
+ t !== void 0 && (Ce(t), a = "" + t), Ze(r) && (Ce(r.key), a = "" + r.key), Xe(r) && (E = r.ref, Qe(r, i));
462
+ for (c in r)
463
+ J.call(r, c) && !He.hasOwnProperty(c) && (o[c] = r[c]);
464
464
  if (e && e.defaultProps) {
465
- var c = e.defaultProps;
466
- for (u in c)
467
- o[u] === void 0 && (o[u] = c[u]);
465
+ var f = e.defaultProps;
466
+ for (c in f)
467
+ o[c] === void 0 && (o[c] = f[c]);
468
468
  }
469
- if (a || h) {
470
- var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
471
- a && Qe(o, f), h && er(o, f);
469
+ if (a || E) {
470
+ var d = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
471
+ a && er(o, d), E && rr(o, d);
472
472
  }
473
- return rr(e, a, h, i, n, Y.current, o);
473
+ return tr(e, a, E, i, n, L.current, o);
474
474
  }
475
475
  }
476
- var ie = w.ReactCurrentOwner, we = w.ReactDebugCurrentFrame;
477
- function F(e) {
476
+ var oe = w.ReactCurrentOwner, we = w.ReactDebugCurrentFrame;
477
+ function I(e) {
478
478
  if (e) {
479
- var r = e._owner, t = J(e.type, e._source, r ? r.type : null);
479
+ var r = e._owner, t = z(e.type, e._source, r ? r.type : null);
480
480
  we.setExtraStackFrame(t);
481
481
  } else
482
482
  we.setExtraStackFrame(null);
483
483
  }
484
- var se;
485
- se = !1;
486
- function ue(e) {
487
- return typeof e == "object" && e !== null && e.$$typeof === y;
484
+ var ie;
485
+ ie = !1;
486
+ function se(e) {
487
+ return typeof e == "object" && e !== null && e.$$typeof === p;
488
488
  }
489
489
  function Oe() {
490
490
  {
491
- if (ie.current) {
492
- var e = p(ie.current.type);
491
+ if (oe.current) {
492
+ var e = l(oe.current.type);
493
493
  if (e)
494
494
  return `
495
495
 
@@ -498,7 +498,7 @@ Check the render method of \`` + e + "`.";
498
498
  return "";
499
499
  }
500
500
  }
501
- function nr(e) {
501
+ function ar(e) {
502
502
  {
503
503
  if (e !== void 0) {
504
504
  var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
@@ -510,7 +510,7 @@ Check your code at ` + r + ":" + t + ".";
510
510
  }
511
511
  }
512
512
  var xe = {};
513
- function ar(e) {
513
+ function or(e) {
514
514
  {
515
515
  var r = Oe();
516
516
  if (!r) {
@@ -527,34 +527,34 @@ Check the top-level render call using <` + t + ">.");
527
527
  if (!e._store || e._store.validated || e.key != null)
528
528
  return;
529
529
  e._store.validated = !0;
530
- var t = ar(r);
530
+ var t = or(r);
531
531
  if (xe[t])
532
532
  return;
533
533
  xe[t] = !0;
534
534
  var n = "";
535
- e && e._owner && e._owner !== ie.current && (n = " It was passed a child from " + p(e._owner.type) + "."), F(e), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), F(null);
535
+ e && e._owner && e._owner !== oe.current && (n = " It was passed a child from " + l(e._owner.type) + "."), I(e), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), I(null);
536
536
  }
537
537
  }
538
538
  function ke(e, r) {
539
539
  {
540
540
  if (typeof e != "object")
541
541
  return;
542
- if (ae(e))
542
+ if (ne(e))
543
543
  for (var t = 0; t < e.length; t++) {
544
544
  var n = e[t];
545
- ue(n) && je(n, r);
545
+ se(n) && je(n, r);
546
546
  }
547
- else if (ue(e))
547
+ else if (se(e))
548
548
  e._store && (e._store.validated = !0);
549
549
  else if (e) {
550
- var i = H(e);
550
+ var i = K(e);
551
551
  if (typeof i == "function" && i !== e.entries)
552
- for (var u = i.call(e), o; !(o = u.next()).done; )
553
- ue(o.value) && je(o.value, r);
552
+ for (var c = i.call(e), o; !(o = c.next()).done; )
553
+ se(o.value) && je(o.value, r);
554
554
  }
555
555
  }
556
556
  }
557
- function or(e) {
557
+ function ir(e) {
558
558
  {
559
559
  var r = e.type;
560
560
  if (r == null || typeof r == "string")
@@ -562,178 +562,180 @@ Check the top-level render call using <` + t + ">.");
562
562
  var t;
563
563
  if (typeof r == "function")
564
564
  t = r.propTypes;
565
- else if (typeof r == "object" && (r.$$typeof === v || // Note: Memo only checks outer props here.
565
+ else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
566
566
  // Inner props are checked in the reconciler.
567
567
  r.$$typeof === T))
568
568
  t = r.propTypes;
569
569
  else
570
570
  return;
571
571
  if (t) {
572
- var n = p(r);
573
- qe(t, e.props, "prop", n, e);
574
- } else if (r.PropTypes !== void 0 && !se) {
575
- se = !0;
576
- var i = p(r);
577
- m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
572
+ var n = l(r);
573
+ ze(t, e.props, "prop", n, e);
574
+ } else if (r.PropTypes !== void 0 && !ie) {
575
+ ie = !0;
576
+ var i = l(r);
577
+ y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
578
578
  }
579
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
579
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
580
580
  }
581
581
  }
582
- function ir(e) {
582
+ function sr(e) {
583
583
  {
584
584
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
585
585
  var n = r[t];
586
586
  if (n !== "children" && n !== "key") {
587
- F(e), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), F(null);
587
+ I(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), I(null);
588
588
  break;
589
589
  }
590
590
  }
591
- e.ref !== null && (F(e), m("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
591
+ e.ref !== null && (I(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
592
592
  }
593
593
  }
594
- function Ae(e, r, t, n, i, u) {
594
+ function Ae(e, r, t, n, i, c) {
595
595
  {
596
- var o = U(e);
596
+ var o = B(e);
597
597
  if (!o) {
598
598
  var a = "";
599
599
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
600
- var h = nr(i);
601
- h ? a += h : a += Oe();
602
- var c;
603
- e === null ? c = "null" : ae(e) ? c = "array" : e !== void 0 && e.$$typeof === y ? (c = "<" + (p(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : c = typeof e, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, a);
600
+ var E = ar(i);
601
+ E ? a += E : a += Oe();
602
+ var f;
603
+ e === null ? f = "null" : ne(e) ? f = "array" : e !== void 0 && e.$$typeof === p ? (f = "<" + (l(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : f = typeof e, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", f, a);
604
604
  }
605
- var f = tr(e, r, t, i, u);
606
- if (f == null)
607
- return f;
605
+ var d = nr(e, r, t, i, c);
606
+ if (d == null)
607
+ return d;
608
608
  if (o) {
609
609
  var R = r.children;
610
610
  if (R !== void 0)
611
611
  if (n)
612
- if (ae(R)) {
613
- for (var I = 0; I < R.length; I++)
614
- ke(R[I], e);
612
+ if (ne(R)) {
613
+ for (var M = 0; M < R.length; M++)
614
+ ke(R[M], e);
615
615
  Object.freeze && Object.freeze(R);
616
616
  } else
617
- m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
617
+ y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
618
618
  else
619
619
  ke(R, e);
620
620
  }
621
- return e === E ? ir(f) : or(f), f;
621
+ return e === b ? sr(d) : ir(d), d;
622
622
  }
623
623
  }
624
- function sr(e, r, t) {
624
+ function ur(e, r, t) {
625
625
  return Ae(e, r, t, !0);
626
626
  }
627
- function ur(e, r, t) {
627
+ function cr(e, r, t) {
628
628
  return Ae(e, r, t, !1);
629
629
  }
630
- var lr = ur, cr = sr;
631
- L.Fragment = E, L.jsx = lr, L.jsxs = cr;
632
- }()), L;
630
+ var lr = cr, fr = ur;
631
+ Y.Fragment = b, Y.jsx = lr, Y.jsxs = fr;
632
+ }()), Y;
633
633
  }
634
- (function(s) {
635
- process.env.NODE_ENV === "production" ? s.exports = _r() : s.exports = Er();
636
- })(hr);
637
- const fe = ce.jsx;
638
- const br = "_map_an20y_2", Rr = "_touch_an20y_26", Tr = "_floaten_an20y_45", Cr = "_float_an20y_45", Pr = {
639
- map: br,
634
+ (function(u) {
635
+ process.env.NODE_ENV === "production" ? u.exports = Er() : u.exports = br();
636
+ })(_r);
637
+ const le = ce.jsx;
638
+ const Rr = "_map_an20y_2", Tr = "_touch_an20y_26", Cr = "_floaten_an20y_45", Pr = "_float_an20y_45", Sr = {
639
+ map: Rr,
640
640
  "map-popup-container": "_map-popup-container_an20y_7",
641
- touch: Rr,
641
+ touch: Tr,
642
642
  "mobile-layers-button": "_mobile-layers-button_an20y_30",
643
- floaten: Tr,
644
- float: Cr
645
- }, Ne = (s) => s ? s instanceof Object ? [s.longitude, s.latitude] : s : void 0, Sr = async () => {
643
+ floaten: Cr,
644
+ float: Pr
645
+ }, Ne = (u) => u ? u instanceof Object ? [u.longitude, u.latitude] : u : void 0, wr = async () => {
646
646
  try {
647
- const y = await new Promise(
648
- (S, E) => {
647
+ const p = await new Promise(
648
+ (S, b) => {
649
649
  navigator.geolocation.getCurrentPosition(
650
- (d) => {
651
- S(d);
650
+ (v) => {
651
+ S(v);
652
652
  },
653
- (d) => E(d)
653
+ (v) => b(v)
654
654
  );
655
655
  }
656
656
  );
657
- return y && Ne(y.coords) || Object.values(wr());
658
- } catch (s) {
659
- return console.error(s), {};
657
+ return p && Ne(p.coords) || Object.values(Me());
658
+ } catch (u) {
659
+ console.error(u);
660
+ const p = Me();
661
+ return [p.longitude, p.latitude];
660
662
  }
661
- }, wr = () => ({
662
- longitude: 59.5870851,
663
- latitude: 36.311559
663
+ }, Me = () => ({
664
+ longitude: 51.36281969540723,
665
+ latitude: 35.69672648316882
664
666
  }), Or = {
665
667
  reverse: "https://api.neshan.org/v4/reverse",
666
668
  search: "https://api.neshan.org/v1/search",
667
669
  map: "https://static.neshan.org/sdk/openlayers/7.1.0/ol.js"
668
- }, Ye = fr({
670
+ }, Ye = dr({
669
671
  map: null,
670
672
  mapType: "neshan",
671
673
  mapContainer: null,
672
- setMap: (s) => {
674
+ setMap: (u) => {
673
675
  },
674
- setMapType: (s) => {
676
+ setMapType: (u) => {
675
677
  },
676
- setMapContainer: (s) => {
678
+ setMapContainer: (u) => {
677
679
  }
678
680
  }), $e = {
679
681
  map: null,
680
682
  mapType: "neshan",
681
683
  mapContainer: null
682
- }, xr = (s, y) => {
683
- switch (y.type) {
684
+ }, xr = (u, p) => {
685
+ switch (p.type) {
684
686
  case "SET_MAP":
685
687
  return {
686
- ...s,
687
- map: y.payload
688
+ ...u,
689
+ map: p.payload
688
690
  };
689
691
  case "SET_MAP_TYPE":
690
692
  return {
691
- ...s,
692
- title: y.payload
693
+ ...u,
694
+ title: p.payload
693
695
  };
694
696
  default:
695
697
  return $e;
696
698
  }
697
- }, jr = (s) => {
698
- const [y, S] = dr(xr, $e), E = {
699
- ...y,
700
- setMap: (d) => {
699
+ }, jr = (u) => {
700
+ const [p, S] = pr(xr, $e), b = {
701
+ ...p,
702
+ setMap: (v) => {
701
703
  S({
702
704
  type: "SET_MAP",
703
- payload: d
705
+ payload: v
704
706
  });
705
707
  },
706
- setMapType: (d) => {
708
+ setMapType: (v) => {
707
709
  S({
708
710
  type: "SET_MAP_TYPE",
709
- payload: d
711
+ payload: v
710
712
  });
711
713
  },
712
- setMapContainer: (d) => {
714
+ setMapContainer: (v) => {
713
715
  S({
714
716
  type: "SET_MAP_CONTAINER",
715
- payload: d
717
+ payload: v
716
718
  });
717
719
  }
718
720
  };
719
- return /* @__PURE__ */ fe(Ye.Provider, { value: E, children: s.children });
720
- }, Ar = pr(
721
+ return /* @__PURE__ */ le(Ye.Provider, { value: b, children: u.children });
722
+ }, Ar = vr(
721
723
  ({
722
- options: s,
723
- mapKey: y,
724
+ options: u,
725
+ mapKey: p,
724
726
  serviceKey: S = "",
725
- zoom: E = 12,
726
- defaultType: d = "neshan",
727
- scale: D,
727
+ zoom: b = 12,
728
+ defaultType: v = "neshan",
729
+ scale: F,
728
730
  center: A,
729
731
  poi: O = !0,
730
- traffic: v = !0,
732
+ traffic: m = !0,
731
733
  onInit: x,
732
- className: g,
734
+ className: _,
733
735
  style: T
734
736
  }, j) => {
735
- const C = vr(Ye), P = mr(null), [W, H] = le(!1), [w, m] = le(null), [M, X] = le();
736
- yr(
737
+ const C = mr(Ye), P = yr(null), [$, K] = ue(!1), [w, y] = ue(null), [fe, H] = ue();
738
+ hr(
737
739
  j,
738
740
  () => ({
739
741
  get mapContainer() {
@@ -746,75 +748,82 @@ const br = "_map_an20y_2", Rr = "_touch_an20y_26", Tr = "_floaten_an20y_45", Cr
746
748
  return C.map;
747
749
  },
748
750
  get isInitiated() {
749
- return W;
751
+ return $;
750
752
  }
751
753
  }),
752
- [P, C.map, W]
754
+ [P, C.map, $]
753
755
  );
754
- const V = () => {
755
- var _, p;
756
+ const W = () => {
757
+ var g, l;
756
758
  if (w)
757
759
  return w;
758
- const l = (p = (_ = P.current) == null ? void 0 : _.querySelector(".ol-viewport")) == null ? void 0 : p.querySelectorAll("div:last-child");
759
- if (l)
760
- return m(
761
- Array.from(l)[l.length - 1]
760
+ const s = (l = (g = P.current) == null ? void 0 : g.querySelector(".ol-viewport")) == null ? void 0 : l.querySelectorAll("div:last-child");
761
+ if (s)
762
+ return y(
763
+ Array.from(s)[s.length - 1]
762
764
  ), w;
765
+ }, X = () => {
766
+ const s = W();
767
+ s == null || s.style.setProperty("scale", "" + F);
763
768
  }, Z = () => {
764
- const l = V();
765
- l == null || l.style.setProperty("scale", "" + D);
766
- }, Q = () => {
767
- const l = V();
768
- l == null || l.style.setProperty("bottom", "0.2em"), l == null || l.style.setProperty("left", "0.4em");
769
- }, ee = (l, _ = "my-openlayer") => {
770
- const p = document.getElementById(_);
771
- if (p)
772
- return p;
773
- const b = document.createElement("script");
774
- return b.src = l, b.id = _, document.getElementsByTagName("head")[0].appendChild(b), b;
775
- }, B = async () => {
776
- var p;
777
- if (console.log(1), !P.current)
769
+ const s = W();
770
+ s == null || s.style.setProperty("bottom", "0.2em"), s == null || s.style.setProperty("left", "0.4em");
771
+ }, Q = (s, g = "my-openlayer") => {
772
+ const l = document.getElementById(g);
773
+ if (l)
774
+ return l;
775
+ const h = document.createElement("script");
776
+ return h.src = s, h.id = g, document.getElementsByTagName("head")[0].appendChild(h), h;
777
+ }, V = async () => {
778
+ var h;
779
+ if (!P.current)
778
780
  return;
779
- console.log(2);
780
- const l = M || await Sr();
781
- console.log(3);
782
- const _ = new ol.Map({
781
+ const s = Ne(A);
782
+ H(s);
783
+ const g = s || await wr(), l = new ol.Map({
783
784
  target: P.current,
784
- key: y || "",
785
- mapType: d,
785
+ key: p || "",
786
+ mapType: v,
786
787
  // poi: store.state.poiLayer,
787
788
  poi: O,
788
789
  // traffic: store.state.trafficLayer,
789
- traffic: v,
790
+ traffic: m,
790
791
  view: new ol.View({
791
792
  // @ts-ignore
792
- center: ol.proj.fromLonLat(l),
793
- zoom: E,
793
+ center: ol.proj.fromLonLat(g),
794
+ zoom: b,
794
795
  smoothExtentConstraint: !0
795
796
  // projection: 'EPSG:4326' //Default was EPSG:3857
796
797
  }),
797
798
  controls: [],
798
- ...s
799
+ ...u
799
800
  });
800
- console.log(4), _.setMapType(d), C.setMap(_), (p = C.map) == null || p.setMapType(d), C.setMapType(d), H(!0), console.log(5), x && x(ol, _), console.log(6);
801
- }, U = async () => {
802
- await B();
801
+ l.setMapType(v), C.setMap(l), (h = C.map) == null || h.setMapType(v), C.setMapType(v), K(!0), x && x(ol, l);
802
+ }, B = () => {
803
+ let s, g, l;
804
+ return s = new Promise((h, D) => {
805
+ l = D, g = h, V().then(() => {
806
+ X(), Z(), g();
807
+ }).catch(() => {
808
+ l();
809
+ });
810
+ }), { promise: s, cancelPromise: () => l() };
803
811
  };
804
812
  return gr(() => {
805
- if (P.current && C.setMapContainer(P.current), M)
806
- typeof ol < "u" ? U() : ee(Or.map).addEventListener("load", () => {
807
- U();
808
- }), Z(), Q();
809
- else {
810
- const l = Ne(A);
811
- X((_) => l);
813
+ if (P.current && C.setMapContainer(P.current), typeof ol < "u") {
814
+ const s = B();
815
+ return () => s.cancelPromise();
816
+ } else {
817
+ const s = Q(Or.map), g = () => {
818
+ B();
819
+ };
820
+ return s.addEventListener("load", g), () => s.removeEventListener("load", g);
812
821
  }
813
- }, [M]), /* @__PURE__ */ fe(jr, { children: /* @__PURE__ */ fe(
822
+ }, []), /* @__PURE__ */ le(jr, { children: /* @__PURE__ */ le(
814
823
  "div",
815
824
  {
816
825
  ref: P,
817
- className: g || Pr.map,
826
+ className: _ || Sr.map,
818
827
  style: T
819
828
  }
820
829
  ) });