@mapsindoors/map-template 1.95.7 → 1.95.9

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.
Files changed (59) hide show
  1. package/dist/{GoogleMapsMap-mNXwkS5r.mjs → GoogleMapsMap-CV6Wgkhg.mjs} +2 -2
  2. package/dist/{MapboxMap-JSpSXMbZ.mjs → MapboxMap-EuKWsGtq.mjs} +2 -2
  3. package/dist/favicon.png +0 -0
  4. package/dist/logo-192.png +0 -0
  5. package/dist/manifest.json +21 -0
  6. package/dist/mapsindoors-react.es.js +1 -1
  7. package/dist/mapsindoors-react.umd.js +236 -198
  8. package/dist/mapsindoors-webcomponent.es.js +51553 -42031
  9. package/dist/reactcomponent-DcNpL3XF.mjs +37841 -0
  10. package/dist/robots.txt +3 -0
  11. package/package.json +5 -6
  12. package/dist/_commonjsHelpers-B85MJLTf.js +0 -5
  13. package/dist/app-globals-DQuL1Twl.js +0 -3
  14. package/dist/combo-box-item.entry.js +0 -13
  15. package/dist/icon-DT_sDkmK.js +0 -11
  16. package/dist/index-BZQHyS7V.js +0 -1701
  17. package/dist/index.js +0 -1
  18. package/dist/loader.js +0 -11
  19. package/dist/mi-card_2.entry.js +0 -33
  20. package/dist/mi-chip.entry.js +0 -31
  21. package/dist/mi-column.entry.js +0 -52
  22. package/dist/mi-combo-box.entry.js +0 -449
  23. package/dist/mi-components.js +0 -21
  24. package/dist/mi-data-table.entry.js +0 -324
  25. package/dist/mi-distance_2.entry.js +0 -69
  26. package/dist/mi-dropdown-item.entry.js +0 -13
  27. package/dist/mi-dropdown.entry.js +0 -656
  28. package/dist/mi-floor-selector.entry.js +0 -209
  29. package/dist/mi-keyboard.entry.js +0 -261
  30. package/dist/mi-list-item-category.entry.js +0 -51
  31. package/dist/mi-list-item-location.entry.js +0 -177
  32. package/dist/mi-list.entry.js +0 -68
  33. package/dist/mi-location-booking.entry.js +0 -5218
  34. package/dist/mi-location-info.entry.js +0 -71
  35. package/dist/mi-map-googlemaps.entry.js +0 -795
  36. package/dist/mi-map-mapbox.entry.js +0 -530
  37. package/dist/mi-metric-card.entry.js +0 -61
  38. package/dist/mi-my-position.entry.js +0 -2457
  39. package/dist/mi-notification.entry.js +0 -137
  40. package/dist/mi-route-instructions-heading.entry.js +0 -78
  41. package/dist/mi-route-instructions-maneuver-legacy.entry.js +0 -86
  42. package/dist/mi-route-instructions-maneuver.entry.js +0 -86
  43. package/dist/mi-route-instructions-step-legacy.entry.js +0 -322
  44. package/dist/mi-route-instructions-step.entry.js +0 -342
  45. package/dist/mi-route-instructions.entry.js +0 -176
  46. package/dist/mi-scroll-buttons.entry.js +0 -120
  47. package/dist/mi-search.entry.js +0 -429
  48. package/dist/mi-share-sms.entry.js +0 -94
  49. package/dist/mi-step-switcher.entry.js +0 -40
  50. package/dist/mi-tab-panel.entry.js +0 -25
  51. package/dist/mi-tab.entry.js +0 -10
  52. package/dist/mi-tabs.entry.js +0 -49
  53. package/dist/mi-time.entry.js +0 -57
  54. package/dist/mi-variables-CDNvnTkH.js +0 -5
  55. package/dist/reactcomponent-BrPGG2Eb.mjs +0 -29048
  56. package/dist/route-travel-mode.enum-BvqP1fpw.js +0 -9
  57. package/dist/sort-order.enum-jsLAbYWg.js +0 -566
  58. package/dist/unit-system.enum-BwPgAWqL.js +0 -7
  59. package/dist/utils-DNHzysQ6.js +0 -61
