@neshan-maps-platform/react-openlayers 2.0.10 → 2.0.11
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.
- package/README.md +214 -173
- package/dist/React-Openlayers.js +212 -211
- package/dist/React-Openlayers.umd.cjs +9 -9
- package/dist/style.css +1 -1
- package/dist/types/App.d.ts +3 -3
- package/dist/types/App.model.d.ts +3 -3
- package/dist/types/assets/ol.model.d.ts +131 -0
- package/dist/types/components/Map.d.ts +5 -5
- package/dist/types/components/Map.model.d.ts +55 -89
- package/dist/types/components/index.d.ts +3 -2
- package/dist/types/main.d.ts +1 -1
- package/dist/types/parameters/index.d.ts +47 -47
- package/dist/types/store/ContextProvider.d.ts +3 -3
- package/dist/types/store/ContextProvider.model.d.ts +11 -11
- package/dist/types/store/context.d.ts +11 -11
- package/dist/types/utils/features.util.d.ts +2 -2
- package/dist/types/utils/index.d.ts +7 -7
- package/dist/types/utils/location.util.d.ts +30 -30
- package/package.json +48 -51
package/dist/React-Openlayers.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import Ne, { createContext as pr, useReducer as vr, forwardRef as Le, useContext as mr, useRef as yr, useState as ce, useImperativeHandle as hr, useEffect as gr } from "react";
|
|
2
|
+
var le = {}, _r = {
|
|
3
3
|
get exports() {
|
|
4
|
-
return
|
|
4
|
+
return le;
|
|
5
5
|
},
|
|
6
|
-
set exports(
|
|
7
|
-
|
|
6
|
+
set exports(s) {
|
|
7
|
+
le = s;
|
|
8
8
|
}
|
|
9
|
-
},
|
|
9
|
+
}, L = {};
|
|
10
10
|
/**
|
|
11
11
|
* @license React
|
|
12
12
|
* react-jsx-runtime.production.min.js
|
|
@@ -19,22 +19,22 @@ var ce = {}, _r = {
|
|
|
19
19
|
var Fe;
|
|
20
20
|
function Er() {
|
|
21
21
|
if (Fe)
|
|
22
|
-
return
|
|
22
|
+
return L;
|
|
23
23
|
Fe = 1;
|
|
24
|
-
var
|
|
25
|
-
function A(
|
|
24
|
+
var s = Ne, f = Symbol.for("react.element"), P = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, v = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, F = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
25
|
+
function A(x, m, O) {
|
|
26
26
|
var _, T = {}, j = null, C = null;
|
|
27
|
-
|
|
27
|
+
O !== void 0 && (j = "" + O), m.key !== void 0 && (j = "" + m.key), m.ref !== void 0 && (C = m.ref);
|
|
28
28
|
for (_ in m)
|
|
29
29
|
b.call(m, _) && !F.hasOwnProperty(_) && (T[_] = m[_]);
|
|
30
|
-
if (
|
|
31
|
-
for (_ in m =
|
|
30
|
+
if (x && x.defaultProps)
|
|
31
|
+
for (_ in m = x.defaultProps, m)
|
|
32
32
|
T[_] === void 0 && (T[_] = m[_]);
|
|
33
|
-
return { $$typeof:
|
|
33
|
+
return { $$typeof: f, type: x, key: j, ref: C, props: T, _owner: v.current };
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return L.Fragment = P, L.jsx = A, L.jsxs = A, L;
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var W = {};
|
|
38
38
|
/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-jsx-runtime.development.js
|
|
@@ -44,17 +44,17 @@ var Y = {};
|
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
var
|
|
47
|
+
var Me;
|
|
48
48
|
function br() {
|
|
49
|
-
return
|
|
50
|
-
var
|
|
51
|
-
function
|
|
49
|
+
return Me || (Me = 1, process.env.NODE_ENV !== "production" && function() {
|
|
50
|
+
var s = Ne, f = Symbol.for("react.element"), P = 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"), x = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), S = Symbol.iterator, Y = "@@iterator";
|
|
51
|
+
function H(e) {
|
|
52
52
|
if (e === null || typeof e != "object")
|
|
53
53
|
return null;
|
|
54
|
-
var r =
|
|
54
|
+
var r = S && e[S] || e[Y];
|
|
55
55
|
return typeof r == "function" ? r : null;
|
|
56
56
|
}
|
|
57
|
-
var w =
|
|
57
|
+
var w = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
58
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++)
|
|
@@ -72,16 +72,16 @@ function br() {
|
|
|
72
72
|
c.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, c);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
var
|
|
75
|
+
var X = !1, $ = !1, Z = !1, Q = !1, ee = !1, V;
|
|
76
76
|
V = Symbol.for("react.module.reference");
|
|
77
77
|
function B(e) {
|
|
78
|
-
return !!(typeof e == "string" || typeof e == "function" || e === b || e === F ||
|
|
78
|
+
return !!(typeof e == "string" || typeof e == "function" || e === b || e === F || ee || e === v || e === O || e === _ || Q || e === C || X || $ || Z || typeof e == "object" && e !== null && (e.$$typeof === j || e.$$typeof === T || e.$$typeof === A || e.$$typeof === x || 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
82
|
e.$$typeof === V || e.getModuleId !== void 0));
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function u(e, r, t) {
|
|
85
85
|
var n = e.displayName;
|
|
86
86
|
if (n)
|
|
87
87
|
return n;
|
|
@@ -101,27 +101,27 @@ function br() {
|
|
|
101
101
|
switch (e) {
|
|
102
102
|
case b:
|
|
103
103
|
return "Fragment";
|
|
104
|
-
case
|
|
104
|
+
case P:
|
|
105
105
|
return "Portal";
|
|
106
106
|
case F:
|
|
107
107
|
return "Profiler";
|
|
108
108
|
case v:
|
|
109
109
|
return "StrictMode";
|
|
110
|
-
case
|
|
110
|
+
case O:
|
|
111
111
|
return "Suspense";
|
|
112
112
|
case _:
|
|
113
113
|
return "SuspenseList";
|
|
114
114
|
}
|
|
115
115
|
if (typeof e == "object")
|
|
116
116
|
switch (e.$$typeof) {
|
|
117
|
-
case
|
|
117
|
+
case x:
|
|
118
118
|
var r = e;
|
|
119
119
|
return g(r) + ".Consumer";
|
|
120
120
|
case A:
|
|
121
121
|
var t = e;
|
|
122
122
|
return g(t._context) + ".Provider";
|
|
123
123
|
case m:
|
|
124
|
-
return
|
|
124
|
+
return u(e, e.render, "ForwardRef");
|
|
125
125
|
case T:
|
|
126
126
|
var n = e.displayName || null;
|
|
127
127
|
return n !== null ? n : l(e.type) || "Memo";
|
|
@@ -140,7 +140,7 @@ function br() {
|
|
|
140
140
|
function _e() {
|
|
141
141
|
}
|
|
142
142
|
_e.__reactDisabledLog = !0;
|
|
143
|
-
function
|
|
143
|
+
function Ve() {
|
|
144
144
|
{
|
|
145
145
|
if (D === 0) {
|
|
146
146
|
de = console.log, pe = console.info, ve = console.warn, me = console.error, ye = console.group, he = console.groupCollapsed, ge = console.groupEnd;
|
|
@@ -163,7 +163,7 @@ function br() {
|
|
|
163
163
|
D++;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Be() {
|
|
167
167
|
{
|
|
168
168
|
if (D--, D === 0) {
|
|
169
169
|
var e = {
|
|
@@ -198,27 +198,27 @@ function br() {
|
|
|
198
198
|
D < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
var
|
|
201
|
+
var re = w.ReactCurrentDispatcher, te;
|
|
202
202
|
function U(e, r, t) {
|
|
203
203
|
{
|
|
204
|
-
if (
|
|
204
|
+
if (te === void 0)
|
|
205
205
|
try {
|
|
206
206
|
throw Error();
|
|
207
207
|
} catch (i) {
|
|
208
208
|
var n = i.stack.trim().match(/\n( *(at )?)/);
|
|
209
|
-
|
|
209
|
+
te = n && n[1] || "";
|
|
210
210
|
}
|
|
211
211
|
return `
|
|
212
|
-
` +
|
|
212
|
+
` + te + e;
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
-
var
|
|
215
|
+
var ne = !1, q;
|
|
216
216
|
{
|
|
217
|
-
var
|
|
218
|
-
q = new
|
|
217
|
+
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
218
|
+
q = new Ue();
|
|
219
219
|
}
|
|
220
220
|
function Ee(e, r) {
|
|
221
|
-
if (!e ||
|
|
221
|
+
if (!e || ne)
|
|
222
222
|
return "";
|
|
223
223
|
{
|
|
224
224
|
var t = q.get(e);
|
|
@@ -226,11 +226,11 @@ function br() {
|
|
|
226
226
|
return t;
|
|
227
227
|
}
|
|
228
228
|
var n;
|
|
229
|
-
|
|
229
|
+
ne = !0;
|
|
230
230
|
var i = Error.prepareStackTrace;
|
|
231
231
|
Error.prepareStackTrace = void 0;
|
|
232
232
|
var c;
|
|
233
|
-
c =
|
|
233
|
+
c = re.current, re.current = null, Ve();
|
|
234
234
|
try {
|
|
235
235
|
if (r) {
|
|
236
236
|
var o = function() {
|
|
@@ -267,31 +267,31 @@ function br() {
|
|
|
267
267
|
if (k && n && typeof k.stack == "string") {
|
|
268
268
|
for (var a = k.stack.split(`
|
|
269
269
|
`), E = n.stack.split(`
|
|
270
|
-
`),
|
|
271
|
-
|
|
272
|
-
for (;
|
|
273
|
-
if (a[
|
|
274
|
-
if (
|
|
270
|
+
`), d = a.length - 1, p = E.length - 1; d >= 1 && p >= 0 && a[d] !== E[p]; )
|
|
271
|
+
p--;
|
|
272
|
+
for (; d >= 1 && p >= 0; d--, p--)
|
|
273
|
+
if (a[d] !== E[p]) {
|
|
274
|
+
if (d !== 1 || p !== 1)
|
|
275
275
|
do
|
|
276
|
-
if (
|
|
276
|
+
if (d--, p--, p < 0 || a[d] !== E[p]) {
|
|
277
277
|
var R = `
|
|
278
|
-
` + a[
|
|
278
|
+
` + a[d].replace(" at new ", " at ");
|
|
279
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 (
|
|
281
|
+
while (d >= 1 && p >= 0);
|
|
282
282
|
break;
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
} finally {
|
|
286
|
-
|
|
286
|
+
ne = !1, re.current = c, Be(), Error.prepareStackTrace = i;
|
|
287
287
|
}
|
|
288
|
-
var
|
|
288
|
+
var I = e ? e.displayName || e.name : "", De = I ? U(I) : "";
|
|
289
289
|
return typeof e == "function" && q.set(e, De), De;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function qe(e, r, t) {
|
|
292
292
|
return Ee(e, !1);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function ze(e) {
|
|
295
295
|
var r = e.prototype;
|
|
296
296
|
return !!(r && r.isReactComponent);
|
|
297
297
|
}
|
|
@@ -299,11 +299,11 @@ function br() {
|
|
|
299
299
|
if (e == null)
|
|
300
300
|
return "";
|
|
301
301
|
if (typeof e == "function")
|
|
302
|
-
return Ee(e,
|
|
302
|
+
return Ee(e, ze(e));
|
|
303
303
|
if (typeof e == "string")
|
|
304
304
|
return U(e);
|
|
305
305
|
switch (e) {
|
|
306
|
-
case
|
|
306
|
+
case O:
|
|
307
307
|
return U("Suspense");
|
|
308
308
|
case _:
|
|
309
309
|
return U("SuspenseList");
|
|
@@ -311,7 +311,7 @@ function br() {
|
|
|
311
311
|
if (typeof e == "object")
|
|
312
312
|
switch (e.$$typeof) {
|
|
313
313
|
case m:
|
|
314
|
-
return
|
|
314
|
+
return qe(e.render);
|
|
315
315
|
case T:
|
|
316
316
|
return z(e.type, r, t);
|
|
317
317
|
case j: {
|
|
@@ -332,7 +332,7 @@ function br() {
|
|
|
332
332
|
} else
|
|
333
333
|
Re.setExtraStackFrame(null);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Je(e, r, t, n, i) {
|
|
336
336
|
{
|
|
337
337
|
var c = Function.call.bind(J);
|
|
338
338
|
for (var o in e)
|
|
@@ -344,24 +344,24 @@ function br() {
|
|
|
344
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 (
|
|
348
|
-
a =
|
|
347
|
+
} catch (d) {
|
|
348
|
+
a = d;
|
|
349
349
|
}
|
|
350
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
|
|
355
|
-
function
|
|
356
|
-
return
|
|
354
|
+
var Ge = Array.isArray;
|
|
355
|
+
function ae(e) {
|
|
356
|
+
return Ge(e);
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function Ke(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
|
|
364
|
+
function He(e) {
|
|
365
365
|
try {
|
|
366
366
|
return Te(e), !1;
|
|
367
367
|
} catch {
|
|
@@ -372,17 +372,17 @@ function br() {
|
|
|
372
372
|
return "" + e;
|
|
373
373
|
}
|
|
374
374
|
function Ce(e) {
|
|
375
|
-
if (
|
|
376
|
-
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
375
|
+
if (He(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.", Ke(e)), Te(e);
|
|
377
377
|
}
|
|
378
|
-
var
|
|
378
|
+
var N = w.ReactCurrentOwner, Xe = {
|
|
379
379
|
key: !0,
|
|
380
380
|
ref: !0,
|
|
381
381
|
__self: !0,
|
|
382
382
|
__source: !0
|
|
383
|
-
}, Pe, Se,
|
|
384
|
-
|
|
385
|
-
function
|
|
383
|
+
}, Pe, Se, oe;
|
|
384
|
+
oe = {};
|
|
385
|
+
function Ze(e) {
|
|
386
386
|
if (J.call(e, "ref")) {
|
|
387
387
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
388
388
|
if (r && r.isReactWarning)
|
|
@@ -390,7 +390,7 @@ function br() {
|
|
|
390
390
|
}
|
|
391
391
|
return e.ref !== void 0;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Qe(e) {
|
|
394
394
|
if (J.call(e, "key")) {
|
|
395
395
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
396
396
|
if (r && r.isReactWarning)
|
|
@@ -398,13 +398,13 @@ function br() {
|
|
|
398
398
|
}
|
|
399
399
|
return e.key !== void 0;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
if (typeof e.ref == "string" &&
|
|
403
|
-
var t = l(
|
|
404
|
-
|
|
401
|
+
function er(e, r) {
|
|
402
|
+
if (typeof e.ref == "string" && N.current && r && N.current.stateNode !== r) {
|
|
403
|
+
var t = l(N.current.type);
|
|
404
|
+
oe[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(N.current.type), e.ref), oe[t] = !0);
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function rr(e, r) {
|
|
408
408
|
{
|
|
409
409
|
var t = function() {
|
|
410
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));
|
|
@@ -415,7 +415,7 @@ function br() {
|
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function tr(e, r) {
|
|
419
419
|
{
|
|
420
420
|
var t = function() {
|
|
421
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));
|
|
@@ -426,10 +426,10 @@ function br() {
|
|
|
426
426
|
});
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
var
|
|
429
|
+
var nr = 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:
|
|
432
|
+
$$typeof: f,
|
|
433
433
|
// Built-in properties that belong on the element
|
|
434
434
|
type: e,
|
|
435
435
|
key: r,
|
|
@@ -455,41 +455,41 @@ function br() {
|
|
|
455
455
|
value: i
|
|
456
456
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
457
457
|
};
|
|
458
|
-
function
|
|
458
|
+
function ar(e, r, t, n, i) {
|
|
459
459
|
{
|
|
460
460
|
var c, o = {}, a = null, E = null;
|
|
461
|
-
t !== void 0 && (Ce(t), a = "" + t),
|
|
461
|
+
t !== void 0 && (Ce(t), a = "" + t), Qe(r) && (Ce(r.key), a = "" + r.key), Ze(r) && (E = r.ref, er(r, i));
|
|
462
462
|
for (c in r)
|
|
463
|
-
J.call(r, c) && !
|
|
463
|
+
J.call(r, c) && !Xe.hasOwnProperty(c) && (o[c] = r[c]);
|
|
464
464
|
if (e && e.defaultProps) {
|
|
465
|
-
var
|
|
466
|
-
for (c in
|
|
467
|
-
o[c] === void 0 && (o[c] =
|
|
465
|
+
var d = e.defaultProps;
|
|
466
|
+
for (c in d)
|
|
467
|
+
o[c] === void 0 && (o[c] = d[c]);
|
|
468
468
|
}
|
|
469
469
|
if (a || E) {
|
|
470
|
-
var
|
|
471
|
-
a &&
|
|
470
|
+
var p = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
471
|
+
a && rr(o, p), E && tr(o, p);
|
|
472
472
|
}
|
|
473
|
-
return
|
|
473
|
+
return nr(e, a, E, i, n, N.current, o);
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
var
|
|
477
|
-
function
|
|
476
|
+
var ie = w.ReactCurrentOwner, we = w.ReactDebugCurrentFrame;
|
|
477
|
+
function M(e) {
|
|
478
478
|
if (e) {
|
|
479
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
|
|
485
|
-
|
|
486
|
-
function
|
|
487
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
484
|
+
var se;
|
|
485
|
+
se = !1;
|
|
486
|
+
function ue(e) {
|
|
487
|
+
return typeof e == "object" && e !== null && e.$$typeof === f;
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function xe() {
|
|
490
490
|
{
|
|
491
|
-
if (
|
|
492
|
-
var e = l(
|
|
491
|
+
if (ie.current) {
|
|
492
|
+
var e = l(ie.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
|
|
501
|
+
function or(e) {
|
|
502
502
|
{
|
|
503
503
|
if (e !== void 0) {
|
|
504
504
|
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
|
|
@@ -509,10 +509,10 @@ Check your code at ` + r + ":" + t + ".";
|
|
|
509
509
|
return "";
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
var
|
|
513
|
-
function
|
|
512
|
+
var Oe = {};
|
|
513
|
+
function ir(e) {
|
|
514
514
|
{
|
|
515
|
-
var r =
|
|
515
|
+
var r = xe();
|
|
516
516
|
if (!r) {
|
|
517
517
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
518
518
|
t && (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 =
|
|
531
|
-
if (
|
|
530
|
+
var t = ir(r);
|
|
531
|
+
if (Oe[t])
|
|
532
532
|
return;
|
|
533
|
-
|
|
533
|
+
Oe[t] = !0;
|
|
534
534
|
var n = "";
|
|
535
|
-
e && e._owner && e._owner !==
|
|
535
|
+
e && e._owner && e._owner !== ie.current && (n = " It was passed a child from " + l(e._owner.type) + "."), M(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), M(null);
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
538
|
function ke(e, r) {
|
|
539
539
|
{
|
|
540
540
|
if (typeof e != "object")
|
|
541
541
|
return;
|
|
542
|
-
if (
|
|
542
|
+
if (ae(e))
|
|
543
543
|
for (var t = 0; t < e.length; t++) {
|
|
544
544
|
var n = e[t];
|
|
545
|
-
|
|
545
|
+
ue(n) && je(n, r);
|
|
546
546
|
}
|
|
547
|
-
else if (
|
|
547
|
+
else if (ue(e))
|
|
548
548
|
e._store && (e._store.validated = !0);
|
|
549
549
|
else if (e) {
|
|
550
|
-
var i =
|
|
550
|
+
var i = H(e);
|
|
551
551
|
if (typeof i == "function" && i !== e.entries)
|
|
552
552
|
for (var c = i.call(e), o; !(o = c.next()).done; )
|
|
553
|
-
|
|
553
|
+
ue(o.value) && je(o.value, r);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function sr(e) {
|
|
558
558
|
{
|
|
559
559
|
var r = e.type;
|
|
560
560
|
if (r == null || typeof r == "string")
|
|
@@ -570,25 +570,25 @@ Check the top-level render call using <` + t + ">.");
|
|
|
570
570
|
return;
|
|
571
571
|
if (t) {
|
|
572
572
|
var n = l(r);
|
|
573
|
-
|
|
574
|
-
} else if (r.PropTypes !== void 0 && !
|
|
575
|
-
|
|
573
|
+
Je(t, e.props, "prop", n, e);
|
|
574
|
+
} else if (r.PropTypes !== void 0 && !se) {
|
|
575
|
+
se = !0;
|
|
576
576
|
var i = l(r);
|
|
577
577
|
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
|
|
578
578
|
}
|
|
579
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
|
|
582
|
+
function ur(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
|
-
|
|
587
|
+
M(e), y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), M(null);
|
|
588
588
|
break;
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
|
-
e.ref !== null && (
|
|
591
|
+
e.ref !== null && (M(e), y("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
function Ae(e, r, t, n, i, c) {
|
|
@@ -597,149 +597,149 @@ Check the top-level render call using <` + t + ">.");
|
|
|
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 E =
|
|
601
|
-
E ? a += E : a +=
|
|
602
|
-
var
|
|
603
|
-
e === null ?
|
|
600
|
+
var E = or(i);
|
|
601
|
+
E ? a += E : a += xe();
|
|
602
|
+
var d;
|
|
603
|
+
e === null ? d = "null" : ae(e) ? d = "array" : e !== void 0 && e.$$typeof === f ? (d = "<" + (l(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = 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", d, a);
|
|
604
604
|
}
|
|
605
|
-
var
|
|
606
|
-
if (
|
|
607
|
-
return
|
|
605
|
+
var p = ar(e, r, t, i, c);
|
|
606
|
+
if (p == null)
|
|
607
|
+
return p;
|
|
608
608
|
if (o) {
|
|
609
609
|
var R = r.children;
|
|
610
610
|
if (R !== void 0)
|
|
611
611
|
if (n)
|
|
612
|
-
if (
|
|
613
|
-
for (var
|
|
614
|
-
ke(R[
|
|
612
|
+
if (ae(R)) {
|
|
613
|
+
for (var I = 0; I < R.length; I++)
|
|
614
|
+
ke(R[I], e);
|
|
615
615
|
Object.freeze && Object.freeze(R);
|
|
616
616
|
} else
|
|
617
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 === b ?
|
|
621
|
+
return e === b ? ur(p) : sr(p), p;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function cr(e, r, t) {
|
|
625
625
|
return Ae(e, r, t, !0);
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function lr(e, r, t) {
|
|
628
628
|
return Ae(e, r, t, !1);
|
|
629
629
|
}
|
|
630
|
-
var
|
|
631
|
-
|
|
632
|
-
}()),
|
|
630
|
+
var fr = lr, dr = cr;
|
|
631
|
+
W.Fragment = b, W.jsx = fr, W.jsxs = dr;
|
|
632
|
+
}()), W;
|
|
633
633
|
}
|
|
634
|
-
(function(
|
|
635
|
-
process.env.NODE_ENV === "production" ?
|
|
634
|
+
(function(s) {
|
|
635
|
+
process.env.NODE_ENV === "production" ? s.exports = Er() : s.exports = br();
|
|
636
636
|
})(_r);
|
|
637
|
-
const
|
|
638
|
-
const Rr = "
|
|
637
|
+
const K = le.jsx;
|
|
638
|
+
const Rr = "_map_1yxt5_2", Tr = "_touch_1yxt5_26", Cr = "_floaten_1yxt5_45", Pr = "_float_1yxt5_45", Sr = {
|
|
639
639
|
map: Rr,
|
|
640
|
-
"map-popup-container": "_map-popup-
|
|
640
|
+
"map-popup-container": "_map-popup-container_1yxt5_7",
|
|
641
641
|
touch: Tr,
|
|
642
|
-
"mobile-layers-button": "_mobile-layers-
|
|
642
|
+
"mobile-layers-button": "_mobile-layers-button_1yxt5_30",
|
|
643
643
|
floaten: Cr,
|
|
644
644
|
float: Pr
|
|
645
|
-
},
|
|
645
|
+
}, We = (s) => s ? s instanceof Object ? [s.longitude, s.latitude] : s : void 0, wr = async () => {
|
|
646
646
|
try {
|
|
647
|
-
const
|
|
648
|
-
(
|
|
647
|
+
const f = await new Promise(
|
|
648
|
+
(P, b) => {
|
|
649
649
|
navigator.geolocation.getCurrentPosition(
|
|
650
650
|
(v) => {
|
|
651
|
-
|
|
651
|
+
P(v);
|
|
652
652
|
},
|
|
653
653
|
(v) => b(v)
|
|
654
654
|
);
|
|
655
655
|
}
|
|
656
656
|
);
|
|
657
|
-
return
|
|
658
|
-
} catch (
|
|
659
|
-
console.error(
|
|
660
|
-
const
|
|
661
|
-
return [
|
|
657
|
+
return f && We(f.coords) || Object.values(Ie());
|
|
658
|
+
} catch (s) {
|
|
659
|
+
console.error(s);
|
|
660
|
+
const f = Ie();
|
|
661
|
+
return [f.longitude, f.latitude];
|
|
662
662
|
}
|
|
663
|
-
},
|
|
663
|
+
}, Ie = () => ({
|
|
664
664
|
longitude: 51.36281969540723,
|
|
665
665
|
latitude: 35.69672648316882
|
|
666
|
-
}),
|
|
666
|
+
}), xr = {
|
|
667
667
|
reverse: "https://api.neshan.org/v4/reverse",
|
|
668
668
|
search: "https://api.neshan.org/v1/search",
|
|
669
|
-
map: "https://static.neshan.org/sdk/openlayers/
|
|
670
|
-
}, Ye =
|
|
669
|
+
map: "https://static.neshan.org/sdk/openlayers/5.3.0/ol.js"
|
|
670
|
+
}, Ye = pr({
|
|
671
671
|
map: null,
|
|
672
672
|
mapType: "neshan",
|
|
673
673
|
mapContainer: null,
|
|
674
|
-
setMap: (
|
|
674
|
+
setMap: (s) => {
|
|
675
675
|
},
|
|
676
|
-
setMapType: (
|
|
676
|
+
setMapType: (s) => {
|
|
677
677
|
},
|
|
678
|
-
setMapContainer: (
|
|
678
|
+
setMapContainer: (s) => {
|
|
679
679
|
}
|
|
680
680
|
}), $e = {
|
|
681
681
|
map: null,
|
|
682
682
|
mapType: "neshan",
|
|
683
683
|
mapContainer: null
|
|
684
|
-
},
|
|
685
|
-
switch (
|
|
684
|
+
}, Or = (s, f) => {
|
|
685
|
+
switch (f.type) {
|
|
686
686
|
case "SET_MAP":
|
|
687
687
|
return {
|
|
688
|
-
...
|
|
689
|
-
map:
|
|
688
|
+
...s,
|
|
689
|
+
map: f.payload
|
|
690
690
|
};
|
|
691
691
|
case "SET_MAP_TYPE":
|
|
692
692
|
return {
|
|
693
|
-
...
|
|
694
|
-
title:
|
|
693
|
+
...s,
|
|
694
|
+
title: f.payload
|
|
695
695
|
};
|
|
696
696
|
default:
|
|
697
697
|
return $e;
|
|
698
698
|
}
|
|
699
|
-
}, jr = (
|
|
700
|
-
const [
|
|
701
|
-
...
|
|
699
|
+
}, jr = (s) => {
|
|
700
|
+
const [f, P] = vr(Or, $e), b = {
|
|
701
|
+
...f,
|
|
702
702
|
setMap: (v) => {
|
|
703
|
-
|
|
703
|
+
P({
|
|
704
704
|
type: "SET_MAP",
|
|
705
705
|
payload: v
|
|
706
706
|
});
|
|
707
707
|
},
|
|
708
708
|
setMapType: (v) => {
|
|
709
|
-
|
|
709
|
+
P({
|
|
710
710
|
type: "SET_MAP_TYPE",
|
|
711
711
|
payload: v
|
|
712
712
|
});
|
|
713
713
|
},
|
|
714
714
|
setMapContainer: (v) => {
|
|
715
|
-
|
|
715
|
+
P({
|
|
716
716
|
type: "SET_MAP_CONTAINER",
|
|
717
717
|
payload: v
|
|
718
718
|
});
|
|
719
719
|
}
|
|
720
720
|
};
|
|
721
|
-
return /* @__PURE__ */
|
|
722
|
-
},
|
|
721
|
+
return /* @__PURE__ */ K(Ye.Provider, { value: b, children: s.children });
|
|
722
|
+
}, kr = Le(
|
|
723
723
|
({
|
|
724
|
-
options:
|
|
725
|
-
mapKey:
|
|
726
|
-
serviceKey:
|
|
724
|
+
options: s,
|
|
725
|
+
mapKey: f,
|
|
726
|
+
serviceKey: P = "",
|
|
727
727
|
zoom: b = 12,
|
|
728
728
|
defaultType: v = "neshan",
|
|
729
729
|
scale: F,
|
|
730
730
|
center: A,
|
|
731
|
-
poi:
|
|
731
|
+
poi: x = !0,
|
|
732
732
|
traffic: m = !0,
|
|
733
|
-
onInit:
|
|
733
|
+
onInit: O,
|
|
734
734
|
className: _,
|
|
735
735
|
style: T
|
|
736
736
|
}, j) => {
|
|
737
|
-
const C = mr(Ye),
|
|
737
|
+
const C = mr(Ye), S = yr(null), [Y, H] = ce(!1), [w, y] = ce(null), [fe, X] = ce();
|
|
738
738
|
hr(
|
|
739
739
|
j,
|
|
740
740
|
() => ({
|
|
741
741
|
get mapContainer() {
|
|
742
|
-
return
|
|
742
|
+
return S;
|
|
743
743
|
},
|
|
744
744
|
get ol() {
|
|
745
745
|
return typeof ol < "u" ? ol : void 0;
|
|
@@ -748,87 +748,88 @@ const Rr = "_map_an20y_2", Tr = "_touch_an20y_26", Cr = "_floaten_an20y_45", Pr
|
|
|
748
748
|
return C.map;
|
|
749
749
|
},
|
|
750
750
|
get isInitiated() {
|
|
751
|
-
return
|
|
751
|
+
return Y;
|
|
752
752
|
}
|
|
753
753
|
}),
|
|
754
|
-
[
|
|
754
|
+
[Y, C.map]
|
|
755
755
|
);
|
|
756
|
-
const
|
|
756
|
+
const $ = () => {
|
|
757
757
|
var g, l;
|
|
758
758
|
if (w)
|
|
759
759
|
return w;
|
|
760
|
-
const
|
|
761
|
-
if (
|
|
760
|
+
const u = (l = (g = S.current) == null ? void 0 : g.querySelector(".ol-viewport")) == null ? void 0 : l.querySelectorAll("div:last-child");
|
|
761
|
+
if (u)
|
|
762
762
|
return y(
|
|
763
|
-
Array.from(
|
|
763
|
+
Array.from(u)[u.length - 1]
|
|
764
764
|
), w;
|
|
765
|
-
}, X = () => {
|
|
766
|
-
const s = W();
|
|
767
|
-
s == null || s.style.setProperty("scale", "" + F);
|
|
768
765
|
}, Z = () => {
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
}, Q = (
|
|
766
|
+
const u = $();
|
|
767
|
+
u == null || u.style.setProperty("scale", "" + F);
|
|
768
|
+
}, Q = () => {
|
|
769
|
+
const u = $();
|
|
770
|
+
u == null || u.style.setProperty("bottom", "0.2em"), u == null || u.style.setProperty("left", "0.4em");
|
|
771
|
+
}, ee = (u, g = "my-openlayer") => {
|
|
772
772
|
const l = document.getElementById(g);
|
|
773
773
|
if (l)
|
|
774
774
|
return l;
|
|
775
775
|
const h = document.createElement("script");
|
|
776
|
-
return h.src =
|
|
776
|
+
return h.src = u, h.id = g, document.getElementsByTagName("head")[0].appendChild(h), h;
|
|
777
777
|
}, V = async () => {
|
|
778
778
|
var h;
|
|
779
|
-
if (!
|
|
779
|
+
if (!S.current)
|
|
780
780
|
return;
|
|
781
|
-
const
|
|
782
|
-
|
|
783
|
-
const g =
|
|
784
|
-
target:
|
|
785
|
-
key:
|
|
781
|
+
const u = We(A);
|
|
782
|
+
X(u);
|
|
783
|
+
const g = u || await wr(), l = new ol.Map({
|
|
784
|
+
target: S.current,
|
|
785
|
+
key: f || "",
|
|
786
786
|
mapType: v,
|
|
787
787
|
// poi: store.state.poiLayer,
|
|
788
|
-
poi:
|
|
788
|
+
poi: x,
|
|
789
789
|
// traffic: store.state.trafficLayer,
|
|
790
790
|
traffic: m,
|
|
791
791
|
view: new ol.View({
|
|
792
|
-
// @ts-ignore
|
|
793
792
|
center: ol.proj.fromLonLat(g),
|
|
794
793
|
zoom: b,
|
|
795
794
|
smoothExtentConstraint: !0
|
|
796
795
|
// projection: 'EPSG:4326' //Default was EPSG:3857
|
|
797
796
|
}),
|
|
798
797
|
controls: [],
|
|
799
|
-
...
|
|
798
|
+
...s
|
|
800
799
|
});
|
|
801
|
-
l.setMapType(v), C.setMap(l), (h = C.map) == null || h.setMapType(v), C.setMapType(v),
|
|
800
|
+
l.setMapType(v), C.setMap(l), (h = C.map) == null || h.setMapType(v), C.setMapType(v), H(!0), O && O(ol, l);
|
|
802
801
|
}, B = () => {
|
|
803
|
-
let
|
|
804
|
-
return
|
|
802
|
+
let u, g, l;
|
|
803
|
+
return u = new Promise((h, D) => {
|
|
805
804
|
l = D, g = h, V().then(() => {
|
|
806
|
-
|
|
805
|
+
Z(), Q(), g();
|
|
807
806
|
}).catch(() => {
|
|
808
807
|
l();
|
|
809
808
|
});
|
|
810
|
-
}), { promise:
|
|
809
|
+
}), { promise: u, cancelPromise: () => l() };
|
|
811
810
|
};
|
|
812
811
|
return gr(() => {
|
|
813
|
-
if (
|
|
814
|
-
const
|
|
815
|
-
return () =>
|
|
812
|
+
if (S.current && C.setMapContainer(S.current), typeof ol < "u") {
|
|
813
|
+
const u = B();
|
|
814
|
+
return () => u.cancelPromise();
|
|
816
815
|
} else {
|
|
817
|
-
const
|
|
816
|
+
const u = ee(xr.map), g = () => {
|
|
818
817
|
B();
|
|
819
818
|
};
|
|
820
|
-
return
|
|
819
|
+
return u.addEventListener("load", g), () => u.removeEventListener("load", g);
|
|
821
820
|
}
|
|
822
|
-
}, []), /* @__PURE__ */
|
|
821
|
+
}, []), /* @__PURE__ */ K(
|
|
823
822
|
"div",
|
|
824
823
|
{
|
|
825
|
-
ref:
|
|
824
|
+
ref: S,
|
|
826
825
|
className: _ || Sr.map,
|
|
827
826
|
style: T
|
|
828
827
|
}
|
|
829
|
-
)
|
|
828
|
+
);
|
|
830
829
|
}
|
|
830
|
+
), Dr = Le(
|
|
831
|
+
(s, f) => /* @__PURE__ */ K(jr, { children: /* @__PURE__ */ K(kr, { ref: f, ...s }) })
|
|
831
832
|
);
|
|
832
833
|
export {
|
|
833
|
-
|
|
834
|
+
Dr as NeshanMap
|
|
834
835
|
};
|