@@ -1,795 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-BZQHyS7V.js';
2
- import { m as miVariables } from './mi-variables-CDNvnTkH.js';
3
-
4
- /******************************************************************************
5
- Copyright (c) Microsoft Corporation.
6
-
7
- Permission to use, copy, modify, and/or distribute this software for any
8
- purpose with or without fee is hereby granted.
9
-
10
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
- PERFORMANCE OF THIS SOFTWARE.
17
- ***************************************************************************** */
18
- /* global Reflect, Promise, SuppressedError, Symbol */
19
-
20
-
21
- function __awaiter(thisArg, _arguments, P, generator) {
22
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
- return new (P || (P = Promise))(function (resolve, reject) {
24
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
- step((generator = generator.apply(thisArg, [])).next());
28
- });
29
- }
30
-
31
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
32
- var e = new Error(message);
33
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
34
- };
35
-
36
- function getDefaultExportFromCjs (x) {
37
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
38
- }
39
-
40
- // do not edit .js files directly - edit src/index.jst
41
-
42
-
43
-
44
- var fastDeepEqual = function equal(a, b) {
45
- if (a === b) return true;
46
-
47
- if (a && b && typeof a == 'object' && typeof b == 'object') {
48
- if (a.constructor !== b.constructor) return false;
49
-
50
- var length, i, keys;
51
- if (Array.isArray(a)) {
52
- length = a.length;
53
- if (length != b.length) return false;
54
- for (i = length; i-- !== 0;)
55
- if (!equal(a[i], b[i])) return false;
56
- return true;
57
- }
58
-
59
-
60
-
61
- if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
62
- if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
63
- if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
64
-
65
- keys = Object.keys(a);
66
- length = keys.length;
67
- if (length !== Object.keys(b).length) return false;
68
-
69
- for (i = length; i-- !== 0;)
70
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
71
-
72
- for (i = length; i-- !== 0;) {
73
- var key = keys[i];
74
-
75
- if (!equal(a[key], b[key])) return false;
76
- }
77
-
78
- return true;
79
- }
80
-
81
- // true if both NaN, false otherwise
82
- return a!==a && b!==b;
83
- };
84
-
85
- var isEqual = /*@__PURE__*/getDefaultExportFromCjs(fastDeepEqual);
86
-
87
- /**
88
- * Copyright 2019 Google LLC. All Rights Reserved.
89
- *
90
- * Licensed under the Apache License, Version 2.0 (the "License");
91
- * you may not use this file except in compliance with the License.
92
- * You may obtain a copy of the License at.
93
- *
94
- * Http://www.apache.org/licenses/LICENSE-2.0.
95
- *
96
- * Unless required by applicable law or agreed to in writing, software
97
- * distributed under the License is distributed on an "AS IS" BASIS,
98
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
99
- * See the License for the specific language governing permissions and
100
- * limitations under the License.
101
- */
102
- const DEFAULT_ID = "__googleMapsScriptId";
103
- /**
104
- * The status of the [[Loader]].
105
- */
106
- var LoaderStatus;
107
- (function (LoaderStatus) {
108
- LoaderStatus[LoaderStatus["INITIALIZED"] = 0] = "INITIALIZED";
109
- LoaderStatus[LoaderStatus["LOADING"] = 1] = "LOADING";
110
- LoaderStatus[LoaderStatus["SUCCESS"] = 2] = "SUCCESS";
111
- LoaderStatus[LoaderStatus["FAILURE"] = 3] = "FAILURE";
112
- })(LoaderStatus || (LoaderStatus = {}));
113
- /**
114
- * [[Loader]] makes it easier to add Google Maps JavaScript API to your application
115
- * dynamically using
116
- * [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
117
- * It works by dynamically creating and appending a script node to the the
118
- * document head and wrapping the callback function so as to return a promise.
119
- *
120
- * ```
121
- * const loader = new Loader({
122
- * apiKey: "",
123
- * version: "weekly",
124
- * libraries: ["places"]
125
- * });
126
- *
127
- * loader.load().then((google) => {
128
- * const map = new google.maps.Map(...)
129
- * })
130
- * ```
131
- */
132
- class Loader {
133
- /**
134
- * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set
135
- * using this library, instead the defaults are set by the Google Maps
136
- * JavaScript API server.
137
- *
138
- * ```
139
- * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});
140
- * ```
141
- */
142
- constructor({ apiKey, authReferrerPolicy, channel, client, id = DEFAULT_ID, language, libraries = [], mapIds, nonce, region, retries = 3, url = "https://maps.googleapis.com/maps/api/js", version, }) {
143
- this.callbacks = [];
144
- this.done = false;
145
- this.loading = false;
146
- this.errors = [];
147
- this.apiKey = apiKey;
148
- this.authReferrerPolicy = authReferrerPolicy;
149
- this.channel = channel;
150
- this.client = client;
151
- this.id = id || DEFAULT_ID; // Do not allow empty string
152
- this.language = language;
153
- this.libraries = libraries;
154
- this.mapIds = mapIds;
155
- this.nonce = nonce;
156
- this.region = region;
157
- this.retries = retries;
158
- this.url = url;
159
- this.version = version;
160
- if (Loader.instance) {
161
- if (!isEqual(this.options, Loader.instance.options)) {
162
- throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Loader.instance.options)}`);
163
- }
164
- return Loader.instance;
165
- }
166
- Loader.instance = this;
167
- }
168
- get options() {
169
- return {
170
- version: this.version,
171
- apiKey: this.apiKey,
172
- channel: this.channel,
173
- client: this.client,
174
- id: this.id,
175
- libraries: this.libraries,
176
- language: this.language,
177
- region: this.region,
178
- mapIds: this.mapIds,
179
- nonce: this.nonce,
180
- url: this.url,
181
- authReferrerPolicy: this.authReferrerPolicy,
182
- };
183
- }
184
- get status() {
185
- if (this.errors.length) {
186
- return LoaderStatus.FAILURE;
187
- }
188
- if (this.done) {
189
- return LoaderStatus.SUCCESS;
190
- }
191
- if (this.loading) {
192
- return LoaderStatus.LOADING;
193
- }
194
- return LoaderStatus.INITIALIZED;
195
- }
196
- get failed() {
197
- return this.done && !this.loading && this.errors.length >= this.retries + 1;
198
- }
199
- /**
200
- * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].
201
- *
202
- * @ignore
203
- * @deprecated
204
- */
205
- createUrl() {
206
- let url = this.url;
207
- url += `?callback=__googleMapsCallback&loading=async`;
208
- if (this.apiKey) {
209
- url += `&key=${this.apiKey}`;
210
- }
211
- if (this.channel) {
212
- url += `&channel=${this.channel}`;
213
- }
214
- if (this.client) {
215
- url += `&client=${this.client}`;
216
- }
217
- if (this.libraries.length > 0) {
218
- url += `&libraries=${this.libraries.join(",")}`;
219
- }
220
- if (this.language) {
221
- url += `&language=${this.language}`;
222
- }
223
- if (this.region) {
224
- url += `&region=${this.region}`;
225
- }
226
- if (this.version) {
227
- url += `&v=${this.version}`;
228
- }
229
- if (this.mapIds) {
230
- url += `&map_ids=${this.mapIds.join(",")}`;
231
- }
232
- if (this.authReferrerPolicy) {
233
- url += `&auth_referrer_policy=${this.authReferrerPolicy}`;
234
- }
235
- return url;
236
- }
237
- deleteScript() {
238
- const script = document.getElementById(this.id);
239
- if (script) {
240
- script.remove();
241
- }
242
- }
243
- /**
244
- * Load the Google Maps JavaScript API script and return a Promise.
245
- * @deprecated, use importLibrary() instead.
246
- */
247
- load() {
248
- return this.loadPromise();
249
- }
250
- /**
251
- * Load the Google Maps JavaScript API script and return a Promise.
252
- *
253
- * @ignore
254
- * @deprecated, use importLibrary() instead.
255
- */
256
- loadPromise() {
257
- return new Promise((resolve, reject) => {
258
- this.loadCallback((err) => {
259
- if (!err) {
260
- resolve(window.google);
261
- }
262
- else {
263
- reject(err.error);
264
- }
265
- });
266
- });
267
- }
268
- importLibrary(name) {
269
- this.execute();
270
- return google.maps.importLibrary(name);
271
- }
272
- /**
273
- * Load the Google Maps JavaScript API script with a callback.
274
- * @deprecated, use importLibrary() instead.
275
- */
276
- loadCallback(fn) {
277
- this.callbacks.push(fn);
278
- this.execute();
279
- }
280
- /**
281
- * Set the script on document.
282
- */
283
- setScript() {
284
- var _a, _b;
285
- if (document.getElementById(this.id)) {
286
- // TODO wrap onerror callback for cases where the script was loaded elsewhere
287
- this.callback();
288
- return;
289
- }
290
- const params = {
291
- key: this.apiKey,
292
- channel: this.channel,
293
- client: this.client,
294
- libraries: this.libraries.length && this.libraries,
295
- v: this.version,
296
- mapIds: this.mapIds,
297
- language: this.language,
298
- region: this.region,
299
- authReferrerPolicy: this.authReferrerPolicy,
300
- };
301
- // keep the URL minimal:
302
- Object.keys(params).forEach(
303
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
304
- (key) => !params[key] && delete params[key]);
305
- if (!((_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.importLibrary)) {
306
- // tweaked copy of https://developers.google.com/maps/documentation/javascript/load-maps-js-api#dynamic-library-import
307
- // which also sets the base url, the id, and the nonce
308
- /* eslint-disable */
309
- ((g) => {
310
- // @ts-ignore
311
- let h, a, k, p = "The Google Maps JavaScript API", c = "google", l = "importLibrary", q = "__ib__", m = document, b = window;
312
- // @ts-ignore
313
- b = b[c] || (b[c] = {});
314
- // @ts-ignore
315
- const d = b.maps || (b.maps = {}), r = new Set(), e = new URLSearchParams(), u = () =>
316
- // @ts-ignore
317
- h || (h = new Promise((f, n) => __awaiter(this, void 0, void 0, function* () {
318
- var _a;
319
- yield (a = m.createElement("script"));
320
- a.id = this.id;
321
- e.set("libraries", [...r] + "");
322
- // @ts-ignore
323
- for (k in g)
324
- e.set(k.replace(/[A-Z]/g, (t) => "_" + t[0].toLowerCase()), g[k]);
325
- e.set("callback", c + ".maps." + q);
326
- a.src = this.url + `?` + e;
327
- d[q] = f;
328
- a.onerror = () => (h = n(Error(p + " could not load.")));
329
- // @ts-ignore
330
- a.nonce = this.nonce || ((_a = m.querySelector("script[nonce]")) === null || _a === void 0 ? void 0 : _a.nonce) || "";
331
- m.head.append(a);
332
- })));
333
- // @ts-ignore
334
- d[l] ? console.warn(p + " only loads once. Ignoring:", g) : (d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n)));
335
- })(params);
336
- /* eslint-enable */
337
- }
338
- // While most libraries populate the global namespace when loaded via bootstrap params,
339
- // this is not the case for "marker" when used with the inline bootstrap loader
340
- // (and maybe others in the future). So ensure there is an importLibrary for each:
341
- const libraryPromises = this.libraries.map((library) => this.importLibrary(library));
342
- // ensure at least one library, to kick off loading...
343
- if (!libraryPromises.length) {
344
- libraryPromises.push(this.importLibrary("core"));
345
- }
346
- Promise.all(libraryPromises).then(() => this.callback(), (error) => {
347
- const event = new ErrorEvent("error", { error }); // for backwards compat
348
- this.loadErrorCallback(event);
349
- });
350
- }
351
- /**
352
- * Reset the loader state.
353
- */
354
- reset() {
355
- this.deleteScript();
356
- this.done = false;
357
- this.loading = false;
358
- this.errors = [];
359
- this.onerrorEvent = null;
360
- }
361
- resetIfRetryingFailed() {
362
- if (this.failed) {
363
- this.reset();
364
- }
365
- }
366
- loadErrorCallback(e) {
367
- this.errors.push(e);
368
- if (this.errors.length <= this.retries) {
369
- const delay = this.errors.length * Math.pow(2, this.errors.length);
370
- console.error(`Failed to load Google Maps script, retrying in ${delay} ms.`);
371
- setTimeout(() => {
372
- this.deleteScript();
373
- this.setScript();
374
- }, delay);
375
- }
376
- else {
377
- this.onerrorEvent = e;
378
- this.callback();
379
- }
380
- }
381
- callback() {
382
- this.done = true;
383
- this.loading = false;
384
- this.callbacks.forEach((cb) => {
385
- cb(this.onerrorEvent);
386
- });
387
- this.callbacks = [];
388
- }
389
- execute() {
390
- this.resetIfRetryingFailed();
391
- if (this.loading) {
392
- // do nothing but wait
393
- return;
394
- }
395
- if (this.done) {
396
- this.callback();
397
- }
398
- else {
399
- // short circuit and warn if google.maps is already loaded
400
- if (window.google && window.google.maps && window.google.maps.version) {
401
- console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. " +
402
- "This may result in undesirable behavior as options and script parameters may not match.");
403
- this.callback();
404
- return;
405
- }
406
- this.loading = true;
407
- this.setScript();
408
- }
409
- }
410
- }
411
-
412
- const mapGooglemapsCss = () => `:host{display:block}:host>div{height:100%}.mapsindoors.floor-selector{margin:10px;position:absolute;border-radius:2px;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.3);width:40px;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:18px}.mapsindoors.floor-selector a{position:relative;display:block;float:none;margin-top:-1px;text-align:center;cursor:pointer;border-radius:2px;background:#fff;z-index:0;height:40px;line-height:40px}.mapsindoors.floor-selector a:hover{background:#ddd;border-color:#999;z-index:2}.mapsindoors.floor-selector a.active{background:#ddd;border-color:#00b1ff;z-index:2}.mapsindoors.floor-selector a:not(:first-child):not(:last-child){border-radius:0}.mapsindoors.floor-selector a:first-child:not(:last-child){border-top-right-radius:2px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mapsindoors.floor-selector a:last-child:not(:first-child){border-top-right-radius:0;border-bottom-left-radius:2px;border-top-left-radius:0}.mapsindoors.position-control{margin:10px;position:absolute}.mapsindoors.position-control__button{border:none;margin:0;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;width:40px;height:40px;background-color:transparent;background-size:cover;outline:none;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.16), 0px 2px 2px rgba(0, 0, 0, 0.18), 0px 1px 1px rgba(0, 0, 0, 0.2);border-radius:50%}.mapsindoors.position-control__button--unknown{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAdMSURBVHgB7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4qoN2tOKjnrZI9T+3I8qui61F3y7/QNMcRruyX/LN62egfVndZ0WmWsiRDUPgiy77kunceeBBGk+rEnLp0H7wTpPPrpOYJSPPopcWiH8wF4foCW+eQm4T4jRlBCUsXG4IOcFmohdHFwD6nEU4JlP/azVR/AeIjygGU/AvSM1TqUrDw+2dfqPIRWDXyRR6x8CYniimtqHceIZRfrZltk6wkXBt/AEKeTVjZANNTHJmVAs36MABP4WMZukBoEOT9EQBn/GEGmAso4gsLLY5K9Zs8g24Hrbr0IzxbpF2fb1F9veAZMC2gSEGXysQAAAABJRU5ErkJggg==)}.mapsindoors.position-control__button--requesting{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAABEZVhJZk1NACoAAAAIAAIBEgADAAAAAQAGAACHaQAEAAAAAQAAACYAAAAAAAKgAgAEAAAAAQAAAFCgAwAEAAAAAQAAAFAAAAAA4foYGgAAB7RJREFUeAHtnd9rFFcUx09CbaBqTFp3wag4YrSQYP3ZgulDJw+SUqg/aOtDQYhQ6GNt/wH1H6j6WCgoCH2wLTEIRfEh60MN1PqjtQk0RvaKMYXENNHWgvXher/zY529e2d2ZzJ3Zja7H7jZnc3sj/nuueeec+6d2RZKEc55h7gxRTNE2+bcGs6/DWn3BdGY5/a+aAXRbre0tCxQSrRQgngEe0+0A1QpUlQY2WIO4zZNQbUghDNFGxJtnifDGdEOUD0DaxPtWIKiqSiKNiiaQfUCz4ZwMkXRjlHW4fa3XeTZpSjaIGUN8aEM0UZ4/QB/bFAWEB/kC56t7lor+MyDlBbc9nUnef1zkhZBpDiQ2+Y/JNp2WhrcFu2giB8ZhSS0gI54IxRfEJwVmGj9YUUMJeASFs+FUUgRaxawAcRzYRRCxJoEbCDxXBjVKGKtAt6ipTNg1AoGlv5qhYlWqoIzzDeaeADHXDX9C7RAbgeaZ6ix+V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VY46NplONUAAAAASUVORK5CYII=)}.mapsindoors.position-control__button--known{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAbXSURBVHgB7Z3faxxVFMdPxFdD89xgJw+K2SKxICYi4gbTFBFs0qSIIDSJFlGoSYhV35KgD4JIGguCiEkEQSTbJC2U0kRJQCSpIKZIN+LLTiA+N6x/wPV+58c6c3dmf865s78+cDsz3SSz8917zz33nDOzbRQjQogTcpOUzZCtx9kazsuG8uPHspme7aFsO7Ltt7W1HVNMtJFGPIK9JNsQ5YtUKSbZYt7ENk5BWZDCJWVbl+2h0MOybENUz6C3yTarUbQgMrKNyWZQvSBqQziVjGyzVOsI+9POiNolI9sY1RryTRmybYv6AfbYoFpAvpFJUVvDtVTwnscoLoRt6xZE/bNAVVCRHyjs7r8u2zPUGOzLNiz9R5PKpGwBHfG2KTonuFYwZesvV8SyBGxg8VxMKlPEkgVsAvFcTCpDxJIEbCLxXEwqUcRSBfyDGmfCKBVMLP3FAhOPUBGcab7ZxAO45qLLv4I9UNiO5jI1N9OyF14LezFUQMfuYeieoOYGQ/hMmD0sJCAc5dhiaqe6nvQdH2b+phhBkLY/6IVAG+gM3foOSEZLUoSsm8MmkdqPnelnVtgpCR95Ago78GhQCxVDtin1P302ME6H+ejoiO5u/kTpgwNKp/+S7cD3eiLRTZ2dJ2nw7AA939dr7ccAJpQur2+oCjhGmt2WVGqNVm+s0d7eb2X9Xl/fczQ6coEujl4gzcxLAefcA1XADGnqfXt792jm6sey5/1D1YCeODV5RaeQx1LADvcgJ6Cw04DrxEw2+y8tLH5JS0vfUZRMTFyi6cn3qb39MdIAlng72PEKiKE7Roygt11+5708++bS19tLg4MvOzauMycGRE+n0/RA/t7m1s9W7w0CvfHHH77XYR83pIDD2LEEdKbnh8QIxHv9jTcDh+xbE2M0MX6p5AvH31i4d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hnfi8NK62bA4BW82DM2JOL/QGsr27a5m2IsFk0rOfbKL1Lwshg1dl6K3/Du+IZZ4TXfLvxTvTLEfKprWdGZlxMVNah5Msq+5KK3HnuRjUtSPPXFpAhFN4nrwjksDi2hSBY9+Kru0wzkBnh/Akk+OCfcZMSaVSUW1MTiRM0M1gouDa6hIvEgQ9mM/6/UBjFNUCwj7EaDron7YFrX4ZF/ReghtNMg3OSdqS0gMV7yn+gmMCHtYx90j60+4IOQFDMm2IvQA0WCPk6SBsh3pahD/fxkBEvj4QgKDosEk54sISPOXEWgVUMURFFGeJNn37BlkB3DdrRfTs0W772xj/faG/wAnZe5yTgwtRAAAAABJRU5ErkJggg==)}.mapsindoors.position-control__button--centered{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAe3SURBVHgB7Z1PbBRVHMd/bYTy3xb8Q9sQhkDoQQgSC0fcXvRgwHIreGlNCEYPIoSbyVLjUYocNBIS4ULpraXEg152wxFrwACHNmCnEhY1CJU/AmIcf9/5U2bevje7sztvdre7n+R1d2e7OzPf+b3f7/d+b2a2iSqIZVmt/JDiZnDb4j4a7tuG8O+z3Ezf4wy3LLfLTU1Ns1QhmihBfIK9ya2X8kUqFZMcMc/hsZKCaoGFS3Eb5XbPSoZT3HqploG1cUsnKJqMaW793AyqFazqEE5kmluaqh3LOdrTVvUyza2fqg3eKINbxqod4I8NqgZ4Qz62qqu7Fgu2uZ8qheX4umNW7XOMyqCkPNByzH+U2+s0P7jMbTfnjyZFJLKArngZii8JrhZMbj1RRYwk4DwWz8OkiCIWLWAdiOdhUgQRixKwjsTzMKlIEYsV8BLNn4BRLAgsPYUKE81UADfM15t4APtccPgXaoGWk2ieovrmE7bCL1VvKgV0/R66bivVN+jCW1X+MExAJMoVq6ltPTgVeH1paCNVEBRpe2RvSH2g23VruyAZLylLM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psSPUBTwqpuqMMHBx8RoZsCImDpAnbAi+TBmRDquELd6X/i7QDFeRiLBH/E1bRERPzsCFkDMx4QUQLO7e9GBgTY/iFZbJgAkGQFKMYABEwevCGYO18MGDR8Jdh1gTrE+dJdnVrne7MNumeUHrn818CXdcpw6+NPdmVzbtgXd99uo400tbsnqZgkiYG+1YHXsNKvhj7g+ImfTZ/kn7/W6tIIya088zgHGlCFmVRGD34bS6WhBffkT77W15hAevctV1v98WfZv8LXciiLMr2SLbLKXYiYUa3HRf8HrquKkrHiG10/ol1nBej7XTesIl1lNzD5jtk3zXMAUlWR0zw7IS2uYl1kMQpvWEiAtTxUpuXupNILYFTO7z8DkmyalSDzwwNdCYh3mkWbwBP/AKmyDk3UCsQA2nKcMwnF8HnodsmVMqyz0rAE/H0NuxVImflj/OM3Ykf7sRyettg36s6RxsiiL5zuZEo4BFK+PxoCDk+cV95xpUKjDCQJGuOtDIGWMDT3gtRQO3BRIXt4zCpfu2h/VycCNrI/g0+rqu9hXp40kgs2yeEScI1dHnXiVTCCmVU2XUiHoHTe4HM4+KyJpMaiJiieCBPQHdoN0gNRKSaSGO+6ySz1MBjzB84/DQuNixM6MWGyqzT/UCjKzuXu5qqN0PTdvc62eNUvxxXdV2Pgpf8u7khhnh1d8k/i7e10D8VHDi6URnXRJhUP5jk7HNBGrc9ycekuG974tG48U4+jVs/PcekEm79FLl45q4A9w/QMp9cIbx7xJgUkZKqj1iRG6HmQ4qDfShJvFiwnNt+1uoNGA9QNWA5twAdtWqHjFWNd/a1GjehjQfeyCNWdQmJ7optqp3CiOV060pbZO0JJ4N3oJfbaSsZIBr8cYoSoKSb0JaK9fzHCDCBjx8kMCgeTHJ/iIAS/jGCRAUUcQVFlSdFzjV7BjkFXO/Rj+l7RPvZfazorzf8DzVpOVIMfwU5AAAAAElFTkSuQmCC)}`;
413
-
414
- const MapGooglemaps = class {
415
- constructor(hostRef) {
416
- registerInstance(this, hostRef);
417
- this.mapsIndoorsReady = createEvent(this, "mapsIndoorsReady", 7);
418
- /**
419
- * The Google Maps API key.
420
- * @type {string}
421
- */
422
- this.gmApiKey = '';
423
- /**
424
- * The MapsIndoors API key.
425
- * @type {string}
426
- */
427
- this.miApiKey = '';
428
- /**
429
- * Google Maps options. Defaults to zoom: 17, maxZoom: 21, center: { lat: 0, lng: 0 }, mapTypeControl: false, streetViewControl: false.
430
- * https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions
431
- * @type {google.maps.MapOptions}
432
- */
433
- this.gmOptions = {
434
- zoom: 17,
435
- maxZoom: 21,
436
- center: { lat: 0, lng: 0 },
437
- mapTypeControl: false,
438
- streetViewControl: false
439
- };
440
- /**
441
- * Set to true to prevent external links on the map from opening.
442
- * This can be useful when running the map on a kiosk where you never want the browser to navigate away.
443
- * @type {boolean}
444
- */
445
- this.disableExternalLinks = false;
446
- /**
447
- * Styling of polygon highlight when a location is clicked.
448
- * Set it to null to turn off highlighting.
449
- * @type {object}
450
- */
451
- this.polygonHighlightOptions = {
452
- strokeColor: '#EF6CCE',
453
- strokeOpacity: 1,
454
- strokeWeight: 2,
455
- fillColor: '#EF6CCE',
456
- fillOpacity: 0.2
457
- };
458
- /**
459
- * Set the component language. Default set to English (en). Will not react to changes.
460
- */
461
- this.language = 'en';
462
- /**
463
- * Styling of how the polyline looks when getting a route.
464
- * Color: The stroke color of direction polyline on the map. Accepts any legal HTML color value. Default: '#307ad9'.
465
- * Opacity: The stroke opacity of directions polylines on the map. Numerical value between 0.0 and 1.0. Default: 1.
466
- * Weight: The width of the direction polyline in pixels. Default: 4.
467
- *
468
- * @type {{ color: string, weight: number, opacity: number }}
469
- */
470
- this.polylineOptions = {
471
- color: '#3071d9',
472
- opacity: 1,
473
- weight: 4
474
- };
475
- // Directions render and service instances
476
- this.directionsRendererInstance = null;
477
- }
478
- apiKeyChange(newApiKey) {
479
- mapsindoors.MapsIndoors.setMapsIndoorsApiKey(newApiKey);
480
- }
481
- gmOptionsChange(newControlOptions) {
482
- this.googleMapsInstance.setOptions(newControlOptions);
483
- }
484
- setExternalLinkBehavior(shouldDisableLinks) {
485
- if (shouldDisableLinks === true) {
486
- this.mapElement.addEventListener('click', this.preventExternalLink);
487
- }
488
- else {
489
- this.mapElement.removeEventListener('click', this.preventExternalLink);
490
- }
491
- }
492
- floorSelectorControlPositionChange(newPosition, oldPosition) {
493
- if (this.floorSelectorInstance) {
494
- this.setFloorSelectorControl(newPosition, oldPosition);
495
- }
496
- }
497
- floorIndexChange(newFloor, oldFloor) {
498
- if (newFloor === null) {
499
- newFloor = '0'; // Setting the DOM attribute to "0" will be passed on here as null, so we need to circumvent that.
500
- }
501
- if (newFloor !== oldFloor && newFloor !== this.mapsIndoorsInstance.getFloor()) {
502
- this.mapsIndoorsInstance.setFloor(newFloor);
503
- }
504
- }
505
- myPositionControlPositionChange(newPosition, oldPosition) {
506
- this.setMyPositionControl(newPosition, oldPosition);
507
- }
508
- polylineOptionsChange(newPolylineOptions) {
509
- if (this.directionsRendererInstance) {
510
- this.directionsRendererInstance.setOptions({
511
- strokeColor: newPolylineOptions.color ? newPolylineOptions.color : '#3071d9',
512
- strokeOpacity: newPolylineOptions.opacity ? newPolylineOptions.opacity : 1,
513
- strokeWeight: newPolylineOptions.weight ? newPolylineOptions.weight : 4
514
- });
515
- }
516
- }
517
- /**
518
- * Get the map instance.
519
- * @returns {Promise<any>}
520
- */
521
- async getMapInstance() {
522
- return Promise.resolve(this.googleMapsInstance);
523
- }
524
- /**
525
- * Get the MapsIndoors instance.
526
- * @returns {Promise<any>}
527
- */
528
- async getMapsIndoorsInstance() {
529
- return Promise.resolve(this.mapsIndoorsInstance);
530
- }
531
- /**
532
- * Get the MapsIndoors Directions Service Instance.
533
- * @returns {Promise<any>}
534
- */
535
- async getDirectionsServiceInstance() {
536
- return Promise.resolve(this.directionsServiceInstance);
537
- }
538
- /**
539
- * Get the MapsIndoors Directions Renderer Instance.
540
- * @returns {Promise<any>}
541
- */
542
- async getDirectionsRendererInstance() {
543
- return Promise.resolve(this.directionsRendererInstance);
544
- }
545
- /**
546
- * Highlight a MapsIndoors location. Only a single location can be highlighted at the time.
547
- * @param {Location} location
548
- * @returns {Promise<void>}
549
- */
550
- async highlightLocation(location) {
551
- // Return if polygonHighlightOptions is undefined
552
- if (!this.polygonHighlightOptions)
553
- return;
554
- // Return if already highlighted
555
- if (this.highlightedLocationId && this.highlightedLocationId === location.id)
556
- return;
557
- // Remove previous highlight
558
- if (this.highlightedLocationId) {
559
- this.mapsIndoorsInstance.setDisplayRule(this.highlightedLocationId, null);
560
- }
561
- this.mapsIndoorsInstance.setDisplayRule(location.id, {
562
- polygonVisible: true,
563
- polygonZoomFrom: '0',
564
- polygonZoomTo: '22',
565
- zIndex: 1000,
566
- polygonFillColor: this.polygonHighlightOptions.fillColor,
567
- polygonFillOpacity: this.polygonHighlightOptions.fillOpacity,
568
- polygonStrokeColor: this.polygonHighlightOptions.strokeColor,
569
- polygonStrokeOpacity: this.polygonHighlightOptions.strokeOpacity,
570
- polygonStrokeWeight: this.polygonHighlightOptions.strokeWeight
571
- });
572
- this.highlightedLocationId = location.id;
573
- }
574
- /**
575
- * Clear existing MapsIndoors location highlight.
576
- * @returns {Promise<void>}
577
- */
578
- async clearHighlightLocation() {
579
- if (this.highlightedLocationId) {
580
- this.mapsIndoorsInstance.setDisplayRule(this.highlightedLocationId, null);
581
- this.highlightedLocationId = null;
582
- }
583
- }
584
- async componentDidLoad() {
585
- await this.loadGoogleMapsApi();
586
- await this.initializeMapsIndoorsSDK();
587
- await this.setupMap();
588
- this.setExternalLinkBehavior(this.disableExternalLinks);
589
- this.addEventListeners();
590
- if (this.floorSelectorControlPosition) {
591
- this.showFloorSelector();
592
- }
593
- if (this.myPositionControlPosition) {
594
- this.setMyPositionControl(this.myPositionControlPosition);
595
- }
596
- }
597
- disconnectedCallback() {
598
- this.mapsIndoorsInstance.deallocate();
599
- this.mapElement.remove();
600
- this.mapElement = null;
601
- }
602
- /**
603
- * Load the Google Maps API.
604
- *
605
- * @returns {Promise<void>}
606
- */
607
- loadGoogleMapsApi() {
608
- if (typeof (google) === 'undefined') {
609
- const loader = new Loader({
610
- apiKey: this.gmApiKey,
611
- version: 'quarterly',
612
- libraries: ['geometry', 'places']
613
- });
614
- return loader.load();
615
- }
616
- }
617
- /**
618
- * Ensure that MapsIndoors Web SDK is available.
619
- *
620
- * @returns {Promise<void>}
621
- */
622
- initializeMapsIndoorsSDK() {
623
- return new Promise((resolve) => {
624
- if (typeof (mapsindoors) !== 'undefined') {
625
- mapsindoors.MapsIndoors.setMapsIndoorsApiKey(this.miApiKey);
626
- mapsindoors.MapsIndoors.setLanguage(this.language);
627
- return resolve();
628
- }
629
- const miSdkApiTag = document.createElement('script');
630
- miSdkApiTag.setAttribute('type', 'text/javascript');
631
- miSdkApiTag.setAttribute('src', `${miVariables.miSDKUrlV4}?apikey=${this.miApiKey}`);
632
- document.body.appendChild(miSdkApiTag);
633
- miSdkApiTag.onload = () => resolve();
634
- });
635
- }
636
- /**
637
- * Start Google Maps and MapsIndoors.
638
- */
639
- setupMap() {
640
- return new Promise((resolve) => {
641
- const mapViewOptions = Object.assign({ element: this.mapElement }, this.gmOptions);
642
- const mapViewInstance = new mapsindoors.mapView.GoogleMapsView(mapViewOptions);
643
- this.googleMapsInstance = mapViewInstance.getMap();
644
- this.mapsIndoorsInstance = new mapsindoors.MapsIndoors({ mapView: mapViewInstance });
645
- this.mapsIndoorsInstance.on('ready', async () => {
646
- if (this.floorIndex !== undefined) {
647
- // Set the floor if floor attribute was set in the DOM initially
648
- this.mapsIndoorsInstance.setFloor(this.floorIndex);
649
- }
650
- else {
651
- this.floorIndex = this.mapsIndoorsInstance.getFloor();
652
- }
653
- this.initializeDirectionsService();
654
- this.initializeDirectionsRenderer();
655
- this.mapsIndoorsReady.emit();
656
- resolve();
657
- });
658
- });
659
- }
660
- /**
661
- * Initialize MapsIndoors Directions Service.
662
- */
663
- initializeDirectionsService() {
664
- const externalDirections = new mapsindoors.directions.GoogleMapsProvider();
665
- this.directionsServiceInstance = new mapsindoors.services.DirectionsService(externalDirections);
666
- }
667
- /**
668
- * Initialize MapsIndoors Directions Renderer with render options set.
669
- */
670
- initializeDirectionsRenderer() {
671
- this.directionsRendererInstance = new mapsindoors.directions.DirectionsRenderer({
672
- mapsIndoors: this.mapsIndoorsInstance,
673
- fitBounds: true,
674
- strokeColor: this.polylineOptions.color,
675
- strokeOpacity: this.polylineOptions.opacity,
676
- strokeWeight: this.polylineOptions.weight,
677
- visible: true
678
- });
679
- }
680
- /**
681
- * Add event listeners and keep properties in sync.
682
- */
683
- addEventListeners() {
684
- this.mapsIndoorsInstance.on('click', (location) => {
685
- this.highlightLocation(location);
686
- });
687
- // Add floor changed event listener
688
- this.mapsIndoorsInstance.on('floor_changed', (floorIndex) => {
689
- this.floorIndex = floorIndex;
690
- });
691
- }
692
- /**
693
- * Prevent external links from opening.
694
- * @param {MouseEvent} event
695
- */
696
- preventExternalLink(event) {
697
- const externalLink = event.target.closest('a[target="_blank"]');
698
- if (externalLink) {
699
- event.preventDefault();
700
- }
701
- }
702
- /**
703
- * Show the floor selector.
704
- */
705
- showFloorSelector() {
706
- this.setFloorSelectorControl(this.floorSelectorControlPosition);
707
- }
708
- /**
709
- * Remove a Google Map Control from the map based on class name of the control.
710
- * @param {string} controlPosition - the position from where to remove the control
711
- * @param {string} className - the class name of the control to remove
712
- */
713
- removeGoogleMapControl(controlPosition, className) {
714
- const controls = this.googleMapsInstance.controls[google.maps.ControlPosition[controlPosition]].getArray();
715
- const controlIndex = controls.findIndex(control => control.classList.contains(className));
716
- this.googleMapsInstance.controls[google.maps.ControlPosition[controlPosition]].removeAt(controlIndex);
717
- }
718
- /**
719
- * Set, update or unset floor selector on the map.
720
- * @param {string} controlPosition
721
- * @param {string} [oldControlPosition=undefined]
722
- */
723
- setFloorSelectorControl(controlPosition, oldControlPosition = undefined) {
724
- if (controlPosition === null) {
725
- // If attribute is not set, clear control and unset floor selector.
726
- this.removeGoogleMapControl(oldControlPosition, 'floor-selector');
727
- this.floorSelectorElement = null;
728
- this.floorSelectorInstance = null;
729
- }
730
- else if (!this.floorSelectorInstance) {
731
- // Create new floor selector control
732
- this.floorSelectorElement = document.createElement('div');
733
- this.floorSelectorInstance = new mapsindoors.FloorSelector(this.floorSelectorElement, this.mapsIndoorsInstance);
734
- this.googleMapsInstance.controls[google.maps.ControlPosition[controlPosition]].push(this.floorSelectorElement);
735
- }
736
- else {
737
- // Update position of floor selector control
738
- this.removeGoogleMapControl(oldControlPosition, 'floor-selector');
739
- this.googleMapsInstance.controls[google.maps.ControlPosition[controlPosition]].push(this.floorSelectorElement);
740
- }
741
- }
742
- /**
743
- * Set, update or unset position control on the map.
744
- * @param {string} controlPosition
745
- * @param {string} oldControlPosition
746
- */
747
- setMyPositionControl(controlPosition, oldControlPosition = undefined) {
748
- if (controlPosition === null) {
749
- // If attribute is not set, clear control and unset position control.
750
- this.removeGoogleMapControl(google.maps.ControlPosition[oldControlPosition], 'position-control');
751
- this.positionControlElement = null;
752
- this.positionControlInstance = null;
753
- }
754
- else if (!this.positionControlInstance) {
755
- // Create new my position control
756
- this.positionControlElement = document.createElement('div');
757
- this.positionControlInstance = new mapsindoors.PositionControl(this.positionControlElement, { mapsIndoors: this.mapsIndoorsInstance, positionOptions: { enableHighAccuracy: false, maximumAge: 300000, timeout: 10000 } });
758
- this.googleMapsInstance.controls[google.maps.ControlPosition[controlPosition]].push(this.positionControlElement);
759
- }
760
- else {
761
- // Update position of my position control
762
- this.removeGoogleMapControl(oldControlPosition, 'position-control');
763
- this.googleMapsInstance.controls[google.maps.ControlPosition[controlPosition]].push(this.positionControlElement);
764
- }
765
- }
766
- render() {
767
- return (h("div", { key: '4de72ef7235db42765f97ad5e3d92d4080876225', ref: (el) => this.mapElement = el }));
768
- }
769
- static get watchers() { return {
770
- "miApiKey": [{
771
- "apiKeyChange": 0
772
- }],
773
- "gmOptions": [{
774
- "gmOptionsChange": 0
775
- }],
776
- "disableExternalLinks": [{
777
- "setExternalLinkBehavior": 0
778
- }],
779
- "floorSelectorControlPosition": [{
780
- "floorSelectorControlPositionChange": 0
781
- }],
782
- "floorIndex": [{
783
- "floorIndexChange": 0
784
- }],
785
- "myPositionControlPosition": [{
786
- "myPositionControlPositionChange": 0
787
- }],
788
- "polylineOptions": [{
789
- "polylineOptionsChange": 0
790
- }]
791
- }; }
792
- };
793
- MapGooglemaps.style = mapGooglemapsCss();
794
-
795
- export { MapGooglemaps as mi_map_googlemaps };