WP Google Maps - Version 8.0.29

Version Description

  • 2020-12-11 - High priority =
  • Tested up to WordPress 5.6
  • Added support for jQuery 3
Download this release

Release Info

Developer DylanAuty
Plugin Icon 128x128 WP Google Maps
Version 8.0.29
Comparing to
See all releases

Code changes from version 8.0.28 to 8.0.29

includes/compat/js/backwards_compat_user_v6.js CHANGED
@@ -1,5 +1,5 @@
1
  jQuery(function($){
2
- jQuery(window).on("load", function(){
3
  if(typeof wpgmaps_localize !== "undefined"){
4
  for(var i in wpgmaps_localize){
5
  var mapid = wpgmaps_localize[i]['id'];
1
  jQuery(function($){
2
+ jQuery(document).on("load", function(){
3
  if(typeof wpgmaps_localize !== "undefined"){
4
  for(var i in wpgmaps_localize){
5
  var mapid = wpgmaps_localize[i]['id'];
includes/compat/js/backwards_compat_v6.js CHANGED
@@ -1,6 +1,6 @@
1
  // TODO: Move this file into /js and out of /includes which is for PHP
2
  jQuery(function($){
3
- jQuery(window).on("load", function(){
4
  if(typeof wpgmza_backwards_compat_v6_marker_tab_headings !== "undefined"){
5
  $("#wpgmaps_tabs_markers > ul").append(wpgmza_backwards_compat_v6_marker_tab_headings);
6
  $("#wpgmaps_tabs_markers").append(wpgmza_backwards_compat_v6_marker_tab_content);
1
  // TODO: Move this file into /js and out of /includes which is for PHP
2
  jQuery(function($){
3
+ jQuery(document).on("load", function(){
4
  if(typeof wpgmza_backwards_compat_v6_marker_tab_headings !== "undefined"){
5
  $("#wpgmaps_tabs_markers > ul").append(wpgmza_backwards_compat_v6_marker_tab_headings);
6
  $("#wpgmaps_tabs_markers").append(wpgmza_backwards_compat_v6_marker_tab_content);
js/admin-basic.js CHANGED
@@ -114,7 +114,7 @@ jQuery(function($) {
114
 
115
  });
116
 
117
- $(window).on("load", function(event) {
118
 
119
  if(WPGMZA.settings.engine != "open-layers")
120
  return;
114
 
115
  });
116
 
117
+ $(document).on("load", function(event) {
118
 
119
  if(WPGMZA.settings.engine != "open-layers")
120
  return;
js/legacy/legacy-edit-marker-location-page.js CHANGED
@@ -7,7 +7,7 @@ jQuery(function ($) {
7
  height: 400,
8
  width: 400
9
  });
10
- $(window).on("load", function (event) {
11
  wpgmza_InitMap();
12
  });
13
  });
7
  height: 400,
8
  width: 400
9
  });
10
+ $(document).ready(function (event) {
11
  wpgmza_InitMap();
12
  });
13
  });
js/v8/compatibility/astra-theme-compatibility.js CHANGED
@@ -6,7 +6,7 @@
6
  */
7
  jQuery(function($) {
8
 
9
- $(window).on("load", function(event) {
10
 
11
  var parent = document.body.onclick;
12
 
6
  */
7
  jQuery(function($) {
8
 
9
+ $(document).on("load", function(event) {
10
 
11
  var parent = document.body.onclick;
12
 
js/v8/google-maps/google-map.js CHANGED
@@ -187,7 +187,7 @@ jQuery(function($) {
187
  lng: parseFloat(clone.center.lng)
188
  };
189
 
190
- if(this.settings.hide_point_of_interest == "1")
191
  {
192
  var noPoi = {
193
  featureType: "poi",
187
  lng: parseFloat(clone.center.lng)
188
  };
189
 
190
+ if(this.settings.wpgmza_hide_point_of_interest == "1")
191
  {
192
  var noPoi = {
193
  featureType: "poi",
js/v8/map-edit-page.js CHANGED
@@ -60,8 +60,7 @@ jQuery(function($) {
60
  });
61
  }
62
 
63
- $(window).on("load", function(event) {
64
-
65
  WPGMZA.mapEditPage = WPGMZA.MapEditPage.createInstance();
66
 
67
  });
60
  });
61
  }
62
 
63
+ $(document.body).on("wpgmza_map_editor_init", function(event) {
 
64
  WPGMZA.mapEditPage = WPGMZA.MapEditPage.createInstance();
65
 
66
  });
js/v8/marker-panel.js CHANGED
@@ -10,7 +10,7 @@ jQuery(function($) {
10
  this.element = element;
11
  }
12
 
13
- $(window).on("load", function(event) {
14
 
15
  if(WPGMZA.getCurrentPage() == WPGMZA.PAGE_MAP_EDIT)
16
  WPGMZA.mapEditPage.markerPanel = new WPGMZA.MarkerPanel($("#wpgmza-marker-edit-panel")[0]);
10
  this.element = element;
11
  }
12
 
13
+ $(document.body).on("wpgmza_map_editor_init", function(event) {
14
 
15
  if(WPGMZA.getCurrentPage() == WPGMZA.PAGE_MAP_EDIT)
16
  WPGMZA.mapEditPage.markerPanel = new WPGMZA.MarkerPanel($("#wpgmza-marker-edit-panel")[0]);
js/v8/scripts.json CHANGED
@@ -270,211 +270,211 @@
270
  "wpgmza"
271
  ]
272
  },
273
- "wpgmza-astra-theme-compatiblity": {
274
- "src": "js\/v8\/compatibility\/astra-theme-compatibility.js",
275
- "pro": false,
276
- "dependencies": [
277
- "wpgmza"
278
- ]
279
- },
280
- "wpgmza-google-ui-compatibility": {
281
- "src": "js\/v8\/compatibility\/google-ui-compatibility.js",
282
  "pro": false,
283
  "dependencies": [
284
  "wpgmza"
285
  ]
286
  },
287
- "wpgmza-admin-marker-data-table": {
288
- "src": "js\/v8\/tables\/admin-marker-datatable.js",
289
  "pro": false,
290
  "dependencies": [
291
- "wpgmza-data-table"
 
 
 
 
292
  ]
293
  },
294
- "wpgmza-data-table": {
295
- "src": "js\/v8\/tables\/datatable.js",
296
  "pro": false,
297
  "dependencies": [
298
  "wpgmza"
299
  ]
300
  },
301
- "wpgmza-integration": {
302
- "src": "js\/v8\/3rd-party-integration\/integration.js",
303
  "pro": false,
304
  "dependencies": [
305
  "wpgmza"
306
  ]
307
  },
308
- "wpgmza-gutenberg": {
309
- "src": "js\/v8\/3rd-party-integration\/gutenberg\/dist\/gutenberg.js",
310
  "pro": false,
311
  "dependencies": [
312
- "wpgmza-integration",
313
- "wp-i18n",
314
- "wp-blocks",
315
- "wp-editor",
316
- "wp-components"
317
  ]
318
  },
319
- "wpgmza-ol-circle": {
320
- "src": "js\/v8\/open-layers\/ol-circle.js",
321
  "pro": false,
322
  "dependencies": [
323
- "wpgmza-circle"
324
  ]
325
  },
326
- "wpgmza-ol-geocoder": {
327
- "src": "js\/v8\/open-layers\/ol-geocoder.js",
328
  "pro": false,
329
  "dependencies": [
330
- "wpgmza-geocoder"
331
  ]
332
  },
333
- "wpgmza-ol-info-window": {
334
- "src": "js\/v8\/open-layers\/ol-info-window.js",
335
  "pro": false,
336
  "dependencies": [
337
  "wpgmza-info-window"
338
  ]
339
  },
340
- "wpgmza-ol-map": {
341
- "src": "js\/v8\/open-layers\/ol-map.js",
342
  "pro": false,
343
  "dependencies": [
344
  "wpgmza-map"
345
  ]
346
  },
347
- "wpgmza-ol-marker": {
348
- "src": "js\/v8\/open-layers\/ol-marker.js",
349
  "pro": false,
350
  "dependencies": [
351
  "wpgmza-marker"
352
  ]
353
  },
354
- "wpgmza-ol-modern-store-locator-circle": {
355
- "src": "js\/v8\/open-layers\/ol-modern-store-locator-circle.js",
356
  "pro": false,
357
  "dependencies": [
358
  "wpgmza-modern-store-locator-circle"
359
  ]
360
  },
361
- "wpgmza-ol-modern-store-locator": {
362
- "src": "js\/v8\/open-layers\/ol-modern-store-locator.js",
363
  "pro": false,
364
  "dependencies": [
365
  "wpgmza-modern-store-locator"
366
  ]
367
  },
368
- "wpgmza-ol-polygon": {
369
- "src": "js\/v8\/open-layers\/ol-polygon.js",
370
  "pro": false,
371
  "dependencies": [
372
  "wpgmza-polygon"
373
  ]
374
  },
375
- "wpgmza-ol-polyline": {
376
- "src": "js\/v8\/open-layers\/ol-polyline.js",
377
  "pro": false,
378
  "dependencies": [
379
  "wpgmza-polyline"
380
  ]
381
  },
382
- "wpgmza-ol-text": {
383
- "src": "js\/v8\/open-layers\/ol-text.js",
 
 
 
 
 
 
 
384
  "pro": false,
385
  "dependencies": [
386
  "wpgmza-text"
387
  ]
388
  },
389
- "wpgmza-google-circle": {
390
- "src": "js\/v8\/google-maps\/google-circle.js",
391
  "pro": false,
392
  "dependencies": [
393
- "wpgmza-circle"
394
  ]
395
  },
396
- "wpgmza-google-geocoder": {
397
- "src": "js\/v8\/google-maps\/google-geocoder.js",
398
  "pro": false,
399
  "dependencies": [
400
- "wpgmza-geocoder"
401
  ]
402
  },
403
- "wpgmza-google-html-overlay": {
404
- "src": "js\/v8\/google-maps\/google-html-overlay.js",
405
  "pro": false,
406
  "dependencies": [
407
- "wpgmza"
408
  ]
409
  },
410
- "wpgmza-google-info-window": {
411
- "src": "js\/v8\/google-maps\/google-info-window.js",
412
  "pro": false,
413
  "dependencies": [
414
  "wpgmza-info-window"
415
  ]
416
  },
417
- "wpgmza-google-map": {
418
- "src": "js\/v8\/google-maps\/google-map.js",
419
  "pro": false,
420
  "dependencies": [
421
  "wpgmza-map"
422
  ]
423
  },
424
- "wpgmza-google-marker": {
425
- "src": "js\/v8\/google-maps\/google-marker.js",
426
  "pro": false,
427
  "dependencies": [
428
  "wpgmza-marker"
429
  ]
430
  },
431
- "wpgmza-google-modern-store-locator-circle": {
432
- "src": "js\/v8\/google-maps\/google-modern-store-locator-circle.js",
433
  "pro": false,
434
  "dependencies": [
435
  "wpgmza-modern-store-locator-circle"
436
  ]
437
  },
438
- "wpgmza-google-modern-store-locator": {
439
- "src": "js\/v8\/google-maps\/google-modern-store-locator.js",
440
  "pro": false,
441
  "dependencies": [
442
  "wpgmza-modern-store-locator"
443
  ]
444
  },
445
- "wpgmza-google-polygon": {
446
- "src": "js\/v8\/google-maps\/google-polygon.js",
447
  "pro": false,
448
  "dependencies": [
449
  "wpgmza-polygon"
450
  ]
451
  },
452
- "wpgmza-google-polyline": {
453
- "src": "js\/v8\/google-maps\/google-polyline.js",
454
  "pro": false,
455
  "dependencies": [
456
  "wpgmza-polyline"
457
  ]
458
  },
459
- "wpgmza-google-text-overlay": {
460
- "src": "js\/v8\/google-maps\/google-text-overlay.js",
461
  "pro": false,
462
  "dependencies": [
463
- "wpgmza-google-text"
464
  ]
465
  },
466
- "wpgmza-google-text": {
467
- "src": "js\/v8\/google-maps\/google-text.js",
468
  "pro": false,
469
  "dependencies": [
470
- "wpgmza-text"
471
  ]
472
  },
473
- "wpgmza-google-vertex-context-menu": {
474
- "src": "js\/v8\/google-maps\/google-vertex-context-menu.js",
475
  "pro": false,
476
  "dependencies": [
477
- "wpgmza_api_call"
478
  ]
479
  }
480
  }
270
  "wpgmza"
271
  ]
272
  },
273
+ "wpgmza-integration": {
274
+ "src": "js\/v8\/3rd-party-integration\/integration.js",
 
 
 
 
 
 
 
275
  "pro": false,
276
  "dependencies": [
277
  "wpgmza"
278
  ]
279
  },
280
+ "wpgmza-gutenberg": {
281
+ "src": "js\/v8\/3rd-party-integration\/gutenberg\/dist\/gutenberg.js",
282
  "pro": false,
283
  "dependencies": [
284
+ "wpgmza-integration",
285
+ "wp-i18n",
286
+ "wp-blocks",
287
+ "wp-editor",
288
+ "wp-components"
289
  ]
290
  },
291
+ "wpgmza-astra-theme-compatiblity": {
292
+ "src": "js\/v8\/compatibility\/astra-theme-compatibility.js",
293
  "pro": false,
294
  "dependencies": [
295
  "wpgmza"
296
  ]
297
  },
298
+ "wpgmza-google-ui-compatibility": {
299
+ "src": "js\/v8\/compatibility\/google-ui-compatibility.js",
300
  "pro": false,
301
  "dependencies": [
302
  "wpgmza"
303
  ]
304
  },
305
+ "wpgmza-google-circle": {
306
+ "src": "js\/v8\/google-maps\/google-circle.js",
307
  "pro": false,
308
  "dependencies": [
309
+ "wpgmza-circle"
 
 
 
 
310
  ]
311
  },
312
+ "wpgmza-google-geocoder": {
313
+ "src": "js\/v8\/google-maps\/google-geocoder.js",
314
  "pro": false,
315
  "dependencies": [
316
+ "wpgmza-geocoder"
317
  ]
318
  },
319
+ "wpgmza-google-html-overlay": {
320
+ "src": "js\/v8\/google-maps\/google-html-overlay.js",
321
  "pro": false,
322
  "dependencies": [
323
+ "wpgmza"
324
  ]
325
  },
326
+ "wpgmza-google-info-window": {
327
+ "src": "js\/v8\/google-maps\/google-info-window.js",
328
  "pro": false,
329
  "dependencies": [
330
  "wpgmza-info-window"
331
  ]
332
  },
333
+ "wpgmza-google-map": {
334
+ "src": "js\/v8\/google-maps\/google-map.js",
335
  "pro": false,
336
  "dependencies": [
337
  "wpgmza-map"
338
  ]
339
  },
340
+ "wpgmza-google-marker": {
341
+ "src": "js\/v8\/google-maps\/google-marker.js",
342
  "pro": false,
343
  "dependencies": [
344
  "wpgmza-marker"
345
  ]
346
  },
347
+ "wpgmza-google-modern-store-locator-circle": {
348
+ "src": "js\/v8\/google-maps\/google-modern-store-locator-circle.js",
349
  "pro": false,
350
  "dependencies": [
351
  "wpgmza-modern-store-locator-circle"
352
  ]
353
  },
354
+ "wpgmza-google-modern-store-locator": {
355
+ "src": "js\/v8\/google-maps\/google-modern-store-locator.js",
356
  "pro": false,
357
  "dependencies": [
358
  "wpgmza-modern-store-locator"
359
  ]
360
  },
361
+ "wpgmza-google-polygon": {
362
+ "src": "js\/v8\/google-maps\/google-polygon.js",
363
  "pro": false,
364
  "dependencies": [
365
  "wpgmza-polygon"
366
  ]
367
  },
368
+ "wpgmza-google-polyline": {
369
+ "src": "js\/v8\/google-maps\/google-polyline.js",
370
  "pro": false,
371
  "dependencies": [
372
  "wpgmza-polyline"
373
  ]
374
  },
375
+ "wpgmza-google-text-overlay": {
376
+ "src": "js\/v8\/google-maps\/google-text-overlay.js",
377
+ "pro": false,
378
+ "dependencies": [
379
+ "wpgmza-google-text"
380
+ ]
381
+ },
382
+ "wpgmza-google-text": {
383
+ "src": "js\/v8\/google-maps\/google-text.js",
384
  "pro": false,
385
  "dependencies": [
386
  "wpgmza-text"
387
  ]
388
  },
389
+ "wpgmza-google-vertex-context-menu": {
390
+ "src": "js\/v8\/google-maps\/google-vertex-context-menu.js",
391
  "pro": false,
392
  "dependencies": [
393
+ "wpgmza_api_call"
394
  ]
395
  },
396
+ "wpgmza-ol-circle": {
397
+ "src": "js\/v8\/open-layers\/ol-circle.js",
398
  "pro": false,
399
  "dependencies": [
400
+ "wpgmza-circle"
401
  ]
402
  },
403
+ "wpgmza-ol-geocoder": {
404
+ "src": "js\/v8\/open-layers\/ol-geocoder.js",
405
  "pro": false,
406
  "dependencies": [
407
+ "wpgmza-geocoder"
408
  ]
409
  },
410
+ "wpgmza-ol-info-window": {
411
+ "src": "js\/v8\/open-layers\/ol-info-window.js",
412
  "pro": false,
413
  "dependencies": [
414
  "wpgmza-info-window"
415
  ]
416
  },
417
+ "wpgmza-ol-map": {
418
+ "src": "js\/v8\/open-layers\/ol-map.js",
419
  "pro": false,
420
  "dependencies": [
421
  "wpgmza-map"
422
  ]
423
  },
424
+ "wpgmza-ol-marker": {
425
+ "src": "js\/v8\/open-layers\/ol-marker.js",
426
  "pro": false,
427
  "dependencies": [
428
  "wpgmza-marker"
429
  ]
430
  },
431
+ "wpgmza-ol-modern-store-locator-circle": {
432
+ "src": "js\/v8\/open-layers\/ol-modern-store-locator-circle.js",
433
  "pro": false,
434
  "dependencies": [
435
  "wpgmza-modern-store-locator-circle"
436
  ]
437
  },
438
+ "wpgmza-ol-modern-store-locator": {
439
+ "src": "js\/v8\/open-layers\/ol-modern-store-locator.js",
440
  "pro": false,
441
  "dependencies": [
442
  "wpgmza-modern-store-locator"
443
  ]
444
  },
445
+ "wpgmza-ol-polygon": {
446
+ "src": "js\/v8\/open-layers\/ol-polygon.js",
447
  "pro": false,
448
  "dependencies": [
449
  "wpgmza-polygon"
450
  ]
451
  },
452
+ "wpgmza-ol-polyline": {
453
+ "src": "js\/v8\/open-layers\/ol-polyline.js",
454
  "pro": false,
455
  "dependencies": [
456
  "wpgmza-polyline"
457
  ]
458
  },
459
+ "wpgmza-ol-text": {
460
+ "src": "js\/v8\/open-layers\/ol-text.js",
461
  "pro": false,
462
  "dependencies": [
463
+ "wpgmza-text"
464
  ]
465
  },
466
+ "wpgmza-admin-marker-data-table": {
467
+ "src": "js\/v8\/tables\/admin-marker-datatable.js",
468
  "pro": false,
469
  "dependencies": [
470
+ "wpgmza-data-table"
471
  ]
472
  },
473
+ "wpgmza-data-table": {
474
+ "src": "js\/v8\/tables\/datatable.js",
475
  "pro": false,
476
  "dependencies": [
477
+ "wpgmza"
478
  ]
479
  }
480
  }
js/v8/wp-google-maps.combined.js CHANGED
@@ -2891,8 +2891,7 @@ jQuery(function($) {
2891
  });
2892
  }
2893
 
2894
- $(window).on("load", function(event) {
2895
-
2896
  WPGMZA.mapEditPage = WPGMZA.MapEditPage.createInstance();
2897
 
2898
  });
@@ -4439,7 +4438,7 @@ jQuery(function($) {
4439
  this.element = element;
4440
  }
4441
 
4442
- $(window).on("load", function(event) {
4443
 
4444
  if(WPGMZA.getCurrentPage() == WPGMZA.PAGE_MAP_EDIT)
4445
  WPGMZA.mapEditPage.markerPanel = new WPGMZA.MarkerPanel($("#wpgmza-marker-edit-panel")[0]);
@@ -7139,6 +7138,200 @@ jQuery(function($) {
7139
 
7140
  });
7141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7142
  // js/v8/compatibility/astra-theme-compatibility.js
7143
  /**
7144
  * @namespace WPGMZA
@@ -7148,7 +7341,7 @@ jQuery(function($) {
7148
  */
7149
  jQuery(function($) {
7150
 
7151
- $(window).on("load", function(event) {
7152
 
7153
  var parent = document.body.onclick;
7154
 
@@ -7194,1201 +7387,338 @@ jQuery(function($) {
7194
 
7195
  });
7196
 
7197
- // js/v8/tables/datatable.js
7198
  /**
7199
  * @namespace WPGMZA
7200
- * @module DataTable
7201
- * @requires WPGMZA
7202
  */
7203
  jQuery(function($) {
7204
 
7205
- WPGMZA.DataTable = function(element)
 
 
 
 
 
 
 
 
7206
  {
7207
  var self = this;
7208
- if(!$.fn.dataTable)
 
 
 
7209
  {
7210
- console.warn("The dataTables library is not loaded. Cannot create a dataTable. Did you enable 'Do not enqueue dataTables'?");
7211
-
7212
- if(WPGMZA.settings.wpgmza_do_not_enqueue_datatables && WPGMZA.getCurrentPage() == WPGMZA.PAGE_MAP_EDIT)
7213
- alert("You have selected 'Do not enqueue DataTables' in WP Google Maps' settings. No 3rd party software is loading the DataTables library. Because of this, the marker table cannot load. Please uncheck this option to use the marker table.");
7214
-
7215
- return;
7216
  }
7217
-
7218
- if($.fn.dataTable.ext)
7219
- $.fn.dataTable.ext.errMode = "throw";
7220
  else
7221
  {
7222
- var version = $.fn.dataTable.version ? $.fn.dataTable.version : "unknown";
7223
-
7224
- console.warn("You appear to be running an outdated or modified version of the dataTables library. This may cause issues with table functionality. This is usually caused by 3rd party software loading an older version of DataTables. The loaded version is " + version + ", we recommend version 1.10.12 or above.");
7225
  }
7226
 
7227
- this.element = element;
7228
- this.element.wpgmzaDataTable = this;
7229
- this.dataTableElement = this.getDataTableElement();
7230
-
7231
- var settings = this.getDataTableSettings();
7232
 
7233
- this.phpClass = $(element).attr("data-wpgmza-php-class");
7234
- this.wpgmzaDataTable = this;
 
 
 
 
 
 
 
 
7235
 
7236
- this.useCompressedPathVariable = (WPGMZA.restAPI.isCompressedPathVariableSupported && WPGMZA.settings.enable_compressed_path_variables);
7237
- this.method = (this.useCompressedPathVariable ? "GET" : "POST");
7238
-
7239
- if(this.getLanguageURL() == undefined || this.getLanguageURL() == "//cdn.datatables.net/plug-ins/1.10.12/i18n/English.json")
7240
- {
7241
- this.dataTable = $(this.dataTableElement).DataTable(settings);
7242
- this.dataTable.ajax.reload();
7243
- }
7244
- else{
7245
-
7246
- $.ajax(this.getLanguageURL(), {
7247
-
7248
- success: function(response, status, xhr)
7249
- {
7250
- self.languageJSON = response; // TODO: This doesn't appear to go anywhere
7251
-
7252
- self.dataTable = $(self.dataTableElement).DataTable(settings);
7253
- self.dataTable.ajax.reload();
7254
- },
7255
-
7256
- error: function()
7257
- {
7258
- // TODO: Use complete instead
7259
- self.dataTable = $(self.dataTableElement).DataTable(settings);
7260
- self.dataTable.ajax.reload();
7261
- }
7262
-
7263
- });
7264
- }
7265
  }
7266
 
7267
- WPGMZA.DataTable.prototype.getDataTableElement = function()
7268
  {
7269
- return $(this.element).find("table");
 
 
7270
  }
7271
 
7272
- /**
7273
- * This function wraps the request so it doesn't collide with WP query vars,
7274
- * it also adds the PHP class so that the controller knows which class to
7275
- * instantiate
7276
- * @return object
7277
- */
7278
- WPGMZA.DataTable.prototype.onAJAXRequest = function(data, settings)
7279
  {
7280
- // TODO: Move this to the REST API module and add useCompressedPathVariable
7281
- var params = {
7282
- "phpClass": this.phpClass
7283
- };
7284
-
7285
- var attr = $(this.element).attr("data-wpgmza-ajax-parameters");
7286
- if(attr)
7287
- $.extend(params, JSON.parse(attr));
7288
-
7289
- return $.extend(data, params);
7290
  }
7291
 
7292
- WPGMZA.DataTable.prototype.onDataTableAjaxRequest = function(data, callback, settings) {
7293
- var self = this;
7294
- var element = this.element;
7295
- var route = $(element).attr("data-wpgmza-rest-api-route");
7296
- var params = this.onAJAXRequest(data, settings);
7297
- var draw = params.draw;
7298
 
7299
- delete params.draw;
 
 
7300
 
7301
- if(!route)
7302
- throw new Error("No data-wpgmza-rest-api-route attribute specified");
 
 
 
 
 
 
7303
 
7304
- var options = {
7305
- method: "POST",
7306
- useCompressedPathVariable: true,
7307
- data: params,
7308
- dataType: "json",
7309
- cache: !this.preventCaching,
7310
- beforeSend: function(xhr) {
7311
- // Put draw in header, for compressed requests
7312
- xhr.setRequestHeader("X-DataTables-Draw", draw);
7313
- },
7314
- success: function(response, status, xhr) {
7315
-
7316
- response.draw = draw;
7317
- self.lastResponse = response;
7318
-
7319
- callback(response);
7320
- self.onAJAXResponse(response);
7321
-
7322
- }
7323
- };
7324
 
 
 
 
 
7325
 
 
 
 
 
 
 
 
 
 
7326
 
7327
- return WPGMZA.restAPI.call(route, options);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7328
  }
7329
 
7330
- WPGMZA.DataTable.prototype.getDataTableSettings = function()
 
 
 
7331
  {
7332
- var self = this;
7333
- var element = this.element;
7334
- var options = {};
7335
 
7336
- if($(element).attr("data-wpgmza-datatable-options"))
7337
- options = JSON.parse($(element).attr("data-wpgmza-datatable-options"));
7338
 
7339
- options.deferLoading = true;
7340
- options.processing = true;
7341
- options.serverSide = true;
7342
- options.ajax = function(data, callback, settings) {
7343
- return WPGMZA.DataTable.prototype.onDataTableAjaxRequest.apply(self, arguments);
7344
- }
7345
-
7346
- if(WPGMZA.AdvancedTableDataTable && this instanceof WPGMZA.AdvancedTableDataTable && WPGMZA.settings.wpgmza_default_items)
7347
- options.iDisplayLength = parseInt(WPGMZA.settings.wpgmza_default_items);
7348
 
7349
- options.aLengthMenu = [[5, 10, 25, 50, 100, -1], ["5", "10", "25", "50", "100", WPGMZA.localized_strings.all]];
 
7350
 
7351
- var languageURL = this.getLanguageURL();
7352
- if(languageURL)
7353
- options.language = {
7354
- "url": languageURL
7355
  };
7356
 
7357
- return options;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7358
  }
7359
 
7360
- WPGMZA.DataTable.prototype.getLanguageURL = function()
7361
  {
7362
- if(!WPGMZA.locale)
7363
- return null;
7364
 
7365
- var languageURL;
 
7366
 
7367
- switch(WPGMZA.locale.substr(0, 2))
7368
- {
7369
- case "af":
7370
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Afrikaans.json";
7371
- break;
7372
-
7373
- case "sq":
7374
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Albanian.json";
7375
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
7376
 
7377
- case "am":
7378
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Amharic.json";
7379
- break;
7380
-
7381
- case "ar":
7382
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Arabic.json";
7383
- break;
7384
-
7385
- case "hy":
7386
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Armenian.json";
7387
- break;
7388
-
7389
- case "az":
7390
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Azerbaijan.json";
7391
- break;
7392
-
7393
- case "bn":
7394
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Bangla.json";
7395
- break;
7396
-
7397
- case "eu":
7398
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Basque.json";
7399
- break;
7400
-
7401
- case "be":
7402
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Belarusian.json";
7403
- break;
7404
-
7405
- case "bg":
7406
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Bulgarian.json";
7407
- break;
7408
-
7409
- case "ca":
7410
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Catalan.json";
7411
- break;
7412
-
7413
- case "zh":
7414
- if(WPGMZA.locale == "zh_TW")
7415
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Chinese-traditional.json";
7416
- else
7417
- languageURL = "//cdn.datatables.net/plug-ins/1.10.12/i18n/Chinese.json";
7418
- break;
7419
-
7420
- case "hr":
7421
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Croatian.json";
7422
- break;
7423
-
7424
- case "cs":
7425
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Czech.json";
7426
- break;
7427
-
7428
- case "da":
7429
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Danish.json";
7430
- break;
7431
-
7432
- case "nl":
7433
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Dutch.json";
7434
- break;
7435
-
7436
- /*case "en":
7437
- languageURL = "//cdn.datatables.net/plug-ins/1.10.12/i18n/English.json";
7438
- break;*/
7439
-
7440
- case "et":
7441
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Estonian.json";
7442
- break;
7443
-
7444
- case "fi":
7445
- if(WPGMZA.locale.match(/^fil/))
7446
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Filipino.json";
7447
- else
7448
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Finnish.json";
7449
- break;
7450
-
7451
- case "fr":
7452
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/French.json";
7453
- break;
7454
-
7455
- case "gl":
7456
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Galician.json";
7457
- break;
7458
-
7459
- case "ka":
7460
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Georgian.json";
7461
- break;
7462
-
7463
- case "de":
7464
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/German.json";
7465
- break;
7466
-
7467
- case "el":
7468
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Greek.json";
7469
- break;
7470
-
7471
- case "gu":
7472
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Gujarati.json";
7473
- break;
7474
-
7475
- case "he":
7476
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Hebrew.json";
7477
- break;
7478
-
7479
- case "hi":
7480
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Hindi.json";
7481
- break;
7482
-
7483
- case "hu":
7484
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Hungarian.json";
7485
- break;
7486
-
7487
- case "is":
7488
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Icelandic.json";
7489
- break;
7490
-
7491
- /*case "id":
7492
- languageURL = "//cdn.datatables.net/plug-ins/1.10.12/i18n/Indonesian-Alternative.json";
7493
- break;*/
7494
-
7495
- case "id":
7496
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Indonesian.json";
7497
- break;
7498
-
7499
- case "ga":
7500
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Irish.json";
7501
- break;
7502
-
7503
- case "it":
7504
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Italian.json";
7505
- break;
7506
-
7507
- case "ja":
7508
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Japanese.json";
7509
- break;
7510
-
7511
- case "kk":
7512
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Kazakh.json";
7513
- break;
7514
-
7515
- case "ko":
7516
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Korean.json";
7517
- break;
7518
-
7519
- case "ky":
7520
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Kyrgyz.json";
7521
- break;
7522
-
7523
- case "lv":
7524
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Latvian.json";
7525
- break;
7526
-
7527
- case "lt":
7528
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Lithuanian.json";
7529
- break;
7530
-
7531
- case "mk":
7532
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Macedonian.json";
7533
- break;
7534
-
7535
- case "ml":
7536
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Malay.json";
7537
- break;
7538
-
7539
- case "mn":
7540
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Mongolian.json";
7541
- break;
7542
-
7543
- case "ne":
7544
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Nepali.json";
7545
- break;
7546
-
7547
- case "nb":
7548
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Norwegian-Bokmal.json";
7549
- break;
7550
-
7551
- case "nn":
7552
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Norwegian-Nynorsk.json";
7553
- break;
7554
-
7555
- case "ps":
7556
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Pashto.json";
7557
- break;
7558
-
7559
- case "fa":
7560
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Persian.json";
7561
- break;
7562
-
7563
- case "pl":
7564
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Polish.json";
7565
- break;
7566
-
7567
- case "pt":
7568
- if(WPGMZA.locale == "pt_BR")
7569
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Portuguese-Brasil.json";
7570
- else
7571
- languageURL = "//cdn.datatables.net/plug-ins/1.10.12/i18n/Portuguese.json";
7572
- break;
7573
-
7574
- case "ro":
7575
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Romanian.json";
7576
- break;
7577
-
7578
- case "ru":
7579
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Russian.json";
7580
- break;
7581
-
7582
- case "sr":
7583
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Serbian.json";
7584
- break;
7585
-
7586
- case "si":
7587
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Sinhala.json";
7588
- break;
7589
-
7590
- case "sk":
7591
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Slovak.json";
7592
- break;
7593
-
7594
- case "sl":
7595
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Slovenian.json";
7596
- break;
7597
-
7598
- case "es":
7599
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Spanish.json";
7600
- break;
7601
-
7602
- case "sw":
7603
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Swahili.json";
7604
- break;
7605
-
7606
- case "sv":
7607
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Swedish.json";
7608
- break;
7609
-
7610
- case "ta":
7611
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Tamil.json";
7612
- break;
7613
-
7614
- case "te":
7615
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/telugu.json";
7616
- break;
7617
-
7618
- case "th":
7619
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Thai.json";
7620
- break;
7621
-
7622
- case "tr":
7623
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Turkish.json";
7624
- break;
7625
-
7626
- case "uk":
7627
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Ukrainian.json";
7628
- break;
7629
-
7630
- case "ur":
7631
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Urdu.json";
7632
- break;
7633
-
7634
- case "uz":
7635
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Uzbek.json";
7636
- break;
7637
-
7638
- case "vi":
7639
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Vietnamese.json";
7640
- break;
7641
-
7642
- case "cy":
7643
- languageURL = WPGMZA.pluginDirURL + "languages/datatables/Welsh.json";
7644
- break;
7645
- }
7646
-
7647
- return languageURL;
7648
- }
7649
-
7650
- WPGMZA.DataTable.prototype.onAJAXResponse = function(response)
7651
- {
7652
-
7653
- }
7654
-
7655
- WPGMZA.DataTable.prototype.reload = function()
7656
- {
7657
- this.dataTable.ajax.reload(null, false); // null callback, false for resetPaging
7658
- }
7659
-
7660
- });
7661
-
7662
- // js/v8/tables/admin-marker-datatable.js
7663
- /**
7664
- * @namespace WPGMZA
7665
- * @module AdminMarkerDataTable
7666
- * @requires WPGMZA.DataTable
7667
- */
7668
- jQuery(function($) {
7669
-
7670
- WPGMZA.AdminMarkerDataTable = function(element)
7671
- {
7672
- var self = this;
7673
-
7674
- this.preventCaching = true;
7675
-
7676
- WPGMZA.DataTable.call(this, element);
7677
-
7678
- // NB: Pro marker panel currently manages edit marker buttons
7679
-
7680
- $(element).on("click", "[data-delete-marker-id]", function(event) {
7681
- self.onDeleteMarker(event);
7682
- });
7683
-
7684
- $(element).find(".wpgmza.select_all_markers").on("click", function(event) {
7685
- self.onSelectAll(event);
7686
- });
7687
-
7688
- $(element).find(".wpgmza.bulk_delete").on("click", function(event) {
7689
- self.onBulkDelete(event);
7690
- });
7691
-
7692
- $(element).on("click", "[data-center-marker-id]", function(event) {
7693
- self.onCenterMarker(event);
7694
- });
7695
- }
7696
-
7697
- WPGMZA.AdminMarkerDataTable.prototype = Object.create(WPGMZA.DataTable.prototype);
7698
- WPGMZA.AdminMarkerDataTable.prototype.constructor = WPGMZA.AdminMarkerDataTable;
7699
-
7700
- WPGMZA.AdminMarkerDataTable.createInstance = function(element)
7701
- {
7702
- return new WPGMZA.AdminMarkerDataTable(element);
7703
- }
7704
-
7705
- WPGMZA.AdminMarkerDataTable.prototype.getDataTableSettings = function()
7706
- {
7707
- var self = this;
7708
- var options = WPGMZA.DataTable.prototype.getDataTableSettings.call(this);
7709
-
7710
- options.createdRow = function(row, data, index)
7711
- {
7712
- var meta = self.lastResponse.meta[index];
7713
- row.wpgmzaMarkerData = meta;
7714
- }
7715
-
7716
- return options;
7717
- }
7718
-
7719
- WPGMZA.AdminMarkerDataTable.prototype.onEditMarker = function(event)
7720
- {
7721
- WPGMZA.animatedScroll("#wpgmaps_tabs_markers");
7722
- }
7723
-
7724
- WPGMZA.AdminMarkerDataTable.prototype.onDeleteMarker = function(event)
7725
- {
7726
- var self = this;
7727
- var id = $(event.currentTarget).attr("data-delete-marker-id");
7728
-
7729
- var data = {
7730
- action: 'delete_marker',
7731
- security: WPGMZA.legacyajaxnonce,
7732
- map_id: WPGMZA.mapEditPage.map.id,
7733
- marker_id: id
7734
- };
7735
-
7736
- $.post(ajaxurl, data, function(response) {
7737
-
7738
- WPGMZA.mapEditPage.map.removeMarkerByID(id);
7739
- self.reload();
7740
-
7741
- });
7742
- }
7743
-
7744
- // NB: Move this to UGM
7745
- WPGMZA.AdminMarkerDataTable.prototype.onApproveMarker = function(event)
7746
- {
7747
- var self = this;
7748
- var cur_id = $(this).attr("id");
7749
-
7750
- var data = {
7751
- action: 'approve_marker',
7752
- security: WPGMZA.legacyajaxnonce,
7753
- map_id: WPGMZA.mapEditPage.map.id,
7754
- marker_id: cur_id
7755
- };
7756
- $.post(ajaxurl, data, function (response) {
7757
-
7758
-
7759
- wpgmza_InitMap();
7760
- wpgmza_reinitialisetbl();
7761
-
7762
- });
7763
- }
7764
-
7765
- WPGMZA.AdminMarkerDataTable.prototype.onSelectAll = function(event)
7766
- {
7767
- $(this.element).find("input[name='mark']").prop("checked", true);
7768
- }
7769
-
7770
- WPGMZA.AdminMarkerDataTable.prototype.onBulkDelete = function(event)
7771
- {
7772
- var self = this;
7773
- var ids = [];
7774
- var map = WPGMZA.maps[0];
7775
-
7776
- $(this.element).find("input[name='mark']:checked").each(function(index, el) {
7777
- var row = $(el).closest("tr")[0];
7778
- ids.push(row.wpgmzaMarkerData.id);
7779
- });
7780
-
7781
- ids.forEach(function(marker_id) {
7782
- var marker = map.getMarkerByID(marker_id);
7783
-
7784
- if(marker)
7785
- map.removeMarker(marker);
7786
- });
7787
-
7788
- WPGMZA.restAPI.call("/markers/", {
7789
- method: "DELETE",
7790
- data: {
7791
- ids: ids
7792
- },
7793
- complete: function() {
7794
- self.reload();
7795
- }
7796
- });
7797
- }
7798
-
7799
- WPGMZA.AdminMarkerDataTable.prototype.onCenterMarker = function(event)
7800
- {
7801
- var id;
7802
-
7803
- //Check if we have selected the center on marker button or called this function elsewhere
7804
- if(event.currentTarget == undefined)
7805
- {
7806
- id = event;
7807
- }
7808
- else{
7809
- id = $(event.currentTarget).attr("data-center-marker-id");
7810
- }
7811
-
7812
- var marker = WPGMZA.mapEditPage.map.getMarkerByID(id);
7813
-
7814
- if(marker){
7815
- var latLng = new WPGMZA.LatLng({
7816
- lat: marker.lat,
7817
- lng: marker.lng
7818
- });
7819
-
7820
- //Set a static zoom level
7821
- var zoom_value = 6;
7822
- WPGMZA.mapEditPage.map.setCenter(latLng);
7823
- WPGMZA.mapEditPage.map.setZoom(zoom_value);
7824
- WPGMZA.animateScroll("#wpgmaps_tabs_markers");
7825
- }
7826
-
7827
-
7828
- }
7829
-
7830
- $(document).ready(function(event) {
7831
-
7832
- $("[data-wpgmza-admin-marker-datatable]").each(function(index, el) {
7833
- WPGMZA.adminMarkerDataTable = WPGMZA.AdminMarkerDataTable.createInstance(el);
7834
- });
7835
-
7836
- });
7837
-
7838
- });
7839
-
7840
- // js/v8/3rd-party-integration/integration.js
7841
- /**
7842
- * @namespace WPGMZA
7843
- * @module Integration
7844
- * @requires WPGMZA
7845
- */
7846
- jQuery(function($) {
7847
-
7848
- WPGMZA.Integration = {};
7849
- WPGMZA.integrationModules = {};
7850
-
7851
- });
7852
-
7853
- // js/v8/3rd-party-integration/gutenberg/dist/gutenberg.js
7854
- "use strict";
7855
-
7856
- /**
7857
- * @namespace WPGMZA.Integration
7858
- * @module Gutenberg
7859
- * @requires WPGMZA.Integration
7860
- * @requires wp-i18n
7861
- * @requires wp-blocks
7862
- * @requires wp-editor
7863
- * @requires wp-components
7864
- */
7865
-
7866
- /**
7867
- * Internal block libraries
7868
- */
7869
- jQuery(function ($) {
7870
-
7871
- if (!window.wp || !wp.i18n || !wp.blocks || !wp.editor || !wp.components) return;
7872
-
7873
- var __ = wp.i18n.__;
7874
- var registerBlockType = wp.blocks.registerBlockType;
7875
- var _wp$editor = wp.editor,
7876
- InspectorControls = _wp$editor.InspectorControls,
7877
- BlockControls = _wp$editor.BlockControls;
7878
- var _wp$components = wp.components,
7879
- Dashicon = _wp$components.Dashicon,
7880
- Toolbar = _wp$components.Toolbar,
7881
- Button = _wp$components.Button,
7882
- Tooltip = _wp$components.Tooltip,
7883
- PanelBody = _wp$components.PanelBody,
7884
- TextareaControl = _wp$components.TextareaControl,
7885
- CheckboxControl = _wp$components.CheckboxControl,
7886
- TextControl = _wp$components.TextControl,
7887
- SelectControl = _wp$components.SelectControl,
7888
- RichText = _wp$components.RichText;
7889
-
7890
-
7891
- WPGMZA.Integration.Gutenberg = function () {
7892
- registerBlockType('gutenberg-wpgmza/block', this.getBlockDefinition());
7893
- };
7894
-
7895
- WPGMZA.Integration.Gutenberg.prototype.getBlockTitle = function () {
7896
- return __("WP Google Maps");
7897
- };
7898
-
7899
- WPGMZA.Integration.Gutenberg.prototype.getBlockInspectorControls = function (props) {
7900
-
7901
- /*
7902
- <TextControl
7903
- name="overrideWidthAmount"
7904
- label={__("Override Width Amount")}
7905
- checked={props.overrideWidthAmount}
7906
- onChange={onPropertiesChanged}
7907
- />
7908
-
7909
- <SelectControl
7910
- name="overrideWidthUnits"
7911
- label={__("Override Width Units")}
7912
- options={[
7913
- {value: "px", label: "px"},
7914
- {value: "%", label: "%"},
7915
- {value: "vw`", label: "vw"},
7916
- {value: "vh", label: "vh"}
7917
- ]}
7918
- onChange={onPropertiesChanged}
7919
- />
7920
-
7921
- <CheckboxControl
7922
- name="overrideHeight"
7923
- label={__("Override Height")}
7924
- checked={props.overrideWidth}
7925
- onChange={onPropertiesChanged}
7926
- />
7927
-
7928
- <TextControl
7929
- name="overrideHeightAmount"
7930
- label={__("Override Height Amount")}
7931
- checked={props.overrideWidthAmount}
7932
- onChange={onPropertiesChanged}
7933
- />
7934
-
7935
- <SelectControl
7936
- name="overrideHeightUnits"
7937
- label={__("Override Height Units")}
7938
- options={[
7939
- {value: "px", label: "px"},
7940
- {value: "%", label: "%"},
7941
- {value: "vw`", label: "vw"},
7942
- {value: "vh", label: "vh"}
7943
- ]}
7944
- onChange={onPropertiesChanged}
7945
- />
7946
- */
7947
-
7948
- var onOverrideWidthCheckboxChanged = function onOverrideWidthCheckboxChanged(value) {};
7949
-
7950
- return React.createElement(
7951
- InspectorControls,
7952
- { key: "inspector" },
7953
- React.createElement(
7954
- PanelBody,
7955
- { title: __('Map Settings') },
7956
- React.createElement(
7957
- "p",
7958
- { "class": "map-block-gutenberg-button-container" },
7959
- React.createElement(
7960
- "a",
7961
- { href: WPGMZA.adminurl + "admin.php?page=wp-google-maps-menu&action=edit&map_id=1",
7962
- target: "_blank",
7963
- "class": "button button-primary" },
7964
- React.createElement("i", { "class": "fa fa-pencil-square-o", "aria-hidden": "true" }),
7965
- __('Go to Map Editor')
7966
- )
7967
- ),
7968
- React.createElement(
7969
- "p",
7970
- { "class": "map-block-gutenberg-button-container" },
7971
- React.createElement(
7972
- "a",
7973
- { href: "https://www.wpgmaps.com/documentation/creating-your-first-map/",
7974
- target: "_blank",
7975
- "class": "button button-primary" },
7976
- React.createElement("i", { "class": "fa fa-book", "aria-hidden": "true" }),
7977
- __('View Documentation')
7978
- )
7979
- )
7980
- )
7981
- );
7982
- };
7983
-
7984
- WPGMZA.Integration.Gutenberg.prototype.getBlockAttributes = function () {
7985
- return {};
7986
- };
7987
-
7988
- WPGMZA.Integration.Gutenberg.prototype.getBlockDefinition = function (props) {
7989
- var _this = this;
7990
-
7991
- return {
7992
-
7993
- title: __("WP Google Maps"),
7994
- description: __('The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.'),
7995
- category: 'common',
7996
- icon: 'location-alt',
7997
- keywords: [__('Map'), __('Maps'), __('Google')],
7998
- attributes: this.getBlockAttributes(),
7999
-
8000
- edit: function edit(props) {
8001
- return [!!props.isSelected && _this.getBlockInspectorControls(props), React.createElement(
8002
- "div",
8003
- { className: props.className + " wpgmza-gutenberg-block" },
8004
- React.createElement(Dashicon, { icon: "location-alt" }),
8005
- React.createElement(
8006
- "span",
8007
- { "class": "wpgmza-gutenberg-block-title" },
8008
- __("Your map will appear here on your websites front end")
8009
- )
8010
- )];
8011
- },
8012
- // Defining the front-end interface
8013
- save: function save(props) {
8014
- // Rendering in PHP
8015
- return null;
8016
- }
8017
-
8018
- };
8019
- };
8020
-
8021
- WPGMZA.Integration.Gutenberg.getConstructor = function () {
8022
- return WPGMZA.Integration.Gutenberg;
8023
- };
8024
-
8025
- WPGMZA.Integration.Gutenberg.createInstance = function () {
8026
- var constructor = WPGMZA.Integration.Gutenberg.getConstructor();
8027
- return new constructor();
8028
- };
8029
-
8030
- // Allow the Pro module to extend and create the module, only create here when Pro isn't loaded
8031
- if(!WPGMZA.isProVersion() && !(/^6/.test(WPGMZA.pro_version))) WPGMZA.integrationModules.gutenberg = WPGMZA.Integration.Gutenberg.createInstance();
8032
- });
8033
-
8034
- // js/v8/open-layers/ol-circle.js
8035
- /**
8036
- * @namespace WPGMZA
8037
- * @module OLCircle
8038
- * @requires WPGMZA.Circle
8039
- */
8040
- jQuery(function($) {
8041
-
8042
- var Parent = WPGMZA.Circle;
8043
-
8044
- WPGMZA.OLCircle = function(options, olFeature)
8045
- {
8046
- var self = this;
8047
-
8048
- this.center = {lat: 0, lng: 0};
8049
- this.radius = 0;
8050
-
8051
- this.fillcolor = "#ff0000";
8052
- this.opacity = 0.6;
8053
-
8054
- Parent.call(this, options, olFeature);
8055
-
8056
- this.olStyle = new ol.style.Style(this.getStyleFromSettings());
8057
-
8058
- this.vectorLayer3857 = this.layer = new ol.layer.Vector({
8059
- source: new ol.source.Vector(),
8060
- style: this.olStyle
8061
- });
8062
-
8063
- if(olFeature)
8064
- this.olFeature = olFeature;
8065
- else
8066
- this.recreate();
8067
- }
8068
-
8069
- WPGMZA.OLCircle.prototype = Object.create(Parent.prototype);
8070
- WPGMZA.OLCircle.prototype.constructor = WPGMZA.OLCircle;
8071
-
8072
- WPGMZA.OLCircle.prototype.recreate = function()
8073
- {
8074
- if(this.olFeature)
8075
- {
8076
- this.layer.getSource().removeFeature(this.olFeature);
8077
- delete this.olFeature;
8078
- }
8079
-
8080
- if(!this.center || !this.radius)
8081
- return;
8082
-
8083
- // IMPORTANT: Please note that due to what appears to be a bug in OpenLayers, the following code MUST be exected specifically in this order, or the circle won't appear
8084
- var radius = parseFloat(this.radius) * 1000 / 2;
8085
- var x, y;
8086
-
8087
- x = this.center.lng;
8088
- y = this.center.lat;
8089
-
8090
- var circle4326 = ol.geom.Polygon.circular([x, y], radius, 64);
8091
- var circle3857 = circle4326.clone().transform('EPSG:4326', 'EPSG:3857');
8092
-
8093
- this.olFeature = new ol.Feature(circle3857);
8094
-
8095
- this.layer.getSource().addFeature(this.olFeature);
8096
- }
8097
-
8098
- WPGMZA.OLCircle.prototype.getStyleFromSettings = function()
8099
- {
8100
- var params = {};
8101
-
8102
- /*if(this.settings.strokeOpacity)
8103
- params.stroke = new ol.style.Stroke({
8104
- color: WPGMZA.hexOpacityToRGBA(this.settings.strokeColor, this.settings.strokeOpacity)
8105
- });*/
8106
-
8107
- if(this.opacity)
8108
- params.fill = new ol.style.Fill({
8109
- color: WPGMZA.hexOpacityToRGBA(this.fillColor, this.opacity)
8110
- });
8111
-
8112
- return params;
8113
- }
8114
-
8115
- WPGMZA.OLCircle.prototype.updateStyleFromSettings = function()
8116
- {
8117
- // Re-create the style - working on it directly doesn't cause a re-render
8118
- var params = this.getStyleFromSettings();
8119
- this.olStyle = new ol.style.Style(params);
8120
- this.layer.setStyle(this.olStyle);
8121
- }
8122
-
8123
- WPGMZA.OLCircle.prototype.setVisible = function(visible)
8124
- {
8125
- this.layer.setVisible(visible ? true : false);
8126
- }
8127
-
8128
- WPGMZA.OLCircle.prototype.setCenter = function(center)
8129
- {
8130
- WPGMZA.Circle.prototype.setCenter.apply(this, arguments);
8131
-
8132
- this.recreate();
8133
- }
8134
-
8135
- WPGMZA.OLCircle.prototype.setRadius = function(radius)
8136
- {
8137
- WPGMZA.Circle.prototype.setRadius.apply(this, arguments);
8138
-
8139
- this.recreate();
8140
- }
8141
-
8142
- });
8143
-
8144
- // js/v8/open-layers/ol-geocoder.js
8145
  /**
8146
  * @namespace WPGMZA
8147
- * @module OLGeocoder
8148
- * @requires WPGMZA.Geocoder
8149
  */
8150
  jQuery(function($) {
8151
 
8152
- /**
8153
- * @class OLGeocoder
8154
- * @extends Geocoder
8155
- * @summary OpenLayers geocoder - uses Nominatim by default
8156
- */
8157
- WPGMZA.OLGeocoder = function()
8158
- {
8159
-
8160
- }
8161
 
8162
- WPGMZA.OLGeocoder.prototype = Object.create(WPGMZA.Geocoder.prototype);
8163
- WPGMZA.OLGeocoder.prototype.constructor = WPGMZA.OLGeocoder;
8164
 
8165
- /**
8166
- * @function getResponseFromCache
8167
- * @access protected
8168
- * @summary Tries to retrieve cached coordinates from server cache
8169
- * @param {string} address The street address to geocode
8170
- * @param {function} callback Where to send the results, as an array
8171
- * @return {void}
8172
- */
8173
- WPGMZA.OLGeocoder.prototype.getResponseFromCache = function(query, callback)
8174
- {
8175
- WPGMZA.restAPI.call("/geocode-cache", {
8176
- data: {
8177
- query: JSON.stringify(query)
8178
- },
8179
- success: function(response, xhr, status) {
8180
- // Legacy compatibility support
8181
- response.lng = response.lon;
8182
-
8183
- callback(response);
8184
- },
8185
- useCompressedPathVariable: true
8186
- });
8187
-
8188
- /*$.ajax(WPGMZA.ajaxurl, {
8189
- data: {
8190
- action: "wpgmza_query_nominatim_cache",
8191
- query: JSON.stringify(query)
8192
- },
8193
- success: function(response, xhr, status) {
8194
- // Legacy compatibility support
8195
- response.lng = response.lon;
8196
-
8197
- callback(response);
8198
- }
8199
- });*/
8200
- }
8201
 
8202
- /**
8203
- * @function getResponseFromNominatim
8204
- * @access protected
8205
- * @summary Queries Nominatim on the specified address
8206
- * @param {object} options An object containing the options for geocoding, address is a mandatory field
8207
- * @param {function} callback The function to send the results to, as an array
8208
- */
8209
- WPGMZA.OLGeocoder.prototype.getResponseFromNominatim = function(options, callback)
8210
  {
8211
- var data = {
8212
- q: options.address,
8213
- format: "json"
8214
- };
8215
 
8216
- if(options.componentRestrictions && options.componentRestrictions.country)
8217
- data.countrycodes = options.componentRestrictions.country;
8218
 
8219
- $.ajax("https://nominatim.openstreetmap.org/search/", {
8220
- data: data,
8221
- success: function(response, xhr, status) {
8222
- callback(response);
8223
- },
8224
- error: function(response, xhr, status) {
8225
- callback(null, WPGMZA.Geocoder.FAIL)
8226
- }
8227
- });
8228
  }
8229
 
8230
- /**
8231
- * @function cacheResponse
8232
- * @access protected
8233
- * @summary Caches a response on the server, usually after it's been returned from Nominatim
8234
- * @param {string} address The street address
8235
- * @param {object|array} response The response to cache
8236
- * @returns {void}
8237
- */
8238
- WPGMZA.OLGeocoder.prototype.cacheResponse = function(query, response)
8239
- {
8240
- $.ajax(WPGMZA.ajaxurl, {
8241
- data: {
8242
- action: "wpgmza_store_nominatim_cache",
8243
- query: JSON.stringify(query),
8244
- response: JSON.stringify(response)
8245
- },
8246
- method: "POST"
8247
- });
8248
- }
8249
-
8250
- /**
8251
- * @function clearCache
8252
- * @access protected
8253
- * @summary Clears the Nomanatim geocode cache
8254
- * @returns {void}
8255
- */
8256
- WPGMZA.OLGeocoder.prototype.clearCache = function(callback)
8257
  {
8258
- $.ajax(WPGMZA.ajaxurl, {
8259
- data: {
8260
- action: "wpgmza_clear_nominatim_cache"
8261
- },
8262
- method: "POST",
8263
- success: function(response){
8264
- callback(response);
8265
- }
8266
- });
8267
  }
8268
 
8269
- WPGMZA.OLGeocoder.prototype.getLatLngFromAddress = function(options, callback)
8270
  {
8271
- return WPGMZA.OLGeocoder.prototype.geocode(options, callback);
 
 
 
 
8272
  }
8273
 
8274
- WPGMZA.OLGeocoder.prototype.getAddressFromLatLng = function(options, callback)
8275
  {
8276
- return WPGMZA.OLGeocoder.prototype.geocode(options, callback);
8277
  }
8278
 
8279
- WPGMZA.OLGeocoder.prototype.geocode = function(options, callback)
8280
  {
8281
- var self = this;
8282
-
8283
- if(!options)
8284
- throw new Error("Invalid options");
8285
-
8286
- if(WPGMZA.LatLng.REGEXP.test(options.address))
8287
- {
8288
- var latLng = WPGMZA.LatLng.fromString(options.address);
8289
-
8290
- callback([{
8291
- geometry: {
8292
- location: latLng
8293
- },
8294
- latLng: latLng,
8295
- lat: latLng.lat,
8296
- lng: latLng.lng
8297
- }], WPGMZA.Geocoder.SUCCESS);
8298
-
8299
- return;
8300
- }
8301
-
8302
- if(options.location)
8303
- options.latLng = new WPGMZA.LatLng(options.location);
8304
-
8305
- var finish, location;
8306
-
8307
- if(options.address)
8308
- {
8309
- location = options.address;
8310
-
8311
- finish = function(response, status)
8312
- {
8313
- for(var i = 0; i < response.length; i++)
8314
- {
8315
- response[i].geometry = {
8316
- location: new WPGMZA.LatLng({
8317
- lat: parseFloat(response[i].lat),
8318
- lng: parseFloat(response[i].lon)
8319
- })
8320
- };
8321
-
8322
- response[i].latLng = {
8323
- lat: parseFloat(response[i].lat),
8324
- lng: parseFloat(response[i].lon)
8325
- };
8326
-
8327
- response[i].bounds = new WPGMZA.LatLngBounds(
8328
- new WPGMZA.LatLng({
8329
- lat: response[i].boundingbox[1],
8330
- lng: response[i].boundingbox[2]
8331
- }),
8332
- new WPGMZA.LatLng({
8333
- lat: response[i].boundingbox[0],
8334
- lng: response[i].boundingbox[3]
8335
- })
8336
- );
8337
-
8338
- // Backward compatibility with old UGM
8339
- response[i].lng = response[i].lon;
8340
- }
8341
-
8342
- callback(response, status);
8343
- }
8344
- }
8345
- else if(options.latLng)
8346
- {
8347
- location = options.latLng.toString();
8348
-
8349
- finish = function(response, status)
8350
- {
8351
- var address = response[0].display_name;
8352
- callback([address], status);
8353
- }
8354
- }
8355
- else
8356
- throw new Error("You must supply either a latLng or address")
8357
 
8358
- var query = {location: location, options: options};
8359
- this.getResponseFromCache(query, function(response) {
8360
- if(response.length)
8361
- {
8362
- finish(response, WPGMZA.Geocoder.SUCCESS);
8363
- return;
8364
- }
8365
-
8366
- self.getResponseFromNominatim($.extend(options, {address: location}), function(response, status) {
8367
- if(status == WPGMZA.Geocoder.FAIL)
8368
- {
8369
- callback(null, WPGMZA.Geocoder.FAIL);
8370
- return;
8371
- }
8372
-
8373
- if(response.length == 0)
8374
- {
8375
- callback([], WPGMZA.Geocoder.ZERO_RESULTS);
8376
- return;
8377
- }
8378
-
8379
- finish(response, WPGMZA.Geocoder.SUCCESS);
8380
-
8381
- self.cacheResponse(query, response);
8382
- });
8383
  });
 
 
 
 
 
8384
  }
8385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8386
  });
8387
 
8388
- // js/v8/open-layers/ol-info-window.js
8389
  /**
8390
  * @namespace WPGMZA
8391
- * @module OLInfoWindow
8392
  * @requires WPGMZA.InfoWindow
8393
  * @pro-requires WPGMZA.ProInfoWindow
8394
  */
@@ -8396,454 +7726,546 @@ jQuery(function($) {
8396
 
8397
  var Parent;
8398
 
8399
- WPGMZA.OLInfoWindow = function(mapObject)
8400
  {
8401
- var self = this;
8402
-
8403
  Parent.call(this, mapObject);
8404
 
8405
- this.element = $("<div class='wpgmza-infowindow ol-info-window-container ol-info-window-plain'></div>")[0];
8406
-
8407
- $(this.element).on("click", ".ol-info-window-close", function(event) {
8408
- self.close();
8409
- });
8410
  }
8411
 
 
 
8412
  if(WPGMZA.isProVersion())
8413
  Parent = WPGMZA.ProInfoWindow;
8414
  else
8415
  Parent = WPGMZA.InfoWindow;
8416
 
8417
- WPGMZA.OLInfoWindow.prototype = Object.create(Parent.prototype);
8418
- WPGMZA.OLInfoWindow.prototype.constructor = WPGMZA.OLInfoWindow;
8419
 
8420
- Object.defineProperty(WPGMZA.OLInfoWindow.prototype, "isPanIntoViewAllowed", {
 
 
 
 
 
 
 
 
 
 
 
 
8421
 
8422
- "get": function()
8423
- {
8424
- return true;
8425
- }
8426
 
8427
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8428
 
8429
  /**
8430
  * Opens the info window
8431
- * TODO: This should take a mapObject, not an event
8432
  * @return boolean FALSE if the info window should not & will not open, TRUE if it will
8433
  */
8434
- WPGMZA.OLInfoWindow.prototype.open = function(map, mapObject)
8435
  {
8436
  var self = this;
8437
- var latLng = mapObject.getPosition();
8438
 
8439
  if(!Parent.prototype.open.call(this, map, mapObject))
8440
  return false;
8441
 
8442
- // Set parent for events to bubble up
8443
  this.parent = map;
8444
 
8445
- if(this.overlay)
8446
- this.mapObject.map.olMap.removeOverlay(this.overlay);
8447
-
8448
- this.overlay = new ol.Overlay({
8449
- element: this.element,
8450
- stopEvent: false
8451
- });
 
 
 
 
 
 
8452
 
8453
- this.overlay.setPosition(ol.proj.fromLonLat([
8454
- latLng.lng,
8455
- latLng.lat
8456
- ]));
8457
- self.mapObject.map.olMap.addOverlay(this.overlay);
8458
 
8459
- $(this.element).show();
 
 
 
8460
 
8461
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
8462
- {
8463
- WPGMZA.getImageDimensions(mapObject.getIcon(), function(size) {
 
 
 
 
 
8464
 
8465
- $(self.element).css({left: Math.round(size.width / 2) + "px"});
 
8466
 
8467
- });
8468
- }
 
 
 
8469
 
8470
- this.trigger("infowindowopen");
8471
- this.trigger("domready");
8472
  }
8473
 
8474
- WPGMZA.OLInfoWindow.prototype.close = function(event)
8475
  {
8476
- // TODO: Why? This shouldn't have to be here. Removing the overlay should hide the element (it doesn't)
8477
- $(this.element).hide();
8478
-
8479
- if(!this.overlay)
8480
  return;
8481
 
8482
  WPGMZA.InfoWindow.prototype.close.call(this);
8483
 
8484
- this.trigger("infowindowclose");
8485
-
8486
- this.mapObject.map.olMap.removeOverlay(this.overlay);
8487
- this.overlay = null;
8488
- }
8489
-
8490
- WPGMZA.OLInfoWindow.prototype.setContent = function(html)
8491
- {
8492
- $(this.element).html("<i class='fa fa-times ol-info-window-close' aria-hidden='true'></i>" + html);
8493
- }
8494
-
8495
- WPGMZA.OLInfoWindow.prototype.setOptions = function(options)
8496
- {
8497
- if(options.maxWidth)
8498
- {
8499
- $(this.element).css({"max-width": options.maxWidth + "px"});
8500
- }
8501
  }
8502
 
8503
- WPGMZA.OLInfoWindow.prototype.onOpen = function()
8504
- {
8505
- var self = this;
8506
- var imgs = $(this.element).find("img");
8507
- var numImages = imgs.length;
8508
- var numImagesLoaded = 0;
8509
-
8510
- WPGMZA.InfoWindow.prototype.onOpen.apply(this, arguments);
8511
-
8512
- if(this.isPanIntoViewAllowed)
8513
- {
8514
- function inside(el, viewport)
8515
- {
8516
- var a = $(el)[0].getBoundingClientRect();
8517
- var b = $(viewport)[0].getBoundingClientRect();
8518
-
8519
- return a.left >= b.left && a.left <= b.right &&
8520
- a.right <= b.right && a.right >= b.left &&
8521
- a.top >= b.top && a.top <= b.bottom &&
8522
- a.bottom <= b.bottom && a.bottom >= b.top;
8523
- }
8524
-
8525
- function panIntoView()
8526
- {
8527
- var height = $(self.element).height();
8528
- var offset = -height * 0.45;
8529
-
8530
- self.mapObject.map.animateNudge(0, offset, self.mapObject.getPosition());
8531
- }
8532
-
8533
- imgs.each(function(index, el) {
8534
- el.onload = function() {
8535
- if(++numImagesLoaded == numImages && !inside(self.element, self.mapObject.map.element))
8536
- panIntoView();
8537
- }
8538
- });
8539
-
8540
- if(numImages == 0 && !inside(self.element, self.mapObject.map.element))
8541
- panIntoView();
8542
- }
8543
  }
8544
 
8545
  });
8546
 
8547
- // js/v8/open-layers/ol-map.js
8548
  /**
8549
  * @namespace WPGMZA
8550
- * @module OLMap
8551
  * @requires WPGMZA.Map
8552
  * @pro-requires WPGMZA.ProMap
8553
  */
8554
  jQuery(function($) {
8555
-
8556
  var Parent;
8557
 
8558
- WPGMZA.OLMap = function(element, options)
 
 
 
 
8559
  {
8560
  var self = this;
8561
 
8562
- Parent.call(this, element);
8563
 
8564
- this.setOptions(options);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8565
 
8566
- var viewOptions = this.settings.toOLViewOptions();
8567
 
8568
- $(this.element).html("");
 
 
 
 
 
 
 
 
 
 
8569
 
8570
- this.olMap = new ol.Map({
8571
- target: $(element)[0],
8572
- layers: [
8573
- this.getTileLayer()
8574
- ],
8575
- view: new ol.View(viewOptions)
 
8576
  });
8577
 
8578
- // TODO: Re-implement using correct setting names
8579
- // Interactions
8580
- this.olMap.getInteractions().forEach(function(interaction) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8581
 
8582
- // NB: The true and false values are flipped because these settings represent the "disabled" state when true
8583
- if(interaction instanceof ol.interaction.DragPan)
8584
- interaction.setActive( (self.settings.wpgmza_settings_map_draggable == "yes" ? false : true) );
8585
- else if(interaction instanceof ol.interaction.DoubleClickZoom)
8586
- interaction.setActive( (self.settings.wpgmza_settings_map_clickzoom ? false : true) );
8587
- else if(interaction instanceof ol.interaction.MouseWheelZoom)
8588
- interaction.setActive( (self.settings.wpgmza_settings_map_scroll == "yes" ? false : true) );
8589
 
8590
- }, this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8591
 
8592
- // Cooperative gesture handling
8593
- if(!(this.settings.wpgmza_force_greedy_gestures == "greedy" || this.settings.wpgmza_force_greedy_gestures == "yes"))
8594
- {
8595
- this.gestureOverlay = $("<div class='wpgmza-gesture-overlay'></div>")
8596
- this.gestureOverlayTimeoutID = null;
8597
 
8598
- if(WPGMZA.isTouchDevice())
8599
- {
8600
- // On touch devices, require two fingers to drag and pan
8601
- // NB: Temporarily removed due to inconsistent behaviour
8602
- /*this.olMap.getInteractions().forEach(function(interaction) {
8603
-
8604
- if(interaction instanceof ol.interaction.DragPan)
8605
- self.olMap.removeInteraction(interaction);
8606
-
8607
- });
8608
 
8609
- this.olMap.addInteraction(new ol.interaction.DragPan({
 
 
 
 
 
 
 
 
 
 
 
8610
 
8611
- condition: function(olBrowserEvent) {
8612
-
8613
- var allowed = olBrowserEvent.originalEvent.touches.length == 2;
8614
-
8615
- if(!allowed)
8616
- self.showGestureOverlay();
8617
-
8618
- return allowed;
8619
- }
8620
 
8621
- }));
8622
-
8623
- this.gestureOverlay.text(WPGMZA.localized_strings.use_two_fingers);*/
8624
- }
8625
- else
8626
- {
8627
- // On desktops, require Ctrl + zoom to zoom, show an overlay if that condition is not met
8628
- this.olMap.on("wheel", function(event) {
8629
 
8630
- if(!ol.events.condition.platformModifierKeyOnly(event))
8631
- {
8632
- self.showGestureOverlay();
8633
- event.originalEvent.preventDefault();
8634
- return false;
8635
- }
8636
 
8637
- });
8638
 
8639
- this.gestureOverlay.text(WPGMZA.localized_strings.use_ctrl_scroll_to_zoom);
8640
  }
8641
- }
8642
-
8643
- // Controls
8644
- this.olMap.getControls().forEach(function(control) {
8645
-
8646
- // NB: The true and false values are flipped because these settings represent the "disabled" state when true
8647
- if(control instanceof ol.control.Zoom && WPGMZA.settings.wpgmza_settings_map_zoom == "yes")
8648
- self.olMap.removeControl(control);
8649
-
8650
- }, this);
8651
-
8652
- if(WPGMZA.settings.wpgmza_settings_map_full_screen_control != "yes")
8653
- this.olMap.addControl(new ol.control.FullScreen());
8654
-
8655
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
8656
- {
8657
- // Marker layer
8658
- this.markerLayer = new ol.layer.Vector({
8659
- source: new ol.source.Vector({
8660
- features: []
8661
- })
8662
- });
8663
- this.olMap.addLayer(this.markerLayer);
8664
 
8665
- this.olMap.on("click", function(event) {
8666
- var features = self.olMap.getFeaturesAtPixel(event.pixel);
8667
-
8668
- if(!features || !features.length)
8669
- return;
8670
-
8671
- var marker = features[0].wpgmzaMarker;
8672
-
8673
- if(!marker)
8674
- return;
8675
-
8676
- marker.trigger("click");
8677
- marker.trigger("select");
8678
- });
8679
  }
8680
 
8681
- // Listen for drag start
8682
- this.olMap.on("movestart", function(event) {
8683
- self.isBeingDragged = true;
8684
- });
8685
-
8686
- // Listen for end of pan so we can wrap longitude if needs be
8687
- this.olMap.on("moveend", function(event) {
8688
- self.wrapLongitude();
8689
-
8690
- self.isBeingDragged = false;
8691
- self.dispatchEvent("dragend");
8692
- self.onIdle();
8693
- });
8694
-
8695
- // Listen for zoom
8696
- this.olMap.getView().on("change:resolution", function(event) {
8697
- self.dispatchEvent("zoom_changed");
8698
- self.dispatchEvent("zoomchanged");
8699
- setTimeout(function() {
8700
- self.onIdle();
8701
- }, 10);
8702
- });
8703
 
8704
- // Listen for bounds changing
8705
- this.olMap.getView().on("change", function() {
8706
- // Wrap longitude
8707
  self.onBoundsChanged();
8708
  });
8709
- self.onBoundsChanged();
8710
 
8711
- // Store locator center
8712
- var marker;
8713
- if(this.storeLocator && (marker = this.storeLocator.centerPointMarker))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8714
  {
8715
- this.olMap.addOverlay(marker.overlay);
8716
- marker.setVisible(false);
8717
  }
8718
 
8719
- // Right click listener
8720
- $(this.element).on("click contextmenu", function(event) {
8721
-
8722
- var isRight;
8723
- event = event || window.event;
8724
-
8725
- var latLng = self.pixelsToLatLng(event.offsetX, event.offsetY);
8726
-
8727
- if("which" in event)
8728
- isRight = event.which == 3;
8729
- else if("button" in event)
8730
- isRight = event.button == 2;
8731
-
8732
- if(event.which == 1 || event.button == 1)
8733
- {
8734
- if(self.isBeingDragged)
8735
- return;
8736
-
8737
- // Left click
8738
- if($(event.target).closest(".ol-marker").length)
8739
- return; // A marker was clicked, not the map. Do nothing
8740
-
8741
- self.trigger({
8742
- type: "click",
8743
- latLng: latLng
8744
- });
8745
-
8746
- return;
8747
- }
8748
-
8749
- if(!isRight)
8750
- return;
8751
-
8752
- return self.onRightClick(event);
8753
- });
8754
 
8755
- // Dispatch event
8756
- if(!WPGMZA.isProVersion())
 
 
 
 
 
 
8757
  {
8758
- this.trigger("init");
 
 
 
 
 
 
 
 
8759
 
8760
- this.dispatchEvent("created");
8761
- WPGMZA.events.dispatchEvent({type: "mapcreated", map: this});
8762
 
8763
- // Legacy event
8764
- $(this.element).trigger("wpgooglemaps_loaded");
8765
  }
 
 
8766
  }
8767
-
8768
- if(WPGMZA.isProVersion())
8769
- Parent = WPGMZA.ProMap;
8770
- else
8771
- Parent = WPGMZA.Map;
8772
 
8773
- WPGMZA.OLMap.prototype = Object.create(Parent.prototype);
8774
- WPGMZA.OLMap.prototype.constructor = WPGMZA.OLMap;
 
 
 
 
 
 
 
 
8775
 
8776
- WPGMZA.OLMap.prototype.getTileLayer = function()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8777
  {
8778
- var options = {};
8779
 
8780
- if(WPGMZA.settings.tile_server_url)
8781
- options.url = WPGMZA.settings.tile_server_url;
 
 
 
 
 
 
 
 
8782
 
8783
- return new ol.layer.Tile({
8784
- source: new ol.source.OSM(options)
8785
- });
8786
  }
8787
 
8788
- WPGMZA.OLMap.prototype.wrapLongitude = function()
 
 
 
 
8789
  {
8790
- var transformed = ol.proj.transform(this.olMap.getView().getCenter(), "EPSG:3857", "EPSG:4326");
8791
- var center = {
8792
- lat: transformed[1],
8793
- lng: transformed[0]
8794
- };
8795
 
8796
- if(center.lng >= -180 && center.lng <= 180)
8797
- return;
 
 
 
 
 
 
 
 
8798
 
8799
- center.lng = center.lng - 360 * Math.floor(center.lng / 360);
 
 
 
 
 
8800
 
8801
- if(center.lng > 180)
8802
- center.lng -= 360;
 
 
 
 
8803
 
8804
- this.setCenter(center);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8805
  }
8806
 
8807
- WPGMZA.OLMap.prototype.getCenter = function()
 
 
 
 
8808
  {
8809
- var lonLat = ol.proj.toLonLat(
8810
- this.olMap.getView().getCenter()
8811
- );
8812
- return {
8813
- lat: lonLat[1],
8814
- lng: lonLat[0]
8815
- };
8816
  }
8817
 
8818
- WPGMZA.OLMap.prototype.setCenter = function(latLng)
 
 
 
 
8819
  {
8820
- var view = this.olMap.getView();
8821
-
8822
- WPGMZA.Map.prototype.setCenter.call(this, latLng);
8823
-
8824
- view.setCenter(ol.proj.fromLonLat([
8825
- latLng.lng,
8826
- latLng.lat
8827
- ]));
8828
 
8829
- this.wrapLongitude();
8830
-
8831
- this.onBoundsChanged();
8832
  }
8833
 
8834
- WPGMZA.OLMap.prototype.getBounds = function()
 
 
 
 
8835
  {
8836
- var bounds = this.olMap.getView().calculateExtent(this.olMap.getSize());
8837
- var nativeBounds = new WPGMZA.LatLngBounds();
 
8838
 
8839
- var topLeft = ol.proj.toLonLat([bounds[0], bounds[1]]);
8840
- var bottomRight = ol.proj.toLonLat([bounds[2], bounds[3]]);
8841
 
8842
- nativeBounds.north = topLeft[1];
8843
- nativeBounds.south = bottomRight[1];
 
 
8844
 
8845
- nativeBounds.west = topLeft[0];
8846
- nativeBounds.east = bottomRight[0];
 
 
 
 
 
 
 
 
8847
 
8848
  return nativeBounds;
8849
  }
@@ -8852,7 +8274,7 @@ jQuery(function($) {
8852
  * Fit to given boundaries
8853
  * @return void
8854
  */
8855
- WPGMZA.OLMap.prototype.fitBounds = function(southWest, northEast)
8856
  {
8857
  if(southWest instanceof WPGMZA.LatLng)
8858
  southWest = {lat: southWest.lat, lng: southWest.lng};
@@ -8873,885 +8295,1100 @@ jQuery(function($) {
8873
  };
8874
  }
8875
 
8876
- var view = this.olMap.getView();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8877
 
8878
- var extent = ol.extent.boundingExtent([
8879
- ol.proj.fromLonLat([
8880
- parseFloat(southWest.lng),
8881
- parseFloat(southWest.lat)
8882
- ]),
8883
- ol.proj.fromLonLat([
8884
- parseFloat(northEast.lng),
8885
- parseFloat(northEast.lat)
8886
- ])
8887
- ]);
8888
- view.fit(extent, this.olMap.getSize());
8889
  }
8890
 
8891
- WPGMZA.OLMap.prototype.panTo = function(latLng, zoom)
 
 
 
 
 
8892
  {
8893
- var view = this.olMap.getView();
8894
- var options = {
8895
- center: ol.proj.fromLonLat([
8896
- parseFloat(latLng.lng),
8897
- parseFloat(latLng.lat),
8898
- ]),
8899
- duration: 500
8900
- };
8901
 
8902
- if(arguments.length > 1)
8903
- options.zoom = parseInt(zoom);
 
 
 
 
 
 
 
 
 
 
 
 
8904
 
8905
- view.animate(options);
 
 
8906
  }
8907
 
8908
- WPGMZA.OLMap.prototype.getZoom = function()
 
 
 
 
 
8909
  {
8910
- return Math.round( this.olMap.getView().getZoom() );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8911
  }
8912
 
8913
- WPGMZA.OLMap.prototype.setZoom = function(value)
 
 
 
 
8914
  {
8915
- this.olMap.getView().setZoom(value);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8916
  }
8917
 
8918
- WPGMZA.OLMap.prototype.getMinZoom = function()
 
 
 
 
8919
  {
8920
- return this.olMap.getView().getMinZoom();
 
 
8921
  }
8922
-
8923
- WPGMZA.OLMap.prototype.setMinZoom = function(value)
8924
- {
8925
- this.olMap.getView().setMinZoom(value);
 
 
 
 
 
 
8926
  }
8927
 
8928
- WPGMZA.OLMap.prototype.getMaxZoom = function()
8929
- {
8930
- return this.olMap.getView().getMaxZoom();
8931
- }
 
 
 
 
 
 
8932
 
8933
- WPGMZA.OLMap.prototype.setMaxZoom = function(value)
8934
- {
8935
- this.olMap.getView().setMaxZoom(value);
8936
- }
8937
 
8938
- WPGMZA.OLMap.prototype.setOptions = function(options)
8939
  {
8940
- Parent.prototype.setOptions.call(this, options);
8941
 
8942
- if(!this.olMap)
8943
- return;
8944
 
8945
- this.olMap.getView().setProperties( this.settings.toOLViewOptions() );
8946
- }
8947
-
8948
- /**
8949
- * TODO: Consider moving all these functions to their respective classes, same on google map (DO IT!!! It's very misleading having them here)
8950
- */
8951
- WPGMZA.OLMap.prototype.addMarker = function(marker)
8952
- {
8953
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT)
8954
- this.olMap.addOverlay(marker.overlay);
8955
- else
8956
- {
8957
- this.markerLayer.getSource().addFeature(marker.feature);
8958
- marker.featureInSource = true;
8959
- }
8960
 
8961
- Parent.prototype.addMarker.call(this, marker);
8962
- }
8963
-
8964
- WPGMZA.OLMap.prototype.removeMarker = function(marker)
8965
- {
8966
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT)
8967
- this.olMap.removeOverlay(marker.overlay);
8968
- else
8969
  {
8970
- this.markerLayer.getSource().removeFeature(marker.feature);
8971
- marker.featureInSource = false;
 
 
 
 
 
 
 
 
 
 
 
 
8972
  }
8973
 
8974
- Parent.prototype.removeMarker.call(this, marker);
8975
- }
8976
-
8977
- WPGMZA.OLMap.prototype.addPolygon = function(polygon)
8978
- {
8979
- this.olMap.addLayer(polygon.layer);
8980
 
8981
- Parent.prototype.addPolygon.call(this, polygon);
8982
- }
8983
-
8984
- WPGMZA.OLMap.prototype.removePolygon = function(polygon)
8985
- {
8986
- this.olMap.removeLayer(polygon.layer);
8987
 
8988
- Parent.prototype.removePolygon.call(this, polygon);
8989
- }
8990
-
8991
- WPGMZA.OLMap.prototype.addPolyline = function(polyline)
8992
- {
8993
- this.olMap.addLayer(polyline.layer);
 
 
 
8994
 
8995
- Parent.prototype.addPolyline.call(this, polyline);
8996
- }
8997
-
8998
- WPGMZA.OLMap.prototype.removePolyline = function(polyline)
8999
- {
9000
- this.olMap.removeLayer(polyline.layer);
9001
 
9002
- Parent.prototype.removePolyline.call(this, polyline);
9003
- }
9004
-
9005
- WPGMZA.OLMap.prototype.addCircle = function(circle)
9006
- {
9007
- this.olMap.addLayer(circle.layer);
 
 
 
 
 
 
 
9008
 
9009
- Parent.prototype.addCircle.call(this, circle);
9010
  }
9011
 
9012
- WPGMZA.OLMap.prototype.removeCircle = function(circle)
9013
- {
9014
- this.olMap.removeLayer(circle.layer);
 
 
 
 
 
9015
 
9016
- Parent.prototype.removeCircle.call(this, circle);
9017
- }
 
 
 
 
 
 
 
 
9018
 
9019
- WPGMZA.OLMap.prototype.addRectangle = function(rectangle)
9020
  {
9021
- this.olMap.addLayer(rectangle.layer);
 
 
 
 
9022
 
9023
- Parent.prototype.addRectangle.call(this, rectangle);
 
 
 
 
 
9024
  }
9025
 
9026
- WPGMZA.OLMap.prototype.removeRectangle = function(rectangle)
 
 
 
 
9027
  {
9028
- this.olMap.removeLayer(rectangle.layer);
9029
-
9030
- Parent.prototype.removeRectangle.call(this, rectangle);
 
 
9031
  }
9032
 
9033
- WPGMZA.OLMap.prototype.pixelsToLatLng = function(x, y)
 
 
 
 
9034
  {
9035
- if(y == undefined)
9036
- {
9037
- if("x" in x && "y" in x)
9038
- {
9039
- y = x.y;
9040
- x = x.x;
9041
- }
9042
- else
9043
- console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)");
9044
- }
9045
 
9046
- var coord = this.olMap.getCoordinateFromPixel([x, y]);
 
9047
 
9048
- if(!coord)
9049
- return {
9050
- x: null,
9051
- y: null
 
 
 
 
 
 
 
 
9052
  };
 
 
 
 
 
9053
 
9054
- var lonLat = ol.proj.toLonLat(coord);
9055
- return {
9056
- lat: lonLat[1],
9057
- lng: lonLat[0]
9058
- };
9059
  }
9060
 
9061
- WPGMZA.OLMap.prototype.latLngToPixels = function(latLng)
9062
  {
9063
- var coord = ol.proj.fromLonLat([latLng.lng, latLng.lat]);
9064
- var pixel = this.olMap.getPixelFromCoordinate(coord);
9065
-
9066
- if(!pixel)
9067
- return {
9068
- x: null,
9069
- y: null
9070
- };
9071
-
9072
- return {
9073
- x: pixel[0],
9074
- y: pixel[1]
9075
- };
9076
  }
9077
 
9078
- WPGMZA.OLMap.prototype.enableBicycleLayer = function(value)
 
 
 
 
9079
  {
9080
- if(value)
9081
- {
9082
- if(!this.bicycleLayer)
9083
- this.bicycleLayer = new ol.layer.Tile({
9084
- source: new ol.source.OSM({
9085
- url: "http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png"
9086
- })
9087
- });
9088
-
9089
- this.olMap.addLayer(this.bicycleLayer);
9090
- }
9091
- else
9092
- {
9093
- if(!this.bicycleLayer)
9094
- return;
9095
-
9096
- this.olMap.removeLayer(this.bicycleLayer);
9097
- }
9098
  }
9099
 
9100
- WPGMZA.OLMap.prototype.showGestureOverlay = function()
 
 
 
 
9101
  {
9102
- var self = this;
9103
-
9104
- clearTimeout(this.gestureOverlayTimeoutID);
9105
-
9106
- $(this.gestureOverlay).stop().animate({opacity: "100"});
9107
- $(this.element).append(this.gestureOverlay);
9108
-
9109
- $(this.gestureOverlay).css({
9110
- "line-height": $(this.element).height() + "px",
9111
- "opacity": "1.0"
9112
- });
9113
- $(this.gestureOverlay).show();
9114
 
9115
- this.gestureOverlayTimeoutID = setTimeout(function() {
9116
- self.gestureOverlay.fadeOut(2000);
9117
- }, 2000);
9118
  }
9119
 
9120
- WPGMZA.OLMap.prototype.onElementResized = function(event)
9121
  {
9122
- this.olMap.updateSize();
9123
  }
9124
 
9125
- WPGMZA.OLMap.prototype.onRightClick = function(event)
9126
  {
9127
- if($(event.target).closest(".ol-marker, .wpgmza_modern_infowindow, .wpgmza-modern-store-locator").length)
9128
- return true;
9129
-
9130
- var parentOffset = $(this.element).offset();
9131
- var relX = event.pageX - parentOffset.left;
9132
- var relY = event.pageY - parentOffset.top;
9133
- var latLng = this.pixelsToLatLng(relX, relY);
9134
-
9135
- this.trigger({type: "rightclick", latLng: latLng});
9136
-
9137
- // Legacy event compatibility
9138
- $(this.element).trigger({type: "rightclick", latLng: latLng});
9139
-
9140
- // Prevent menu
9141
- event.preventDefault();
9142
- return false;
9143
  }
9144
-
9145
- WPGMZA.OLMap.prototype.enableAllInteractions = function()
9146
- {
9147
-
9148
- this.olMap.getInteractions().forEach(function(interaction) {
9149
-
9150
- if(interaction instanceof ol.interaction.DragPan || interaction instanceof ol.interaction.DoubleClickZoom || interaction instanceof ol.interaction.MouseWheelZoom)
9151
- {
9152
- interaction.setActive(true);
9153
- }
9154
-
9155
- }, this);
9156
-
9157
  }
9158
 
9159
  });
9160
 
9161
- // js/v8/open-layers/ol-marker.js
9162
  /**
9163
  * @namespace WPGMZA
9164
- * @module OLMarker
9165
- * @requires WPGMZA.Marker
9166
- * @pro-requires WPGMZA.ProMarker
9167
  */
9168
  jQuery(function($) {
9169
 
9170
- var Parent;
9171
-
9172
- WPGMZA.OLMarker = function(row)
9173
  {
9174
  var self = this;
9175
 
9176
- Parent.call(this, row);
9177
-
9178
- var origin = ol.proj.fromLonLat([
9179
- parseFloat(this.lng),
9180
- parseFloat(this.lat)
9181
- ]);
9182
 
9183
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT)
9184
- {
9185
- var img = $("<img alt=''/>")[0];
9186
- img.onload = function(event) {
9187
- self.updateElementHeight();
9188
- if(self.map)
9189
- self.map.olMap.updateSize();
9190
- }
9191
- img.src = WPGMZA.defaultMarkerIcon;
9192
-
9193
- this.element = $("<div class='ol-marker'></div>")[0];
9194
- $(this.element).attr('title', this.title);
9195
- this.element.appendChild(img);
9196
 
9197
- this.element.wpgmzaMarker = this;
 
 
 
9198
 
9199
- $(this.element).on("mouseover", function(event) {
9200
- self.dispatchEvent("mouseover");
9201
- });
9202
 
9203
- this.overlay = new ol.Overlay({
9204
- element: this.element,
9205
- position: origin,
9206
- positioning: "bottom-center",
9207
- stopEvent: false
9208
- });
9209
- this.overlay.setPosition(origin);
9210
 
9211
- if(this.animation)
9212
- this.setAnimation(this.animation);
9213
 
9214
- this.setLabel(this.settings.label);
 
 
9215
 
9216
- if(row)
9217
- {
9218
- if(row.draggable)
9219
- this.setDraggable(true);
9220
- }
9221
 
9222
- this.rebindClickListener();
9223
- }
9224
- else if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
 
 
 
 
 
 
 
 
9225
  {
9226
- this.feature = new ol.Feature({
9227
- geometry: new ol.geom.Point(origin)
9228
- });
9229
-
9230
- this.feature.setStyle(this.getVectorLayerStyle());
9231
- this.feature.wpgmzaMarker = this;
9232
  }
9233
- else
9234
- throw new Error("Invalid marker render mode");
9235
 
9236
- this.trigger("init");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9237
  }
9238
 
9239
- if(WPGMZA.isProVersion())
9240
- Parent = WPGMZA.ProMarker;
9241
- else
9242
- Parent = WPGMZA.Marker;
9243
-
9244
- WPGMZA.OLMarker.prototype = Object.create(Parent.prototype);
9245
- WPGMZA.OLMarker.prototype.constructor = WPGMZA.OLMarker;
9246
 
9247
- WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT = "element";
9248
- WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER = "vector"; // NB: This feature is experimental
 
 
 
 
 
 
 
 
9249
 
9250
- WPGMZA.OLMarker.renderMode = WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT;
 
 
 
 
 
9251
 
9252
- if(WPGMZA.settings.engine == "open-layers" && WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
9253
  {
9254
- WPGMZA.OLMarker.defaultVectorLayerStyle = new ol.style.Style({
9255
- image: new ol.style.Icon({
9256
- anchor: [0.5, 1],
9257
- src: WPGMZA.defaultMarkerIcon
9258
- })
9259
- });
9260
-
9261
- WPGMZA.OLMarker.hiddenVectorLayerStyle = new ol.style.Style({});
9262
  }
9263
 
9264
- WPGMZA.OLMarker.prototype.getVectorLayerStyle = function()
9265
  {
9266
- if(this.vectorLayerStyle)
9267
- return this.vectorLayerStyle;
9268
-
9269
- return WPGMZA.OLMarker.defaultVectorLayerStyle;
9270
  }
9271
 
9272
- WPGMZA.OLMarker.prototype.updateElementHeight = function(height, calledOnFocus)
9273
  {
9274
- var self = this;
9275
-
9276
- if(!height)
9277
- height = $(this.element).find("img").height();
9278
-
9279
- if(height == 0 && !calledOnFocus)
9280
- {
9281
- $(window).one("focus", function(event) {
9282
- self.updateElementHeight(false, true);
9283
- });
9284
- }
9285
 
9286
- $(this.element).css({height: height + "px"});
9287
  }
9288
 
9289
- WPGMZA.OLMarker.prototype.addLabel = function()
9290
  {
9291
- this.setLabel(this.getLabelText());
 
 
 
9292
  }
9293
 
9294
- WPGMZA.OLMarker.prototype.setLabel = function(label)
 
 
 
 
 
 
 
 
 
 
9295
  {
9296
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
9297
- {
9298
- console.warn("Marker labels are not currently supported in Vector Layer rendering mode");
9299
- return;
9300
- }
9301
 
9302
- if(!label)
9303
- {
9304
- if(this.label)
9305
- $(this.element).find(".ol-marker-label").remove();
9306
-
9307
- return;
9308
- }
9309
 
9310
- if(!this.label)
 
 
 
 
 
 
 
 
 
 
9311
  {
9312
- this.label = $("<div class='ol-marker-label'/>");
9313
- $(this.element).append(this.label);
 
 
 
 
 
 
 
9314
  }
9315
 
9316
- this.label.html(label);
 
9317
  }
9318
 
9319
- WPGMZA.OLMarker.prototype.getVisible = function(visible)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9320
  {
9321
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
 
 
 
 
9322
  {
9323
-
9324
  }
9325
  else
9326
- return this.overlay.getElement().style.display != "none";
9327
- }
9328
-
9329
- WPGMZA.OLMarker.prototype.setVisible = function(visible)
9330
- {
9331
- Parent.prototype.setVisible.call(this, visible);
9332
-
9333
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
9334
  {
9335
- if(visible)
 
 
9336
  {
9337
- var style = this.getVectorLayerStyle();
9338
- this.feature.setStyle(style);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9339
  }
9340
- else
9341
- this.feature.setStyle(null);
9342
-
9343
- /*var source = this.map.markerLayer.getSource();
9344
-
9345
- /*if(this.featureInSource == visible)
9346
- return;
9347
-
9348
- if(visible)
9349
- source.addFeature(this.feature);
9350
- else
9351
- source.removeFeature(this.feature);
9352
-
9353
- this.featureInSource = visible;*/
9354
  }
9355
- else
9356
- this.overlay.getElement().style.display = (visible ? "block" : "none");
 
 
 
 
9357
  }
9358
 
9359
- WPGMZA.OLMarker.prototype.setPosition = function(latLng)
9360
- {
9361
- Parent.prototype.setPosition.call(this, latLng);
 
9362
 
9363
- var origin = ol.proj.fromLonLat([
9364
- parseFloat(this.lng),
9365
- parseFloat(this.lat)
9366
- ]);
9367
 
9368
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
9369
- this.feature.setGeometry(new ol.geom.Point(origin));
9370
- else
9371
- this.overlay.setPosition(origin);
 
 
 
9372
  }
9373
 
9374
- WPGMZA.OLMarker.prototype.updateOffset = function(x, y)
 
 
 
 
9375
  {
9376
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
9377
- {
9378
- console.warn("Marker offset is not currently supported in Vector Layer rendering mode");
9379
- return;
9380
- }
9381
-
9382
- var x = this._offset.x;
9383
- var y = this._offset.y;
9384
-
9385
- this.element.style.position = "relative";
9386
- this.element.style.left = x + "px";
9387
- this.element.style.top = y + "px";
9388
  }
9389
 
9390
- WPGMZA.OLMarker.prototype.setAnimation = function(anim)
 
 
 
 
9391
  {
9392
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
9393
- {
9394
- console.warn("Marker animation is not currently supported in Vector Layer rendering mode");
9395
- return;
9396
- }
9397
 
9398
- Parent.prototype.setAnimation.call(this, anim);
9399
 
9400
- switch(anim)
 
 
9401
  {
9402
- case WPGMZA.Marker.ANIMATION_NONE:
9403
- $(this.element).removeAttr("data-anim");
9404
- break;
9405
-
9406
- case WPGMZA.Marker.ANIMATION_BOUNCE:
9407
- $(this.element).attr("data-anim", "bounce");
9408
- break;
9409
-
9410
- case WPGMZA.Marker.ANIMATION_DROP:
9411
- $(this.element).attr("data-anim", "drop");
9412
- break;
9413
  }
 
 
9414
  }
9415
 
9416
- WPGMZA.OLMarker.prototype.setDraggable = function(draggable)
 
 
 
 
 
 
 
 
 
 
9417
  {
9418
  var self = this;
9419
 
9420
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
 
 
9421
  {
9422
- console.warn("Marker dragging is not currently supported in Vector Layer rendering mode");
9423
- return;
9424
  }
9425
-
9426
- if(draggable)
9427
  {
9428
- var options = {
9429
- disabled: false
9430
- };
9431
 
9432
- if(!this.jQueryDraggableInitialized)
9433
  {
9434
- options.start = function(event) {
9435
- self.onDragStart(event);
9436
- }
9437
 
9438
- options.stop = function(event) {
9439
- self.onDragEnd(event);
9440
- };
 
 
 
 
 
 
 
 
9441
  }
9442
 
9443
- $(this.element).draggable(options);
9444
- this.jQueryDraggableInitialized = true;
9445
-
9446
- this.rebindClickListener();
 
9447
  }
9448
- else
9449
- $(this.element).draggable({disabled: true});
 
 
 
 
9450
  }
9451
 
9452
- WPGMZA.OLMarker.prototype.setOpacity = function(opacity)
 
 
 
9453
  {
9454
- if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9455
  {
9456
- console.warn("Marker opacity is not currently supported in Vector Layer rendering mode");
9457
- return;
 
 
 
9458
  }
9459
 
9460
- $(this.element).css({opacity: opacity});
9461
  }
9462
 
9463
- WPGMZA.OLMarker.prototype.onDragStart = function(event)
 
 
 
 
 
 
 
 
 
 
9464
  {
9465
- this.isBeingDragged = true;
9466
 
9467
- this.map.olMap.getInteractions().forEach(function(interaction) {
9468
-
9469
- if(interaction instanceof ol.interaction.DragPan)
9470
- interaction.setActive(false);
9471
-
9472
- });
9473
  }
9474
 
9475
- WPGMZA.OLMarker.prototype.onDragEnd = function(event)
 
 
 
 
 
 
 
 
 
 
 
 
9476
  {
9477
- var self = this;
9478
- var offset = {
9479
- top: parseFloat( $(this.element).css("top").match(/-?\d+/)[0] ),
9480
- left: parseFloat( $(this.element).css("left").match(/-?\d+/)[0] )
9481
- };
9482
-
9483
- $(this.element).css({
9484
- top: "0px",
9485
- left: "0px"
9486
- });
9487
 
9488
- var currentLatLng = this.getPosition();
9489
- var pixelsBeforeDrag = this.map.latLngToPixels(currentLatLng);
9490
- var pixelsAfterDrag = {
9491
- x: pixelsBeforeDrag.x + offset.left,
9492
- y: pixelsBeforeDrag.y + offset.top
9493
- };
9494
- var latLngAfterDrag = this.map.pixelsToLatLng(pixelsAfterDrag);
9495
 
9496
- this.setPosition(latLngAfterDrag);
 
9497
 
9498
- this.isBeingDragged = false;
9499
- this.trigger({type: "dragend", latLng: latLngAfterDrag});
9500
 
9501
- // NB: "yes" represents disabled
9502
- if(this.map.settings.wpgmza_settings_map_draggable != "yes")
9503
- this.map.olMap.getInteractions().forEach(function(interaction) {
9504
-
9505
- if(interaction instanceof ol.interaction.DragPan)
9506
- interaction.setActive(true);
9507
-
9508
- });
9509
  }
9510
 
9511
- WPGMZA.OLMarker.prototype.onElementClick = function(event)
 
 
 
9512
  {
9513
- var self = event.currentTarget.wpgmzaMarker;
 
9514
 
9515
- if(self.isBeingDragged)
9516
- return; // Don't dispatch click event after a drag
 
 
 
 
 
 
 
 
 
 
 
 
9517
 
9518
- self.dispatchEvent("click");
9519
- self.dispatchEvent("select");
 
 
 
9520
  }
9521
 
9522
- /**
9523
- * Binds / rebinds the click listener. This must be bound after draggable is initialized,
9524
- * this solves the click listener firing before dragend
9525
- */
9526
- WPGMZA.OLMarker.prototype.rebindClickListener = function()
9527
  {
9528
- $(this.element).off("click", this.onElementClick);
9529
- $(this.element).on("click", this.onElementClick);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9530
  }
9531
 
9532
  });
9533
 
9534
- // js/v8/open-layers/ol-modern-store-locator-circle.js
9535
  /**
9536
  * @namespace WPGMZA
9537
- * @module OLModernStoreLocatorCircle
9538
- * @requires WPGMZA.ModernStoreLocatorCircle
9539
  */
9540
  jQuery(function($) {
9541
 
9542
- WPGMZA.OLModernStoreLocatorCircle = function(map, settings)
9543
- {
9544
- WPGMZA.ModernStoreLocatorCircle.call(this, map, settings);
9545
- }
9546
 
9547
- WPGMZA.OLModernStoreLocatorCircle.prototype = Object.create(WPGMZA.ModernStoreLocatorCircle.prototype);
9548
- WPGMZA.OLModernStoreLocatorCircle.prototype.constructor = WPGMZA.OLModernStoreLocatorCircle;
9549
 
9550
- WPGMZA.OLModernStoreLocatorCircle.prototype.initCanvasLayer = function()
9551
  {
9552
  var self = this;
9553
- var mapElement = $(this.map.element);
9554
- var olViewportElement = mapElement.children(".ol-viewport");
9555
 
9556
- this.canvas = document.createElement("canvas");
9557
- this.canvas.className = "wpgmza-ol-canvas-overlay";
9558
- mapElement.append(this.canvas);
9559
 
9560
- this.renderFunction = function(event) {
9561
-
9562
- if(self.canvas.width != olViewportElement.width() || self.canvas.height != olViewportElement.height())
9563
- {
9564
- self.canvas.width = olViewportElement.width();
9565
- self.canvas.height = olViewportElement.height();
9566
-
9567
- $(this.canvas).css({
9568
- width: olViewportElement.width() + "px",
9569
- height: olViewportElement.height() + "px"
9570
- });
9571
- }
9572
-
9573
- self.draw();
9574
- };
9575
 
9576
- this.map.olMap.on("postrender", this.renderFunction);
9577
- }
9578
-
9579
- WPGMZA.OLModernStoreLocatorCircle.prototype.getContext = function(type)
9580
- {
9581
- return this.canvas.getContext(type);
9582
  }
9583
 
9584
- WPGMZA.OLModernStoreLocatorCircle.prototype.getCanvasDimensions = function()
9585
- {
9586
- return {
9587
- width: this.canvas.width,
9588
- height: this.canvas.height
9589
- };
9590
- }
9591
 
9592
- WPGMZA.OLModernStoreLocatorCircle.prototype.getCenterPixels = function()
9593
  {
9594
- var center = this.map.latLngToPixels(this.settings.center);
9595
-
9596
- return center;
9597
- }
9598
 
9599
- WPGMZA.OLModernStoreLocatorCircle.prototype.getWorldOriginOffset = function()
9600
- {
9601
- return {
9602
- x: 0,
9603
- y: 0
9604
- };
9605
  }
9606
 
9607
- WPGMZA.OLModernStoreLocatorCircle.prototype.getTransformedRadius = function(km)
9608
  {
9609
- var center = new WPGMZA.LatLng(this.settings.center);
9610
- var outer = new WPGMZA.LatLng(center);
9611
-
9612
- outer.moveByDistance(km, 90);
9613
-
9614
- var centerPixels = this.map.latLngToPixels(center);
9615
- var outerPixels = this.map.latLngToPixels(outer);
9616
-
9617
- return Math.abs(outerPixels.x - centerPixels.x);
9618
-
9619
- /*if(!window.testMarker){
9620
- window.testMarker = WPGMZA.Marker.createInstance({
9621
- position: outer
9622
- });
9623
- WPGMZA.maps[0].addMarker(window.testMarker);
9624
- }
9625
 
9626
- return 100;*/
 
 
9627
  }
9628
 
9629
- WPGMZA.OLModernStoreLocatorCircle.prototype.getScale = function()
9630
  {
9631
- return 1;
 
 
 
 
9632
  }
9633
 
9634
- WPGMZA.OLModernStoreLocatorCircle.prototype.destroy = function()
9635
  {
9636
- $(this.canvas).remove();
9637
-
9638
- this.map.olMap.un("postrender", this.renderFunction);
9639
- this.map = null;
9640
- this.canvas = null;
9641
  }
9642
 
9643
- });
 
 
 
9644
 
9645
- // js/v8/open-layers/ol-modern-store-locator.js
9646
- /**
9647
- * @namespace WPGMZA
9648
- * @module OLModernStoreLocator
9649
- * @requires WPGMZA.ModernStoreLocator
9650
- */
9651
- jQuery(function($) {
9652
 
9653
- WPGMZA.OLModernStoreLocator = function(map_id)
9654
  {
9655
- var element;
9656
-
9657
- WPGMZA.ModernStoreLocator.call(this, map_id);
9658
-
9659
- if(WPGMZA.isProVersion())
9660
- element = $(".wpgmza_map[data-map-id='" + map_id + "']");
9661
- else
9662
- element = $("#wpgmza_map");
9663
-
9664
- element.append(this.element);
9665
  }
9666
 
9667
- WPGMZA.OLModernStoreLocator.prototype = Object.create(WPGMZA.ModernStoreLocator);
9668
- WPGMZA.OLModernStoreLocator.prototype.constructor = WPGMZA.OLModernStoreLocator;
9669
-
9670
  });
9671
 
9672
- // js/v8/open-layers/ol-polygon.js
9673
  /**
9674
  * @namespace WPGMZA
9675
- * @module OLPolygon
9676
- * @requires WPGMZA.Polygon
9677
- * @pro-requires WPGMZA.ProPolygon
9678
  */
9679
  jQuery(function($) {
9680
 
9681
- var Parent;
9682
 
9683
- WPGMZA.OLPolygon = function(options, olFeature)
9684
  {
9685
  var self = this;
9686
 
 
 
 
 
 
 
9687
  Parent.call(this, options, olFeature);
9688
 
9689
- this.olStyle = new ol.style.Style();
 
 
 
 
 
9690
 
9691
  if(olFeature)
9692
- {
9693
  this.olFeature = olFeature;
9694
- }
9695
  else
 
 
 
 
 
 
 
 
 
9696
  {
9697
- var coordinates = [[]];
9698
-
9699
- if(options && options.polydata)
9700
- {
9701
- var paths = this.parseGeometry(options.polydata);
9702
-
9703
- for(var i = 0; i < paths.length; i++)
9704
- coordinates[0].push(ol.proj.fromLonLat([
9705
- parseFloat(paths[i].lng),
9706
- parseFloat(paths[i].lat)
9707
- ]));
9708
-
9709
- this.olStyle = new ol.style.Style(this.getStyleFromSettings());
9710
- }
9711
-
9712
- this.olFeature = new ol.Feature({
9713
- geometry: new ol.geom.Polygon(coordinates)
9714
- });
9715
  }
9716
 
9717
- this.layer = new ol.layer.Vector({
9718
- source: new ol.source.Vector({
9719
- features: [this.olFeature]
9720
- }),
9721
- style: this.olStyle
9722
- });
9723
 
9724
- this.layer.getSource().getFeatures()[0].setProperties({
9725
- wpgmzaPolygon: this
9726
- });
9727
- }
9728
-
9729
- if(WPGMZA.isProVersion())
9730
- Parent = WPGMZA.ProPolygon;
9731
- else
9732
- Parent = WPGMZA.Polygon;
9733
-
9734
- WPGMZA.OLPolygon.prototype = Object.create(Parent.prototype);
9735
- WPGMZA.OLPolygon.prototype.constructor = WPGMZA.OLPolygon;
9736
-
9737
- WPGMZA.OLPolygon.prototype.getStyleFromSettings = function()
 
 
9738
  {
9739
  var params = {};
9740
 
9741
- if(this.linecolor && this.lineopacity)
9742
  params.stroke = new ol.style.Stroke({
9743
- color: WPGMZA.hexOpacityToRGBA("#" + this.linecolor, this.lineopacity)
9744
- });
9745
 
9746
  if(this.opacity)
9747
  params.fill = new ol.style.Fill({
9748
- color: WPGMZA.hexOpacityToRGBA(this.fillcolor, this.opacity)
9749
  });
9750
 
9751
  return params;
9752
  }
9753
 
9754
- WPGMZA.OLPolygon.prototype.updateStyleFromSettings = function()
9755
  {
9756
  // Re-create the style - working on it directly doesn't cause a re-render
9757
  var params = this.getStyleFromSettings();
@@ -9759,2107 +9396,2469 @@ jQuery(function($) {
9759
  this.layer.setStyle(this.olStyle);
9760
  }
9761
 
9762
- WPGMZA.OLPolygon.prototype.setEditable = function(editable)
9763
  {
9764
-
9765
  }
9766
 
9767
- WPGMZA.OLPolygon.prototype.toJSON = function()
9768
  {
9769
- var result = Parent.prototype.toJSON.call(this);
9770
- var coordinates = this.olFeature.getGeometry().getCoordinates()[0];
9771
-
9772
- result.points = [];
9773
 
9774
- for(var i = 0; i < coordinates.length; i++)
9775
- {
9776
- var lonLat = ol.proj.toLonLat(coordinates[i]);
9777
- var latLng = {
9778
- lat: lonLat[1],
9779
- lng: lonLat[0]
9780
- };
9781
- result.points.push(latLng);
9782
- }
9783
 
9784
- return result;
9785
  }
9786
 
9787
  });
9788
 
9789
- // js/v8/open-layers/ol-polyline.js
9790
  /**
9791
  * @namespace WPGMZA
9792
- * @module OLPolyline
9793
- * @requires WPGMZA.Polyline
9794
  */
9795
  jQuery(function($) {
9796
 
9797
- var Parent;
9798
-
9799
- WPGMZA.OLPolyline = function(options, olFeature)
 
 
 
9800
  {
9801
- var self = this;
9802
-
9803
- WPGMZA.Polyline.call(this, options);
9804
-
9805
- this.olStyle = new ol.style.Style();
9806
 
9807
- if(olFeature)
9808
- {
9809
- this.olFeature = olFeature;
9810
- }
9811
- else
9812
- {
9813
- var coordinates = [];
9814
-
9815
- if(options && (options.polydata || options.points))
9816
- {
9817
- var path;
 
 
 
 
 
 
 
 
 
 
 
9818
 
9819
- if(options.polydata)
9820
- path = this.parseGeometry(options.polydata);
9821
- else
9822
- path = options.points;
 
 
 
 
 
 
 
 
 
9823
 
9824
- for(var i = 0; i < path.length; i++)
9825
- {
9826
- if(!($.isNumeric(path[i].lat)))
9827
- throw new Error("Invalid latitude");
9828
-
9829
- if(!($.isNumeric(path[i].lng)))
9830
- throw new Error("Invalid longitude");
9831
-
9832
- coordinates.push(ol.proj.fromLonLat([
9833
- parseFloat(path[i].lng),
9834
- parseFloat(path[i].lat)
9835
- ]));
9836
- }
9837
  }
9838
-
9839
- var params = this.getStyleFromSettings();
9840
- this.olStyle = new ol.style.Style(params);
9841
-
9842
- this.olFeature = new ol.Feature({
9843
- geometry: new ol.geom.LineString(coordinates)
9844
- });
9845
- }
 
 
 
 
 
 
 
 
9846
 
9847
- this.layer = new ol.layer.Vector({
9848
- source: new ol.source.Vector({
9849
- features: [this.olFeature]
9850
- }),
9851
- style: this.olStyle
9852
- });
9853
 
9854
- this.layer.getSource().getFeatures()[0].setProperties({
9855
- wpgmzaPolyline: this
 
 
 
 
 
 
9856
  });
9857
  }
9858
 
9859
- Parent = WPGMZA.Polyline;
9860
-
9861
- WPGMZA.OLPolyline.prototype = Object.create(Parent.prototype);
9862
- WPGMZA.OLPolyline.prototype.constructor = WPGMZA.OLPolyline;
9863
-
9864
- WPGMZA.OLPolyline.prototype.getStyleFromSettings = function()
 
 
 
9865
  {
9866
- var params = {};
9867
-
9868
- if(this.settings.strokeOpacity)
9869
- params.stroke = new ol.style.Stroke({
9870
- color: WPGMZA.hexOpacityToRGBA(this.settings.strokeColor, this.settings.strokeOpacity),
9871
- width: parseInt(this.settings.strokeWeight)
9872
- });
9873
-
9874
- return params;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9875
  }
9876
 
9877
- WPGMZA.OLPolyline.prototype.updateStyleFromSettings = function()
9878
  {
9879
- // Re-create the style - working on it directly doesn't cause a re-render
9880
- var params = this.getStyleFromSettings();
9881
- this.olStyle = new ol.style.Style(params);
9882
- this.layer.setStyle(this.olStyle);
9883
  }
9884
 
9885
- WPGMZA.OLPolyline.prototype.setEditable = function(editable)
9886
  {
9887
-
9888
  }
9889
 
9890
- WPGMZA.OLPolyline.prototype.setPoints = function(points)
9891
  {
9892
- if(this.olFeature)
9893
- this.layer.getSource().removeFeature(this.olFeature);
9894
-
9895
- var coordinates = [];
9896
 
9897
- for(var i = 0; i < points.length; i++)
9898
- coordinates.push(ol.proj.fromLonLat([
9899
- parseFloat(points[i].lng),
9900
- parseFloat(points[i].lat)
9901
- ]));
9902
 
9903
- this.olFeature = new ol.Feature({
9904
- geometry: new ol.geom.LineString(coordinates)
9905
- });
 
 
 
 
 
 
 
 
 
 
 
 
9906
 
9907
- this.layer.getSource().addFeature(this.olFeature);
9908
- }
9909
-
9910
- WPGMZA.OLPolyline.prototype.toJSON = function()
9911
- {
9912
- var result = Parent.prototype.toJSON.call(this);
9913
- var coordinates = this.olFeature.getGeometry().getCoordinates();
9914
 
9915
- result.points = [];
9916
 
9917
- for(var i = 0; i < coordinates.length; i++)
9918
  {
9919
- var lonLat = ol.proj.toLonLat(coordinates[i]);
9920
- var latLng = {
9921
- lat: lonLat[1],
9922
- lng: lonLat[0]
9923
- };
9924
- result.points.push(latLng);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9925
  }
 
 
9926
 
9927
- return result;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9928
  }
9929
 
9930
  });
9931
 
9932
- // js/v8/open-layers/ol-text.js
9933
  /**
9934
  * @namespace WPGMZA
9935
- * @module OLText
9936
- * @requires WPGMZA.Text
 
9937
  */
9938
  jQuery(function($) {
9939
 
9940
- WPGMZA.OLText = function()
 
 
9941
  {
 
 
 
9942
 
 
 
 
 
 
9943
  }
9944
 
9945
- });
9946
-
9947
- // js/v8/google-maps/google-circle.js
9948
- /**
9949
- * @namespace WPGMZA
9950
- * @module GoogleCircle
9951
- * @requires WPGMZA.Circle
9952
- */
9953
- jQuery(function($) {
 
 
 
 
 
 
 
9954
 
9955
  /**
9956
- * Subclass, used when Google is the maps engine. <strong>Please <em>do not</em> call this constructor directly. Always use createInstance rather than instantiating this class directly.</strong> Using createInstance allows this class to be externally extensible.
9957
- * @class WPGMZA.GoogleCircle
9958
- * @constructor WPGMZA.GoogleCircle
9959
- * @memberof WPGMZA
9960
- * @augments WPGMZA.Circle
9961
- * @see WPGMZA.Circle.createInstance
9962
  */
9963
- WPGMZA.GoogleCircle = function(options, googleCircle)
9964
  {
9965
  var self = this;
 
9966
 
9967
- WPGMZA.Circle.call(this, options, googleCircle);
 
9968
 
9969
- if(googleCircle)
9970
- {
9971
- this.googleCircle = googleCircle;
9972
- }
9973
- else
9974
- {
9975
- this.googleCircle = new google.maps.Circle();
9976
- this.googleCircle.wpgmzaCircle = this;
9977
- }
9978
 
9979
- google.maps.event.addListener(this.googleCircle, "click", function() {
9980
- self.dispatchEvent({type: "click"});
 
 
 
 
9981
  });
9982
 
9983
- if(options)
9984
- this.setOptions(options);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9985
  }
9986
 
9987
- WPGMZA.GoogleCircle.prototype = Object.create(WPGMZA.Circle.prototype);
9988
- WPGMZA.GoogleCircle.prototype.constructor = WPGMZA.GoogleCircle;
9989
-
9990
- WPGMZA.GoogleCircle.prototype.setCenter = function(center)
9991
  {
9992
- WPGMZA.Circle.prototype.setCenter.apply(this, arguments);
 
9993
 
9994
- this.googleCircle.setCenter(center);
 
 
 
 
 
 
 
 
9995
  }
9996
 
9997
- WPGMZA.GoogleCircle.prototype.setRadius = function(radius)
9998
  {
9999
- WPGMZA.Circle.prototype.setRadius.apply(this, arguments);
10000
-
10001
- this.googleCircle.setRadius(parseFloat(radius) * 1000);
10002
  }
10003
 
10004
- WPGMZA.GoogleCircle.prototype.setVisible = function(visible)
10005
  {
10006
- this.googleCircle.setVisible(visible ? true : false);
 
 
 
10007
  }
10008
 
10009
- WPGMZA.GoogleCircle.prototype.setOptions = function(options)
10010
  {
10011
- var googleOptions = {};
 
 
 
10012
 
10013
- googleOptions = $.extend({}, options);
10014
- delete googleOptions.map;
10015
- delete googleOptions.center;
10016
 
10017
- if(options.center)
10018
- googleOptions.center = new google.maps.LatLng({
10019
- lat: parseFloat(options.center.lat),
10020
- lng: parseFloat(options.center.lng)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10021
  });
10022
 
10023
- if(options.radius)
10024
- googleOptions.radius = parseFloat(options.radius);
10025
-
10026
- if(options.color)
10027
- googleOptions.fillColor = options.color;
10028
-
10029
- if(options.opacity)
10030
- {
10031
- googleOptions.fillOpacity = parseFloat(options.opacity);
10032
- googleOptions.strokeOpacity = parseFloat(options.opacity);
10033
-
10034
  }
10035
-
10036
- this.googleCircle.setOptions(googleOptions);
10037
-
10038
- if(options.map)
10039
- options.map.addCircle(this);
10040
  }
10041
 
10042
  });
10043
 
10044
- // js/v8/google-maps/google-geocoder.js
10045
  /**
10046
  * @namespace WPGMZA
10047
- * @module GoogleGeocoder
10048
- * @requires WPGMZA.Geocoder
 
10049
  */
10050
  jQuery(function($) {
10051
 
10052
- /**
10053
- * Subclass, used when Google is the maps engine. <strong>Please <em>do not</em> call this constructor directly. Always use createInstance rather than instantiating this class directly.</strong> Using createInstance allows this class to be externally extensible.
10054
- * @class WPGMZA.GoogleGeocoder
10055
- * @constructor WPGMZA.GoogleGeocoder
10056
- * @memberof WPGMZA
10057
- * @augments WPGMZA.Geocoder
10058
- * @see WPGMZA.Geocoder.createInstance
10059
- */
10060
- WPGMZA.GoogleGeocoder = function()
10061
- {
10062
- WPGMZA.Geocoder.call(this);
10063
- }
10064
-
10065
- WPGMZA.GoogleGeocoder.prototype = Object.create(WPGMZA.Geocoder.prototype);
10066
- WPGMZA.GoogleGeocoder.prototype.constructor = WPGMZA.GoogleGeocoder;
10067
 
10068
- WPGMZA.GoogleGeocoder.prototype.getGoogleGeocoder = function()
10069
  {
10070
- if(WPGMZA.CloudAPI && WPGMZA.CloudAPI.isBeingUsed)
10071
- return new WPGMZA.CloudGeocoder();
10072
 
10073
- return new google.maps.Geocoder();
10074
- }
10075
-
10076
- WPGMZA.GoogleGeocoder.prototype.getLatLngFromAddress = function(options, callback)
10077
- {
10078
- if(!options || !options.address)
10079
- throw new Error("No address specified");
10080
 
10081
- if(WPGMZA.isLatLngString(options.address))
10082
- return WPGMZA.Geocoder.prototype.getLatLngFromAddress.call(this, options, callback);
10083
 
10084
- if(options.country)
10085
- options.componentRestrictions = {
10086
- country: options.country
10087
- };
10088
 
10089
- var geocoder = this.getGoogleGeocoder();
10090
 
10091
- geocoder.geocode(options, function(results, status) {
 
 
 
 
 
 
 
 
 
 
10092
 
10093
- if(status == google.maps.GeocoderStatus.OK || status == WPGMZA.CloudGeocoder.SUCCESS)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10094
  {
10095
- var location = results[0].geometry.location;
10096
- var latLng, bounds = null;
10097
-
10098
- latLng = {
10099
- lat: location.lat(),
10100
- lng: location.lng()
10101
- };
 
10102
 
10103
- if(bounds = results[0].geometry.bounds)
10104
- {
10105
- if(bounds instanceof google.maps.LatLngBounds)
10106
- bounds = WPGMZA.LatLngBounds.fromGoogleLatLngBounds(results[0].geometry.bounds);
10107
- else
10108
- bounds = WPGMZA.LatLngBounds.fromGoogleLatLngBoundsLiteral(results[0].geometry.bounds);
10109
- }
 
 
 
 
 
 
10110
 
10111
- var results = [
 
 
 
 
 
 
 
10112
  {
10113
- geometry: {
10114
- location: latLng
10115
- },
10116
- latLng: latLng,
10117
- lat: latLng.lat,
10118
- lng: latLng.lng,
10119
- bounds: bounds
10120
  }
10121
- ];
 
10122
 
10123
- callback(results, WPGMZA.Geocoder.SUCCESS);
10124
  }
10125
- else
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10126
  {
10127
- var nativeStatus = WPGMZA.Geocoder.FAIL;
 
10128
 
10129
- if(status == google.maps.GeocoderStatus.ZERO_RESULTS)
10130
- nativeStatus = WPGMZA.Geocoder.ZERO_RESULTS;
 
10131
 
10132
- callback(null, nativeStatus);
10133
- }
10134
- });
10135
- }
10136
-
10137
- WPGMZA.GoogleGeocoder.prototype.getAddressFromLatLng = function(options, callback)
10138
- {
10139
- if(!options || !options.latLng)
10140
- throw new Error("No latLng specified");
10141
-
10142
- var latLng = new WPGMZA.LatLng(options.latLng);
10143
- var geocoder = this.getGoogleGeocoder();
10144
-
10145
- var options = $.extend(options, {
10146
- location: {
10147
- lat: latLng.lat,
10148
- lng: latLng.lng
10149
  }
10150
- });
10151
- delete options.latLng;
10152
-
10153
- geocoder.geocode(options, function(results, status) {
10154
 
10155
- if(status !== "OK")
10156
- callback(null, WPGMZA.Geocoder.FAIL);
10157
 
10158
- if(!results || !results.length)
10159
- callback([], WPGMZA.Geocoder.NO_RESULTS);
 
 
 
 
 
10160
 
10161
- callback([results[0].formatted_address], WPGMZA.Geocoder.SUCCESS);
 
10162
 
10163
- });
 
 
10164
  }
10165
-
10166
- });
10167
 
10168
- // js/v8/google-maps/google-html-overlay.js
10169
- /**
10170
- * @namespace WPGMZA
10171
- * @module GoogleHTMLOverlay
10172
- * @requires WPGMZA
10173
- */
10174
- jQuery(function($) {
10175
-
10176
- // https://developers.google.com/maps/documentation/javascript/customoverlays
10177
-
10178
- if(WPGMZA.settings.engine && WPGMZA.settings.engine != "google-maps")
10179
- return;
10180
 
10181
- if(!window.google || !window.google.maps)
10182
- return;
10183
 
10184
- WPGMZA.GoogleHTMLOverlay = function(map)
10185
  {
10186
- this.element = $("<div class='wpgmza-google-html-overlay'></div>");
10187
 
10188
- this.visible = true;
10189
- this.position = new WPGMZA.LatLng();
10190
 
10191
- this.setMap(map.googleMap);
10192
- this.wpgmzaMap = map;
 
10193
  }
10194
 
10195
- WPGMZA.GoogleHTMLOverlay.prototype = new google.maps.OverlayView();
10196
-
10197
- WPGMZA.GoogleHTMLOverlay.prototype.onAdd = function()
10198
  {
10199
- var panes = this.getPanes();
10200
- panes.overlayMouseTarget.appendChild(this.element[0]);
 
 
 
10201
 
10202
- /*google.maps.event.addDomListener(this.element, "click", function() {
10203
-
10204
- });*/
10205
- }
10206
-
10207
- WPGMZA.GoogleHTMLOverlay.prototype.onRemove = function()
10208
- {
10209
- if(this.element && $(this.element).parent().length)
10210
- {
10211
- $(this.element).remove();
10212
- this.element = null;
10213
- }
10214
  }
10215
 
10216
- WPGMZA.GoogleHTMLOverlay.prototype.draw = function()
10217
  {
10218
- this.updateElementPosition();
 
 
 
 
 
 
10219
  }
10220
 
10221
- /*WPGMZA.GoogleHTMLOverlay.prototype.setMap = function(map)
10222
  {
10223
- if(!(map instanceof WPGMZA.Map))
10224
- throw new Error("Map must be an instance of WPGMZA.Map");
10225
 
10226
- google.maps.OverlayView.prototype.setMap.call(this, map.googleMap);
10227
 
10228
- this.wpgmzaMap = map;
10229
- }*/
10230
-
10231
- /*WPGMZA.GoogleHTMLOverlay.prototype.getVisible = function()
10232
- {
10233
- return $(this.element).css("display") != "none";
 
 
10234
  }
10235
 
10236
- WPGMZA.GoogleHTMLOverlay.prototype.setVisible = function(visible)
10237
- {
10238
- $(this.element).css({
10239
- "display": (visible ? "block" : "none")
10240
- });
10241
- }*/
10242
-
10243
- /*WPGMZA.GoogleHTMLOverlay.prototype.getPosition = function()
10244
  {
10245
- return new WPGMZA.LatLng(this.position);
 
 
 
 
 
 
 
 
 
 
 
 
10246
  }
10247
 
10248
- WPGMZA.GoogleHTMLOverlay.prototype.setPosition = function(position)
 
 
 
 
10249
  {
10250
- if(!(position instanceof WPGMZA.LatLng))
10251
- throw new Error("Argument must be an instance of WPGMZA.LatLng");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10252
 
10253
- this.position = position;
10254
- this.updateElementPosition();
10255
- }*/
 
 
 
 
 
 
 
 
 
 
 
10256
 
10257
- WPGMZA.GoogleHTMLOverlay.prototype.updateElementPosition = function()
10258
  {
10259
- //var pixels = this.wpgmzaMap.latLngToPixels(this.position);
10260
-
10261
- var projection = this.getProjection();
10262
-
10263
- if(!projection)
10264
- return;
 
 
10265
 
10266
- var pixels = projection.fromLatLngToDivPixel(this.position.toGoogleLatLng());
 
10267
 
10268
- $(this.element).css({
10269
- "left": pixels.x,
10270
- "top": pixels.y
10271
- });
10272
  }
10273
- });
10274
-
10275
- // js/v8/google-maps/google-info-window.js
10276
- /**
10277
- * @namespace WPGMZA
10278
- * @module GoogleInfoWindow
10279
- * @requires WPGMZA.InfoWindow
10280
- * @pro-requires WPGMZA.ProInfoWindow
10281
- */
10282
- jQuery(function($) {
10283
 
10284
- var Parent;
 
 
 
10285
 
10286
- WPGMZA.GoogleInfoWindow = function(mapObject)
10287
  {
10288
- Parent.call(this, mapObject);
10289
-
10290
- this.setMapObject(mapObject);
10291
  }
10292
 
10293
- WPGMZA.GoogleInfoWindow.Z_INDEX = 99;
 
 
 
10294
 
10295
- if(WPGMZA.isProVersion())
10296
- Parent = WPGMZA.ProInfoWindow;
10297
- else
10298
- Parent = WPGMZA.InfoWindow;
10299
 
10300
- WPGMZA.GoogleInfoWindow.prototype = Object.create(Parent.prototype);
10301
- WPGMZA.GoogleInfoWindow.prototype.constructor = WPGMZA.GoogleInfoWindow;
 
 
10302
 
10303
- WPGMZA.GoogleInfoWindow.prototype.setMapObject = function(mapObject)
10304
  {
10305
- if(mapObject instanceof WPGMZA.Marker)
10306
- this.googleObject = mapObject.googleMarker;
10307
- else if(mapObject instanceof WPGMZA.Polygon)
10308
- this.googleObject = mapObject.googlePolygon;
10309
- else if(mapObject instanceof WPGMZA.Polyline)
10310
- this.googleObject = mapObject.googlePolyline;
10311
  }
10312
 
10313
- WPGMZA.GoogleInfoWindow.prototype.createGoogleInfoWindow = function()
10314
  {
10315
- var self = this;
10316
 
10317
- if(this.googleInfoWindow)
10318
  return;
10319
 
10320
- this.googleInfoWindow = new google.maps.InfoWindow();
10321
-
10322
- this.googleInfoWindow.setZIndex(WPGMZA.GoogleInfoWindow.Z_INDEX);
10323
-
10324
- google.maps.event.addListener(this.googleInfoWindow, "domready", function(event) {
10325
- self.trigger("domready");
10326
- });
10327
-
10328
- google.maps.event.addListener(this.googleInfoWindow, "closeclick", function(event) {
10329
-
10330
- if(self.state == WPGMZA.InfoWindow.STATE_CLOSED)
10331
- return;
10332
-
10333
- self.state = WPGMZA.InfoWindow.STATE_CLOSED;
10334
- self.trigger("infowindowclose");
10335
-
10336
- });
10337
  }
10338
 
10339
  /**
10340
- * Opens the info window
10341
- * @return boolean FALSE if the info window should not & will not open, TRUE if it will
10342
  */
10343
- WPGMZA.GoogleInfoWindow.prototype.open = function(map, mapObject)
10344
  {
10345
- var self = this;
10346
-
10347
- if(!Parent.prototype.open.call(this, map, mapObject))
10348
- return false;
10349
-
10350
- // Set parent for events to bubble up to
10351
- this.parent = map;
10352
-
10353
- this.createGoogleInfoWindow();
10354
- this.setMapObject(mapObject);
10355
-
10356
- if(this.googleObject instanceof google.maps.Polygon)
10357
  {
10358
-
10359
- }
10360
- else{
10361
- this.googleInfoWindow.open(
10362
- this.mapObject.map.googleMap,
10363
- this.googleObject
10364
- );
10365
  }
10366
 
10367
-
10368
-
10369
- var guid = WPGMZA.guid();
10370
- var html = "<div id='" + guid + "'>" + this.content + "</div>";
10371
-
10372
- this.googleInfoWindow.setContent(html);
10373
-
10374
- var intervalID;
10375
- intervalID = setInterval(function(event) {
10376
-
10377
- div = $("#" + guid);
10378
-
10379
- if(div.length)
10380
- {
10381
- clearInterval(intervalID);
10382
-
10383
- div[0].wpgmzaMapObject = self.mapObject;
10384
- div.addClass("wpgmza-infowindow");
10385
-
10386
- self.element = div[0];
10387
- self.trigger("infowindowopen");
10388
- }
10389
-
10390
- }, 50);
10391
-
10392
- return true;
10393
  }
10394
 
10395
- WPGMZA.GoogleInfoWindow.prototype.close = function()
10396
  {
10397
- if(!this.googleInfoWindow)
10398
- return;
10399
-
10400
- WPGMZA.InfoWindow.prototype.close.call(this);
 
 
 
10401
 
10402
- this.googleInfoWindow.close();
10403
  }
10404
 
10405
- WPGMZA.GoogleInfoWindow.prototype.setContent = function(html)
10406
  {
10407
- Parent.prototype.setContent.call(this, html);
10408
-
10409
- this.content = html;
10410
-
10411
- this.createGoogleInfoWindow();
10412
 
10413
- this.googleInfoWindow.setContent(html);
10414
  }
10415
 
10416
- WPGMZA.GoogleInfoWindow.prototype.setOptions = function(options)
10417
  {
10418
- Parent.prototype.setOptions.call(this, options);
10419
-
10420
- this.createGoogleInfoWindow();
10421
 
10422
- this.googleInfoWindow.setOptions(options);
10423
  }
10424
 
10425
- });
10426
-
10427
- // js/v8/google-maps/google-map.js
10428
- /**
10429
- * @namespace WPGMZA
10430
- * @module GoogleMap
10431
- * @requires WPGMZA.Map
10432
- * @pro-requires WPGMZA.ProMap
10433
- */
10434
- jQuery(function($) {
10435
- var Parent;
10436
-
10437
- /**
10438
- * Constructor
10439
- * @param element to contain the map
10440
- */
10441
- WPGMZA.GoogleMap = function(element, options)
10442
  {
10443
- var self = this;
10444
-
10445
- Parent.call(this, element, options);
10446
-
10447
- if(!window.google)
10448
- {
10449
- var status = WPGMZA.googleAPIStatus;
10450
- var message = "Google API not loaded";
10451
-
10452
- if(status && status.message)
10453
- message += " - " + status.message;
10454
-
10455
- if(status.code == "USER_CONSENT_NOT_GIVEN")
10456
- {
10457
- return;
10458
- }
10459
-
10460
- $(element).html("<div class='notice notice-error'><p>" + WPGMZA.localized_strings.google_api_not_loaded + "<pre>" + message + "</pre></p></div>");
10461
-
10462
- throw new Error(message);
10463
- }
10464
-
10465
- this.loadGoogleMap();
10466
-
10467
- if(options)
10468
- this.setOptions(options, true);
10469
-
10470
- google.maps.event.addListener(this.googleMap, "click", function(event) {
10471
- var wpgmzaEvent = new WPGMZA.Event("click");
10472
- wpgmzaEvent.latLng = {
10473
- lat: event.latLng.lat(),
10474
- lng: event.latLng.lng()
10475
- };
10476
- self.dispatchEvent(wpgmzaEvent);
10477
- });
10478
-
10479
- google.maps.event.addListener(this.googleMap, "rightclick", function(event) {
10480
- var wpgmzaEvent = new WPGMZA.Event("rightclick");
10481
- wpgmzaEvent.latLng = {
10482
- lat: event.latLng.lat(),
10483
- lng: event.latLng.lng()
10484
- };
10485
- self.dispatchEvent(wpgmzaEvent);
10486
- });
10487
 
10488
- google.maps.event.addListener(this.googleMap, "dragend", function(event) {
10489
- self.dispatchEvent("dragend");
10490
- });
 
 
 
10491
 
10492
- google.maps.event.addListener(this.googleMap, "zoom_changed", function(event) {
10493
- self.dispatchEvent("zoom_changed");
10494
- self.dispatchEvent("zoomchanged");
10495
- });
 
 
10496
 
10497
- // Idle event
10498
- google.maps.event.addListener(this.googleMap, "idle", function(event) {
10499
- self.onIdle(event);
10500
- });
 
 
10501
 
10502
- // Dispatch event
10503
- if(!WPGMZA.isProVersion())
10504
- {
10505
- this.trigger("init");
10506
-
10507
- this.dispatchEvent("created");
10508
- WPGMZA.events.dispatchEvent({type: "mapcreated", map: this});
10509
-
10510
- // Legacy event
10511
- $(this.element).trigger("wpgooglemaps_loaded");
10512
- }
10513
  }
10514
 
10515
- // If we're running the Pro version, inherit from ProMap, otherwise, inherit from Map
10516
- if(WPGMZA.isProVersion())
10517
  {
10518
- Parent = WPGMZA.ProMap;
10519
- WPGMZA.GoogleMap.prototype = Object.create(WPGMZA.ProMap.prototype);
 
10520
  }
10521
- else
 
10522
  {
10523
- Parent = WPGMZA.Map;
10524
- WPGMZA.GoogleMap.prototype = Object.create(WPGMZA.Map.prototype);
 
10525
  }
10526
- WPGMZA.GoogleMap.prototype.constructor = WPGMZA.GoogleMap;
10527
 
10528
- WPGMZA.GoogleMap.parseThemeData = function(raw)
10529
  {
10530
- var json;
 
 
 
 
 
 
 
 
 
10531
 
10532
- try{
10533
- json = JSON.parse(raw); // Try to parse strict JSON
10534
- }catch(e) {
10535
-
10536
- try{
10537
-
10538
- json = eval(raw); // Try to parse JS object
10539
-
10540
- }catch(e) {
10541
-
10542
- var str = raw;
10543
-
10544
- str = str.replace(/\\'/g, '\'');
10545
- str = str.replace(/\\"/g, '"');
10546
- str = str.replace(/\\0/g, '\0');
10547
- str = str.replace(/\\\\/g, '\\');
10548
-
10549
- try{
10550
-
10551
- json = eval(str);
10552
-
10553
- }catch(e) {
10554
-
10555
- console.warn("Couldn't parse theme data");
10556
-
10557
- return [];
10558
-
10559
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10560
 
10561
- }
 
 
 
 
 
10562
 
 
10563
  }
10564
-
10565
- return json;
10566
  }
10567
 
10568
- /**
10569
- * Creates the Google Maps map
10570
- * @return void
10571
- */
10572
- WPGMZA.GoogleMap.prototype.loadGoogleMap = function()
10573
  {
10574
  var self = this;
10575
- var options = this.settings.toGoogleMapsOptions();
10576
 
10577
- this.googleMap = new google.maps.Map(this.engineElement, options);
10578
 
10579
- google.maps.event.addListener(this.googleMap, "bounds_changed", function() {
10580
- self.onBoundsChanged();
10581
- });
10582
 
10583
- if(this.settings.bicycle == 1)
10584
- this.enableBicycleLayer(true);
10585
- if(this.settings.traffic == 1)
10586
- this.enableTrafficLayer(true);
10587
- if(this.settings.transport == 1)
10588
- this.enablePublicTransportLayer(true);
10589
- this.showPointsOfInterest(this.settings.show_point_of_interest);
10590
 
10591
- // Move the loading wheel into the map element (it has to live outside in the HTML file because it'll be overwritten by Google otherwise)
10592
- $(this.engineElement).append($(this.element).find(".wpgmza-loader"));
 
10593
  }
10594
 
10595
- WPGMZA.GoogleMap.prototype.setOptions = function(options, initializing)
10596
  {
10597
- Parent.prototype.setOptions.call(this, options);
 
 
 
 
 
 
10598
 
10599
- if(options.scrollwheel)
10600
- delete options.scrollwheel; // NB: Delete this when true, scrollwheel: true breaks gesture handling
 
 
10601
 
10602
- if(!initializing)
10603
- {
10604
- this.googleMap.setOptions(options);
10605
- return;
10606
- }
10607
 
10608
- var converted = $.extend(options, this.settings.toGoogleMapsOptions());
 
10609
 
10610
- var clone = $.extend({}, converted);
10611
- if(!clone.center instanceof google.maps.LatLng && (clone.center instanceof WPGMZA.LatLng || typeof clone.center == "object"))
10612
- clone.center = {
10613
- lat: parseFloat(clone.center.lat),
10614
- lng: parseFloat(clone.center.lng)
10615
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10616
 
10617
- if(this.settings.hide_point_of_interest == "1")
10618
  {
10619
- var noPoi = {
10620
- featureType: "poi",
10621
- elementType: "labels",
10622
- stylers: [
10623
- {
10624
- visibility: "off"
10625
- }
10626
- ]
10627
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10628
 
10629
- if(!clone.styles)
10630
- clone.styles = [];
 
 
 
 
 
10631
 
10632
- clone.styles.push(noPoi);
 
10633
  }
 
 
10634
 
10635
- this.googleMap.setOptions(clone);
10636
- }
10637
-
10638
- /**
10639
- * Adds the specified marker to this map
10640
- * @return void
10641
- */
10642
- WPGMZA.GoogleMap.prototype.addMarker = function(marker)
10643
- {
10644
- marker.googleMarker.setMap(this.googleMap);
10645
-
10646
- Parent.prototype.addMarker.call(this, marker);
10647
- }
10648
-
10649
- /**
10650
- * Removes the specified marker from this map
10651
- * @return void
10652
- */
10653
- WPGMZA.GoogleMap.prototype.removeMarker = function(marker) {
10654
-
10655
- marker.googleMarker.setMap(null);
10656
-
10657
- Parent.prototype.removeMarker.call(this, marker);
10658
- }
10659
-
10660
- /**
10661
- * Adds the specified polygon to this map
10662
- * @return void
10663
- */
10664
- WPGMZA.GoogleMap.prototype.addPolygon = function(polygon)
10665
- {
10666
- polygon.googlePolygon.setMap(this.googleMap);
10667
-
10668
- Parent.prototype.addPolygon.call(this, polygon);
10669
- }
10670
-
10671
- /**
10672
- * Removes the specified polygon from this map
10673
- * @return void
10674
- */
10675
- WPGMZA.GoogleMap.prototype.removePolygon = function(polygon)
10676
- {
10677
- polygon.googlePolygon.setMap(null);
10678
-
10679
- Parent.prototype.removePolygon.call(this, polygon);
10680
  }
10681
 
10682
- /**
10683
- * Adds the specified polyline to this map
10684
- * @return void
10685
- */
10686
- WPGMZA.GoogleMap.prototype.addPolyline = function(polyline)
10687
- {
10688
- polyline.googlePolyline.setMap(this.googleMap);
10689
-
10690
- Parent.prototype.addPolyline.call(this, polyline);
10691
- }
10692
 
10693
- /**
10694
- * Removes the specified polygon from this map
10695
- * @return void
10696
- */
10697
- WPGMZA.GoogleMap.prototype.removePolyline = function(polyline)
10698
- {
10699
- polyline.googlePolyline.setMap(null);
10700
-
10701
- Parent.prototype.removePolyline.call(this, polyline);
10702
- }
10703
 
10704
- WPGMZA.GoogleMap.prototype.addCircle = function(circle)
10705
- {
10706
- circle.googleCircle.setMap(this.googleMap);
10707
-
10708
- Parent.prototype.addCircle.call(this, circle);
10709
- }
10710
 
10711
- WPGMZA.GoogleMap.prototype.removeCircle = function(circle)
10712
- {
10713
- circle.googleCircle.setMap(null);
10714
-
10715
- Parent.prototype.removeCircle.call(this, circle);
10716
- }
10717
 
10718
- WPGMZA.GoogleMap.prototype.addRectangle = function(rectangle)
10719
  {
10720
- rectangle.googleRectangle.setMap(this.googleMap);
 
 
 
 
 
10721
 
10722
- Parent.prototype.addRectangle.call(this, rectangle);
10723
  }
10724
 
10725
- WPGMZA.GoogleMap.prototype.removeRectangle = function(rectangle)
10726
  {
10727
- rectangle.googleRectangle.setMap(null);
 
10728
 
10729
- Parent.prototype.removeRectangle.call(this, rectangle);
10730
  }
10731
 
10732
- /**
10733
- * Delegate for google maps getCenter
10734
- * @return void
10735
- */
10736
- WPGMZA.GoogleMap.prototype.getCenter = function()
10737
  {
10738
- var latLng = this.googleMap.getCenter();
10739
 
10740
- return {
10741
- lat: latLng.lat(),
10742
- lng: latLng.lng()
10743
- };
10744
- }
10745
-
10746
- /**
10747
- * Delegate for google maps setCenter
10748
- * @return void
10749
- */
10750
- WPGMZA.GoogleMap.prototype.setCenter = function(latLng)
10751
- {
10752
- WPGMZA.Map.prototype.setCenter.call(this, latLng);
10753
 
10754
- if(latLng instanceof WPGMZA.LatLng)
10755
- this.googleMap.setCenter({
10756
- lat: latLng.lat,
10757
- lng: latLng.lng
10758
- });
10759
- else
10760
- this.googleMap.setCenter(latLng);
10761
- }
10762
-
10763
- /**
10764
- * Delegate for google maps setPan
10765
- * @return void
10766
- */
10767
- WPGMZA.GoogleMap.prototype.panTo = function(latLng)
10768
- {
10769
- if(latLng instanceof WPGMZA.LatLng)
10770
- this.googleMap.panTo({
10771
- lat: latLng.lat,
10772
- lng: latLng.lng
10773
  });
10774
- else
10775
- this.googleMap.panTo(latLng);
10776
- }
10777
-
10778
- /**
10779
- * Delegate for google maps getCenter
10780
- * @return void
10781
- */
10782
- WPGMZA.GoogleMap.prototype.getZoom = function()
10783
- {
10784
- return this.googleMap.getZoom();
10785
- }
10786
-
10787
- /**
10788
- * Delegate for google maps getZoom
10789
- * @return void
10790
- */
10791
- WPGMZA.GoogleMap.prototype.setZoom = function(value)
10792
- {
10793
- if(isNaN(value))
10794
- throw new Error("Value must not be NaN");
10795
 
10796
- return this.googleMap.setZoom(parseInt(value));
10797
  }
10798
 
10799
- /**
10800
- * Gets the bounds
10801
- * @return object
10802
- */
10803
- WPGMZA.GoogleMap.prototype.getBounds = function()
10804
  {
10805
- var bounds = this.googleMap.getBounds();
10806
- var northEast = bounds.getNorthEast();
10807
- var southWest = bounds.getSouthWest();
10808
-
10809
- var nativeBounds = new WPGMZA.LatLngBounds({});
10810
-
10811
- nativeBounds.north = northEast.lat();
10812
- nativeBounds.south = southWest.lat();
10813
- nativeBounds.west = southWest.lng();
10814
- nativeBounds.east = northEast.lng();
10815
-
10816
- // Backward compatibility
10817
- nativeBounds.topLeft = {
10818
- lat: northEast.lat(),
10819
- lng: southWest.lng()
10820
- };
10821
-
10822
- nativeBounds.bottomRight = {
10823
- lat: southWest.lat(),
10824
- lng: northEast.lng()
10825
- };
10826
-
10827
- return nativeBounds;
10828
  }
10829
 
10830
- /**
10831
- * Fit to given boundaries
10832
- * @return void
10833
- */
10834
- WPGMZA.GoogleMap.prototype.fitBounds = function(southWest, northEast)
10835
  {
10836
- if(southWest instanceof WPGMZA.LatLng)
10837
- southWest = {lat: southWest.lat, lng: southWest.lng};
10838
- if(northEast instanceof WPGMZA.LatLng)
10839
- northEast = {lat: northEast.lat, lng: northEast.lng};
10840
- else if(southWest instanceof WPGMZA.LatLngBounds)
10841
  {
10842
- var bounds = southWest;
10843
-
10844
- southWest = {
10845
- lat: bounds.south,
10846
- lng: bounds.west
10847
- };
 
 
10848
 
10849
- northEast = {
10850
- lat: bounds.north,
10851
- lng: bounds.east
10852
- };
 
 
 
10853
  }
10854
 
10855
- var nativeBounds = new google.maps.LatLngBounds(southWest, northEast);
10856
- this.googleMap.fitBounds(nativeBounds);
10857
  }
10858
 
10859
- /**
10860
- * Fit the map boundaries to visible markers
10861
- * @return void
10862
- */
10863
- WPGMZA.GoogleMap.prototype.fitBoundsToVisibleMarkers = function()
10864
  {
10865
- var bounds = new google.maps.LatLngBounds();
10866
- for(var i = 0; i < this.markers.length; i++)
10867
  {
10868
- if(markers[i].getVisible())
10869
- bounds.extend(markers[i].getPosition());
10870
  }
10871
- this.googleMap.fitBounds(bounds);
 
10872
  }
10873
 
10874
- /**
10875
- * Enables / disables the bicycle layer
10876
- * @param enable boolean, enable or not
10877
- * @return void
10878
- */
10879
- WPGMZA.GoogleMap.prototype.enableBicycleLayer = function(enable)
10880
  {
10881
- if(!this.bicycleLayer)
10882
- this.bicycleLayer = new google.maps.BicyclingLayer();
10883
 
10884
- this.bicycleLayer.setMap(
10885
- enable ? this.googleMap : null
10886
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10887
  }
10888
 
10889
- /**
10890
- * Enables / disables the bicycle layer
10891
- * @param enable boolean, enable or not
10892
- * @return void
10893
- */
10894
- WPGMZA.GoogleMap.prototype.enableTrafficLayer = function(enable)
10895
  {
10896
- if(!this.trafficLayer)
10897
- this.trafficLayer = new google.maps.TrafficLayer();
10898
 
10899
- this.trafficLayer.setMap(
10900
- enable ? this.googleMap : null
10901
- );
10902
- }
10903
 
10904
- /**
10905
- * Enables / disables the bicycle layer
10906
- * @param enable boolean, enable or not
10907
- * @return void
10908
- */
10909
- WPGMZA.GoogleMap.prototype.enablePublicTransportLayer = function(enable)
10910
- {
10911
- if(!this.publicTransportLayer)
10912
- this.publicTransportLayer = new google.maps.TransitLayer();
10913
-
10914
- this.publicTransportLayer.setMap(
10915
- enable ? this.googleMap : null
10916
- );
10917
  }
10918
 
10919
- /**
10920
- * Shows / hides points of interest
10921
- * @param show boolean, enable or not
10922
- * @return void
10923
- */
10924
- WPGMZA.GoogleMap.prototype.showPointsOfInterest = function(show)
10925
  {
10926
- // TODO: This will bug the front end because there is no textarea with theme data
10927
- var text = $("textarea[name='theme_data']").val();
10928
-
10929
- if(!text)
10930
  return;
 
10931
 
10932
- var styles = JSON.parse(text);
10933
-
10934
- styles.push({
10935
- featureType: "poi",
10936
- stylers: [
10937
- {
10938
- visibility: (show ? "on" : "off")
10939
- }
10940
- ]
10941
- });
10942
 
10943
- this.googleMap.setOptions({styles: styles});
 
 
10944
  }
10945
 
10946
- /**
10947
- * Gets the min zoom of the map
10948
- * @return int
10949
- */
10950
- WPGMZA.GoogleMap.prototype.getMinZoom = function()
10951
  {
10952
- return parseInt(this.settings.min_zoom);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10953
  }
10954
 
10955
- /**
10956
- * Sets the min zoom of the map
10957
- * @return void
10958
- */
10959
- WPGMZA.GoogleMap.prototype.setMinZoom = function(value)
10960
  {
10961
- this.googleMap.setOptions({
10962
- minZoom: value,
10963
- maxZoom: this.getMaxZoom()
10964
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10965
  }
10966
 
10967
- /**
10968
- * Gets the min zoom of the map
10969
- * @return int
10970
- */
10971
- WPGMZA.GoogleMap.prototype.getMaxZoom = function()
10972
  {
10973
- return parseInt(this.settings.max_zoom);
 
 
 
 
 
 
10974
  }
10975
 
10976
- /**
10977
- * Sets the min zoom of the map
10978
- * @return void
10979
- */
10980
- WPGMZA.GoogleMap.prototype.setMaxZoom = function(value)
10981
  {
10982
- this.googleMap.setOptions({
10983
- minZoom: this.getMinZoom(),
10984
- maxZoom: value
 
 
 
 
10985
  });
10986
  }
10987
 
10988
- WPGMZA.GoogleMap.prototype.latLngToPixels = function(latLng)
10989
  {
10990
- var map = this.googleMap;
10991
- var nativeLatLng = new google.maps.LatLng({
10992
- lat: parseFloat(latLng.lat),
10993
- lng: parseFloat(latLng.lng)
 
 
 
 
 
10994
  });
10995
- var topRight = map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast());
10996
- var bottomLeft = map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest());
10997
- var scale = Math.pow(2, map.getZoom());
10998
- var worldPoint = map.getProjection().fromLatLngToPoint(nativeLatLng);
10999
- return {
11000
- x: (worldPoint.x - bottomLeft.x) * scale,
11001
- y: (worldPoint.y - topRight.y) * scale
11002
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11003
  }
11004
 
11005
- WPGMZA.GoogleMap.prototype.pixelsToLatLng = function(x, y)
11006
  {
11007
- if(y == undefined)
11008
- {
11009
- if("x" in x && "y" in x)
11010
- {
11011
- y = x.y;
11012
- x = x.x;
11013
- }
11014
- else
11015
- console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)");
11016
- }
11017
 
11018
- var map = this.googleMap;
11019
- var topRight = map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast());
11020
- var bottomLeft = map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest());
11021
- var scale = Math.pow(2, map.getZoom());
11022
- var worldPoint = new google.maps.Point(x / scale + bottomLeft.x, y / scale + topRight.y);
11023
- var latLng = map.getProjection().fromPointToLatLng(worldPoint);
11024
- return {
11025
- lat: latLng.lat(),
11026
- lng: latLng.lng()
11027
- };
11028
  }
11029
 
11030
  /**
11031
- * Handle the map element resizing
11032
- * @return void
11033
  */
11034
- WPGMZA.GoogleMap.prototype.onElementResized = function(event)
11035
  {
11036
- if(!this.googleMap)
11037
- return;
11038
- google.maps.event.trigger(this.googleMap, "resize");
11039
- }
11040
-
11041
- WPGMZA.GoogleMap.prototype.enableAllInteractions = function()
11042
- {
11043
- var options = {};
11044
-
11045
- options.scrollwheel = true;
11046
- options.draggable = true;
11047
- options.disableDoubleClickZoom = false;
11048
-
11049
- this.googleMap.setOptions(options);
11050
  }
11051
 
11052
  });
11053
 
11054
- // js/v8/google-maps/google-marker.js
11055
  /**
11056
  * @namespace WPGMZA
11057
- * @module GoogleMarker
11058
- * @requires WPGMZA.Marker
11059
- * @pro-requires WPGMZA.ProMarker
11060
  */
11061
  jQuery(function($) {
11062
 
11063
- var Parent;
 
 
 
11064
 
11065
- WPGMZA.GoogleMarker = function(row)
 
 
 
11066
  {
11067
  var self = this;
 
 
11068
 
11069
- Parent.call(this, row);
11070
-
11071
- this._opacity = 1.0;
11072
 
11073
- var settings = {};
11074
- if(row)
11075
- {
11076
- for(var name in row)
11077
  {
11078
- if(row[name] instanceof WPGMZA.LatLng)
11079
- {
11080
- settings[name] = row[name].toGoogleLatLng();
11081
- }
11082
- else if(row[name] instanceof WPGMZA.Map || name == "icon")
11083
- {
11084
- // NB: Ignore map here, it's not a google.maps.Map, Google would throw an exception
11085
- // NB: Ignore icon here, it conflicts with updateIcon in Pro
11086
- }
11087
- else
11088
- settings[name] = row[name];
11089
  }
11090
- }
11091
-
11092
- this.googleMarker = new google.maps.Marker(settings);
11093
- this.googleMarker.wpgmzaMarker = this;
11094
-
11095
- this.googleMarker.setPosition(new google.maps.LatLng({
11096
- lat: parseFloat(this.lat),
11097
- lng: parseFloat(this.lng)
11098
- }));
11099
-
11100
- // this.googleMarker.setLabel(this.settings.label);
11101
-
11102
- if(this.anim)
11103
- this.googleMarker.setAnimation(this.anim);
11104
- if(this.animation)
11105
- this.googleMarker.setAnimation(this.animation);
11106
 
11107
- google.maps.event.addListener(this.googleMarker, "click", function() {
11108
- self.dispatchEvent("click");
11109
- self.dispatchEvent("select");
11110
- });
11111
 
11112
- google.maps.event.addListener(this.googleMarker, "mouseover", function() {
11113
- self.dispatchEvent("mouseover");
11114
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11115
 
11116
- google.maps.event.addListener(this.googleMarker, "dragend", function() {
11117
- var googleMarkerPosition = self.googleMarker.getPosition();
11118
-
11119
- self.setPosition({
11120
- lat: googleMarkerPosition.lat(),
11121
- lng: googleMarkerPosition.lng()
11122
- });
11123
-
11124
- self.dispatchEvent({
11125
- type: "dragend",
11126
- latLng: self.getPosition()
11127
- });
11128
- });
11129
 
11130
- this.trigger("init");
 
 
 
 
 
11131
  }
11132
 
11133
- if(WPGMZA.isProVersion())
11134
- Parent = WPGMZA.ProMarker;
11135
- else
11136
- Parent = WPGMZA.Marker;
11137
- WPGMZA.GoogleMarker.prototype = Object.create(Parent.prototype);
11138
- WPGMZA.GoogleMarker.prototype.constructor = WPGMZA.GoogleMarker;
11139
-
11140
- Object.defineProperty(WPGMZA.GoogleMarker.prototype, "opacity", {
11141
 
11142
- "get": function() {
11143
- return this._opacity;
11144
- },
11145
 
11146
- "set": function(value) {
11147
- this._opacity = value;
11148
- this.googleMarker.setOpacity(value);
 
 
 
 
 
 
 
11149
  }
11150
 
11151
- });
 
11152
 
11153
- WPGMZA.GoogleMarker.prototype.setLabel = function(label)
11154
  {
11155
- if(!label)
11156
- {
11157
- this.googleMarker.setLabel(null);
11158
- return;
11159
- }
11160
-
11161
- this.googleMarker.setLabel({
11162
- text: label
11163
- });
11164
 
11165
- if(!this.googleMarker.getIcon())
11166
- this.googleMarker.setIcon(WPGMZA.settings.default_marker_icon);
 
11167
  }
11168
 
11169
- /**
11170
- * Sets the position of the marker
11171
- * @return void
11172
- */
11173
- WPGMZA.GoogleMarker.prototype.setPosition = function(latLng)
 
 
 
 
 
 
11174
  {
11175
- Parent.prototype.setPosition.call(this, latLng);
11176
- this.googleMarker.setPosition({
11177
- lat: this.lat,
11178
- lng: this.lng
11179
- });
 
 
 
 
 
11180
  }
11181
 
11182
- /**
11183
- * Sets the position offset of a marker
11184
- * @return void
11185
- */
11186
- WPGMZA.GoogleMarker.prototype.updateOffset = function()
 
 
 
 
 
 
 
 
 
 
 
 
11187
  {
11188
  var self = this;
11189
- var icon = this.googleMarker.getIcon();
11190
- var img = new Image();
11191
- var params;
11192
- var x = this._offset.x;
11193
- var y = this._offset.y;
11194
 
11195
- if(!icon)
11196
- icon = WPGMZA.settings.default_marker_icon;
11197
 
11198
- if(typeof icon == "string")
11199
- params = {
11200
- url: icon
11201
- };
11202
- else
11203
- params = icon;
11204
 
11205
- img.onload = function()
11206
  {
11207
- var defaultAnchor = {
11208
- x: img.width / 2,
11209
- y: img.height
11210
- };
 
11211
 
11212
- params.anchor = new google.maps.Point(defaultAnchor.x - x, defaultAnchor.y - y);
 
 
 
 
 
 
 
 
 
 
 
11213
 
11214
- self.googleMarker.setIcon(params);
 
 
11215
  }
11216
 
11217
- img.src = params.url;
11218
- }
11219
-
11220
- WPGMZA.GoogleMarker.prototype.setOptions = function(options)
11221
- {
11222
- this.googleMarker.setOptions(options);
 
 
 
 
11223
  }
11224
 
11225
- /**
11226
- * Set the marker animation
11227
- * @return void
11228
- */
11229
- WPGMZA.GoogleMarker.prototype.setAnimation = function(animation)
11230
- {
11231
- Parent.prototype.setAnimation.call(this, animation);
11232
- this.googleMarker.setAnimation(animation);
11233
- }
11234
 
11235
- /**
11236
- * Sets the visibility of the marker
11237
- * @return void
11238
- */
11239
- WPGMZA.GoogleMarker.prototype.setVisible = function(visible)
11240
  {
11241
- Parent.prototype.setVisible.call(this, visible);
 
 
 
 
 
11242
 
11243
- this.googleMarker.setVisible(visible ? true : false);
 
 
 
 
 
11244
  }
11245
 
11246
- WPGMZA.GoogleMarker.prototype.getVisible = function(visible)
11247
  {
11248
- return this.googleMarker.getVisible();
 
 
 
11249
  }
11250
 
11251
- WPGMZA.GoogleMarker.prototype.setDraggable = function(draggable)
11252
  {
11253
- this.googleMarker.setDraggable(draggable);
11254
  }
11255
 
11256
- WPGMZA.GoogleMarker.prototype.setOpacity = function(opacity)
11257
  {
11258
- this.googleMarker.setOpacity(opacity);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11259
  }
11260
 
11261
  });
11262
 
11263
- // js/v8/google-maps/google-modern-store-locator-circle.js
11264
  /**
11265
  * @namespace WPGMZA
11266
- * @module GoogleModernStoreLocatorCircle
11267
- * @requires WPGMZA.ModernStoreLocatorCircle
11268
  */
11269
  jQuery(function($) {
11270
 
11271
- WPGMZA.GoogleModernStoreLocatorCircle = function(map, settings)
 
 
11272
  {
11273
  var self = this;
11274
 
11275
- WPGMZA.ModernStoreLocatorCircle.call(this, map, settings);
11276
 
11277
- this.intervalID = setInterval(function() {
11278
-
11279
- var mapSize = {
11280
- width: $(self.mapElement).width(),
11281
- height: $(self.mapElement).height()
11282
- };
11283
-
11284
- if(mapSize.width == self.mapSize.width && mapSize.height == self.mapSize.height)
11285
- return;
11286
 
11287
- self.canvasLayer.resize_();
11288
- self.canvasLayer.draw();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11289
 
11290
- self.mapSize = mapSize;
 
11291
 
11292
- }, 1000);
 
 
 
11293
 
11294
- $(document).bind('webkitfullscreenchange mozfullscreenchange fullscreenchange', function() {
11295
-
11296
- self.canvasLayer.resize_();
11297
- self.canvasLayer.draw();
11298
-
11299
  });
11300
- }
11301
-
11302
- WPGMZA.GoogleModernStoreLocatorCircle.prototype = Object.create(WPGMZA.ModernStoreLocatorCircle.prototype);
11303
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.constructor = WPGMZA.GoogleModernStoreLocatorCircle;
11304
-
11305
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.initCanvasLayer = function()
11306
- {
11307
- var self = this;
11308
-
11309
- if(this.canvasLayer)
11310
- {
11311
- this.canvasLayer.setMap(null);
11312
- this.canvasLayer.setAnimate(false);
11313
- }
11314
 
11315
- this.canvasLayer = new CanvasLayer({
11316
- map: this.map.googleMap,
11317
- resizeHandler: function(event) {
11318
- self.onResize(event);
11319
- },
11320
- updateHandler: function(event) {
11321
- self.onUpdate(event);
11322
- },
11323
- animate: true,
11324
- resolutionScale: this.getResolutionScale()
11325
- });
11326
  }
11327
 
11328
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.setOptions = function(options)
 
 
 
 
 
11329
  {
11330
- WPGMZA.ModernStoreLocatorCircle.prototype.setOptions.call(this, options);
11331
 
11332
- this.canvasLayer.scheduleUpdate();
 
 
 
 
 
 
11333
  }
11334
 
11335
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.setPosition = function(position)
11336
  {
11337
- WPGMZA.ModernStoreLocatorCircle.prototype.setPosition.call(this, position);
11338
-
11339
- this.canvasLayer.scheduleUpdate();
 
11340
  }
11341
 
11342
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.setRadius = function(radius)
11343
  {
11344
- WPGMZA.ModernStoreLocatorCircle.prototype.setRadius.call(this, radius);
11345
 
11346
- this.canvasLayer.scheduleUpdate();
11347
  }
11348
 
11349
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.getTransformedRadius = function(km)
11350
  {
11351
- var multiplierAtEquator = 0.006395;
11352
- var spherical = google.maps.geometry.spherical;
11353
-
11354
- var center = this.settings.center;
11355
- var equator = new WPGMZA.LatLng({
11356
- lat: 0.0,
11357
- lng: 0.0
11358
- });
11359
- var latitude = new WPGMZA.LatLng({
11360
- lat: center.lat,
11361
- lng: 0.0
11362
- });
11363
 
11364
- var offsetAtEquator = spherical.computeOffset(equator.toGoogleLatLng(), km * 1000, 90);
11365
- var offsetAtLatitude = spherical.computeOffset(latitude.toGoogleLatLng(), km * 1000, 90);
11366
 
11367
- var factor = offsetAtLatitude.lng() / offsetAtEquator.lng();
11368
- var result = km * multiplierAtEquator * factor;
 
 
 
11369
 
11370
- if(isNaN(result))
11371
- throw new Error("here");
 
11372
 
11373
- return result;
11374
- }
11375
-
11376
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCanvasDimensions = function()
11377
- {
11378
- return {
11379
- width: this.canvasLayer.canvas.width,
11380
- height: this.canvasLayer.canvas.height
11381
- };
11382
  }
11383
 
11384
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.getWorldOriginOffset = function()
11385
  {
11386
- var projection = this.map.googleMap.getProjection();
11387
- var position = projection.fromLatLngToPoint(this.canvasLayer.getTopLeft());
11388
 
11389
- return {
11390
- x: -position.x,
11391
- y: -position.y
11392
- };
11393
- }
11394
-
11395
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCenterPixels = function()
11396
- {
11397
- var center = new WPGMZA.LatLng(this.settings.center);
11398
- var projection = this.map.googleMap.getProjection();
11399
- return projection.fromLatLngToPoint(center.toGoogleLatLng());
11400
- }
11401
-
11402
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.getContext = function(type)
11403
- {
11404
- return this.canvasLayer.canvas.getContext("2d");
11405
- }
11406
-
11407
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.getScale = function()
11408
- {
11409
- return Math.pow(2, this.map.getZoom()) * this.getResolutionScale();
11410
- }
11411
-
11412
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.setVisible = function(visible)
11413
- {
11414
- WPGMZA.ModernStoreLocatorCircle.prototype.setVisible.call(this, visible);
11415
 
11416
- this.canvasLayer.scheduleUpdate();
11417
- }
11418
-
11419
- WPGMZA.GoogleModernStoreLocatorCircle.prototype.destroy = function()
11420
- {
11421
- this.canvasLayer.setMap(null);
11422
- this.canvasLayer = null;
 
 
11423
 
11424
- clearInterval(this.intervalID);
11425
  }
11426
 
11427
  });
11428
 
11429
- // js/v8/google-maps/google-modern-store-locator.js
11430
  /**
11431
  * @namespace WPGMZA
11432
- * @module GoogleModernStoreLocator
11433
- * @requires WPGMZA.ModernStoreLocator
11434
  */
11435
  jQuery(function($) {
11436
 
11437
- WPGMZA.GoogleModernStoreLocator = function(map_id)
11438
  {
11439
- var googleMap, self = this;
11440
-
11441
- this.map = WPGMZA.getMapByID(map_id);
11442
-
11443
- WPGMZA.ModernStoreLocator.call(this, map_id);
11444
-
11445
- var options = {
11446
- fields: ["name", "formatted_address"],
11447
- types: ["geocode"]
11448
- };
11449
- var restrict = wpgmaps_localize[map_id]["other_settings"]["wpgmza_store_locator_restrict"];
11450
-
11451
- this.addressInput = $(this.element).find(".addressInput, #addressInput")[0];
11452
-
11453
- if(this.addressInput)
11454
- {
11455
- if(restrict && restrict.length)
11456
- options.componentRestrictions = {
11457
- country: restrict
11458
- };
11459
-
11460
- this.autoComplete = new google.maps.places.Autocomplete(
11461
- this.addressInput,
11462
- options
11463
- );
11464
- }
11465
 
11466
- // Positioning for Google
11467
- this.map.googleMap.controls[google.maps.ControlPosition.TOP_CENTER].push(this.element);
11468
  }
11469
 
11470
- WPGMZA.GoogleModernStoreLocator.prototype = Object.create(WPGMZA.ModernStoreLocator.prototype);
11471
- WPGMZA.GoogleModernStoreLocator.prototype.constructor = WPGMZA.GoogleModernStoreLocator;
11472
-
11473
  });
11474
 
11475
- // js/v8/google-maps/google-polygon.js
11476
  /**
11477
  * @namespace WPGMZA
11478
- * @module GooglePolygon
11479
- * @requires WPGMZA.Polygon
11480
- * @pro-requires WPGMZA.ProPolygon
11481
  */
11482
  jQuery(function($) {
11483
 
11484
- var Parent;
11485
-
11486
- WPGMZA.GooglePolygon = function(options, googlePolygon)
11487
  {
11488
  var self = this;
11489
-
11490
- Parent.call(this, options, googlePolygon);
11491
-
11492
- if(googlePolygon)
11493
  {
11494
- this.googlePolygon = googlePolygon;
 
 
 
 
 
11495
  }
 
 
 
11496
  else
11497
  {
11498
- this.googlePolygon = new google.maps.Polygon();
11499
 
11500
- if(options)
11501
- {
11502
- var googleOptions = $.extend({}, options);
11503
-
11504
- if(options.polydata)
11505
- googleOptions.paths = this.parseGeometry(options.polydata);
11506
-
11507
- if(options.linecolor)
11508
- googleOptions.strokeColor = "#" + options.linecolor;
11509
-
11510
- if(options.lineopacity)
11511
- googleOptions.strokeOpacity = parseFloat(options.lineopacity);
11512
-
11513
- if(options.fillcolor)
11514
- googleOptions.fillColor = "#" + options.fillcolor;
11515
-
11516
- if(options.opacity)
11517
- googleOptions.fillOpacity = parseFloat(options.opacity);
11518
-
11519
- this.googlePolygon.setOptions(googleOptions);
11520
- }
11521
  }
11522
 
11523
- this.googlePolygon.wpgmzaPolygon = this;
11524
-
11525
- google.maps.event.addListener(this.googlePolygon, "click", function() {
11526
- self.dispatchEvent({type: "click"});
11527
- });
11528
- }
11529
-
11530
- if(WPGMZA.isProVersion())
11531
- Parent = WPGMZA.ProPolygon;
11532
- else
11533
- Parent = WPGMZA.Polygon;
11534
 
11535
- WPGMZA.GooglePolygon.prototype = Object.create(Parent.prototype);
11536
- WPGMZA.GooglePolygon.prototype.constructor = WPGMZA.GooglePolygon;
11537
-
11538
- /**
11539
- * Returns true if the polygon is editable
11540
- * @return void
11541
- */
11542
- WPGMZA.GooglePolygon.prototype.getEditable = function()
11543
- {
11544
- return this.googlePolygon.getOptions().editable;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11545
  }
11546
 
11547
- /**
11548
- * Sets the editable state of the polygon
11549
- * @return void
11550
- */
11551
- WPGMZA.GooglePolygon.prototype.setEditable = function(value)
11552
  {
11553
- this.googlePolygon.setOptions({editable: value});
11554
  }
11555
 
11556
  /**
11557
- * Returns the polygon represented by a JSON object
 
 
11558
  * @return object
11559
  */
11560
- WPGMZA.GooglePolygon.prototype.toJSON = function()
11561
  {
11562
- var result = WPGMZA.Polygon.prototype.toJSON.call(this);
 
 
 
11563
 
11564
- result.points = [];
 
 
11565
 
11566
- // TODO: Support holes using multiple paths
11567
- var path = this.googlePolygon.getPath();
11568
- for(var i = 0; i < path.getLength(); i++)
11569
- {
11570
- var latLng = path.getAt(i);
11571
- result.points.push({
11572
- lat: latLng.lat(),
11573
- lng: latLng.lng()
11574
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11575
  }
11576
 
11577
- return result;
 
 
 
 
 
 
 
 
 
 
 
11578
  }
11579
 
11580
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11581
 
11582
- // js/v8/google-maps/google-polyline.js
11583
- /**
11584
- * @namespace WPGMZA
11585
- * @module GooglePolyline
11586
- * @requires WPGMZA.Polyline
11587
- */
11588
- jQuery(function($) {
11589
-
11590
- WPGMZA.GooglePolyline = function(options, googlePolyline)
11591
- {
11592
- var self = this;
11593
-
11594
- WPGMZA.Polyline.call(this, options, googlePolyline);
11595
-
11596
- if(googlePolyline)
11597
- {
11598
- this.googlePolyline = googlePolyline;
11599
- }
11600
- else
11601
- {
11602
- this.googlePolyline = new google.maps.Polyline(this.settings);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11603
 
11604
- if(options)
11605
- {
11606
- var googleOptions = $.extend({}, options);
11607
-
11608
- if(options.polydata)
11609
- googleOptions.path = this.parseGeometry(options.polydata);
11610
-
11611
- if(options.linecolor)
11612
- googleOptions.strokeColor = "#" + options.linecolor;
11613
-
11614
- if(options.linethickness)
11615
- googleOptions.strokeWeight = parseInt(options.linethickness);
11616
-
11617
- if(options.opacity)
11618
- googleOptions.strokeOpacity = parseFloat(options.opacity);
11619
- }
11620
 
11621
- if(options && options.polydata)
11622
- {
11623
- var path = this.parseGeometry(options.polydata);
11624
- this.setPoints(path);
11625
- }
11626
- }
11627
-
11628
- this.googlePolyline.wpgmzaPolyline = this;
11629
-
11630
- google.maps.event.addListener(this.googlePolyline, "click", function() {
11631
- self.dispatchEvent({type: "click"});
11632
- });
11633
- }
11634
-
11635
- WPGMZA.GooglePolyline.prototype = Object.create(WPGMZA.Polyline.prototype);
11636
- WPGMZA.GooglePolyline.prototype.constructor = WPGMZA.GooglePolyline;
11637
-
11638
- WPGMZA.GooglePolyline.prototype.setEditable = function(value)
11639
- {
11640
- this.googlePolyline.setOptions({editable: value});
11641
- }
11642
-
11643
- WPGMZA.GooglePolyline.prototype.setPoints = function(points)
11644
- {
11645
- this.googlePolyline.setOptions({path: points});
11646
- }
11647
-
11648
- WPGMZA.GooglePolyline.prototype.toJSON = function()
11649
- {
11650
- var result = WPGMZA.Polyline.prototype.toJSON.call(this);
11651
-
11652
- result.points = [];
11653
-
11654
- var path = this.googlePolyline.getPath();
11655
- for(var i = 0; i < path.getLength(); i++)
11656
- {
11657
- var latLng = path.getAt(i);
11658
- result.points.push({
11659
- lat: latLng.lat(),
11660
- lng: latLng.lng()
11661
- });
11662
- }
11663
-
11664
- return result;
11665
- }
11666
-
11667
- });
11668
 
11669
- // js/v8/google-maps/google-text.js
11670
- /**
11671
- * @namespace WPGMZA
11672
- * @module GoogleText
11673
- * @requires WPGMZA.Text
11674
- */
11675
- jQuery(function($) {
11676
-
11677
- WPGMZA.GoogleText = function(options)
11678
- {
11679
- WPGMZA.Text.apply(this, arguments);
11680
-
11681
- this.overlay = new WPGMZA.GoogleTextOverlay(options);
11682
- }
11683
-
11684
- WPGMZA.extend(WPGMZA.GoogleText, WPGMZA.Text);
11685
-
11686
- });
11687
 
11688
- // js/v8/google-maps/google-text-overlay.js
11689
- /**
11690
- * @namespace WPGMZA
11691
- * @module GoogleTextOverlay
11692
- * @requires WPGMZA.GoogleText
11693
- */
11694
- jQuery(function($) {
11695
-
11696
- WPGMZA.GoogleTextOverlay = function(options)
11697
- {
11698
- this.element = $("<div class='wpgmza-google-text-overlay'><div class='wpgmza-inner'></div></div>");
11699
-
11700
- if(!options)
11701
- options = {};
11702
-
11703
- if(options.position)
11704
- this.position = options.position;
11705
-
11706
- if(options.text)
11707
- this.element.find(".wpgmza-inner").text(options.text);
11708
-
11709
- if(options.map)
11710
- this.setMap(options.map.googleMap);
11711
- }
11712
-
11713
- if(window.google && google.maps && google.maps.OverlayView)
11714
- WPGMZA.GoogleTextOverlay.prototype = new google.maps.OverlayView();
11715
-
11716
- WPGMZA.GoogleTextOverlay.prototype.onAdd = function()
11717
- {
11718
- var overlayProjection = this.getProjection();
11719
- var position = overlayProjection.fromLatLngToDivPixel(this.position.toGoogleLatLng());
11720
-
11721
- this.element.css({
11722
- position: "absolute",
11723
- left: position.x + "px",
11724
- top: position.y + "px"
11725
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11726
 
11727
- var panes = this.getPanes();
11728
- panes.floatPane.appendChild(this.element[0]);
11729
- }
11730
-
11731
- WPGMZA.GoogleTextOverlay.prototype.draw = function()
11732
- {
11733
- var overlayProjection = this.getProjection();
11734
- var position = overlayProjection.fromLatLngToDivPixel(this.position.toGoogleLatLng());
 
 
 
 
 
 
 
 
 
 
 
 
11735
 
11736
- this.element.css({
11737
- position: "absolute",
11738
- left: position.x + "px",
11739
- top: position.y + "px"
11740
- });
11741
- }
11742
-
11743
- WPGMZA.GoogleTextOverlay.prototype.onRemove = function()
11744
- {
11745
- this.element.remove();
11746
- }
11747
-
11748
- WPGMZA.GoogleTextOverlay.prototype.hide = function()
11749
- {
11750
- this.element.hide();
11751
  }
11752
 
11753
- WPGMZA.GoogleTextOverlay.prototype.show = function()
11754
  {
11755
- this.element.show();
11756
  }
11757
 
11758
- WPGMZA.GoogleTextOverlay.prototype.toggle = function()
11759
  {
11760
- if(this.element.is(":visible"))
11761
- this.element.hide();
11762
- else
11763
- this.element.show();
11764
  }
11765
 
11766
  });
11767
 
11768
- // js/v8/google-maps/google-vertex-context-menu.js
11769
  /**
11770
  * @namespace WPGMZA
11771
- * @module GoogleVertexContextMenu
11772
- * @requires wpgmza_api_call
11773
  */
11774
  jQuery(function($) {
11775
 
11776
- if(WPGMZA.settings.engine != "google-maps")
11777
- return;
11778
-
11779
- if(WPGMZA.googleAPIStatus && WPGMZA.googleAPIStatus.code == "USER_CONSENT_NOT_GIVEN")
11780
- return;
11781
-
11782
- WPGMZA.GoogleVertexContextMenu = function(mapEditPage)
11783
  {
11784
  var self = this;
11785
 
11786
- this.mapEditPage = mapEditPage;
11787
 
11788
- this.element = document.createElement("div");
11789
- this.element.className = "wpgmza-vertex-context-menu";
11790
- this.element.innerHTML = "Delete";
11791
 
11792
- google.maps.event.addDomListener(this.element, "click", function(event) {
11793
- self.removeVertex();
11794
- event.preventDefault();
11795
- event.stopPropagation();
11796
- return false;
 
 
 
 
 
 
 
 
 
 
 
11797
  });
11798
  }
11799
 
11800
- WPGMZA.GoogleVertexContextMenu.prototype = new google.maps.OverlayView();
 
11801
 
11802
- WPGMZA.GoogleVertexContextMenu.prototype.onAdd = function()
11803
  {
11804
- var self = this;
11805
- var map = this.getMap();
11806
-
11807
- this.getPanes().floatPane.appendChild(this.element);
11808
- this.divListener = google.maps.event.addDomListener(map.getDiv(), "mousedown", function(e) {
11809
- if(e.target != self.element)
11810
- self.close();
11811
- }, true);
11812
  }
11813
 
11814
- WPGMZA.GoogleVertexContextMenu.prototype.onRemove = function()
11815
  {
11816
- google.maps.event.removeListener(this.divListener);
11817
- this.element.parentNode.removeChild(this.element);
11818
 
11819
- this.set("position");
11820
- this.set("path");
11821
- this.set("vertex");
 
 
 
 
11822
  }
11823
 
11824
- WPGMZA.GoogleVertexContextMenu.prototype.open = function(map, path, vertex)
11825
  {
11826
- this.set('position', path.getAt(vertex));
11827
- this.set('path', path);
11828
- this.set('vertex', vertex);
11829
- this.setMap(map);
11830
- this.draw();
11831
  }
11832
 
11833
- WPGMZA.GoogleVertexContextMenu.prototype.close = function()
11834
  {
11835
- this.setMap(null);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11836
  }
11837
 
11838
- WPGMZA.GoogleVertexContextMenu.prototype.draw = function()
 
11839
  {
11840
- var position = this.get('position');
11841
- var projection = this.getProjection();
11842
-
11843
- if (!position || !projection)
11844
- return;
 
 
 
 
 
 
 
 
 
11845
 
11846
- var point = projection.fromLatLngToDivPixel(position);
11847
- this.element.style.top = point.y + 'px';
11848
- this.element.style.left = point.x + 'px';
11849
  }
11850
 
11851
- WPGMZA.GoogleVertexContextMenu.prototype.removeVertex = function()
11852
  {
11853
- var path = this.get('path');
11854
- var vertex = this.get('vertex');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11855
 
11856
- if (!path || vertex == undefined) {
11857
- this.close();
11858
- return;
 
 
 
 
 
 
 
 
11859
  }
11860
 
11861
- path.removeAt(vertex);
11862
- this.close();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11863
  }
11864
 
 
 
 
 
 
 
 
 
11865
  });
2891
  });
2892
  }
2893
 
2894
+ $(document.body).on("wpgmza_map_editor_init", function(event) {
 
2895
  WPGMZA.mapEditPage = WPGMZA.MapEditPage.createInstance();
2896
 
2897
  });
4438
  this.element = element;
4439
  }
4440
 
4441
+ $(document.body).on("wpgmza_map_editor_init", function(event) {
4442
 
4443
  if(WPGMZA.getCurrentPage() == WPGMZA.PAGE_MAP_EDIT)
4444
  WPGMZA.mapEditPage.markerPanel = new WPGMZA.MarkerPanel($("#wpgmza-marker-edit-panel")[0]);
7138
 
7139
  });
7140
 
7141
+ // js/v8/3rd-party-integration/integration.js
7142
+ /**
7143
+ * @namespace WPGMZA
7144
+ * @module Integration
7145
+ * @requires WPGMZA
7146
+ */
7147
+ jQuery(function($) {
7148
+
7149
+ WPGMZA.Integration = {};
7150
+ WPGMZA.integrationModules = {};
7151
+
7152
+ });
7153
+
7154
+ // js/v8/3rd-party-integration/gutenberg/dist/gutenberg.js
7155
+ "use strict";
7156
+
7157
+ /**
7158
+ * @namespace WPGMZA.Integration
7159
+ * @module Gutenberg
7160
+ * @requires WPGMZA.Integration
7161
+ * @requires wp-i18n
7162
+ * @requires wp-blocks
7163
+ * @requires wp-editor
7164
+ * @requires wp-components
7165
+ */
7166
+
7167
+ /**
7168
+ * Internal block libraries
7169
+ */
7170
+ jQuery(function ($) {
7171
+
7172
+ if (!window.wp || !wp.i18n || !wp.blocks || !wp.editor || !wp.components) return;
7173
+
7174
+ var __ = wp.i18n.__;
7175
+ var registerBlockType = wp.blocks.registerBlockType;
7176
+ var _wp$editor = wp.editor,
7177
+ InspectorControls = _wp$editor.InspectorControls,
7178
+ BlockControls = _wp$editor.BlockControls;
7179
+ var _wp$components = wp.components,
7180
+ Dashicon = _wp$components.Dashicon,
7181
+ Toolbar = _wp$components.Toolbar,
7182
+ Button = _wp$components.Button,
7183
+ Tooltip = _wp$components.Tooltip,
7184
+ PanelBody = _wp$components.PanelBody,
7185
+ TextareaControl = _wp$components.TextareaControl,
7186
+ CheckboxControl = _wp$components.CheckboxControl,
7187
+ TextControl = _wp$components.TextControl,
7188
+ SelectControl = _wp$components.SelectControl,
7189
+ RichText = _wp$components.RichText;
7190
+
7191
+
7192
+ WPGMZA.Integration.Gutenberg = function () {
7193
+ registerBlockType('gutenberg-wpgmza/block', this.getBlockDefinition());
7194
+ };
7195
+
7196
+ WPGMZA.Integration.Gutenberg.prototype.getBlockTitle = function () {
7197
+ return __("WP Google Maps");
7198
+ };
7199
+
7200
+ WPGMZA.Integration.Gutenberg.prototype.getBlockInspectorControls = function (props) {
7201
+
7202
+ /*
7203
+ <TextControl
7204
+ name="overrideWidthAmount"
7205
+ label={__("Override Width Amount")}
7206
+ checked={props.overrideWidthAmount}
7207
+ onChange={onPropertiesChanged}
7208
+ />
7209
+
7210
+ <SelectControl
7211
+ name="overrideWidthUnits"
7212
+ label={__("Override Width Units")}
7213
+ options={[
7214
+ {value: "px", label: "px"},
7215
+ {value: "%", label: "%"},
7216
+ {value: "vw`", label: "vw"},
7217
+ {value: "vh", label: "vh"}
7218
+ ]}
7219
+ onChange={onPropertiesChanged}
7220
+ />
7221
+
7222
+ <CheckboxControl
7223
+ name="overrideHeight"
7224
+ label={__("Override Height")}
7225
+ checked={props.overrideWidth}
7226
+ onChange={onPropertiesChanged}
7227
+ />
7228
+
7229
+ <TextControl
7230
+ name="overrideHeightAmount"
7231
+ label={__("Override Height Amount")}
7232
+ checked={props.overrideWidthAmount}
7233
+ onChange={onPropertiesChanged}
7234
+ />
7235
+
7236
+ <SelectControl
7237
+ name="overrideHeightUnits"
7238
+ label={__("Override Height Units")}
7239
+ options={[
7240
+ {value: "px", label: "px"},
7241
+ {value: "%", label: "%"},
7242
+ {value: "vw`", label: "vw"},
7243
+ {value: "vh", label: "vh"}
7244
+ ]}
7245
+ onChange={onPropertiesChanged}
7246
+ />
7247
+ */
7248
+
7249
+ var onOverrideWidthCheckboxChanged = function onOverrideWidthCheckboxChanged(value) {};
7250
+
7251
+ return React.createElement(
7252
+ InspectorControls,
7253
+ { key: "inspector" },
7254
+ React.createElement(
7255
+ PanelBody,
7256
+ { title: __('Map Settings') },
7257
+ React.createElement(
7258
+ "p",
7259
+ { "class": "map-block-gutenberg-button-container" },
7260
+ React.createElement(
7261
+ "a",
7262
+ { href: WPGMZA.adminurl + "admin.php?page=wp-google-maps-menu&action=edit&map_id=1",
7263
+ target: "_blank",
7264
+ "class": "button button-primary" },
7265
+ React.createElement("i", { "class": "fa fa-pencil-square-o", "aria-hidden": "true" }),
7266
+ __('Go to Map Editor')
7267
+ )
7268
+ ),
7269
+ React.createElement(
7270
+ "p",
7271
+ { "class": "map-block-gutenberg-button-container" },
7272
+ React.createElement(
7273
+ "a",
7274
+ { href: "https://www.wpgmaps.com/documentation/creating-your-first-map/",
7275
+ target: "_blank",
7276
+ "class": "button button-primary" },
7277
+ React.createElement("i", { "class": "fa fa-book", "aria-hidden": "true" }),
7278
+ __('View Documentation')
7279
+ )
7280
+ )
7281
+ )
7282
+ );
7283
+ };
7284
+
7285
+ WPGMZA.Integration.Gutenberg.prototype.getBlockAttributes = function () {
7286
+ return {};
7287
+ };
7288
+
7289
+ WPGMZA.Integration.Gutenberg.prototype.getBlockDefinition = function (props) {
7290
+ var _this = this;
7291
+
7292
+ return {
7293
+
7294
+ title: __("WP Google Maps"),
7295
+ description: __('The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.'),
7296
+ category: 'common',
7297
+ icon: 'location-alt',
7298
+ keywords: [__('Map'), __('Maps'), __('Google')],
7299
+ attributes: this.getBlockAttributes(),
7300
+
7301
+ edit: function edit(props) {
7302
+ return [!!props.isSelected && _this.getBlockInspectorControls(props), React.createElement(
7303
+ "div",
7304
+ { className: props.className + " wpgmza-gutenberg-block" },
7305
+ React.createElement(Dashicon, { icon: "location-alt" }),
7306
+ React.createElement(
7307
+ "span",
7308
+ { "class": "wpgmza-gutenberg-block-title" },
7309
+ __("Your map will appear here on your websites front end")
7310
+ )
7311
+ )];
7312
+ },
7313
+ // Defining the front-end interface
7314
+ save: function save(props) {
7315
+ // Rendering in PHP
7316
+ return null;
7317
+ }
7318
+
7319
+ };
7320
+ };
7321
+
7322
+ WPGMZA.Integration.Gutenberg.getConstructor = function () {
7323
+ return WPGMZA.Integration.Gutenberg;
7324
+ };
7325
+
7326
+ WPGMZA.Integration.Gutenberg.createInstance = function () {
7327
+ var constructor = WPGMZA.Integration.Gutenberg.getConstructor();
7328
+ return new constructor();
7329
+ };
7330
+
7331
+ // Allow the Pro module to extend and create the module, only create here when Pro isn't loaded
7332
+ if(!WPGMZA.isProVersion() && !(/^6/.test(WPGMZA.pro_version))) WPGMZA.integrationModules.gutenberg = WPGMZA.Integration.Gutenberg.createInstance();
7333
+ });
7334
+
7335
  // js/v8/compatibility/astra-theme-compatibility.js
7336
  /**
7337
  * @namespace WPGMZA
7341
  */
7342
  jQuery(function($) {
7343
 
7344
+ $(document).on("load", function(event) {
7345
 
7346
  var parent = document.body.onclick;
7347
 
7387
 
7388
  });
7389
 
7390
+ // js/v8/google-maps/google-circle.js
7391
  /**
7392
  * @namespace WPGMZA
7393
+ * @module GoogleCircle
7394
+ * @requires WPGMZA.Circle
7395
  */
7396
  jQuery(function($) {
7397
 
7398
+ /**
7399
+ * Subclass, used when Google is the maps engine. <strong>Please <em>do not</em> call this constructor directly. Always use createInstance rather than instantiating this class directly.</strong> Using createInstance allows this class to be externally extensible.
7400
+ * @class WPGMZA.GoogleCircle
7401
+ * @constructor WPGMZA.GoogleCircle
7402
+ * @memberof WPGMZA
7403
+ * @augments WPGMZA.Circle
7404
+ * @see WPGMZA.Circle.createInstance
7405
+ */
7406
+ WPGMZA.GoogleCircle = function(options, googleCircle)
7407
  {
7408
  var self = this;
7409
+
7410
+ WPGMZA.Circle.call(this, options, googleCircle);
7411
+
7412
+ if(googleCircle)
7413
  {
7414
+ this.googleCircle = googleCircle;
 
 
 
 
 
7415
  }
 
 
 
7416
  else
7417
  {
7418
+ this.googleCircle = new google.maps.Circle();
7419
+ this.googleCircle.wpgmzaCircle = this;
 
7420
  }
7421
 
7422
+ google.maps.event.addListener(this.googleCircle, "click", function() {
7423
+ self.dispatchEvent({type: "click"});
7424
+ });
 
 
7425
 
7426
+ if(options)
7427
+ this.setOptions(options);
7428
+ }
7429
+
7430
+ WPGMZA.GoogleCircle.prototype = Object.create(WPGMZA.Circle.prototype);
7431
+ WPGMZA.GoogleCircle.prototype.constructor = WPGMZA.GoogleCircle;
7432
+
7433
+ WPGMZA.GoogleCircle.prototype.setCenter = function(center)
7434
+ {
7435
+ WPGMZA.Circle.prototype.setCenter.apply(this, arguments);
7436
 
7437
+ this.googleCircle.setCenter(center);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7438
  }
7439
 
7440
+ WPGMZA.GoogleCircle.prototype.setRadius = function(radius)
7441
  {
7442
+ WPGMZA.Circle.prototype.setRadius.apply(this, arguments);
7443
+
7444
+ this.googleCircle.setRadius(parseFloat(radius) * 1000);
7445
  }
7446
 
7447
+ WPGMZA.GoogleCircle.prototype.setVisible = function(visible)
 
 
 
 
 
 
7448
  {
7449
+ this.googleCircle.setVisible(visible ? true : false);
 
 
 
 
 
 
 
 
 
7450
  }
7451
 
7452
+ WPGMZA.GoogleCircle.prototype.setOptions = function(options)
7453
+ {
7454
+ var googleOptions = {};
 
 
 
7455
 
7456
+ googleOptions = $.extend({}, options);
7457
+ delete googleOptions.map;
7458
+ delete googleOptions.center;
7459
 
7460
+ if(options.center)
7461
+ googleOptions.center = new google.maps.LatLng({
7462
+ lat: parseFloat(options.center.lat),
7463
+ lng: parseFloat(options.center.lng)
7464
+ });
7465
+
7466
+ if(options.radius)
7467
+ googleOptions.radius = parseFloat(options.radius);
7468
 
7469
+ if(options.color)
7470
+ googleOptions.fillColor = options.color;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7471
 
7472
+ if(options.opacity)
7473
+ {
7474
+ googleOptions.fillOpacity = parseFloat(options.opacity);
7475
+ googleOptions.strokeOpacity = parseFloat(options.opacity);
7476
 
7477
+ }
7478
+
7479
+ this.googleCircle.setOptions(googleOptions);
7480
+
7481
+ if(options.map)
7482
+ options.map.addCircle(this);
7483
+ }
7484
+
7485
+ });
7486
 
7487
+ // js/v8/google-maps/google-geocoder.js
7488
+ /**
7489
+ * @namespace WPGMZA
7490
+ * @module GoogleGeocoder
7491
+ * @requires WPGMZA.Geocoder
7492
+ */
7493
+ jQuery(function($) {
7494
+
7495
+ /**
7496
+ * Subclass, used when Google is the maps engine. <strong>Please <em>do not</em> call this constructor directly. Always use createInstance rather than instantiating this class directly.</strong> Using createInstance allows this class to be externally extensible.
7497
+ * @class WPGMZA.GoogleGeocoder
7498
+ * @constructor WPGMZA.GoogleGeocoder
7499
+ * @memberof WPGMZA
7500
+ * @augments WPGMZA.Geocoder
7501
+ * @see WPGMZA.Geocoder.createInstance
7502
+ */
7503
+ WPGMZA.GoogleGeocoder = function()
7504
+ {
7505
+ WPGMZA.Geocoder.call(this);
7506
  }
7507
 
7508
+ WPGMZA.GoogleGeocoder.prototype = Object.create(WPGMZA.Geocoder.prototype);
7509
+ WPGMZA.GoogleGeocoder.prototype.constructor = WPGMZA.GoogleGeocoder;
7510
+
7511
+ WPGMZA.GoogleGeocoder.prototype.getGoogleGeocoder = function()
7512
  {
7513
+ if(WPGMZA.CloudAPI && WPGMZA.CloudAPI.isBeingUsed)
7514
+ return new WPGMZA.CloudGeocoder();
 
7515
 
7516
+ return new google.maps.Geocoder();
7517
+ }
7518
 
7519
+ WPGMZA.GoogleGeocoder.prototype.getLatLngFromAddress = function(options, callback)
7520
+ {
7521
+ if(!options || !options.address)
7522
+ throw new Error("No address specified");
 
 
 
 
 
7523
 
7524
+ if(WPGMZA.isLatLngString(options.address))
7525
+ return WPGMZA.Geocoder.prototype.getLatLngFromAddress.call(this, options, callback);
7526
 
7527
+ if(options.country)
7528
+ options.componentRestrictions = {
7529
+ country: options.country
 
7530
  };
7531
 
7532
+ var geocoder = this.getGoogleGeocoder();
7533
+
7534
+ geocoder.geocode(options, function(results, status) {
7535
+
7536
+ if(status == google.maps.GeocoderStatus.OK || status == WPGMZA.CloudGeocoder.SUCCESS)
7537
+ {
7538
+ var location = results[0].geometry.location;
7539
+ var latLng, bounds = null;
7540
+
7541
+ latLng = {
7542
+ lat: location.lat(),
7543
+ lng: location.lng()
7544
+ };
7545
+
7546
+ if(bounds = results[0].geometry.bounds)
7547
+ {
7548
+ if(bounds instanceof google.maps.LatLngBounds)
7549
+ bounds = WPGMZA.LatLngBounds.fromGoogleLatLngBounds(results[0].geometry.bounds);
7550
+ else
7551
+ bounds = WPGMZA.LatLngBounds.fromGoogleLatLngBoundsLiteral(results[0].geometry.bounds);
7552
+ }
7553
+
7554
+ var results = [
7555
+ {
7556
+ geometry: {
7557
+ location: latLng
7558
+ },
7559
+ latLng: latLng,
7560
+ lat: latLng.lat,
7561
+ lng: latLng.lng,
7562
+ bounds: bounds
7563
+ }
7564
+ ];
7565
+
7566
+ callback(results, WPGMZA.Geocoder.SUCCESS);
7567
+ }
7568
+ else
7569
+ {
7570
+ var nativeStatus = WPGMZA.Geocoder.FAIL;
7571
+
7572
+ if(status == google.maps.GeocoderStatus.ZERO_RESULTS)
7573
+ nativeStatus = WPGMZA.Geocoder.ZERO_RESULTS;
7574
+
7575
+ callback(null, nativeStatus);
7576
+ }
7577
+ });
7578
  }
7579
 
7580
+ WPGMZA.GoogleGeocoder.prototype.getAddressFromLatLng = function(options, callback)
7581
  {
7582
+ if(!options || !options.latLng)
7583
+ throw new Error("No latLng specified");
7584
 
7585
+ var latLng = new WPGMZA.LatLng(options.latLng);
7586
+ var geocoder = this.getGoogleGeocoder();
7587
 
7588
+ var options = $.extend(options, {
7589
+ location: {
7590
+ lat: latLng.lat,
7591
+ lng: latLng.lng
7592
+ }
7593
+ });
7594
+ delete options.latLng;
7595
+
7596
+ geocoder.geocode(options, function(results, status) {
7597
+
7598
+ if(status !== "OK")
7599
+ callback(null, WPGMZA.Geocoder.FAIL);
7600
+
7601
+ if(!results || !results.length)
7602
+ callback([], WPGMZA.Geocoder.NO_RESULTS);
7603
+
7604
+ callback([results[0].formatted_address], WPGMZA.Geocoder.SUCCESS);
7605
+
7606
+ });
7607
+ }
7608
+
7609
+ });
7610
 
7611
+ // js/v8/google-maps/google-html-overlay.js
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7612
  /**
7613
  * @namespace WPGMZA
7614
+ * @module GoogleHTMLOverlay
7615
+ * @requires WPGMZA
7616
  */
7617
  jQuery(function($) {
7618
 
7619
+ // https://developers.google.com/maps/documentation/javascript/customoverlays
 
 
 
 
 
 
 
 
7620
 
7621
+ if(WPGMZA.settings.engine && WPGMZA.settings.engine != "google-maps")
7622
+ return;
7623
 
7624
+ if(!window.google || !window.google.maps)
7625
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7626
 
7627
+ WPGMZA.GoogleHTMLOverlay = function(map)
 
 
 
 
 
 
 
7628
  {
7629
+ this.element = $("<div class='wpgmza-google-html-overlay'></div>");
 
 
 
7630
 
7631
+ this.visible = true;
7632
+ this.position = new WPGMZA.LatLng();
7633
 
7634
+ this.setMap(map.googleMap);
7635
+ this.wpgmzaMap = map;
 
 
 
 
 
 
 
7636
  }
7637
 
7638
+ WPGMZA.GoogleHTMLOverlay.prototype = new google.maps.OverlayView();
7639
+
7640
+ WPGMZA.GoogleHTMLOverlay.prototype.onAdd = function()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7641
  {
7642
+ var panes = this.getPanes();
7643
+ panes.overlayMouseTarget.appendChild(this.element[0]);
7644
+
7645
+ /*google.maps.event.addDomListener(this.element, "click", function() {
7646
+
7647
+ });*/
 
 
 
7648
  }
7649
 
7650
+ WPGMZA.GoogleHTMLOverlay.prototype.onRemove = function()
7651
  {
7652
+ if(this.element && $(this.element).parent().length)
7653
+ {
7654
+ $(this.element).remove();
7655
+ this.element = null;
7656
+ }
7657
  }
7658
 
7659
+ WPGMZA.GoogleHTMLOverlay.prototype.draw = function()
7660
  {
7661
+ this.updateElementPosition();
7662
  }
7663
 
7664
+ /*WPGMZA.GoogleHTMLOverlay.prototype.setMap = function(map)
7665
  {
7666
+ if(!(map instanceof WPGMZA.Map))
7667
+ throw new Error("Map must be an instance of WPGMZA.Map");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7668
 
7669
+ google.maps.OverlayView.prototype.setMap.call(this, map.googleMap);
7670
+
7671
+ this.wpgmzaMap = map;
7672
+ }*/
7673
+
7674
+ /*WPGMZA.GoogleHTMLOverlay.prototype.getVisible = function()
7675
+ {
7676
+ return $(this.element).css("display") != "none";
7677
+ }
7678
+
7679
+ WPGMZA.GoogleHTMLOverlay.prototype.setVisible = function(visible)
7680
+ {
7681
+ $(this.element).css({
7682
+ "display": (visible ? "block" : "none")
 
 
 
 
 
 
 
 
 
 
 
7683
  });
7684
+ }*/
7685
+
7686
+ /*WPGMZA.GoogleHTMLOverlay.prototype.getPosition = function()
7687
+ {
7688
+ return new WPGMZA.LatLng(this.position);
7689
  }
7690
 
7691
+ WPGMZA.GoogleHTMLOverlay.prototype.setPosition = function(position)
7692
+ {
7693
+ if(!(position instanceof WPGMZA.LatLng))
7694
+ throw new Error("Argument must be an instance of WPGMZA.LatLng");
7695
+
7696
+ this.position = position;
7697
+ this.updateElementPosition();
7698
+ }*/
7699
+
7700
+ WPGMZA.GoogleHTMLOverlay.prototype.updateElementPosition = function()
7701
+ {
7702
+ //var pixels = this.wpgmzaMap.latLngToPixels(this.position);
7703
+
7704
+ var projection = this.getProjection();
7705
+
7706
+ if(!projection)
7707
+ return;
7708
+
7709
+ var pixels = projection.fromLatLngToDivPixel(this.position.toGoogleLatLng());
7710
+
7711
+ $(this.element).css({
7712
+ "left": pixels.x,
7713
+ "top": pixels.y
7714
+ });
7715
+ }
7716
  });
7717
 
7718
+ // js/v8/google-maps/google-info-window.js
7719
  /**
7720
  * @namespace WPGMZA
7721
+ * @module GoogleInfoWindow
7722
  * @requires WPGMZA.InfoWindow
7723
  * @pro-requires WPGMZA.ProInfoWindow
7724
  */
7726
 
7727
  var Parent;
7728
 
7729
+ WPGMZA.GoogleInfoWindow = function(mapObject)
7730
  {
 
 
7731
  Parent.call(this, mapObject);
7732
 
7733
+ this.setMapObject(mapObject);
 
 
 
 
7734
  }
7735
 
7736
+ WPGMZA.GoogleInfoWindow.Z_INDEX = 99;
7737
+
7738
  if(WPGMZA.isProVersion())
7739
  Parent = WPGMZA.ProInfoWindow;
7740
  else
7741
  Parent = WPGMZA.InfoWindow;
7742
 
7743
+ WPGMZA.GoogleInfoWindow.prototype = Object.create(Parent.prototype);
7744
+ WPGMZA.GoogleInfoWindow.prototype.constructor = WPGMZA.GoogleInfoWindow;
7745
 
7746
+ WPGMZA.GoogleInfoWindow.prototype.setMapObject = function(mapObject)
7747
+ {
7748
+ if(mapObject instanceof WPGMZA.Marker)
7749
+ this.googleObject = mapObject.googleMarker;
7750
+ else if(mapObject instanceof WPGMZA.Polygon)
7751
+ this.googleObject = mapObject.googlePolygon;
7752
+ else if(mapObject instanceof WPGMZA.Polyline)
7753
+ this.googleObject = mapObject.googlePolyline;
7754
+ }
7755
+
7756
+ WPGMZA.GoogleInfoWindow.prototype.createGoogleInfoWindow = function()
7757
+ {
7758
+ var self = this;
7759
 
7760
+ if(this.googleInfoWindow)
7761
+ return;
 
 
7762
 
7763
+ this.googleInfoWindow = new google.maps.InfoWindow();
7764
+
7765
+ this.googleInfoWindow.setZIndex(WPGMZA.GoogleInfoWindow.Z_INDEX);
7766
+
7767
+ google.maps.event.addListener(this.googleInfoWindow, "domready", function(event) {
7768
+ self.trigger("domready");
7769
+ });
7770
+
7771
+ google.maps.event.addListener(this.googleInfoWindow, "closeclick", function(event) {
7772
+
7773
+ if(self.state == WPGMZA.InfoWindow.STATE_CLOSED)
7774
+ return;
7775
+
7776
+ self.state = WPGMZA.InfoWindow.STATE_CLOSED;
7777
+ self.trigger("infowindowclose");
7778
+
7779
+ });
7780
+ }
7781
 
7782
  /**
7783
  * Opens the info window
 
7784
  * @return boolean FALSE if the info window should not & will not open, TRUE if it will
7785
  */
7786
+ WPGMZA.GoogleInfoWindow.prototype.open = function(map, mapObject)
7787
  {
7788
  var self = this;
 
7789
 
7790
  if(!Parent.prototype.open.call(this, map, mapObject))
7791
  return false;
7792
 
7793
+ // Set parent for events to bubble up to
7794
  this.parent = map;
7795
 
7796
+ this.createGoogleInfoWindow();
7797
+ this.setMapObject(mapObject);
7798
+
7799
+ if(this.googleObject instanceof google.maps.Polygon)
7800
+ {
7801
+
7802
+ }
7803
+ else{
7804
+ this.googleInfoWindow.open(
7805
+ this.mapObject.map.googleMap,
7806
+ this.googleObject
7807
+ );
7808
+ }
7809
 
7810
+
 
 
 
 
7811
 
7812
+ var guid = WPGMZA.guid();
7813
+ var html = "<div id='" + guid + "'>" + this.content + "</div>";
7814
+
7815
+ this.googleInfoWindow.setContent(html);
7816
 
7817
+ var intervalID;
7818
+ intervalID = setInterval(function(event) {
7819
+
7820
+ div = $("#" + guid);
7821
+
7822
+ if(div.length)
7823
+ {
7824
+ clearInterval(intervalID);
7825
 
7826
+ div[0].wpgmzaMapObject = self.mapObject;
7827
+ div.addClass("wpgmza-infowindow");
7828
 
7829
+ self.element = div[0];
7830
+ self.trigger("infowindowopen");
7831
+ }
7832
+
7833
+ }, 50);
7834
 
7835
+ return true;
 
7836
  }
7837
 
7838
+ WPGMZA.GoogleInfoWindow.prototype.close = function()
7839
  {
7840
+ if(!this.googleInfoWindow)
 
 
 
7841
  return;
7842
 
7843
  WPGMZA.InfoWindow.prototype.close.call(this);
7844
 
7845
+ this.googleInfoWindow.close();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7846
  }
7847
 
7848
+ WPGMZA.GoogleInfoWindow.prototype.setContent = function(html)
7849
+ {
7850
+ Parent.prototype.setContent.call(this, html);
7851
+
7852
+ this.content = html;
7853
+
7854
+ this.createGoogleInfoWindow();
7855
+
7856
+ this.googleInfoWindow.setContent(html);
7857
+ }
7858
+
7859
+ WPGMZA.GoogleInfoWindow.prototype.setOptions = function(options)
7860
+ {
7861
+ Parent.prototype.setOptions.call(this, options);
7862
+
7863
+ this.createGoogleInfoWindow();
7864
+
7865
+ this.googleInfoWindow.setOptions(options);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7866
  }
7867
 
7868
  });
7869
 
7870
+ // js/v8/google-maps/google-map.js
7871
  /**
7872
  * @namespace WPGMZA
7873
+ * @module GoogleMap
7874
  * @requires WPGMZA.Map
7875
  * @pro-requires WPGMZA.ProMap
7876
  */
7877
  jQuery(function($) {
 
7878
  var Parent;
7879
 
7880
+ /**
7881
+ * Constructor
7882
+ * @param element to contain the map
7883
+ */
7884
+ WPGMZA.GoogleMap = function(element, options)
7885
  {
7886
  var self = this;
7887
 
7888
+ Parent.call(this, element, options);
7889
 
7890
+ if(!window.google)
7891
+ {
7892
+ var status = WPGMZA.googleAPIStatus;
7893
+ var message = "Google API not loaded";
7894
+
7895
+ if(status && status.message)
7896
+ message += " - " + status.message;
7897
+
7898
+ if(status.code == "USER_CONSENT_NOT_GIVEN")
7899
+ {
7900
+ return;
7901
+ }
7902
+
7903
+ $(element).html("<div class='notice notice-error'><p>" + WPGMZA.localized_strings.google_api_not_loaded + "<pre>" + message + "</pre></p></div>");
7904
+
7905
+ throw new Error(message);
7906
+ }
7907
 
7908
+ this.loadGoogleMap();
7909
 
7910
+ if(options)
7911
+ this.setOptions(options, true);
7912
+
7913
+ google.maps.event.addListener(this.googleMap, "click", function(event) {
7914
+ var wpgmzaEvent = new WPGMZA.Event("click");
7915
+ wpgmzaEvent.latLng = {
7916
+ lat: event.latLng.lat(),
7917
+ lng: event.latLng.lng()
7918
+ };
7919
+ self.dispatchEvent(wpgmzaEvent);
7920
+ });
7921
 
7922
+ google.maps.event.addListener(this.googleMap, "rightclick", function(event) {
7923
+ var wpgmzaEvent = new WPGMZA.Event("rightclick");
7924
+ wpgmzaEvent.latLng = {
7925
+ lat: event.latLng.lat(),
7926
+ lng: event.latLng.lng()
7927
+ };
7928
+ self.dispatchEvent(wpgmzaEvent);
7929
  });
7930
 
7931
+ google.maps.event.addListener(this.googleMap, "dragend", function(event) {
7932
+ self.dispatchEvent("dragend");
7933
+ });
7934
+
7935
+ google.maps.event.addListener(this.googleMap, "zoom_changed", function(event) {
7936
+ self.dispatchEvent("zoom_changed");
7937
+ self.dispatchEvent("zoomchanged");
7938
+ });
7939
+
7940
+ // Idle event
7941
+ google.maps.event.addListener(this.googleMap, "idle", function(event) {
7942
+ self.onIdle(event);
7943
+ });
7944
+
7945
+ // Dispatch event
7946
+ if(!WPGMZA.isProVersion())
7947
+ {
7948
+ this.trigger("init");
7949
 
7950
+ this.dispatchEvent("created");
7951
+ WPGMZA.events.dispatchEvent({type: "mapcreated", map: this});
 
 
 
 
 
7952
 
7953
+ // Legacy event
7954
+ $(this.element).trigger("wpgooglemaps_loaded");
7955
+ }
7956
+ }
7957
+
7958
+ // If we're running the Pro version, inherit from ProMap, otherwise, inherit from Map
7959
+ if(WPGMZA.isProVersion())
7960
+ {
7961
+ Parent = WPGMZA.ProMap;
7962
+ WPGMZA.GoogleMap.prototype = Object.create(WPGMZA.ProMap.prototype);
7963
+ }
7964
+ else
7965
+ {
7966
+ Parent = WPGMZA.Map;
7967
+ WPGMZA.GoogleMap.prototype = Object.create(WPGMZA.Map.prototype);
7968
+ }
7969
+ WPGMZA.GoogleMap.prototype.constructor = WPGMZA.GoogleMap;
7970
+
7971
+ WPGMZA.GoogleMap.parseThemeData = function(raw)
7972
+ {
7973
+ var json;
7974
 
7975
+ try{
7976
+ json = JSON.parse(raw); // Try to parse strict JSON
7977
+ }catch(e) {
 
 
7978
 
7979
+ try{
 
 
 
 
 
 
 
 
 
7980
 
7981
+ json = eval(raw); // Try to parse JS object
7982
+
7983
+ }catch(e) {
7984
+
7985
+ var str = raw;
7986
+
7987
+ str = str.replace(/\\'/g, '\'');
7988
+ str = str.replace(/\\"/g, '"');
7989
+ str = str.replace(/\\0/g, '\0');
7990
+ str = str.replace(/\\\\/g, '\\');
7991
+
7992
+ try{
7993
 
7994
+ json = eval(str);
 
 
 
 
 
 
 
 
7995
 
7996
+ }catch(e) {
 
 
 
 
 
 
 
7997
 
7998
+ console.warn("Couldn't parse theme data");
7999
+
8000
+ return [];
 
 
 
8001
 
8002
+ }
8003
 
 
8004
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8005
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8006
  }
8007
 
8008
+ return json;
8009
+ }
8010
+
8011
+ /**
8012
+ * Creates the Google Maps map
8013
+ * @return void
8014
+ */
8015
+ WPGMZA.GoogleMap.prototype.loadGoogleMap = function()
8016
+ {
8017
+ var self = this;
8018
+ var options = this.settings.toGoogleMapsOptions();
 
 
 
 
 
 
 
 
 
 
 
8019
 
8020
+ this.googleMap = new google.maps.Map(this.engineElement, options);
8021
+
8022
+ google.maps.event.addListener(this.googleMap, "bounds_changed", function() {
8023
  self.onBoundsChanged();
8024
  });
 
8025
 
8026
+ if(this.settings.bicycle == 1)
8027
+ this.enableBicycleLayer(true);
8028
+ if(this.settings.traffic == 1)
8029
+ this.enableTrafficLayer(true);
8030
+ if(this.settings.transport == 1)
8031
+ this.enablePublicTransportLayer(true);
8032
+ this.showPointsOfInterest(this.settings.show_point_of_interest);
8033
+
8034
+ // Move the loading wheel into the map element (it has to live outside in the HTML file because it'll be overwritten by Google otherwise)
8035
+ $(this.engineElement).append($(this.element).find(".wpgmza-loader"));
8036
+ }
8037
+
8038
+ WPGMZA.GoogleMap.prototype.setOptions = function(options, initializing)
8039
+ {
8040
+ Parent.prototype.setOptions.call(this, options);
8041
+
8042
+ if(options.scrollwheel)
8043
+ delete options.scrollwheel; // NB: Delete this when true, scrollwheel: true breaks gesture handling
8044
+
8045
+ if(!initializing)
8046
  {
8047
+ this.googleMap.setOptions(options);
8048
+ return;
8049
  }
8050
 
8051
+ var converted = $.extend(options, this.settings.toGoogleMapsOptions());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8052
 
8053
+ var clone = $.extend({}, converted);
8054
+ if(!clone.center instanceof google.maps.LatLng && (clone.center instanceof WPGMZA.LatLng || typeof clone.center == "object"))
8055
+ clone.center = {
8056
+ lat: parseFloat(clone.center.lat),
8057
+ lng: parseFloat(clone.center.lng)
8058
+ };
8059
+
8060
+ if(this.settings.wpgmza_hide_point_of_interest == "1")
8061
  {
8062
+ var noPoi = {
8063
+ featureType: "poi",
8064
+ elementType: "labels",
8065
+ stylers: [
8066
+ {
8067
+ visibility: "off"
8068
+ }
8069
+ ]
8070
+ };
8071
 
8072
+ if(!clone.styles)
8073
+ clone.styles = [];
8074
 
8075
+ clone.styles.push(noPoi);
 
8076
  }
8077
+
8078
+ this.googleMap.setOptions(clone);
8079
  }
 
 
 
 
 
8080
 
8081
+ /**
8082
+ * Adds the specified marker to this map
8083
+ * @return void
8084
+ */
8085
+ WPGMZA.GoogleMap.prototype.addMarker = function(marker)
8086
+ {
8087
+ marker.googleMarker.setMap(this.googleMap);
8088
+
8089
+ Parent.prototype.addMarker.call(this, marker);
8090
+ }
8091
 
8092
+ /**
8093
+ * Removes the specified marker from this map
8094
+ * @return void
8095
+ */
8096
+ WPGMZA.GoogleMap.prototype.removeMarker = function(marker) {
8097
+
8098
+ marker.googleMarker.setMap(null);
8099
+
8100
+ Parent.prototype.removeMarker.call(this, marker);
8101
+ }
8102
+
8103
+ /**
8104
+ * Adds the specified polygon to this map
8105
+ * @return void
8106
+ */
8107
+ WPGMZA.GoogleMap.prototype.addPolygon = function(polygon)
8108
  {
8109
+ polygon.googlePolygon.setMap(this.googleMap);
8110
 
8111
+ Parent.prototype.addPolygon.call(this, polygon);
8112
+ }
8113
+
8114
+ /**
8115
+ * Removes the specified polygon from this map
8116
+ * @return void
8117
+ */
8118
+ WPGMZA.GoogleMap.prototype.removePolygon = function(polygon)
8119
+ {
8120
+ polygon.googlePolygon.setMap(null);
8121
 
8122
+ Parent.prototype.removePolygon.call(this, polygon);
 
 
8123
  }
8124
 
8125
+ /**
8126
+ * Adds the specified polyline to this map
8127
+ * @return void
8128
+ */
8129
+ WPGMZA.GoogleMap.prototype.addPolyline = function(polyline)
8130
  {
8131
+ polyline.googlePolyline.setMap(this.googleMap);
 
 
 
 
8132
 
8133
+ Parent.prototype.addPolyline.call(this, polyline);
8134
+ }
8135
+
8136
+ /**
8137
+ * Removes the specified polygon from this map
8138
+ * @return void
8139
+ */
8140
+ WPGMZA.GoogleMap.prototype.removePolyline = function(polyline)
8141
+ {
8142
+ polyline.googlePolyline.setMap(null);
8143
 
8144
+ Parent.prototype.removePolyline.call(this, polyline);
8145
+ }
8146
+
8147
+ WPGMZA.GoogleMap.prototype.addCircle = function(circle)
8148
+ {
8149
+ circle.googleCircle.setMap(this.googleMap);
8150
 
8151
+ Parent.prototype.addCircle.call(this, circle);
8152
+ }
8153
+
8154
+ WPGMZA.GoogleMap.prototype.removeCircle = function(circle)
8155
+ {
8156
+ circle.googleCircle.setMap(null);
8157
 
8158
+ Parent.prototype.removeCircle.call(this, circle);
8159
+ }
8160
+
8161
+ WPGMZA.GoogleMap.prototype.addRectangle = function(rectangle)
8162
+ {
8163
+ rectangle.googleRectangle.setMap(this.googleMap);
8164
+
8165
+ Parent.prototype.addRectangle.call(this, rectangle);
8166
+ }
8167
+
8168
+ WPGMZA.GoogleMap.prototype.removeRectangle = function(rectangle)
8169
+ {
8170
+ rectangle.googleRectangle.setMap(null);
8171
+
8172
+ Parent.prototype.removeRectangle.call(this, rectangle);
8173
+ }
8174
+
8175
+ /**
8176
+ * Delegate for google maps getCenter
8177
+ * @return void
8178
+ */
8179
+ WPGMZA.GoogleMap.prototype.getCenter = function()
8180
+ {
8181
+ var latLng = this.googleMap.getCenter();
8182
+
8183
+ return {
8184
+ lat: latLng.lat(),
8185
+ lng: latLng.lng()
8186
+ };
8187
+ }
8188
+
8189
+ /**
8190
+ * Delegate for google maps setCenter
8191
+ * @return void
8192
+ */
8193
+ WPGMZA.GoogleMap.prototype.setCenter = function(latLng)
8194
+ {
8195
+ WPGMZA.Map.prototype.setCenter.call(this, latLng);
8196
+
8197
+ if(latLng instanceof WPGMZA.LatLng)
8198
+ this.googleMap.setCenter({
8199
+ lat: latLng.lat,
8200
+ lng: latLng.lng
8201
+ });
8202
+ else
8203
+ this.googleMap.setCenter(latLng);
8204
+ }
8205
+
8206
+ /**
8207
+ * Delegate for google maps setPan
8208
+ * @return void
8209
+ */
8210
+ WPGMZA.GoogleMap.prototype.panTo = function(latLng)
8211
+ {
8212
+ if(latLng instanceof WPGMZA.LatLng)
8213
+ this.googleMap.panTo({
8214
+ lat: latLng.lat,
8215
+ lng: latLng.lng
8216
+ });
8217
+ else
8218
+ this.googleMap.panTo(latLng);
8219
  }
8220
 
8221
+ /**
8222
+ * Delegate for google maps getCenter
8223
+ * @return void
8224
+ */
8225
+ WPGMZA.GoogleMap.prototype.getZoom = function()
8226
  {
8227
+ return this.googleMap.getZoom();
 
 
 
 
 
 
8228
  }
8229
 
8230
+ /**
8231
+ * Delegate for google maps getZoom
8232
+ * @return void
8233
+ */
8234
+ WPGMZA.GoogleMap.prototype.setZoom = function(value)
8235
  {
8236
+ if(isNaN(value))
8237
+ throw new Error("Value must not be NaN");
 
 
 
 
 
 
8238
 
8239
+ return this.googleMap.setZoom(parseInt(value));
 
 
8240
  }
8241
 
8242
+ /**
8243
+ * Gets the bounds
8244
+ * @return object
8245
+ */
8246
+ WPGMZA.GoogleMap.prototype.getBounds = function()
8247
  {
8248
+ var bounds = this.googleMap.getBounds();
8249
+ var northEast = bounds.getNorthEast();
8250
+ var southWest = bounds.getSouthWest();
8251
 
8252
+ var nativeBounds = new WPGMZA.LatLngBounds({});
 
8253
 
8254
+ nativeBounds.north = northEast.lat();
8255
+ nativeBounds.south = southWest.lat();
8256
+ nativeBounds.west = southWest.lng();
8257
+ nativeBounds.east = northEast.lng();
8258
 
8259
+ // Backward compatibility
8260
+ nativeBounds.topLeft = {
8261
+ lat: northEast.lat(),
8262
+ lng: southWest.lng()
8263
+ };
8264
+
8265
+ nativeBounds.bottomRight = {
8266
+ lat: southWest.lat(),
8267
+ lng: northEast.lng()
8268
+ };
8269
 
8270
  return nativeBounds;
8271
  }
8274
  * Fit to given boundaries
8275
  * @return void
8276
  */
8277
+ WPGMZA.GoogleMap.prototype.fitBounds = function(southWest, northEast)
8278
  {
8279
  if(southWest instanceof WPGMZA.LatLng)
8280
  southWest = {lat: southWest.lat, lng: southWest.lng};
8295
  };
8296
  }
8297
 
8298
+ var nativeBounds = new google.maps.LatLngBounds(southWest, northEast);
8299
+ this.googleMap.fitBounds(nativeBounds);
8300
+ }
8301
+
8302
+ /**
8303
+ * Fit the map boundaries to visible markers
8304
+ * @return void
8305
+ */
8306
+ WPGMZA.GoogleMap.prototype.fitBoundsToVisibleMarkers = function()
8307
+ {
8308
+ var bounds = new google.maps.LatLngBounds();
8309
+ for(var i = 0; i < this.markers.length; i++)
8310
+ {
8311
+ if(markers[i].getVisible())
8312
+ bounds.extend(markers[i].getPosition());
8313
+ }
8314
+ this.googleMap.fitBounds(bounds);
8315
+ }
8316
+
8317
+ /**
8318
+ * Enables / disables the bicycle layer
8319
+ * @param enable boolean, enable or not
8320
+ * @return void
8321
+ */
8322
+ WPGMZA.GoogleMap.prototype.enableBicycleLayer = function(enable)
8323
+ {
8324
+ if(!this.bicycleLayer)
8325
+ this.bicycleLayer = new google.maps.BicyclingLayer();
8326
 
8327
+ this.bicycleLayer.setMap(
8328
+ enable ? this.googleMap : null
8329
+ );
 
 
 
 
 
 
 
 
8330
  }
8331
 
8332
+ /**
8333
+ * Enables / disables the bicycle layer
8334
+ * @param enable boolean, enable or not
8335
+ * @return void
8336
+ */
8337
+ WPGMZA.GoogleMap.prototype.enableTrafficLayer = function(enable)
8338
  {
8339
+ if(!this.trafficLayer)
8340
+ this.trafficLayer = new google.maps.TrafficLayer();
 
 
 
 
 
 
8341
 
8342
+ this.trafficLayer.setMap(
8343
+ enable ? this.googleMap : null
8344
+ );
8345
+ }
8346
+
8347
+ /**
8348
+ * Enables / disables the bicycle layer
8349
+ * @param enable boolean, enable or not
8350
+ * @return void
8351
+ */
8352
+ WPGMZA.GoogleMap.prototype.enablePublicTransportLayer = function(enable)
8353
+ {
8354
+ if(!this.publicTransportLayer)
8355
+ this.publicTransportLayer = new google.maps.TransitLayer();
8356
 
8357
+ this.publicTransportLayer.setMap(
8358
+ enable ? this.googleMap : null
8359
+ );
8360
  }
8361
 
8362
+ /**
8363
+ * Shows / hides points of interest
8364
+ * @param show boolean, enable or not
8365
+ * @return void
8366
+ */
8367
+ WPGMZA.GoogleMap.prototype.showPointsOfInterest = function(show)
8368
  {
8369
+ // TODO: This will bug the front end because there is no textarea with theme data
8370
+ var text = $("textarea[name='theme_data']").val();
8371
+
8372
+ if(!text)
8373
+ return;
8374
+
8375
+ var styles = JSON.parse(text);
8376
+
8377
+ styles.push({
8378
+ featureType: "poi",
8379
+ stylers: [
8380
+ {
8381
+ visibility: (show ? "on" : "off")
8382
+ }
8383
+ ]
8384
+ });
8385
+
8386
+ this.googleMap.setOptions({styles: styles});
8387
  }
8388
 
8389
+ /**
8390
+ * Gets the min zoom of the map
8391
+ * @return int
8392
+ */
8393
+ WPGMZA.GoogleMap.prototype.getMinZoom = function()
8394
  {
8395
+ return parseInt(this.settings.min_zoom);
8396
+ }
8397
+
8398
+ /**
8399
+ * Sets the min zoom of the map
8400
+ * @return void
8401
+ */
8402
+ WPGMZA.GoogleMap.prototype.setMinZoom = function(value)
8403
+ {
8404
+ this.googleMap.setOptions({
8405
+ minZoom: value,
8406
+ maxZoom: this.getMaxZoom()
8407
+ });
8408
+ }
8409
+
8410
+ /**
8411
+ * Gets the min zoom of the map
8412
+ * @return int
8413
+ */
8414
+ WPGMZA.GoogleMap.prototype.getMaxZoom = function()
8415
+ {
8416
+ return parseInt(this.settings.max_zoom);
8417
+ }
8418
+
8419
+ /**
8420
+ * Sets the min zoom of the map
8421
+ * @return void
8422
+ */
8423
+ WPGMZA.GoogleMap.prototype.setMaxZoom = function(value)
8424
+ {
8425
+ this.googleMap.setOptions({
8426
+ minZoom: this.getMinZoom(),
8427
+ maxZoom: value
8428
+ });
8429
+ }
8430
+
8431
+ WPGMZA.GoogleMap.prototype.latLngToPixels = function(latLng)
8432
+ {
8433
+ var map = this.googleMap;
8434
+ var nativeLatLng = new google.maps.LatLng({
8435
+ lat: parseFloat(latLng.lat),
8436
+ lng: parseFloat(latLng.lng)
8437
+ });
8438
+ var topRight = map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast());
8439
+ var bottomLeft = map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest());
8440
+ var scale = Math.pow(2, map.getZoom());
8441
+ var worldPoint = map.getProjection().fromLatLngToPoint(nativeLatLng);
8442
+ return {
8443
+ x: (worldPoint.x - bottomLeft.x) * scale,
8444
+ y: (worldPoint.y - topRight.y) * scale
8445
+ };
8446
+ }
8447
+
8448
+ WPGMZA.GoogleMap.prototype.pixelsToLatLng = function(x, y)
8449
+ {
8450
+ if(y == undefined)
8451
+ {
8452
+ if("x" in x && "y" in x)
8453
+ {
8454
+ y = x.y;
8455
+ x = x.x;
8456
+ }
8457
+ else
8458
+ console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)");
8459
+ }
8460
+
8461
+ var map = this.googleMap;
8462
+ var topRight = map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast());
8463
+ var bottomLeft = map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest());
8464
+ var scale = Math.pow(2, map.getZoom());
8465
+ var worldPoint = new google.maps.Point(x / scale + bottomLeft.x, y / scale + topRight.y);
8466
+ var latLng = map.getProjection().fromPointToLatLng(worldPoint);
8467
+ return {
8468
+ lat: latLng.lat(),
8469
+ lng: latLng.lng()
8470
+ };
8471
  }
8472
 
8473
+ /**
8474
+ * Handle the map element resizing
8475
+ * @return void
8476
+ */
8477
+ WPGMZA.GoogleMap.prototype.onElementResized = function(event)
8478
  {
8479
+ if(!this.googleMap)
8480
+ return;
8481
+ google.maps.event.trigger(this.googleMap, "resize");
8482
  }
8483
+
8484
+ WPGMZA.GoogleMap.prototype.enableAllInteractions = function()
8485
+ {
8486
+ var options = {};
8487
+
8488
+ options.scrollwheel = true;
8489
+ options.draggable = true;
8490
+ options.disableDoubleClickZoom = false;
8491
+
8492
+ this.googleMap.setOptions(options);
8493
  }
8494
 
8495
+ });
8496
+
8497
+ // js/v8/google-maps/google-marker.js
8498
+ /**
8499
+ * @namespace WPGMZA
8500
+ * @module GoogleMarker
8501
+ * @requires WPGMZA.Marker
8502
+ * @pro-requires WPGMZA.ProMarker
8503
+ */
8504
+ jQuery(function($) {
8505
 
8506
+ var Parent;
 
 
 
8507
 
8508
+ WPGMZA.GoogleMarker = function(row)
8509
  {
8510
+ var self = this;
8511
 
8512
+ Parent.call(this, row);
 
8513
 
8514
+ this._opacity = 1.0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8515
 
8516
+ var settings = {};
8517
+ if(row)
 
 
 
 
 
 
8518
  {
8519
+ for(var name in row)
8520
+ {
8521
+ if(row[name] instanceof WPGMZA.LatLng)
8522
+ {
8523
+ settings[name] = row[name].toGoogleLatLng();
8524
+ }
8525
+ else if(row[name] instanceof WPGMZA.Map || name == "icon")
8526
+ {
8527
+ // NB: Ignore map here, it's not a google.maps.Map, Google would throw an exception
8528
+ // NB: Ignore icon here, it conflicts with updateIcon in Pro
8529
+ }
8530
+ else
8531
+ settings[name] = row[name];
8532
+ }
8533
  }
8534
 
8535
+ this.googleMarker = new google.maps.Marker(settings);
8536
+ this.googleMarker.wpgmzaMarker = this;
 
 
 
 
8537
 
8538
+ this.googleMarker.setPosition(new google.maps.LatLng({
8539
+ lat: parseFloat(this.lat),
8540
+ lng: parseFloat(this.lng)
8541
+ }));
8542
+
8543
+ // this.googleMarker.setLabel(this.settings.label);
8544
 
8545
+ if(this.anim)
8546
+ this.googleMarker.setAnimation(this.anim);
8547
+ if(this.animation)
8548
+ this.googleMarker.setAnimation(this.animation);
8549
+
8550
+ google.maps.event.addListener(this.googleMarker, "click", function() {
8551
+ self.dispatchEvent("click");
8552
+ self.dispatchEvent("select");
8553
+ });
8554
 
8555
+ google.maps.event.addListener(this.googleMarker, "mouseover", function() {
8556
+ self.dispatchEvent("mouseover");
8557
+ });
 
 
 
8558
 
8559
+ google.maps.event.addListener(this.googleMarker, "dragend", function() {
8560
+ var googleMarkerPosition = self.googleMarker.getPosition();
8561
+
8562
+ self.setPosition({
8563
+ lat: googleMarkerPosition.lat(),
8564
+ lng: googleMarkerPosition.lng()
8565
+ });
8566
+
8567
+ self.dispatchEvent({
8568
+ type: "dragend",
8569
+ latLng: self.getPosition()
8570
+ });
8571
+ });
8572
 
8573
+ this.trigger("init");
8574
  }
8575
 
8576
+ if(WPGMZA.isProVersion())
8577
+ Parent = WPGMZA.ProMarker;
8578
+ else
8579
+ Parent = WPGMZA.Marker;
8580
+ WPGMZA.GoogleMarker.prototype = Object.create(Parent.prototype);
8581
+ WPGMZA.GoogleMarker.prototype.constructor = WPGMZA.GoogleMarker;
8582
+
8583
+ Object.defineProperty(WPGMZA.GoogleMarker.prototype, "opacity", {
8584
 
8585
+ "get": function() {
8586
+ return this._opacity;
8587
+ },
8588
+
8589
+ "set": function(value) {
8590
+ this._opacity = value;
8591
+ this.googleMarker.setOpacity(value);
8592
+ }
8593
+
8594
+ });
8595
 
8596
+ WPGMZA.GoogleMarker.prototype.setLabel = function(label)
8597
  {
8598
+ if(!label)
8599
+ {
8600
+ this.googleMarker.setLabel(null);
8601
+ return;
8602
+ }
8603
 
8604
+ this.googleMarker.setLabel({
8605
+ text: label
8606
+ });
8607
+
8608
+ if(!this.googleMarker.getIcon())
8609
+ this.googleMarker.setIcon(WPGMZA.settings.default_marker_icon);
8610
  }
8611
 
8612
+ /**
8613
+ * Sets the position of the marker
8614
+ * @return void
8615
+ */
8616
+ WPGMZA.GoogleMarker.prototype.setPosition = function(latLng)
8617
  {
8618
+ Parent.prototype.setPosition.call(this, latLng);
8619
+ this.googleMarker.setPosition({
8620
+ lat: this.lat,
8621
+ lng: this.lng
8622
+ });
8623
  }
8624
 
8625
+ /**
8626
+ * Sets the position offset of a marker
8627
+ * @return void
8628
+ */
8629
+ WPGMZA.GoogleMarker.prototype.updateOffset = function()
8630
  {
8631
+ var self = this;
8632
+ var icon = this.googleMarker.getIcon();
8633
+ var img = new Image();
8634
+ var params;
8635
+ var x = this._offset.x;
8636
+ var y = this._offset.y;
 
 
 
 
8637
 
8638
+ if(!icon)
8639
+ icon = WPGMZA.settings.default_marker_icon;
8640
 
8641
+ if(typeof icon == "string")
8642
+ params = {
8643
+ url: icon
8644
+ };
8645
+ else
8646
+ params = icon;
8647
+
8648
+ img.onload = function()
8649
+ {
8650
+ var defaultAnchor = {
8651
+ x: img.width / 2,
8652
+ y: img.height
8653
  };
8654
+
8655
+ params.anchor = new google.maps.Point(defaultAnchor.x - x, defaultAnchor.y - y);
8656
+
8657
+ self.googleMarker.setIcon(params);
8658
+ }
8659
 
8660
+ img.src = params.url;
 
 
 
 
8661
  }
8662
 
8663
+ WPGMZA.GoogleMarker.prototype.setOptions = function(options)
8664
  {
8665
+ this.googleMarker.setOptions(options);
 
 
 
 
 
 
 
 
 
 
 
 
8666
  }
8667
 
8668
+ /**
8669
+ * Set the marker animation
8670
+ * @return void
8671
+ */
8672
+ WPGMZA.GoogleMarker.prototype.setAnimation = function(animation)
8673
  {
8674
+ Parent.prototype.setAnimation.call(this, animation);
8675
+ this.googleMarker.setAnimation(animation);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8676
  }
8677
 
8678
+ /**
8679
+ * Sets the visibility of the marker
8680
+ * @return void
8681
+ */
8682
+ WPGMZA.GoogleMarker.prototype.setVisible = function(visible)
8683
  {
8684
+ Parent.prototype.setVisible.call(this, visible);
 
 
 
 
 
 
 
 
 
 
 
8685
 
8686
+ this.googleMarker.setVisible(visible ? true : false);
 
 
8687
  }
8688
 
8689
+ WPGMZA.GoogleMarker.prototype.getVisible = function(visible)
8690
  {
8691
+ return this.googleMarker.getVisible();
8692
  }
8693
 
8694
+ WPGMZA.GoogleMarker.prototype.setDraggable = function(draggable)
8695
  {
8696
+ this.googleMarker.setDraggable(draggable);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8697
  }
8698
+
8699
+ WPGMZA.GoogleMarker.prototype.setOpacity = function(opacity)
8700
+ {
8701
+ this.googleMarker.setOpacity(opacity);
 
 
 
 
 
 
 
 
 
8702
  }
8703
 
8704
  });
8705
 
8706
+ // js/v8/google-maps/google-modern-store-locator-circle.js
8707
  /**
8708
  * @namespace WPGMZA
8709
+ * @module GoogleModernStoreLocatorCircle
8710
+ * @requires WPGMZA.ModernStoreLocatorCircle
 
8711
  */
8712
  jQuery(function($) {
8713
 
8714
+ WPGMZA.GoogleModernStoreLocatorCircle = function(map, settings)
 
 
8715
  {
8716
  var self = this;
8717
 
8718
+ WPGMZA.ModernStoreLocatorCircle.call(this, map, settings);
 
 
 
 
 
8719
 
8720
+ this.intervalID = setInterval(function() {
 
 
 
 
 
 
 
 
 
 
 
 
8721
 
8722
+ var mapSize = {
8723
+ width: $(self.mapElement).width(),
8724
+ height: $(self.mapElement).height()
8725
+ };
8726
 
8727
+ if(mapSize.width == self.mapSize.width && mapSize.height == self.mapSize.height)
8728
+ return;
 
8729
 
8730
+ self.canvasLayer.resize_();
8731
+ self.canvasLayer.draw();
 
 
 
 
 
8732
 
8733
+ self.mapSize = mapSize;
 
8734
 
8735
+ }, 1000);
8736
+
8737
+ $(document).bind('webkitfullscreenchange mozfullscreenchange fullscreenchange', function() {
8738
 
8739
+ self.canvasLayer.resize_();
8740
+ self.canvasLayer.draw();
 
 
 
8741
 
8742
+ });
8743
+ }
8744
+
8745
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype = Object.create(WPGMZA.ModernStoreLocatorCircle.prototype);
8746
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.constructor = WPGMZA.GoogleModernStoreLocatorCircle;
8747
+
8748
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.initCanvasLayer = function()
8749
+ {
8750
+ var self = this;
8751
+
8752
+ if(this.canvasLayer)
8753
  {
8754
+ this.canvasLayer.setMap(null);
8755
+ this.canvasLayer.setAnimate(false);
 
 
 
 
8756
  }
 
 
8757
 
8758
+ this.canvasLayer = new CanvasLayer({
8759
+ map: this.map.googleMap,
8760
+ resizeHandler: function(event) {
8761
+ self.onResize(event);
8762
+ },
8763
+ updateHandler: function(event) {
8764
+ self.onUpdate(event);
8765
+ },
8766
+ animate: true,
8767
+ resolutionScale: this.getResolutionScale()
8768
+ });
8769
+ }
8770
+
8771
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.setOptions = function(options)
8772
+ {
8773
+ WPGMZA.ModernStoreLocatorCircle.prototype.setOptions.call(this, options);
8774
+
8775
+ this.canvasLayer.scheduleUpdate();
8776
+ }
8777
+
8778
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.setPosition = function(position)
8779
+ {
8780
+ WPGMZA.ModernStoreLocatorCircle.prototype.setPosition.call(this, position);
8781
+
8782
+ this.canvasLayer.scheduleUpdate();
8783
+ }
8784
+
8785
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.setRadius = function(radius)
8786
+ {
8787
+ WPGMZA.ModernStoreLocatorCircle.prototype.setRadius.call(this, radius);
8788
+
8789
+ this.canvasLayer.scheduleUpdate();
8790
+ }
8791
+
8792
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.getTransformedRadius = function(km)
8793
+ {
8794
+ var multiplierAtEquator = 0.006395;
8795
+ var spherical = google.maps.geometry.spherical;
8796
+
8797
+ var center = this.settings.center;
8798
+ var equator = new WPGMZA.LatLng({
8799
+ lat: 0.0,
8800
+ lng: 0.0
8801
+ });
8802
+ var latitude = new WPGMZA.LatLng({
8803
+ lat: center.lat,
8804
+ lng: 0.0
8805
+ });
8806
+
8807
+ var offsetAtEquator = spherical.computeOffset(equator.toGoogleLatLng(), km * 1000, 90);
8808
+ var offsetAtLatitude = spherical.computeOffset(latitude.toGoogleLatLng(), km * 1000, 90);
8809
+
8810
+ var factor = offsetAtLatitude.lng() / offsetAtEquator.lng();
8811
+ var result = km * multiplierAtEquator * factor;
8812
+
8813
+ if(isNaN(result))
8814
+ throw new Error("here");
8815
+
8816
+ return result;
8817
  }
8818
 
8819
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCanvasDimensions = function()
8820
+ {
8821
+ return {
8822
+ width: this.canvasLayer.canvas.width,
8823
+ height: this.canvasLayer.canvas.height
8824
+ };
8825
+ }
8826
 
8827
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.getWorldOriginOffset = function()
8828
+ {
8829
+ var projection = this.map.googleMap.getProjection();
8830
+ var position = projection.fromLatLngToPoint(this.canvasLayer.getTopLeft());
8831
+
8832
+ return {
8833
+ x: -position.x,
8834
+ y: -position.y
8835
+ };
8836
+ }
8837
 
8838
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCenterPixels = function()
8839
+ {
8840
+ var center = new WPGMZA.LatLng(this.settings.center);
8841
+ var projection = this.map.googleMap.getProjection();
8842
+ return projection.fromLatLngToPoint(center.toGoogleLatLng());
8843
+ }
8844
 
8845
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.getContext = function(type)
8846
  {
8847
+ return this.canvasLayer.canvas.getContext("2d");
 
 
 
 
 
 
 
8848
  }
8849
 
8850
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.getScale = function()
8851
  {
8852
+ return Math.pow(2, this.map.getZoom()) * this.getResolutionScale();
 
 
 
8853
  }
8854
 
8855
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.setVisible = function(visible)
8856
  {
8857
+ WPGMZA.ModernStoreLocatorCircle.prototype.setVisible.call(this, visible);
 
 
 
 
 
 
 
 
 
 
8858
 
8859
+ this.canvasLayer.scheduleUpdate();
8860
  }
8861
 
8862
+ WPGMZA.GoogleModernStoreLocatorCircle.prototype.destroy = function()
8863
  {
8864
+ this.canvasLayer.setMap(null);
8865
+ this.canvasLayer = null;
8866
+
8867
+ clearInterval(this.intervalID);
8868
  }
8869
 
8870
+ });
8871
+
8872
+ // js/v8/google-maps/google-modern-store-locator.js
8873
+ /**
8874
+ * @namespace WPGMZA
8875
+ * @module GoogleModernStoreLocator
8876
+ * @requires WPGMZA.ModernStoreLocator
8877
+ */
8878
+ jQuery(function($) {
8879
+
8880
+ WPGMZA.GoogleModernStoreLocator = function(map_id)
8881
  {
8882
+ var googleMap, self = this;
 
 
 
 
8883
 
8884
+ this.map = WPGMZA.getMapByID(map_id);
 
 
 
 
 
 
8885
 
8886
+ WPGMZA.ModernStoreLocator.call(this, map_id);
8887
+
8888
+ var options = {
8889
+ fields: ["name", "formatted_address"],
8890
+ types: ["geocode"]
8891
+ };
8892
+ var restrict = wpgmaps_localize[map_id]["other_settings"]["wpgmza_store_locator_restrict"];
8893
+
8894
+ this.addressInput = $(this.element).find(".addressInput, #addressInput")[0];
8895
+
8896
+ if(this.addressInput)
8897
  {
8898
+ if(restrict && restrict.length)
8899
+ options.componentRestrictions = {
8900
+ country: restrict
8901
+ };
8902
+
8903
+ this.autoComplete = new google.maps.places.Autocomplete(
8904
+ this.addressInput,
8905
+ options
8906
+ );
8907
  }
8908
 
8909
+ // Positioning for Google
8910
+ this.map.googleMap.controls[google.maps.ControlPosition.TOP_CENTER].push(this.element);
8911
  }
8912
 
8913
+ WPGMZA.GoogleModernStoreLocator.prototype = Object.create(WPGMZA.ModernStoreLocator.prototype);
8914
+ WPGMZA.GoogleModernStoreLocator.prototype.constructor = WPGMZA.GoogleModernStoreLocator;
8915
+
8916
+ });
8917
+
8918
+ // js/v8/google-maps/google-polygon.js
8919
+ /**
8920
+ * @namespace WPGMZA
8921
+ * @module GooglePolygon
8922
+ * @requires WPGMZA.Polygon
8923
+ * @pro-requires WPGMZA.ProPolygon
8924
+ */
8925
+ jQuery(function($) {
8926
+
8927
+ var Parent;
8928
+
8929
+ WPGMZA.GooglePolygon = function(options, googlePolygon)
8930
  {
8931
+ var self = this;
8932
+
8933
+ Parent.call(this, options, googlePolygon);
8934
+
8935
+ if(googlePolygon)
8936
  {
8937
+ this.googlePolygon = googlePolygon;
8938
  }
8939
  else
 
 
 
 
 
 
 
 
8940
  {
8941
+ this.googlePolygon = new google.maps.Polygon();
8942
+
8943
+ if(options)
8944
  {
8945
+ var googleOptions = $.extend({}, options);
8946
+
8947
+ if(options.polydata)
8948
+ googleOptions.paths = this.parseGeometry(options.polydata);
8949
+
8950
+ if(options.linecolor)
8951
+ googleOptions.strokeColor = "#" + options.linecolor;
8952
+
8953
+ if(options.lineopacity)
8954
+ googleOptions.strokeOpacity = parseFloat(options.lineopacity);
8955
+
8956
+ if(options.fillcolor)
8957
+ googleOptions.fillColor = "#" + options.fillcolor;
8958
+
8959
+ if(options.opacity)
8960
+ googleOptions.fillOpacity = parseFloat(options.opacity);
8961
+
8962
+ this.googlePolygon.setOptions(googleOptions);
8963
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8964
  }
8965
+
8966
+ this.googlePolygon.wpgmzaPolygon = this;
8967
+
8968
+ google.maps.event.addListener(this.googlePolygon, "click", function() {
8969
+ self.dispatchEvent({type: "click"});
8970
+ });
8971
  }
8972
 
8973
+ if(WPGMZA.isProVersion())
8974
+ Parent = WPGMZA.ProPolygon;
8975
+ else
8976
+ Parent = WPGMZA.Polygon;
8977
 
8978
+ WPGMZA.GooglePolygon.prototype = Object.create(Parent.prototype);
8979
+ WPGMZA.GooglePolygon.prototype.constructor = WPGMZA.GooglePolygon;
 
 
8980
 
8981
+ /**
8982
+ * Returns true if the polygon is editable
8983
+ * @return void
8984
+ */
8985
+ WPGMZA.GooglePolygon.prototype.getEditable = function()
8986
+ {
8987
+ return this.googlePolygon.getOptions().editable;
8988
  }
8989
 
8990
+ /**
8991
+ * Sets the editable state of the polygon
8992
+ * @return void
8993
+ */
8994
+ WPGMZA.GooglePolygon.prototype.setEditable = function(value)
8995
  {
8996
+ this.googlePolygon.setOptions({editable: value});
 
 
 
 
 
 
 
 
 
 
 
8997
  }
8998
 
8999
+ /**
9000
+ * Returns the polygon represented by a JSON object
9001
+ * @return object
9002
+ */
9003
+ WPGMZA.GooglePolygon.prototype.toJSON = function()
9004
  {
9005
+ var result = WPGMZA.Polygon.prototype.toJSON.call(this);
 
 
 
 
9006
 
9007
+ result.points = [];
9008
 
9009
+ // TODO: Support holes using multiple paths
9010
+ var path = this.googlePolygon.getPath();
9011
+ for(var i = 0; i < path.getLength(); i++)
9012
  {
9013
+ var latLng = path.getAt(i);
9014
+ result.points.push({
9015
+ lat: latLng.lat(),
9016
+ lng: latLng.lng()
9017
+ });
 
 
 
 
 
 
9018
  }
9019
+
9020
+ return result;
9021
  }
9022
 
9023
+ });
9024
+
9025
+ // js/v8/google-maps/google-polyline.js
9026
+ /**
9027
+ * @namespace WPGMZA
9028
+ * @module GooglePolyline
9029
+ * @requires WPGMZA.Polyline
9030
+ */
9031
+ jQuery(function($) {
9032
+
9033
+ WPGMZA.GooglePolyline = function(options, googlePolyline)
9034
  {
9035
  var self = this;
9036
 
9037
+ WPGMZA.Polyline.call(this, options, googlePolyline);
9038
+
9039
+ if(googlePolyline)
9040
  {
9041
+ this.googlePolyline = googlePolyline;
 
9042
  }
9043
+ else
 
9044
  {
9045
+ this.googlePolyline = new google.maps.Polyline(this.settings);
 
 
9046
 
9047
+ if(options)
9048
  {
9049
+ var googleOptions = $.extend({}, options);
 
 
9050
 
9051
+ if(options.polydata)
9052
+ googleOptions.path = this.parseGeometry(options.polydata);
9053
+
9054
+ if(options.linecolor)
9055
+ googleOptions.strokeColor = "#" + options.linecolor;
9056
+
9057
+ if(options.linethickness)
9058
+ googleOptions.strokeWeight = parseInt(options.linethickness);
9059
+
9060
+ if(options.opacity)
9061
+ googleOptions.strokeOpacity = parseFloat(options.opacity);
9062
  }
9063
 
9064
+ if(options && options.polydata)
9065
+ {
9066
+ var path = this.parseGeometry(options.polydata);
9067
+ this.setPoints(path);
9068
+ }
9069
  }
9070
+
9071
+ this.googlePolyline.wpgmzaPolyline = this;
9072
+
9073
+ google.maps.event.addListener(this.googlePolyline, "click", function() {
9074
+ self.dispatchEvent({type: "click"});
9075
+ });
9076
  }
9077
 
9078
+ WPGMZA.GooglePolyline.prototype = Object.create(WPGMZA.Polyline.prototype);
9079
+ WPGMZA.GooglePolyline.prototype.constructor = WPGMZA.GooglePolyline;
9080
+
9081
+ WPGMZA.GooglePolyline.prototype.setEditable = function(value)
9082
  {
9083
+ this.googlePolyline.setOptions({editable: value});
9084
+ }
9085
+
9086
+ WPGMZA.GooglePolyline.prototype.setPoints = function(points)
9087
+ {
9088
+ this.googlePolyline.setOptions({path: points});
9089
+ }
9090
+
9091
+ WPGMZA.GooglePolyline.prototype.toJSON = function()
9092
+ {
9093
+ var result = WPGMZA.Polyline.prototype.toJSON.call(this);
9094
+
9095
+ result.points = [];
9096
+
9097
+ var path = this.googlePolyline.getPath();
9098
+ for(var i = 0; i < path.getLength(); i++)
9099
  {
9100
+ var latLng = path.getAt(i);
9101
+ result.points.push({
9102
+ lat: latLng.lat(),
9103
+ lng: latLng.lng()
9104
+ });
9105
  }
9106
 
9107
+ return result;
9108
  }
9109
 
9110
+ });
9111
+
9112
+ // js/v8/google-maps/google-text.js
9113
+ /**
9114
+ * @namespace WPGMZA
9115
+ * @module GoogleText
9116
+ * @requires WPGMZA.Text
9117
+ */
9118
+ jQuery(function($) {
9119
+
9120
+ WPGMZA.GoogleText = function(options)
9121
  {
9122
+ WPGMZA.Text.apply(this, arguments);
9123
 
9124
+ this.overlay = new WPGMZA.GoogleTextOverlay(options);
 
 
 
 
 
9125
  }
9126
 
9127
+ WPGMZA.extend(WPGMZA.GoogleText, WPGMZA.Text);
9128
+
9129
+ });
9130
+
9131
+ // js/v8/google-maps/google-text-overlay.js
9132
+ /**
9133
+ * @namespace WPGMZA
9134
+ * @module GoogleTextOverlay
9135
+ * @requires WPGMZA.GoogleText
9136
+ */
9137
+ jQuery(function($) {
9138
+
9139
+ WPGMZA.GoogleTextOverlay = function(options)
9140
  {
9141
+ this.element = $("<div class='wpgmza-google-text-overlay'><div class='wpgmza-inner'></div></div>");
 
 
 
 
 
 
 
 
 
9142
 
9143
+ if(!options)
9144
+ options = {};
 
 
 
 
 
9145
 
9146
+ if(options.position)
9147
+ this.position = options.position;
9148
 
9149
+ if(options.text)
9150
+ this.element.find(".wpgmza-inner").text(options.text);
9151
 
9152
+ if(options.map)
9153
+ this.setMap(options.map.googleMap);
 
 
 
 
 
 
9154
  }
9155
 
9156
+ if(window.google && google.maps && google.maps.OverlayView)
9157
+ WPGMZA.GoogleTextOverlay.prototype = new google.maps.OverlayView();
9158
+
9159
+ WPGMZA.GoogleTextOverlay.prototype.onAdd = function()
9160
  {
9161
+ var overlayProjection = this.getProjection();
9162
+ var position = overlayProjection.fromLatLngToDivPixel(this.position.toGoogleLatLng());
9163
 
9164
+ this.element.css({
9165
+ position: "absolute",
9166
+ left: position.x + "px",
9167
+ top: position.y + "px"
9168
+ });
9169
+
9170
+ var panes = this.getPanes();
9171
+ panes.floatPane.appendChild(this.element[0]);
9172
+ }
9173
+
9174
+ WPGMZA.GoogleTextOverlay.prototype.draw = function()
9175
+ {
9176
+ var overlayProjection = this.getProjection();
9177
+ var position = overlayProjection.fromLatLngToDivPixel(this.position.toGoogleLatLng());
9178
 
9179
+ this.element.css({
9180
+ position: "absolute",
9181
+ left: position.x + "px",
9182
+ top: position.y + "px"
9183
+ });
9184
  }
9185
 
9186
+ WPGMZA.GoogleTextOverlay.prototype.onRemove = function()
 
 
 
 
9187
  {
9188
+ this.element.remove();
9189
+ }
9190
+
9191
+ WPGMZA.GoogleTextOverlay.prototype.hide = function()
9192
+ {
9193
+ this.element.hide();
9194
+ }
9195
+
9196
+ WPGMZA.GoogleTextOverlay.prototype.show = function()
9197
+ {
9198
+ this.element.show();
9199
+ }
9200
+
9201
+ WPGMZA.GoogleTextOverlay.prototype.toggle = function()
9202
+ {
9203
+ if(this.element.is(":visible"))
9204
+ this.element.hide();
9205
+ else
9206
+ this.element.show();
9207
  }
9208
 
9209
  });
9210
 
9211
+ // js/v8/google-maps/google-vertex-context-menu.js
9212
  /**
9213
  * @namespace WPGMZA
9214
+ * @module GoogleVertexContextMenu
9215
+ * @requires wpgmza_api_call
9216
  */
9217
  jQuery(function($) {
9218
 
9219
+ if(WPGMZA.settings.engine != "google-maps")
9220
+ return;
 
 
9221
 
9222
+ if(WPGMZA.googleAPIStatus && WPGMZA.googleAPIStatus.code == "USER_CONSENT_NOT_GIVEN")
9223
+ return;
9224
 
9225
+ WPGMZA.GoogleVertexContextMenu = function(mapEditPage)
9226
  {
9227
  var self = this;
 
 
9228
 
9229
+ this.mapEditPage = mapEditPage;
 
 
9230
 
9231
+ this.element = document.createElement("div");
9232
+ this.element.className = "wpgmza-vertex-context-menu";
9233
+ this.element.innerHTML = "Delete";
 
 
 
 
 
 
 
 
 
 
 
 
9234
 
9235
+ google.maps.event.addDomListener(this.element, "click", function(event) {
9236
+ self.removeVertex();
9237
+ event.preventDefault();
9238
+ event.stopPropagation();
9239
+ return false;
9240
+ });
9241
  }
9242
 
9243
+ WPGMZA.GoogleVertexContextMenu.prototype = new google.maps.OverlayView();
 
 
 
 
 
 
9244
 
9245
+ WPGMZA.GoogleVertexContextMenu.prototype.onAdd = function()
9246
  {
9247
+ var self = this;
9248
+ var map = this.getMap();
 
 
9249
 
9250
+ this.getPanes().floatPane.appendChild(this.element);
9251
+ this.divListener = google.maps.event.addDomListener(map.getDiv(), "mousedown", function(e) {
9252
+ if(e.target != self.element)
9253
+ self.close();
9254
+ }, true);
 
9255
  }
9256
 
9257
+ WPGMZA.GoogleVertexContextMenu.prototype.onRemove = function()
9258
  {
9259
+ google.maps.event.removeListener(this.divListener);
9260
+ this.element.parentNode.removeChild(this.element);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9261
 
9262
+ this.set("position");
9263
+ this.set("path");
9264
+ this.set("vertex");
9265
  }
9266
 
9267
+ WPGMZA.GoogleVertexContextMenu.prototype.open = function(map, path, vertex)
9268
  {
9269
+ this.set('position', path.getAt(vertex));
9270
+ this.set('path', path);
9271
+ this.set('vertex', vertex);
9272
+ this.setMap(map);
9273
+ this.draw();
9274
  }
9275
 
9276
+ WPGMZA.GoogleVertexContextMenu.prototype.close = function()
9277
  {
9278
+ this.setMap(null);
 
 
 
 
9279
  }
9280
 
9281
+ WPGMZA.GoogleVertexContextMenu.prototype.draw = function()
9282
+ {
9283
+ var position = this.get('position');
9284
+ var projection = this.getProjection();
9285
 
9286
+ if (!position || !projection)
9287
+ return;
9288
+
9289
+ var point = projection.fromLatLngToDivPixel(position);
9290
+ this.element.style.top = point.y + 'px';
9291
+ this.element.style.left = point.x + 'px';
9292
+ }
9293
 
9294
+ WPGMZA.GoogleVertexContextMenu.prototype.removeVertex = function()
9295
  {
9296
+ var path = this.get('path');
9297
+ var vertex = this.get('vertex');
9298
+
9299
+ if (!path || vertex == undefined) {
9300
+ this.close();
9301
+ return;
9302
+ }
9303
+
9304
+ path.removeAt(vertex);
9305
+ this.close();
9306
  }
9307
 
 
 
 
9308
  });
9309
 
9310
+ // js/v8/open-layers/ol-circle.js
9311
  /**
9312
  * @namespace WPGMZA
9313
+ * @module OLCircle
9314
+ * @requires WPGMZA.Circle
 
9315
  */
9316
  jQuery(function($) {
9317
 
9318
+ var Parent = WPGMZA.Circle;
9319
 
9320
+ WPGMZA.OLCircle = function(options, olFeature)
9321
  {
9322
  var self = this;
9323
 
9324
+ this.center = {lat: 0, lng: 0};
9325
+ this.radius = 0;
9326
+
9327
+ this.fillcolor = "#ff0000";
9328
+ this.opacity = 0.6;
9329
+
9330
  Parent.call(this, options, olFeature);
9331
 
9332
+ this.olStyle = new ol.style.Style(this.getStyleFromSettings());
9333
+
9334
+ this.vectorLayer3857 = this.layer = new ol.layer.Vector({
9335
+ source: new ol.source.Vector(),
9336
+ style: this.olStyle
9337
+ });
9338
 
9339
  if(olFeature)
 
9340
  this.olFeature = olFeature;
 
9341
  else
9342
+ this.recreate();
9343
+ }
9344
+
9345
+ WPGMZA.OLCircle.prototype = Object.create(Parent.prototype);
9346
+ WPGMZA.OLCircle.prototype.constructor = WPGMZA.OLCircle;
9347
+
9348
+ WPGMZA.OLCircle.prototype.recreate = function()
9349
+ {
9350
+ if(this.olFeature)
9351
  {
9352
+ this.layer.getSource().removeFeature(this.olFeature);
9353
+ delete this.olFeature;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9354
  }
9355
 
9356
+ if(!this.center || !this.radius)
9357
+ return;
 
 
 
 
9358
 
9359
+ // IMPORTANT: Please note that due to what appears to be a bug in OpenLayers, the following code MUST be exected specifically in this order, or the circle won't appear
9360
+ var radius = parseFloat(this.radius) * 1000 / 2;
9361
+ var x, y;
9362
+
9363
+ x = this.center.lng;
9364
+ y = this.center.lat;
9365
+
9366
+ var circle4326 = ol.geom.Polygon.circular([x, y], radius, 64);
9367
+ var circle3857 = circle4326.clone().transform('EPSG:4326', 'EPSG:3857');
9368
+
9369
+ this.olFeature = new ol.Feature(circle3857);
9370
+
9371
+ this.layer.getSource().addFeature(this.olFeature);
9372
+ }
9373
+
9374
+ WPGMZA.OLCircle.prototype.getStyleFromSettings = function()
9375
  {
9376
  var params = {};
9377
 
9378
+ /*if(this.settings.strokeOpacity)
9379
  params.stroke = new ol.style.Stroke({
9380
+ color: WPGMZA.hexOpacityToRGBA(this.settings.strokeColor, this.settings.strokeOpacity)
9381
+ });*/
9382
 
9383
  if(this.opacity)
9384
  params.fill = new ol.style.Fill({
9385
+ color: WPGMZA.hexOpacityToRGBA(this.fillColor, this.opacity)
9386
  });
9387
 
9388
  return params;
9389
  }
9390
 
9391
+ WPGMZA.OLCircle.prototype.updateStyleFromSettings = function()
9392
  {
9393
  // Re-create the style - working on it directly doesn't cause a re-render
9394
  var params = this.getStyleFromSettings();
9396
  this.layer.setStyle(this.olStyle);
9397
  }
9398
 
9399
+ WPGMZA.OLCircle.prototype.setVisible = function(visible)
9400
  {
9401
+ this.layer.setVisible(visible ? true : false);
9402
  }
9403
 
9404
+ WPGMZA.OLCircle.prototype.setCenter = function(center)
9405
  {
9406
+ WPGMZA.Circle.prototype.setCenter.apply(this, arguments);
 
 
 
9407
 
9408
+ this.recreate();
9409
+ }
9410
+
9411
+ WPGMZA.OLCircle.prototype.setRadius = function(radius)
9412
+ {
9413
+ WPGMZA.Circle.prototype.setRadius.apply(this, arguments);
 
 
 
9414
 
9415
+ this.recreate();
9416
  }
9417
 
9418
  });
9419
 
9420
+ // js/v8/open-layers/ol-geocoder.js
9421
  /**
9422
  * @namespace WPGMZA
9423
+ * @module OLGeocoder
9424
+ * @requires WPGMZA.Geocoder
9425
  */
9426
  jQuery(function($) {
9427
 
9428
+ /**
9429
+ * @class OLGeocoder
9430
+ * @extends Geocoder
9431
+ * @summary OpenLayers geocoder - uses Nominatim by default
9432
+ */
9433
+ WPGMZA.OLGeocoder = function()
9434
  {
 
 
 
 
 
9435
 
9436
+ }
9437
+
9438
+ WPGMZA.OLGeocoder.prototype = Object.create(WPGMZA.Geocoder.prototype);
9439
+ WPGMZA.OLGeocoder.prototype.constructor = WPGMZA.OLGeocoder;
9440
+
9441
+ /**
9442
+ * @function getResponseFromCache
9443
+ * @access protected
9444
+ * @summary Tries to retrieve cached coordinates from server cache
9445
+ * @param {string} address The street address to geocode
9446
+ * @param {function} callback Where to send the results, as an array
9447
+ * @return {void}
9448
+ */
9449
+ WPGMZA.OLGeocoder.prototype.getResponseFromCache = function(query, callback)
9450
+ {
9451
+ WPGMZA.restAPI.call("/geocode-cache", {
9452
+ data: {
9453
+ query: JSON.stringify(query)
9454
+ },
9455
+ success: function(response, xhr, status) {
9456
+ // Legacy compatibility support
9457
+ response.lng = response.lon;
9458
 
9459
+ callback(response);
9460
+ },
9461
+ useCompressedPathVariable: true
9462
+ });
9463
+
9464
+ /*$.ajax(WPGMZA.ajaxurl, {
9465
+ data: {
9466
+ action: "wpgmza_query_nominatim_cache",
9467
+ query: JSON.stringify(query)
9468
+ },
9469
+ success: function(response, xhr, status) {
9470
+ // Legacy compatibility support
9471
+ response.lng = response.lon;
9472
 
9473
+ callback(response);
 
 
 
 
 
 
 
 
 
 
 
 
9474
  }
9475
+ });*/
9476
+ }
9477
+
9478
+ /**
9479
+ * @function getResponseFromNominatim
9480
+ * @access protected
9481
+ * @summary Queries Nominatim on the specified address
9482
+ * @param {object} options An object containing the options for geocoding, address is a mandatory field
9483
+ * @param {function} callback The function to send the results to, as an array
9484
+ */
9485
+ WPGMZA.OLGeocoder.prototype.getResponseFromNominatim = function(options, callback)
9486
+ {
9487
+ var data = {
9488
+ q: options.address,
9489
+ format: "json"
9490
+ };
9491
 
9492
+ if(options.componentRestrictions && options.componentRestrictions.country)
9493
+ data.countrycodes = options.componentRestrictions.country;
 
 
 
 
9494
 
9495
+ $.ajax("https://nominatim.openstreetmap.org/search/", {
9496
+ data: data,
9497
+ success: function(response, xhr, status) {
9498
+ callback(response);
9499
+ },
9500
+ error: function(response, xhr, status) {
9501
+ callback(null, WPGMZA.Geocoder.FAIL)
9502
+ }
9503
  });
9504
  }
9505
 
9506
+ /**
9507
+ * @function cacheResponse
9508
+ * @access protected
9509
+ * @summary Caches a response on the server, usually after it's been returned from Nominatim
9510
+ * @param {string} address The street address
9511
+ * @param {object|array} response The response to cache
9512
+ * @returns {void}
9513
+ */
9514
+ WPGMZA.OLGeocoder.prototype.cacheResponse = function(query, response)
9515
  {
9516
+ $.ajax(WPGMZA.ajaxurl, {
9517
+ data: {
9518
+ action: "wpgmza_store_nominatim_cache",
9519
+ query: JSON.stringify(query),
9520
+ response: JSON.stringify(response)
9521
+ },
9522
+ method: "POST"
9523
+ });
9524
+ }
9525
+
9526
+ /**
9527
+ * @function clearCache
9528
+ * @access protected
9529
+ * @summary Clears the Nomanatim geocode cache
9530
+ * @returns {void}
9531
+ */
9532
+ WPGMZA.OLGeocoder.prototype.clearCache = function(callback)
9533
+ {
9534
+ $.ajax(WPGMZA.ajaxurl, {
9535
+ data: {
9536
+ action: "wpgmza_clear_nominatim_cache"
9537
+ },
9538
+ method: "POST",
9539
+ success: function(response){
9540
+ callback(response);
9541
+ }
9542
+ });
9543
  }
9544
 
9545
+ WPGMZA.OLGeocoder.prototype.getLatLngFromAddress = function(options, callback)
9546
  {
9547
+ return WPGMZA.OLGeocoder.prototype.geocode(options, callback);
 
 
 
9548
  }
9549
 
9550
+ WPGMZA.OLGeocoder.prototype.getAddressFromLatLng = function(options, callback)
9551
  {
9552
+ return WPGMZA.OLGeocoder.prototype.geocode(options, callback);
9553
  }
9554
 
9555
+ WPGMZA.OLGeocoder.prototype.geocode = function(options, callback)
9556
  {
9557
+ var self = this;
 
 
 
9558
 
9559
+ if(!options)
9560
+ throw new Error("Invalid options");
 
 
 
9561
 
9562
+ if(WPGMZA.LatLng.REGEXP.test(options.address))
9563
+ {
9564
+ var latLng = WPGMZA.LatLng.fromString(options.address);
9565
+
9566
+ callback([{
9567
+ geometry: {
9568
+ location: latLng
9569
+ },
9570
+ latLng: latLng,
9571
+ lat: latLng.lat,
9572
+ lng: latLng.lng
9573
+ }], WPGMZA.Geocoder.SUCCESS);
9574
+
9575
+ return;
9576
+ }
9577
 
9578
+ if(options.location)
9579
+ options.latLng = new WPGMZA.LatLng(options.location);
 
 
 
 
 
9580
 
9581
+ var finish, location;
9582
 
9583
+ if(options.address)
9584
  {
9585
+ location = options.address;
9586
+
9587
+ finish = function(response, status)
9588
+ {
9589
+ for(var i = 0; i < response.length; i++)
9590
+ {
9591
+ response[i].geometry = {
9592
+ location: new WPGMZA.LatLng({
9593
+ lat: parseFloat(response[i].lat),
9594
+ lng: parseFloat(response[i].lon)
9595
+ })
9596
+ };
9597
+
9598
+ response[i].latLng = {
9599
+ lat: parseFloat(response[i].lat),
9600
+ lng: parseFloat(response[i].lon)
9601
+ };
9602
+
9603
+ response[i].bounds = new WPGMZA.LatLngBounds(
9604
+ new WPGMZA.LatLng({
9605
+ lat: response[i].boundingbox[1],
9606
+ lng: response[i].boundingbox[2]
9607
+ }),
9608
+ new WPGMZA.LatLng({
9609
+ lat: response[i].boundingbox[0],
9610
+ lng: response[i].boundingbox[3]
9611
+ })
9612
+ );
9613
+
9614
+ // Backward compatibility with old UGM
9615
+ response[i].lng = response[i].lon;
9616
+ }
9617
+
9618
+ callback(response, status);
9619
+ }
9620
+ }
9621
+ else if(options.latLng)
9622
+ {
9623
+ location = options.latLng.toString();
9624
+
9625
+ finish = function(response, status)
9626
+ {
9627
+ var address = response[0].display_name;
9628
+ callback([address], status);
9629
+ }
9630
  }
9631
+ else
9632
+ throw new Error("You must supply either a latLng or address")
9633
 
9634
+ var query = {location: location, options: options};
9635
+ this.getResponseFromCache(query, function(response) {
9636
+ if(response.length)
9637
+ {
9638
+ finish(response, WPGMZA.Geocoder.SUCCESS);
9639
+ return;
9640
+ }
9641
+
9642
+ self.getResponseFromNominatim($.extend(options, {address: location}), function(response, status) {
9643
+ if(status == WPGMZA.Geocoder.FAIL)
9644
+ {
9645
+ callback(null, WPGMZA.Geocoder.FAIL);
9646
+ return;
9647
+ }
9648
+
9649
+ if(response.length == 0)
9650
+ {
9651
+ callback([], WPGMZA.Geocoder.ZERO_RESULTS);
9652
+ return;
9653
+ }
9654
+
9655
+ finish(response, WPGMZA.Geocoder.SUCCESS);
9656
+
9657
+ self.cacheResponse(query, response);
9658
+ });
9659
+ });
9660
  }
9661
 
9662
  });
9663
 
9664
+ // js/v8/open-layers/ol-info-window.js
9665
  /**
9666
  * @namespace WPGMZA
9667
+ * @module OLInfoWindow
9668
+ * @requires WPGMZA.InfoWindow
9669
+ * @pro-requires WPGMZA.ProInfoWindow
9670
  */
9671
  jQuery(function($) {
9672
 
9673
+ var Parent;
9674
+
9675
+ WPGMZA.OLInfoWindow = function(mapObject)
9676
  {
9677
+ var self = this;
9678
+
9679
+ Parent.call(this, mapObject);
9680
 
9681
+ this.element = $("<div class='wpgmza-infowindow ol-info-window-container ol-info-window-plain'></div>")[0];
9682
+
9683
+ $(this.element).on("click", ".ol-info-window-close", function(event) {
9684
+ self.close();
9685
+ });
9686
  }
9687
 
9688
+ if(WPGMZA.isProVersion())
9689
+ Parent = WPGMZA.ProInfoWindow;
9690
+ else
9691
+ Parent = WPGMZA.InfoWindow;
9692
+
9693
+ WPGMZA.OLInfoWindow.prototype = Object.create(Parent.prototype);
9694
+ WPGMZA.OLInfoWindow.prototype.constructor = WPGMZA.OLInfoWindow;
9695
+
9696
+ Object.defineProperty(WPGMZA.OLInfoWindow.prototype, "isPanIntoViewAllowed", {
9697
+
9698
+ "get": function()
9699
+ {
9700
+ return true;
9701
+ }
9702
+
9703
+ });
9704
 
9705
  /**
9706
+ * Opens the info window
9707
+ * TODO: This should take a mapObject, not an event
9708
+ * @return boolean FALSE if the info window should not & will not open, TRUE if it will
 
 
 
9709
  */
9710
+ WPGMZA.OLInfoWindow.prototype.open = function(map, mapObject)
9711
  {
9712
  var self = this;
9713
+ var latLng = mapObject.getPosition();
9714
 
9715
+ if(!Parent.prototype.open.call(this, map, mapObject))
9716
+ return false;
9717
 
9718
+ // Set parent for events to bubble up
9719
+ this.parent = map;
 
 
 
 
 
 
 
9720
 
9721
+ if(this.overlay)
9722
+ this.mapObject.map.olMap.removeOverlay(this.overlay);
9723
+
9724
+ this.overlay = new ol.Overlay({
9725
+ element: this.element,
9726
+ stopEvent: false
9727
  });
9728
 
9729
+ this.overlay.setPosition(ol.proj.fromLonLat([
9730
+ latLng.lng,
9731
+ latLng.lat
9732
+ ]));
9733
+ self.mapObject.map.olMap.addOverlay(this.overlay);
9734
+
9735
+ $(this.element).show();
9736
+
9737
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
9738
+ {
9739
+ WPGMZA.getImageDimensions(mapObject.getIcon(), function(size) {
9740
+
9741
+ $(self.element).css({left: Math.round(size.width / 2) + "px"});
9742
+
9743
+ });
9744
+ }
9745
+
9746
+ this.trigger("infowindowopen");
9747
+ this.trigger("domready");
9748
  }
9749
 
9750
+ WPGMZA.OLInfoWindow.prototype.close = function(event)
 
 
 
9751
  {
9752
+ // TODO: Why? This shouldn't have to be here. Removing the overlay should hide the element (it doesn't)
9753
+ $(this.element).hide();
9754
 
9755
+ if(!this.overlay)
9756
+ return;
9757
+
9758
+ WPGMZA.InfoWindow.prototype.close.call(this);
9759
+
9760
+ this.trigger("infowindowclose");
9761
+
9762
+ this.mapObject.map.olMap.removeOverlay(this.overlay);
9763
+ this.overlay = null;
9764
  }
9765
 
9766
+ WPGMZA.OLInfoWindow.prototype.setContent = function(html)
9767
  {
9768
+ $(this.element).html("<i class='fa fa-times ol-info-window-close' aria-hidden='true'></i>" + html);
 
 
9769
  }
9770
 
9771
+ WPGMZA.OLInfoWindow.prototype.setOptions = function(options)
9772
  {
9773
+ if(options.maxWidth)
9774
+ {
9775
+ $(this.element).css({"max-width": options.maxWidth + "px"});
9776
+ }
9777
  }
9778
 
9779
+ WPGMZA.OLInfoWindow.prototype.onOpen = function()
9780
  {
9781
+ var self = this;
9782
+ var imgs = $(this.element).find("img");
9783
+ var numImages = imgs.length;
9784
+ var numImagesLoaded = 0;
9785
 
9786
+ WPGMZA.InfoWindow.prototype.onOpen.apply(this, arguments);
 
 
9787
 
9788
+ if(this.isPanIntoViewAllowed)
9789
+ {
9790
+ function inside(el, viewport)
9791
+ {
9792
+ var a = $(el)[0].getBoundingClientRect();
9793
+ var b = $(viewport)[0].getBoundingClientRect();
9794
+
9795
+ return a.left >= b.left && a.left <= b.right &&
9796
+ a.right <= b.right && a.right >= b.left &&
9797
+ a.top >= b.top && a.top <= b.bottom &&
9798
+ a.bottom <= b.bottom && a.bottom >= b.top;
9799
+ }
9800
+
9801
+ function panIntoView()
9802
+ {
9803
+ var height = $(self.element).height();
9804
+ var offset = -height * 0.45;
9805
+
9806
+ self.mapObject.map.animateNudge(0, offset, self.mapObject.getPosition());
9807
+ }
9808
+
9809
+ imgs.each(function(index, el) {
9810
+ el.onload = function() {
9811
+ if(++numImagesLoaded == numImages && !inside(self.element, self.mapObject.map.element))
9812
+ panIntoView();
9813
+ }
9814
  });
9815
 
9816
+ if(numImages == 0 && !inside(self.element, self.mapObject.map.element))
9817
+ panIntoView();
 
 
 
 
 
 
 
 
 
9818
  }
 
 
 
 
 
9819
  }
9820
 
9821
  });
9822
 
9823
+ // js/v8/open-layers/ol-map.js
9824
  /**
9825
  * @namespace WPGMZA
9826
+ * @module OLMap
9827
+ * @requires WPGMZA.Map
9828
+ * @pro-requires WPGMZA.ProMap
9829
  */
9830
  jQuery(function($) {
9831
 
9832
+ var Parent;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9833
 
9834
+ WPGMZA.OLMap = function(element, options)
9835
  {
9836
+ var self = this;
 
9837
 
9838
+ Parent.call(this, element);
 
 
 
 
 
 
9839
 
9840
+ this.setOptions(options);
 
9841
 
9842
+ var viewOptions = this.settings.toOLViewOptions();
 
 
 
9843
 
9844
+ $(this.element).html("");
9845
 
9846
+ this.olMap = new ol.Map({
9847
+ target: $(element)[0],
9848
+ layers: [
9849
+ this.getTileLayer()
9850
+ ],
9851
+ view: new ol.View(viewOptions)
9852
+ });
9853
+
9854
+ // TODO: Re-implement using correct setting names
9855
+ // Interactions
9856
+ this.olMap.getInteractions().forEach(function(interaction) {
9857
 
9858
+ // NB: The true and false values are flipped because these settings represent the "disabled" state when true
9859
+ if(interaction instanceof ol.interaction.DragPan)
9860
+ interaction.setActive( (self.settings.wpgmza_settings_map_draggable == "yes" ? false : true) );
9861
+ else if(interaction instanceof ol.interaction.DoubleClickZoom)
9862
+ interaction.setActive( (self.settings.wpgmza_settings_map_clickzoom ? false : true) );
9863
+ else if(interaction instanceof ol.interaction.MouseWheelZoom)
9864
+ interaction.setActive( (self.settings.wpgmza_settings_map_scroll == "yes" ? false : true) );
9865
+
9866
+ }, this);
9867
+
9868
+ // Cooperative gesture handling
9869
+ if(!(this.settings.wpgmza_force_greedy_gestures == "greedy" || this.settings.wpgmza_force_greedy_gestures == "yes"))
9870
+ {
9871
+ this.gestureOverlay = $("<div class='wpgmza-gesture-overlay'></div>")
9872
+ this.gestureOverlayTimeoutID = null;
9873
+
9874
+ if(WPGMZA.isTouchDevice())
9875
  {
9876
+ // On touch devices, require two fingers to drag and pan
9877
+ // NB: Temporarily removed due to inconsistent behaviour
9878
+ /*this.olMap.getInteractions().forEach(function(interaction) {
9879
+
9880
+ if(interaction instanceof ol.interaction.DragPan)
9881
+ self.olMap.removeInteraction(interaction);
9882
+
9883
+ });
9884
 
9885
+ this.olMap.addInteraction(new ol.interaction.DragPan({
9886
+
9887
+ condition: function(olBrowserEvent) {
9888
+
9889
+ var allowed = olBrowserEvent.originalEvent.touches.length == 2;
9890
+
9891
+ if(!allowed)
9892
+ self.showGestureOverlay();
9893
+
9894
+ return allowed;
9895
+ }
9896
+
9897
+ }));
9898
 
9899
+ this.gestureOverlay.text(WPGMZA.localized_strings.use_two_fingers);*/
9900
+ }
9901
+ else
9902
+ {
9903
+ // On desktops, require Ctrl + zoom to zoom, show an overlay if that condition is not met
9904
+ this.olMap.on("wheel", function(event) {
9905
+
9906
+ if(!ol.events.condition.platformModifierKeyOnly(event))
9907
  {
9908
+ self.showGestureOverlay();
9909
+ event.originalEvent.preventDefault();
9910
+ return false;
 
 
 
 
9911
  }
9912
+
9913
+ });
9914
 
9915
+ this.gestureOverlay.text(WPGMZA.localized_strings.use_ctrl_scroll_to_zoom);
9916
  }
9917
+ }
9918
+
9919
+ // Controls
9920
+ this.olMap.getControls().forEach(function(control) {
9921
+
9922
+ // NB: The true and false values are flipped because these settings represent the "disabled" state when true
9923
+ if(control instanceof ol.control.Zoom && WPGMZA.settings.wpgmza_settings_map_zoom == "yes")
9924
+ self.olMap.removeControl(control);
9925
+
9926
+ }, this);
9927
+
9928
+ if(WPGMZA.settings.wpgmza_settings_map_full_screen_control != "yes")
9929
+ this.olMap.addControl(new ol.control.FullScreen());
9930
+
9931
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
9932
+ {
9933
+ // Marker layer
9934
+ this.markerLayer = new ol.layer.Vector({
9935
+ source: new ol.source.Vector({
9936
+ features: []
9937
+ })
9938
+ });
9939
+ this.olMap.addLayer(this.markerLayer);
9940
+
9941
+ this.olMap.on("click", function(event) {
9942
+ var features = self.olMap.getFeaturesAtPixel(event.pixel);
9943
+
9944
+ if(!features || !features.length)
9945
+ return;
9946
+
9947
+ var marker = features[0].wpgmzaMarker;
9948
+
9949
+ if(!marker)
9950
+ return;
9951
+
9952
+ marker.trigger("click");
9953
+ marker.trigger("select");
9954
+ });
9955
+ }
9956
+
9957
+ // Listen for drag start
9958
+ this.olMap.on("movestart", function(event) {
9959
+ self.isBeingDragged = true;
9960
+ });
9961
+
9962
+ // Listen for end of pan so we can wrap longitude if needs be
9963
+ this.olMap.on("moveend", function(event) {
9964
+ self.wrapLongitude();
9965
+
9966
+ self.isBeingDragged = false;
9967
+ self.dispatchEvent("dragend");
9968
+ self.onIdle();
9969
+ });
9970
+
9971
+ // Listen for zoom
9972
+ this.olMap.getView().on("change:resolution", function(event) {
9973
+ self.dispatchEvent("zoom_changed");
9974
+ self.dispatchEvent("zoomchanged");
9975
+ setTimeout(function() {
9976
+ self.onIdle();
9977
+ }, 10);
9978
+ });
9979
+
9980
+ // Listen for bounds changing
9981
+ this.olMap.getView().on("change", function() {
9982
+ // Wrap longitude
9983
+ self.onBoundsChanged();
9984
+ });
9985
+ self.onBoundsChanged();
9986
+
9987
+ // Store locator center
9988
+ var marker;
9989
+ if(this.storeLocator && (marker = this.storeLocator.centerPointMarker))
9990
+ {
9991
+ this.olMap.addOverlay(marker.overlay);
9992
+ marker.setVisible(false);
9993
+ }
9994
+
9995
+ // Right click listener
9996
+ $(this.element).on("click contextmenu", function(event) {
9997
+
9998
+ var isRight;
9999
+ event = event || window.event;
10000
+
10001
+ var latLng = self.pixelsToLatLng(event.offsetX, event.offsetY);
10002
+
10003
+ if("which" in event)
10004
+ isRight = event.which == 3;
10005
+ else if("button" in event)
10006
+ isRight = event.button == 2;
10007
+
10008
+ if(event.which == 1 || event.button == 1)
10009
  {
10010
+ if(self.isBeingDragged)
10011
+ return;
10012
 
10013
+ // Left click
10014
+ if($(event.target).closest(".ol-marker").length)
10015
+ return; // A marker was clicked, not the map. Do nothing
10016
 
10017
+ self.trigger({
10018
+ type: "click",
10019
+ latLng: latLng
10020
+ });
10021
+
10022
+ return;
 
 
 
 
 
 
 
 
 
 
 
10023
  }
 
 
 
 
10024
 
10025
+ if(!isRight)
10026
+ return;
10027
 
10028
+ return self.onRightClick(event);
10029
+ });
10030
+
10031
+ // Dispatch event
10032
+ if(!WPGMZA.isProVersion())
10033
+ {
10034
+ this.trigger("init");
10035
 
10036
+ this.dispatchEvent("created");
10037
+ WPGMZA.events.dispatchEvent({type: "mapcreated", map: this});
10038
 
10039
+ // Legacy event
10040
+ $(this.element).trigger("wpgooglemaps_loaded");
10041
+ }
10042
  }
 
 
10043
 
10044
+ if(WPGMZA.isProVersion())
10045
+ Parent = WPGMZA.ProMap;
10046
+ else
10047
+ Parent = WPGMZA.Map;
 
 
 
 
 
 
 
 
10048
 
10049
+ WPGMZA.OLMap.prototype = Object.create(Parent.prototype);
10050
+ WPGMZA.OLMap.prototype.constructor = WPGMZA.OLMap;
10051
 
10052
+ WPGMZA.OLMap.prototype.getTileLayer = function()
10053
  {
10054
+ var options = {};
10055
 
10056
+ if(WPGMZA.settings.tile_server_url)
10057
+ options.url = WPGMZA.settings.tile_server_url;
10058
 
10059
+ return new ol.layer.Tile({
10060
+ source: new ol.source.OSM(options)
10061
+ });
10062
  }
10063
 
10064
+ WPGMZA.OLMap.prototype.wrapLongitude = function()
 
 
10065
  {
10066
+ var transformed = ol.proj.transform(this.olMap.getView().getCenter(), "EPSG:3857", "EPSG:4326");
10067
+ var center = {
10068
+ lat: transformed[1],
10069
+ lng: transformed[0]
10070
+ };
10071
 
10072
+ if(center.lng >= -180 && center.lng <= 180)
10073
+ return;
10074
+
10075
+ center.lng = center.lng - 360 * Math.floor(center.lng / 360);
10076
+
10077
+ if(center.lng > 180)
10078
+ center.lng -= 360;
10079
+
10080
+ this.setCenter(center);
 
 
 
10081
  }
10082
 
10083
+ WPGMZA.OLMap.prototype.getCenter = function()
10084
  {
10085
+ var lonLat = ol.proj.toLonLat(
10086
+ this.olMap.getView().getCenter()
10087
+ );
10088
+ return {
10089
+ lat: lonLat[1],
10090
+ lng: lonLat[0]
10091
+ };
10092
  }
10093
 
10094
+ WPGMZA.OLMap.prototype.setCenter = function(latLng)
10095
  {
10096
+ var view = this.olMap.getView();
 
10097
 
10098
+ WPGMZA.Map.prototype.setCenter.call(this, latLng);
10099
 
10100
+ view.setCenter(ol.proj.fromLonLat([
10101
+ latLng.lng,
10102
+ latLng.lat
10103
+ ]));
10104
+
10105
+ this.wrapLongitude();
10106
+
10107
+ this.onBoundsChanged();
10108
  }
10109
 
10110
+ WPGMZA.OLMap.prototype.getBounds = function()
 
 
 
 
 
 
 
10111
  {
10112
+ var bounds = this.olMap.getView().calculateExtent(this.olMap.getSize());
10113
+ var nativeBounds = new WPGMZA.LatLngBounds();
10114
+
10115
+ var topLeft = ol.proj.toLonLat([bounds[0], bounds[1]]);
10116
+ var bottomRight = ol.proj.toLonLat([bounds[2], bounds[3]]);
10117
+
10118
+ nativeBounds.north = topLeft[1];
10119
+ nativeBounds.south = bottomRight[1];
10120
+
10121
+ nativeBounds.west = topLeft[0];
10122
+ nativeBounds.east = bottomRight[0];
10123
+
10124
+ return nativeBounds;
10125
  }
10126
 
10127
+ /**
10128
+ * Fit to given boundaries
10129
+ * @return void
10130
+ */
10131
+ WPGMZA.OLMap.prototype.fitBounds = function(southWest, northEast)
10132
  {
10133
+ if(southWest instanceof WPGMZA.LatLng)
10134
+ southWest = {lat: southWest.lat, lng: southWest.lng};
10135
+ if(northEast instanceof WPGMZA.LatLng)
10136
+ northEast = {lat: northEast.lat, lng: northEast.lng};
10137
+ else if(southWest instanceof WPGMZA.LatLngBounds)
10138
+ {
10139
+ var bounds = southWest;
10140
+
10141
+ southWest = {
10142
+ lat: bounds.south,
10143
+ lng: bounds.west
10144
+ };
10145
+
10146
+ northEast = {
10147
+ lat: bounds.north,
10148
+ lng: bounds.east
10149
+ };
10150
+ }
10151
 
10152
+ var view = this.olMap.getView();
10153
+
10154
+ var extent = ol.extent.boundingExtent([
10155
+ ol.proj.fromLonLat([
10156
+ parseFloat(southWest.lng),
10157
+ parseFloat(southWest.lat)
10158
+ ]),
10159
+ ol.proj.fromLonLat([
10160
+ parseFloat(northEast.lng),
10161
+ parseFloat(northEast.lat)
10162
+ ])
10163
+ ]);
10164
+ view.fit(extent, this.olMap.getSize());
10165
+ }
10166
 
10167
+ WPGMZA.OLMap.prototype.panTo = function(latLng, zoom)
10168
  {
10169
+ var view = this.olMap.getView();
10170
+ var options = {
10171
+ center: ol.proj.fromLonLat([
10172
+ parseFloat(latLng.lng),
10173
+ parseFloat(latLng.lat),
10174
+ ]),
10175
+ duration: 500
10176
+ };
10177
 
10178
+ if(arguments.length > 1)
10179
+ options.zoom = parseInt(zoom);
10180
 
10181
+ view.animate(options);
 
 
 
10182
  }
 
 
 
 
 
 
 
 
 
 
10183
 
10184
+ WPGMZA.OLMap.prototype.getZoom = function()
10185
+ {
10186
+ return Math.round( this.olMap.getView().getZoom() );
10187
+ }
10188
 
10189
+ WPGMZA.OLMap.prototype.setZoom = function(value)
10190
  {
10191
+ this.olMap.getView().setZoom(value);
 
 
10192
  }
10193
 
10194
+ WPGMZA.OLMap.prototype.getMinZoom = function()
10195
+ {
10196
+ return this.olMap.getView().getMinZoom();
10197
+ }
10198
 
10199
+ WPGMZA.OLMap.prototype.setMinZoom = function(value)
10200
+ {
10201
+ this.olMap.getView().setMinZoom(value);
10202
+ }
10203
 
10204
+ WPGMZA.OLMap.prototype.getMaxZoom = function()
10205
+ {
10206
+ return this.olMap.getView().getMaxZoom();
10207
+ }
10208
 
10209
+ WPGMZA.OLMap.prototype.setMaxZoom = function(value)
10210
  {
10211
+ this.olMap.getView().setMaxZoom(value);
 
 
 
 
 
10212
  }
10213
 
10214
+ WPGMZA.OLMap.prototype.setOptions = function(options)
10215
  {
10216
+ Parent.prototype.setOptions.call(this, options);
10217
 
10218
+ if(!this.olMap)
10219
  return;
10220
 
10221
+ this.olMap.getView().setProperties( this.settings.toOLViewOptions() );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10222
  }
10223
 
10224
  /**
10225
+ * TODO: Consider moving all these functions to their respective classes, same on google map (DO IT!!! It's very misleading having them here)
 
10226
  */
10227
+ WPGMZA.OLMap.prototype.addMarker = function(marker)
10228
  {
10229
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT)
10230
+ this.olMap.addOverlay(marker.overlay);
10231
+ else
 
 
 
 
 
 
 
 
 
10232
  {
10233
+ this.markerLayer.getSource().addFeature(marker.feature);
10234
+ marker.featureInSource = true;
 
 
 
 
 
10235
  }
10236
 
10237
+ Parent.prototype.addMarker.call(this, marker);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10238
  }
10239
 
10240
+ WPGMZA.OLMap.prototype.removeMarker = function(marker)
10241
  {
10242
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT)
10243
+ this.olMap.removeOverlay(marker.overlay);
10244
+ else
10245
+ {
10246
+ this.markerLayer.getSource().removeFeature(marker.feature);
10247
+ marker.featureInSource = false;
10248
+ }
10249
 
10250
+ Parent.prototype.removeMarker.call(this, marker);
10251
  }
10252
 
10253
+ WPGMZA.OLMap.prototype.addPolygon = function(polygon)
10254
  {
10255
+ this.olMap.addLayer(polygon.layer);
 
 
 
 
10256
 
10257
+ Parent.prototype.addPolygon.call(this, polygon);
10258
  }
10259
 
10260
+ WPGMZA.OLMap.prototype.removePolygon = function(polygon)
10261
  {
10262
+ this.olMap.removeLayer(polygon.layer);
 
 
10263
 
10264
+ Parent.prototype.removePolygon.call(this, polygon);
10265
  }
10266
 
10267
+ WPGMZA.OLMap.prototype.addPolyline = function(polyline)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10268
  {
10269
+ this.olMap.addLayer(polyline.layer);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10270
 
10271
+ Parent.prototype.addPolyline.call(this, polyline);
10272
+ }
10273
+
10274
+ WPGMZA.OLMap.prototype.removePolyline = function(polyline)
10275
+ {
10276
+ this.olMap.removeLayer(polyline.layer);
10277
 
10278
+ Parent.prototype.removePolyline.call(this, polyline);
10279
+ }
10280
+
10281
+ WPGMZA.OLMap.prototype.addCircle = function(circle)
10282
+ {
10283
+ this.olMap.addLayer(circle.layer);
10284
 
10285
+ Parent.prototype.addCircle.call(this, circle);
10286
+ }
10287
+
10288
+ WPGMZA.OLMap.prototype.removeCircle = function(circle)
10289
+ {
10290
+ this.olMap.removeLayer(circle.layer);
10291
 
10292
+ Parent.prototype.removeCircle.call(this, circle);
 
 
 
 
 
 
 
 
 
 
10293
  }
10294
 
10295
+ WPGMZA.OLMap.prototype.addRectangle = function(rectangle)
 
10296
  {
10297
+ this.olMap.addLayer(rectangle.layer);
10298
+
10299
+ Parent.prototype.addRectangle.call(this, rectangle);
10300
  }
10301
+
10302
+ WPGMZA.OLMap.prototype.removeRectangle = function(rectangle)
10303
  {
10304
+ this.olMap.removeLayer(rectangle.layer);
10305
+
10306
+ Parent.prototype.removeRectangle.call(this, rectangle);
10307
  }
 
10308
 
10309
+ WPGMZA.OLMap.prototype.pixelsToLatLng = function(x, y)
10310
  {
10311
+ if(y == undefined)
10312
+ {
10313
+ if("x" in x && "y" in x)
10314
+ {
10315
+ y = x.y;
10316
+ x = x.x;
10317
+ }
10318
+ else
10319
+ console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)");
10320
+ }
10321
 
10322
+ var coord = this.olMap.getCoordinateFromPixel([x, y]);
10323
+
10324
+ if(!coord)
10325
+ return {
10326
+ x: null,
10327
+ y: null
10328
+ };
10329
+
10330
+ var lonLat = ol.proj.toLonLat(coord);
10331
+ return {
10332
+ lat: lonLat[1],
10333
+ lng: lonLat[0]
10334
+ };
10335
+ }
10336
+
10337
+ WPGMZA.OLMap.prototype.latLngToPixels = function(latLng)
10338
+ {
10339
+ var coord = ol.proj.fromLonLat([latLng.lng, latLng.lat]);
10340
+ var pixel = this.olMap.getPixelFromCoordinate(coord);
10341
+
10342
+ if(!pixel)
10343
+ return {
10344
+ x: null,
10345
+ y: null
10346
+ };
10347
+
10348
+ return {
10349
+ x: pixel[0],
10350
+ y: pixel[1]
10351
+ };
10352
+ }
10353
+
10354
+ WPGMZA.OLMap.prototype.enableBicycleLayer = function(value)
10355
+ {
10356
+ if(value)
10357
+ {
10358
+ if(!this.bicycleLayer)
10359
+ this.bicycleLayer = new ol.layer.Tile({
10360
+ source: new ol.source.OSM({
10361
+ url: "http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png"
10362
+ })
10363
+ });
10364
 
10365
+ this.olMap.addLayer(this.bicycleLayer);
10366
+ }
10367
+ else
10368
+ {
10369
+ if(!this.bicycleLayer)
10370
+ return;
10371
 
10372
+ this.olMap.removeLayer(this.bicycleLayer);
10373
  }
 
 
10374
  }
10375
 
10376
+ WPGMZA.OLMap.prototype.showGestureOverlay = function()
 
 
 
 
10377
  {
10378
  var self = this;
 
10379
 
10380
+ clearTimeout(this.gestureOverlayTimeoutID);
10381
 
10382
+ $(this.gestureOverlay).stop().animate({opacity: "100"});
10383
+ $(this.element).append(this.gestureOverlay);
 
10384
 
10385
+ $(this.gestureOverlay).css({
10386
+ "line-height": $(this.element).height() + "px",
10387
+ "opacity": "1.0"
10388
+ });
10389
+ $(this.gestureOverlay).show();
 
 
10390
 
10391
+ this.gestureOverlayTimeoutID = setTimeout(function() {
10392
+ self.gestureOverlay.fadeOut(2000);
10393
+ }, 2000);
10394
  }
10395
 
10396
+ WPGMZA.OLMap.prototype.onElementResized = function(event)
10397
  {
10398
+ this.olMap.updateSize();
10399
+ }
10400
+
10401
+ WPGMZA.OLMap.prototype.onRightClick = function(event)
10402
+ {
10403
+ if($(event.target).closest(".ol-marker, .wpgmza_modern_infowindow, .wpgmza-modern-store-locator").length)
10404
+ return true;
10405
 
10406
+ var parentOffset = $(this.element).offset();
10407
+ var relX = event.pageX - parentOffset.left;
10408
+ var relY = event.pageY - parentOffset.top;
10409
+ var latLng = this.pixelsToLatLng(relX, relY);
10410
 
10411
+ this.trigger({type: "rightclick", latLng: latLng});
 
 
 
 
10412
 
10413
+ // Legacy event compatibility
10414
+ $(this.element).trigger({type: "rightclick", latLng: latLng});
10415
 
10416
+ // Prevent menu
10417
+ event.preventDefault();
10418
+ return false;
10419
+ }
10420
+
10421
+ WPGMZA.OLMap.prototype.enableAllInteractions = function()
10422
+ {
10423
+
10424
+ this.olMap.getInteractions().forEach(function(interaction) {
10425
+
10426
+ if(interaction instanceof ol.interaction.DragPan || interaction instanceof ol.interaction.DoubleClickZoom || interaction instanceof ol.interaction.MouseWheelZoom)
10427
+ {
10428
+ interaction.setActive(true);
10429
+ }
10430
+
10431
+ }, this);
10432
+
10433
+ }
10434
+
10435
+ });
10436
+
10437
+ // js/v8/open-layers/ol-marker.js
10438
+ /**
10439
+ * @namespace WPGMZA
10440
+ * @module OLMarker
10441
+ * @requires WPGMZA.Marker
10442
+ * @pro-requires WPGMZA.ProMarker
10443
+ */
10444
+ jQuery(function($) {
10445
+
10446
+ var Parent;
10447
+
10448
+ WPGMZA.OLMarker = function(row)
10449
+ {
10450
+ var self = this;
10451
+
10452
+ Parent.call(this, row);
10453
+
10454
+ var origin = ol.proj.fromLonLat([
10455
+ parseFloat(this.lng),
10456
+ parseFloat(this.lat)
10457
+ ]);
10458
 
10459
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT)
10460
  {
10461
+ var img = $("<img alt=''/>")[0];
10462
+ img.onload = function(event) {
10463
+ self.updateElementHeight();
10464
+ if(self.map)
10465
+ self.map.olMap.updateSize();
10466
+ }
10467
+ img.src = WPGMZA.defaultMarkerIcon;
10468
+
10469
+ this.element = $("<div class='ol-marker'></div>")[0];
10470
+ $(this.element).attr('title', this.title);
10471
+ this.element.appendChild(img);
10472
+
10473
+ this.element.wpgmzaMarker = this;
10474
+
10475
+ $(this.element).on("mouseover", function(event) {
10476
+ self.dispatchEvent("mouseover");
10477
+ });
10478
+
10479
+ this.overlay = new ol.Overlay({
10480
+ element: this.element,
10481
+ position: origin,
10482
+ positioning: "bottom-center",
10483
+ stopEvent: false
10484
+ });
10485
+ this.overlay.setPosition(origin);
10486
+
10487
+ if(this.animation)
10488
+ this.setAnimation(this.animation);
10489
+
10490
+ this.setLabel(this.settings.label);
10491
+
10492
+ if(row)
10493
+ {
10494
+ if(row.draggable)
10495
+ this.setDraggable(true);
10496
+ }
10497
 
10498
+ this.rebindClickListener();
10499
+ }
10500
+ else if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
10501
+ {
10502
+ this.feature = new ol.Feature({
10503
+ geometry: new ol.geom.Point(origin)
10504
+ });
10505
 
10506
+ this.feature.setStyle(this.getVectorLayerStyle());
10507
+ this.feature.wpgmzaMarker = this;
10508
  }
10509
+ else
10510
+ throw new Error("Invalid marker render mode");
10511
 
10512
+ this.trigger("init");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10513
  }
10514
 
10515
+ if(WPGMZA.isProVersion())
10516
+ Parent = WPGMZA.ProMarker;
10517
+ else
10518
+ Parent = WPGMZA.Marker;
 
 
 
 
 
 
10519
 
10520
+ WPGMZA.OLMarker.prototype = Object.create(Parent.prototype);
10521
+ WPGMZA.OLMarker.prototype.constructor = WPGMZA.OLMarker;
 
 
 
 
 
 
 
 
10522
 
10523
+ WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT = "element";
10524
+ WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER = "vector"; // NB: This feature is experimental
 
 
 
 
10525
 
10526
+ WPGMZA.OLMarker.renderMode = WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT;
 
 
 
 
 
10527
 
10528
+ if(WPGMZA.settings.engine == "open-layers" && WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
10529
  {
10530
+ WPGMZA.OLMarker.defaultVectorLayerStyle = new ol.style.Style({
10531
+ image: new ol.style.Icon({
10532
+ anchor: [0.5, 1],
10533
+ src: WPGMZA.defaultMarkerIcon
10534
+ })
10535
+ });
10536
 
10537
+ WPGMZA.OLMarker.hiddenVectorLayerStyle = new ol.style.Style({});
10538
  }
10539
 
10540
+ WPGMZA.OLMarker.prototype.getVectorLayerStyle = function()
10541
  {
10542
+ if(this.vectorLayerStyle)
10543
+ return this.vectorLayerStyle;
10544
 
10545
+ return WPGMZA.OLMarker.defaultVectorLayerStyle;
10546
  }
10547
 
10548
+ WPGMZA.OLMarker.prototype.updateElementHeight = function(height, calledOnFocus)
 
 
 
 
10549
  {
10550
+ var self = this;
10551
 
10552
+ if(!height)
10553
+ height = $(this.element).find("img").height();
 
 
 
 
 
 
 
 
 
 
 
10554
 
10555
+ if(height == 0 && !calledOnFocus)
10556
+ {
10557
+ $(window).one("focus", function(event) {
10558
+ self.updateElementHeight(false, true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10559
  });
10560
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10561
 
10562
+ $(this.element).css({height: height + "px"});
10563
  }
10564
 
10565
+ WPGMZA.OLMarker.prototype.addLabel = function()
 
 
 
 
10566
  {
10567
+ this.setLabel(this.getLabelText());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10568
  }
10569
 
10570
+ WPGMZA.OLMarker.prototype.setLabel = function(label)
 
 
 
 
10571
  {
10572
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
 
 
 
 
10573
  {
10574
+ console.warn("Marker labels are not currently supported in Vector Layer rendering mode");
10575
+ return;
10576
+ }
10577
+
10578
+ if(!label)
10579
+ {
10580
+ if(this.label)
10581
+ $(this.element).find(".ol-marker-label").remove();
10582
 
10583
+ return;
10584
+ }
10585
+
10586
+ if(!this.label)
10587
+ {
10588
+ this.label = $("<div class='ol-marker-label'/>");
10589
+ $(this.element).append(this.label);
10590
  }
10591
 
10592
+ this.label.html(label);
 
10593
  }
10594
 
10595
+ WPGMZA.OLMarker.prototype.getVisible = function(visible)
 
 
 
 
10596
  {
10597
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
 
10598
  {
10599
+
 
10600
  }
10601
+ else
10602
+ return this.overlay.getElement().style.display != "none";
10603
  }
10604
 
10605
+ WPGMZA.OLMarker.prototype.setVisible = function(visible)
 
 
 
 
 
10606
  {
10607
+ Parent.prototype.setVisible.call(this, visible);
 
10608
 
10609
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
10610
+ {
10611
+ if(visible)
10612
+ {
10613
+ var style = this.getVectorLayerStyle();
10614
+ this.feature.setStyle(style);
10615
+ }
10616
+ else
10617
+ this.feature.setStyle(null);
10618
+
10619
+ /*var source = this.map.markerLayer.getSource();
10620
+
10621
+ /*if(this.featureInSource == visible)
10622
+ return;
10623
+
10624
+ if(visible)
10625
+ source.addFeature(this.feature);
10626
+ else
10627
+ source.removeFeature(this.feature);
10628
+
10629
+ this.featureInSource = visible;*/
10630
+ }
10631
+ else
10632
+ this.overlay.getElement().style.display = (visible ? "block" : "none");
10633
  }
10634
 
10635
+ WPGMZA.OLMarker.prototype.setPosition = function(latLng)
 
 
 
 
 
10636
  {
10637
+ Parent.prototype.setPosition.call(this, latLng);
 
10638
 
10639
+ var origin = ol.proj.fromLonLat([
10640
+ parseFloat(this.lng),
10641
+ parseFloat(this.lat)
10642
+ ]);
10643
 
10644
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
10645
+ this.feature.setGeometry(new ol.geom.Point(origin));
10646
+ else
10647
+ this.overlay.setPosition(origin);
 
 
 
 
 
 
 
 
 
10648
  }
10649
 
10650
+ WPGMZA.OLMarker.prototype.updateOffset = function(x, y)
 
 
 
 
 
10651
  {
10652
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
10653
+ {
10654
+ console.warn("Marker offset is not currently supported in Vector Layer rendering mode");
 
10655
  return;
10656
+ }
10657
 
10658
+ var x = this._offset.x;
10659
+ var y = this._offset.y;
 
 
 
 
 
 
 
 
10660
 
10661
+ this.element.style.position = "relative";
10662
+ this.element.style.left = x + "px";
10663
+ this.element.style.top = y + "px";
10664
  }
10665
 
10666
+ WPGMZA.OLMarker.prototype.setAnimation = function(anim)
 
 
 
 
10667
  {
10668
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
10669
+ {
10670
+ console.warn("Marker animation is not currently supported in Vector Layer rendering mode");
10671
+ return;
10672
+ }
10673
+
10674
+ Parent.prototype.setAnimation.call(this, anim);
10675
+
10676
+ switch(anim)
10677
+ {
10678
+ case WPGMZA.Marker.ANIMATION_NONE:
10679
+ $(this.element).removeAttr("data-anim");
10680
+ break;
10681
+
10682
+ case WPGMZA.Marker.ANIMATION_BOUNCE:
10683
+ $(this.element).attr("data-anim", "bounce");
10684
+ break;
10685
+
10686
+ case WPGMZA.Marker.ANIMATION_DROP:
10687
+ $(this.element).attr("data-anim", "drop");
10688
+ break;
10689
+ }
10690
  }
10691
 
10692
+ WPGMZA.OLMarker.prototype.setDraggable = function(draggable)
 
 
 
 
10693
  {
10694
+ var self = this;
10695
+
10696
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
10697
+ {
10698
+ console.warn("Marker dragging is not currently supported in Vector Layer rendering mode");
10699
+ return;
10700
+ }
10701
+
10702
+ if(draggable)
10703
+ {
10704
+ var options = {
10705
+ disabled: false
10706
+ };
10707
+
10708
+ if(!this.jQueryDraggableInitialized)
10709
+ {
10710
+ options.start = function(event) {
10711
+ self.onDragStart(event);
10712
+ }
10713
+
10714
+ options.stop = function(event) {
10715
+ self.onDragEnd(event);
10716
+ };
10717
+ }
10718
+
10719
+ $(this.element).draggable(options);
10720
+ this.jQueryDraggableInitialized = true;
10721
+
10722
+ this.rebindClickListener();
10723
+ }
10724
+ else
10725
+ $(this.element).draggable({disabled: true});
10726
  }
10727
 
10728
+ WPGMZA.OLMarker.prototype.setOpacity = function(opacity)
 
 
 
 
10729
  {
10730
+ if(WPGMZA.OLMarker.renderMode == WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)
10731
+ {
10732
+ console.warn("Marker opacity is not currently supported in Vector Layer rendering mode");
10733
+ return;
10734
+ }
10735
+
10736
+ $(this.element).css({opacity: opacity});
10737
  }
10738
 
10739
+ WPGMZA.OLMarker.prototype.onDragStart = function(event)
 
 
 
 
10740
  {
10741
+ this.isBeingDragged = true;
10742
+
10743
+ this.map.olMap.getInteractions().forEach(function(interaction) {
10744
+
10745
+ if(interaction instanceof ol.interaction.DragPan)
10746
+ interaction.setActive(false);
10747
+
10748
  });
10749
  }
10750
 
10751
+ WPGMZA.OLMarker.prototype.onDragEnd = function(event)
10752
  {
10753
+ var self = this;
10754
+ var offset = {
10755
+ top: parseFloat( $(this.element).css("top").match(/-?\d+/)[0] ),
10756
+ left: parseFloat( $(this.element).css("left").match(/-?\d+/)[0] )
10757
+ };
10758
+
10759
+ $(this.element).css({
10760
+ top: "0px",
10761
+ left: "0px"
10762
  });
10763
+
10764
+ var currentLatLng = this.getPosition();
10765
+ var pixelsBeforeDrag = this.map.latLngToPixels(currentLatLng);
10766
+ var pixelsAfterDrag = {
10767
+ x: pixelsBeforeDrag.x + offset.left,
10768
+ y: pixelsBeforeDrag.y + offset.top
 
10769
  };
10770
+ var latLngAfterDrag = this.map.pixelsToLatLng(pixelsAfterDrag);
10771
+
10772
+ this.setPosition(latLngAfterDrag);
10773
+
10774
+ this.isBeingDragged = false;
10775
+ this.trigger({type: "dragend", latLng: latLngAfterDrag});
10776
+
10777
+ // NB: "yes" represents disabled
10778
+ if(this.map.settings.wpgmza_settings_map_draggable != "yes")
10779
+ this.map.olMap.getInteractions().forEach(function(interaction) {
10780
+
10781
+ if(interaction instanceof ol.interaction.DragPan)
10782
+ interaction.setActive(true);
10783
+
10784
+ });
10785
  }
10786
 
10787
+ WPGMZA.OLMarker.prototype.onElementClick = function(event)
10788
  {
10789
+ var self = event.currentTarget.wpgmzaMarker;
 
 
 
 
 
 
 
 
 
10790
 
10791
+ if(self.isBeingDragged)
10792
+ return; // Don't dispatch click event after a drag
10793
+
10794
+ self.dispatchEvent("click");
10795
+ self.dispatchEvent("select");
 
 
 
 
 
10796
  }
10797
 
10798
  /**
10799
+ * Binds / rebinds the click listener. This must be bound after draggable is initialized,
10800
+ * this solves the click listener firing before dragend
10801
  */
10802
+ WPGMZA.OLMarker.prototype.rebindClickListener = function()
10803
  {
10804
+ $(this.element).off("click", this.onElementClick);
10805
+ $(this.element).on("click", this.onElementClick);
 
 
 
 
 
 
 
 
 
 
 
 
10806
  }
10807
 
10808
  });
10809
 
10810
+ // js/v8/open-layers/ol-modern-store-locator-circle.js
10811
  /**
10812
  * @namespace WPGMZA
10813
+ * @module OLModernStoreLocatorCircle
10814
+ * @requires WPGMZA.ModernStoreLocatorCircle
 
10815
  */
10816
  jQuery(function($) {
10817
 
10818
+ WPGMZA.OLModernStoreLocatorCircle = function(map, settings)
10819
+ {
10820
+ WPGMZA.ModernStoreLocatorCircle.call(this, map, settings);
10821
+ }
10822
 
10823
+ WPGMZA.OLModernStoreLocatorCircle.prototype = Object.create(WPGMZA.ModernStoreLocatorCircle.prototype);
10824
+ WPGMZA.OLModernStoreLocatorCircle.prototype.constructor = WPGMZA.OLModernStoreLocatorCircle;
10825
+
10826
+ WPGMZA.OLModernStoreLocatorCircle.prototype.initCanvasLayer = function()
10827
  {
10828
  var self = this;
10829
+ var mapElement = $(this.map.element);
10830
+ var olViewportElement = mapElement.children(".ol-viewport");
10831
 
10832
+ this.canvas = document.createElement("canvas");
10833
+ this.canvas.className = "wpgmza-ol-canvas-overlay";
10834
+ mapElement.append(this.canvas);
10835
 
10836
+ this.renderFunction = function(event) {
10837
+
10838
+ if(self.canvas.width != olViewportElement.width() || self.canvas.height != olViewportElement.height())
 
10839
  {
10840
+ self.canvas.width = olViewportElement.width();
10841
+ self.canvas.height = olViewportElement.height();
10842
+
10843
+ $(this.canvas).css({
10844
+ width: olViewportElement.width() + "px",
10845
+ height: olViewportElement.height() + "px"
10846
+ });
 
 
 
 
10847
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10848
 
10849
+ self.draw();
10850
+ };
 
 
10851
 
10852
+ this.map.olMap.on("postrender", this.renderFunction);
10853
+ }
10854
+
10855
+ WPGMZA.OLModernStoreLocatorCircle.prototype.getContext = function(type)
10856
+ {
10857
+ return this.canvas.getContext(type);
10858
+ }
10859
+
10860
+ WPGMZA.OLModernStoreLocatorCircle.prototype.getCanvasDimensions = function()
10861
+ {
10862
+ return {
10863
+ width: this.canvas.width,
10864
+ height: this.canvas.height
10865
+ };
10866
+ }
10867
+
10868
+ WPGMZA.OLModernStoreLocatorCircle.prototype.getCenterPixels = function()
10869
+ {
10870
+ var center = this.map.latLngToPixels(this.settings.center);
10871
 
10872
+ return center;
10873
+ }
 
 
 
 
 
 
 
 
 
 
 
10874
 
10875
+ WPGMZA.OLModernStoreLocatorCircle.prototype.getWorldOriginOffset = function()
10876
+ {
10877
+ return {
10878
+ x: 0,
10879
+ y: 0
10880
+ };
10881
  }
10882
 
10883
+ WPGMZA.OLModernStoreLocatorCircle.prototype.getTransformedRadius = function(km)
10884
+ {
10885
+ var center = new WPGMZA.LatLng(this.settings.center);
10886
+ var outer = new WPGMZA.LatLng(center);
 
 
 
 
10887
 
10888
+ outer.moveByDistance(km, 90);
 
 
10889
 
10890
+ var centerPixels = this.map.latLngToPixels(center);
10891
+ var outerPixels = this.map.latLngToPixels(outer);
10892
+
10893
+ return Math.abs(outerPixels.x - centerPixels.x);
10894
+
10895
+ /*if(!window.testMarker){
10896
+ window.testMarker = WPGMZA.Marker.createInstance({
10897
+ position: outer
10898
+ });
10899
+ WPGMZA.maps[0].addMarker(window.testMarker);
10900
  }
10901
 
10902
+ return 100;*/
10903
+ }
10904
 
10905
+ WPGMZA.OLModernStoreLocatorCircle.prototype.getScale = function()
10906
  {
10907
+ return 1;
10908
+ }
10909
+
10910
+ WPGMZA.OLModernStoreLocatorCircle.prototype.destroy = function()
10911
+ {
10912
+ $(this.canvas).remove();
 
 
 
10913
 
10914
+ this.map.olMap.un("postrender", this.renderFunction);
10915
+ this.map = null;
10916
+ this.canvas = null;
10917
  }
10918
 
10919
+ });
10920
+
10921
+ // js/v8/open-layers/ol-modern-store-locator.js
10922
+ /**
10923
+ * @namespace WPGMZA
10924
+ * @module OLModernStoreLocator
10925
+ * @requires WPGMZA.ModernStoreLocator
10926
+ */
10927
+ jQuery(function($) {
10928
+
10929
+ WPGMZA.OLModernStoreLocator = function(map_id)
10930
  {
10931
+ var element;
10932
+
10933
+ WPGMZA.ModernStoreLocator.call(this, map_id);
10934
+
10935
+ if(WPGMZA.isProVersion())
10936
+ element = $(".wpgmza_map[data-map-id='" + map_id + "']");
10937
+ else
10938
+ element = $("#wpgmza_map");
10939
+
10940
+ element.append(this.element);
10941
  }
10942
 
10943
+ WPGMZA.OLModernStoreLocator.prototype = Object.create(WPGMZA.ModernStoreLocator);
10944
+ WPGMZA.OLModernStoreLocator.prototype.constructor = WPGMZA.OLModernStoreLocator;
10945
+
10946
+ });
10947
+
10948
+ // js/v8/open-layers/ol-polygon.js
10949
+ /**
10950
+ * @namespace WPGMZA
10951
+ * @module OLPolygon
10952
+ * @requires WPGMZA.Polygon
10953
+ * @pro-requires WPGMZA.ProPolygon
10954
+ */
10955
+ jQuery(function($) {
10956
+
10957
+ var Parent;
10958
+
10959
+ WPGMZA.OLPolygon = function(options, olFeature)
10960
  {
10961
  var self = this;
 
 
 
 
 
10962
 
10963
+ Parent.call(this, options, olFeature);
 
10964
 
10965
+ this.olStyle = new ol.style.Style();
 
 
 
 
 
10966
 
10967
+ if(olFeature)
10968
  {
10969
+ this.olFeature = olFeature;
10970
+ }
10971
+ else
10972
+ {
10973
+ var coordinates = [[]];
10974
 
10975
+ if(options && options.polydata)
10976
+ {
10977
+ var paths = this.parseGeometry(options.polydata);
10978
+
10979
+ for(var i = 0; i < paths.length; i++)
10980
+ coordinates[0].push(ol.proj.fromLonLat([
10981
+ parseFloat(paths[i].lng),
10982
+ parseFloat(paths[i].lat)
10983
+ ]));
10984
+
10985
+ this.olStyle = new ol.style.Style(this.getStyleFromSettings());
10986
+ }
10987
 
10988
+ this.olFeature = new ol.Feature({
10989
+ geometry: new ol.geom.Polygon(coordinates)
10990
+ });
10991
  }
10992
 
10993
+ this.layer = new ol.layer.Vector({
10994
+ source: new ol.source.Vector({
10995
+ features: [this.olFeature]
10996
+ }),
10997
+ style: this.olStyle
10998
+ });
10999
+
11000
+ this.layer.getSource().getFeatures()[0].setProperties({
11001
+ wpgmzaPolygon: this
11002
+ });
11003
  }
11004
 
11005
+ if(WPGMZA.isProVersion())
11006
+ Parent = WPGMZA.ProPolygon;
11007
+ else
11008
+ Parent = WPGMZA.Polygon;
 
 
 
 
 
11009
 
11010
+ WPGMZA.OLPolygon.prototype = Object.create(Parent.prototype);
11011
+ WPGMZA.OLPolygon.prototype.constructor = WPGMZA.OLPolygon;
11012
+
11013
+ WPGMZA.OLPolygon.prototype.getStyleFromSettings = function()
 
11014
  {
11015
+ var params = {};
11016
+
11017
+ if(this.linecolor && this.lineopacity)
11018
+ params.stroke = new ol.style.Stroke({
11019
+ color: WPGMZA.hexOpacityToRGBA("#" + this.linecolor, this.lineopacity)
11020
+ });
11021
 
11022
+ if(this.opacity)
11023
+ params.fill = new ol.style.Fill({
11024
+ color: WPGMZA.hexOpacityToRGBA(this.fillcolor, this.opacity)
11025
+ });
11026
+
11027
+ return params;
11028
  }
11029
 
11030
+ WPGMZA.OLPolygon.prototype.updateStyleFromSettings = function()
11031
  {
11032
+ // Re-create the style - working on it directly doesn't cause a re-render
11033
+ var params = this.getStyleFromSettings();
11034
+ this.olStyle = new ol.style.Style(params);
11035
+ this.layer.setStyle(this.olStyle);
11036
  }
11037
 
11038
+ WPGMZA.OLPolygon.prototype.setEditable = function(editable)
11039
  {
11040
+
11041
  }
11042
 
11043
+ WPGMZA.OLPolygon.prototype.toJSON = function()
11044
  {
11045
+ var result = Parent.prototype.toJSON.call(this);
11046
+ var coordinates = this.olFeature.getGeometry().getCoordinates()[0];
11047
+
11048
+ result.points = [];
11049
+
11050
+ for(var i = 0; i < coordinates.length; i++)
11051
+ {
11052
+ var lonLat = ol.proj.toLonLat(coordinates[i]);
11053
+ var latLng = {
11054
+ lat: lonLat[1],
11055
+ lng: lonLat[0]
11056
+ };
11057
+ result.points.push(latLng);
11058
+ }
11059
+
11060
+ return result;
11061
  }
11062
 
11063
  });
11064
 
11065
+ // js/v8/open-layers/ol-polyline.js
11066
  /**
11067
  * @namespace WPGMZA
11068
+ * @module OLPolyline
11069
+ * @requires WPGMZA.Polyline
11070
  */
11071
  jQuery(function($) {
11072
 
11073
+ var Parent;
11074
+
11075
+ WPGMZA.OLPolyline = function(options, olFeature)
11076
  {
11077
  var self = this;
11078
 
11079
+ WPGMZA.Polyline.call(this, options);
11080
 
11081
+ this.olStyle = new ol.style.Style();
11082
+
11083
+ if(olFeature)
11084
+ {
11085
+ this.olFeature = olFeature;
11086
+ }
11087
+ else
11088
+ {
11089
+ var coordinates = [];
11090
 
11091
+ if(options && (options.polydata || options.points))
11092
+ {
11093
+ var path;
11094
+
11095
+ if(options.polydata)
11096
+ path = this.parseGeometry(options.polydata);
11097
+ else
11098
+ path = options.points;
11099
+
11100
+ for(var i = 0; i < path.length; i++)
11101
+ {
11102
+ if(!($.isNumeric(path[i].lat)))
11103
+ throw new Error("Invalid latitude");
11104
+
11105
+ if(!($.isNumeric(path[i].lng)))
11106
+ throw new Error("Invalid longitude");
11107
+
11108
+ coordinates.push(ol.proj.fromLonLat([
11109
+ parseFloat(path[i].lng),
11110
+ parseFloat(path[i].lat)
11111
+ ]));
11112
+ }
11113
+ }
11114
 
11115
+ var params = this.getStyleFromSettings();
11116
+ this.olStyle = new ol.style.Style(params);
11117
 
11118
+ this.olFeature = new ol.Feature({
11119
+ geometry: new ol.geom.LineString(coordinates)
11120
+ });
11121
+ }
11122
 
11123
+ this.layer = new ol.layer.Vector({
11124
+ source: new ol.source.Vector({
11125
+ features: [this.olFeature]
11126
+ }),
11127
+ style: this.olStyle
11128
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11129
 
11130
+ this.layer.getSource().getFeatures()[0].setProperties({
11131
+ wpgmzaPolyline: this
11132
+ });
 
 
 
 
 
 
 
 
11133
  }
11134
 
11135
+ Parent = WPGMZA.Polyline;
11136
+
11137
+ WPGMZA.OLPolyline.prototype = Object.create(Parent.prototype);
11138
+ WPGMZA.OLPolyline.prototype.constructor = WPGMZA.OLPolyline;
11139
+
11140
+ WPGMZA.OLPolyline.prototype.getStyleFromSettings = function()
11141
  {
11142
+ var params = {};
11143
 
11144
+ if(this.settings.strokeOpacity)
11145
+ params.stroke = new ol.style.Stroke({
11146
+ color: WPGMZA.hexOpacityToRGBA(this.settings.strokeColor, this.settings.strokeOpacity),
11147
+ width: parseInt(this.settings.strokeWeight)
11148
+ });
11149
+
11150
+ return params;
11151
  }
11152
 
11153
+ WPGMZA.OLPolyline.prototype.updateStyleFromSettings = function()
11154
  {
11155
+ // Re-create the style - working on it directly doesn't cause a re-render
11156
+ var params = this.getStyleFromSettings();
11157
+ this.olStyle = new ol.style.Style(params);
11158
+ this.layer.setStyle(this.olStyle);
11159
  }
11160
 
11161
+ WPGMZA.OLPolyline.prototype.setEditable = function(editable)
11162
  {
 
11163
 
 
11164
  }
11165
 
11166
+ WPGMZA.OLPolyline.prototype.setPoints = function(points)
11167
  {
11168
+ if(this.olFeature)
11169
+ this.layer.getSource().removeFeature(this.olFeature);
 
 
 
 
 
 
 
 
 
 
11170
 
11171
+ var coordinates = [];
 
11172
 
11173
+ for(var i = 0; i < points.length; i++)
11174
+ coordinates.push(ol.proj.fromLonLat([
11175
+ parseFloat(points[i].lng),
11176
+ parseFloat(points[i].lat)
11177
+ ]));
11178
 
11179
+ this.olFeature = new ol.Feature({
11180
+ geometry: new ol.geom.LineString(coordinates)
11181
+ });
11182
 
11183
+ this.layer.getSource().addFeature(this.olFeature);
 
 
 
 
 
 
 
 
11184
  }
11185
 
11186
+ WPGMZA.OLPolyline.prototype.toJSON = function()
11187
  {
11188
+ var result = Parent.prototype.toJSON.call(this);
11189
+ var coordinates = this.olFeature.getGeometry().getCoordinates();
11190
 
11191
+ result.points = [];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11192
 
11193
+ for(var i = 0; i < coordinates.length; i++)
11194
+ {
11195
+ var lonLat = ol.proj.toLonLat(coordinates[i]);
11196
+ var latLng = {
11197
+ lat: lonLat[1],
11198
+ lng: lonLat[0]
11199
+ };
11200
+ result.points.push(latLng);
11201
+ }
11202
 
11203
+ return result;
11204
  }
11205
 
11206
  });
11207
 
11208
+ // js/v8/open-layers/ol-text.js
11209
  /**
11210
  * @namespace WPGMZA
11211
+ * @module OLText
11212
+ * @requires WPGMZA.Text
11213
  */
11214
  jQuery(function($) {
11215
 
11216
+ WPGMZA.OLText = function()
11217
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11218
 
 
 
11219
  }
11220
 
 
 
 
11221
  });
11222
 
11223
+ // js/v8/tables/datatable.js
11224
  /**
11225
  * @namespace WPGMZA
11226
+ * @module DataTable
11227
+ * @requires WPGMZA
 
11228
  */
11229
  jQuery(function($) {
11230
 
11231
+ WPGMZA.DataTable = function(element)
 
 
11232
  {
11233
  var self = this;
11234
+ if(!$.fn.dataTable)
 
 
 
11235
  {
11236
+ console.warn("The dataTables library is not loaded. Cannot create a dataTable. Did you enable 'Do not enqueue dataTables'?");
11237
+
11238
+ if(WPGMZA.settings.wpgmza_do_not_enqueue_datatables && WPGMZA.getCurrentPage() == WPGMZA.PAGE_MAP_EDIT)
11239
+ alert("You have selected 'Do not enqueue DataTables' in WP Google Maps' settings. No 3rd party software is loading the DataTables library. Because of this, the marker table cannot load. Please uncheck this option to use the marker table.");
11240
+
11241
+ return;
11242
  }
11243
+
11244
+ if($.fn.dataTable.ext)
11245
+ $.fn.dataTable.ext.errMode = "throw";
11246
  else
11247
  {
11248
+ var version = $.fn.dataTable.version ? $.fn.dataTable.version : "unknown";
11249
 
11250
+ console.warn("You appear to be running an outdated or modified version of the dataTables library. This may cause issues with table functionality. This is usually caused by 3rd party software loading an older version of DataTables. The loaded version is " + version + ", we recommend version 1.10.12 or above.");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11251
  }
11252
 
11253
+ this.element = element;
11254
+ this.element.wpgmzaDataTable = this;
11255
+ this.dataTableElement = this.getDataTableElement();
11256
+
11257
+ var settings = this.getDataTableSettings();
 
 
 
 
 
 
11258
 
11259
+ this.phpClass = $(element).attr("data-wpgmza-php-class");
11260
+ this.wpgmzaDataTable = this;
11261
+
11262
+ this.useCompressedPathVariable = (WPGMZA.restAPI.isCompressedPathVariableSupported && WPGMZA.settings.enable_compressed_path_variables);
11263
+ this.method = (this.useCompressedPathVariable ? "GET" : "POST");
11264
+
11265
+ if(this.getLanguageURL() == undefined || this.getLanguageURL() == "//cdn.datatables.net/plug-ins/1.10.12/i18n/English.json")
11266
+ {
11267
+ this.dataTable = $(this.dataTableElement).DataTable(settings);
11268
+ this.dataTable.ajax.reload();
11269
+ }
11270
+ else{
11271
+
11272
+ $.ajax(this.getLanguageURL(), {
11273
+
11274
+ success: function(response, status, xhr)
11275
+ {
11276
+ self.languageJSON = response; // TODO: This doesn't appear to go anywhere
11277
+
11278
+ self.dataTable = $(self.dataTableElement).DataTable(settings);
11279
+ self.dataTable.ajax.reload();
11280
+ },
11281
+
11282
+ error: function()
11283
+ {
11284
+ // TODO: Use complete instead
11285
+ self.dataTable = $(self.dataTableElement).DataTable(settings);
11286
+ self.dataTable.ajax.reload();
11287
+ }
11288
+
11289
+ });
11290
+ }
11291
  }
11292
 
11293
+ WPGMZA.DataTable.prototype.getDataTableElement = function()
 
 
 
 
11294
  {
11295
+ return $(this.element).find("table");
11296
  }
11297
 
11298
  /**
11299
+ * This function wraps the request so it doesn't collide with WP query vars,
11300
+ * it also adds the PHP class so that the controller knows which class to
11301
+ * instantiate
11302
  * @return object
11303
  */
11304
+ WPGMZA.DataTable.prototype.onAJAXRequest = function(data, settings)
11305
  {
11306
+ // TODO: Move this to the REST API module and add useCompressedPathVariable
11307
+ var params = {
11308
+ "phpClass": this.phpClass
11309
+ };
11310
 
11311
+ var attr = $(this.element).attr("data-wpgmza-ajax-parameters");
11312
+ if(attr)
11313
+ $.extend(params, JSON.parse(attr));
11314
 
11315
+ return $.extend(data, params);
11316
+ }
11317
+
11318
+ WPGMZA.DataTable.prototype.onDataTableAjaxRequest = function(data, callback, settings) {
11319
+ var self = this;
11320
+ var element = this.element;
11321
+ var route = $(element).attr("data-wpgmza-rest-api-route");
11322
+ var params = this.onAJAXRequest(data, settings);
11323
+ var draw = params.draw;
11324
+
11325
+ delete params.draw;
11326
+
11327
+ if(!route)
11328
+ throw new Error("No data-wpgmza-rest-api-route attribute specified");
11329
+
11330
+ var options = {
11331
+ method: "POST",
11332
+ useCompressedPathVariable: true,
11333
+ data: params,
11334
+ dataType: "json",
11335
+ cache: !this.preventCaching,
11336
+ beforeSend: function(xhr) {
11337
+ // Put draw in header, for compressed requests
11338
+ xhr.setRequestHeader("X-DataTables-Draw", draw);
11339
+ },
11340
+ success: function(response, status, xhr) {
11341
+
11342
+ response.draw = draw;
11343
+ self.lastResponse = response;
11344
+
11345
+ callback(response);
11346
+ self.onAJAXResponse(response);
11347
+
11348
+ }
11349
+ };
11350
+
11351
+
11352
+
11353
+ return WPGMZA.restAPI.call(route, options);
11354
+ }
11355
+
11356
+ WPGMZA.DataTable.prototype.getDataTableSettings = function()
11357
+ {
11358
+ var self = this;
11359
+ var element = this.element;
11360
+ var options = {};
11361
+
11362
+ if($(element).attr("data-wpgmza-datatable-options"))
11363
+ options = JSON.parse($(element).attr("data-wpgmza-datatable-options"));
11364
+
11365
+ options.deferLoading = true;
11366
+ options.processing = true;
11367
+ options.serverSide = true;
11368
+ options.ajax = function(data, callback, settings) {
11369
+ return WPGMZA.DataTable.prototype.onDataTableAjaxRequest.apply(self, arguments);
11370
  }
11371
 
11372
+ if(WPGMZA.AdvancedTableDataTable && this instanceof WPGMZA.AdvancedTableDataTable && WPGMZA.settings.wpgmza_default_items)
11373
+ options.iDisplayLength = parseInt(WPGMZA.settings.wpgmza_default_items);
11374
+
11375
+ options.aLengthMenu = [[5, 10, 25, 50, 100, -1], ["5", "10", "25", "50", "100", WPGMZA.localized_strings.all]];
11376
+
11377
+ var languageURL = this.getLanguageURL();
11378
+ if(languageURL)
11379
+ options.language = {
11380
+ "url": languageURL
11381
+ };
11382
+
11383
+ return options;
11384
  }
11385
 
11386
+ WPGMZA.DataTable.prototype.getLanguageURL = function()
11387
+ {
11388
+ if(!WPGMZA.locale)
11389
+ return null;
11390
+
11391
+ var languageURL;
11392
+
11393
+ switch(WPGMZA.locale.substr(0, 2))
11394
+ {
11395
+ case "af":
11396
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Afrikaans.json";
11397
+ break;
11398
+
11399
+ case "sq":
11400
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Albanian.json";
11401
+ break;
11402
+
11403
+ case "am":
11404
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Amharic.json";
11405
+ break;
11406
+
11407
+ case "ar":
11408
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Arabic.json";
11409
+ break;
11410
+
11411
+ case "hy":
11412
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Armenian.json";
11413
+ break;
11414
+
11415
+ case "az":
11416
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Azerbaijan.json";
11417
+ break;
11418
+
11419
+ case "bn":
11420
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Bangla.json";
11421
+ break;
11422
+
11423
+ case "eu":
11424
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Basque.json";
11425
+ break;
11426
+
11427
+ case "be":
11428
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Belarusian.json";
11429
+ break;
11430
+
11431
+ case "bg":
11432
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Bulgarian.json";
11433
+ break;
11434
+
11435
+ case "ca":
11436
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Catalan.json";
11437
+ break;
11438
+
11439
+ case "zh":
11440
+ if(WPGMZA.locale == "zh_TW")
11441
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Chinese-traditional.json";
11442
+ else
11443
+ languageURL = "//cdn.datatables.net/plug-ins/1.10.12/i18n/Chinese.json";
11444
+ break;
11445
+
11446
+ case "hr":
11447
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Croatian.json";
11448
+ break;
11449
+
11450
+ case "cs":
11451
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Czech.json";
11452
+ break;
11453
+
11454
+ case "da":
11455
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Danish.json";
11456
+ break;
11457
+
11458
+ case "nl":
11459
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Dutch.json";
11460
+ break;
11461
+
11462
+ /*case "en":
11463
+ languageURL = "//cdn.datatables.net/plug-ins/1.10.12/i18n/English.json";
11464
+ break;*/
11465
+
11466
+ case "et":
11467
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Estonian.json";
11468
+ break;
11469
+
11470
+ case "fi":
11471
+ if(WPGMZA.locale.match(/^fil/))
11472
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Filipino.json";
11473
+ else
11474
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Finnish.json";
11475
+ break;
11476
+
11477
+ case "fr":
11478
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/French.json";
11479
+ break;
11480
+
11481
+ case "gl":
11482
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Galician.json";
11483
+ break;
11484
+
11485
+ case "ka":
11486
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Georgian.json";
11487
+ break;
11488
+
11489
+ case "de":
11490
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/German.json";
11491
+ break;
11492
+
11493
+ case "el":
11494
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Greek.json";
11495
+ break;
11496
+
11497
+ case "gu":
11498
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Gujarati.json";
11499
+ break;
11500
+
11501
+ case "he":
11502
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Hebrew.json";
11503
+ break;
11504
+
11505
+ case "hi":
11506
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Hindi.json";
11507
+ break;
11508
+
11509
+ case "hu":
11510
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Hungarian.json";
11511
+ break;
11512
+
11513
+ case "is":
11514
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Icelandic.json";
11515
+ break;
11516
+
11517
+ /*case "id":
11518
+ languageURL = "//cdn.datatables.net/plug-ins/1.10.12/i18n/Indonesian-Alternative.json";
11519
+ break;*/
11520
+
11521
+ case "id":
11522
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Indonesian.json";
11523
+ break;
11524
+
11525
+ case "ga":
11526
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Irish.json";
11527
+ break;
11528
 
11529
+ case "it":
11530
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Italian.json";
11531
+ break;
11532
+
11533
+ case "ja":
11534
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Japanese.json";
11535
+ break;
11536
+
11537
+ case "kk":
11538
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Kazakh.json";
11539
+ break;
11540
+
11541
+ case "ko":
11542
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Korean.json";
11543
+ break;
11544
+
11545
+ case "ky":
11546
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Kyrgyz.json";
11547
+ break;
11548
+
11549
+ case "lv":
11550
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Latvian.json";
11551
+ break;
11552
+
11553
+ case "lt":
11554
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Lithuanian.json";
11555
+ break;
11556
+
11557
+ case "mk":
11558
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Macedonian.json";
11559
+ break;
11560
+
11561
+ case "ml":
11562
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Malay.json";
11563
+ break;
11564
+
11565
+ case "mn":
11566
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Mongolian.json";
11567
+ break;
11568
+
11569
+ case "ne":
11570
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Nepali.json";
11571
+ break;
11572
+
11573
+ case "nb":
11574
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Norwegian-Bokmal.json";
11575
+ break;
11576
 
11577
+ case "nn":
11578
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Norwegian-Nynorsk.json";
11579
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
11580
 
11581
+ case "ps":
11582
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Pashto.json";
11583
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11584
 
11585
+ case "fa":
11586
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Persian.json";
11587
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11588
 
11589
+ case "pl":
11590
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Polish.json";
11591
+ break;
11592
+
11593
+ case "pt":
11594
+ if(WPGMZA.locale == "pt_BR")
11595
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Portuguese-Brasil.json";
11596
+ else
11597
+ languageURL = "//cdn.datatables.net/plug-ins/1.10.12/i18n/Portuguese.json";
11598
+ break;
11599
+
11600
+ case "ro":
11601
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Romanian.json";
11602
+ break;
11603
+
11604
+ case "ru":
11605
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Russian.json";
11606
+ break;
11607
+
11608
+ case "sr":
11609
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Serbian.json";
11610
+ break;
11611
+
11612
+ case "si":
11613
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Sinhala.json";
11614
+ break;
11615
+
11616
+ case "sk":
11617
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Slovak.json";
11618
+ break;
11619
+
11620
+ case "sl":
11621
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Slovenian.json";
11622
+ break;
11623
+
11624
+ case "es":
11625
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Spanish.json";
11626
+ break;
11627
+
11628
+ case "sw":
11629
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Swahili.json";
11630
+ break;
11631
+
11632
+ case "sv":
11633
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Swedish.json";
11634
+ break;
11635
+
11636
+ case "ta":
11637
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Tamil.json";
11638
+ break;
11639
+
11640
+ case "te":
11641
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/telugu.json";
11642
+ break;
11643
+
11644
+ case "th":
11645
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Thai.json";
11646
+ break;
11647
+
11648
+ case "tr":
11649
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Turkish.json";
11650
+ break;
11651
 
11652
+ case "uk":
11653
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Ukrainian.json";
11654
+ break;
11655
+
11656
+ case "ur":
11657
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Urdu.json";
11658
+ break;
11659
+
11660
+ case "uz":
11661
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Uzbek.json";
11662
+ break;
11663
+
11664
+ case "vi":
11665
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Vietnamese.json";
11666
+ break;
11667
+
11668
+ case "cy":
11669
+ languageURL = WPGMZA.pluginDirURL + "languages/datatables/Welsh.json";
11670
+ break;
11671
+ }
11672
 
11673
+ return languageURL;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11674
  }
11675
 
11676
+ WPGMZA.DataTable.prototype.onAJAXResponse = function(response)
11677
  {
11678
+
11679
  }
11680
 
11681
+ WPGMZA.DataTable.prototype.reload = function()
11682
  {
11683
+ this.dataTable.ajax.reload(null, false); // null callback, false for resetPaging
 
 
 
11684
  }
11685
 
11686
  });
11687
 
11688
+ // js/v8/tables/admin-marker-datatable.js
11689
  /**
11690
  * @namespace WPGMZA
11691
+ * @module AdminMarkerDataTable
11692
+ * @requires WPGMZA.DataTable
11693
  */
11694
  jQuery(function($) {
11695
 
11696
+ WPGMZA.AdminMarkerDataTable = function(element)
 
 
 
 
 
 
11697
  {
11698
  var self = this;
11699
 
11700
+ this.preventCaching = true;
11701
 
11702
+ WPGMZA.DataTable.call(this, element);
 
 
11703
 
11704
+ // NB: Pro marker panel currently manages edit marker buttons
11705
+
11706
+ $(element).on("click", "[data-delete-marker-id]", function(event) {
11707
+ self.onDeleteMarker(event);
11708
+ });
11709
+
11710
+ $(element).find(".wpgmza.select_all_markers").on("click", function(event) {
11711
+ self.onSelectAll(event);
11712
+ });
11713
+
11714
+ $(element).find(".wpgmza.bulk_delete").on("click", function(event) {
11715
+ self.onBulkDelete(event);
11716
+ });
11717
+
11718
+ $(element).on("click", "[data-center-marker-id]", function(event) {
11719
+ self.onCenterMarker(event);
11720
  });
11721
  }
11722
 
11723
+ WPGMZA.AdminMarkerDataTable.prototype = Object.create(WPGMZA.DataTable.prototype);
11724
+ WPGMZA.AdminMarkerDataTable.prototype.constructor = WPGMZA.AdminMarkerDataTable;
11725
 
11726
+ WPGMZA.AdminMarkerDataTable.createInstance = function(element)
11727
  {
11728
+ return new WPGMZA.AdminMarkerDataTable(element);
 
 
 
 
 
 
 
11729
  }
11730
 
11731
+ WPGMZA.AdminMarkerDataTable.prototype.getDataTableSettings = function()
11732
  {
11733
+ var self = this;
11734
+ var options = WPGMZA.DataTable.prototype.getDataTableSettings.call(this);
11735
 
11736
+ options.createdRow = function(row, data, index)
11737
+ {
11738
+ var meta = self.lastResponse.meta[index];
11739
+ row.wpgmzaMarkerData = meta;
11740
+ }
11741
+
11742
+ return options;
11743
  }
11744
 
11745
+ WPGMZA.AdminMarkerDataTable.prototype.onEditMarker = function(event)
11746
  {
11747
+ WPGMZA.animatedScroll("#wpgmaps_tabs_markers");
 
 
 
 
11748
  }
11749
 
11750
+ WPGMZA.AdminMarkerDataTable.prototype.onDeleteMarker = function(event)
11751
  {
11752
+ var self = this;
11753
+ var id = $(event.currentTarget).attr("data-delete-marker-id");
11754
+
11755
+ var data = {
11756
+ action: 'delete_marker',
11757
+ security: WPGMZA.legacyajaxnonce,
11758
+ map_id: WPGMZA.mapEditPage.map.id,
11759
+ marker_id: id
11760
+ };
11761
+
11762
+ $.post(ajaxurl, data, function(response) {
11763
+
11764
+ WPGMZA.mapEditPage.map.removeMarkerByID(id);
11765
+ self.reload();
11766
+
11767
+ });
11768
  }
11769
 
11770
+ // NB: Move this to UGM
11771
+ WPGMZA.AdminMarkerDataTable.prototype.onApproveMarker = function(event)
11772
  {
11773
+ var self = this;
11774
+ var cur_id = $(this).attr("id");
11775
+
11776
+ var data = {
11777
+ action: 'approve_marker',
11778
+ security: WPGMZA.legacyajaxnonce,
11779
+ map_id: WPGMZA.mapEditPage.map.id,
11780
+ marker_id: cur_id
11781
+ };
11782
+ $.post(ajaxurl, data, function (response) {
11783
+
11784
+
11785
+ wpgmza_InitMap();
11786
+ wpgmza_reinitialisetbl();
11787
 
11788
+ });
 
 
11789
  }
11790
 
11791
+ WPGMZA.AdminMarkerDataTable.prototype.onSelectAll = function(event)
11792
  {
11793
+ $(this.element).find("input[name='mark']").prop("checked", true);
11794
+ }
11795
+
11796
+ WPGMZA.AdminMarkerDataTable.prototype.onBulkDelete = function(event)
11797
+ {
11798
+ var self = this;
11799
+ var ids = [];
11800
+ var map = WPGMZA.maps[0];
11801
+
11802
+ $(this.element).find("input[name='mark']:checked").each(function(index, el) {
11803
+ var row = $(el).closest("tr")[0];
11804
+ ids.push(row.wpgmzaMarkerData.id);
11805
+ });
11806
+
11807
+ ids.forEach(function(marker_id) {
11808
+ var marker = map.getMarkerByID(marker_id);
11809
+
11810
+ if(marker)
11811
+ map.removeMarker(marker);
11812
+ });
11813
+
11814
+ WPGMZA.restAPI.call("/markers/", {
11815
+ method: "DELETE",
11816
+ data: {
11817
+ ids: ids
11818
+ },
11819
+ complete: function() {
11820
+ self.reload();
11821
+ }
11822
+ });
11823
+ }
11824
 
11825
+ WPGMZA.AdminMarkerDataTable.prototype.onCenterMarker = function(event)
11826
+ {
11827
+ var id;
11828
+
11829
+ //Check if we have selected the center on marker button or called this function elsewhere
11830
+ if(event.currentTarget == undefined)
11831
+ {
11832
+ id = event;
11833
+ }
11834
+ else{
11835
+ id = $(event.currentTarget).attr("data-center-marker-id");
11836
  }
11837
 
11838
+ var marker = WPGMZA.mapEditPage.map.getMarkerByID(id);
11839
+
11840
+ if(marker){
11841
+ var latLng = new WPGMZA.LatLng({
11842
+ lat: marker.lat,
11843
+ lng: marker.lng
11844
+ });
11845
+
11846
+ //Set a static zoom level
11847
+ var zoom_value = 6;
11848
+ WPGMZA.mapEditPage.map.setCenter(latLng);
11849
+ WPGMZA.mapEditPage.map.setZoom(zoom_value);
11850
+ WPGMZA.animateScroll("#wpgmaps_tabs_markers");
11851
+ }
11852
+
11853
+
11854
  }
11855
 
11856
+ $(document).ready(function(event) {
11857
+
11858
+ $("[data-wpgmza-admin-marker-datatable]").each(function(index, el) {
11859
+ WPGMZA.adminMarkerDataTable = WPGMZA.AdminMarkerDataTable.createInstance(el);
11860
+ });
11861
+
11862
+ });
11863
+
11864
  });
js/v8/wp-google-maps.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function($){var core={MARKER_PULL_DATABASE:"0",MARKER_PULL_XML:"1",PAGE_MAP_LIST:"map-list",PAGE_MAP_EDIT:"map-edit",PAGE_SETTINGS:"map-settings",PAGE_SUPPORT:"map-support",PAGE_CATEGORIES:"categories",PAGE_ADVANCED:"advanced",PAGE_CUSTOM_FIELDS:"custom-fields",maps:[],events:null,settings:null,restAPI:null,localized_strings:null,loadingHTML:'<div class="wpgmza-preloader"><div></div><div></div><div></div><div></div></div>',getCurrentPage:function(){switch(WPGMZA.getQueryParamValue("page")){case"wp-google-maps-menu":return window.location.href.match(/action=edit/)&&window.location.href.match(/map_id=\d+/)?WPGMZA.PAGE_MAP_EDIT:WPGMZA.PAGE_MAP_LIST;case"wp-google-maps-menu-settings":return WPGMZA.PAGE_SETTINGS;case"wp-google-maps-menu-support":return WPGMZA.PAGE_SUPPORT;case"wp-google-maps-menu-categories":return WPGMZA.PAGE_CATEGORIES;case"wp-google-maps-menu-advanced":return WPGMZA.PAGE_ADVANCED;case"wp-google-maps-menu-custom-fields":return WPGMZA.PAGE_CUSTOM_FIELDS;default:return null}},getScrollAnimationOffset:function(){return(WPGMZA.settings.scroll_animation_offset||0)+$("#wpadminbar").height()},getScrollAnimationDuration:function(){return WPGMZA.settings.scroll_animation_milliseconds?WPGMZA.settings.scroll_animation_milliseconds:500},animateScroll:function(element,milliseconds){var offset=WPGMZA.getScrollAnimationOffset();milliseconds=milliseconds||WPGMZA.getScrollAnimationDuration(),$("html, body").animate({scrollTop:$(element).offset().top-offset},milliseconds)},extend:function(child,parent){var constructor=child;child.prototype=Object.create(parent.prototype),child.prototype.constructor=constructor},guid:function(){var d=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(d+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=(d+16*Math.random())%16|0;return d=Math.floor(d/16),("x"===c?r:3&r|8).toString(16)})},hexOpacityToRGBA:function(colour,opacity){var hex=parseInt(colour.replace(/^#/,""),16);return[(16711680&hex)>>16,(65280&hex)>>8,255&hex,parseFloat(opacity)]},hexToRgba:function(hex){var c;return/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)?(3==(c=hex.substring(1).split("")).length&&(c=[c[0],c[0],c[1],c[1],c[2],c[2]]),{r:(c="0x"+c.join(""))>>16&255,g:c>>8&255,b:255&c,a:1}):0},rgbaToString:function(rgba){return"rgba("+rgba.r+", "+rgba.g+", "+rgba.b+", "+rgba.a+")"},latLngRegexp:/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,isLatLngString:function(str){if("string"!=typeof str)return null;str.match(/^\(.+\)$/)&&(str=str.replace(/^\(|\)$/,""));var m=str.match(WPGMZA.latLngRegexp);return m?new WPGMZA.LatLng({lat:parseFloat(m[1]),lng:parseFloat(m[3])}):null},stringToLatLng:function(str){var result=WPGMZA.isLatLngString(str);if(!result)throw new Error("Not a valid latLng");return result},isHexColorString:function(str){return"string"==typeof str&&!!str.match(/#[0-9A-F]{6}/i)},imageDimensionsCache:{},getImageDimensions:function(src,callback){if(WPGMZA.imageDimensionsCache[src])callback(WPGMZA.imageDimensionsCache[src]);else{var img=document.createElement("img");img.onload=function(event){var result={width:img.width,height:img.height};WPGMZA.imageDimensionsCache[src]=result,callback(result)},img.src=src}},decodeEntities:function(input){return input.replace(/&(nbsp|amp|quot|lt|gt);/g,function(m,e){return m[e]}).replace(/&#(\d+);/gi,function(m,e){return String.fromCharCode(parseInt(e,10))})},isDeveloperMode:function(){return this.settings.developer_mode||window.Cookies&&window.Cookies.get("wpgmza-developer-mode")},isProVersion:function(){return"1"==this._isProVersion},openMediaDialog:function(callback){var file_frame;if(file_frame)return file_frame.uploader.uploader.param("post_id",set_to_post_id),void file_frame.open();(file_frame=wp.media.frames.file_frame=wp.media({title:"Select a image to upload",button:{text:"Use this image"},multiple:!1})).on("select",function(){attachment=file_frame.state().get("selection").first().toJSON(),callback(attachment.id,attachment.url)}),file_frame.open()},getCurrentPosition:function(callback,error,watch){var nativeFunction="getCurrentPosition";if(WPGMZA.userLocationDenied)error&&error({code:1,message:"Location unavailable"});else if(watch&&(nativeFunction="watchPosition"),navigator.geolocation){var options={enableHighAccuracy:!0};navigator.geolocation[nativeFunction]?navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(err){options.enableHighAccuracy=!1,navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(err){console.warn(err.code,err.message),1==err.code&&(WPGMZA.userLocationDenied=!0),error&&error(err)},options)},options):console.warn(nativeFunction+" is not available")}else console.warn("No geolocation available on this device")},watchPosition:function(callback,error){return WPGMZA.getCurrentPosition(callback,error,!0)},runCatchableTask:function(callback,friendlyErrorContainer){if(WPGMZA.isDeveloperMode())callback();else try{callback()}catch(e){var friendlyError=new WPGMZA.FriendlyError(e);$(friendlyErrorContainer).html(""),$(friendlyErrorContainer).append(friendlyError.element),$(friendlyErrorContainer).show()}},assertInstanceOf:function(instance,instanceName){var engine,fullInstanceName,pro=WPGMZA.isProVersion()?"Pro":"";switch(WPGMZA.settings.engine){case"open-layers":engine="OL";break;default:engine="Google"}if(fullInstanceName=WPGMZA[engine+pro+instanceName]?engine+pro+instanceName:WPGMZA[pro+instanceName]?pro+instanceName:WPGMZA[engine+instanceName]?engine+instanceName:instanceName,!(instance instanceof WPGMZA[fullInstanceName]))throw new Error("Object must be an instance of "+fullInstanceName+" (did you call a constructor directly, rather than createInstance?)")},getMapByID:function(id){return!WPGMZA.isProVersion()||MYMAP.map instanceof WPGMZA.Map?MYMAP.map:MYMAP[id].map},isGoogleAutocompleteSupported:function(){return!!window.google&&(!!google.maps&&(!!google.maps.places&&(!!google.maps.places.Autocomplete&&(!WPGMZA.CloudAPI||!WPGMZA.CloudAPI.isBeingUsed))))},googleAPIStatus:window.wpgmza_google_api_status,isSafari:function(){var ua=navigator.userAgent.toLowerCase();return ua.match(/safari/i)&&!ua.match(/chrome/i)},isTouchDevice:function(){return"ontouchstart"in window},isDeviceiOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)},isModernComponentStyleAllowed:function(){return!WPGMZA.settings.user_interface_style||"legacy"==WPGMZA.settings.user_interface_style||"modern"==WPGMZA.settings.user_interface_style},isElementInView:function(element){var pageTop=$(window).scrollTop(),pageBottom=pageTop+$(window).height(),elementTop=$(element).offset().top,elementBottom=elementTop+$(element).height();return elementTop<pageTop&&pageBottom<elementBottom||(pageTop<=elementTop&&elementTop<=pageBottom||pageTop<=elementBottom&&elementBottom<=pageBottom)},isFullScreen:function(){return isFullScreen},getQueryParamValue:function(name){var m,regex=new RegExp(name+"=([^&#]*)");return(m=window.location.href.match(regex))?m[1]:null},notification:function(text,time){switch(arguments.length){case 0:text="",time=4e3;break;case 1:time=4e3}var html='<div class="wpgmza-popup-notification">'+text+"</div>";jQuery("body").append(html),setTimeout(function(){jQuery("body").find(".wpgmza-popup-notification").remove()},time)}};for(var key in window.WPGMZA?window.WPGMZA=$.extend(window.WPGMZA,core):window.WPGMZA=core,WPGMZA_localized_data){var value=WPGMZA_localized_data[key];WPGMZA[key]=value}WPGMZA.settings.useLegacyGlobals=!0,jQuery(function($){$(window).trigger("ready.wpgmza"),$("script[src*='wp-google-maps.combined.js'], script[src*='wp-google-maps-pro.combined.js']").length&&console.warn("Minified script is out of date, using combined script instead.");var elements=$("script").filter(function(){return this.src.match(/(^|\/)jquery\.(min\.)?js(\?|$)/i)});1<elements.length&&console.warn("Multiple jQuery versions detected: ",elements),WPGMZA.restAPI=WPGMZA.RestAPI.createInstance(),WPGMZA.CloudAPI&&(WPGMZA.cloudAPI=WPGMZA.CloudAPI.createInstance()),$(document).on("click",".wpgmza_edit_btn",function(){WPGMZA.animateScroll("#wpgmaps_tabs_markers")})});var isFullScreen=!1;function onScroll(event){$(".wpgmza_map").each(function(index,el){var isInView=WPGMZA.isElementInView(el);el.wpgmzaScrollIntoViewTriggerFlag?isInView||(el.wpgmzaScrollIntoViewTriggerFlag=!1):isInView&&($(el).trigger("mapscrolledintoview.wpgmza"),el.wpgmzaScrollIntoViewTriggerFlag=!0)})}$(document).on("fullscreenchange",function(){isFullScreen=!!document.fullscreenElement}),$(window).on("load",function(event){for(var key in[]){console.warn("The Array object has been extended incorrectly by your theme or another plugin. This can cause issues with functionality.");break}if("https:"!=window.location.protocol){var warning='<div class="notice notice-warning"><p>'+WPGMZA.localized_strings.unsecure_geolocation+"</p></div>";$(".wpgmza-geolocation-setting").each(function(index,el){$(el).after($(warning))})}}),$(window).on("scroll",onScroll),$(window).on("load",onScroll),WPGMZA.refreshOnLoad&&window.location.reload()}),jQuery(function($){WPGMZA.Compatibility=function(){this.preventDocumentWriteGoogleMapsAPI()},WPGMZA.Compatibility.prototype.preventDocumentWriteGoogleMapsAPI=function(){var old=document.write;document.write=function(content){content.match&&content.match(/maps\.google/)||old.call(document,content)}},WPGMZA.compatiblityModule=new WPGMZA.Compatibility}),function(root,factory){"object"==typeof exports?module.exports=factory(root):"function"==typeof define&&define.amd?define([],factory.bind(root,root)):factory(root)}("undefined"!=typeof global?global:this,function(root){if(root.CSS&&root.CSS.escape)return root.CSS.escape;function cssEscape(value){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var codeUnit,string=String(value),length=string.length,index=-1,result="",firstCodeUnit=string.charCodeAt(0);++index<length;)0!=(codeUnit=string.charCodeAt(index))?result+=1<=codeUnit&&codeUnit<=31||127==codeUnit||0==index&&48<=codeUnit&&codeUnit<=57||1==index&&48<=codeUnit&&codeUnit<=57&&45==firstCodeUnit?"\\"+codeUnit.toString(16)+" ":(0!=index||1!=length||45!=codeUnit)&&(128<=codeUnit||45==codeUnit||95==codeUnit||48<=codeUnit&&codeUnit<=57||65<=codeUnit&&codeUnit<=90||97<=codeUnit&&codeUnit<=122)?string.charAt(index):"\\"+string.charAt(index):result+="�";return result}return root.CSS||(root.CSS={}),root.CSS.escape=cssEscape}),jQuery(function($){Math.PI;function deg2rad(deg){return deg*(Math.PI/180)}WPGMZA.Distance={MILES:!0,KILOMETERS:!1,MILES_PER_KILOMETER:.621371,KILOMETERS_PER_MILE:1.60934,uiToMeters:function(uiDistance){return parseFloat(uiDistance)/(WPGMZA.settings.distance_units==WPGMZA.Distance.MILES?WPGMZA.Distance.MILES_PER_KILOMETER:1)*1e3},uiToKilometers:function(uiDistance){return.001*WPGMZA.Distance.uiToMeters(uiDistance)},uiToMiles:function(uiDistance){return WPGMZA.Distance.uiToKilometers(uiDistance)*WPGMZA.Distance.MILES_PER_KILOMETER},kilometersToUI:function(km){return WPGMZA.settings.distance_units==WPGMZA.Distance.MILES?km*WPGMZA.Distance.MILES_PER_KILOMETER:km},between:function(a,b){if(!(a instanceof WPGMZA.LatLng||"lat"in a&&"lng"in a))throw new Error("First argument must be an instance of WPGMZA.LatLng or a literal");if(!(b instanceof WPGMZA.LatLng||"lat"in b&&"lng"in b))throw new Error("Second argument must be an instance of WPGMZA.LatLng or a literal");if(a===b)return 0;var lat1=a.lat,lon1=a.lng,lat2=b.lat,lon2=b.lng,dLat=deg2rad(lat2-lat1),dLon=deg2rad(lon2-lon1);a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(deg2rad(lat1))*Math.cos(deg2rad(lat2))*Math.sin(dLon/2)*Math.sin(dLon/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}}}),jQuery(function($){WPGMZA.EliasFano=function(){if(!WPGMZA.EliasFano.isSupported)throw new Error("Elias Fano encoding is not supported on browsers without Uint8Array");WPGMZA.EliasFano.decodingTablesInitialised||WPGMZA.EliasFano.createDecodingTable()},WPGMZA.EliasFano.isSupported="Uint8Array"in window,WPGMZA.EliasFano.decodingTableHighBits=[],WPGMZA.EliasFano.decodingTableDocIDNumber=null,WPGMZA.EliasFano.decodingTableHighBitsCarryover=null,WPGMZA.EliasFano.createDecodingTable=function(){WPGMZA.EliasFano.decodingTableDocIDNumber=new Uint8Array(256),WPGMZA.EliasFano.decodingTableHighBitsCarryover=new Uint8Array(256);for(var decodingTableHighBits=WPGMZA.EliasFano.decodingTableHighBits,decodingTableDocIDNumber=WPGMZA.EliasFano.decodingTableDocIDNumber,decodingTableHighBitsCarryover=WPGMZA.EliasFano.decodingTableHighBitsCarryover,i=0;i<256;i++){var zeroCount=0;decodingTableHighBits[i]=[];for(var j=7;0<=j;j--)zeroCount=0<(i&1<<j)?(decodingTableHighBits[i][decodingTableDocIDNumber[i]]=zeroCount,decodingTableDocIDNumber[i]++,0):(zeroCount+1)%255;decodingTableHighBitsCarryover[i]=zeroCount}WPGMZA.EliasFano.decodingTablesInitialised=!0},WPGMZA.EliasFano.prototype.encode=function(list){var lastDocID=0,buffer1=0,bufferLength1=0,buffer2=0,bufferLength2=0;if(0==list.length)return result;function toByte(n){return 255&n}var compressedBufferPointer1=0,compressedBufferPointer2=0,averageDelta=list[list.length-1]/list.length,averageDeltaLog=Math.log2(averageDelta),lowBitsLength=Math.floor(averageDeltaLog),lowBitsMask=(1<<lowBitsLength)-1,prev=null,maxCompressedSize=Math.floor((2+Math.ceil(Math.log2(averageDelta)))*list.length/8)+6,compressedBuffer=new Uint8Array(maxCompressedSize);lowBitsLength<0&&(lowBitsLength=0),compressedBufferPointer2=Math.floor(lowBitsLength*list.length/8+6),compressedBuffer[compressedBufferPointer1++]=toByte(list.length),compressedBuffer[compressedBufferPointer1++]=toByte(list.length>>8),compressedBuffer[compressedBufferPointer1++]=toByte(list.length>>16),compressedBuffer[compressedBufferPointer1++]=toByte(list.length>>24),compressedBuffer[compressedBufferPointer1++]=toByte(lowBitsLength),list.forEach(function(docID){var docIDDelta=docID-lastDocID-1;if(!$.isNumeric(docID))throw new Error("Value is not numeric");if(docID=parseInt(docID),null!==prev&&docID<=prev)throw new Error("Elias Fano encoding can only be used on a sorted, ascending list of unique integers.");for(prev=docID,buffer1<<=lowBitsLength,buffer1|=docIDDelta&lowBitsMask,bufferLength1+=lowBitsLength;7<bufferLength1;)bufferLength1-=8,compressedBuffer[compressedBufferPointer1++]=toByte(buffer1>>bufferLength1);var unaryCodeLength=1+(docIDDelta>>lowBitsLength);for(buffer2<<=unaryCodeLength,buffer2|=1,bufferLength2+=unaryCodeLength;7<bufferLength2;)bufferLength2-=8,compressedBuffer[compressedBufferPointer2++]=toByte(buffer2>>bufferLength2);lastDocID=docID}),0<bufferLength1&&(compressedBuffer[compressedBufferPointer1++]=toByte(buffer1<<8-bufferLength1)),0<bufferLength2&&(compressedBuffer[compressedBufferPointer2++]=toByte(buffer2<<8-bufferLength2));var result=new Uint8Array(compressedBuffer);return result.pointer=compressedBufferPointer2,result},WPGMZA.EliasFano.prototype.decode=function(compressedBuffer){var resultPointer=0,list=[],decodingTableHighBits=WPGMZA.EliasFano.decodingTableHighBits,decodingTableDocIDNumber=WPGMZA.EliasFano.decodingTableDocIDNumber,decodingTableHighBitsCarryover=WPGMZA.EliasFano.decodingTableHighBitsCarryover,lowBitsPointer=0,lastDocID=0,docID=0,docIDNumber=0,listCount=compressedBuffer[lowBitsPointer++];listCount|=compressedBuffer[lowBitsPointer++]<<8,listCount|=compressedBuffer[lowBitsPointer++]<<16,listCount|=compressedBuffer[lowBitsPointer++]<<24;var highBitsPointer,lowBitsLength=compressedBuffer[lowBitsPointer++],lowBitsCount=0,lowBits=0,cb=1;for(highBitsPointer=Math.floor(lowBitsLength*listCount/8+6);highBitsPointer<compressedBuffer.pointer;highBitsPointer++){docID+=decodingTableHighBitsCarryover[cb],docIDNumber=decodingTableDocIDNumber[cb=compressedBuffer[highBitsPointer]];for(var i=0;i<docIDNumber;i++){for(docID<<=lowBitsCount,docID|=lowBits&(1<<lowBitsCount)-1;lowBitsCount<lowBitsLength;)docID<<=8,docID|=lowBits=compressedBuffer[lowBitsPointer++],lowBitsCount+=8;docID>>=lowBitsCount-=lowBitsLength,docID+=(decodingTableHighBits[cb][i]<<lowBitsLength)+lastDocID+1,lastDocID=list[resultPointer++]=docID,docID=0}}return list}}),jQuery(function($){WPGMZA.EventDispatcher=function(){WPGMZA.assertInstanceOf(this,"EventDispatcher"),this._listenersByType={}},WPGMZA.EventDispatcher.prototype.addEventListener=function(type,listener,thisObject,useCapture){var types=type.split(/\s+/);if(1<types.length)for(var i=0;i<types.length;i++)this.addEventListener(types[i],listener,thisObject,useCapture);else{if(!(listener instanceof Function))throw new Error("Listener must be a function");var target;target=this._listenersByType.hasOwnProperty(type)?this._listenersByType[type]:this._listenersByType[type]=[];var obj={listener:listener,thisObject:thisObject||this,useCapture:!!useCapture};target.push(obj)}},WPGMZA.EventDispatcher.prototype.on=WPGMZA.EventDispatcher.prototype.addEventListener,WPGMZA.EventDispatcher.prototype.removeEventListener=function(type,listener,thisObject,useCapture){var arr,obj;if(arr=this._listenersByType[type]){thisObject=thisObject||this,useCapture=!!useCapture;for(var i=0;i<arr.length;i++)if(obj=arr[i],(1==arguments.length||obj.listener==listener)&&obj.thisObject==thisObject&&obj.useCapture==useCapture)return void arr.splice(i,1)}},WPGMZA.EventDispatcher.prototype.off=WPGMZA.EventDispatcher.prototype.removeEventListener,WPGMZA.EventDispatcher.prototype.hasEventListener=function(type){return!!_listenersByType[type]},WPGMZA.EventDispatcher.prototype.dispatchEvent=function(event){if(!(event instanceof WPGMZA.Event))if("string"==typeof event)event=new WPGMZA.Event(event);else{var src=event;for(var name in event=new WPGMZA.Event,src)event[name]=src[name]}for(var path=[],obj=(event.target=this).parent;null!=obj;obj=obj.parent)path.unshift(obj);event.phase=WPGMZA.Event.CAPTURING_PHASE;for(var i=0;i<path.length&&!event._cancelled;i++)path[i]._triggerListeners(event);if(!event._cancelled){for(event.phase=WPGMZA.Event.AT_TARGET,this._triggerListeners(event),event.phase=WPGMZA.Event.BUBBLING_PHASE,i=path.length-1;0<=i&&!event._cancelled;i--)path[i]._triggerListeners(event);var topMostElement=this.element;for(obj=this.parent;null!=obj;obj=obj.parent)obj.element&&(topMostElement=obj.element);if(topMostElement){var customEvent={};for(var key in event){var value=event[key];"type"==key&&(value+=".wpgmza"),customEvent[key]=value}$(topMostElement).trigger(customEvent)}}},WPGMZA.EventDispatcher.prototype.trigger=WPGMZA.EventDispatcher.prototype.dispatchEvent,WPGMZA.EventDispatcher.prototype._triggerListeners=function(event){var arr,obj;if(arr=this._listenersByType[event.type])for(var i=0;i<arr.length;i++)obj=arr[i],event.phase==WPGMZA.Event.CAPTURING_PHASE&&!obj.useCapture||obj.listener.call(arr[i].thisObject,event)},WPGMZA.events=new WPGMZA.EventDispatcher}),jQuery(function($){WPGMZA.AddressInput=function(element,map){if(!(element instanceof HTMLInputElement))throw new Error("Element is not an instance of HTMLInputElement");var json;this.element=element;var options={fields:["name","formatted_address"],types:["geocode"]};(json=$(element).attr("data-autocomplete-options"))&&(options=$.extend(options,JSON.parse(json))),map&&map.settings.wpgmza_store_locator_restrict&&(options.country=map.settings.wpgmza_store_locator_restrict),WPGMZA.isGoogleAutocompleteSupported()?(element.googleAutoComplete=new google.maps.places.Autocomplete(element,options),options.country&&element.googleAutoComplete.setComponentRestrictions({country:options.country})):WPGMZA.CloudAPI&&WPGMZA.CloudAPI.isBeingUsed&&(element.cloudAutoComplete=new WPGMZA.CloudAutocomplete(element,options))},WPGMZA.extend(WPGMZA.AddressInput,WPGMZA.EventDispatcher),WPGMZA.AddressInput.createInstance=function(element,map){return new WPGMZA.AddressInput(element,map)}}),jQuery(function($){WPGMZA.Event=function(options){if("string"==typeof options&&(this.type=options),this.bubbles=!0,this.cancelable=!0,this.phase=WPGMZA.Event.PHASE_CAPTURE,this.target=null,this._cancelled=!1,"object"==typeof options)for(var name in options)this[name]=options[name]},WPGMZA.Event.CAPTURING_PHASE=0,WPGMZA.Event.AT_TARGET=1,WPGMZA.Event.BUBBLING_PHASE=2,WPGMZA.Event.prototype.stopPropagation=function(){this._cancelled=!0}}),jQuery(function($){WPGMZA.FancyControls={formatToggleSwitch:function(el){var div=$("<div class='switch'></div>"),input=el,container=el.parentNode,text=$(container).text().trim(),label=$("<label></label>");$(input).addClass("cmn-toggle cmn-toggle-round-flat"),$(input).attr("id",$(input).attr("name")),$(label).attr("for",$(input).attr("name")),$(div).append(input),$(div).append(label),$(container).replaceWith(div),$(div).wrap($("<div></div>")),$(div).after(text)},formatToggleButton:function(el){var div=$("<div class='switch'></div>"),input=el,container=el.parentNode,text=$(container).text().trim(),label=$("<label></label>");$(input).addClass("cmn-toggle cmn-toggle-yes-no"),$(input).attr("id",$(input).attr("name")),$(label).attr("for",$(input).attr("name")),$(label).attr("data-on",WPGMZA.localized_strings.yes),$(label).attr("data-off",WPGMZA.localized_strings.no),$(div).append(input),$(div).append(label),$(container).replaceWith(div),$(div).wrap($("<div></div>")),$(div).after(text)}},$(".wpgmza-fancy-toggle-switch").each(function(index,el){WPGMZA.FancyControls.formatToggleSwitch(el)}),$(".wpgmza-fancy-toggle-button").each(function(index,el){WPGMZA.FancyControls.formatToggleButton(el)})}),jQuery(function($){WPGMZA.FriendlyError=function(){}}),jQuery(function($){WPGMZA.Geocoder=function(){WPGMZA.assertInstanceOf(this,"Geocoder")},WPGMZA.Geocoder.SUCCESS="success",WPGMZA.Geocoder.ZERO_RESULTS="zero-results",WPGMZA.Geocoder.FAIL="fail",WPGMZA.Geocoder.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.OLGeocoder;default:return WPGMZA.GoogleGeocoder}},WPGMZA.Geocoder.createInstance=function(){return new(WPGMZA.Geocoder.getConstructor())},WPGMZA.Geocoder.prototype.getLatLngFromAddress=function(options,callback){if(WPGMZA.isLatLngString(options.address)){var parts=options.address.split(/,\s*/),latLng=new WPGMZA.LatLng({lat:parseFloat(parts[0]),lng:parseFloat(parts[1])});callback([latLng.latLng=latLng],WPGMZA.Geocoder.SUCCESS)}},WPGMZA.Geocoder.prototype.getAddressFromLatLng=function(options,callback){callback([new WPGMZA.LatLng(options.latLng).toString()],WPGMZA.Geocoder.SUCCESS)},WPGMZA.Geocoder.prototype.geocode=function(options,callback){if("address"in options)return this.getLatLngFromAddress(options,callback);if("latLng"in options)return this.getAddressFromLatLng(options,callback);throw new Error("You must supply either a latLng or address")}}),jQuery(function($){WPGMZA.GoogleAPIErrorHandler=function(){var self=this;if("google-maps"==WPGMZA.settings.engine&&("map-edit"==WPGMZA.currentPage||0==WPGMZA.is_admin&&1==WPGMZA.userCanAdministrator)){this.element=$(WPGMZA.html.googleMapsAPIErrorDialog),1==WPGMZA.is_admin&&this.element.find(".wpgmza-front-end-only").remove(),this.errorMessageList=this.element.find(".wpgmza-google-api-error-list"),this.templateListItem=this.element.find("li.template").remove(),this.messagesAlreadyDisplayed={};var _error=console.error;console.error=function(message){self.onErrorMessage(message),_error.apply(this,arguments)},"google-maps"!=WPGMZA.settings.engine||WPGMZA.settings.wpgmza_google_maps_api_key&&WPGMZA.settings.wpgmza_google_maps_api_key.length||WPGMZA.getCurrentPage()==WPGMZA.PAGE_MAP_EDIT||this.addErrorMessage(WPGMZA.localized_strings.no_google_maps_api_key,["https://www.wpgmaps.com/documentation/creating-a-google-maps-api-key/"])}},WPGMZA.GoogleAPIErrorHandler.prototype.onErrorMessage=function(message){var m;if(message)if((m=message.match(/You have exceeded your (daily )?request quota for this API/))||(m=message.match(/This API project is not authorized to use this API/))||(m=message.match(/^Geocoding Service: .+/))){var urls=message.match(/http(s)?:\/\/[^\s]+/gm);this.addErrorMessage(m[0],urls)}else(m=message.match(/^Google Maps.+error: (.+)\s+(http(s?):\/\/.+)/m))&&this.addErrorMessage(m[1].replace(/([A-Z])/g," $1"),[m[2]])},WPGMZA.GoogleAPIErrorHandler.prototype.addErrorMessage=function(message,urls){var self=this;if(!this.messagesAlreadyDisplayed[message]){var li=this.templateListItem.clone();$(li).find(".wpgmza-message").html(message);var buttonContainer=$(li).find(".wpgmza-documentation-buttons"),buttonTemplate=$(li).find(".wpgmza-documentation-buttons>a");if(buttonTemplate.remove(),urls&&urls.length){for(var i=0;i<urls.length;i++){urls[i];var button=buttonTemplate.clone(),text=WPGMZA.localized_strings.documentation;button.attr("href",urls[i]),$(button).find("i").addClass("fa-external-link"),$(button).append(text)}buttonContainer.append(button)}$(this.errorMessageList).append(li),$("#wpgmza_map, .wpgmza_map").each(function(index,el){var container=$(el).find(".wpgmza-google-maps-api-error-overlay");0==container.length&&(container=$("<div class='wpgmza-google-maps-api-error-overlay'></div>")).html(self.element.html()),setTimeout(function(){$(el).append(container)},1e3)}),$(".gm-err-container").parent().css({"z-index":1}),this.messagesAlreadyDisplayed[message]=!0}},WPGMZA.googleAPIErrorHandler=new WPGMZA.GoogleAPIErrorHandler}),jQuery(function($){WPGMZA.InfoWindow=function(mapObject){var self=this;WPGMZA.EventDispatcher.call(this),WPGMZA.assertInstanceOf(this,"InfoWindow"),this.on("infowindowopen",function(event){self.onOpen(event)}),mapObject&&(this.mapObject=mapObject,this.state=WPGMZA.InfoWindow.STATE_CLOSED,mapObject.map?setTimeout(function(){self.onMapObjectAdded(event)},100):mapObject.addEventListener("added",function(event){self.onMapObjectAdded(event)}))},WPGMZA.InfoWindow.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.InfoWindow.prototype.constructor=WPGMZA.InfoWindow,WPGMZA.InfoWindow.OPEN_BY_CLICK=1,WPGMZA.InfoWindow.OPEN_BY_HOVER=2,WPGMZA.InfoWindow.STATE_OPEN="open",WPGMZA.InfoWindow.STATE_CLOSED="closed",WPGMZA.InfoWindow.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProInfoWindow:WPGMZA.OLInfoWindow;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProInfoWindow:WPGMZA.GoogleInfoWindow}},WPGMZA.InfoWindow.createInstance=function(mapObject){return new(this.getConstructor())(mapObject)},WPGMZA.InfoWindow.prototype.getContent=function(callback){var html="";this.mapObject instanceof WPGMZA.Marker&&(html=this.mapObject.address),callback(html)},WPGMZA.InfoWindow.prototype.open=function(map,mapObject){return this.mapObject=mapObject,!WPGMZA.settings.disable_infowindows&&"1"!=WPGMZA.settings.wpgmza_settings_disable_infowindows&&(!this.mapObject.disableInfoWindow&&(this.state=WPGMZA.InfoWindow.STATE_OPEN,!0))},WPGMZA.InfoWindow.prototype.close=function(){this.state!=WPGMZA.InfoWindow.STATE_CLOSED&&(this.state=WPGMZA.InfoWindow.STATE_CLOSED,this.trigger("infowindowclose"))},WPGMZA.InfoWindow.prototype.setContent=function(options){},WPGMZA.InfoWindow.prototype.setOptions=function(options){},WPGMZA.InfoWindow.prototype.onMapObjectAdded=function(){1==this.mapObject.settings.infoopen&&this.open()},WPGMZA.InfoWindow.prototype.onOpen=function(){}}),jQuery(function($){WPGMZA.LatLng=function(arg,lng){if(this._lat=0,(this._lng=0)!=arguments.length)if(1==arguments.length){if("string"==typeof arg){var m;if(!(m=arg.match(WPGMZA.LatLng.REGEXP)))throw new Error("Invalid LatLng string");arg={lat:m[1],lng:m[3]}}if("object"!=typeof arg||!("lat"in arg&&"lng"in arg))throw new Error("Argument must be a LatLng literal");this.lat=arg.lat,this.lng=arg.lng}else this.lat=arg,this.lng=lng},WPGMZA.LatLng.REGEXP=/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,WPGMZA.LatLng.isValid=function(obj){return"object"==typeof obj&&("lat"in obj&&"lng"in obj)},WPGMZA.LatLng.isLatLngString=function(str){return"string"==typeof str&&!!str.match(WPGMZA.LatLng.REGEXP)},Object.defineProperty(WPGMZA.LatLng.prototype,"lat",{get:function(){return this._lat},set:function(val){if(!$.isNumeric(val))throw new Error("Latitude must be numeric");this._lat=parseFloat(val)}}),Object.defineProperty(WPGMZA.LatLng.prototype,"lng",{get:function(){return this._lng},set:function(val){if(!$.isNumeric(val))throw new Error("Longitude must be numeric");this._lng=parseFloat(val)}}),WPGMZA.LatLng.fromString=function(string){if(!WPGMZA.LatLng.isLatLngString(string))throw new Error("Not a valid latlng string");var m=string.match(WPGMZA.LatLng.REGEXP);return new WPGMZA.LatLng({lat:parseFloat(m[1]),lng:parseFloat(m[3])})},WPGMZA.LatLng.prototype.toString=function(){return this._lat+", "+this._lng},WPGMZA.LatLng.fromCurrentPosition=function(callback,options){options=options||{},callback&&WPGMZA.getCurrentPosition(function(position){var latLng=new WPGMZA.LatLng({lat:position.coords.latitude,lng:position.coords.longitude});options.geocodeAddress?WPGMZA.Geocoder.createInstance().getAddressFromLatLng({latLng:latLng},function(results){results.length&&(latLng.address=results[0]),callback(latLng)}):callback(latLng)})},WPGMZA.LatLng.fromGoogleLatLng=function(googleLatLng){return new WPGMZA.LatLng(googleLatLng.lat(),googleLatLng.lng())},WPGMZA.LatLng.toGoogleLatLngArray=function(arr){var result=[];return arr.forEach(function(nativeLatLng){if(!(nativeLatLng instanceof WPGMZA.LatLng||"lat"in nativeLatLng&&"lng"in nativeLatLng))throw new Error("Unexpected input");result.push(new google.maps.LatLng({lat:parseFloat(nativeLatLng.lat),lng:parseFloat(nativeLatLng.lng)}))}),result},WPGMZA.LatLng.prototype.toGoogleLatLng=function(){return new google.maps.LatLng({lat:this.lat,lng:this.lng})},WPGMZA.LatLng.prototype.toLatLngLiteral=function(){return{lat:this.lat,lng:this.lng}},WPGMZA.LatLng.prototype.moveByDistance=function(kilometers,heading){var delta=parseFloat(kilometers)/6371,theta=parseFloat(heading)/180*Math.PI,phi1=this.lat/180*Math.PI,lambda1=this.lng/180*Math.PI,sinPhi1=Math.sin(phi1),cosPhi1=Math.cos(phi1),sinDelta=Math.sin(delta),cosDelta=Math.cos(delta),sinTheta=Math.sin(theta),sinPhi2=sinPhi1*cosDelta+cosPhi1*sinDelta*Math.cos(theta),phi2=Math.asin(sinPhi2),y=sinTheta*sinDelta*cosPhi1,x=cosDelta-sinPhi1*sinPhi2,lambda2=lambda1+Math.atan2(y,x);this.lat=180*phi2/Math.PI,this.lng=180*lambda2/Math.PI},WPGMZA.LatLng.prototype.getGreatCircleDistance=function(arg1,arg2){var other,lat1=this.lat,lon1=this.lng;if(1==arguments.length)other=new WPGMZA.LatLng(arg1);else{if(2!=arguments.length)throw new Error("Invalid number of arguments");other=new WPGMZA.LatLng(arg1,arg2)}var lat2=other.lat,lon2=other.lng,phi1=lat1.toRadians(),phi2=lat2.toRadians(),deltaPhi=(lat2-lat1).toRadians(),deltaLambda=(lon2-lon1).toRadians(),a=Math.sin(deltaPhi/2)*Math.sin(deltaPhi/2)+Math.cos(phi1)*Math.cos(phi2)*Math.sin(deltaLambda/2)*Math.sin(deltaLambda/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}}),jQuery(function($){WPGMZA.LatLngBounds=function(southWest,northEast){if(southWest instanceof WPGMZA.LatLngBounds){var other=southWest;this.south=other.south,this.north=other.north,this.west=other.west,this.east=other.east}else southWest&&northEast&&(this.south=southWest.lat,this.north=northEast.lat,this.west=southWest.lng,this.east=northEast.lng)},WPGMZA.LatLngBounds.fromGoogleLatLngBounds=function(googleLatLngBounds){if(!(googleLatLngBounds instanceof google.maps.LatLngBounds))throw new Error("Argument must be an instance of google.maps.LatLngBounds");var result=new WPGMZA.LatLngBounds,southWest=googleLatLngBounds.getSouthWest(),northEast=googleLatLngBounds.getNorthEast();return result.north=northEast.lat(),result.south=southWest.lat(),result.west=southWest.lng(),result.east=northEast.lng(),result},WPGMZA.LatLngBounds.fromGoogleLatLngBoundsLiteral=function(obj){var result=new WPGMZA.LatLngBounds,southWest=obj.southwest,northEast=obj.northeast;return result.north=northEast.lat,result.south=southWest.lat,result.west=southWest.lng,result.east=northEast.lng,result},WPGMZA.LatLngBounds.prototype.isInInitialState=function(){return null==this.north&&null==this.south&&null==this.west&&null==this.east},WPGMZA.LatLngBounds.prototype.extend=function(latLng){if(latLng instanceof WPGMZA.LatLng||(latLng=new WPGMZA.LatLng(latLng)),this.isInInitialState())return this.north=this.south=latLng.lat,void(this.west=this.east=latLng.lng);latLng.lat<this.north&&(this.north=latLng.lat),latLng.lat>this.south&&(this.south=latLng.lat),latLng.lng<this.west&&(this.west=latLng.lng),latLng.lng>this.east&&(this.east=latLng.lng)},WPGMZA.LatLngBounds.prototype.extendByPixelMargin=function(map,x,arg){var y=x;if(!(map instanceof WPGMZA.Map))throw new Error("First argument must be an instance of WPGMZA.Map");if(this.isInInitialState())throw new Error("Cannot extend by pixels in initial state");3<=arguments.length&&(y=arg);var southWest=new WPGMZA.LatLng(this.south,this.west),northEast=new WPGMZA.LatLng(this.north,this.east);southWest=map.latLngToPixels(southWest),northEast=map.latLngToPixels(northEast),southWest.x-=x,southWest.y+=y,northEast.x+=x,northEast.y-=y,southWest=map.pixelsToLatLng(southWest.x,southWest.y),northEast=map.pixelsToLatLng(northEast.x,northEast.y);this.toString();this.north=northEast.lat,this.south=southWest.lat,this.west=southWest.lng,this.east=northEast.lng},WPGMZA.LatLngBounds.prototype.contains=function(latLng){if(!(latLng instanceof WPGMZA.LatLng))throw new Error("Argument must be an instance of WPGMZA.LatLng");return!(latLng.lat<Math.min(this.north,this.south))&&(!(latLng.lat>Math.max(this.north,this.south))&&(this.west<this.east?latLng.lng>=this.west&&latLng.lng<=this.east:latLng.lng<=this.west||latLng.lng>=this.east))},WPGMZA.LatLngBounds.prototype.toString=function(){return this.north+"N "+this.south+"S "+this.west+"W "+this.east+"E"},WPGMZA.LatLngBounds.prototype.toLiteral=function(){return{north:this.north,south:this.south,west:this.west,east:this.east}}}),jQuery(function($){"map-edit"==WPGMZA.currentPage&&(WPGMZA.MapEditPage=function(){var self=this;if(this.themePanel=new WPGMZA.ThemePanel,this.themeEditor=new WPGMZA.ThemeEditor,this.map=WPGMZA.maps[0],"yes"==WPGMZA.settings.wpgmza_settings_map_scroll||"yes"==WPGMZA.settings.wpgmza_settings_map_draggable||"yes"==WPGMZA.settings.wpgmza_settings_map_clickzoom){var diplay_enable_interactions_notice=$("<div class='notice notice-info wpgmza_disabled_interactions_notice' style= 'height: 45px; padding: 7px 5px 2px 5px;'><p style='float: left; padding-top: 10px;'>"+WPGMZA.localized_strings.disabled_interactions_notice+"</p><a class='button button-primary enable_interactions_notice_button' style='float: right;'>"+WPGMZA.localized_strings.disabled_interactions_button+"</a></div>");$(".wpgmza_map").after(diplay_enable_interactions_notice),$(".enable_interactions_notice_button").on("click",function(){WPGMZA.mapEditPage.map.enableAllInteractions(),$(diplay_enable_interactions_notice).fadeOut("slow");var successNotice=$("<div class='notice notice-success'><p>"+WPGMZA.localized_strings.interactions_enabled_notice+"</p></div>");$(WPGMZA.mapEditPage.map.element).after(successNotice),$(successNotice).delay(2e3).fadeIn("slow"),$(successNotice).delay(4e3).fadeOut("slow")})}$("#wpgmza_max_zoom, #wpgmza_min_zoom").on("change input",function(event){self.onZoomLimitChanged(event)})},WPGMZA.MapEditPage.createInstance=function(){return WPGMZA.isProVersion()&&WPGMZA.Version.compare(WPGMZA.pro_version,"8.0.0")>=WPGMZA.Version.EQUAL_TO?new WPGMZA.ProMapEditPage:new WPGMZA.MapEditPage},WPGMZA.MapEditPage.prototype.onZoomLimitChanged=function(event){this.map.setOptions({minZoom:$("#wpgmza_max_zoom").val(),maxZoom:$("#wpgmza_min_zoom").val()})},$(window).on("load",function(event){WPGMZA.mapEditPage=WPGMZA.MapEditPage.createInstance()}))}),jQuery(function($){WPGMZA.MapObject=function(row){if(WPGMZA.assertInstanceOf(this,"MapObject"),WPGMZA.EventDispatcher.call(this),this.id=-1,this.map_id=null,this.guid=WPGMZA.guid(),this.modified=!0,this.settings={},row)for(var name in row)if("settings"==name){if(null==row.settings)this.settings={};else switch(typeof row.settings){case"string":this.settings=JSON.parse(row[name]);break;case"object":this.settings=row[name];break;default:throw new Error("Don't know how to interpret settings")}for(var name in this.settings){var value=this.settings[name];String(value).match(/^-?\d+$/)&&(this.settings[name]=parseInt(value))}}else this[name]=row[name]},WPGMZA.MapObject.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MapObject.prototype.constructor=WPGMZA.MapObject,WPGMZA.MapObject.prototype.parseGeometry=function(string){var pairs,coords,results=[];if("object"==typeof string)return string;pairs=string.replace(/[^ ,\d\.\-+e]/g,"").split(",");for(var i=0;i<pairs.length;i++)coords=pairs[i].split(" "),results.push({lat:parseFloat(coords[1]),lng:parseFloat(coords[0])});return results},WPGMZA.MapObject.prototype.toJSON=function(){return{id:this.id,guid:this.guid,settings:this.settings}}}),jQuery(function($){var Parent=WPGMZA.MapObject;WPGMZA.Circle=function(options,engineCircle){WPGMZA.assertInstanceOf(this,"Circle"),this.center=new WPGMZA.LatLng,this.radius=100,Parent.apply(this,arguments)},WPGMZA.Circle.prototype=Object.create(Parent.prototype),WPGMZA.Circle.prototype.constructor=WPGMZA.Circle,WPGMZA.Circle.createInstance=function(options){var constructor;switch(WPGMZA.settings.engine){case"open-layers":constructor=WPGMZA.OLCircle;break;default:constructor=WPGMZA.GoogleCircle}return new constructor(options)},WPGMZA.Circle.prototype.getCenter=function(){return this.center.clone()},WPGMZA.Circle.prototype.setCenter=function(latLng){this.center.lat=latLng.lat,this.center.lng=latLng.lng},WPGMZA.Circle.prototype.getRadius=function(){return this.radius},WPGMZA.Circle.prototype.setRadius=function(radius){this.radius=radius},WPGMZA.Circle.prototype.getMap=function(){return this.map},WPGMZA.Circle.prototype.setMap=function(map){this.map&&this.map.removeCircle(this),map&&map.addCircle(this)}}),jQuery(function($){WPGMZA.MapSettingsPage=function(){var self=this;this._keypressHistory=[],this.updateEngineSpecificControls(),this.updateGDPRControls(),$("#wpgmza-developer-mode").hide(),$(window).on("keypress",function(event){self.onKeyPress(event)}),$("select[name='wpgmza_maps_engine']").on("change",function(event){self.updateEngineSpecificControls()}),$("input[name='wpgmza_gdpr_require_consent_before_load'], input[name='wpgmza_gdpr_require_consent_before_vgm_submit'], input[name='wpgmza_gdpr_override_notice']").on("change",function(event){self.updateGDPRControls()})},WPGMZA.MapSettingsPage.createInstance=function(){return new WPGMZA.MapSettingsPage},WPGMZA.MapSettingsPage.prototype.updateEngineSpecificControls=function(){var engine=$("select[name='wpgmza_maps_engine']").val();$("[data-required-maps-engine][data-required-maps-engine!='"+engine+"']").hide(),$("[data-required-maps-engine='"+engine+"']").show()},WPGMZA.MapSettingsPage.prototype.updateGDPRControls=function(){var showNoticeControls=$("input[name='wpgmza_gdpr_require_consent_before_load']").prop("checked"),vgmCheckbox=$("input[name='wpgmza_gdpr_require_consent_before_vgm_submit']");vgmCheckbox.length&&(showNoticeControls=showNoticeControls||vgmCheckbox.prop("checked"));var showOverrideTextarea=showNoticeControls&&$("input[name='wpgmza_gdpr_override_notice']").prop("checked");showNoticeControls?$("#wpgmza-gdpr-compliance-notice").show("slow"):$("#wpgmza-gdpr-compliance-notice").hide("slow"),showOverrideTextarea?$("#wpgmza_gdpr_override_notice_text").show("slow"):$("#wpgmza_gdpr_override_notice_text").hide("slow")},WPGMZA.MapSettingsPage.prototype.flushGeocodeCache=function(){(new WPGMZA.OLGeocoder).clearCache(function(response){jQuery("#wpgmza_flush_cache_btn").removeAttr("disabled")})},WPGMZA.MapSettingsPage.prototype.onKeyPress=function(event){this._keypressHistory.push(event.key),9<this._keypressHistory.length&&(this._keypressHistory=this._keypressHistory.slice(this._keypressHistory.length-9)),"codecabin"!=this._keypressHistory.join("")||this._developerModeRevealed||($("#wpgmza-developer-mode").show(),this._developerModeRevealed=!0)},jQuery(function($){window.location.href.match(/wp-google-maps-menu-settings/)&&(WPGMZA.mapSettingsPage=WPGMZA.MapSettingsPage.createInstance(),jQuery(document).ready(function(){jQuery("#wpgmza_flush_cache_btn").on("click",function(){jQuery(this).attr("disabled","disabled"),WPGMZA.mapSettingsPage.flushGeocodeCache()})}))})}),jQuery(function($){WPGMZA.MapSettings=function(element){var json,self=this,str=element.getAttribute("data-settings");try{json=JSON.parse(str)}catch(e){str=(str=str.replace(/\\%/g,"%")).replace(/\\\\"/g,'\\"');try{json=JSON.parse(str)}catch(e){json={},console.warn("Failed to parse map settings JSON")}}function addSettings(input){if(input)for(var key in input)if("other_settings"!=key){var value=input[key];String(value).match(/^-?\d+$/)&&(value=parseInt(value)),self[key]=value}}WPGMZA.assertInstanceOf(this,"MapSettings"),addSettings(WPGMZA.settings),addSettings(json),json&&json.other_settings&&addSettings(json.other_settings)},WPGMZA.MapSettings.prototype.toOLViewOptions=function(){var self=this,options={center:ol.proj.fromLonLat([-119.4179,36.7783]),zoom:4};function empty(name){return"object"!=typeof self[name]&&(!self[name]||!self[name].length)}if("string"==typeof this.start_location){var coords=this.start_location.replace(/^\(|\)$/g,"").split(",");WPGMZA.isLatLngString(this.start_location)?options.center=ol.proj.fromLonLat([parseFloat(coords[1]),parseFloat(coords[0])]):console.warn("Invalid start location")}return this.center&&(options.center=ol.proj.fromLonLat([parseFloat(this.center.lng),parseFloat(this.center.lat)])),empty("map_start_lat")||empty("map_start_lng")||(options.center=ol.proj.fromLonLat([parseFloat(this.map_start_lng),parseFloat(this.map_start_lat)])),this.zoom&&(options.zoom=parseInt(this.zoom)),this.start_zoom&&(options.zoom=parseInt(this.start_zoom)),this.map_min_zoom&&this.map_max_zoom&&(options.minZoom=Math.min(this.map_min_zoom,this.map_max_zoom),options.maxZoom=Math.max(this.map_min_zoom,this.map_max_zoom)),options},WPGMZA.MapSettings.prototype.toGoogleMapsOptions=function(){var self=this,latLngCoords=this.start_location&&this.start_location.length?this.start_location.split(","):[36.7783,-119.4179];function empty(name){return"object"!=typeof self[name]&&(!self[name]||!self[name].length)}function formatCoord(coord){return $.isNumeric(coord)?coord:parseFloat(String(coord).replace(/[\(\)\s]/,""))}var latLng=new google.maps.LatLng(formatCoord(latLngCoords[0]),formatCoord(latLngCoords[1])),zoom=this.start_zoom?parseInt(this.start_zoom):4;!this.start_zoom&&this.zoom&&(zoom=parseInt(this.zoom));var options={zoom:zoom,center:latLng};switch(empty("center")||(options.center=new google.maps.LatLng({lat:parseFloat(this.center.lat),lng:parseFloat(this.center.lng)})),empty("map_start_lat")||empty("map_start_lng")||(options.center=new google.maps.LatLng({lat:parseFloat(this.map_start_lat),lng:parseFloat(this.map_start_lng)})),this.map_min_zoom&&this.map_max_zoom&&(options.minZoom=Math.min(this.map_min_zoom,this.map_max_zoom),options.maxZoom=Math.max(this.map_min_zoom,this.map_max_zoom)),options.zoomControl=!("yes"==this.wpgmza_settings_map_zoom),options.panControl=!("yes"==this.wpgmza_settings_map_pan),options.mapTypeControl=!("yes"==this.wpgmza_settings_map_type),options.streetViewControl=!("yes"==this.wpgmza_settings_map_streetview),options.fullscreenControl=!("yes"==this.wpgmza_settings_map_full_screen_control),options.draggable=!("yes"==this.wpgmza_settings_map_draggable),options.disableDoubleClickZoom="yes"==this.wpgmza_settings_map_clickzoom,this.wpgmza_settings_map_scroll&&(options.scrollwheel=!1),"greedy"==this.wpgmza_force_greedy_gestures||"yes"==this.wpgmza_force_greedy_gestures?options.gestureHandling="greedy":options.gestureHandling="cooperative",parseInt(this.type)){case 2:options.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case 3:options.mapTypeId=google.maps.MapTypeId.HYBRID;break;case 4:options.mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:options.mapTypeId=google.maps.MapTypeId.ROADMAP}return this.wpgmza_theme_data&&this.wpgmza_theme_data.length&&(options.styles=WPGMZA.GoogleMap.parseThemeData(this.wpgmza_theme_data)),options}}),jQuery(function($){WPGMZA.Map=function(element,options){if(WPGMZA.assertInstanceOf(this,"Map"),WPGMZA.EventDispatcher.call(this),!(element instanceof HTMLElement))throw new Error("Argument must be a HTMLElement");if(element.hasAttribute("data-map-id")?this.id=element.getAttribute("data-map-id"):this.id=1,!/\d+/.test(this.id))throw new Error("Map ID must be an integer");if(WPGMZA.maps.push(this),this.element=element,(this.element.wpgmzaMap=this).engineElement=element,this.markers=[],this.polygons=[],this.polylines=[],this.circles=[],this.rectangles=[],this.loadSettings(options),this.shortcodeAttributes={},$(this.element).attr("data-shortcode-attributes"))try{this.shortcodeAttributes=JSON.parse($(this.element).attr("data-shortcode-attributes"))}catch(e){console.warn("Error parsing shortcode attributes")}WPGMZA.getCurrentPage()!=WPGMZA.PAGE_MAP_EDIT&&this.initStoreLocator(),this.markerFilter=WPGMZA.MarkerFilter.createInstance(this)},WPGMZA.Map.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.Map.prototype.constructor=WPGMZA.Map,WPGMZA.Map.nightTimeThemeData=[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{color:"#575663"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#80823e"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#1b737a"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}],WPGMZA.Map.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProMap:WPGMZA.OLMap;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProMap:WPGMZA.GoogleMap}},WPGMZA.Map.createInstance=function(element,options){return new(WPGMZA.Map.getConstructor())(element,options)},Object.defineProperty(WPGMZA.Map.prototype,"lat",{get:function(){return this.getCenter().lat},set:function(value){var center=this.getCenter();center.lat=value,this.setCenter(center)}}),Object.defineProperty(WPGMZA.Map.prototype,"lng",{get:function(){return this.getCenter().lng},set:function(value){var center=this.getCenter();center.lng=value,this.setCenter(center)}}),Object.defineProperty(WPGMZA.Map.prototype,"zoom",{get:function(){return this.getZoom()},set:function(value){this.setZoom(value)}}),WPGMZA.Map.prototype.loadSettings=function(options){var settings=new WPGMZA.MapSettings(this.element);settings.other_settings;if(delete settings.other_settings,options)for(var key in options)settings[key]=options[key];this.settings=settings},WPGMZA.Map.prototype.initStoreLocator=function(){var storeLocatorElement=$(".wpgmza_sl_main_div");storeLocatorElement.length&&(this.storeLocator=WPGMZA.StoreLocator.createInstance(this,storeLocatorElement[0]))},WPGMZA.Map.prototype.setOptions=function(options){for(var name in options)this.settings[name]=options[name]};Math.PI;function deg2rad(deg){return deg*(Math.PI/180)}WPGMZA.Map.getGeographicDistance=function(lat1,lon1,lat2,lon2){var dLat=deg2rad(lat2-lat1),dLon=deg2rad(lon2-lon1),a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(deg2rad(lat1))*Math.cos(deg2rad(lat2))*Math.sin(dLon/2)*Math.sin(dLon/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},WPGMZA.Map.prototype.setCenter=function(latLng){if(!("lat"in latLng&&"lng"in latLng))throw new Error("Argument is not an object with lat and lng")},WPGMZA.Map.prototype.setDimensions=function(width,height){$(this.element).css({width:width}),$(this.engineElement).css({width:"100%",height:height})},WPGMZA.Map.prototype.addMarker=function(marker){if(!(marker instanceof WPGMZA.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker");marker.map=this,(marker.parent=this).markers.push(marker),this.dispatchEvent({type:"markeradded",marker:marker}),marker.dispatchEvent({type:"added"})},WPGMZA.Map.prototype.removeMarker=function(marker){if(!(marker instanceof WPGMZA.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker");marker.map!==this&&console.error("Wrong map error"),marker.infoWindow&&marker.infoWindow.close(),marker.map=null,marker.parent=null,this.markers.splice(this.markers.indexOf(marker),1),this.dispatchEvent({type:"markerremoved",marker:marker}),marker.dispatchEvent({type:"removed"})},WPGMZA.Map.prototype.getMarkerByID=function(id){for(var i=0;i<this.markers.length;i++)if(this.markers[i].id==id)return this.markers[i];return null},WPGMZA.Map.prototype.getMarkerByTitle=function(title){if("string"==typeof title){for(var i=0;i<this.markers.length;i++)if(this.markers[i].title==title)return this.markers[i]}else{if(!(title instanceof RegExp))throw new Error("Invalid argument");for(i=0;i<this.markers.length;i++)if(title.test(this.markers[i].title))return this.markers[i]}return null},WPGMZA.Map.prototype.removeMarkerByID=function(id){var marker=this.getMarkerByID(id);marker&&this.removeMarker(marker)},WPGMZA.Map.prototype.addPolygon=function(polygon){if(!(polygon instanceof WPGMZA.Polygon))throw new Error("Argument must be an instance of WPGMZA.Polygon");(polygon.map=this).polygons.push(polygon),this.dispatchEvent({type:"polygonadded",polygon:polygon})},WPGMZA.Map.prototype.removePolygon=function(polygon){if(!(polygon instanceof WPGMZA.Polygon))throw new Error("Argument must be an instance of WPGMZA.Polygon");if(polygon.map!==this)throw new Error("Wrong map error");polygon.map=null,this.polygons.splice(this.polygons.indexOf(polygon),1),this.dispatchEvent({type:"polygonremoved",polygon:polygon})},WPGMZA.Map.prototype.getPolygonByID=function(id){for(var i=0;i<this.polygons.length;i++)if(this.polygons[i].id==id)return this.polygons[i];return null},WPGMZA.Map.prototype.removePolygonByID=function(id){var polygon=this.getPolygonByID(id);polygon&&this.removePolygon(polygon)},WPGMZA.Map.prototype.getPolylineByID=function(id){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i].id==id)return this.polylines[i];return null},WPGMZA.Map.prototype.addPolyline=function(polyline){if(!(polyline instanceof WPGMZA.Polyline))throw new Error("Argument must be an instance of WPGMZA.Polyline");(polyline.map=this).polylines.push(polyline),this.dispatchEvent({type:"polylineadded",polyline:polyline})},WPGMZA.Map.prototype.removePolyline=function(polyline){if(!(polyline instanceof WPGMZA.Polyline))throw new Error("Argument must be an instance of WPGMZA.Polyline");if(polyline.map!==this)throw new Error("Wrong map error");polyline.map=null,this.polylines.splice(this.polylines.indexOf(polyline),1),this.dispatchEvent({type:"polylineremoved",polyline:polyline})},WPGMZA.Map.prototype.getPolylineByID=function(id){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i].id==id)return this.polylines[i];return null},WPGMZA.Map.prototype.removePolylineByID=function(id){var polyline=this.getPolylineByID(id);polyline&&this.removePolyline(polyline)},WPGMZA.Map.prototype.addCircle=function(circle){if(!(circle instanceof WPGMZA.Circle))throw new Error("Argument must be an instance of WPGMZA.Circle");(circle.map=this).circles.push(circle),this.dispatchEvent({type:"circleadded",circle:circle})},WPGMZA.Map.prototype.removeCircle=function(circle){if(!(circle instanceof WPGMZA.Circle))throw new Error("Argument must be an instance of WPGMZA.Circle");if(circle.map!==this)throw new Error("Wrong map error");circle.map=null,this.circles.splice(this.circles.indexOf(circle),1),this.dispatchEvent({type:"circleremoved",circle:circle})},WPGMZA.Map.prototype.getCircleByID=function(id){for(var i=0;i<this.circles.length;i++)if(this.circles[i].id==id)return this.circles[i];return null},WPGMZA.Map.prototype.removeCircleByID=function(id){var circle=this.getCircleByID(id);circle&&this.removeCircle(circle)},WPGMZA.Map.prototype.nudgeLatLng=function(latLng,x,y){var pixels=this.latLngToPixels(latLng);if(pixels.x+=parseFloat(x),pixels.y+=parseFloat(y),isNaN(pixels.x)||isNaN(pixels.y))throw new Error("Invalid coordinates supplied");return this.pixelsToLatLng(pixels)},WPGMZA.Map.prototype.nudge=function(x,y){var nudged=this.nudgeLatLng(this.getCenter(),x,y);this.setCenter(nudged)},WPGMZA.Map.prototype.animateNudge=function(x,y,origin,milliseconds){var nudged;if(origin){if(!(origin instanceof WPGMZA.LatLng))throw new Error("Origin must be an instance of WPGMZA.LatLng")}else origin=this.getCenter();nudged=this.nudgeLatLng(origin,x,y),milliseconds=milliseconds||WPGMZA.getScrollAnimationDuration(),$(this).animate({lat:nudged.lat,lng:nudged.lng},milliseconds)},WPGMZA.Map.prototype.onWindowResize=function(event){},WPGMZA.Map.prototype.onElementResized=function(event){},WPGMZA.Map.prototype.onBoundsChanged=function(event){this.trigger("boundschanged"),this.trigger("bounds_changed")},WPGMZA.Map.prototype.onIdle=function(event){this.trigger("idle")},WPGMZA.Map.prototype.hasVisibleMarkers=function(event){var markers_visible=0;for(var marker_id in marker_array){var marker=marker_array[marker_id];if(marker.isFilterable&&marker.getMap()){markers_visible++;break}}return 0<markers_visible},WPGMZA.Map.prototype.closeAllInfoWindows=function(){this.markers.forEach(function(marker){marker.infoWindow&&marker.infoWindow.close()})}}),jQuery(function($){WPGMZA.MapsEngineDialog=function(element){var self=this;this.element=element,window.wpgmzaUnbindSaveReminder&&window.wpgmzaUnbindSaveReminder(),$(element).show(),$(element).remodal().open(),$(element).find("input:radio").on("change",function(event){$("#wpgmza-confirm-engine").prop("disabled",!1)}),$("#wpgmza-confirm-engine").on("click",function(event){self.onButtonClicked(event)})},WPGMZA.MapsEngineDialog.prototype.onButtonClicked=function(event){$(event.target).prop("disabled",!0),$.ajax(WPGMZA.ajaxurl,{method:"POST",data:{action:"wpgmza_maps_engine_dialog_set_engine",engine:$("[name='wpgmza_maps_engine']:checked").val(),nonce:$("#wpgmza-maps-engine-dialog").attr("data-ajax-nonce")},success:function(response,status,xhr){window.location.reload()}})},$(window).on("load",function(event){var element=$("#wpgmza-maps-engine-dialog");element.length&&(WPGMZA.settings.wpgmza_maps_engine_dialog_done||WPGMZA.settings.wpgmza_google_maps_api_key&&WPGMZA.settings.wpgmza_google_maps_api_key.length||(WPGMZA.mapsEngineDialog=new WPGMZA.MapsEngineDialog(element)))})}),jQuery(function($){WPGMZA.MarkerFilter=function(map){WPGMZA.EventDispatcher.call(this),this.map=map},WPGMZA.MarkerFilter.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MarkerFilter.prototype.constructor=WPGMZA.MarkerFilter,WPGMZA.MarkerFilter.createInstance=function(map){return new WPGMZA.MarkerFilter(map)},WPGMZA.MarkerFilter.prototype.getFilteringParameters=function(){var params={map_id:this.map.id};return this.map.storeLocator&&(params=$.extend(params,this.map.storeLocator.getFilteringParameters())),params},WPGMZA.MarkerFilter.prototype.update=function(){},WPGMZA.MarkerFilter.prototype.onFilteringComplete=function(results){}}),jQuery(function($){WPGMZA.MarkerPanel=function(element){this.element=element},$(window).on("load",function(event){WPGMZA.getCurrentPage()==WPGMZA.PAGE_MAP_EDIT&&(WPGMZA.mapEditPage.markerPanel=new WPGMZA.MarkerPanel($("#wpgmza-marker-edit-panel")[0]))})}),jQuery(function($){WPGMZA.Marker=function(row){var self=this;this._offset={x:0,y:0},WPGMZA.assertInstanceOf(this,"Marker"),this.lat="36.778261",this.lng="-119.4179323999",this.address="California",this.title=null,this.description="",this.link="",this.icon="",this.approved=1,this.pic=null,this.isFilterable=!0,this.disableInfoWindow=!1,WPGMZA.MapObject.apply(this,arguments),row&&row.heatmap||(row&&this.on("init",function(event){row.position&&this.setPosition(row.position),row.map&&row.map.addMarker(this)}),this.addEventListener("added",function(event){self.onAdded(event)}),this.handleLegacyGlobals(row))},WPGMZA.Marker.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Marker.prototype.constructor=WPGMZA.Marker,WPGMZA.Marker.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProMarker:WPGMZA.OLMarker;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProMarker:WPGMZA.GoogleMarker}},WPGMZA.Marker.createInstance=function(row){return new(WPGMZA.Marker.getConstructor())(row)},WPGMZA.Marker.ANIMATION_NONE="0",WPGMZA.Marker.ANIMATION_BOUNCE="1",WPGMZA.Marker.ANIMATION_DROP="2",Object.defineProperty(WPGMZA.Marker.prototype,"offsetX",{get:function(){return this._offset.x},set:function(value){this._offset.x=value,this.updateOffset()}}),Object.defineProperty(WPGMZA.Marker.prototype,"offsetY",{get:function(){return this._offset.y},set:function(value){this._offset.y=value,this.updateOffset()}}),WPGMZA.Marker.prototype.onAdded=function(event){var self=this;this.addEventListener("click",function(event){self.onClick(event)}),this.addEventListener("mouseover",function(event){self.onMouseOver(event)}),this.addEventListener("select",function(event){self.onSelect(event)}),this.map.settings.marker==this.id&&self.trigger("select"),"1"==this.infoopen&&this.openInfoWindow()},WPGMZA.Marker.prototype.handleLegacyGlobals=function(row){var m;if(WPGMZA.settings.useLegacyGlobals&&this.map_id&&this.id&&!(WPGMZA.pro_version&&(m=WPGMZA.pro_version.match(/\d+/))&&m[0]<=7)){window.marker_array||(window.marker_array={}),marker_array[this.map_id]||(marker_array[this.map_id]=[]),marker_array[this.map_id][this.id]=this,window.wpgmaps_localize_marker_data||(window.wpgmaps_localize_marker_data={}),wpgmaps_localize_marker_data[this.map_id]||(wpgmaps_localize_marker_data[this.map_id]=[]);var cloned=$.extend({marker_id:this.id},row);wpgmaps_localize_marker_data[this.map_id][this.id]=cloned}},WPGMZA.Marker.prototype.initInfoWindow=function(){this.infoWindow||(this.infoWindow=WPGMZA.InfoWindow.createInstance())},WPGMZA.Marker.prototype.openInfoWindow=function(){this.map?"map-edit"==WPGMZA.currentPage&&!WPGMZA.pro_version||(this.map.lastInteractedMarker&&this.map.lastInteractedMarker.infoWindow.close(),(this.map.lastInteractedMarker=this).initInfoWindow(),this.infoWindow.open(this.map,this)):console.warn("Cannot open infowindow for marker with no map")},WPGMZA.Marker.prototype.onClick=function(event){},WPGMZA.Marker.prototype.onSelect=function(event){this.openInfoWindow()},WPGMZA.Marker.prototype.onMouseOver=function(event){this.map.settings.info_window_open_by==WPGMZA.InfoWindow.OPEN_BY_HOVER&&this.openInfoWindow()},WPGMZA.Marker.prototype.getIcon=function(){function stripProtocol(url){return"string"!=typeof url?url:url.replace(/^http(s?):/,"")}return WPGMZA.defaultMarkerIcon?stripProtocol(WPGMZA.defaultMarkerIcon):stripProtocol(WPGMZA.settings.default_marker_icon)},WPGMZA.Marker.prototype.getPosition=function(){return new WPGMZA.LatLng({lat:parseFloat(this.lat),lng:parseFloat(this.lng)})},WPGMZA.Marker.prototype.setPosition=function(latLng){latLng instanceof WPGMZA.LatLng?(this.lat=latLng.lat,this.lng=latLng.lng):(this.lat=parseFloat(latLng.lat),this.lng=parseFloat(latLng.lng))},WPGMZA.Marker.prototype.setOffset=function(x,y){this._offset.x=x,this._offset.y=y,this.updateOffset()},WPGMZA.Marker.prototype.updateOffset=function(){},WPGMZA.Marker.prototype.getAnimation=function(animation){return this.settings.animation},WPGMZA.Marker.prototype.setAnimation=function(animation){this.settings.animation=animation},WPGMZA.Marker.prototype.getVisible=function(){},WPGMZA.Marker.prototype.setVisible=function(visible){!visible&&this.infoWindow&&this.infoWindow.close()},WPGMZA.Marker.prototype.getMap=function(){return this.map},WPGMZA.Marker.prototype.setMap=function(map){map?map.addMarker(this):this.map&&this.map.removeMarker(this),this.map=map},WPGMZA.Marker.prototype.getDraggable=function(){},WPGMZA.Marker.prototype.setDraggable=function(draggable){},WPGMZA.Marker.prototype.setOptions=function(options){},WPGMZA.Marker.prototype.setOpacity=function(opacity){},WPGMZA.Marker.prototype.panIntoView=function(){if(!this.map)throw new Error("Marker hasn't been added to a map");this.map.setCenter(this.getPosition())},WPGMZA.Marker.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this),position=this.getPosition();return $.extend(result,{lat:position.lat,lng:position.lng,address:this.address,title:this.title,description:this.description,link:this.link,icon:this.icon,pic:this.pic,approved:this.approved}),result}}),jQuery(function($){WPGMZA.ModernStoreLocatorCircle=function(map_id,settings){var map;map=WPGMZA.isProVersion()?this.map=MYMAP[map_id].map:this.map=MYMAP.map,this.map_id=map_id,this.mapElement=map.element,this.mapSize={width:$(this.mapElement).width(),height:$(this.mapElement).height()},this.initCanvasLayer(),this.settings={center:new WPGMZA.LatLng(0,0),radius:1,color:"#63AFF2",shadowColor:"white",shadowBlur:4,centerRingRadius:10,centerRingLineWidth:3,numInnerRings:9,innerRingLineWidth:1,innerRingFade:!0,numOuterRings:7,ringLineWidth:1,mainRingLineWidth:2,numSpokes:6,spokesStartAngle:Math.PI/2,numRadiusLabels:6,radiusLabelsStartAngle:Math.PI/2,radiusLabelFont:"13px sans-serif",visible:!1},settings&&this.setOptions(settings)},WPGMZA.ModernStoreLocatorCircle.createInstance=function(map,settings){return"google-maps"==WPGMZA.settings.engine?new WPGMZA.GoogleModernStoreLocatorCircle(map,settings):new WPGMZA.OLModernStoreLocatorCircle(map,settings)},WPGMZA.ModernStoreLocatorCircle.prototype.initCanvasLayer=function(){},WPGMZA.ModernStoreLocatorCircle.prototype.onResize=function(event){this.draw()},WPGMZA.ModernStoreLocatorCircle.prototype.onUpdate=function(event){this.draw()},WPGMZA.ModernStoreLocatorCircle.prototype.setOptions=function(options){for(var name in options){var functionName="set"+name.substr(0,1).toUpperCase()+name.substr(1);"function"==typeof this[functionName]?this[functionName](options[name]):this.settings[name]=options[name]}},WPGMZA.ModernStoreLocatorCircle.prototype.getResolutionScale=function(){return window.devicePixelRatio||1},WPGMZA.ModernStoreLocatorCircle.prototype.getCenter=function(){return this.getPosition()},WPGMZA.ModernStoreLocatorCircle.prototype.setCenter=function(value){this.setPosition(value)},WPGMZA.ModernStoreLocatorCircle.prototype.getPosition=function(){return this.settings.center},WPGMZA.ModernStoreLocatorCircle.prototype.setPosition=function(position){this.settings.center=position},WPGMZA.ModernStoreLocatorCircle.prototype.getRadius=function(){return this.settings.radius},WPGMZA.ModernStoreLocatorCircle.prototype.setRadius=function(radius){if(isNaN(radius))throw new Error("Invalid radius");this.settings.radius=radius},WPGMZA.ModernStoreLocatorCircle.prototype.getVisible=function(){return this.settings.visible},WPGMZA.ModernStoreLocatorCircle.prototype.setVisible=function(visible){this.settings.visible=visible},WPGMZA.ModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.getContext=function(type){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.validateSettings=function(){WPGMZA.isHexColorString(this.settings.color)||(this.settings.color="#63AFF2")},WPGMZA.ModernStoreLocatorCircle.prototype.draw=function(){this.validateSettings();var settings=this.settings,canvasDimensions=this.getCanvasDimensions(),canvasWidth=canvasDimensions.width,canvasHeight=canvasDimensions.height;this.map,this.getResolutionScale();if(context=this.getContext("2d"),context.clearRect(0,0,canvasWidth,canvasHeight),settings.visible){context.shadowColor=settings.shadowColor,context.shadowBlur=settings.shadowBlur,context.setTransform(1,0,0,1,0,0);var scale=this.getScale();context.scale(scale,scale);var offset=this.getWorldOriginOffset();context.translate(offset.x,offset.y);new WPGMZA.LatLng(this.settings.center);var worldPoint=this.getCenterPixels(),rgba=WPGMZA.hexToRgba(settings.color),ringSpacing=this.getTransformedRadius(settings.radius)/(settings.numInnerRings+1);context.strokeStyle=settings.color,context.lineWidth=1/scale*settings.centerRingLineWidth,context.beginPath(),context.arc(worldPoint.x,worldPoint.y,this.getTransformedRadius(settings.centerRingRadius)/scale,0,2*Math.PI),context.stroke(),context.closePath();var end,radius=this.getTransformedRadius(settings.radius)+ringSpacing*settings.numOuterRings+1,grad=context.createRadialGradient(0,0,0,0,0,radius),start=(rgba=WPGMZA.hexToRgba(settings.color),WPGMZA.rgbaToString(rgba));rgba.a=0,end=WPGMZA.rgbaToString(rgba),grad.addColorStop(0,start),grad.addColorStop(1,end),context.save(),context.translate(worldPoint.x,worldPoint.y),context.strokeStyle=grad,context.lineWidth=2/scale;for(var i=0;i<settings.numSpokes;i++)spokeAngle=settings.spokesStartAngle+2*Math.PI*(i/settings.numSpokes),x=Math.cos(spokeAngle)*radius,y=Math.sin(spokeAngle)*radius,context.setLineDash([2/scale,15/scale]),context.beginPath(),context.moveTo(0,0),context.lineTo(x,y),context.stroke();context.setLineDash([]),context.restore(),context.lineWidth=1/scale*settings.innerRingLineWidth;for(i=1;i<=settings.numInnerRings;i++){radius=i*ringSpacing;settings.innerRingFade&&(rgba.a=1-(i-1)/settings.numInnerRings),context.strokeStyle=WPGMZA.rgbaToString(rgba),context.beginPath(),context.arc(worldPoint.x,worldPoint.y,radius,0,2*Math.PI),context.stroke(),context.closePath()}context.strokeStyle=settings.color,context.lineWidth=1/scale*settings.centerRingLineWidth,context.beginPath(),context.arc(worldPoint.x,worldPoint.y,this.getTransformedRadius(settings.radius),0,2*Math.PI),context.stroke(),context.closePath();for(radius=radius+ringSpacing,i=0;i<settings.numOuterRings;i++)settings.innerRingFade&&(rgba.a=1-i/settings.numOuterRings),context.strokeStyle=WPGMZA.rgbaToString(rgba),context.beginPath(),context.arc(worldPoint.x,worldPoint.y,radius,0,2*Math.PI),context.stroke(),context.closePath(),radius+=ringSpacing;if(0<settings.numRadiusLabels){var m,x,y;radius=this.getTransformedRadius(settings.radius);(m=settings.radiusLabelFont.match(/(\d+)px/))&&parseInt(m[1]),context.font=settings.radiusLabelFont,context.textAlign="center",context.textBaseline="middle",context.fillStyle=settings.color,context.save(),context.translate(worldPoint.x,worldPoint.y);for(i=0;i<settings.numRadiusLabels;i++){var spokeAngle,width,textAngle=(spokeAngle=settings.radiusLabelsStartAngle+2*Math.PI*(i/settings.numRadiusLabels))+Math.PI/2,text=settings.radiusString;0<Math.sin(spokeAngle)&&(textAngle-=Math.PI),x=Math.cos(spokeAngle)*radius,y=Math.sin(spokeAngle)*radius,context.save(),context.translate(x,y),context.rotate(textAngle),context.scale(1/scale,1/scale),width=context.measureText(text).width,height=width/2,context.clearRect(-width,-height,2*width,2*height),context.fillText(settings.radiusString,0,0),context.restore()}context.restore()}}}}),jQuery(function($){WPGMZA.ModernStoreLocator=function(map_id){var original,self=this,map=WPGMZA.getMapByID(map_id);if(WPGMZA.assertInstanceOf(this,"ModernStoreLocator"),(original=WPGMZA.isProVersion()?$(".wpgmza_sl_search_button[mid='"+map_id+"'], .wpgmza_sl_search_button_"+map_id).closest(".wpgmza_sl_main_div"):$(".wpgmza_sl_search_button").closest(".wpgmza_sl_main_div")).length){this.element=$("<div class='wpgmza-modern-store-locator'><div class='wpgmza-inner wpgmza-modern-hover-opaque'/></div>")[0];var addressInput,inner=$(this.element).find(".wpgmza-inner");addressInput=WPGMZA.isProVersion()?$(original).find(".addressInput"):$(original).find("#addressInput"),wpgmaps_localize[map_id].other_settings.store_locator_query_string&&wpgmaps_localize[map_id].other_settings.store_locator_query_string.length&&addressInput.attr("placeholder",wpgmaps_localize[map_id].other_settings.store_locator_query_string),inner.append(addressInput);var button,titleSearch=$(original).find("[id='nameInput_"+map_id+"']");if(titleSearch.length){var placeholder=wpgmaps_localize[map_id].other_settings.store_locator_name_string;placeholder&&placeholder.length&&titleSearch.attr("placeholder",placeholder),inner.append(titleSearch)}(button=$(original).find("button.wpgmza-use-my-location"))&&inner.append(button),$(addressInput).on("keydown keypress",function(event){13==event.keyCode&&(self.searchButton.trigger("click"),searchLocations(map_id),map.storeLocator.onSearch(event))}),$(addressInput).on("input",function(event){self.searchButton.show(),self.resetButton.hide()}),inner.append($(original).find("select.wpgmza_sl_radius_select")),this.searchButton=$(original).find(".wpgmza_sl_search_button, .wpgmza_sl_search_button_div"),inner.append(this.searchButton),this.resetButton=$(original).find(".wpgmza_sl_reset_button_div"),inner.append(this.resetButton),this.resetButton.on("click",function(event){resetLocations(map_id)}),this.resetButton.hide(),WPGMZA.isProVersion()&&(this.searchButton.on("click",function(event){0!=$("addressInput_"+map_id).val()&&(self.searchButton.hide(),self.resetButton.show(),map.storeLocator.state=WPGMZA.StoreLocator.STATE_APPLIED)}),this.resetButton.on("click",function(event){self.resetButton.hide(),self.searchButton.show(),map.storeLocator.state=WPGMZA.StoreLocator.STATE_INITIAL})),inner.append($("#wpgmza_distance_type_"+map_id));var container=$(original).find(".wpgmza_cat_checkbox_holder"),items=($(container).children("ul"),$(container).find("li")),numCategories=0,icons=[];items.each(function(index,el){var id=$(el).attr("class").match(/\d+/);for(var category_id in wpgmza_category_data)if(id==category_id){var src=wpgmza_category_data[category_id].image,icon=$('<div class="wpgmza-chip-icon"/>');icon.css({"background-image":"url('"+src+"')",width:$("#wpgmza_cat_checkbox_"+category_id+" + label").height()+"px"}),icons.push(icon),null!=src&&""!=src&&$("#wpgmza_cat_checkbox_"+category_id+" + label").prepend(icon),numCategories++;break}}),$(this.element).append(container),numCategories&&(this.optionsButton=$('<span class="wpgmza_store_locator_options_button"><i class="fa fa-list"></i></span>'),$(this.searchButton).before(this.optionsButton)),setInterval(function(){icons.forEach(function(icon){var height=$(icon).height();$(icon).css({width:height+"px"}),$(icon).closest("label").css({"padding-left":height+8+"px"})}),$(container).css("width",$(self.element).find(".wpgmza-inner").outerWidth()+"px")},1e3),$(this.element).find(".wpgmza_store_locator_options_button").on("click",function(event){container.hasClass("wpgmza-open")?container.removeClass("wpgmza-open"):container.addClass("wpgmza-open")}),$(original).remove(),$(this.element).find("input, select").on("focus",function(){$(inner).addClass("active")}),$(this.element).find("input, select").on("blur",function(){$(inner).removeClass("active")}),$(this.element).on("mouseover","li.wpgmza_cat_checkbox_item_holder",function(event){self.onMouseOverCategory(event)}),$(this.element).on("mouseleave","li.wpgmza_cat_checkbox_item_holder",function(event){self.onMouseLeaveCategory(event)}),$(map.markerFilter).on("filteringcomplete",function(event){this.map.hasVisibleMarkers()||(this.map.settings.store_locator_not_found_message!=WPGMZA.localized_strings.zero_results&&""!=this.map.settings.store_locator_not_found_message?alert(this.map.settings.store_locator_not_found_message):alert(WPGMZA.localized_strings.zero_results))}),$("body").on("click",".wpgmza_store_locator_options_button",function(event){setTimeout(function(){if($(".wpgmza_cat_checkbox_holder").hasClass("wpgmza-open")){var p_cat=$(".wpgmza_cat_checkbox_holder"),position_cat=p_cat.position().top+p_cat.outerHeight(!0)+$(".wpgmza-modern-store-locator").height(),$p_map=$(".wpgmza_map");$p_map.position().top+$p_map.outerHeight(!0)<=position_cat&&($(".wpgmza_cat_ul").css("overflow","scroll "),$(".wpgmza_cat_ul").css("height","100%"),$(".wpgmza-modern-store-locator").css("height","100%"),$(".wpgmza_cat_checkbox_holder.wpgmza-open").css({"padding-bottom":"50px",height:"100%"}))}},500)})}},WPGMZA.ModernStoreLocator.createInstance=function(map_id){switch(WPGMZA.settings.engine){case"open-layers":return new WPGMZA.OLModernStoreLocator(map_id);default:return new WPGMZA.GoogleModernStoreLocator(map_id)}},WPGMZA.ModernStoreLocator.prototype.onMouseOverCategory=function(event){var li=event.currentTarget;$(li).children("ul.wpgmza_cat_checkbox_item_holder").stop(!0,!1).fadeIn()},WPGMZA.ModernStoreLocator.prototype.onMouseLeaveCategory=function(event){var li=event.currentTarget;$(li).children("ul.wpgmza_cat_checkbox_item_holder").stop(!0,!1).fadeOut()}}),jQuery(function($){WPGMZA.NativeMapsAppIcon=function(){navigator.userAgent.match(/^Apple|iPhone|iPad|iPod/)?(this.type="apple",this.element=$('<span><i class="fab fa fa-apple" aria-hidden="true"></i></span>')):(this.type="google",this.element=$('<span><i class="fab fa fa-google" aria-hidden="true"></i></span>'))}}),jQuery(function($){Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,"slice",{value:function(begin,end){return new Uint8Array(Array.prototype.slice.call(this,begin,end))}}),WPGMZA.isSafari()&&!window.external&&(window.external={})}),jQuery(function($){WPGMZA.Polygon=function(row,enginePolygon){WPGMZA.assertInstanceOf(this,"Polygon"),this.paths=null,this.title=null,this.name=null,this.link=null,WPGMZA.MapObject.apply(this,arguments)},WPGMZA.Polygon.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Polygon.prototype.constructor=WPGMZA.Polygon,WPGMZA.Polygon.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.isProVersion()?WPGMZA.OLProPolygon:WPGMZA.OLPolygon;default:return WPGMZA.isProVersion()?WPGMZA.GoogleProPolygon:WPGMZA.GooglePolygon}},WPGMZA.Polygon.createInstance=function(row,engineObject){return new(WPGMZA.Polygon.getConstructor())(row,engineObject)},WPGMZA.Polygon.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this);return $.extend(result,{name:this.name,title:this.title,link:this.link}),result}}),jQuery(function($){WPGMZA.Polyline=function(row,googlePolyline){WPGMZA.assertInstanceOf(this,"Polyline"),this.title=null,WPGMZA.MapObject.apply(this,arguments)},WPGMZA.Polyline.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Polyline.prototype.constructor=WPGMZA.Polyline,WPGMZA.Polyline.getConstructor=function(){switch(WPGMZA.settings.engine){case"open-layers":return WPGMZA.OLPolyline;default:return WPGMZA.GooglePolyline}},WPGMZA.Polyline.createInstance=function(row,engineObject){return new(WPGMZA.Polyline.getConstructor())(row,engineObject)},WPGMZA.Polyline.prototype.getPoints=function(){return this.toJSON().points},WPGMZA.Polyline.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this);return result.title=this.title,result}}),jQuery(function($){WPGMZA.PopoutPanel=function(element){this.element=element},WPGMZA.PopoutPanel.prototype.open=function(){$(this.element).addClass("wpgmza-open")},WPGMZA.PopoutPanel.prototype.close=function(){$(this.element).removeClass("wpgmza-open")}}),jQuery(function($){function sendAJAXFallbackRequest(route,params){if((params=$.extend({},params)).data||(params.data={}),"route"in params.data)throw new Error("Cannot send route through this method");if("action"in params.data)throw new Error("Cannot send action through this method");return params.data.route=route,params.data.action="wpgmza_rest_api_request",WPGMZA.restAPI.addNonce(route,params,WPGMZA.RestAPI.CONTEXT_AJAX),$.ajax(WPGMZA.ajaxurl,params)}WPGMZA.RestAPI=function(){WPGMZA.RestAPI.URL=WPGMZA.resturl,this.useAJAXFallback=!1},WPGMZA.RestAPI.CONTEXT_REST="REST",WPGMZA.RestAPI.CONTEXT_AJAX="AJAX",WPGMZA.RestAPI.createInstance=function(){return new WPGMZA.RestAPI},Object.defineProperty(WPGMZA.RestAPI.prototype,"isCompressedPathVariableSupported",{get:function(){return WPGMZA.serverCanInflate&&"Uint8Array"in window&&"TextEncoder"in window}}),Object.defineProperty(WPGMZA.RestAPI.prototype,"isCompressedPathVariableAllowed",{get:function(){return!WPGMZA.pro_version||WPGMZA.Version.compare(WPGMZA.pro_version,"8.0.0")>=WPGMZA.Version.EQUAL_TO?!WPGMZA.settings.disable_compressed_path_variables:WPGMZA.settings.enable_compressed_path_variables}}),Object.defineProperty(WPGMZA.RestAPI.prototype,"maxURLLength",{get:function(){return 2083}}),WPGMZA.RestAPI.prototype.compressParams=function(params){var suffix="";if(params.markerIDs){var markerIDs=params.markerIDs.split(",");if(1<markerIDs.length){var encoded=(new WPGMZA.EliasFano).encode(markerIDs),compressed=pako.deflate(encoded),string=Array.prototype.map.call(compressed,function(ch){return String.fromCharCode(ch)}).join("");suffix="/"+btoa(string).replace(/\//g,"-").replace(/=+$/,""),params.midcbp=encoded.pointer,delete params.markerIDs}}string=JSON.stringify(params);var input=(new TextEncoder).encode(string),raw=(compressed=pako.deflate(input),Array.prototype.map.call(compressed,function(ch){return String.fromCharCode(ch)}).join(""));return btoa(raw).replace(/\//g,"-").replace(/=+$/,"")+suffix},WPGMZA.RestAPI.prototype.getNonce=function(route){var matches=[];for(var pattern in WPGMZA.restnoncetable){var regex=new RegExp(pattern);route.match(regex)&&matches.push({pattern:pattern,nonce:WPGMZA.restnoncetable[pattern],length:pattern.length})}if(!matches.length)throw new Error("No nonce found for route");return matches.sort(function(a,b){return b.length-a.length}),matches[0].nonce},WPGMZA.RestAPI.prototype.addNonce=function(route,params,context){function setRESTNonce(xhr){context==WPGMZA.RestAPI.CONTEXT_REST&&xhr.setRequestHeader("X-WP-Nonce",WPGMZA.restnonce),params&&params.method&&!params.method.match(/^GET$/i)&&xhr.setRequestHeader("X-WPGMZA-Action-Nonce",self.getNonce(route))}var self=this;if(params.beforeSend){var base=params.beforeSend;params.beforeSend=function(xhr){base(xhr),setRESTNonce(xhr)}}else params.beforeSend=setRESTNonce},WPGMZA.RestAPI.prototype.call=function(route,params){if(this.useAJAXFallback)return sendAJAXFallbackRequest(route,params);var attemptedCompressedPathVariable=!1,fallbackRoute=route,fallbackParams=$.extend({},params);if("string"!=typeof route||!route.match(/^\//)&&!route.match(/^http/))throw new Error("Invalid route");if(WPGMZA.RestAPI.URL.match(/\/$/)&&(route=route.replace(/^\//,"")),params=params||{},this.addNonce(route,params,WPGMZA.RestAPI.CONTEXT_REST),params.error||(params.error=function(xhr,status,message){if("abort"!=status){switch(xhr.status){case 401:case 403:return $.post(WPGMZA.ajaxurl,{action:"wpgmza_report_rest_api_blocked"},function(response){}),console.warn("The REST API was blocked. This is usually due to security plugins blocking REST requests for non-authenticated users."),this.useAJAXFallback=!0,sendAJAXFallbackRequest(fallbackRoute,fallbackParams);case 414:if(!attemptedCompressedPathVariable)break;return fallbackParams.method="POST",fallbackParams.useCompressedPathVariable=!1,WPGMZA.restAPI.call(fallbackRoute,fallbackParams)}throw new Error(message)}}),params.useCompressedPathVariable&&this.isCompressedPathVariableSupported&&this.isCompressedPathVariableAllowed){var compressedParams=$.extend({},params),data=params.data,base64=this.compressParams(data);WPGMZA.isServerIIS&&(base64=base64.replace(/\+/g,"%20"));var compressedRoute=route.replace(/\/$/,"")+"/base64"+base64;WPGMZA.RestAPI.URL;compressedParams.method="GET",delete compressedParams.data,!1===params.cache&&(compressedParams.data={skip_cache:1}),compressedRoute.length<this.maxURLLength?(attemptedCompressedPathVariable=!0,route=compressedRoute,params=compressedParams):(WPGMZA.RestAPI.compressedPathVariableURLLimitWarningDisplayed||console.warn("Compressed path variable route would exceed URL length limit"),WPGMZA.RestAPI.compressedPathVariableURLLimitWarningDisplayed=!0)}return WPGMZA.RestAPI.URL.match(/\?/)&&(route=route.replace(/\?/,"&")),$.ajax(WPGMZA.RestAPI.URL+route,params)};var nativeCallFunction=WPGMZA.RestAPI.call;WPGMZA.RestAPI.call=function(){console.warn("WPGMZA.RestAPI.call was called statically, did you mean to call the function on WPGMZA.restAPI?"),nativeCallFunction.apply(this,arguments)},$(document.body).on("click","#wpgmza-rest-api-blocked button.notice-dismiss",function(event){WPGMZA.restAPI.call("/rest-api/",{method:"POST",data:{dismiss_blocked_notice:!0}})})}),jQuery(function($){WPGMZA.SettingsPage=function(){$("#wpgmza-global-settings").tabs()},WPGMZA.SettingsPage.createInstance=function(){return new WPGMZA.SettingsPage},$(window).on("load",function(event){var useLegacyHTML=WPGMZA.settings.useLegacyHTML||!window.location.href.match(/no-legacy-html/);WPGMZA.getCurrentPage()!=WPGMZA.PAGE_SETTINGS||useLegacyHTML||(WPGMZA.settingsPage=WPGMZA.SettingsPage.createInstance())})}),jQuery(function($){WPGMZA.StoreLocator=function(map,element){var self=this;WPGMZA.EventDispatcher.call(this),this._center=null,this.map=map,this.element=element,(this.element.wpgmzaStoreLocator=this).state=WPGMZA.StoreLocator.STATE_INITIAL,$(element).find(".wpgmza-not-found-msg").hide(),this.addressInput=WPGMZA.AddressInput.createInstance($(element).find("input.wpgmza-address")[0],map),this.map.on("storelocatorgeocodecomplete",function(event){self.onGeocodeComplete(event)}),this.map.on("init",function(event){self.map.markerFilter.on("filteringcomplete",function(event){self.onFilteringComplete(event)})}),$(element).on("keypress","input",function(event){13==event.which&&(searchLocations(self.map.id),self.onSearch(event))}),$(document.body).on("click",".wpgmza_sl_search_button_"+map.id+", [data-map-id='"+map.id+"'] .wpgmza_sl_search_button",function(event){self.onSearch(event)}),$(document.body).on("click",".wpgmza_sl_reset_button_"+map.id+", [data-map-id='"+map.id+"'] .wpgmza_sl_reset_button_div",function(event){self.onReset(event)})},WPGMZA.StoreLocator.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.StoreLocator.prototype.constructor=WPGMZA.StoreLocator,WPGMZA.StoreLocator.STATE_INITIAL="initial",WPGMZA.StoreLocator.STATE_APPLIED="applied",WPGMZA.StoreLocator.createInstance=function(map,element){return new WPGMZA.StoreLocator(map,element)},Object.defineProperty(WPGMZA.StoreLocator.prototype,"distanceUnits",{get:function(){return 1==this.map.settings.store_locator_distance?WPGMZA.Distance.MILES:WPGMZA.Distance.KILOMETERS}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"radius",{get:function(){return $("#radiusSelect, #radiusSelect_"+this.map.id).val()}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"center",{get:function(){return this._center}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"bounds",{get:function(){return this._bounds}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"marker",{get:function(){if(1!=this.map.settings.store_locator_bounce)return null;if(this._marker)return this._marker;return this._marker=WPGMZA.Marker.createInstance({visible:!1}),this._marker.disableInfoWindow=!0,this._marker.isFilterable=!1,this._marker.setAnimation(WPGMZA.Marker.ANIMATION_BOUNCE),this._marker}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"circle",{get:function(){return this._circle||("modern"!=this.map.settings.wpgmza_store_locator_radius_style||WPGMZA.isDeviceiOS()?this._circle=WPGMZA.Circle.createInstance({strokeColor:"#ff0000",strokeOpacity:"0.25",strokeWeight:2,fillColor:"#ff0000",fillOpacity:"0.15",visible:!1,clickable:!1}):(this._circle=WPGMZA.ModernStoreLocatorCircle.createInstance(this.map.id),this._circle.settings.color=this.circleStrokeColor)),this._circle}}),WPGMZA.StoreLocator.prototype.onGeocodeComplete=function(event){if(!event.results||!event.results.length)return this._center=null,void(this._bounds=null);this._center=new WPGMZA.LatLng(event.results[0].latLng),this._bounds=new WPGMZA.LatLngBounds(event.results[0].bounds),this.map.markerFilter.update({},this)},WPGMZA.StoreLocator.prototype.onSearch=function(event){this.state=WPGMZA.StoreLocator.STATE_APPLIED},WPGMZA.StoreLocator.prototype.onReset=function(event){this.state=WPGMZA.StoreLocator.STATE_INITIAL,this._center=null,this._bounds=null,this.map.markerFilter.update({},this)},WPGMZA.StoreLocator.prototype.getFilteringParameters=function(){return this.center?{center:this.center,radius:this.radius}:{}},WPGMZA.StoreLocator.prototype.onFilteringComplete=function(event){var params=event.filteringParams,marker=this.marker;marker&&marker.setVisible(!1),params.center&&marker&&(marker.setPosition(params.center),marker.setVisible(!0),marker.map!=this.map&&this.map.addMarker(marker));var circle=this.circle;if(circle){var factor=this.distanceUnits==WPGMZA.Distance.MILES?WPGMZA.Distance.KILOMETERS_PER_MILE:1;circle.setVisible(!1),params.center&&params.radius&&(circle.setRadius(params.radius*factor),circle.setCenter(params.center),circle.setVisible(!0),circle.map!=this.map&&this.map.addCircle(circle)),circle instanceof WPGMZA.ModernStoreLocatorCircle&&(circle.settings.radiusString=this.radius)}this.map.hasVisibleMarkers()?$(this.element).find(".wpgmza-not-found-msg").hide():$(this.element).find(".wpgmza-not-found-msg").show()}}),jQuery(function($){WPGMZA.Text=function(options){if(options)for(var name in options)this[name]=options[name]},WPGMZA.Text.createInstance=function(options){switch(WPGMZA.settings.engine){case"open-layers":return new WPGMZA.OLText(options);default:return new WPGMZA.GoogleText(options)}}}),jQuery(function($){WPGMZA.ThemeEditor=function(){WPGMZA.EventDispatcher.call(this),this.element=$("#wpgmza-theme-editor"),this.element.length?"open-layers"!=WPGMZA.settings.engine?(this.json=[{}],this.mapElement=WPGMZA.maps[0].element,this.element.appendTo("#wpgmza-map-theme-editor__holder"),$(window).on("scroll",function(event){}),setInterval(function(){},200),this.initHTML(),WPGMZA.themeEditor=this):this.element.remove():console.warn("No element to initialise theme editor on")},WPGMZA.extend(WPGMZA.ThemeEditor,WPGMZA.EventDispatcher),WPGMZA.ThemeEditor.prototype.updatePosition=function(){},WPGMZA.ThemeEditor.features={all:[],administrative:["country","land_parcel","locality","neighborhood","province"],landscape:["man_made","natural","natural.landcover","natural.terrain"],poi:["attraction","business","government","medical","park","place_of_worship","school","sports_complex"],road:["arterial","highway","highway.controlled_access","local"],transit:["line","station","station.airport","station.bus","station.rail"],water:[]},WPGMZA.ThemeEditor.elements={all:[],geometry:["fill","stroke"],labels:["icon","text","text.fill","text.stroke"]},WPGMZA.ThemeEditor.prototype.parse=function(){$("#wpgmza_theme_editor_feature option, #wpgmza_theme_editor_element option").css("font-weight","normal"),$("#wpgmza_theme_editor_error").hide(),$("#wpgmza_theme_editor").show(),$("#wpgmza_theme_editor_do_hue").prop("checked",!1),$("#wpgmza_theme_editor_hue").val("#000000"),$("#wpgmza_theme_editor_lightness").val(""),$("#wpgmza_theme_editor_saturation").val(""),$("#wpgmza_theme_editor_gamma").val(""),$("#wpgmza_theme_editor_do_invert_lightness").prop("checked",!1),$("#wpgmza_theme_editor_visibility").val("inherit"),$("#wpgmza_theme_editor_do_color").prop("checked",!1),$("#wpgmza_theme_editor_color").val("#000000"),$("#wpgmza_theme_editor_weight").val("");var textarea=$('textarea[name="wpgmza_theme_data"]');if(!textarea.val()||textarea.val().length<1)this.json=[{}];else{try{this.json=$.parseJSON($('textarea[name="wpgmza_theme_data"]').val())}catch(e){return this.json=[{}],$("#wpgmza_theme_editor").hide(),void $("#wpgmza_theme_editor_error").show()}if(!$.isArray(this.json)){var jsonCopy=this.json;this.json=[],this.json.push(jsonCopy)}this.highlightFeatures(),this.highlightElements(),this.loadElementStylers()}},WPGMZA.ThemeEditor.prototype.highlightFeatures=function(){$("#wpgmza_theme_editor_feature option").css("font-weight","normal"),$.each(this.json,function(i,v){v.hasOwnProperty("featureType")?$('#wpgmza_theme_editor_feature option[value="'+v.featureType+'"]').css("font-weight","bold"):$('#wpgmza_theme_editor_feature option[value="all"]').css("font-weight","bold")})},WPGMZA.ThemeEditor.prototype.highlightElements=function(){var feature=$("#wpgmza_theme_editor_feature").val();$("#wpgmza_theme_editor_element option").css("font-weight","normal"),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")&&v.featureType==feature||"all"==feature&&!v.hasOwnProperty("featureType"))&&(v.hasOwnProperty("elementType")?$('#wpgmza_theme_editor_element option[value="'+v.elementType+'"]').css("font-weight","bold"):$('#wpgmza_theme_editor_element option[value="all"]').css("font-weight","bold"))})},WPGMZA.ThemeEditor.prototype.loadElementStylers=function(){var feature=$("#wpgmza_theme_editor_feature").val(),element=$("#wpgmza_theme_editor_element").val();$("#wpgmza_theme_editor_do_hue").prop("checked",!1),$("#wpgmza_theme_editor_hue").val("#000000"),$("#wpgmza_theme_editor_lightness").val(""),$("#wpgmza_theme_editor_saturation").val(""),$("#wpgmza_theme_editor_gamma").val(""),$("#wpgmza_theme_editor_do_invert_lightness").prop("checked",!1),$("#wpgmza_theme_editor_visibility").val("inherit"),$("#wpgmza_theme_editor_do_color").prop("checked",!1),$("#wpgmza_theme_editor_color").val("#000000"),$("#wpgmza_theme_editor_weight").val(""),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")&&v.featureType==feature||"all"==feature&&!v.hasOwnProperty("featureType"))&&(v.hasOwnProperty("elementType")&&v.elementType==element||"all"==element&&!v.hasOwnProperty("elementType"))&&v.hasOwnProperty("stylers")&&$.isArray(v.stylers)&&0<v.stylers.length&&$.each(v.stylers,function(ii,vv){vv.hasOwnProperty("hue")&&($("#wpgmza_theme_editor_do_hue").prop("checked",!0),$("#wpgmza_theme_editor_hue").val(vv.hue)),vv.hasOwnProperty("lightness")&&$("#wpgmza_theme_editor_lightness").val(vv.lightness),vv.hasOwnProperty("saturation")&&$("#wpgmza_theme_editor_saturation").val(vv.xaturation),vv.hasOwnProperty("gamma")&&$("#wpgmza_theme_editor_gamma").val(vv.gamma),vv.hasOwnProperty("invert_lightness")&&$("#wpgmza_theme_editor_do_invert_lightness").prop("checked",!0),vv.hasOwnProperty("visibility")&&$("#wpgmza_theme_editor_visibility").val(vv.visibility),vv.hasOwnProperty("color")&&($("#wpgmza_theme_editor_do_color").prop("checked",!0),$("#wpgmza_theme_editor_color").val(vv.color)),vv.hasOwnProperty("weight")&&$("#wpgmza_theme_editor_weight").val(vv.weight)})})},WPGMZA.ThemeEditor.prototype.writeElementStylers=function(){var feature=$("#wpgmza_theme_editor_feature").val(),element=$("#wpgmza_theme_editor_element").val(),indexJSON=null,stylers=[];if("inherit"!=$("#wpgmza_theme_editor_visibility").val()&&stylers.push({visibility:$("#wpgmza_theme_editor_visibility").val()}),!0===$("#wpgmza_theme_editor_do_color").prop("checked")&&stylers.push({color:$("#wpgmza_theme_editor_color").val()}),!0===$("#wpgmza_theme_editor_do_hue").prop("checked")&&stylers.push({hue:$("#wpgmza_theme_editor_hue").val()}),0<$("#wpgmza_theme_editor_gamma").val().length&&stylers.push({gamma:parseFloat($("#wpgmza_theme_editor_gamma").val())}),0<$("#wpgmza_theme_editor_weight").val().length&&stylers.push({weight:parseFloat($("#wpgmza_theme_editor_weight").val())}),0<$("#wpgmza_theme_editor_saturation").val().length&&stylers.push({saturation:parseFloat($("#wpgmza_theme_editor_saturation").val())}),0<$("#wpgmza_theme_editor_lightness").val().length&&stylers.push({lightness:parseFloat($("#wpgmza_theme_editor_lightness").val())}),!0===$("#wpgmza_theme_editor_do_invert_lightness").prop("checked")&&stylers.push({invert_lightness:!0}),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")&&v.featureType==feature||"all"==feature&&!v.hasOwnProperty("featureType"))&&(v.hasOwnProperty("elementType")&&v.elementType==element||"all"==element&&!v.hasOwnProperty("elementType"))&&(indexJSON=i)}),null===indexJSON){if(0<stylers.length){var new_feature_element_stylers={};"all"!=feature&&(new_feature_element_stylers.featureType=feature),"all"!=element&&(new_feature_element_stylers.elementType=element),new_feature_element_stylers.stylers=stylers,this.json.push(new_feature_element_stylers)}}else 0<stylers.length?this.json[indexJSON].stylers=stylers:this.json.splice(indexJSON,1);$('textarea[name="wpgmza_theme_data"]').val(JSON.stringify(this.json).replace(/:/g,": ").replace(/,/g,", ")),this.highlightFeatures(),this.highlightElements(),WPGMZA.themePanel.updateMapTheme()},WPGMZA.ThemeEditor.prototype.initHTML=function(){var self=this;$.each(WPGMZA.ThemeEditor.features,function(i,v){$("#wpgmza_theme_editor_feature").append('<option value="'+i+'">'+i+"</option>"),0<v.length&&$.each(v,function(ii,vv){$("#wpgmza_theme_editor_feature").append('<option value="'+i+"."+vv+'">'+i+"."+vv+"</option>")})}),$.each(WPGMZA.ThemeEditor.elements,function(i,v){$("#wpgmza_theme_editor_element").append('<option value="'+i+'">'+i+"</option>"),0<v.length&&$.each(v,function(ii,vv){$("#wpgmza_theme_editor_element").append('<option value="'+i+"."+vv+'">'+i+"."+vv+"</option>")})}),this.parse(),$('textarea[name="wpgmza_theme_data"]').on("input selectionchange propertychange",function(){self.parse()}),$(".wpgmza_theme_selection").click(function(){setTimeout(function(){$('textarea[name="wpgmza_theme_data"]').trigger("input")},1e3)}),$("#wpgmza_theme_editor_feature").on("change",function(){self.highlightElements(),self.loadElementStylers()}),$("#wpgmza_theme_editor_element").on("change",function(){self.loadElementStylers()}),$("#wpgmza_theme_editor_do_hue, #wpgmza_theme_editor_hue, #wpgmza_theme_editor_lightness, #wpgmza_theme_editor_saturation, #wpgmza_theme_editor_gamma, #wpgmza_theme_editor_do_invert_lightness, #wpgmza_theme_editor_visibility, #wpgmza_theme_editor_do_color, #wpgmza_theme_editor_color, #wpgmza_theme_editor_weight").on("input selectionchange propertychange",function(){self.writeElementStylers()}),"open-layers"==WPGMZA.settings.engine&&$("#wpgmza_theme_editor :input").prop("disabled",!0)}}),jQuery(function($){WPGMZA.ThemePanel=function(){var self=this;this.element=$("#wpgmza-theme-panel"),this.map=WPGMZA.maps[0],this.element.length?($("#wpgmza-theme-presets").owlCarousel({items:5,dots:!0}),this.element.on("click","#wpgmza-theme-presets label",function(event){self.onThemePresetClick(event)}),$("#wpgmza-open-theme-editor").on("click",function(event){$("#wpgmza-map-theme-editor__holder").addClass("active"),$("#wpgmza-theme-editor").addClass("active"),WPGMZA.animateScroll($("#wpgmza-theme-editor"))}),WPGMZA.themePanel=this):console.warn("No element to initialise theme panel on")},WPGMZA.ThemePanel.previewImageCenter={lat:33.701806462148646,lng:-118.15949896058983},WPGMZA.ThemePanel.previewImageZoom=11,WPGMZA.ThemePanel.prototype.onThemePresetClick=function(event){var selectedData=$(event.currentTarget).find("[data-theme-json]").attr("data-theme-json"),textarea=$(this.element).find("textarea[name='wpgmza_theme_data']"),existingData=textarea.val(),allPresetData=[];$(this.element).find("[data-theme-json]").each(function(index,el){allPresetData.push($(el).attr("data-theme-json"))}),existingData.length&&-1==allPresetData.indexOf(existingData)&&!confirm(WPGMZA.localized_strings.overwrite_theme_data)||(textarea.val(selectedData),this.updateMapTheme(),WPGMZA.themeEditor.parse())},WPGMZA.ThemePanel.prototype.updateMapTheme=function(){var data;try{data=JSON.parse($("textarea[name='wpgmza_theme_data']").val())}catch(e){return void alert(WPGMZA.localized_strings.invalid_theme_data)}this.map.setOptions({styles:data})}}),jQuery(function($){WPGMZA.Version=function(){},WPGMZA.Version.GREATER_THAN=1,WPGMZA.Version.EQUAL_TO=0,WPGMZA.Version.LESS_THAN=-1,WPGMZA.Version.compare=function(v1,v2){for(var v1parts=v1.match(/\d+/g),v2parts=v2.match(/\d+/g),i=0;i<v1parts.length;++i){if(v2parts.length===i)return 1;if(v1parts[i]!==v2parts[i])return v1parts[i]>v2parts[i]?1:-1}return v1parts.length!=v2parts.length?-1:0}}),jQuery(function($){$(window).on("load",function(event){var parent=document.body.onclick;parent&&(document.body.onclick=function(event){event.target instanceof WPGMZA.Marker||parent(event)})})}),jQuery(function($){WPGMZA.GoogleUICompatibility=function(){if(!(navigator.vendor&&-1<navigator.vendor.indexOf("Apple")&&navigator.userAgent&&-1==navigator.userAgent.indexOf("CriOS")&&-1==navigator.userAgent.indexOf("FxiOS"))){var style=$("<style id='wpgmza-google-ui-compatiblity-fix'/>");style.html(".wpgmza_map img:not(button img) { padding:0 !important; }"),$(document.head).append(style)}},WPGMZA.googleUICompatibility=new WPGMZA.GoogleUICompatibility}),jQuery(function($){WPGMZA.DataTable=function(element){var self=this;if(!$.fn.dataTable)return console.warn("The dataTables library is not loaded. Cannot create a dataTable. Did you enable 'Do not enqueue dataTables'?"),void(WPGMZA.settings.wpgmza_do_not_enqueue_datatables&&WPGMZA.getCurrentPage()==WPGMZA.PAGE_MAP_EDIT&&alert("You have selected 'Do not enqueue DataTables' in WP Google Maps' settings. No 3rd party software is loading the DataTables library. Because of this, the marker table cannot load. Please uncheck this option to use the marker table."));if($.fn.dataTable.ext)$.fn.dataTable.ext.errMode="throw";else{var version=$.fn.dataTable.version?$.fn.dataTable.version:"unknown";console.warn("You appear to be running an outdated or modified version of the dataTables library. This may cause issues with table functionality. This is usually caused by 3rd party software loading an older version of DataTables. The loaded version is "+version+", we recommend version 1.10.12 or above.")}this.element=element,(this.element.wpgmzaDataTable=this).dataTableElement=this.getDataTableElement();var settings=this.getDataTableSettings();this.phpClass=$(element).attr("data-wpgmza-php-class"),(this.wpgmzaDataTable=this).useCompressedPathVariable=WPGMZA.restAPI.isCompressedPathVariableSupported&&WPGMZA.settings.enable_compressed_path_variables,this.method=this.useCompressedPathVariable?"GET":"POST",null==this.getLanguageURL()||"//cdn.datatables.net/plug-ins/1.10.12/i18n/English.json"==this.getLanguageURL()?(this.dataTable=$(this.dataTableElement).DataTable(settings),this.dataTable.ajax.reload()):$.ajax(this.getLanguageURL(),{success:function(response,status,xhr){self.languageJSON=response,self.dataTable=$(self.dataTableElement).DataTable(settings),self.dataTable.ajax.reload()},error:function(){self.dataTable=$(self.dataTableElement).DataTable(settings),self.dataTable.ajax.reload()}})},WPGMZA.DataTable.prototype.getDataTableElement=function(){return $(this.element).find("table")},WPGMZA.DataTable.prototype.onAJAXRequest=function(data,settings){var params={phpClass:this.phpClass},attr=$(this.element).attr("data-wpgmza-ajax-parameters");return attr&&$.extend(params,JSON.parse(attr)),$.extend(data,params)},WPGMZA.DataTable.prototype.onDataTableAjaxRequest=function(data,callback,settings){var self=this,element=this.element,route=$(element).attr("data-wpgmza-rest-api-route"),params=this.onAJAXRequest(data,settings),draw=params.draw;if(delete params.draw,!route)throw new Error("No data-wpgmza-rest-api-route attribute specified");var options={method:"POST",useCompressedPathVariable:!0,data:params,dataType:"json",cache:!this.preventCaching,beforeSend:function(xhr){xhr.setRequestHeader("X-DataTables-Draw",draw)},success:function(response,status,xhr){response.draw=draw,self.lastResponse=response,callback(response),self.onAJAXResponse(response)}};return WPGMZA.restAPI.call(route,options)},WPGMZA.DataTable.prototype.getDataTableSettings=function(){var self=this,element=this.element,options={};$(element).attr("data-wpgmza-datatable-options")&&(options=JSON.parse($(element).attr("data-wpgmza-datatable-options"))),options.deferLoading=!0,options.processing=!0,options.serverSide=!0,options.ajax=function(data,callback,settings){return WPGMZA.DataTable.prototype.onDataTableAjaxRequest.apply(self,arguments)},WPGMZA.AdvancedTableDataTable&&this instanceof WPGMZA.AdvancedTableDataTable&&WPGMZA.settings.wpgmza_default_items&&(options.iDisplayLength=parseInt(WPGMZA.settings.wpgmza_default_items)),options.aLengthMenu=[[5,10,25,50,100,-1],["5","10","25","50","100",WPGMZA.localized_strings.all]];var languageURL=this.getLanguageURL();return languageURL&&(options.language={url:languageURL}),options},WPGMZA.DataTable.prototype.getLanguageURL=function(){if(!WPGMZA.locale)return null;var languageURL;switch(WPGMZA.locale.substr(0,2)){case"af":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Afrikaans.json";break;case"sq":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Albanian.json";break;case"am":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Amharic.json";break;case"ar":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Arabic.json";break;case"hy":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Armenian.json";break;case"az":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Azerbaijan.json";break;case"bn":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Bangla.json";break;case"eu":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Basque.json";break;case"be":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Belarusian.json";break;case"bg":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Bulgarian.json";break;case"ca":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Catalan.json";break;case"zh":languageURL="zh_TW"==WPGMZA.locale?WPGMZA.pluginDirURL+"languages/datatables/Chinese-traditional.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Chinese.json";break;case"hr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Croatian.json";break;case"cs":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Czech.json";break;case"da":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Danish.json";break;case"nl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Dutch.json";break;case"et":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Estonian.json";break;case"fi":languageURL=WPGMZA.locale.match(/^fil/)?WPGMZA.pluginDirURL+"languages/datatables/Filipino.json":WPGMZA.pluginDirURL+"languages/datatables/Finnish.json";break;case"fr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/French.json";break;case"gl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Galician.json";break;case"ka":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Georgian.json";break;case"de":languageURL=WPGMZA.pluginDirURL+"languages/datatables/German.json";break;case"el":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Greek.json";break;case"gu":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Gujarati.json";break;case"he":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Hebrew.json";break;case"hi":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Hindi.json";break;case"hu":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Hungarian.json";break;case"is":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Icelandic.json";break;case"id":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Indonesian.json";break;case"ga":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Irish.json";break;case"it":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Italian.json";break;case"ja":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Japanese.json";break;case"kk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Kazakh.json";break;case"ko":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Korean.json";break;case"ky":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Kyrgyz.json";break;case"lv":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Latvian.json";break;case"lt":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Lithuanian.json";break;case"mk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Macedonian.json";break;case"ml":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Malay.json";break;case"mn":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Mongolian.json";break;case"ne":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Nepali.json";break;case"nb":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Norwegian-Bokmal.json";break;case"nn":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Norwegian-Nynorsk.json";break;case"ps":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Pashto.json";break;case"fa":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Persian.json";break;case"pl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Polish.json";break;case"pt":languageURL="pt_BR"==WPGMZA.locale?WPGMZA.pluginDirURL+"languages/datatables/Portuguese-Brasil.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Portuguese.json";break;case"ro":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Romanian.json";break;case"ru":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Russian.json";break;case"sr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Serbian.json";break;case"si":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Sinhala.json";break;case"sk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Slovak.json";break;case"sl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Slovenian.json";break;case"es":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Spanish.json";break;case"sw":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Swahili.json";break;case"sv":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Swedish.json";break;case"ta":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Tamil.json";break;case"te":languageURL=WPGMZA.pluginDirURL+"languages/datatables/telugu.json";break;case"th":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Thai.json";break;case"tr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Turkish.json";break;case"uk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Ukrainian.json";break;case"ur":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Urdu.json";break;case"uz":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Uzbek.json";break;case"vi":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Vietnamese.json";break;case"cy":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Welsh.json"}return languageURL},WPGMZA.DataTable.prototype.onAJAXResponse=function(response){},WPGMZA.DataTable.prototype.reload=function(){this.dataTable.ajax.reload(null,!1)}}),jQuery(function($){WPGMZA.AdminMarkerDataTable=function(element){var self=this;this.preventCaching=!0,WPGMZA.DataTable.call(this,element),$(element).on("click","[data-delete-marker-id]",function(event){self.onDeleteMarker(event)}),$(element).find(".wpgmza.select_all_markers").on("click",function(event){self.onSelectAll(event)}),$(element).find(".wpgmza.bulk_delete").on("click",function(event){self.onBulkDelete(event)}),$(element).on("click","[data-center-marker-id]",function(event){self.onCenterMarker(event)})},WPGMZA.AdminMarkerDataTable.prototype=Object.create(WPGMZA.DataTable.prototype),WPGMZA.AdminMarkerDataTable.prototype.constructor=WPGMZA.AdminMarkerDataTable,WPGMZA.AdminMarkerDataTable.createInstance=function(element){return new WPGMZA.AdminMarkerDataTable(element)},WPGMZA.AdminMarkerDataTable.prototype.getDataTableSettings=function(){var self=this,options=WPGMZA.DataTable.prototype.getDataTableSettings.call(this);return options.createdRow=function(row,data,index){var meta=self.lastResponse.meta[index];row.wpgmzaMarkerData=meta},options},WPGMZA.AdminMarkerDataTable.prototype.onEditMarker=function(event){WPGMZA.animatedScroll("#wpgmaps_tabs_markers")},WPGMZA.AdminMarkerDataTable.prototype.onDeleteMarker=function(event){var self=this,id=$(event.currentTarget).attr("data-delete-marker-id"),data={action:"delete_marker",security:WPGMZA.legacyajaxnonce,map_id:WPGMZA.mapEditPage.map.id,marker_id:id};$.post(ajaxurl,data,function(response){WPGMZA.mapEditPage.map.removeMarkerByID(id),self.reload()})},WPGMZA.AdminMarkerDataTable.prototype.onApproveMarker=function(event){var cur_id=$(this).attr("id"),data={action:"approve_marker",security:WPGMZA.legacyajaxnonce,map_id:WPGMZA.mapEditPage.map.id,marker_id:cur_id};$.post(ajaxurl,data,function(response){wpgmza_InitMap(),wpgmza_reinitialisetbl()})},WPGMZA.AdminMarkerDataTable.prototype.onSelectAll=function(event){$(this.element).find("input[name='mark']").prop("checked",!0)},WPGMZA.AdminMarkerDataTable.prototype.onBulkDelete=function(event){var self=this,ids=[],map=WPGMZA.maps[0];$(this.element).find("input[name='mark']:checked").each(function(index,el){var row=$(el).closest("tr")[0];ids.push(row.wpgmzaMarkerData.id)}),ids.forEach(function(marker_id){var marker=map.getMarkerByID(marker_id);marker&&map.removeMarker(marker)}),WPGMZA.restAPI.call("/markers/",{method:"DELETE",data:{ids:ids},complete:function(){self.reload()}})},WPGMZA.AdminMarkerDataTable.prototype.onCenterMarker=function(event){var id;id=null==event.currentTarget?event:$(event.currentTarget).attr("data-center-marker-id");var marker=WPGMZA.mapEditPage.map.getMarkerByID(id);if(marker){var latLng=new WPGMZA.LatLng({lat:marker.lat,lng:marker.lng});WPGMZA.mapEditPage.map.setCenter(latLng),WPGMZA.mapEditPage.map.setZoom(6),WPGMZA.animateScroll("#wpgmaps_tabs_markers")}},$(document).ready(function(event){$("[data-wpgmza-admin-marker-datatable]").each(function(index,el){WPGMZA.adminMarkerDataTable=WPGMZA.AdminMarkerDataTable.createInstance(el)})})}),jQuery(function($){WPGMZA.Integration={},WPGMZA.integrationModules={}}),jQuery(function($){if(window.wp&&wp.i18n&&wp.blocks&&wp.editor&&wp.components){var __=wp.i18n.__,registerBlockType=wp.blocks.registerBlockType,_wp$editor=wp.editor,InspectorControls=_wp$editor.InspectorControls,_wp$components=(_wp$editor.BlockControls,wp.components),Dashicon=_wp$components.Dashicon,PanelBody=(_wp$components.Toolbar,_wp$components.Button,_wp$components.Tooltip,_wp$components.PanelBody);_wp$components.TextareaControl,_wp$components.CheckboxControl,_wp$components.TextControl,_wp$components.SelectControl,_wp$components.RichText;WPGMZA.Integration.Gutenberg=function(){registerBlockType("gutenberg-wpgmza/block",this.getBlockDefinition())},WPGMZA.Integration.Gutenberg.prototype.getBlockTitle=function(){return __("WP Google Maps")},WPGMZA.Integration.Gutenberg.prototype.getBlockInspectorControls=function(props){return React.createElement(InspectorControls,{key:"inspector"},React.createElement(PanelBody,{title:__("Map Settings")},React.createElement("p",{class:"map-block-gutenberg-button-container"},React.createElement("a",{href:WPGMZA.adminurl+"admin.php?page=wp-google-maps-menu&action=edit&map_id=1",target:"_blank",class:"button button-primary"},React.createElement("i",{class:"fa fa-pencil-square-o","aria-hidden":"true"}),__("Go to Map Editor"))),React.createElement("p",{class:"map-block-gutenberg-button-container"},React.createElement("a",{href:"https://www.wpgmaps.com/documentation/creating-your-first-map/",target:"_blank",class:"button button-primary"},React.createElement("i",{class:"fa fa-book","aria-hidden":"true"}),__("View Documentation")))))},WPGMZA.Integration.Gutenberg.prototype.getBlockAttributes=function(){return{}},WPGMZA.Integration.Gutenberg.prototype.getBlockDefinition=function(props){var _this=this;return{title:__("WP Google Maps"),description:__("The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss."),category:"common",icon:"location-alt",keywords:[__("Map"),__("Maps"),__("Google")],attributes:this.getBlockAttributes(),edit:function(props){return[!!props.isSelected&&_this.getBlockInspectorControls(props),React.createElement("div",{className:props.className+" wpgmza-gutenberg-block"},React.createElement(Dashicon,{icon:"location-alt"}),React.createElement("span",{class:"wpgmza-gutenberg-block-title"},__("Your map will appear here on your websites front end")))]},save:function(){return null}}},WPGMZA.Integration.Gutenberg.getConstructor=function(){return WPGMZA.Integration.Gutenberg},WPGMZA.Integration.Gutenberg.createInstance=function(){return new(WPGMZA.Integration.Gutenberg.getConstructor())},WPGMZA.isProVersion()||/^6/.test(WPGMZA.pro_version)||(WPGMZA.integrationModules.gutenberg=WPGMZA.Integration.Gutenberg.createInstance())}}),jQuery(function($){var Parent=WPGMZA.Circle;WPGMZA.OLCircle=function(options,olFeature){this.center={lat:0,lng:0},this.radius=0,this.fillcolor="#ff0000",this.opacity=.6,Parent.call(this,options,olFeature),this.olStyle=new ol.style.Style(this.getStyleFromSettings()),this.vectorLayer3857=this.layer=new ol.layer.Vector({source:new ol.source.Vector,style:this.olStyle}),olFeature?this.olFeature=olFeature:this.recreate()},WPGMZA.OLCircle.prototype=Object.create(Parent.prototype),WPGMZA.OLCircle.prototype.constructor=WPGMZA.OLCircle,WPGMZA.OLCircle.prototype.recreate=function(){if(this.olFeature&&(this.layer.getSource().removeFeature(this.olFeature),delete this.olFeature),this.center&&this.radius){var x,y,radius=1e3*parseFloat(this.radius)/2;x=this.center.lng,y=this.center.lat;var circle3857=ol.geom.Polygon.circular([x,y],radius,64).clone().transform("EPSG:4326","EPSG:3857");this.olFeature=new ol.Feature(circle3857),this.layer.getSource().addFeature(this.olFeature)}},WPGMZA.OLCircle.prototype.getStyleFromSettings=function(){var params={};return this.opacity&&(params.fill=new ol.style.Fill({color:WPGMZA.hexOpacityToRGBA(this.fillColor,this.opacity)})),params},WPGMZA.OLCircle.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLCircle.prototype.setVisible=function(visible){this.layer.setVisible(!!visible)},WPGMZA.OLCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.recreate()},WPGMZA.OLCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments),this.recreate()}}),jQuery(function($){WPGMZA.OLGeocoder=function(){},WPGMZA.OLGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.OLGeocoder.prototype.constructor=WPGMZA.OLGeocoder,WPGMZA.OLGeocoder.prototype.getResponseFromCache=function(query,callback){WPGMZA.restAPI.call("/geocode-cache",{data:{query:JSON.stringify(query)},success:function(response,xhr,status){response.lng=response.lon,callback(response)},useCompressedPathVariable:!0})},WPGMZA.OLGeocoder.prototype.getResponseFromNominatim=function(options,callback){var data={q:options.address,format:"json"};options.componentRestrictions&&options.componentRestrictions.country&&(data.countrycodes=options.componentRestrictions.country),$.ajax("https://nominatim.openstreetmap.org/search/",{data:data,success:function(response,xhr,status){callback(response)},error:function(response,xhr,status){callback(null,WPGMZA.Geocoder.FAIL)}})},WPGMZA.OLGeocoder.prototype.cacheResponse=function(query,response){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_store_nominatim_cache",query:JSON.stringify(query),response:JSON.stringify(response)},method:"POST"})},WPGMZA.OLGeocoder.prototype.clearCache=function(callback){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_clear_nominatim_cache"},method:"POST",success:function(response){callback(response)}})},WPGMZA.OLGeocoder.prototype.getLatLngFromAddress=function(options,callback){return WPGMZA.OLGeocoder.prototype.geocode(options,callback)},WPGMZA.OLGeocoder.prototype.getAddressFromLatLng=function(options,callback){return WPGMZA.OLGeocoder.prototype.geocode(options,callback)},WPGMZA.OLGeocoder.prototype.geocode=function(options,callback){var self=this;if(!options)throw new Error("Invalid options");if(WPGMZA.LatLng.REGEXP.test(options.address)){var latLng=WPGMZA.LatLng.fromString(options.address);callback([{geometry:{location:latLng},latLng:latLng,lat:latLng.lat,lng:latLng.lng}],WPGMZA.Geocoder.SUCCESS)}else{var finish,location;if(options.location&&(options.latLng=new WPGMZA.LatLng(options.location)),options.address)location=options.address,finish=function(response,status){for(var i=0;i<response.length;i++)response[i].geometry={location:new WPGMZA.LatLng({lat:parseFloat(response[i].lat),lng:parseFloat(response[i].lon)})},response[i].latLng={lat:parseFloat(response[i].lat),lng:parseFloat(response[i].lon)},response[i].bounds=new WPGMZA.LatLngBounds(new WPGMZA.LatLng({lat:response[i].boundingbox[1],lng:response[i].boundingbox[2]}),new WPGMZA.LatLng({lat:response[i].boundingbox[0],lng:response[i].boundingbox[3]})),response[i].lng=response[i].lon;callback(response,status)};else{if(!options.latLng)throw new Error("You must supply either a latLng or address");location=options.latLng.toString(),finish=function(response,status){var address=response[0].display_name;callback([address],status)}}var query={location:location,options:options};this.getResponseFromCache(query,function(response){response.length?finish(response,WPGMZA.Geocoder.SUCCESS):self.getResponseFromNominatim($.extend(options,{address:location}),function(response,status){status!=WPGMZA.Geocoder.FAIL?0!=response.length?(finish(response,WPGMZA.Geocoder.SUCCESS),self.cacheResponse(query,response)):callback([],WPGMZA.Geocoder.ZERO_RESULTS):callback(null,WPGMZA.Geocoder.FAIL)})})}}}),jQuery(function($){var Parent;WPGMZA.OLInfoWindow=function(mapObject){var self=this;Parent.call(this,mapObject),this.element=$("<div class='wpgmza-infowindow ol-info-window-container ol-info-window-plain'></div>")[0],$(this.element).on("click",".ol-info-window-close",function(event){self.close()})},Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.OLInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.OLInfoWindow.prototype.constructor=WPGMZA.OLInfoWindow,Object.defineProperty(WPGMZA.OLInfoWindow.prototype,"isPanIntoViewAllowed",{get:function(){return!0}}),WPGMZA.OLInfoWindow.prototype.open=function(map,mapObject){var self=this,latLng=mapObject.getPosition();if(!Parent.prototype.open.call(this,map,mapObject))return!1;this.parent=map,this.overlay&&this.mapObject.map.olMap.removeOverlay(this.overlay),this.overlay=new ol.Overlay({element:this.element,stopEvent:!1}),this.overlay.setPosition(ol.proj.fromLonLat([latLng.lng,latLng.lat])),self.mapObject.map.olMap.addOverlay(this.overlay),$(this.element).show(),WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER&&WPGMZA.getImageDimensions(mapObject.getIcon(),function(size){$(self.element).css({left:Math.round(size.width/2)+"px"})}),this.trigger("infowindowopen"),this.trigger("domready")},WPGMZA.OLInfoWindow.prototype.close=function(event){$(this.element).hide(),this.overlay&&(WPGMZA.InfoWindow.prototype.close.call(this),this.trigger("infowindowclose"),this.mapObject.map.olMap.removeOverlay(this.overlay),this.overlay=null)},WPGMZA.OLInfoWindow.prototype.setContent=function(html){$(this.element).html("<i class='fa fa-times ol-info-window-close' aria-hidden='true'></i>"+html)},WPGMZA.OLInfoWindow.prototype.setOptions=function(options){options.maxWidth&&$(this.element).css({"max-width":options.maxWidth+"px"})},WPGMZA.OLInfoWindow.prototype.onOpen=function(){var self=this,imgs=$(this.element).find("img"),numImages=imgs.length,numImagesLoaded=0;if(WPGMZA.InfoWindow.prototype.onOpen.apply(this,arguments),this.isPanIntoViewAllowed){function inside(el,viewport){var a=$(el)[0].getBoundingClientRect(),b=$(viewport)[0].getBoundingClientRect();return a.left>=b.left&&a.left<=b.right&&a.right<=b.right&&a.right>=b.left&&a.top>=b.top&&a.top<=b.bottom&&a.bottom<=b.bottom&&a.bottom>=b.top}function panIntoView(){var offset=.45*-$(self.element).height();self.mapObject.map.animateNudge(0,offset,self.mapObject.getPosition())}imgs.each(function(index,el){el.onload=function(){++numImagesLoaded!=numImages||inside(self.element,self.mapObject.map.element)||panIntoView()}}),0!=numImages||inside(self.element,self.mapObject.map.element)||panIntoView()}}}),jQuery(function($){var Parent;WPGMZA.OLMap=function(element,options){var self=this;Parent.call(this,element),this.setOptions(options);var marker,viewOptions=this.settings.toOLViewOptions();$(this.element).html(""),this.olMap=new ol.Map({target:$(element)[0],layers:[this.getTileLayer()],view:new ol.View(viewOptions)}),this.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan?interaction.setActive("yes"!=self.settings.wpgmza_settings_map_draggable):interaction instanceof ol.interaction.DoubleClickZoom?interaction.setActive(!self.settings.wpgmza_settings_map_clickzoom):interaction instanceof ol.interaction.MouseWheelZoom&&interaction.setActive("yes"!=self.settings.wpgmza_settings_map_scroll)},this),"greedy"!=this.settings.wpgmza_force_greedy_gestures&&"yes"!=this.settings.wpgmza_force_greedy_gestures&&(this.gestureOverlay=$("<div class='wpgmza-gesture-overlay'></div>"),this.gestureOverlayTimeoutID=null,WPGMZA.isTouchDevice()||(this.olMap.on("wheel",function(event){if(!ol.events.condition.platformModifierKeyOnly(event))return self.showGestureOverlay(),event.originalEvent.preventDefault(),!1}),this.gestureOverlay.text(WPGMZA.localized_strings.use_ctrl_scroll_to_zoom))),this.olMap.getControls().forEach(function(control){control instanceof ol.control.Zoom&&"yes"==WPGMZA.settings.wpgmza_settings_map_zoom&&self.olMap.removeControl(control)},this),"yes"!=WPGMZA.settings.wpgmza_settings_map_full_screen_control&&this.olMap.addControl(new ol.control.FullScreen),WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER&&(this.markerLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[]})}),this.olMap.addLayer(this.markerLayer),this.olMap.on("click",function(event){var features=self.olMap.getFeaturesAtPixel(event.pixel);if(features&&features.length){var marker=features[0].wpgmzaMarker;marker&&(marker.trigger("click"),marker.trigger("select"))}})),this.olMap.on("movestart",function(event){self.isBeingDragged=!0}),this.olMap.on("moveend",function(event){self.wrapLongitude(),self.isBeingDragged=!1,self.dispatchEvent("dragend"),self.onIdle()}),this.olMap.getView().on("change:resolution",function(event){self.dispatchEvent("zoom_changed"),self.dispatchEvent("zoomchanged"),setTimeout(function(){self.onIdle()},10)}),this.olMap.getView().on("change",function(){self.onBoundsChanged()}),self.onBoundsChanged(),this.storeLocator&&(marker=this.storeLocator.centerPointMarker)&&(this.olMap.addOverlay(marker.overlay),marker.setVisible(!1)),$(this.element).on("click contextmenu",function(event){var isRight;event=event||window.event;var latLng=self.pixelsToLatLng(event.offsetX,event.offsetY);if("which"in event?isRight=3==event.which:"button"in event&&(isRight=2==event.button),1!=event.which&&1!=event.button){if(isRight)return self.onRightClick(event)}else{if(self.isBeingDragged)return;if($(event.target).closest(".ol-marker").length)return;self.trigger({type:"click",latLng:latLng})}}),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}),$(this.element).trigger("wpgooglemaps_loaded"))},Parent=WPGMZA.isProVersion()?WPGMZA.ProMap:WPGMZA.Map,WPGMZA.OLMap.prototype=Object.create(Parent.prototype),WPGMZA.OLMap.prototype.constructor=WPGMZA.OLMap,WPGMZA.OLMap.prototype.getTileLayer=function(){var options={};return WPGMZA.settings.tile_server_url&&(options.url=WPGMZA.settings.tile_server_url),new ol.layer.Tile({source:new ol.source.OSM(options)})},WPGMZA.OLMap.prototype.wrapLongitude=function(){var transformed=ol.proj.transform(this.olMap.getView().getCenter(),"EPSG:3857","EPSG:4326"),center={lat:transformed[1],lng:transformed[0]};-180<=center.lng&&center.lng<=180||(center.lng=center.lng-360*Math.floor(center.lng/360),180<center.lng&&(center.lng-=360),this.setCenter(center))},WPGMZA.OLMap.prototype.getCenter=function(){var lonLat=ol.proj.toLonLat(this.olMap.getView().getCenter());return{lat:lonLat[1],lng:lonLat[0]}},WPGMZA.OLMap.prototype.setCenter=function(latLng){var view=this.olMap.getView();WPGMZA.Map.prototype.setCenter.call(this,latLng),view.setCenter(ol.proj.fromLonLat([latLng.lng,latLng.lat])),this.wrapLongitude(),this.onBoundsChanged()},WPGMZA.OLMap.prototype.getBounds=function(){var bounds=this.olMap.getView().calculateExtent(this.olMap.getSize()),nativeBounds=new WPGMZA.LatLngBounds,topLeft=ol.proj.toLonLat([bounds[0],bounds[1]]),bottomRight=ol.proj.toLonLat([bounds[2],bounds[3]]);return nativeBounds.north=topLeft[1],nativeBounds.south=bottomRight[1],nativeBounds.west=topLeft[0],nativeBounds.east=bottomRight[0],nativeBounds},WPGMZA.OLMap.prototype.fitBounds=function(southWest,northEast){if(southWest instanceof WPGMZA.LatLng&&(southWest={lat:southWest.lat,lng:southWest.lng}),northEast instanceof WPGMZA.LatLng)northEast={lat:northEast.lat,lng:northEast.lng};else if(southWest instanceof WPGMZA.LatLngBounds){var bounds=southWest;southWest={lat:bounds.south,lng:bounds.west},northEast={lat:bounds.north,lng:bounds.east}}var view=this.olMap.getView(),extent=ol.extent.boundingExtent([ol.proj.fromLonLat([parseFloat(southWest.lng),parseFloat(southWest.lat)]),ol.proj.fromLonLat([parseFloat(northEast.lng),parseFloat(northEast.lat)])]);view.fit(extent,this.olMap.getSize())},WPGMZA.OLMap.prototype.panTo=function(latLng,zoom){var view=this.olMap.getView(),options={center:ol.proj.fromLonLat([parseFloat(latLng.lng),parseFloat(latLng.lat)]),duration:500};1<arguments.length&&(options.zoom=parseInt(zoom)),view.animate(options)},WPGMZA.OLMap.prototype.getZoom=function(){return Math.round(this.olMap.getView().getZoom())},WPGMZA.OLMap.prototype.setZoom=function(value){this.olMap.getView().setZoom(value)},WPGMZA.OLMap.prototype.getMinZoom=function(){return this.olMap.getView().getMinZoom()},WPGMZA.OLMap.prototype.setMinZoom=function(value){this.olMap.getView().setMinZoom(value)},WPGMZA.OLMap.prototype.getMaxZoom=function(){return this.olMap.getView().getMaxZoom()},WPGMZA.OLMap.prototype.setMaxZoom=function(value){this.olMap.getView().setMaxZoom(value)},WPGMZA.OLMap.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),this.olMap&&this.olMap.getView().setProperties(this.settings.toOLViewOptions())},WPGMZA.OLMap.prototype.addMarker=function(marker){WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT?this.olMap.addOverlay(marker.overlay):(this.markerLayer.getSource().addFeature(marker.feature),marker.featureInSource=!0),Parent.prototype.addMarker.call(this,marker)},WPGMZA.OLMap.prototype.removeMarker=function(marker){WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT?this.olMap.removeOverlay(marker.overlay):(this.markerLayer.getSource().removeFeature(marker.feature),marker.featureInSource=!1),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.OLMap.prototype.addPolygon=function(polygon){this.olMap.addLayer(polygon.layer),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.OLMap.prototype.removePolygon=function(polygon){this.olMap.removeLayer(polygon.layer),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.OLMap.prototype.addPolyline=function(polyline){this.olMap.addLayer(polyline.layer),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.OLMap.prototype.removePolyline=function(polyline){this.olMap.removeLayer(polyline.layer),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.OLMap.prototype.addCircle=function(circle){this.olMap.addLayer(circle.layer),Parent.prototype.addCircle.call(this,circle)},WPGMZA.OLMap.prototype.removeCircle=function(circle){this.olMap.removeLayer(circle.layer),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.OLMap.prototype.addRectangle=function(rectangle){this.olMap.addLayer(rectangle.layer),Parent.prototype.addRectangle.call(this,rectangle)},WPGMZA.OLMap.prototype.removeRectangle=function(rectangle){this.olMap.removeLayer(rectangle.layer),Parent.prototype.removeRectangle.call(this,rectangle)},WPGMZA.OLMap.prototype.pixelsToLatLng=function(x,y){null==y&&("x"in x&&"y"in x?(y=x.y,x=x.x):console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)"));var coord=this.olMap.getCoordinateFromPixel([x,y]);if(!coord)return{x:null,y:null};var lonLat=ol.proj.toLonLat(coord);return{lat:lonLat[1],lng:lonLat[0]}},WPGMZA.OLMap.prototype.latLngToPixels=function(latLng){var coord=ol.proj.fromLonLat([latLng.lng,latLng.lat]),pixel=this.olMap.getPixelFromCoordinate(coord);return pixel?{x:pixel[0],y:pixel[1]}:{x:null,y:null}},WPGMZA.OLMap.prototype.enableBicycleLayer=function(value){if(value)this.bicycleLayer||(this.bicycleLayer=new ol.layer.Tile({source:new ol.source.OSM({url:"http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png"})})),this.olMap.addLayer(this.bicycleLayer);else{if(!this.bicycleLayer)return;this.olMap.removeLayer(this.bicycleLayer)}},WPGMZA.OLMap.prototype.showGestureOverlay=function(){var self=this;clearTimeout(this.gestureOverlayTimeoutID),$(this.gestureOverlay).stop().animate({opacity:"100"}),$(this.element).append(this.gestureOverlay),$(this.gestureOverlay).css({"line-height":$(this.element).height()+"px",opacity:"1.0"}),$(this.gestureOverlay).show(),this.gestureOverlayTimeoutID=setTimeout(function(){self.gestureOverlay.fadeOut(2e3)},2e3)},WPGMZA.OLMap.prototype.onElementResized=function(event){this.olMap.updateSize()},WPGMZA.OLMap.prototype.onRightClick=function(event){if($(event.target).closest(".ol-marker, .wpgmza_modern_infowindow, .wpgmza-modern-store-locator").length)return!0;var parentOffset=$(this.element).offset(),relX=event.pageX-parentOffset.left,relY=event.pageY-parentOffset.top,latLng=this.pixelsToLatLng(relX,relY);return this.trigger({type:"rightclick",latLng:latLng}),$(this.element).trigger({type:"rightclick",latLng:latLng}),event.preventDefault(),!1},WPGMZA.OLMap.prototype.enableAllInteractions=function(){this.olMap.getInteractions().forEach(function(interaction){(interaction instanceof ol.interaction.DragPan||interaction instanceof ol.interaction.DoubleClickZoom||interaction instanceof ol.interaction.MouseWheelZoom)&&interaction.setActive(!0)},this)}}),jQuery(function($){var Parent;WPGMZA.OLMarker=function(row){var self=this;Parent.call(this,row);var origin=ol.proj.fromLonLat([parseFloat(this.lng),parseFloat(this.lat)]);if(WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT){var img=$("<img alt=''/>")[0];img.onload=function(event){self.updateElementHeight(),self.map&&self.map.olMap.updateSize()},img.src=WPGMZA.defaultMarkerIcon,this.element=$("<div class='ol-marker'></div>")[0],$(this.element).attr("title",this.title),this.element.appendChild(img),this.element.wpgmzaMarker=this,$(this.element).on("mouseover",function(event){self.dispatchEvent("mouseover")}),this.overlay=new ol.Overlay({element:this.element,position:origin,positioning:"bottom-center",stopEvent:!1}),this.overlay.setPosition(origin),this.animation&&this.setAnimation(this.animation),this.setLabel(this.settings.label),row&&row.draggable&&this.setDraggable(!0),this.rebindClickListener()}else{if(WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)throw new Error("Invalid marker render mode");this.feature=new ol.Feature({geometry:new ol.geom.Point(origin)}),this.feature.setStyle(this.getVectorLayerStyle()),this.feature.wpgmzaMarker=this}this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.OLMarker.prototype=Object.create(Parent.prototype),WPGMZA.OLMarker.prototype.constructor=WPGMZA.OLMarker,WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT="element",WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER="vector",WPGMZA.OLMarker.renderMode=WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT,"open-layers"==WPGMZA.settings.engine&&WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER&&(WPGMZA.OLMarker.defaultVectorLayerStyle=new ol.style.Style({image:new ol.style.Icon({anchor:[.5,1],src:WPGMZA.defaultMarkerIcon})}),WPGMZA.OLMarker.hiddenVectorLayerStyle=new ol.style.Style({})),WPGMZA.OLMarker.prototype.getVectorLayerStyle=function(){return this.vectorLayerStyle?this.vectorLayerStyle:WPGMZA.OLMarker.defaultVectorLayerStyle},WPGMZA.OLMarker.prototype.updateElementHeight=function(height,calledOnFocus){var self=this;0!=(height=height||$(this.element).find("img").height())||calledOnFocus||$(window).one("focus",function(event){self.updateElementHeight(!1,!0)}),$(this.element).css({height:height+"px"})},WPGMZA.OLMarker.prototype.addLabel=function(){this.setLabel(this.getLabelText())},WPGMZA.OLMarker.prototype.setLabel=function(label){WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?label?(this.label||(this.label=$("<div class='ol-marker-label'/>"),$(this.element).append(this.label)),this.label.html(label)):this.label&&$(this.element).find(".ol-marker-label").remove():console.warn("Marker labels are not currently supported in Vector Layer rendering mode")},WPGMZA.OLMarker.prototype.getVisible=function(visible){if(WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)return"none"!=this.overlay.getElement().style.display},WPGMZA.OLMarker.prototype.setVisible=function(visible){if(Parent.prototype.setVisible.call(this,visible),WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)if(visible){var style=this.getVectorLayerStyle();this.feature.setStyle(style)}else this.feature.setStyle(null);else this.overlay.getElement().style.display=visible?"block":"none"},WPGMZA.OLMarker.prototype.setPosition=function(latLng){Parent.prototype.setPosition.call(this,latLng);var origin=ol.proj.fromLonLat([parseFloat(this.lng),parseFloat(this.lat)]);WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?this.feature.setGeometry(new ol.geom.Point(origin)):this.overlay.setPosition(origin)},WPGMZA.OLMarker.prototype.updateOffset=function(x,y){if(WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER){x=this._offset.x,y=this._offset.y;this.element.style.position="relative",this.element.style.left=x+"px",this.element.style.top=y+"px"}else console.warn("Marker offset is not currently supported in Vector Layer rendering mode")},WPGMZA.OLMarker.prototype.setAnimation=function(anim){if(WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)switch(Parent.prototype.setAnimation.call(this,anim),anim){case WPGMZA.Marker.ANIMATION_NONE:$(this.element).removeAttr("data-anim");break;case WPGMZA.Marker.ANIMATION_BOUNCE:$(this.element).attr("data-anim","bounce");break;case WPGMZA.Marker.ANIMATION_DROP:$(this.element).attr("data-anim","drop")}else console.warn("Marker animation is not currently supported in Vector Layer rendering mode")},WPGMZA.OLMarker.prototype.setDraggable=function(draggable){var self=this;if(WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)if(draggable){var options={disabled:!1};this.jQueryDraggableInitialized||(options.start=function(event){self.onDragStart(event)},options.stop=function(event){self.onDragEnd(event)}),$(this.element).draggable(options),this.jQueryDraggableInitialized=!0,this.rebindClickListener()}else $(this.element).draggable({disabled:!0});else console.warn("Marker dragging is not currently supported in Vector Layer rendering mode")},WPGMZA.OLMarker.prototype.setOpacity=function(opacity){WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?$(this.element).css({opacity:opacity}):console.warn("Marker opacity is not currently supported in Vector Layer rendering mode")},WPGMZA.OLMarker.prototype.onDragStart=function(event){this.isBeingDragged=!0,this.map.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan&&interaction.setActive(!1)})},WPGMZA.OLMarker.prototype.onDragEnd=function(event){var offset_top=parseFloat($(this.element).css("top").match(/-?\d+/)[0]),offset_left=parseFloat($(this.element).css("left").match(/-?\d+/)[0]);$(this.element).css({top:"0px",left:"0px"});var currentLatLng=this.getPosition(),pixelsBeforeDrag=this.map.latLngToPixels(currentLatLng),pixelsAfterDrag={x:pixelsBeforeDrag.x+offset_left,y:pixelsBeforeDrag.y+offset_top},latLngAfterDrag=this.map.pixelsToLatLng(pixelsAfterDrag);this.setPosition(latLngAfterDrag),this.isBeingDragged=!1,this.trigger({type:"dragend",latLng:latLngAfterDrag}),"yes"!=this.map.settings.wpgmza_settings_map_draggable&&this.map.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan&&interaction.setActive(!0)})},WPGMZA.OLMarker.prototype.onElementClick=function(event){var self=event.currentTarget.wpgmzaMarker;self.isBeingDragged||(self.dispatchEvent("click"),self.dispatchEvent("select"))},WPGMZA.OLMarker.prototype.rebindClickListener=function(){$(this.element).off("click",this.onElementClick),$(this.element).on("click",this.onElementClick)}}),jQuery(function($){WPGMZA.OLModernStoreLocatorCircle=function(map,settings){WPGMZA.ModernStoreLocatorCircle.call(this,map,settings)},WPGMZA.OLModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.OLModernStoreLocatorCircle.prototype.constructor=WPGMZA.OLModernStoreLocatorCircle,WPGMZA.OLModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this,mapElement=$(this.map.element),olViewportElement=mapElement.children(".ol-viewport");this.canvas=document.createElement("canvas"),this.canvas.className="wpgmza-ol-canvas-overlay",mapElement.append(this.canvas),this.renderFunction=function(event){self.canvas.width==olViewportElement.width()&&self.canvas.height==olViewportElement.height()||(self.canvas.width=olViewportElement.width(),self.canvas.height=olViewportElement.height(),$(this.canvas).css({width:olViewportElement.width()+"px",height:olViewportElement.height()+"px"})),self.draw()},this.map.olMap.on("postrender",this.renderFunction)},WPGMZA.OLModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvas.getContext(type)},WPGMZA.OLModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvas.width,height:this.canvas.height}},WPGMZA.OLModernStoreLocatorCircle.prototype.getCenterPixels=function(){return this.map.latLngToPixels(this.settings.center)},WPGMZA.OLModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){return{x:0,y:0}},WPGMZA.OLModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){var center=new WPGMZA.LatLng(this.settings.center),outer=new WPGMZA.LatLng(center);outer.moveByDistance(km,90);var centerPixels=this.map.latLngToPixels(center),outerPixels=this.map.latLngToPixels(outer);return Math.abs(outerPixels.x-centerPixels.x)},WPGMZA.OLModernStoreLocatorCircle.prototype.getScale=function(){return 1},WPGMZA.OLModernStoreLocatorCircle.prototype.destroy=function(){$(this.canvas).remove(),this.map.olMap.un("postrender",this.renderFunction),this.map=null,this.canvas=null}}),jQuery(function($){WPGMZA.OLModernStoreLocator=function(map_id){WPGMZA.ModernStoreLocator.call(this,map_id),(WPGMZA.isProVersion()?$(".wpgmza_map[data-map-id='"+map_id+"']"):$("#wpgmza_map")).append(this.element)},WPGMZA.OLModernStoreLocator.prototype=Object.create(WPGMZA.ModernStoreLocator),WPGMZA.OLModernStoreLocator.prototype.constructor=WPGMZA.OLModernStoreLocator}),jQuery(function($){var Parent;WPGMZA.OLPolygon=function(options,olFeature){if(Parent.call(this,options,olFeature),this.olStyle=new ol.style.Style,olFeature)this.olFeature=olFeature;else{var coordinates=[[]];if(options&&options.polydata){for(var paths=this.parseGeometry(options.polydata),i=0;i<paths.length;i++)coordinates[0].push(ol.proj.fromLonLat([parseFloat(paths[i].lng),parseFloat(paths[i].lat)]));this.olStyle=new ol.style.Style(this.getStyleFromSettings())}this.olFeature=new ol.Feature({geometry:new ol.geom.Polygon(coordinates)})}this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]}),style:this.olStyle}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaPolygon:this})},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.OLPolygon.prototype=Object.create(Parent.prototype),WPGMZA.OLPolygon.prototype.constructor=WPGMZA.OLPolygon,WPGMZA.OLPolygon.prototype.getStyleFromSettings=function(){var params={};return this.linecolor&&this.lineopacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA("#"+this.linecolor,this.lineopacity)})),this.opacity&&(params.fill=new ol.style.Fill({color:WPGMZA.hexOpacityToRGBA(this.fillcolor,this.opacity)})),params},WPGMZA.OLPolygon.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLPolygon.prototype.setEditable=function(editable){},WPGMZA.OLPolygon.prototype.toJSON=function(){var result=Parent.prototype.toJSON.call(this),coordinates=this.olFeature.getGeometry().getCoordinates()[0];result.points=[];for(var i=0;i<coordinates.length;i++){var lonLat=ol.proj.toLonLat(coordinates[i]),latLng={lat:lonLat[1],lng:lonLat[0]};result.points.push(latLng)}return result}}),jQuery(function($){var Parent;WPGMZA.OLPolyline=function(options,olFeature){if(WPGMZA.Polyline.call(this,options),this.olStyle=new ol.style.Style,olFeature)this.olFeature=olFeature;else{var coordinates=[];if(options&&(options.polydata||options.points)){var path;path=options.polydata?this.parseGeometry(options.polydata):options.points;for(var i=0;i<path.length;i++){if(!$.isNumeric(path[i].lat))throw new Error("Invalid latitude");if(!$.isNumeric(path[i].lng))throw new Error("Invalid longitude");coordinates.push(ol.proj.fromLonLat([parseFloat(path[i].lng),parseFloat(path[i].lat)]))}}var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.olFeature=new ol.Feature({geometry:new ol.geom.LineString(coordinates)})}this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]}),style:this.olStyle}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaPolyline:this})},Parent=WPGMZA.Polyline,WPGMZA.OLPolyline.prototype=Object.create(Parent.prototype),WPGMZA.OLPolyline.prototype.constructor=WPGMZA.OLPolyline,WPGMZA.OLPolyline.prototype.getStyleFromSettings=function(){var params={};return this.settings.strokeOpacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA(this.settings.strokeColor,this.settings.strokeOpacity),width:parseInt(this.settings.strokeWeight)})),params},WPGMZA.OLPolyline.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLPolyline.prototype.setEditable=function(editable){},WPGMZA.OLPolyline.prototype.setPoints=function(points){this.olFeature&&this.layer.getSource().removeFeature(this.olFeature);for(var coordinates=[],i=0;i<points.length;i++)coordinates.push(ol.proj.fromLonLat([parseFloat(points[i].lng),parseFloat(points[i].lat)]));this.olFeature=new ol.Feature({geometry:new ol.geom.LineString(coordinates)}),this.layer.getSource().addFeature(this.olFeature)},WPGMZA.OLPolyline.prototype.toJSON=function(){var result=Parent.prototype.toJSON.call(this),coordinates=this.olFeature.getGeometry().getCoordinates();result.points=[];for(var i=0;i<coordinates.length;i++){var lonLat=ol.proj.toLonLat(coordinates[i]),latLng={lat:lonLat[1],lng:lonLat[0]};result.points.push(latLng)}return result}}),jQuery(function($){WPGMZA.OLText=function(){}}),jQuery(function($){WPGMZA.GoogleCircle=function(options,googleCircle){var self=this;WPGMZA.Circle.call(this,options,googleCircle),googleCircle?this.googleCircle=googleCircle:(this.googleCircle=new google.maps.Circle,this.googleCircle.wpgmzaCircle=this),google.maps.event.addListener(this.googleCircle,"click",function(){self.dispatchEvent({type:"click"})}),options&&this.setOptions(options)},WPGMZA.GoogleCircle.prototype=Object.create(WPGMZA.Circle.prototype),WPGMZA.GoogleCircle.prototype.constructor=WPGMZA.GoogleCircle,WPGMZA.GoogleCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.googleCircle.setCenter(center)},WPGMZA.GoogleCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments),this.googleCircle.setRadius(1e3*parseFloat(radius))},WPGMZA.GoogleCircle.prototype.setVisible=function(visible){this.googleCircle.setVisible(!!visible)},WPGMZA.GoogleCircle.prototype.setOptions=function(options){var googleOptions={};delete(googleOptions=$.extend({},options)).map,delete googleOptions.center,options.center&&(googleOptions.center=new google.maps.LatLng({lat:parseFloat(options.center.lat),lng:parseFloat(options.center.lng)})),options.radius&&(googleOptions.radius=parseFloat(options.radius)),options.color&&(googleOptions.fillColor=options.color),options.opacity&&(googleOptions.fillOpacity=parseFloat(options.opacity),googleOptions.strokeOpacity=parseFloat(options.opacity)),this.googleCircle.setOptions(googleOptions),options.map&&options.map.addCircle(this)}}),jQuery(function($){WPGMZA.GoogleGeocoder=function(){WPGMZA.Geocoder.call(this)},WPGMZA.GoogleGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.GoogleGeocoder.prototype.constructor=WPGMZA.GoogleGeocoder,WPGMZA.GoogleGeocoder.prototype.getGoogleGeocoder=function(){return WPGMZA.CloudAPI&&WPGMZA.CloudAPI.isBeingUsed?new WPGMZA.CloudGeocoder:new google.maps.Geocoder},WPGMZA.GoogleGeocoder.prototype.getLatLngFromAddress=function(options,callback){if(!options||!options.address)throw new Error("No address specified");if(WPGMZA.isLatLngString(options.address))return WPGMZA.Geocoder.prototype.getLatLngFromAddress.call(this,options,callback);options.country&&(options.componentRestrictions={country:options.country}),this.getGoogleGeocoder().geocode(options,function(results,status){if(status==google.maps.GeocoderStatus.OK||status==WPGMZA.CloudGeocoder.SUCCESS){var latLng,location=results[0].geometry.location,bounds=null;latLng={lat:location.lat(),lng:location.lng()},(bounds=results[0].geometry.bounds)&&(bounds=bounds instanceof google.maps.LatLngBounds?WPGMZA.LatLngBounds.fromGoogleLatLngBounds(results[0].geometry.bounds):WPGMZA.LatLngBounds.fromGoogleLatLngBoundsLiteral(results[0].geometry.bounds)),callback(results=[{geometry:{location:latLng},latLng:latLng,lat:latLng.lat,lng:latLng.lng,bounds:bounds}],WPGMZA.Geocoder.SUCCESS)}else{var nativeStatus=WPGMZA.Geocoder.FAIL;status==google.maps.GeocoderStatus.ZERO_RESULTS&&(nativeStatus=WPGMZA.Geocoder.ZERO_RESULTS),callback(null,nativeStatus)}})},WPGMZA.GoogleGeocoder.prototype.getAddressFromLatLng=function(options,callback){if(!options||!options.latLng)throw new Error("No latLng specified");var latLng=new WPGMZA.LatLng(options.latLng),geocoder=this.getGoogleGeocoder();delete(options=$.extend(options,{location:{lat:latLng.lat,lng:latLng.lng}})).latLng,geocoder.geocode(options,function(results,status){"OK"!==status&&callback(null,WPGMZA.Geocoder.FAIL),results&&results.length||callback([],WPGMZA.Geocoder.NO_RESULTS),callback([results[0].formatted_address],WPGMZA.Geocoder.SUCCESS)})}}),jQuery(function($){WPGMZA.settings.engine&&"google-maps"!=WPGMZA.settings.engine||window.google&&window.google.maps&&(WPGMZA.GoogleHTMLOverlay=function(map){this.element=$("<div class='wpgmza-google-html-overlay'></div>"),this.visible=!0,this.position=new WPGMZA.LatLng,this.setMap(map.googleMap),this.wpgmzaMap=map},WPGMZA.GoogleHTMLOverlay.prototype=new google.maps.OverlayView,WPGMZA.GoogleHTMLOverlay.prototype.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(this.element[0])},WPGMZA.GoogleHTMLOverlay.prototype.onRemove=function(){this.element&&$(this.element).parent().length&&($(this.element).remove(),this.element=null)},WPGMZA.GoogleHTMLOverlay.prototype.draw=function(){this.updateElementPosition()},WPGMZA.GoogleHTMLOverlay.prototype.updateElementPosition=function(){var projection=this.getProjection();if(projection){var pixels=projection.fromLatLngToDivPixel(this.position.toGoogleLatLng());$(this.element).css({left:pixels.x,top:pixels.y})}})}),jQuery(function($){var Parent;WPGMZA.GoogleInfoWindow=function(mapObject){Parent.call(this,mapObject),this.setMapObject(mapObject)},WPGMZA.GoogleInfoWindow.Z_INDEX=99,Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.GoogleInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.GoogleInfoWindow.prototype.constructor=WPGMZA.GoogleInfoWindow,WPGMZA.GoogleInfoWindow.prototype.setMapObject=function(mapObject){mapObject instanceof WPGMZA.Marker?this.googleObject=mapObject.googleMarker:mapObject instanceof WPGMZA.Polygon?this.googleObject=mapObject.googlePolygon:mapObject instanceof WPGMZA.Polyline&&(this.googleObject=mapObject.googlePolyline)},WPGMZA.GoogleInfoWindow.prototype.createGoogleInfoWindow=function(){var self=this;this.googleInfoWindow||(this.googleInfoWindow=new google.maps.InfoWindow,this.googleInfoWindow.setZIndex(WPGMZA.GoogleInfoWindow.Z_INDEX),google.maps.event.addListener(this.googleInfoWindow,"domready",function(event){self.trigger("domready")}),google.maps.event.addListener(this.googleInfoWindow,"closeclick",function(event){self.state!=WPGMZA.InfoWindow.STATE_CLOSED&&(self.state=WPGMZA.InfoWindow.STATE_CLOSED,self.trigger("infowindowclose"))}))},WPGMZA.GoogleInfoWindow.prototype.open=function(map,mapObject){var self=this;if(!Parent.prototype.open.call(this,map,mapObject))return!1;this.parent=map,this.createGoogleInfoWindow(),this.setMapObject(mapObject),this.googleObject instanceof google.maps.Polygon||this.googleInfoWindow.open(this.mapObject.map.googleMap,this.googleObject);var intervalID,guid=WPGMZA.guid(),html="<div id='"+guid+"'>"+this.content+"</div>";return this.googleInfoWindow.setContent(html),intervalID=setInterval(function(event){div=$("#"+guid),div.length&&(clearInterval(intervalID),div[0].wpgmzaMapObject=self.mapObject,div.addClass("wpgmza-infowindow"),self.element=div[0],self.trigger("infowindowopen"))},50),!0},WPGMZA.GoogleInfoWindow.prototype.close=function(){this.googleInfoWindow&&(WPGMZA.InfoWindow.prototype.close.call(this),this.googleInfoWindow.close())},WPGMZA.GoogleInfoWindow.prototype.setContent=function(html){Parent.prototype.setContent.call(this,html),this.content=html,this.createGoogleInfoWindow(),this.googleInfoWindow.setContent(html)},WPGMZA.GoogleInfoWindow.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),this.createGoogleInfoWindow(),this.googleInfoWindow.setOptions(options)}}),jQuery(function($){var Parent;WPGMZA.GoogleMap=function(element,options){var self=this;if(Parent.call(this,element,options),!window.google){var status=WPGMZA.googleAPIStatus,message="Google API not loaded";if(status&&status.message&&(message+=" - "+status.message),"USER_CONSENT_NOT_GIVEN"==status.code)return;throw $(element).html("<div class='notice notice-error'><p>"+WPGMZA.localized_strings.google_api_not_loaded+"<pre>"+message+"</pre></p></div>"),new Error(message)}this.loadGoogleMap(),options&&this.setOptions(options,!0),google.maps.event.addListener(this.googleMap,"click",function(event){var wpgmzaEvent=new WPGMZA.Event("click");wpgmzaEvent.latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap,"rightclick",function(event){var wpgmzaEvent=new WPGMZA.Event("rightclick");wpgmzaEvent.latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap,"dragend",function(event){self.dispatchEvent("dragend")}),google.maps.event.addListener(this.googleMap,"zoom_changed",function(event){self.dispatchEvent("zoom_changed"),self.dispatchEvent("zoomchanged")}),google.maps.event.addListener(this.googleMap,"idle",function(event){self.onIdle(event)}),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}),$(this.element).trigger("wpgooglemaps_loaded"))},WPGMZA.isProVersion()?(Parent=WPGMZA.ProMap,WPGMZA.GoogleMap.prototype=Object.create(WPGMZA.ProMap.prototype)):(Parent=WPGMZA.Map,WPGMZA.GoogleMap.prototype=Object.create(WPGMZA.Map.prototype)),WPGMZA.GoogleMap.prototype.constructor=WPGMZA.GoogleMap,WPGMZA.GoogleMap.parseThemeData=function(raw){var json;try{json=JSON.parse(raw)}catch(e){try{json=eval(raw)}catch(e){var str=raw;str=str.replace(/\\'/g,"'"),str=str.replace(/\\"/g,'"'),str=str.replace(/\\0/g,"\0"),str=str.replace(/\\\\/g,"\\");try{json=eval(str)}catch(e){return console.warn("Couldn't parse theme data"),[]}}}return json},WPGMZA.GoogleMap.prototype.loadGoogleMap=function(){var self=this,options=this.settings.toGoogleMapsOptions();this.googleMap=new google.maps.Map(this.engineElement,options),google.maps.event.addListener(this.googleMap,"bounds_changed",function(){self.onBoundsChanged()}),1==this.settings.bicycle&&this.enableBicycleLayer(!0),1==this.settings.traffic&&this.enableTrafficLayer(!0),1==this.settings.transport&&this.enablePublicTransportLayer(!0),this.showPointsOfInterest(this.settings.show_point_of_interest),$(this.engineElement).append($(this.element).find(".wpgmza-loader"))},WPGMZA.GoogleMap.prototype.setOptions=function(options,initializing){if(Parent.prototype.setOptions.call(this,options),options.scrollwheel&&delete options.scrollwheel,initializing){var converted=$.extend(options,this.settings.toGoogleMapsOptions()),clone=$.extend({},converted);if(!clone.center instanceof google.maps.LatLng&&(clone.center instanceof WPGMZA.LatLng||"object"==typeof clone.center)&&(clone.center={lat:parseFloat(clone.center.lat),lng:parseFloat(clone.center.lng)}),"1"==this.settings.hide_point_of_interest){clone.styles||(clone.styles=[]),clone.styles.push({featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]})}this.googleMap.setOptions(clone)}else this.googleMap.setOptions(options)},WPGMZA.GoogleMap.prototype.addMarker=function(marker){marker.googleMarker.setMap(this.googleMap),Parent.prototype.addMarker.call(this,marker)},WPGMZA.GoogleMap.prototype.removeMarker=function(marker){marker.googleMarker.setMap(null),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.GoogleMap.prototype.addPolygon=function(polygon){polygon.googlePolygon.setMap(this.googleMap),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.GoogleMap.prototype.removePolygon=function(polygon){polygon.googlePolygon.setMap(null),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.GoogleMap.prototype.addPolyline=function(polyline){polyline.googlePolyline.setMap(this.googleMap),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.GoogleMap.prototype.removePolyline=function(polyline){polyline.googlePolyline.setMap(null),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.GoogleMap.prototype.addCircle=function(circle){circle.googleCircle.setMap(this.googleMap),Parent.prototype.addCircle.call(this,circle)},WPGMZA.GoogleMap.prototype.removeCircle=function(circle){circle.googleCircle.setMap(null),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.GoogleMap.prototype.addRectangle=function(rectangle){rectangle.googleRectangle.setMap(this.googleMap),Parent.prototype.addRectangle.call(this,rectangle)},WPGMZA.GoogleMap.prototype.removeRectangle=function(rectangle){rectangle.googleRectangle.setMap(null),Parent.prototype.removeRectangle.call(this,rectangle)},WPGMZA.GoogleMap.prototype.getCenter=function(){var latLng=this.googleMap.getCenter();return{lat:latLng.lat(),lng:latLng.lng()}},WPGMZA.GoogleMap.prototype.setCenter=function(latLng){WPGMZA.Map.prototype.setCenter.call(this,latLng),latLng instanceof WPGMZA.LatLng?this.googleMap.setCenter({lat:latLng.lat,lng:latLng.lng}):this.googleMap.setCenter(latLng)},WPGMZA.GoogleMap.prototype.panTo=function(latLng){latLng instanceof WPGMZA.LatLng?this.googleMap.panTo({lat:latLng.lat,lng:latLng.lng}):this.googleMap.panTo(latLng)},WPGMZA.GoogleMap.prototype.getZoom=function(){return this.googleMap.getZoom()},WPGMZA.GoogleMap.prototype.setZoom=function(value){if(isNaN(value))throw new Error("Value must not be NaN");return this.googleMap.setZoom(parseInt(value))},WPGMZA.GoogleMap.prototype.getBounds=function(){var bounds=this.googleMap.getBounds(),northEast=bounds.getNorthEast(),southWest=bounds.getSouthWest(),nativeBounds=new WPGMZA.LatLngBounds({});return nativeBounds.north=northEast.lat(),nativeBounds.south=southWest.lat(),nativeBounds.west=southWest.lng(),nativeBounds.east=northEast.lng(),nativeBounds.topLeft={lat:northEast.lat(),lng:southWest.lng()},nativeBounds.bottomRight={lat:southWest.lat(),lng:northEast.lng()},nativeBounds},WPGMZA.GoogleMap.prototype.fitBounds=function(southWest,northEast){if(southWest instanceof WPGMZA.LatLng&&(southWest={lat:southWest.lat,lng:southWest.lng}),northEast instanceof WPGMZA.LatLng)northEast={lat:northEast.lat,lng:northEast.lng};else if(southWest instanceof WPGMZA.LatLngBounds){var bounds=southWest;southWest={lat:bounds.south,lng:bounds.west},northEast={lat:bounds.north,lng:bounds.east}}var nativeBounds=new google.maps.LatLngBounds(southWest,northEast);this.googleMap.fitBounds(nativeBounds)},WPGMZA.GoogleMap.prototype.fitBoundsToVisibleMarkers=function(){for(var bounds=new google.maps.LatLngBounds,i=0;i<this.markers.length;i++)markers[i].getVisible()&&bounds.extend(markers[i].getPosition());this.googleMap.fitBounds(bounds)},WPGMZA.GoogleMap.prototype.enableBicycleLayer=function(enable){this.bicycleLayer||(this.bicycleLayer=new google.maps.BicyclingLayer),this.bicycleLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.enableTrafficLayer=function(enable){this.trafficLayer||(this.trafficLayer=new google.maps.TrafficLayer),this.trafficLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.enablePublicTransportLayer=function(enable){this.publicTransportLayer||(this.publicTransportLayer=new google.maps.TransitLayer),this.publicTransportLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.showPointsOfInterest=function(show){var text=$("textarea[name='theme_data']").val();if(text){var styles=JSON.parse(text);styles.push({featureType:"poi",stylers:[{visibility:show?"on":"off"}]}),this.googleMap.setOptions({styles:styles})}},WPGMZA.GoogleMap.prototype.getMinZoom=function(){return parseInt(this.settings.min_zoom)},WPGMZA.GoogleMap.prototype.setMinZoom=function(value){this.googleMap.setOptions({minZoom:value,maxZoom:this.getMaxZoom()})},WPGMZA.GoogleMap.prototype.getMaxZoom=function(){return parseInt(this.settings.max_zoom)},WPGMZA.GoogleMap.prototype.setMaxZoom=function(value){this.googleMap.setOptions({minZoom:this.getMinZoom(),maxZoom:value})},WPGMZA.GoogleMap.prototype.latLngToPixels=function(latLng){var map=this.googleMap,nativeLatLng=new google.maps.LatLng({lat:parseFloat(latLng.lat),lng:parseFloat(latLng.lng)}),topRight=map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()),bottomLeft=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()),scale=Math.pow(2,map.getZoom()),worldPoint=map.getProjection().fromLatLngToPoint(nativeLatLng);return{x:(worldPoint.x-bottomLeft.x)*scale,y:(worldPoint.y-topRight.y)*scale}},WPGMZA.GoogleMap.prototype.pixelsToLatLng=function(x,y){null==y&&("x"in x&&"y"in x?(y=x.y,x=x.x):console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)"));var map=this.googleMap,topRight=map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()),bottomLeft=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()),scale=Math.pow(2,map.getZoom()),worldPoint=new google.maps.Point(x/scale+bottomLeft.x,y/scale+topRight.y),latLng=map.getProjection().fromPointToLatLng(worldPoint);return{lat:latLng.lat(),lng:latLng.lng()}},WPGMZA.GoogleMap.prototype.onElementResized=function(event){this.googleMap&&google.maps.event.trigger(this.googleMap,"resize")},WPGMZA.GoogleMap.prototype.enableAllInteractions=function(){var options={scrollwheel:!0,draggable:!0,disableDoubleClickZoom:!1};this.googleMap.setOptions(options)}}),jQuery(function($){var Parent;WPGMZA.GoogleMarker=function(row){var self=this;Parent.call(this,row),this._opacity=1;var settings={};if(row)for(var name in row)row[name]instanceof WPGMZA.LatLng?settings[name]=row[name].toGoogleLatLng():row[name]instanceof WPGMZA.Map||"icon"==name||(settings[name]=row[name]);this.googleMarker=new google.maps.Marker(settings),(this.googleMarker.wpgmzaMarker=this).googleMarker.setPosition(new google.maps.LatLng({lat:parseFloat(this.lat),lng:parseFloat(this.lng)})),this.anim&&this.googleMarker.setAnimation(this.anim),this.animation&&this.googleMarker.setAnimation(this.animation),google.maps.event.addListener(this.googleMarker,"click",function(){self.dispatchEvent("click"),self.dispatchEvent("select")}),google.maps.event.addListener(this.googleMarker,"mouseover",function(){self.dispatchEvent("mouseover")}),google.maps.event.addListener(this.googleMarker,"dragend",function(){var googleMarkerPosition=self.googleMarker.getPosition();self.setPosition({lat:googleMarkerPosition.lat(),lng:googleMarkerPosition.lng()}),self.dispatchEvent({type:"dragend",latLng:self.getPosition()})}),this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.GoogleMarker.prototype=Object.create(Parent.prototype),WPGMZA.GoogleMarker.prototype.constructor=WPGMZA.GoogleMarker,Object.defineProperty(WPGMZA.GoogleMarker.prototype,"opacity",{get:function(){return this._opacity},set:function(value){this._opacity=value,this.googleMarker.setOpacity(value)}}),WPGMZA.GoogleMarker.prototype.setLabel=function(label){label?(this.googleMarker.setLabel({text:label}),this.googleMarker.getIcon()||this.googleMarker.setIcon(WPGMZA.settings.default_marker_icon)):this.googleMarker.setLabel(null)},WPGMZA.GoogleMarker.prototype.setPosition=function(latLng){Parent.prototype.setPosition.call(this,latLng),this.googleMarker.setPosition({lat:this.lat,lng:this.lng})},WPGMZA.GoogleMarker.prototype.updateOffset=function(){var params,self=this,icon=this.googleMarker.getIcon(),img=new Image,x=this._offset.x,y=this._offset.y;icon=icon||WPGMZA.settings.default_marker_icon,params="string"==typeof icon?{url:icon}:icon,img.onload=function(){var defaultAnchor_x=img.width/2,defaultAnchor_y=img.height;params.anchor=new google.maps.Point(defaultAnchor_x-x,defaultAnchor_y-y),self.googleMarker.setIcon(params)},img.src=params.url},WPGMZA.GoogleMarker.prototype.setOptions=function(options){this.googleMarker.setOptions(options)},WPGMZA.GoogleMarker.prototype.setAnimation=function(animation){Parent.prototype.setAnimation.call(this,animation),this.googleMarker.setAnimation(animation)},WPGMZA.GoogleMarker.prototype.setVisible=function(visible){Parent.prototype.setVisible.call(this,visible),this.googleMarker.setVisible(!!visible)},WPGMZA.GoogleMarker.prototype.getVisible=function(visible){return this.googleMarker.getVisible()},WPGMZA.GoogleMarker.prototype.setDraggable=function(draggable){this.googleMarker.setDraggable(draggable)},WPGMZA.GoogleMarker.prototype.setOpacity=function(opacity){this.googleMarker.setOpacity(opacity)}}),jQuery(function($){WPGMZA.GoogleModernStoreLocatorCircle=function(map,settings){var self=this;WPGMZA.ModernStoreLocatorCircle.call(this,map,settings),this.intervalID=setInterval(function(){var mapSize={width:$(self.mapElement).width(),height:$(self.mapElement).height()};mapSize.width==self.mapSize.width&&mapSize.height==self.mapSize.height||(self.canvasLayer.resize_(),self.canvasLayer.draw(),self.mapSize=mapSize)},1e3),$(document).bind("webkitfullscreenchange mozfullscreenchange fullscreenchange",function(){self.canvasLayer.resize_(),self.canvasLayer.draw()})},WPGMZA.GoogleModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.GoogleModernStoreLocatorCircle.prototype.constructor=WPGMZA.GoogleModernStoreLocatorCircle,WPGMZA.GoogleModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this;this.canvasLayer&&(this.canvasLayer.setMap(null),this.canvasLayer.setAnimate(!1)),this.canvasLayer=new CanvasLayer({map:this.map.googleMap,resizeHandler:function(event){self.onResize(event)},updateHandler:function(event){self.onUpdate(event)},animate:!0,resolutionScale:this.getResolutionScale()})},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setOptions=function(options){WPGMZA.ModernStoreLocatorCircle.prototype.setOptions.call(this,options),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setPosition=function(position){WPGMZA.ModernStoreLocatorCircle.prototype.setPosition.call(this,position),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setRadius=function(radius){WPGMZA.ModernStoreLocatorCircle.prototype.setRadius.call(this,radius),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){var spherical=google.maps.geometry.spherical,center=this.settings.center,equator=new WPGMZA.LatLng({lat:0,lng:0}),latitude=new WPGMZA.LatLng({lat:center.lat,lng:0}),offsetAtEquator=spherical.computeOffset(equator.toGoogleLatLng(),1e3*km,90),result=.006395*km*(spherical.computeOffset(latitude.toGoogleLatLng(),1e3*km,90).lng()/offsetAtEquator.lng());if(isNaN(result))throw new Error("here");return result},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvasLayer.canvas.width,height:this.canvasLayer.canvas.height}},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){var position=this.map.googleMap.getProjection().fromLatLngToPoint(this.canvasLayer.getTopLeft());return{x:-position.x,y:-position.y}},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCenterPixels=function(){var center=new WPGMZA.LatLng(this.settings.center);return this.map.googleMap.getProjection().fromLatLngToPoint(center.toGoogleLatLng())},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvasLayer.canvas.getContext("2d")},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getScale=function(){return Math.pow(2,this.map.getZoom())*this.getResolutionScale()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setVisible=function(visible){WPGMZA.ModernStoreLocatorCircle.prototype.setVisible.call(this,visible),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.destroy=function(){this.canvasLayer.setMap(null),this.canvasLayer=null,clearInterval(this.intervalID)}}),jQuery(function($){WPGMZA.GoogleModernStoreLocator=function(map_id){this.map=WPGMZA.getMapByID(map_id),WPGMZA.ModernStoreLocator.call(this,map_id);var options={fields:["name","formatted_address"],types:["geocode"]},restrict=wpgmaps_localize[map_id].other_settings.wpgmza_store_locator_restrict;this.addressInput=$(this.element).find(".addressInput, #addressInput")[0],this.addressInput&&(restrict&&restrict.length&&(options.componentRestrictions={country:restrict}),this.autoComplete=new google.maps.places.Autocomplete(this.addressInput,options)),this.map.googleMap.controls[google.maps.ControlPosition.TOP_CENTER].push(this.element)},WPGMZA.GoogleModernStoreLocator.prototype=Object.create(WPGMZA.ModernStoreLocator.prototype),WPGMZA.GoogleModernStoreLocator.prototype.constructor=WPGMZA.GoogleModernStoreLocator}),jQuery(function($){var Parent;WPGMZA.GooglePolygon=function(options,googlePolygon){var self=this;if(Parent.call(this,options,googlePolygon),googlePolygon)this.googlePolygon=googlePolygon;else if(this.googlePolygon=new google.maps.Polygon,options){var googleOptions=$.extend({},options);options.polydata&&(googleOptions.paths=this.parseGeometry(options.polydata)),options.linecolor&&(googleOptions.strokeColor="#"+options.linecolor),options.lineopacity&&(googleOptions.strokeOpacity=parseFloat(options.lineopacity)),options.fillcolor&&(googleOptions.fillColor="#"+options.fillcolor),options.opacity&&(googleOptions.fillOpacity=parseFloat(options.opacity)),this.googlePolygon.setOptions(googleOptions)}this.googlePolygon.wpgmzaPolygon=this,google.maps.event.addListener(this.googlePolygon,"click",function(){self.dispatchEvent({type:"click"})})},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.GooglePolygon.prototype=Object.create(Parent.prototype),WPGMZA.GooglePolygon.prototype.constructor=WPGMZA.GooglePolygon,WPGMZA.GooglePolygon.prototype.getEditable=function(){return this.googlePolygon.getOptions().editable},WPGMZA.GooglePolygon.prototype.setEditable=function(value){this.googlePolygon.setOptions({editable:value})},WPGMZA.GooglePolygon.prototype.toJSON=function(){var result=WPGMZA.Polygon.prototype.toJSON.call(this);result.points=[];for(var path=this.googlePolygon.getPath(),i=0;i<path.getLength();i++){var latLng=path.getAt(i);result.points.push({lat:latLng.lat(),lng:latLng.lng()})}return result}}),jQuery(function($){WPGMZA.GooglePolyline=function(options,googlePolyline){var self=this;if(WPGMZA.Polyline.call(this,options,googlePolyline),googlePolyline)this.googlePolyline=googlePolyline;else{if(this.googlePolyline=new google.maps.Polyline(this.settings),options){var googleOptions=$.extend({},options);options.polydata&&(googleOptions.path=this.parseGeometry(options.polydata)),options.linecolor&&(googleOptions.strokeColor="#"+options.linecolor),options.linethickness&&(googleOptions.strokeWeight=parseInt(options.linethickness)),options.opacity&&(googleOptions.strokeOpacity=parseFloat(options.opacity))}if(options&&options.polydata){var path=this.parseGeometry(options.polydata);this.setPoints(path)}}this.googlePolyline.wpgmzaPolyline=this,google.maps.event.addListener(this.googlePolyline,"click",function(){self.dispatchEvent({type:"click"})})},WPGMZA.GooglePolyline.prototype=Object.create(WPGMZA.Polyline.prototype),WPGMZA.GooglePolyline.prototype.constructor=WPGMZA.GooglePolyline,WPGMZA.GooglePolyline.prototype.setEditable=function(value){this.googlePolyline.setOptions({editable:value})},WPGMZA.GooglePolyline.prototype.setPoints=function(points){this.googlePolyline.setOptions({path:points})},WPGMZA.GooglePolyline.prototype.toJSON=function(){var result=WPGMZA.Polyline.prototype.toJSON.call(this);result.points=[];for(var path=this.googlePolyline.getPath(),i=0;i<path.getLength();i++){var latLng=path.getAt(i);result.points.push({lat:latLng.lat(),lng:latLng.lng()})}return result}}),jQuery(function($){WPGMZA.GoogleText=function(options){WPGMZA.Text.apply(this,arguments),this.overlay=new WPGMZA.GoogleTextOverlay(options)},WPGMZA.extend(WPGMZA.GoogleText,WPGMZA.Text)}),jQuery(function($){WPGMZA.GoogleTextOverlay=function(options){this.element=$("<div class='wpgmza-google-text-overlay'><div class='wpgmza-inner'></div></div>"),(options=options||{}).position&&(this.position=options.position),options.text&&this.element.find(".wpgmza-inner").text(options.text),options.map&&this.setMap(options.map.googleMap)},window.google&&google.maps&&google.maps.OverlayView&&(WPGMZA.GoogleTextOverlay.prototype=new google.maps.OverlayView),WPGMZA.GoogleTextOverlay.prototype.onAdd=function(){var position=this.getProjection().fromLatLngToDivPixel(this.position.toGoogleLatLng());this.element.css({position:"absolute",left:position.x+"px",top:position.y+"px"}),this.getPanes().floatPane.appendChild(this.element[0])},WPGMZA.GoogleTextOverlay.prototype.draw=function(){var position=this.getProjection().fromLatLngToDivPixel(this.position.toGoogleLatLng());this.element.css({position:"absolute",left:position.x+"px",top:position.y+"px"})},WPGMZA.GoogleTextOverlay.prototype.onRemove=function(){this.element.remove()},WPGMZA.GoogleTextOverlay.prototype.hide=function(){this.element.hide()},WPGMZA.GoogleTextOverlay.prototype.show=function(){this.element.show()},WPGMZA.GoogleTextOverlay.prototype.toggle=function(){this.element.is(":visible")?this.element.hide():this.element.show()}}),jQuery(function($){"google-maps"==WPGMZA.settings.engine&&(WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code||(WPGMZA.GoogleVertexContextMenu=function(mapEditPage){var self=this;this.mapEditPage=mapEditPage,this.element=document.createElement("div"),this.element.className="wpgmza-vertex-context-menu",this.element.innerHTML="Delete",google.maps.event.addDomListener(this.element,"click",function(event){return self.removeVertex(),event.preventDefault(),event.stopPropagation(),!1})},WPGMZA.GoogleVertexContextMenu.prototype=new google.maps.OverlayView,WPGMZA.GoogleVertexContextMenu.prototype.onAdd=function(){var self=this,map=this.getMap();this.getPanes().floatPane.appendChild(this.element),this.divListener=google.maps.event.addDomListener(map.getDiv(),"mousedown",function(e){e.target!=self.element&&self.close()},!0)},WPGMZA.GoogleVertexContextMenu.prototype.onRemove=function(){google.maps.event.removeListener(this.divListener),this.element.parentNode.removeChild(this.element),this.set("position"),this.set("path"),this.set("vertex")},WPGMZA.GoogleVertexContextMenu.prototype.open=function(map,path,vertex){this.set("position",path.getAt(vertex)),this.set("path",path),this.set("vertex",vertex),this.setMap(map),this.draw()},WPGMZA.GoogleVertexContextMenu.prototype.close=function(){this.setMap(null)},WPGMZA.GoogleVertexContextMenu.prototype.draw=function(){var position=this.get("position"),projection=this.getProjection();if(position&&projection){var point=projection.fromLatLngToDivPixel(position);this.element.style.top=point.y+"px",this.element.style.left=point.x+"px"}},WPGMZA.GoogleVertexContextMenu.prototype.removeVertex=function(){var path=this.get("path"),vertex=this.get("vertex");path&&null!=vertex&&path.removeAt(vertex),this.close()}))});
1
+ jQuery(function($){var key,core={MARKER_PULL_DATABASE:"0",MARKER_PULL_XML:"1",PAGE_MAP_LIST:"map-list",PAGE_MAP_EDIT:"map-edit",PAGE_SETTINGS:"map-settings",PAGE_SUPPORT:"map-support",PAGE_CATEGORIES:"categories",PAGE_ADVANCED:"advanced",PAGE_CUSTOM_FIELDS:"custom-fields",maps:[],events:null,settings:null,restAPI:null,localized_strings:null,loadingHTML:'<div class="wpgmza-preloader"><div></div><div></div><div></div><div></div></div>',getCurrentPage:function(){switch(WPGMZA.getQueryParamValue("page")){case"wp-google-maps-menu":return window.location.href.match(/action=edit/)&&window.location.href.match(/map_id=\d+/)?WPGMZA.PAGE_MAP_EDIT:WPGMZA.PAGE_MAP_LIST;case"wp-google-maps-menu-settings":return WPGMZA.PAGE_SETTINGS;case"wp-google-maps-menu-support":return WPGMZA.PAGE_SUPPORT;case"wp-google-maps-menu-categories":return WPGMZA.PAGE_CATEGORIES;case"wp-google-maps-menu-advanced":return WPGMZA.PAGE_ADVANCED;case"wp-google-maps-menu-custom-fields":return WPGMZA.PAGE_CUSTOM_FIELDS;default:return null}},getScrollAnimationOffset:function(){return(WPGMZA.settings.scroll_animation_offset||0)+$("#wpadminbar").height()},getScrollAnimationDuration:function(){return WPGMZA.settings.scroll_animation_milliseconds||500},animateScroll:function(element,milliseconds){var offset=WPGMZA.getScrollAnimationOffset();milliseconds=milliseconds||WPGMZA.getScrollAnimationDuration(),$("html, body").animate({scrollTop:$(element).offset().top-offset},milliseconds)},extend:function(child,parent){var constructor=child;child.prototype=Object.create(parent.prototype),child.prototype.constructor=constructor},guid:function(){var d=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(d+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){var r=(d+16*Math.random())%16|0;return d=Math.floor(d/16),("x"===c?r:3&r|8).toString(16)})},hexOpacityToRGBA:function(hex,opacity){hex=parseInt(hex.replace(/^#/,""),16);return[(16711680&hex)>>16,(65280&hex)>>8,255&hex,parseFloat(opacity)]},hexToRgba:function(c){return/^#([A-Fa-f0-9]{3}){1,2}$/.test(c)?(3==(c=c.substring(1).split("")).length&&(c=[c[0],c[0],c[1],c[1],c[2],c[2]]),{r:(c="0x"+c.join(""))>>16&255,g:c>>8&255,b:255&c,a:1}):0},rgbaToString:function(rgba){return"rgba("+rgba.r+", "+rgba.g+", "+rgba.b+", "+rgba.a+")"},latLngRegexp:/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,isLatLngString:function(m){if("string"!=typeof m)return null;m.match(/^\(.+\)$/)&&(m=m.replace(/^\(|\)$/,""));m=m.match(WPGMZA.latLngRegexp);return m?new WPGMZA.LatLng({lat:parseFloat(m[1]),lng:parseFloat(m[3])}):null},stringToLatLng:function(result){result=WPGMZA.isLatLngString(result);if(!result)throw new Error("Not a valid latLng");return result},isHexColorString:function(str){return"string"==typeof str&&!!str.match(/#[0-9A-F]{6}/i)},imageDimensionsCache:{},getImageDimensions:function(src,callback){var img;WPGMZA.imageDimensionsCache[src]?callback(WPGMZA.imageDimensionsCache[src]):((img=document.createElement("img")).onload=function(event){var result={width:img.width,height:img.height};WPGMZA.imageDimensionsCache[src]=result,callback(result)},img.src=src)},decodeEntities:function(input){return input.replace(/&(nbsp|amp|quot|lt|gt);/g,function(m,e){return m[e]}).replace(/&#(\d+);/gi,function(m,e){return String.fromCharCode(parseInt(e,10))})},isDeveloperMode:function(){return this.settings.developer_mode||window.Cookies&&window.Cookies.get("wpgmza-developer-mode")},isProVersion:function(){return"1"==this._isProVersion},openMediaDialog:function(callback){var file_frame;if(file_frame)return file_frame.uploader.uploader.param("post_id",set_to_post_id),void file_frame.open();(file_frame=wp.media.frames.file_frame=wp.media({title:"Select a image to upload",button:{text:"Use this image"},multiple:!1})).on("select",function(){attachment=file_frame.state().get("selection").first().toJSON(),callback(attachment.id,attachment.url)}),file_frame.open()},getCurrentPosition:function(callback,error,watch){var options,nativeFunction="getCurrentPosition";WPGMZA.userLocationDenied?error&&error({code:1,message:"Location unavailable"}):(watch&&(nativeFunction="watchPosition"),navigator.geolocation?(options={enableHighAccuracy:!0},navigator.geolocation[nativeFunction]?navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(err){options.enableHighAccuracy=!1,navigator.geolocation[nativeFunction](function(position){callback&&callback(position),WPGMZA.events.trigger("userlocationfound")},function(err){console.warn(err.code,err.message),1==err.code&&(WPGMZA.userLocationDenied=!0),error&&error(err)},options)},options):console.warn(nativeFunction+" is not available")):console.warn("No geolocation available on this device"))},watchPosition:function(callback,error){return WPGMZA.getCurrentPosition(callback,error,!0)},runCatchableTask:function(callback,friendlyErrorContainer){if(WPGMZA.isDeveloperMode())callback();else try{callback()}catch(e){var friendlyError=new WPGMZA.FriendlyError(e);$(friendlyErrorContainer).html(""),$(friendlyErrorContainer).append(friendlyError.element),$(friendlyErrorContainer).show()}},assertInstanceOf:function(instance,fullInstanceName){var pro=WPGMZA.isProVersion()?"Pro":"",engine="open-layers"===WPGMZA.settings.engine?"OL":"Google",fullInstanceName=WPGMZA[engine+pro+fullInstanceName]?engine+pro+fullInstanceName:WPGMZA[pro+fullInstanceName]?pro+fullInstanceName:WPGMZA[engine+fullInstanceName]?engine+fullInstanceName:fullInstanceName;if(!(instance instanceof WPGMZA[fullInstanceName]))throw new Error("Object must be an instance of "+fullInstanceName+" (did you call a constructor directly, rather than createInstance?)")},getMapByID:function(id){return(!WPGMZA.isProVersion()||MYMAP.map instanceof WPGMZA.Map?MYMAP:MYMAP[id]).map},isGoogleAutocompleteSupported:function(){return!!window.google&&(!!google.maps&&(!!google.maps.places&&(!!google.maps.places.Autocomplete&&(!WPGMZA.CloudAPI||!WPGMZA.CloudAPI.isBeingUsed))))},googleAPIStatus:window.wpgmza_google_api_status,isSafari:function(){var ua=navigator.userAgent.toLowerCase();return ua.match(/safari/i)&&!ua.match(/chrome/i)},isTouchDevice:function(){return"ontouchstart"in window},isDeviceiOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)},isModernComponentStyleAllowed:function(){return!WPGMZA.settings.user_interface_style||"legacy"==WPGMZA.settings.user_interface_style||"modern"==WPGMZA.settings.user_interface_style},isElementInView:function(elementBottom){var pageTop=$(window).scrollTop(),pageBottom=pageTop+$(window).height(),elementTop=$(elementBottom).offset().top,elementBottom=elementTop+$(elementBottom).height();return elementTop<pageTop&&pageBottom<elementBottom||(pageTop<=elementTop&&elementTop<=pageBottom||pageTop<=elementBottom&&elementBottom<=pageBottom)},isFullScreen:function(){return isFullScreen},getQueryParamValue:function(m){m=new RegExp(m+"=([^&#]*)");return(m=window.location.href.match(m))?m[1]:null},notification:function(text,time){switch(arguments.length){case 0:text="",time=4e3;break;case 1:time=4e3}var html='<div class="wpgmza-popup-notification">'+text+"</div>";jQuery("body").append(html),setTimeout(function(){jQuery("body").find(".wpgmza-popup-notification").remove()},time)}};for(key in window.WPGMZA?window.WPGMZA=$.extend(window.WPGMZA,core):window.WPGMZA=core,WPGMZA_localized_data){var value=WPGMZA_localized_data[key];WPGMZA[key]=value}WPGMZA.settings.useLegacyGlobals=!0,jQuery(function($){$(window).trigger("ready.wpgmza"),$("script[src*='wp-google-maps.combined.js'], script[src*='wp-google-maps-pro.combined.js']").length&&console.warn("Minified script is out of date, using combined script instead.");var elements=$("script").filter(function(){return this.src.match(/(^|\/)jquery\.(min\.)?js(\?|$)/i)});1<elements.length&&console.warn("Multiple jQuery versions detected: ",elements),WPGMZA.restAPI=WPGMZA.RestAPI.createInstance(),WPGMZA.CloudAPI&&(WPGMZA.cloudAPI=WPGMZA.CloudAPI.createInstance()),$(document).on("click",".wpgmza_edit_btn",function(){WPGMZA.animateScroll("#wpgmaps_tabs_markers")})});var isFullScreen=!1;function onScroll(event){$(".wpgmza_map").each(function(index,el){var isInView=WPGMZA.isElementInView(el);el.wpgmzaScrollIntoViewTriggerFlag?isInView||(el.wpgmzaScrollIntoViewTriggerFlag=!1):isInView&&($(el).trigger("mapscrolledintoview.wpgmza"),el.wpgmzaScrollIntoViewTriggerFlag=!0)})}$(document).on("fullscreenchange",function(){isFullScreen=!!document.fullscreenElement}),$(window).on("load",function(event){var key,warning;for(key in[]){console.warn("The Array object has been extended incorrectly by your theme or another plugin. This can cause issues with functionality.");break}"https:"!=window.location.protocol&&(warning='<div class="notice notice-warning"><p>'+WPGMZA.localized_strings.unsecure_geolocation+"</p></div>",$(".wpgmza-geolocation-setting").each(function(index,el){$(el).after($(warning))}))}),$(window).on("scroll",onScroll),$(window).on("load",onScroll),WPGMZA.refreshOnLoad&&window.location.reload()}),jQuery(function($){WPGMZA.Compatibility=function(){this.preventDocumentWriteGoogleMapsAPI()},WPGMZA.Compatibility.prototype.preventDocumentWriteGoogleMapsAPI=function(){var old=document.write;document.write=function(content){content.match&&content.match(/maps\.google/)||old.call(document,content)}},WPGMZA.compatiblityModule=new WPGMZA.Compatibility}),function(root,factory){"object"==typeof exports?module.exports=factory(root):"function"==typeof define&&define.amd?define([],factory.bind(root,root)):factory(root)}("undefined"!=typeof global?global:this,function(root){if(root.CSS&&root.CSS.escape)return root.CSS.escape;function cssEscape(value){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var codeUnit,string=String(value),length=string.length,index=-1,result="",firstCodeUnit=string.charCodeAt(0);++index<length;)0!=(codeUnit=string.charCodeAt(index))?result+=1<=codeUnit&&codeUnit<=31||127==codeUnit||0==index&&48<=codeUnit&&codeUnit<=57||1==index&&48<=codeUnit&&codeUnit<=57&&45==firstCodeUnit?"\\"+codeUnit.toString(16)+" ":(0!=index||1!=length||45!=codeUnit)&&(128<=codeUnit||45==codeUnit||95==codeUnit||48<=codeUnit&&codeUnit<=57||65<=codeUnit&&codeUnit<=90||97<=codeUnit&&codeUnit<=122)?string.charAt(index):"\\"+string.charAt(index):result+="�";return result}return root.CSS||(root.CSS={}),root.CSS.escape=cssEscape}),jQuery(function($){Math.PI;function deg2rad(deg){return deg*(Math.PI/180)}WPGMZA.Distance={MILES:!0,KILOMETERS:!1,MILES_PER_KILOMETER:.621371,KILOMETERS_PER_MILE:1.60934,uiToMeters:function(uiDistance){return parseFloat(uiDistance)/(WPGMZA.settings.distance_units==WPGMZA.Distance.MILES?WPGMZA.Distance.MILES_PER_KILOMETER:1)*1e3},uiToKilometers:function(uiDistance){return.001*WPGMZA.Distance.uiToMeters(uiDistance)},uiToMiles:function(uiDistance){return WPGMZA.Distance.uiToKilometers(uiDistance)*WPGMZA.Distance.MILES_PER_KILOMETER},kilometersToUI:function(km){return WPGMZA.settings.distance_units==WPGMZA.Distance.MILES?km*WPGMZA.Distance.MILES_PER_KILOMETER:km},between:function(a,dLat){if(!(a instanceof WPGMZA.LatLng||"lat"in a&&"lng"in a))throw new Error("First argument must be an instance of WPGMZA.LatLng or a literal");if(!(dLat instanceof WPGMZA.LatLng||"lat"in dLat&&"lng"in dLat))throw new Error("Second argument must be an instance of WPGMZA.LatLng or a literal");if(a===dLat)return 0;var lat1=a.lat,dLon=a.lng,lat2=dLat.lat,lon2=dLat.lng,dLat=deg2rad(lat2-lat1),dLon=deg2rad(lon2-dLon),a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(deg2rad(lat1))*Math.cos(deg2rad(lat2))*Math.sin(dLon/2)*Math.sin(dLon/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}}}),jQuery(function($){WPGMZA.EliasFano=function(){if(!WPGMZA.EliasFano.isSupported)throw new Error("Elias Fano encoding is not supported on browsers without Uint8Array");WPGMZA.EliasFano.decodingTablesInitialised||WPGMZA.EliasFano.createDecodingTable()},WPGMZA.EliasFano.isSupported="Uint8Array"in window,WPGMZA.EliasFano.decodingTableHighBits=[],WPGMZA.EliasFano.decodingTableDocIDNumber=null,WPGMZA.EliasFano.decodingTableHighBitsCarryover=null,WPGMZA.EliasFano.createDecodingTable=function(){WPGMZA.EliasFano.decodingTableDocIDNumber=new Uint8Array(256),WPGMZA.EliasFano.decodingTableHighBitsCarryover=new Uint8Array(256);for(var decodingTableHighBits=WPGMZA.EliasFano.decodingTableHighBits,decodingTableDocIDNumber=WPGMZA.EliasFano.decodingTableDocIDNumber,decodingTableHighBitsCarryover=WPGMZA.EliasFano.decodingTableHighBitsCarryover,i=0;i<256;i++){var zeroCount=0;decodingTableHighBits[i]=[];for(var j=7;0<=j;j--)zeroCount=0<(i&1<<j)?(decodingTableHighBits[i][decodingTableDocIDNumber[i]]=zeroCount,decodingTableDocIDNumber[i]++,0):(zeroCount+1)%255;decodingTableHighBitsCarryover[i]=zeroCount}WPGMZA.EliasFano.decodingTablesInitialised=!0},WPGMZA.EliasFano.prototype.encode=function(list){var lastDocID=0,buffer1=0,bufferLength1=0,buffer2=0,bufferLength2=0;if(0==list.length)return result;var compressedBufferPointer1=0,compressedBufferPointer2=0,maxCompressedSize=list[list.length-1]/list.length,averageDeltaLog=Math.log2(maxCompressedSize),lowBitsLength=Math.floor(averageDeltaLog),lowBitsMask=(1<<lowBitsLength)-1,prev=null,maxCompressedSize=Math.floor((2+Math.ceil(Math.log2(maxCompressedSize)))*list.length/8)+6,compressedBuffer=new Uint8Array(maxCompressedSize);lowBitsLength<0&&(lowBitsLength=0),compressedBufferPointer2=Math.floor(lowBitsLength*list.length/8+6),compressedBuffer[compressedBufferPointer1++]=255&list.length,compressedBuffer[compressedBufferPointer1++]=255&list.length>>8,compressedBuffer[compressedBufferPointer1++]=255&list.length>>16,compressedBuffer[compressedBufferPointer1++]=255&list.length>>24,compressedBuffer[compressedBufferPointer1++]=255&lowBitsLength,list.forEach(function(docID){var unaryCodeLength=docID-lastDocID-1;if(!$.isNumeric(docID))throw new Error("Value is not numeric");if(docID=parseInt(docID),null!==prev&&docID<=prev)throw new Error("Elias Fano encoding can only be used on a sorted, ascending list of unique integers.");for(prev=docID,buffer1<<=lowBitsLength,buffer1|=unaryCodeLength&lowBitsMask,bufferLength1+=lowBitsLength;7<bufferLength1;)bufferLength1-=8,compressedBuffer[compressedBufferPointer1++]=255&buffer1>>bufferLength1;unaryCodeLength=1+(unaryCodeLength>>lowBitsLength);for(buffer2<<=unaryCodeLength,buffer2|=1,bufferLength2+=unaryCodeLength;7<bufferLength2;)bufferLength2-=8,compressedBuffer[compressedBufferPointer2++]=255&buffer2>>bufferLength2;lastDocID=docID}),0<bufferLength1&&(compressedBuffer[compressedBufferPointer1++]=255&buffer1<<8-bufferLength1),0<bufferLength2&&(compressedBuffer[compressedBufferPointer2++]=255&buffer2<<8-bufferLength2);var result=new Uint8Array(compressedBuffer);return result.pointer=compressedBufferPointer2,result},WPGMZA.EliasFano.prototype.decode=function(compressedBuffer){var docIDNumber,resultPointer=0,list=[],decodingTableHighBits=WPGMZA.EliasFano.decodingTableHighBits,decodingTableDocIDNumber=WPGMZA.EliasFano.decodingTableDocIDNumber,decodingTableHighBitsCarryover=WPGMZA.EliasFano.decodingTableHighBitsCarryover,lowBitsPointer=0,lastDocID=0,docID=0,listCount=compressedBuffer[lowBitsPointer++];listCount|=compressedBuffer[lowBitsPointer++]<<8,listCount|=compressedBuffer[lowBitsPointer++]<<16,listCount|=compressedBuffer[lowBitsPointer++]<<24;for(var lowBitsLength=compressedBuffer[lowBitsPointer++],lowBitsCount=0,lowBits=0,cb=1,highBitsPointer=Math.floor(lowBitsLength*listCount/8+6);highBitsPointer<compressedBuffer.pointer;highBitsPointer++){docID+=decodingTableHighBitsCarryover[cb],docIDNumber=decodingTableDocIDNumber[cb=compressedBuffer[highBitsPointer]];for(var i=0;i<docIDNumber;i++){for(docID<<=lowBitsCount,docID|=lowBits&(1<<lowBitsCount)-1;lowBitsCount<lowBitsLength;)docID<<=8,docID|=lowBits=compressedBuffer[lowBitsPointer++],lowBitsCount+=8;docID>>=lowBitsCount-=lowBitsLength,docID+=(decodingTableHighBits[cb][i]<<lowBitsLength)+lastDocID+1,lastDocID=list[resultPointer++]=docID,docID=0}}return list}}),jQuery(function($){WPGMZA.EventDispatcher=function(){WPGMZA.assertInstanceOf(this,"EventDispatcher"),this._listenersByType={}},WPGMZA.EventDispatcher.prototype.addEventListener=function(obj,listener,thisObject,useCapture){var types=obj.split(/\s+/);if(1<types.length)for(var i=0;i<types.length;i++)this.addEventListener(types[i],listener,thisObject,useCapture);else{if(!(listener instanceof Function))throw new Error("Listener must be a function");var target=this._listenersByType.hasOwnProperty(obj)?this._listenersByType[obj]:this._listenersByType[obj]=[],obj={listener:listener,thisObject:thisObject||this,useCapture:!!useCapture};target.push(obj)}},WPGMZA.EventDispatcher.prototype.on=WPGMZA.EventDispatcher.prototype.addEventListener,WPGMZA.EventDispatcher.prototype.removeEventListener=function(type,listener,thisObject,useCapture){var arr,obj;if(arr=this._listenersByType[type]){thisObject=thisObject||this,useCapture=!!useCapture;for(var i=0;i<arr.length;i++)if(obj=arr[i],(1==arguments.length||obj.listener==listener)&&obj.thisObject==thisObject&&obj.useCapture==useCapture)return void arr.splice(i,1)}},WPGMZA.EventDispatcher.prototype.off=WPGMZA.EventDispatcher.prototype.removeEventListener,WPGMZA.EventDispatcher.prototype.hasEventListener=function(type){return!!_listenersByType[type]},WPGMZA.EventDispatcher.prototype.dispatchEvent=function(event){if(!(event instanceof WPGMZA.Event))if("string"==typeof event)event=new WPGMZA.Event(event);else{var name,src=event;for(name in event=new WPGMZA.Event,src)event[name]=src[name]}for(var path=[],obj=(event.target=this).parent;null!=obj;obj=obj.parent)path.unshift(obj);event.phase=WPGMZA.Event.CAPTURING_PHASE;for(var i=0;i<path.length&&!event._cancelled;i++)path[i]._triggerListeners(event);if(!event._cancelled){for(event.phase=WPGMZA.Event.AT_TARGET,this._triggerListeners(event),event.phase=WPGMZA.Event.BUBBLING_PHASE,i=path.length-1;0<=i&&!event._cancelled;i--)path[i]._triggerListeners(event);for(var topMostElement=this.element,obj=this.parent;null!=obj;obj=obj.parent)obj.element&&(topMostElement=obj.element);if(topMostElement){var key,customEvent={};for(key in event){var value=event[key];"type"==key&&(value+=".wpgmza"),customEvent[key]=value}$(topMostElement).trigger(customEvent)}}},WPGMZA.EventDispatcher.prototype.trigger=WPGMZA.EventDispatcher.prototype.dispatchEvent,WPGMZA.EventDispatcher.prototype._triggerListeners=function(event){var arr,obj;if(arr=this._listenersByType[event.type])for(var i=0;i<arr.length;i++)obj=arr[i],event.phase==WPGMZA.Event.CAPTURING_PHASE&&!obj.useCapture||obj.listener.call(arr[i].thisObject,event)},WPGMZA.events=new WPGMZA.EventDispatcher}),jQuery(function($){WPGMZA.AddressInput=function(element,map){if(!(element instanceof HTMLInputElement))throw new Error("Element is not an instance of HTMLInputElement");var json;this.element=element;var options={fields:["name","formatted_address"],types:["geocode"]};(json=$(element).attr("data-autocomplete-options"))&&(options=$.extend(options,JSON.parse(json))),map&&map.settings.wpgmza_store_locator_restrict&&(options.country=map.settings.wpgmza_store_locator_restrict),WPGMZA.isGoogleAutocompleteSupported()?(element.googleAutoComplete=new google.maps.places.Autocomplete(element,options),options.country&&element.googleAutoComplete.setComponentRestrictions({country:options.country})):WPGMZA.CloudAPI&&WPGMZA.CloudAPI.isBeingUsed&&(element.cloudAutoComplete=new WPGMZA.CloudAutocomplete(element,options))},WPGMZA.extend(WPGMZA.AddressInput,WPGMZA.EventDispatcher),WPGMZA.AddressInput.createInstance=function(element,map){return new WPGMZA.AddressInput(element,map)}}),jQuery(function($){WPGMZA.Event=function(options){if("string"==typeof options&&(this.type=options),this.bubbles=!0,this.cancelable=!0,this.phase=WPGMZA.Event.PHASE_CAPTURE,this.target=null,this._cancelled=!1,"object"==typeof options)for(var name in options)this[name]=options[name]},WPGMZA.Event.CAPTURING_PHASE=0,WPGMZA.Event.AT_TARGET=1,WPGMZA.Event.BUBBLING_PHASE=2,WPGMZA.Event.prototype.stopPropagation=function(){this._cancelled=!0}}),jQuery(function($){WPGMZA.FancyControls={formatToggleSwitch:function(label){var div=$("<div class='switch'></div>"),input=label,container=label.parentNode,text=$(container).text().trim(),label=$("<label></label>");$(input).addClass("cmn-toggle cmn-toggle-round-flat"),$(input).attr("id",$(input).attr("name")),$(label).attr("for",$(input).attr("name")),$(div).append(input),$(div).append(label),$(container).replaceWith(div),$(div).wrap($("<div></div>")),$(div).after(text)},formatToggleButton:function(label){var div=$("<div class='switch'></div>"),input=label,container=label.parentNode,text=$(container).text().trim(),label=$("<label></label>");$(input).addClass("cmn-toggle cmn-toggle-yes-no"),$(input).attr("id",$(input).attr("name")),$(label).attr("for",$(input).attr("name")),$(label).attr("data-on",WPGMZA.localized_strings.yes),$(label).attr("data-off",WPGMZA.localized_strings.no),$(div).append(input),$(div).append(label),$(container).replaceWith(div),$(div).wrap($("<div></div>")),$(div).after(text)}},$(".wpgmza-fancy-toggle-switch").each(function(index,el){WPGMZA.FancyControls.formatToggleSwitch(el)}),$(".wpgmza-fancy-toggle-button").each(function(index,el){WPGMZA.FancyControls.formatToggleButton(el)})}),jQuery(function($){WPGMZA.FriendlyError=function(){}}),jQuery(function($){WPGMZA.Geocoder=function(){WPGMZA.assertInstanceOf(this,"Geocoder")},WPGMZA.Geocoder.SUCCESS="success",WPGMZA.Geocoder.ZERO_RESULTS="zero-results",WPGMZA.Geocoder.FAIL="fail",WPGMZA.Geocoder.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.GoogleGeocoder:WPGMZA.OLGeocoder},WPGMZA.Geocoder.createInstance=function(){return new(WPGMZA.Geocoder.getConstructor())},WPGMZA.Geocoder.prototype.getLatLngFromAddress=function(latLng,callback){WPGMZA.isLatLngString(latLng.address)&&(latLng=latLng.address.split(/,\s*/),callback([(latLng=new WPGMZA.LatLng({lat:parseFloat(latLng[0]),lng:parseFloat(latLng[1])})).latLng=latLng],WPGMZA.Geocoder.SUCCESS))},WPGMZA.Geocoder.prototype.getAddressFromLatLng=function(options,callback){callback([new WPGMZA.LatLng(options.latLng).toString()],WPGMZA.Geocoder.SUCCESS)},WPGMZA.Geocoder.prototype.geocode=function(options,callback){if("address"in options)return this.getLatLngFromAddress(options,callback);if("latLng"in options)return this.getAddressFromLatLng(options,callback);throw new Error("You must supply either a latLng or address")}}),jQuery(function($){WPGMZA.GoogleAPIErrorHandler=function(){var _error,self=this;"google-maps"==WPGMZA.settings.engine&&("map-edit"==WPGMZA.currentPage||0==WPGMZA.is_admin&&1==WPGMZA.userCanAdministrator)&&(this.element=$(WPGMZA.html.googleMapsAPIErrorDialog),1==WPGMZA.is_admin&&this.element.find(".wpgmza-front-end-only").remove(),this.errorMessageList=this.element.find(".wpgmza-google-api-error-list"),this.templateListItem=this.element.find("li.template").remove(),this.messagesAlreadyDisplayed={},_error=console.error,console.error=function(message){self.onErrorMessage(message),_error.apply(this,arguments)},"google-maps"!=WPGMZA.settings.engine||WPGMZA.settings.wpgmza_google_maps_api_key&&WPGMZA.settings.wpgmza_google_maps_api_key.length||WPGMZA.getCurrentPage()==WPGMZA.PAGE_MAP_EDIT||this.addErrorMessage(WPGMZA.localized_strings.no_google_maps_api_key,["https://www.wpgmaps.com/documentation/creating-a-google-maps-api-key/"]))},WPGMZA.GoogleAPIErrorHandler.prototype.onErrorMessage=function(message){var m,urls;message&&((m=message.match(/You have exceeded your (daily )?request quota for this API/))||(m=message.match(/This API project is not authorized to use this API/))||(m=message.match(/^Geocoding Service: .+/))?(urls=message.match(/http(s)?:\/\/[^\s]+/gm),this.addErrorMessage(m[0],urls)):(m=message.match(/^Google Maps.+error: (.+)\s+(http(s?):\/\/.+)/m))&&this.addErrorMessage(m[1].replace(/([A-Z])/g," $1"),[m[2]]))},WPGMZA.GoogleAPIErrorHandler.prototype.addErrorMessage=function(message,urls){var self=this;if(!this.messagesAlreadyDisplayed[message]){var li=this.templateListItem.clone();$(li).find(".wpgmza-message").html(message);var buttonContainer=$(li).find(".wpgmza-documentation-buttons"),buttonTemplate=$(li).find(".wpgmza-documentation-buttons>a");if(buttonTemplate.remove(),urls&&urls.length){for(var i=0;i<urls.length;i++){urls[i];var button=buttonTemplate.clone(),text=WPGMZA.localized_strings.documentation;button.attr("href",urls[i]),$(button).find("i").addClass("fa-external-link"),$(button).append(text)}buttonContainer.append(button)}$(this.errorMessageList).append(li),$("#wpgmza_map, .wpgmza_map").each(function(index,el){var container=$(el).find(".wpgmza-google-maps-api-error-overlay");0==container.length&&(container=$("<div class='wpgmza-google-maps-api-error-overlay'></div>")).html(self.element.html()),setTimeout(function(){$(el).append(container)},1e3)}),$(".gm-err-container").parent().css({"z-index":1}),this.messagesAlreadyDisplayed[message]=!0}},WPGMZA.googleAPIErrorHandler=new WPGMZA.GoogleAPIErrorHandler}),jQuery(function($){WPGMZA.InfoWindow=function(mapObject){var self=this;WPGMZA.EventDispatcher.call(this),WPGMZA.assertInstanceOf(this,"InfoWindow"),this.on("infowindowopen",function(event){self.onOpen(event)}),mapObject&&(this.mapObject=mapObject,this.state=WPGMZA.InfoWindow.STATE_CLOSED,mapObject.map?setTimeout(function(){self.onMapObjectAdded(event)},100):mapObject.addEventListener("added",function(event){self.onMapObjectAdded(event)}))},WPGMZA.InfoWindow.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.InfoWindow.prototype.constructor=WPGMZA.InfoWindow,WPGMZA.InfoWindow.OPEN_BY_CLICK=1,WPGMZA.InfoWindow.OPEN_BY_HOVER=2,WPGMZA.InfoWindow.STATE_OPEN="open",WPGMZA.InfoWindow.STATE_CLOSED="closed",WPGMZA.InfoWindow.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.GoogleProInfoWindow:WPGMZA.GoogleInfoWindow:WPGMZA.isProVersion()?WPGMZA.OLProInfoWindow:WPGMZA.OLInfoWindow},WPGMZA.InfoWindow.createInstance=function(mapObject){return new(this.getConstructor())(mapObject)},WPGMZA.InfoWindow.prototype.getContent=function(callback){var html="";this.mapObject instanceof WPGMZA.Marker&&(html=this.mapObject.address),callback(html)},WPGMZA.InfoWindow.prototype.open=function(map,mapObject){return this.mapObject=mapObject,!WPGMZA.settings.disable_infowindows&&"1"!=WPGMZA.settings.wpgmza_settings_disable_infowindows&&(!this.mapObject.disableInfoWindow&&(this.state=WPGMZA.InfoWindow.STATE_OPEN,!0))},WPGMZA.InfoWindow.prototype.close=function(){this.state!=WPGMZA.InfoWindow.STATE_CLOSED&&(this.state=WPGMZA.InfoWindow.STATE_CLOSED,this.trigger("infowindowclose"))},WPGMZA.InfoWindow.prototype.setContent=function(options){},WPGMZA.InfoWindow.prototype.setOptions=function(options){},WPGMZA.InfoWindow.prototype.onMapObjectAdded=function(){1==this.mapObject.settings.infoopen&&this.open()},WPGMZA.InfoWindow.prototype.onOpen=function(){}}),jQuery(function($){WPGMZA.LatLng=function(arg,lng){if(this._lat=0,(this._lng=0)!=arguments.length)if(1==arguments.length){if("string"==typeof arg){var m;if(!(m=arg.match(WPGMZA.LatLng.REGEXP)))throw new Error("Invalid LatLng string");arg={lat:m[1],lng:m[3]}}if("object"!=typeof arg||!("lat"in arg&&"lng"in arg))throw new Error("Argument must be a LatLng literal");this.lat=arg.lat,this.lng=arg.lng}else this.lat=arg,this.lng=lng},WPGMZA.LatLng.REGEXP=/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/,WPGMZA.LatLng.isValid=function(obj){return"object"==typeof obj&&("lat"in obj&&"lng"in obj)},WPGMZA.LatLng.isLatLngString=function(str){return"string"==typeof str&&!!str.match(WPGMZA.LatLng.REGEXP)},Object.defineProperty(WPGMZA.LatLng.prototype,"lat",{get:function(){return this._lat},set:function(val){if(!$.isNumeric(val))throw new Error("Latitude must be numeric");this._lat=parseFloat(val)}}),Object.defineProperty(WPGMZA.LatLng.prototype,"lng",{get:function(){return this._lng},set:function(val){if(!$.isNumeric(val))throw new Error("Longitude must be numeric");this._lng=parseFloat(val)}}),WPGMZA.LatLng.fromString=function(m){if(!WPGMZA.LatLng.isLatLngString(m))throw new Error("Not a valid latlng string");m=m.match(WPGMZA.LatLng.REGEXP);return new WPGMZA.LatLng({lat:parseFloat(m[1]),lng:parseFloat(m[3])})},WPGMZA.LatLng.prototype.toString=function(){return this._lat+", "+this._lng},WPGMZA.LatLng.fromCurrentPosition=function(callback,options){options=options||{},callback&&WPGMZA.getCurrentPosition(function(position){var latLng=new WPGMZA.LatLng({lat:position.coords.latitude,lng:position.coords.longitude});options.geocodeAddress?WPGMZA.Geocoder.createInstance().getAddressFromLatLng({latLng:latLng},function(results){results.length&&(latLng.address=results[0]),callback(latLng)}):callback(latLng)})},WPGMZA.LatLng.fromGoogleLatLng=function(googleLatLng){return new WPGMZA.LatLng(googleLatLng.lat(),googleLatLng.lng())},WPGMZA.LatLng.toGoogleLatLngArray=function(arr){var result=[];return arr.forEach(function(nativeLatLng){if(!(nativeLatLng instanceof WPGMZA.LatLng||"lat"in nativeLatLng&&"lng"in nativeLatLng))throw new Error("Unexpected input");result.push(new google.maps.LatLng({lat:parseFloat(nativeLatLng.lat),lng:parseFloat(nativeLatLng.lng)}))}),result},WPGMZA.LatLng.prototype.toGoogleLatLng=function(){return new google.maps.LatLng({lat:this.lat,lng:this.lng})},WPGMZA.LatLng.prototype.toLatLngLiteral=function(){return{lat:this.lat,lng:this.lng}},WPGMZA.LatLng.prototype.moveByDistance=function(sinDelta,cosDelta){var lambda2=parseFloat(sinDelta)/6371,phi2=parseFloat(cosDelta)/180*Math.PI,sinTheta=this.lat/180*Math.PI,lambda1=this.lng/180*Math.PI,sinPhi1=Math.sin(sinTheta),y=Math.cos(sinTheta),sinDelta=Math.sin(lambda2),cosDelta=Math.cos(lambda2),sinTheta=Math.sin(phi2),lambda2=sinPhi1*cosDelta+y*sinDelta*Math.cos(phi2),phi2=Math.asin(lambda2),y=sinTheta*sinDelta*y,lambda2=cosDelta-sinPhi1*lambda2,lambda2=lambda1+Math.atan2(y,lambda2);this.lat=180*phi2/Math.PI,this.lng=180*lambda2/Math.PI},WPGMZA.LatLng.prototype.getGreatCircleDistance=function(arg1,arg2){var deltaPhi=this.lat,a=this.lng;if(1==arguments.length)phi2=new WPGMZA.LatLng(arg1);else{if(2!=arguments.length)throw new Error("Invalid number of arguments");phi2=new WPGMZA.LatLng(arg1,arg2)}var lat2=phi2.lat,lon2=phi2.lng,phi1=deltaPhi.toRadians(),phi2=lat2.toRadians(),deltaPhi=(lat2-deltaPhi).toRadians(),a=(lon2-a).toRadians(),a=Math.sin(deltaPhi/2)*Math.sin(deltaPhi/2)+Math.cos(phi1)*Math.cos(phi2)*Math.sin(a/2)*Math.sin(a/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))}}),jQuery(function($){WPGMZA.LatLngBounds=function(southWest,northEast){var other;southWest instanceof WPGMZA.LatLngBounds?(other=southWest,this.south=other.south,this.north=other.north,this.west=other.west,this.east=other.east):southWest&&northEast&&(this.south=southWest.lat,this.north=northEast.lat,this.west=southWest.lng,this.east=northEast.lng)},WPGMZA.LatLngBounds.fromGoogleLatLngBounds=function(northEast){if(!(northEast instanceof google.maps.LatLngBounds))throw new Error("Argument must be an instance of google.maps.LatLngBounds");var result=new WPGMZA.LatLngBounds,southWest=northEast.getSouthWest(),northEast=northEast.getNorthEast();return result.north=northEast.lat(),result.south=southWest.lat(),result.west=southWest.lng(),result.east=northEast.lng(),result},WPGMZA.LatLngBounds.fromGoogleLatLngBoundsLiteral=function(northEast){var result=new WPGMZA.LatLngBounds,southWest=northEast.southwest,northEast=northEast.northeast;return result.north=northEast.lat,result.south=southWest.lat,result.west=southWest.lng,result.east=northEast.lng,result},WPGMZA.LatLngBounds.prototype.isInInitialState=function(){return null==this.north&&null==this.south&&null==this.west&&null==this.east},WPGMZA.LatLngBounds.prototype.extend=function(latLng){if(latLng instanceof WPGMZA.LatLng||(latLng=new WPGMZA.LatLng(latLng)),this.isInInitialState())return this.north=this.south=latLng.lat,void(this.west=this.east=latLng.lng);latLng.lat<this.north&&(this.north=latLng.lat),latLng.lat>this.south&&(this.south=latLng.lat),latLng.lng<this.west&&(this.west=latLng.lng),latLng.lng>this.east&&(this.east=latLng.lng)},WPGMZA.LatLngBounds.prototype.extendByPixelMargin=function(map,x,arg){var y=x;if(!(map instanceof WPGMZA.Map))throw new Error("First argument must be an instance of WPGMZA.Map");if(this.isInInitialState())throw new Error("Cannot extend by pixels in initial state");3<=arguments.length&&(y=arg);var southWest=new WPGMZA.LatLng(this.south,this.west),northEast=new WPGMZA.LatLng(this.north,this.east),southWest=map.latLngToPixels(southWest),northEast=map.latLngToPixels(northEast);southWest.x-=x,southWest.y+=y,northEast.x+=x,northEast.y-=y,southWest=map.pixelsToLatLng(southWest.x,southWest.y),northEast=map.pixelsToLatLng(northEast.x,northEast.y);this.toString();this.north=northEast.lat,this.south=southWest.lat,this.west=southWest.lng,this.east=northEast.lng},WPGMZA.LatLngBounds.prototype.contains=function(latLng){if(!(latLng instanceof WPGMZA.LatLng))throw new Error("Argument must be an instance of WPGMZA.LatLng");return!(latLng.lat<Math.min(this.north,this.south))&&(!(latLng.lat>Math.max(this.north,this.south))&&(this.west<this.east?latLng.lng>=this.west&&latLng.lng<=this.east:latLng.lng<=this.west||latLng.lng>=this.east))},WPGMZA.LatLngBounds.prototype.toString=function(){return this.north+"N "+this.south+"S "+this.west+"W "+this.east+"E"},WPGMZA.LatLngBounds.prototype.toLiteral=function(){return{north:this.north,south:this.south,west:this.west,east:this.east}}}),jQuery(function($){"map-edit"==WPGMZA.currentPage&&(WPGMZA.MapEditPage=function(){var diplay_enable_interactions_notice,self=this;this.themePanel=new WPGMZA.ThemePanel,this.themeEditor=new WPGMZA.ThemeEditor,this.map=WPGMZA.maps[0],"yes"!=WPGMZA.settings.wpgmza_settings_map_scroll&&"yes"!=WPGMZA.settings.wpgmza_settings_map_draggable&&"yes"!=WPGMZA.settings.wpgmza_settings_map_clickzoom||(diplay_enable_interactions_notice=$("<div class='notice notice-info wpgmza_disabled_interactions_notice' style= 'height: 45px; padding: 7px 5px 2px 5px;'><p style='float: left; padding-top: 10px;'>"+WPGMZA.localized_strings.disabled_interactions_notice+"</p><a class='button button-primary enable_interactions_notice_button' style='float: right;'>"+WPGMZA.localized_strings.disabled_interactions_button+"</a></div>"),$(".wpgmza_map").after(diplay_enable_interactions_notice),$(".enable_interactions_notice_button").on("click",function(){WPGMZA.mapEditPage.map.enableAllInteractions(),$(diplay_enable_interactions_notice).fadeOut("slow");var successNotice=$("<div class='notice notice-success'><p>"+WPGMZA.localized_strings.interactions_enabled_notice+"</p></div>");$(WPGMZA.mapEditPage.map.element).after(successNotice),$(successNotice).delay(2e3).fadeIn("slow"),$(successNotice).delay(4e3).fadeOut("slow")})),$("#wpgmza_max_zoom, #wpgmza_min_zoom").on("change input",function(event){self.onZoomLimitChanged(event)})},WPGMZA.MapEditPage.createInstance=function(){return new(WPGMZA.isProVersion()&&WPGMZA.Version.compare(WPGMZA.pro_version,"8.0.0")>=WPGMZA.Version.EQUAL_TO?WPGMZA.ProMapEditPage:WPGMZA.MapEditPage)},WPGMZA.MapEditPage.prototype.onZoomLimitChanged=function(event){this.map.setOptions({minZoom:$("#wpgmza_max_zoom").val(),maxZoom:$("#wpgmza_min_zoom").val()})},$(document.body).on("wpgmza_map_editor_init",function(event){WPGMZA.mapEditPage=WPGMZA.MapEditPage.createInstance()}))}),jQuery(function($){WPGMZA.MapObject=function(row){if(WPGMZA.assertInstanceOf(this,"MapObject"),WPGMZA.EventDispatcher.call(this),this.id=-1,this.map_id=null,this.guid=WPGMZA.guid(),this.modified=!0,this.settings={},row)for(var name in row)if("settings"==name){if(null==row.settings)this.settings={};else switch(typeof row.settings){case"string":this.settings=JSON.parse(row[name]);break;case"object":this.settings=row[name];break;default:throw new Error("Don't know how to interpret settings")}for(var name in this.settings){var value=this.settings[name];String(value).match(/^-?\d+$/)&&(this.settings[name]=parseInt(value))}}else this[name]=row[name]},WPGMZA.MapObject.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MapObject.prototype.constructor=WPGMZA.MapObject,WPGMZA.MapObject.prototype.parseGeometry=function(string){var pairs,coords,results=[];if("object"==typeof string)return string;pairs=string.replace(/[^ ,\d\.\-+e]/g,"").split(",");for(var i=0;i<pairs.length;i++)coords=pairs[i].split(" "),results.push({lat:parseFloat(coords[1]),lng:parseFloat(coords[0])});return results},WPGMZA.MapObject.prototype.toJSON=function(){return{id:this.id,guid:this.guid,settings:this.settings}}}),jQuery(function($){var Parent=WPGMZA.MapObject;WPGMZA.Circle=function(options,engineCircle){WPGMZA.assertInstanceOf(this,"Circle"),this.center=new WPGMZA.LatLng,this.radius=100,Parent.apply(this,arguments)},WPGMZA.Circle.prototype=Object.create(Parent.prototype),WPGMZA.Circle.prototype.constructor=WPGMZA.Circle,WPGMZA.Circle.createInstance=function(options){var constructor="open-layers"===WPGMZA.settings.engine?WPGMZA.OLCircle:WPGMZA.GoogleCircle;return new constructor(options)},WPGMZA.Circle.prototype.getCenter=function(){return this.center.clone()},WPGMZA.Circle.prototype.setCenter=function(latLng){this.center.lat=latLng.lat,this.center.lng=latLng.lng},WPGMZA.Circle.prototype.getRadius=function(){return this.radius},WPGMZA.Circle.prototype.setRadius=function(radius){this.radius=radius},WPGMZA.Circle.prototype.getMap=function(){return this.map},WPGMZA.Circle.prototype.setMap=function(map){this.map&&this.map.removeCircle(this),map&&map.addCircle(this)}}),jQuery(function($){WPGMZA.MapSettingsPage=function(){var self=this;this._keypressHistory=[],this.updateEngineSpecificControls(),this.updateGDPRControls(),$("#wpgmza-developer-mode").hide(),$(window).on("keypress",function(event){self.onKeyPress(event)}),$("select[name='wpgmza_maps_engine']").on("change",function(event){self.updateEngineSpecificControls()}),$("input[name='wpgmza_gdpr_require_consent_before_load'], input[name='wpgmza_gdpr_require_consent_before_vgm_submit'], input[name='wpgmza_gdpr_override_notice']").on("change",function(event){self.updateGDPRControls()})},WPGMZA.MapSettingsPage.createInstance=function(){return new WPGMZA.MapSettingsPage},WPGMZA.MapSettingsPage.prototype.updateEngineSpecificControls=function(){var engine=$("select[name='wpgmza_maps_engine']").val();$("[data-required-maps-engine][data-required-maps-engine!='"+engine+"']").hide(),$("[data-required-maps-engine='"+engine+"']").show()},WPGMZA.MapSettingsPage.prototype.updateGDPRControls=function(){var showNoticeControls=$("input[name='wpgmza_gdpr_require_consent_before_load']").prop("checked"),showOverrideTextarea=$("input[name='wpgmza_gdpr_require_consent_before_vgm_submit']");showOverrideTextarea.length&&(showNoticeControls=showNoticeControls||showOverrideTextarea.prop("checked"));showOverrideTextarea=showNoticeControls&&$("input[name='wpgmza_gdpr_override_notice']").prop("checked");showNoticeControls?$("#wpgmza-gdpr-compliance-notice").show("slow"):$("#wpgmza-gdpr-compliance-notice").hide("slow"),showOverrideTextarea?$("#wpgmza_gdpr_override_notice_text").show("slow"):$("#wpgmza_gdpr_override_notice_text").hide("slow")},WPGMZA.MapSettingsPage.prototype.flushGeocodeCache=function(){(new WPGMZA.OLGeocoder).clearCache(function(response){jQuery("#wpgmza_flush_cache_btn").removeAttr("disabled")})},WPGMZA.MapSettingsPage.prototype.onKeyPress=function(event){this._keypressHistory.push(event.key),9<this._keypressHistory.length&&(this._keypressHistory=this._keypressHistory.slice(this._keypressHistory.length-9)),"codecabin"!=this._keypressHistory.join("")||this._developerModeRevealed||($("#wpgmza-developer-mode").show(),this._developerModeRevealed=!0)},jQuery(function($){window.location.href.match(/wp-google-maps-menu-settings/)&&(WPGMZA.mapSettingsPage=WPGMZA.MapSettingsPage.createInstance(),jQuery(document).ready(function(){jQuery("#wpgmza_flush_cache_btn").on("click",function(){jQuery(this).attr("disabled","disabled"),WPGMZA.mapSettingsPage.flushGeocodeCache()})}))})}),jQuery(function($){WPGMZA.MapSettings=function(element){var json,self=this,str=element.getAttribute("data-settings");try{json=JSON.parse(str)}catch(e){str=(str=str.replace(/\\%/g,"%")).replace(/\\\\"/g,'\\"');try{json=JSON.parse(str)}catch(e){json={},console.warn("Failed to parse map settings JSON")}}function addSettings(input){if(input)for(var key in input){var value;"other_settings"!=key&&(value=input[key],String(value).match(/^-?\d+$/)&&(value=parseInt(value)),self[key]=value)}}WPGMZA.assertInstanceOf(this,"MapSettings"),addSettings(WPGMZA.settings),addSettings(json),json&&json.other_settings&&addSettings(json.other_settings)},WPGMZA.MapSettings.prototype.toOLViewOptions=function(){var coords,self=this,options={center:ol.proj.fromLonLat([-119.4179,36.7783]),zoom:4};function empty(name){return"object"!=typeof self[name]&&(!self[name]||!self[name].length)}return"string"==typeof this.start_location&&(coords=this.start_location.replace(/^\(|\)$/g,"").split(","),WPGMZA.isLatLngString(this.start_location)?options.center=ol.proj.fromLonLat([parseFloat(coords[1]),parseFloat(coords[0])]):console.warn("Invalid start location")),this.center&&(options.center=ol.proj.fromLonLat([parseFloat(this.center.lng),parseFloat(this.center.lat)])),empty("map_start_lat")||empty("map_start_lng")||(options.center=ol.proj.fromLonLat([parseFloat(this.map_start_lng),parseFloat(this.map_start_lat)])),this.zoom&&(options.zoom=parseInt(this.zoom)),this.start_zoom&&(options.zoom=parseInt(this.start_zoom)),this.map_min_zoom&&this.map_max_zoom&&(options.minZoom=Math.min(this.map_min_zoom,this.map_max_zoom),options.maxZoom=Math.max(this.map_min_zoom,this.map_max_zoom)),options},WPGMZA.MapSettings.prototype.toGoogleMapsOptions=function(){var self=this,zoom=this.start_location&&this.start_location.length?this.start_location.split(","):[36.7783,-119.4179];function empty(name){return"object"!=typeof self[name]&&(!self[name]||!self[name].length)}function formatCoord(coord){return $.isNumeric(coord)?coord:parseFloat(String(coord).replace(/[\(\)\s]/,""))}var latLng=new google.maps.LatLng(formatCoord(zoom[0]),formatCoord(zoom[1])),zoom=this.start_zoom?parseInt(this.start_zoom):4;!this.start_zoom&&this.zoom&&(zoom=parseInt(this.zoom));var options={zoom:zoom,center:latLng};switch(empty("center")||(options.center=new google.maps.LatLng({lat:parseFloat(this.center.lat),lng:parseFloat(this.center.lng)})),empty("map_start_lat")||empty("map_start_lng")||(options.center=new google.maps.LatLng({lat:parseFloat(this.map_start_lat),lng:parseFloat(this.map_start_lng)})),this.map_min_zoom&&this.map_max_zoom&&(options.minZoom=Math.min(this.map_min_zoom,this.map_max_zoom),options.maxZoom=Math.max(this.map_min_zoom,this.map_max_zoom)),options.zoomControl=!("yes"==this.wpgmza_settings_map_zoom),options.panControl=!("yes"==this.wpgmza_settings_map_pan),options.mapTypeControl=!("yes"==this.wpgmza_settings_map_type),options.streetViewControl=!("yes"==this.wpgmza_settings_map_streetview),options.fullscreenControl=!("yes"==this.wpgmza_settings_map_full_screen_control),options.draggable=!("yes"==this.wpgmza_settings_map_draggable),options.disableDoubleClickZoom="yes"==this.wpgmza_settings_map_clickzoom,this.wpgmza_settings_map_scroll&&(options.scrollwheel=!1),"greedy"==this.wpgmza_force_greedy_gestures||"yes"==this.wpgmza_force_greedy_gestures?options.gestureHandling="greedy":options.gestureHandling="cooperative",parseInt(this.type)){case 2:options.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case 3:options.mapTypeId=google.maps.MapTypeId.HYBRID;break;case 4:options.mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:options.mapTypeId=google.maps.MapTypeId.ROADMAP}return this.wpgmza_theme_data&&this.wpgmza_theme_data.length&&(options.styles=WPGMZA.GoogleMap.parseThemeData(this.wpgmza_theme_data)),options}}),jQuery(function($){WPGMZA.Map=function(element,options){if(WPGMZA.assertInstanceOf(this,"Map"),WPGMZA.EventDispatcher.call(this),!(element instanceof HTMLElement))throw new Error("Argument must be a HTMLElement");if(element.hasAttribute("data-map-id")?this.id=element.getAttribute("data-map-id"):this.id=1,!/\d+/.test(this.id))throw new Error("Map ID must be an integer");if(WPGMZA.maps.push(this),this.element=element,(this.element.wpgmzaMap=this).engineElement=element,this.markers=[],this.polygons=[],this.polylines=[],this.circles=[],this.rectangles=[],this.loadSettings(options),this.shortcodeAttributes={},$(this.element).attr("data-shortcode-attributes"))try{this.shortcodeAttributes=JSON.parse($(this.element).attr("data-shortcode-attributes"))}catch(e){console.warn("Error parsing shortcode attributes")}WPGMZA.getCurrentPage()!=WPGMZA.PAGE_MAP_EDIT&&this.initStoreLocator(),this.markerFilter=WPGMZA.MarkerFilter.createInstance(this)},WPGMZA.Map.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.Map.prototype.constructor=WPGMZA.Map,WPGMZA.Map.nightTimeThemeData=[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{color:"#575663"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#80823e"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#1b737a"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}],WPGMZA.Map.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.GoogleProMap:WPGMZA.GoogleMap:WPGMZA.isProVersion()?WPGMZA.OLProMap:WPGMZA.OLMap},WPGMZA.Map.createInstance=function(element,options){return new(WPGMZA.Map.getConstructor())(element,options)},Object.defineProperty(WPGMZA.Map.prototype,"lat",{get:function(){return this.getCenter().lat},set:function(value){var center=this.getCenter();center.lat=value,this.setCenter(center)}}),Object.defineProperty(WPGMZA.Map.prototype,"lng",{get:function(){return this.getCenter().lng},set:function(value){var center=this.getCenter();center.lng=value,this.setCenter(center)}}),Object.defineProperty(WPGMZA.Map.prototype,"zoom",{get:function(){return this.getZoom()},set:function(value){this.setZoom(value)}}),WPGMZA.Map.prototype.loadSettings=function(options){var settings=new WPGMZA.MapSettings(this.element);settings.other_settings;if(delete settings.other_settings,options)for(var key in options)settings[key]=options[key];this.settings=settings},WPGMZA.Map.prototype.initStoreLocator=function(){var storeLocatorElement=$(".wpgmza_sl_main_div");storeLocatorElement.length&&(this.storeLocator=WPGMZA.StoreLocator.createInstance(this,storeLocatorElement[0]))},WPGMZA.Map.prototype.setOptions=function(options){for(var name in options)this.settings[name]=options[name]};Math.PI;function deg2rad(deg){return deg*(Math.PI/180)}WPGMZA.Map.getGeographicDistance=function(lat1,a,lat2,lon2){var dLat=deg2rad(lat2-lat1),a=deg2rad(lon2-a),a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(deg2rad(lat1))*Math.cos(deg2rad(lat2))*Math.sin(a/2)*Math.sin(a/2);return 6371*(2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a)))},WPGMZA.Map.prototype.setCenter=function(latLng){if(!("lat"in latLng&&"lng"in latLng))throw new Error("Argument is not an object with lat and lng")},WPGMZA.Map.prototype.setDimensions=function(width,height){$(this.element).css({width:width}),$(this.engineElement).css({width:"100%",height:height})},WPGMZA.Map.prototype.addMarker=function(marker){if(!(marker instanceof WPGMZA.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker");marker.map=this,(marker.parent=this).markers.push(marker),this.dispatchEvent({type:"markeradded",marker:marker}),marker.dispatchEvent({type:"added"})},WPGMZA.Map.prototype.removeMarker=function(marker){if(!(marker instanceof WPGMZA.Marker))throw new Error("Argument must be an instance of WPGMZA.Marker");marker.map!==this&&console.error("Wrong map error"),marker.infoWindow&&marker.infoWindow.close(),marker.map=null,marker.parent=null,this.markers.splice(this.markers.indexOf(marker),1),this.dispatchEvent({type:"markerremoved",marker:marker}),marker.dispatchEvent({type:"removed"})},WPGMZA.Map.prototype.getMarkerByID=function(id){for(var i=0;i<this.markers.length;i++)if(this.markers[i].id==id)return this.markers[i];return null},WPGMZA.Map.prototype.getMarkerByTitle=function(title){if("string"==typeof title){for(var i=0;i<this.markers.length;i++)if(this.markers[i].title==title)return this.markers[i]}else{if(!(title instanceof RegExp))throw new Error("Invalid argument");for(i=0;i<this.markers.length;i++)if(title.test(this.markers[i].title))return this.markers[i]}return null},WPGMZA.Map.prototype.removeMarkerByID=function(marker){marker=this.getMarkerByID(marker);marker&&this.removeMarker(marker)},WPGMZA.Map.prototype.addPolygon=function(polygon){if(!(polygon instanceof WPGMZA.Polygon))throw new Error("Argument must be an instance of WPGMZA.Polygon");(polygon.map=this).polygons.push(polygon),this.dispatchEvent({type:"polygonadded",polygon:polygon})},WPGMZA.Map.prototype.removePolygon=function(polygon){if(!(polygon instanceof WPGMZA.Polygon))throw new Error("Argument must be an instance of WPGMZA.Polygon");if(polygon.map!==this)throw new Error("Wrong map error");polygon.map=null,this.polygons.splice(this.polygons.indexOf(polygon),1),this.dispatchEvent({type:"polygonremoved",polygon:polygon})},WPGMZA.Map.prototype.getPolygonByID=function(id){for(var i=0;i<this.polygons.length;i++)if(this.polygons[i].id==id)return this.polygons[i];return null},WPGMZA.Map.prototype.removePolygonByID=function(polygon){polygon=this.getPolygonByID(polygon);polygon&&this.removePolygon(polygon)},WPGMZA.Map.prototype.getPolylineByID=function(id){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i].id==id)return this.polylines[i];return null},WPGMZA.Map.prototype.addPolyline=function(polyline){if(!(polyline instanceof WPGMZA.Polyline))throw new Error("Argument must be an instance of WPGMZA.Polyline");(polyline.map=this).polylines.push(polyline),this.dispatchEvent({type:"polylineadded",polyline:polyline})},WPGMZA.Map.prototype.removePolyline=function(polyline){if(!(polyline instanceof WPGMZA.Polyline))throw new Error("Argument must be an instance of WPGMZA.Polyline");if(polyline.map!==this)throw new Error("Wrong map error");polyline.map=null,this.polylines.splice(this.polylines.indexOf(polyline),1),this.dispatchEvent({type:"polylineremoved",polyline:polyline})},WPGMZA.Map.prototype.getPolylineByID=function(id){for(var i=0;i<this.polylines.length;i++)if(this.polylines[i].id==id)return this.polylines[i];return null},WPGMZA.Map.prototype.removePolylineByID=function(polyline){polyline=this.getPolylineByID(polyline);polyline&&this.removePolyline(polyline)},WPGMZA.Map.prototype.addCircle=function(circle){if(!(circle instanceof WPGMZA.Circle))throw new Error("Argument must be an instance of WPGMZA.Circle");(circle.map=this).circles.push(circle),this.dispatchEvent({type:"circleadded",circle:circle})},WPGMZA.Map.prototype.removeCircle=function(circle){if(!(circle instanceof WPGMZA.Circle))throw new Error("Argument must be an instance of WPGMZA.Circle");if(circle.map!==this)throw new Error("Wrong map error");circle.map=null,this.circles.splice(this.circles.indexOf(circle),1),this.dispatchEvent({type:"circleremoved",circle:circle})},WPGMZA.Map.prototype.getCircleByID=function(id){for(var i=0;i<this.circles.length;i++)if(this.circles[i].id==id)return this.circles[i];return null},WPGMZA.Map.prototype.removeCircleByID=function(circle){circle=this.getCircleByID(circle);circle&&this.removeCircle(circle)},WPGMZA.Map.prototype.nudgeLatLng=function(pixels,x,y){pixels=this.latLngToPixels(pixels);if(pixels.x+=parseFloat(x),pixels.y+=parseFloat(y),isNaN(pixels.x)||isNaN(pixels.y))throw new Error("Invalid coordinates supplied");return this.pixelsToLatLng(pixels)},WPGMZA.Map.prototype.nudge=function(x,nudged){nudged=this.nudgeLatLng(this.getCenter(),x,nudged);this.setCenter(nudged)},WPGMZA.Map.prototype.animateNudge=function(x,nudged,origin,milliseconds){if(origin){if(!(origin instanceof WPGMZA.LatLng))throw new Error("Origin must be an instance of WPGMZA.LatLng")}else origin=this.getCenter();nudged=this.nudgeLatLng(origin,x,nudged),milliseconds=milliseconds||WPGMZA.getScrollAnimationDuration(),$(this).animate({lat:nudged.lat,lng:nudged.lng},milliseconds)},WPGMZA.Map.prototype.onWindowResize=function(event){},WPGMZA.Map.prototype.onElementResized=function(event){},WPGMZA.Map.prototype.onBoundsChanged=function(event){this.trigger("boundschanged"),this.trigger("bounds_changed")},WPGMZA.Map.prototype.onIdle=function(event){this.trigger("idle")},WPGMZA.Map.prototype.hasVisibleMarkers=function(event){var marker_id,markers_visible=0;for(marker_id in marker_array){var marker=marker_array[marker_id];if(marker.isFilterable&&marker.getMap()){markers_visible++;break}}return 0<markers_visible},WPGMZA.Map.prototype.closeAllInfoWindows=function(){this.markers.forEach(function(marker){marker.infoWindow&&marker.infoWindow.close()})}}),jQuery(function($){WPGMZA.MapsEngineDialog=function(element){var self=this;this.element=element,window.wpgmzaUnbindSaveReminder&&window.wpgmzaUnbindSaveReminder(),$(element).show(),$(element).remodal().open(),$(element).find("input:radio").on("change",function(event){$("#wpgmza-confirm-engine").prop("disabled",!1)}),$("#wpgmza-confirm-engine").on("click",function(event){self.onButtonClicked(event)})},WPGMZA.MapsEngineDialog.prototype.onButtonClicked=function(event){$(event.target).prop("disabled",!0),$.ajax(WPGMZA.ajaxurl,{method:"POST",data:{action:"wpgmza_maps_engine_dialog_set_engine",engine:$("[name='wpgmza_maps_engine']:checked").val(),nonce:$("#wpgmza-maps-engine-dialog").attr("data-ajax-nonce")},success:function(response,status,xhr){window.location.reload()}})},$(window).on("load",function(event){var element=$("#wpgmza-maps-engine-dialog");element.length&&(WPGMZA.settings.wpgmza_maps_engine_dialog_done||WPGMZA.settings.wpgmza_google_maps_api_key&&WPGMZA.settings.wpgmza_google_maps_api_key.length||(WPGMZA.mapsEngineDialog=new WPGMZA.MapsEngineDialog(element)))})}),jQuery(function($){WPGMZA.MarkerFilter=function(map){WPGMZA.EventDispatcher.call(this),this.map=map},WPGMZA.MarkerFilter.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.MarkerFilter.prototype.constructor=WPGMZA.MarkerFilter,WPGMZA.MarkerFilter.createInstance=function(map){return new WPGMZA.MarkerFilter(map)},WPGMZA.MarkerFilter.prototype.getFilteringParameters=function(){var params={map_id:this.map.id};return this.map.storeLocator&&(params=$.extend(params,this.map.storeLocator.getFilteringParameters())),params},WPGMZA.MarkerFilter.prototype.update=function(){},WPGMZA.MarkerFilter.prototype.onFilteringComplete=function(results){}}),jQuery(function($){WPGMZA.MarkerPanel=function(element){this.element=element},$(document.body).on("wpgmza_map_editor_init",function(event){WPGMZA.getCurrentPage()==WPGMZA.PAGE_MAP_EDIT&&(WPGMZA.mapEditPage.markerPanel=new WPGMZA.MarkerPanel($("#wpgmza-marker-edit-panel")[0]))})}),jQuery(function($){WPGMZA.Marker=function(row){var self=this;this._offset={x:0,y:0},WPGMZA.assertInstanceOf(this,"Marker"),this.lat="36.778261",this.lng="-119.4179323999",this.address="California",this.title=null,this.description="",this.link="",this.icon="",this.approved=1,this.pic=null,this.isFilterable=!0,this.disableInfoWindow=!1,WPGMZA.MapObject.apply(this,arguments),row&&row.heatmap||(row&&this.on("init",function(event){row.position&&this.setPosition(row.position),row.map&&row.map.addMarker(this)}),this.addEventListener("added",function(event){self.onAdded(event)}),this.handleLegacyGlobals(row))},WPGMZA.Marker.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Marker.prototype.constructor=WPGMZA.Marker,WPGMZA.Marker.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.GoogleProMarker:WPGMZA.GoogleMarker:WPGMZA.isProVersion()?WPGMZA.OLProMarker:WPGMZA.OLMarker},WPGMZA.Marker.createInstance=function(row){return new(WPGMZA.Marker.getConstructor())(row)},WPGMZA.Marker.ANIMATION_NONE="0",WPGMZA.Marker.ANIMATION_BOUNCE="1",WPGMZA.Marker.ANIMATION_DROP="2",Object.defineProperty(WPGMZA.Marker.prototype,"offsetX",{get:function(){return this._offset.x},set:function(value){this._offset.x=value,this.updateOffset()}}),Object.defineProperty(WPGMZA.Marker.prototype,"offsetY",{get:function(){return this._offset.y},set:function(value){this._offset.y=value,this.updateOffset()}}),WPGMZA.Marker.prototype.onAdded=function(event){var self=this;this.addEventListener("click",function(event){self.onClick(event)}),this.addEventListener("mouseover",function(event){self.onMouseOver(event)}),this.addEventListener("select",function(event){self.onSelect(event)}),this.map.settings.marker==this.id&&self.trigger("select"),"1"==this.infoopen&&this.openInfoWindow()},WPGMZA.Marker.prototype.handleLegacyGlobals=function(cloned){var m;WPGMZA.settings.useLegacyGlobals&&this.map_id&&this.id&&(WPGMZA.pro_version&&(m=WPGMZA.pro_version.match(/\d+/))&&m[0]<=7||(window.marker_array||(window.marker_array={}),marker_array[this.map_id]||(marker_array[this.map_id]=[]),marker_array[this.map_id][this.id]=this,window.wpgmaps_localize_marker_data||(window.wpgmaps_localize_marker_data={}),wpgmaps_localize_marker_data[this.map_id]||(wpgmaps_localize_marker_data[this.map_id]=[]),cloned=$.extend({marker_id:this.id},cloned),wpgmaps_localize_marker_data[this.map_id][this.id]=cloned))},WPGMZA.Marker.prototype.initInfoWindow=function(){this.infoWindow||(this.infoWindow=WPGMZA.InfoWindow.createInstance())},WPGMZA.Marker.prototype.openInfoWindow=function(){this.map?"map-edit"==WPGMZA.currentPage&&!WPGMZA.pro_version||(this.map.lastInteractedMarker&&this.map.lastInteractedMarker.infoWindow.close(),(this.map.lastInteractedMarker=this).initInfoWindow(),this.infoWindow.open(this.map,this)):console.warn("Cannot open infowindow for marker with no map")},WPGMZA.Marker.prototype.onClick=function(event){},WPGMZA.Marker.prototype.onSelect=function(event){this.openInfoWindow()},WPGMZA.Marker.prototype.onMouseOver=function(event){this.map.settings.info_window_open_by==WPGMZA.InfoWindow.OPEN_BY_HOVER&&this.openInfoWindow()},WPGMZA.Marker.prototype.getIcon=function(){function stripProtocol(url){return"string"!=typeof url?url:url.replace(/^http(s?):/,"")}return WPGMZA.defaultMarkerIcon?stripProtocol(WPGMZA.defaultMarkerIcon):stripProtocol(WPGMZA.settings.default_marker_icon)},WPGMZA.Marker.prototype.getPosition=function(){return new WPGMZA.LatLng({lat:parseFloat(this.lat),lng:parseFloat(this.lng)})},WPGMZA.Marker.prototype.setPosition=function(latLng){latLng instanceof WPGMZA.LatLng?(this.lat=latLng.lat,this.lng=latLng.lng):(this.lat=parseFloat(latLng.lat),this.lng=parseFloat(latLng.lng))},WPGMZA.Marker.prototype.setOffset=function(x,y){this._offset.x=x,this._offset.y=y,this.updateOffset()},WPGMZA.Marker.prototype.updateOffset=function(){},WPGMZA.Marker.prototype.getAnimation=function(animation){return this.settings.animation},WPGMZA.Marker.prototype.setAnimation=function(animation){this.settings.animation=animation},WPGMZA.Marker.prototype.getVisible=function(){},WPGMZA.Marker.prototype.setVisible=function(visible){!visible&&this.infoWindow&&this.infoWindow.close()},WPGMZA.Marker.prototype.getMap=function(){return this.map},WPGMZA.Marker.prototype.setMap=function(map){map?map.addMarker(this):this.map&&this.map.removeMarker(this),this.map=map},WPGMZA.Marker.prototype.getDraggable=function(){},WPGMZA.Marker.prototype.setDraggable=function(draggable){},WPGMZA.Marker.prototype.setOptions=function(options){},WPGMZA.Marker.prototype.setOpacity=function(opacity){},WPGMZA.Marker.prototype.panIntoView=function(){if(!this.map)throw new Error("Marker hasn't been added to a map");this.map.setCenter(this.getPosition())},WPGMZA.Marker.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this),position=this.getPosition();return $.extend(result,{lat:position.lat,lng:position.lng,address:this.address,title:this.title,description:this.description,link:this.link,icon:this.icon,pic:this.pic,approved:this.approved}),result}}),jQuery(function($){WPGMZA.ModernStoreLocatorCircle=function(map_id,settings){var map=WPGMZA.isProVersion()?this.map=MYMAP[map_id].map:this.map=MYMAP.map;this.map_id=map_id,this.mapElement=map.element,this.mapSize={width:$(this.mapElement).width(),height:$(this.mapElement).height()},this.initCanvasLayer(),this.settings={center:new WPGMZA.LatLng(0,0),radius:1,color:"#63AFF2",shadowColor:"white",shadowBlur:4,centerRingRadius:10,centerRingLineWidth:3,numInnerRings:9,innerRingLineWidth:1,innerRingFade:!0,numOuterRings:7,ringLineWidth:1,mainRingLineWidth:2,numSpokes:6,spokesStartAngle:Math.PI/2,numRadiusLabels:6,radiusLabelsStartAngle:Math.PI/2,radiusLabelFont:"13px sans-serif",visible:!1},settings&&this.setOptions(settings)},WPGMZA.ModernStoreLocatorCircle.createInstance=function(map,settings){return new("google-maps"==WPGMZA.settings.engine?WPGMZA.GoogleModernStoreLocatorCircle:WPGMZA.OLModernStoreLocatorCircle)(map,settings)},WPGMZA.ModernStoreLocatorCircle.prototype.initCanvasLayer=function(){},WPGMZA.ModernStoreLocatorCircle.prototype.onResize=function(event){this.draw()},WPGMZA.ModernStoreLocatorCircle.prototype.onUpdate=function(event){this.draw()},WPGMZA.ModernStoreLocatorCircle.prototype.setOptions=function(options){for(var name in options){var functionName="set"+name.substr(0,1).toUpperCase()+name.substr(1);"function"==typeof this[functionName]?this[functionName](options[name]):this.settings[name]=options[name]}},WPGMZA.ModernStoreLocatorCircle.prototype.getResolutionScale=function(){return window.devicePixelRatio||1},WPGMZA.ModernStoreLocatorCircle.prototype.getCenter=function(){return this.getPosition()},WPGMZA.ModernStoreLocatorCircle.prototype.setCenter=function(value){this.setPosition(value)},WPGMZA.ModernStoreLocatorCircle.prototype.getPosition=function(){return this.settings.center},WPGMZA.ModernStoreLocatorCircle.prototype.setPosition=function(position){this.settings.center=position},WPGMZA.ModernStoreLocatorCircle.prototype.getRadius=function(){return this.settings.radius},WPGMZA.ModernStoreLocatorCircle.prototype.setRadius=function(radius){if(isNaN(radius))throw new Error("Invalid radius");this.settings.radius=radius},WPGMZA.ModernStoreLocatorCircle.prototype.getVisible=function(){return this.settings.visible},WPGMZA.ModernStoreLocatorCircle.prototype.setVisible=function(visible){this.settings.visible=visible},WPGMZA.ModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.getContext=function(type){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){throw new Error("Abstract function called")},WPGMZA.ModernStoreLocatorCircle.prototype.validateSettings=function(){WPGMZA.isHexColorString(this.settings.color)||(this.settings.color="#63AFF2")},WPGMZA.ModernStoreLocatorCircle.prototype.draw=function(){this.validateSettings();var settings=this.settings,end=this.getCanvasDimensions(),m=end.width,start=end.height;this.map,this.getResolutionScale();if(context=this.getContext("2d"),context.clearRect(0,0,m,start),settings.visible){context.shadowColor=settings.shadowColor,context.shadowBlur=settings.shadowBlur,context.setTransform(1,0,0,1,0,0);var scale=this.getScale();context.scale(scale,scale);end=this.getWorldOriginOffset();context.translate(end.x,end.y);new WPGMZA.LatLng(this.settings.center);var worldPoint=this.getCenterPixels(),rgba=WPGMZA.hexToRgba(settings.color),ringSpacing=this.getTransformedRadius(settings.radius)/(settings.numInnerRings+1);context.strokeStyle=settings.color,context.lineWidth=1/scale*settings.centerRingLineWidth,context.beginPath(),context.arc(worldPoint.x,worldPoint.y,this.getTransformedRadius(settings.centerRingRadius)/scale,0,2*Math.PI),context.stroke(),context.closePath();var radius=this.getTransformedRadius(settings.radius)+ringSpacing*settings.numOuterRings+1,m=context.createRadialGradient(0,0,0,0,0,radius),rgba=WPGMZA.hexToRgba(settings.color),start=WPGMZA.rgbaToString(rgba);rgba.a=0,end=WPGMZA.rgbaToString(rgba),m.addColorStop(0,start),m.addColorStop(1,end),context.save(),context.translate(worldPoint.x,worldPoint.y),context.strokeStyle=m,context.lineWidth=2/scale;for(var i=0;i<settings.numSpokes;i++)spokeAngle=settings.spokesStartAngle+2*Math.PI*(i/settings.numSpokes),x=Math.cos(spokeAngle)*radius,y=Math.sin(spokeAngle)*radius,context.setLineDash([2/scale,15/scale]),context.beginPath(),context.moveTo(0,0),context.lineTo(x,y),context.stroke();context.setLineDash([]),context.restore(),context.lineWidth=1/scale*settings.innerRingLineWidth;for(i=1;i<=settings.numInnerRings;i++){radius=i*ringSpacing;settings.innerRingFade&&(rgba.a=1-(i-1)/settings.numInnerRings),context.strokeStyle=WPGMZA.rgbaToString(rgba),context.beginPath(),context.arc(worldPoint.x,worldPoint.y,radius,0,2*Math.PI),context.stroke(),context.closePath()}context.strokeStyle=settings.color,context.lineWidth=1/scale*settings.centerRingLineWidth,context.beginPath(),context.arc(worldPoint.x,worldPoint.y,this.getTransformedRadius(settings.radius),0,2*Math.PI),context.stroke(),context.closePath();for(radius=radius+ringSpacing,i=0;i<settings.numOuterRings;i++)settings.innerRingFade&&(rgba.a=1-i/settings.numOuterRings),context.strokeStyle=WPGMZA.rgbaToString(rgba),context.beginPath(),context.arc(worldPoint.x,worldPoint.y,radius,0,2*Math.PI),context.stroke(),context.closePath(),radius+=ringSpacing;if(0<settings.numRadiusLabels){var x,y,radius=this.getTransformedRadius(settings.radius);(m=settings.radiusLabelFont.match(/(\d+)px/))&&parseInt(m[1]),context.font=settings.radiusLabelFont,context.textAlign="center",context.textBaseline="middle",context.fillStyle=settings.color,context.save(),context.translate(worldPoint.x,worldPoint.y);for(i=0;i<settings.numRadiusLabels;i++){var spokeAngle,textAngle=(spokeAngle=settings.radiusLabelsStartAngle+2*Math.PI*(i/settings.numRadiusLabels))+Math.PI/2,width=settings.radiusString;0<Math.sin(spokeAngle)&&(textAngle-=Math.PI),x=Math.cos(spokeAngle)*radius,y=Math.sin(spokeAngle)*radius,context.save(),context.translate(x,y),context.rotate(textAngle),context.scale(1/scale,1/scale),width=context.measureText(width).width,height=width/2,context.clearRect(-width,-height,2*width,2*height),context.fillText(settings.radiusString,0,0),context.restore()}context.restore()}}}}),jQuery(function($){WPGMZA.ModernStoreLocator=function(map_id){var original,inner,placeholder,button,container,items,numCategories,icons,self=this,map=WPGMZA.getMapByID(map_id);WPGMZA.assertInstanceOf(this,"ModernStoreLocator"),(original=(WPGMZA.isProVersion()?$(".wpgmza_sl_search_button[mid='"+map_id+"'], .wpgmza_sl_search_button_"+map_id):$(".wpgmza_sl_search_button")).closest(".wpgmza_sl_main_div")).length&&(this.element=$("<div class='wpgmza-modern-store-locator'><div class='wpgmza-inner wpgmza-modern-hover-opaque'/></div>")[0],inner=$(this.element).find(".wpgmza-inner"),items=WPGMZA.isProVersion()?$(original).find(".addressInput"):$(original).find("#addressInput"),wpgmaps_localize[map_id].other_settings.store_locator_query_string&&wpgmaps_localize[map_id].other_settings.store_locator_query_string.length&&items.attr("placeholder",wpgmaps_localize[map_id].other_settings.store_locator_query_string),inner.append(items),(button=$(original).find("[id='nameInput_"+map_id+"']")).length&&((placeholder=wpgmaps_localize[map_id].other_settings.store_locator_name_string)&&placeholder.length&&button.attr("placeholder",placeholder),inner.append(button)),(button=$(original).find("button.wpgmza-use-my-location"))&&inner.append(button),$(items).on("keydown keypress",function(event){13==event.keyCode&&(self.searchButton.trigger("click"),searchLocations(map_id),map.storeLocator.onSearch(event))}),$(items).on("input",function(event){self.searchButton.show(),self.resetButton.hide()}),inner.append($(original).find("select.wpgmza_sl_radius_select")),this.searchButton=$(original).find(".wpgmza_sl_search_button, .wpgmza_sl_search_button_div"),inner.append(this.searchButton),this.resetButton=$(original).find(".wpgmza_sl_reset_button_div"),inner.append(this.resetButton),this.resetButton.on("click",function(event){resetLocations(map_id)}),this.resetButton.hide(),WPGMZA.isProVersion()&&(this.searchButton.on("click",function(event){0!=$("addressInput_"+map_id).val()&&(self.searchButton.hide(),self.resetButton.show(),map.storeLocator.state=WPGMZA.StoreLocator.STATE_APPLIED)}),this.resetButton.on("click",function(event){self.resetButton.hide(),self.searchButton.show(),map.storeLocator.state=WPGMZA.StoreLocator.STATE_INITIAL})),inner.append($("#wpgmza_distance_type_"+map_id)),container=$(original).find(".wpgmza_cat_checkbox_holder"),$(container).children("ul"),items=$(container).find("li"),numCategories=0,icons=[],items.each(function(index,el){var category_id,id=$(el).attr("class").match(/\d+/);for(category_id in wpgmza_category_data)if(id==category_id){var src=wpgmza_category_data[category_id].image,icon=$('<div class="wpgmza-chip-icon"/>');icon.css({"background-image":"url('"+src+"')",width:$("#wpgmza_cat_checkbox_"+category_id+" + label").height()+"px"}),icons.push(icon),null!=src&&""!=src&&$("#wpgmza_cat_checkbox_"+category_id+" + label").prepend(icon),numCategories++;break}}),$(this.element).append(container),numCategories&&(this.optionsButton=$('<span class="wpgmza_store_locator_options_button"><i class="fa fa-list"></i></span>'),$(this.searchButton).before(this.optionsButton)),setInterval(function(){icons.forEach(function(icon){var height=$(icon).height();$(icon).css({width:height+"px"}),$(icon).closest("label").css({"padding-left":height+8+"px"})}),$(container).css("width",$(self.element).find(".wpgmza-inner").outerWidth()+"px")},1e3),$(this.element).find(".wpgmza_store_locator_options_button").on("click",function(event){container.hasClass("wpgmza-open")?container.removeClass("wpgmza-open"):container.addClass("wpgmza-open")}),$(original).remove(),$(this.element).find("input, select").on("focus",function(){$(inner).addClass("active")}),$(this.element).find("input, select").on("blur",function(){$(inner).removeClass("active")}),$(this.element).on("mouseover","li.wpgmza_cat_checkbox_item_holder",function(event){self.onMouseOverCategory(event)}),$(this.element).on("mouseleave","li.wpgmza_cat_checkbox_item_holder",function(event){self.onMouseLeaveCategory(event)}),$(map.markerFilter).on("filteringcomplete",function(event){this.map.hasVisibleMarkers()||(this.map.settings.store_locator_not_found_message!=WPGMZA.localized_strings.zero_results&&""!=this.map.settings.store_locator_not_found_message?alert(this.map.settings.store_locator_not_found_message):alert(WPGMZA.localized_strings.zero_results))}),$("body").on("click",".wpgmza_store_locator_options_button",function(event){setTimeout(function(){var position_cat,$p_map;$(".wpgmza_cat_checkbox_holder").hasClass("wpgmza-open")&&(position_cat=($p_map=$(".wpgmza_cat_checkbox_holder")).position().top+$p_map.outerHeight(!0)+$(".wpgmza-modern-store-locator").height(),($p_map=$(".wpgmza_map")).position().top+$p_map.outerHeight(!0)<=position_cat&&($(".wpgmza_cat_ul").css("overflow","scroll "),$(".wpgmza_cat_ul").css("height","100%"),$(".wpgmza-modern-store-locator").css("height","100%"),$(".wpgmza_cat_checkbox_holder.wpgmza-open").css({"padding-bottom":"50px",height:"100%"})))},500)}))},WPGMZA.ModernStoreLocator.createInstance=function(map_id){return new("open-layers"!==WPGMZA.settings.engine?WPGMZA.GoogleModernStoreLocator:WPGMZA.OLModernStoreLocator)(map_id)},WPGMZA.ModernStoreLocator.prototype.onMouseOverCategory=function(li){li=li.currentTarget;$(li).children("ul.wpgmza_cat_checkbox_item_holder").stop(!0,!1).fadeIn()},WPGMZA.ModernStoreLocator.prototype.onMouseLeaveCategory=function(li){li=li.currentTarget;$(li).children("ul.wpgmza_cat_checkbox_item_holder").stop(!0,!1).fadeOut()}}),jQuery(function($){WPGMZA.NativeMapsAppIcon=function(){navigator.userAgent.match(/^Apple|iPhone|iPad|iPod/)?(this.type="apple",this.element=$('<span><i class="fab fa fa-apple" aria-hidden="true"></i></span>')):(this.type="google",this.element=$('<span><i class="fab fa fa-google" aria-hidden="true"></i></span>'))}}),jQuery(function($){Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,"slice",{value:function(begin,end){return new Uint8Array(Array.prototype.slice.call(this,begin,end))}}),WPGMZA.isSafari()&&!window.external&&(window.external={})}),jQuery(function($){WPGMZA.Polygon=function(row,enginePolygon){WPGMZA.assertInstanceOf(this,"Polygon"),this.paths=null,this.title=null,this.name=null,this.link=null,WPGMZA.MapObject.apply(this,arguments)},WPGMZA.Polygon.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Polygon.prototype.constructor=WPGMZA.Polygon,WPGMZA.Polygon.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.isProVersion()?WPGMZA.GoogleProPolygon:WPGMZA.GooglePolygon:WPGMZA.isProVersion()?WPGMZA.OLProPolygon:WPGMZA.OLPolygon},WPGMZA.Polygon.createInstance=function(row,engineObject){return new(WPGMZA.Polygon.getConstructor())(row,engineObject)},WPGMZA.Polygon.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this);return $.extend(result,{name:this.name,title:this.title,link:this.link}),result}}),jQuery(function($){WPGMZA.Polyline=function(row,googlePolyline){WPGMZA.assertInstanceOf(this,"Polyline"),this.title=null,WPGMZA.MapObject.apply(this,arguments)},WPGMZA.Polyline.prototype=Object.create(WPGMZA.MapObject.prototype),WPGMZA.Polyline.prototype.constructor=WPGMZA.Polyline,WPGMZA.Polyline.getConstructor=function(){return"open-layers"!==WPGMZA.settings.engine?WPGMZA.GooglePolyline:WPGMZA.OLPolyline},WPGMZA.Polyline.createInstance=function(row,engineObject){return new(WPGMZA.Polyline.getConstructor())(row,engineObject)},WPGMZA.Polyline.prototype.getPoints=function(){return this.toJSON().points},WPGMZA.Polyline.prototype.toJSON=function(){var result=WPGMZA.MapObject.prototype.toJSON.call(this);return result.title=this.title,result}}),jQuery(function($){WPGMZA.PopoutPanel=function(element){this.element=element},WPGMZA.PopoutPanel.prototype.open=function(){$(this.element).addClass("wpgmza-open")},WPGMZA.PopoutPanel.prototype.close=function(){$(this.element).removeClass("wpgmza-open")}}),jQuery(function($){function sendAJAXFallbackRequest(route,params){if((params=$.extend({},params)).data||(params.data={}),"route"in params.data)throw new Error("Cannot send route through this method");if("action"in params.data)throw new Error("Cannot send action through this method");return params.data.route=route,params.data.action="wpgmza_rest_api_request",WPGMZA.restAPI.addNonce(route,params,WPGMZA.RestAPI.CONTEXT_AJAX),$.ajax(WPGMZA.ajaxurl,params)}WPGMZA.RestAPI=function(){WPGMZA.RestAPI.URL=WPGMZA.resturl,this.useAJAXFallback=!1},WPGMZA.RestAPI.CONTEXT_REST="REST",WPGMZA.RestAPI.CONTEXT_AJAX="AJAX",WPGMZA.RestAPI.createInstance=function(){return new WPGMZA.RestAPI},Object.defineProperty(WPGMZA.RestAPI.prototype,"isCompressedPathVariableSupported",{get:function(){return WPGMZA.serverCanInflate&&"Uint8Array"in window&&"TextEncoder"in window}}),Object.defineProperty(WPGMZA.RestAPI.prototype,"isCompressedPathVariableAllowed",{get:function(){return!WPGMZA.pro_version||WPGMZA.Version.compare(WPGMZA.pro_version,"8.0.0")>=WPGMZA.Version.EQUAL_TO?!WPGMZA.settings.disable_compressed_path_variables:WPGMZA.settings.enable_compressed_path_variables}}),Object.defineProperty(WPGMZA.RestAPI.prototype,"maxURLLength",{get:function(){return 2083}}),WPGMZA.RestAPI.prototype.compressParams=function(params){var encoded,suffix="";!params.markerIDs||1<(encoded=params.markerIDs.split(",")).length&&(encoded=(new WPGMZA.EliasFano).encode(encoded),raw=pako.deflate(encoded),input=Array.prototype.map.call(raw,function(ch){return String.fromCharCode(ch)}).join(""),suffix="/"+btoa(input).replace(/\//g,"-").replace(/=+$/,""),params.midcbp=encoded.pointer,delete params.markerIDs);var input=JSON.stringify(params),input=(new TextEncoder).encode(input),raw=pako.deflate(input),raw=Array.prototype.map.call(raw,function(ch){return String.fromCharCode(ch)}).join("");return btoa(raw).replace(/\//g,"-").replace(/=+$/,"")+suffix},WPGMZA.RestAPI.prototype.getNonce=function(route){var pattern,matches=[];for(pattern in WPGMZA.restnoncetable){var regex=new RegExp(pattern);route.match(regex)&&matches.push({pattern:pattern,nonce:WPGMZA.restnoncetable[pattern],length:pattern.length})}if(!matches.length)throw new Error("No nonce found for route");return matches.sort(function(a,b){return b.length-a.length}),matches[0].nonce},WPGMZA.RestAPI.prototype.addNonce=function(route,params,context){function setRESTNonce(xhr){context==WPGMZA.RestAPI.CONTEXT_REST&&xhr.setRequestHeader("X-WP-Nonce",WPGMZA.restnonce),params&&params.method&&!params.method.match(/^GET$/i)&&xhr.setRequestHeader("X-WPGMZA-Action-Nonce",self.getNonce(route))}var base,self=this;params.beforeSend?(base=params.beforeSend,params.beforeSend=function(xhr){base(xhr),setRESTNonce(xhr)}):params.beforeSend=setRESTNonce},WPGMZA.RestAPI.prototype.call=function(route,params){if(this.useAJAXFallback)return sendAJAXFallbackRequest(route,params);var compressedParams,compressedRoute,attemptedCompressedPathVariable=!1,fallbackRoute=route,fallbackParams=$.extend({},params);if("string"!=typeof route||!route.match(/^\//)&&!route.match(/^http/))throw new Error("Invalid route");return WPGMZA.RestAPI.URL.match(/\/$/)&&(route=route.replace(/^\//,"")),params=params||{},this.addNonce(route,params,WPGMZA.RestAPI.CONTEXT_REST),params.error||(params.error=function(xhr,status,message){if("abort"!=status){switch(xhr.status){case 401:case 403:return $.post(WPGMZA.ajaxurl,{action:"wpgmza_report_rest_api_blocked"},function(response){}),console.warn("The REST API was blocked. This is usually due to security plugins blocking REST requests for non-authenticated users."),this.useAJAXFallback=!0,sendAJAXFallbackRequest(fallbackRoute,fallbackParams);case 414:if(!attemptedCompressedPathVariable)break;return fallbackParams.method="POST",fallbackParams.useCompressedPathVariable=!1,WPGMZA.restAPI.call(fallbackRoute,fallbackParams)}throw new Error(message)}}),params.useCompressedPathVariable&&this.isCompressedPathVariableSupported&&this.isCompressedPathVariableAllowed&&(compressedParams=$.extend({},params),compressedRoute=params.data,compressedRoute=this.compressParams(compressedRoute),WPGMZA.isServerIIS&&(compressedRoute=compressedRoute.replace(/\+/g,"%20")),compressedRoute=route.replace(/\/$/,"")+"/base64"+compressedRoute,WPGMZA.RestAPI.URL,compressedParams.method="GET",delete compressedParams.data,!1===params.cache&&(compressedParams.data={skip_cache:1}),compressedRoute.length<this.maxURLLength?(attemptedCompressedPathVariable=!0,route=compressedRoute,params=compressedParams):(WPGMZA.RestAPI.compressedPathVariableURLLimitWarningDisplayed||console.warn("Compressed path variable route would exceed URL length limit"),WPGMZA.RestAPI.compressedPathVariableURLLimitWarningDisplayed=!0)),WPGMZA.RestAPI.URL.match(/\?/)&&(route=route.replace(/\?/,"&")),$.ajax(WPGMZA.RestAPI.URL+route,params)};var nativeCallFunction=WPGMZA.RestAPI.call;WPGMZA.RestAPI.call=function(){console.warn("WPGMZA.RestAPI.call was called statically, did you mean to call the function on WPGMZA.restAPI?"),nativeCallFunction.apply(this,arguments)},$(document.body).on("click","#wpgmza-rest-api-blocked button.notice-dismiss",function(event){WPGMZA.restAPI.call("/rest-api/",{method:"POST",data:{dismiss_blocked_notice:!0}})})}),jQuery(function($){WPGMZA.SettingsPage=function(){$("#wpgmza-global-settings").tabs()},WPGMZA.SettingsPage.createInstance=function(){return new WPGMZA.SettingsPage},$(window).on("load",function(event){var useLegacyHTML=WPGMZA.settings.useLegacyHTML||!window.location.href.match(/no-legacy-html/);WPGMZA.getCurrentPage()!=WPGMZA.PAGE_SETTINGS||useLegacyHTML||(WPGMZA.settingsPage=WPGMZA.SettingsPage.createInstance())})}),jQuery(function($){WPGMZA.StoreLocator=function(map,element){var self=this;WPGMZA.EventDispatcher.call(this),this._center=null,this.map=map,this.element=element,(this.element.wpgmzaStoreLocator=this).state=WPGMZA.StoreLocator.STATE_INITIAL,$(element).find(".wpgmza-not-found-msg").hide(),this.addressInput=WPGMZA.AddressInput.createInstance($(element).find("input.wpgmza-address")[0],map),this.map.on("storelocatorgeocodecomplete",function(event){self.onGeocodeComplete(event)}),this.map.on("init",function(event){self.map.markerFilter.on("filteringcomplete",function(event){self.onFilteringComplete(event)})}),$(element).on("keypress","input",function(event){13==event.which&&(searchLocations(self.map.id),self.onSearch(event))}),$(document.body).on("click",".wpgmza_sl_search_button_"+map.id+", [data-map-id='"+map.id+"'] .wpgmza_sl_search_button",function(event){self.onSearch(event)}),$(document.body).on("click",".wpgmza_sl_reset_button_"+map.id+", [data-map-id='"+map.id+"'] .wpgmza_sl_reset_button_div",function(event){self.onReset(event)})},WPGMZA.StoreLocator.prototype=Object.create(WPGMZA.EventDispatcher.prototype),WPGMZA.StoreLocator.prototype.constructor=WPGMZA.StoreLocator,WPGMZA.StoreLocator.STATE_INITIAL="initial",WPGMZA.StoreLocator.STATE_APPLIED="applied",WPGMZA.StoreLocator.createInstance=function(map,element){return new WPGMZA.StoreLocator(map,element)},Object.defineProperty(WPGMZA.StoreLocator.prototype,"distanceUnits",{get:function(){return 1==this.map.settings.store_locator_distance?WPGMZA.Distance.MILES:WPGMZA.Distance.KILOMETERS}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"radius",{get:function(){return $("#radiusSelect, #radiusSelect_"+this.map.id).val()}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"center",{get:function(){return this._center}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"bounds",{get:function(){return this._bounds}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"marker",{get:function(){if(1!=this.map.settings.store_locator_bounce)return null;if(this._marker)return this._marker;return this._marker=WPGMZA.Marker.createInstance({visible:!1}),this._marker.disableInfoWindow=!0,this._marker.isFilterable=!1,this._marker.setAnimation(WPGMZA.Marker.ANIMATION_BOUNCE),this._marker}}),Object.defineProperty(WPGMZA.StoreLocator.prototype,"circle",{get:function(){return this._circle||("modern"!=this.map.settings.wpgmza_store_locator_radius_style||WPGMZA.isDeviceiOS()?this._circle=WPGMZA.Circle.createInstance({strokeColor:"#ff0000",strokeOpacity:"0.25",strokeWeight:2,fillColor:"#ff0000",fillOpacity:"0.15",visible:!1,clickable:!1}):(this._circle=WPGMZA.ModernStoreLocatorCircle.createInstance(this.map.id),this._circle.settings.color=this.circleStrokeColor),this._circle)}}),WPGMZA.StoreLocator.prototype.onGeocodeComplete=function(event){if(!event.results||!event.results.length)return this._center=null,void(this._bounds=null);this._center=new WPGMZA.LatLng(event.results[0].latLng),this._bounds=new WPGMZA.LatLngBounds(event.results[0].bounds),this.map.markerFilter.update({},this)},WPGMZA.StoreLocator.prototype.onSearch=function(event){this.state=WPGMZA.StoreLocator.STATE_APPLIED},WPGMZA.StoreLocator.prototype.onReset=function(event){this.state=WPGMZA.StoreLocator.STATE_INITIAL,this._center=null,this._bounds=null,this.map.markerFilter.update({},this)},WPGMZA.StoreLocator.prototype.getFilteringParameters=function(){return this.center?{center:this.center,radius:this.radius}:{}},WPGMZA.StoreLocator.prototype.onFilteringComplete=function(circle){var params=circle.filteringParams,factor=this.marker;factor&&factor.setVisible(!1),params.center&&factor&&(factor.setPosition(params.center),factor.setVisible(!0),factor.map!=this.map&&this.map.addMarker(factor));circle=this.circle;circle&&(factor=this.distanceUnits==WPGMZA.Distance.MILES?WPGMZA.Distance.KILOMETERS_PER_MILE:1,circle.setVisible(!1),params.center&&params.radius&&(circle.setRadius(params.radius*factor),circle.setCenter(params.center),circle.setVisible(!0),circle.map!=this.map&&this.map.addCircle(circle)),circle instanceof WPGMZA.ModernStoreLocatorCircle&&(circle.settings.radiusString=this.radius)),this.map.hasVisibleMarkers()?$(this.element).find(".wpgmza-not-found-msg").hide():$(this.element).find(".wpgmza-not-found-msg").show()}}),jQuery(function($){WPGMZA.Text=function(options){if(options)for(var name in options)this[name]=options[name]},WPGMZA.Text.createInstance=function(options){return new("open-layers"!==WPGMZA.settings.engine?WPGMZA.GoogleText:WPGMZA.OLText)(options)}}),jQuery(function($){WPGMZA.ThemeEditor=function(){WPGMZA.EventDispatcher.call(this),this.element=$("#wpgmza-theme-editor"),this.element.length?"open-layers"!=WPGMZA.settings.engine?(this.json=[{}],this.mapElement=WPGMZA.maps[0].element,this.element.appendTo("#wpgmza-map-theme-editor__holder"),$(window).on("scroll",function(event){}),setInterval(function(){},200),this.initHTML(),WPGMZA.themeEditor=this):this.element.remove():console.warn("No element to initialise theme editor on")},WPGMZA.extend(WPGMZA.ThemeEditor,WPGMZA.EventDispatcher),WPGMZA.ThemeEditor.prototype.updatePosition=function(){},WPGMZA.ThemeEditor.features={all:[],administrative:["country","land_parcel","locality","neighborhood","province"],landscape:["man_made","natural","natural.landcover","natural.terrain"],poi:["attraction","business","government","medical","park","place_of_worship","school","sports_complex"],road:["arterial","highway","highway.controlled_access","local"],transit:["line","station","station.airport","station.bus","station.rail"],water:[]},WPGMZA.ThemeEditor.elements={all:[],geometry:["fill","stroke"],labels:["icon","text","text.fill","text.stroke"]},WPGMZA.ThemeEditor.prototype.parse=function(){$("#wpgmza_theme_editor_feature option, #wpgmza_theme_editor_element option").css("font-weight","normal"),$("#wpgmza_theme_editor_error").hide(),$("#wpgmza_theme_editor").show(),$("#wpgmza_theme_editor_do_hue").prop("checked",!1),$("#wpgmza_theme_editor_hue").val("#000000"),$("#wpgmza_theme_editor_lightness").val(""),$("#wpgmza_theme_editor_saturation").val(""),$("#wpgmza_theme_editor_gamma").val(""),$("#wpgmza_theme_editor_do_invert_lightness").prop("checked",!1),$("#wpgmza_theme_editor_visibility").val("inherit"),$("#wpgmza_theme_editor_do_color").prop("checked",!1),$("#wpgmza_theme_editor_color").val("#000000"),$("#wpgmza_theme_editor_weight").val("");var jsonCopy=$('textarea[name="wpgmza_theme_data"]');if(!jsonCopy.val()||jsonCopy.val().length<1)this.json=[{}];else{try{this.json=$.parseJSON($('textarea[name="wpgmza_theme_data"]').val())}catch(e){return this.json=[{}],$("#wpgmza_theme_editor").hide(),void $("#wpgmza_theme_editor_error").show()}$.isArray(this.json)||(jsonCopy=this.json,this.json=[],this.json.push(jsonCopy)),this.highlightFeatures(),this.highlightElements(),this.loadElementStylers()}},WPGMZA.ThemeEditor.prototype.highlightFeatures=function(){$("#wpgmza_theme_editor_feature option").css("font-weight","normal"),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")?$('#wpgmza_theme_editor_feature option[value="'+v.featureType+'"]'):$('#wpgmza_theme_editor_feature option[value="all"]')).css("font-weight","bold")})},WPGMZA.ThemeEditor.prototype.highlightElements=function(){var feature=$("#wpgmza_theme_editor_feature").val();$("#wpgmza_theme_editor_element option").css("font-weight","normal"),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")&&v.featureType==feature||"all"==feature&&!v.hasOwnProperty("featureType"))&&(v.hasOwnProperty("elementType")?$('#wpgmza_theme_editor_element option[value="'+v.elementType+'"]'):$('#wpgmza_theme_editor_element option[value="all"]')).css("font-weight","bold")})},WPGMZA.ThemeEditor.prototype.loadElementStylers=function(){var feature=$("#wpgmza_theme_editor_feature").val(),element=$("#wpgmza_theme_editor_element").val();$("#wpgmza_theme_editor_do_hue").prop("checked",!1),$("#wpgmza_theme_editor_hue").val("#000000"),$("#wpgmza_theme_editor_lightness").val(""),$("#wpgmza_theme_editor_saturation").val(""),$("#wpgmza_theme_editor_gamma").val(""),$("#wpgmza_theme_editor_do_invert_lightness").prop("checked",!1),$("#wpgmza_theme_editor_visibility").val("inherit"),$("#wpgmza_theme_editor_do_color").prop("checked",!1),$("#wpgmza_theme_editor_color").val("#000000"),$("#wpgmza_theme_editor_weight").val(""),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")&&v.featureType==feature||"all"==feature&&!v.hasOwnProperty("featureType"))&&(v.hasOwnProperty("elementType")&&v.elementType==element||"all"==element&&!v.hasOwnProperty("elementType"))&&v.hasOwnProperty("stylers")&&$.isArray(v.stylers)&&0<v.stylers.length&&$.each(v.stylers,function(ii,vv){vv.hasOwnProperty("hue")&&($("#wpgmza_theme_editor_do_hue").prop("checked",!0),$("#wpgmza_theme_editor_hue").val(vv.hue)),vv.hasOwnProperty("lightness")&&$("#wpgmza_theme_editor_lightness").val(vv.lightness),vv.hasOwnProperty("saturation")&&$("#wpgmza_theme_editor_saturation").val(vv.xaturation),vv.hasOwnProperty("gamma")&&$("#wpgmza_theme_editor_gamma").val(vv.gamma),vv.hasOwnProperty("invert_lightness")&&$("#wpgmza_theme_editor_do_invert_lightness").prop("checked",!0),vv.hasOwnProperty("visibility")&&$("#wpgmza_theme_editor_visibility").val(vv.visibility),vv.hasOwnProperty("color")&&($("#wpgmza_theme_editor_do_color").prop("checked",!0),$("#wpgmza_theme_editor_color").val(vv.color)),vv.hasOwnProperty("weight")&&$("#wpgmza_theme_editor_weight").val(vv.weight)})})},WPGMZA.ThemeEditor.prototype.writeElementStylers=function(){var new_feature_element_stylers,feature=$("#wpgmza_theme_editor_feature").val(),element=$("#wpgmza_theme_editor_element").val(),indexJSON=null,stylers=[];"inherit"!=$("#wpgmza_theme_editor_visibility").val()&&stylers.push({visibility:$("#wpgmza_theme_editor_visibility").val()}),!0===$("#wpgmza_theme_editor_do_color").prop("checked")&&stylers.push({color:$("#wpgmza_theme_editor_color").val()}),!0===$("#wpgmza_theme_editor_do_hue").prop("checked")&&stylers.push({hue:$("#wpgmza_theme_editor_hue").val()}),0<$("#wpgmza_theme_editor_gamma").val().length&&stylers.push({gamma:parseFloat($("#wpgmza_theme_editor_gamma").val())}),0<$("#wpgmza_theme_editor_weight").val().length&&stylers.push({weight:parseFloat($("#wpgmza_theme_editor_weight").val())}),0<$("#wpgmza_theme_editor_saturation").val().length&&stylers.push({saturation:parseFloat($("#wpgmza_theme_editor_saturation").val())}),0<$("#wpgmza_theme_editor_lightness").val().length&&stylers.push({lightness:parseFloat($("#wpgmza_theme_editor_lightness").val())}),!0===$("#wpgmza_theme_editor_do_invert_lightness").prop("checked")&&stylers.push({invert_lightness:!0}),$.each(this.json,function(i,v){(v.hasOwnProperty("featureType")&&v.featureType==feature||"all"==feature&&!v.hasOwnProperty("featureType"))&&(v.hasOwnProperty("elementType")&&v.elementType==element||"all"==element&&!v.hasOwnProperty("elementType"))&&(indexJSON=i)}),null===indexJSON?0<stylers.length&&(new_feature_element_stylers={},"all"!=feature&&(new_feature_element_stylers.featureType=feature),"all"!=element&&(new_feature_element_stylers.elementType=element),new_feature_element_stylers.stylers=stylers,this.json.push(new_feature_element_stylers)):0<stylers.length?this.json[indexJSON].stylers=stylers:this.json.splice(indexJSON,1),$('textarea[name="wpgmza_theme_data"]').val(JSON.stringify(this.json).replace(/:/g,": ").replace(/,/g,", ")),this.highlightFeatures(),this.highlightElements(),WPGMZA.themePanel.updateMapTheme()},WPGMZA.ThemeEditor.prototype.initHTML=function(){var self=this;$.each(WPGMZA.ThemeEditor.features,function(i,v){$("#wpgmza_theme_editor_feature").append('<option value="'+i+'">'+i+"</option>"),0<v.length&&$.each(v,function(ii,vv){$("#wpgmza_theme_editor_feature").append('<option value="'+i+"."+vv+'">'+i+"."+vv+"</option>")})}),$.each(WPGMZA.ThemeEditor.elements,function(i,v){$("#wpgmza_theme_editor_element").append('<option value="'+i+'">'+i+"</option>"),0<v.length&&$.each(v,function(ii,vv){$("#wpgmza_theme_editor_element").append('<option value="'+i+"."+vv+'">'+i+"."+vv+"</option>")})}),this.parse(),$('textarea[name="wpgmza_theme_data"]').on("input selectionchange propertychange",function(){self.parse()}),$(".wpgmza_theme_selection").click(function(){setTimeout(function(){$('textarea[name="wpgmza_theme_data"]').trigger("input")},1e3)}),$("#wpgmza_theme_editor_feature").on("change",function(){self.highlightElements(),self.loadElementStylers()}),$("#wpgmza_theme_editor_element").on("change",function(){self.loadElementStylers()}),$("#wpgmza_theme_editor_do_hue, #wpgmza_theme_editor_hue, #wpgmza_theme_editor_lightness, #wpgmza_theme_editor_saturation, #wpgmza_theme_editor_gamma, #wpgmza_theme_editor_do_invert_lightness, #wpgmza_theme_editor_visibility, #wpgmza_theme_editor_do_color, #wpgmza_theme_editor_color, #wpgmza_theme_editor_weight").on("input selectionchange propertychange",function(){self.writeElementStylers()}),"open-layers"==WPGMZA.settings.engine&&$("#wpgmza_theme_editor :input").prop("disabled",!0)}}),jQuery(function($){WPGMZA.ThemePanel=function(){var self=this;this.element=$("#wpgmza-theme-panel"),this.map=WPGMZA.maps[0],this.element.length?($("#wpgmza-theme-presets").owlCarousel({items:5,dots:!0}),this.element.on("click","#wpgmza-theme-presets label",function(event){self.onThemePresetClick(event)}),$("#wpgmza-open-theme-editor").on("click",function(event){$("#wpgmza-map-theme-editor__holder").addClass("active"),$("#wpgmza-theme-editor").addClass("active"),WPGMZA.animateScroll($("#wpgmza-theme-editor"))}),WPGMZA.themePanel=this):console.warn("No element to initialise theme panel on")},WPGMZA.ThemePanel.previewImageCenter={lat:33.701806462148646,lng:-118.15949896058983},WPGMZA.ThemePanel.previewImageZoom=11,WPGMZA.ThemePanel.prototype.onThemePresetClick=function(existingData){var selectedData=$(existingData.currentTarget).find("[data-theme-json]").attr("data-theme-json"),textarea=$(this.element).find("textarea[name='wpgmza_theme_data']"),existingData=textarea.val(),allPresetData=[];$(this.element).find("[data-theme-json]").each(function(index,el){allPresetData.push($(el).attr("data-theme-json"))}),existingData.length&&-1==allPresetData.indexOf(existingData)&&!confirm(WPGMZA.localized_strings.overwrite_theme_data)||(textarea.val(selectedData),this.updateMapTheme(),WPGMZA.themeEditor.parse())},WPGMZA.ThemePanel.prototype.updateMapTheme=function(){var data;try{data=JSON.parse($("textarea[name='wpgmza_theme_data']").val())}catch(e){return void alert(WPGMZA.localized_strings.invalid_theme_data)}this.map.setOptions({styles:data})}}),jQuery(function($){WPGMZA.Version=function(){},WPGMZA.Version.GREATER_THAN=1,WPGMZA.Version.EQUAL_TO=0,WPGMZA.Version.LESS_THAN=-1,WPGMZA.Version.compare=function(v1,v2){for(var v1parts=v1.match(/\d+/g),v2parts=v2.match(/\d+/g),i=0;i<v1parts.length;++i){if(v2parts.length===i)return 1;if(v1parts[i]!==v2parts[i])return v1parts[i]>v2parts[i]?1:-1}return v1parts.length!=v2parts.length?-1:0}}),jQuery(function($){WPGMZA.Integration={},WPGMZA.integrationModules={}}),jQuery(function($){var __,registerBlockType,InspectorControls,_wp$components,Dashicon,PanelBody;window.wp&&wp.i18n&&wp.blocks&&wp.editor&&wp.components&&(__=wp.i18n.__,registerBlockType=wp.blocks.registerBlockType,_wp$components=wp.editor,InspectorControls=_wp$components.InspectorControls,_wp$components.BlockControls,_wp$components=wp.components,Dashicon=_wp$components.Dashicon,_wp$components.Toolbar,_wp$components.Button,_wp$components.Tooltip,PanelBody=_wp$components.PanelBody,_wp$components.TextareaControl,_wp$components.CheckboxControl,_wp$components.TextControl,_wp$components.SelectControl,_wp$components.RichText,WPGMZA.Integration.Gutenberg=function(){registerBlockType("gutenberg-wpgmza/block",this.getBlockDefinition())},WPGMZA.Integration.Gutenberg.prototype.getBlockTitle=function(){return __("WP Google Maps")},WPGMZA.Integration.Gutenberg.prototype.getBlockInspectorControls=function(props){return React.createElement(InspectorControls,{key:"inspector"},React.createElement(PanelBody,{title:__("Map Settings")},React.createElement("p",{class:"map-block-gutenberg-button-container"},React.createElement("a",{href:WPGMZA.adminurl+"admin.php?page=wp-google-maps-menu&action=edit&map_id=1",target:"_blank",class:"button button-primary"},React.createElement("i",{class:"fa fa-pencil-square-o","aria-hidden":"true"}),__("Go to Map Editor"))),React.createElement("p",{class:"map-block-gutenberg-button-container"},React.createElement("a",{href:"https://www.wpgmaps.com/documentation/creating-your-first-map/",target:"_blank",class:"button button-primary"},React.createElement("i",{class:"fa fa-book","aria-hidden":"true"}),__("View Documentation")))))},WPGMZA.Integration.Gutenberg.prototype.getBlockAttributes=function(){return{}},WPGMZA.Integration.Gutenberg.prototype.getBlockDefinition=function(props){var _this=this;return{title:__("WP Google Maps"),description:__("The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss."),category:"common",icon:"location-alt",keywords:[__("Map"),__("Maps"),__("Google")],attributes:this.getBlockAttributes(),edit:function(props){return[!!props.isSelected&&_this.getBlockInspectorControls(props),React.createElement("div",{className:props.className+" wpgmza-gutenberg-block"},React.createElement(Dashicon,{icon:"location-alt"}),React.createElement("span",{class:"wpgmza-gutenberg-block-title"},__("Your map will appear here on your websites front end")))]},save:function(){return null}}},WPGMZA.Integration.Gutenberg.getConstructor=function(){return WPGMZA.Integration.Gutenberg},WPGMZA.Integration.Gutenberg.createInstance=function(){return new(WPGMZA.Integration.Gutenberg.getConstructor())},WPGMZA.isProVersion()||/^6/.test(WPGMZA.pro_version)||(WPGMZA.integrationModules.gutenberg=WPGMZA.Integration.Gutenberg.createInstance()))}),jQuery(function($){$(document).on("load",function(event){var parent=document.body.onclick;parent&&(document.body.onclick=function(event){event.target instanceof WPGMZA.Marker||parent(event)})})}),jQuery(function($){WPGMZA.GoogleUICompatibility=function(){var style;navigator.vendor&&-1<navigator.vendor.indexOf("Apple")&&navigator.userAgent&&-1==navigator.userAgent.indexOf("CriOS")&&-1==navigator.userAgent.indexOf("FxiOS")||((style=$("<style id='wpgmza-google-ui-compatiblity-fix'/>")).html(".wpgmza_map img:not(button img) { padding:0 !important; }"),$(document.head).append(style))},WPGMZA.googleUICompatibility=new WPGMZA.GoogleUICompatibility}),jQuery(function($){WPGMZA.GoogleCircle=function(options,googleCircle){var self=this;WPGMZA.Circle.call(this,options,googleCircle),googleCircle?this.googleCircle=googleCircle:(this.googleCircle=new google.maps.Circle,this.googleCircle.wpgmzaCircle=this),google.maps.event.addListener(this.googleCircle,"click",function(){self.dispatchEvent({type:"click"})}),options&&this.setOptions(options)},WPGMZA.GoogleCircle.prototype=Object.create(WPGMZA.Circle.prototype),WPGMZA.GoogleCircle.prototype.constructor=WPGMZA.GoogleCircle,WPGMZA.GoogleCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.googleCircle.setCenter(center)},WPGMZA.GoogleCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments),this.googleCircle.setRadius(1e3*parseFloat(radius))},WPGMZA.GoogleCircle.prototype.setVisible=function(visible){this.googleCircle.setVisible(!!visible)},WPGMZA.GoogleCircle.prototype.setOptions=function(options){var googleOptions={};delete(googleOptions=$.extend({},options)).map,delete googleOptions.center,options.center&&(googleOptions.center=new google.maps.LatLng({lat:parseFloat(options.center.lat),lng:parseFloat(options.center.lng)})),options.radius&&(googleOptions.radius=parseFloat(options.radius)),options.color&&(googleOptions.fillColor=options.color),options.opacity&&(googleOptions.fillOpacity=parseFloat(options.opacity),googleOptions.strokeOpacity=parseFloat(options.opacity)),this.googleCircle.setOptions(googleOptions),options.map&&options.map.addCircle(this)}}),jQuery(function($){WPGMZA.GoogleGeocoder=function(){WPGMZA.Geocoder.call(this)},WPGMZA.GoogleGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.GoogleGeocoder.prototype.constructor=WPGMZA.GoogleGeocoder,WPGMZA.GoogleGeocoder.prototype.getGoogleGeocoder=function(){return new(WPGMZA.CloudAPI&&WPGMZA.CloudAPI.isBeingUsed?WPGMZA.CloudGeocoder:google.maps.Geocoder)},WPGMZA.GoogleGeocoder.prototype.getLatLngFromAddress=function(options,callback){if(!options||!options.address)throw new Error("No address specified");if(WPGMZA.isLatLngString(options.address))return WPGMZA.Geocoder.prototype.getLatLngFromAddress.call(this,options,callback);options.country&&(options.componentRestrictions={country:options.country}),this.getGoogleGeocoder().geocode(options,function(nativeStatus,status){var bounds,latLng;status==google.maps.GeocoderStatus.OK||status==WPGMZA.CloudGeocoder.SUCCESS?(bounds=null,latLng={lat:(latLng=nativeStatus[0].geometry.location).lat(),lng:latLng.lng()},(bounds=nativeStatus[0].geometry.bounds)&&(bounds=bounds instanceof google.maps.LatLngBounds?WPGMZA.LatLngBounds.fromGoogleLatLngBounds(nativeStatus[0].geometry.bounds):WPGMZA.LatLngBounds.fromGoogleLatLngBoundsLiteral(nativeStatus[0].geometry.bounds)),callback(nativeStatus=[{geometry:{location:latLng},latLng:latLng,lat:latLng.lat,lng:latLng.lng,bounds:bounds}],WPGMZA.Geocoder.SUCCESS)):(nativeStatus=WPGMZA.Geocoder.FAIL,status==google.maps.GeocoderStatus.ZERO_RESULTS&&(nativeStatus=WPGMZA.Geocoder.ZERO_RESULTS),callback(null,nativeStatus))})},WPGMZA.GoogleGeocoder.prototype.getAddressFromLatLng=function(options,callback){if(!options||!options.latLng)throw new Error("No latLng specified");var latLng=new WPGMZA.LatLng(options.latLng),geocoder=this.getGoogleGeocoder();delete(options=$.extend(options,{location:{lat:latLng.lat,lng:latLng.lng}})).latLng,geocoder.geocode(options,function(results,status){"OK"!==status&&callback(null,WPGMZA.Geocoder.FAIL),results&&results.length||callback([],WPGMZA.Geocoder.NO_RESULTS),callback([results[0].formatted_address],WPGMZA.Geocoder.SUCCESS)})}}),jQuery(function($){WPGMZA.settings.engine&&"google-maps"!=WPGMZA.settings.engine||window.google&&window.google.maps&&(WPGMZA.GoogleHTMLOverlay=function(map){this.element=$("<div class='wpgmza-google-html-overlay'></div>"),this.visible=!0,this.position=new WPGMZA.LatLng,this.setMap(map.googleMap),this.wpgmzaMap=map},WPGMZA.GoogleHTMLOverlay.prototype=new google.maps.OverlayView,WPGMZA.GoogleHTMLOverlay.prototype.onAdd=function(){this.getPanes().overlayMouseTarget.appendChild(this.element[0])},WPGMZA.GoogleHTMLOverlay.prototype.onRemove=function(){this.element&&$(this.element).parent().length&&($(this.element).remove(),this.element=null)},WPGMZA.GoogleHTMLOverlay.prototype.draw=function(){this.updateElementPosition()},WPGMZA.GoogleHTMLOverlay.prototype.updateElementPosition=function(){var pixels=this.getProjection();pixels&&(pixels=pixels.fromLatLngToDivPixel(this.position.toGoogleLatLng()),$(this.element).css({left:pixels.x,top:pixels.y}))})}),jQuery(function($){var Parent;WPGMZA.GoogleInfoWindow=function(mapObject){Parent.call(this,mapObject),this.setMapObject(mapObject)},WPGMZA.GoogleInfoWindow.Z_INDEX=99,Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.GoogleInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.GoogleInfoWindow.prototype.constructor=WPGMZA.GoogleInfoWindow,WPGMZA.GoogleInfoWindow.prototype.setMapObject=function(mapObject){mapObject instanceof WPGMZA.Marker?this.googleObject=mapObject.googleMarker:mapObject instanceof WPGMZA.Polygon?this.googleObject=mapObject.googlePolygon:mapObject instanceof WPGMZA.Polyline&&(this.googleObject=mapObject.googlePolyline)},WPGMZA.GoogleInfoWindow.prototype.createGoogleInfoWindow=function(){var self=this;this.googleInfoWindow||(this.googleInfoWindow=new google.maps.InfoWindow,this.googleInfoWindow.setZIndex(WPGMZA.GoogleInfoWindow.Z_INDEX),google.maps.event.addListener(this.googleInfoWindow,"domready",function(event){self.trigger("domready")}),google.maps.event.addListener(this.googleInfoWindow,"closeclick",function(event){self.state!=WPGMZA.InfoWindow.STATE_CLOSED&&(self.state=WPGMZA.InfoWindow.STATE_CLOSED,self.trigger("infowindowclose"))}))},WPGMZA.GoogleInfoWindow.prototype.open=function(map,html){var self=this;if(!Parent.prototype.open.call(this,map,html))return!1;this.parent=map,this.createGoogleInfoWindow(),this.setMapObject(html),this.googleObject instanceof google.maps.Polygon||this.googleInfoWindow.open(this.mapObject.map.googleMap,this.googleObject);var intervalID,guid=WPGMZA.guid(),html="<div id='"+guid+"'>"+this.content+"</div>";return this.googleInfoWindow.setContent(html),intervalID=setInterval(function(event){div=$("#"+guid),div.length&&(clearInterval(intervalID),div[0].wpgmzaMapObject=self.mapObject,div.addClass("wpgmza-infowindow"),self.element=div[0],self.trigger("infowindowopen"))},50),!0},WPGMZA.GoogleInfoWindow.prototype.close=function(){this.googleInfoWindow&&(WPGMZA.InfoWindow.prototype.close.call(this),this.googleInfoWindow.close())},WPGMZA.GoogleInfoWindow.prototype.setContent=function(html){Parent.prototype.setContent.call(this,html),this.content=html,this.createGoogleInfoWindow(),this.googleInfoWindow.setContent(html)},WPGMZA.GoogleInfoWindow.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),this.createGoogleInfoWindow(),this.googleInfoWindow.setOptions(options)}}),jQuery(function($){var Parent;WPGMZA.GoogleMap=function(element,options){var self=this;if(Parent.call(this,element,options),!window.google){var status=WPGMZA.googleAPIStatus,message="Google API not loaded";if(status&&status.message&&(message+=" - "+status.message),"USER_CONSENT_NOT_GIVEN"==status.code)return;throw $(element).html("<div class='notice notice-error'><p>"+WPGMZA.localized_strings.google_api_not_loaded+"<pre>"+message+"</pre></p></div>"),new Error(message)}this.loadGoogleMap(),options&&this.setOptions(options,!0),google.maps.event.addListener(this.googleMap,"click",function(event){var wpgmzaEvent=new WPGMZA.Event("click");wpgmzaEvent.latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap,"rightclick",function(event){var wpgmzaEvent=new WPGMZA.Event("rightclick");wpgmzaEvent.latLng={lat:event.latLng.lat(),lng:event.latLng.lng()},self.dispatchEvent(wpgmzaEvent)}),google.maps.event.addListener(this.googleMap,"dragend",function(event){self.dispatchEvent("dragend")}),google.maps.event.addListener(this.googleMap,"zoom_changed",function(event){self.dispatchEvent("zoom_changed"),self.dispatchEvent("zoomchanged")}),google.maps.event.addListener(this.googleMap,"idle",function(event){self.onIdle(event)}),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}),$(this.element).trigger("wpgooglemaps_loaded"))},WPGMZA.isProVersion()?(Parent=WPGMZA.ProMap,WPGMZA.GoogleMap.prototype=Object.create(WPGMZA.ProMap.prototype)):(Parent=WPGMZA.Map,WPGMZA.GoogleMap.prototype=Object.create(WPGMZA.Map.prototype)),WPGMZA.GoogleMap.prototype.constructor=WPGMZA.GoogleMap,WPGMZA.GoogleMap.parseThemeData=function(raw){var json;try{json=JSON.parse(raw)}catch(e){try{json=eval(raw)}catch(e){var str=raw,str=str.replace(/\\'/g,"'");str=str.replace(/\\"/g,'"'),str=str.replace(/\\0/g,"\0"),str=str.replace(/\\\\/g,"\\");try{json=eval(str)}catch(e){return console.warn("Couldn't parse theme data"),[]}}}return json},WPGMZA.GoogleMap.prototype.loadGoogleMap=function(){var self=this,options=this.settings.toGoogleMapsOptions();this.googleMap=new google.maps.Map(this.engineElement,options),google.maps.event.addListener(this.googleMap,"bounds_changed",function(){self.onBoundsChanged()}),1==this.settings.bicycle&&this.enableBicycleLayer(!0),1==this.settings.traffic&&this.enableTrafficLayer(!0),1==this.settings.transport&&this.enablePublicTransportLayer(!0),this.showPointsOfInterest(this.settings.show_point_of_interest),$(this.engineElement).append($(this.element).find(".wpgmza-loader"))},WPGMZA.GoogleMap.prototype.setOptions=function(options,clone){Parent.prototype.setOptions.call(this,options),options.scrollwheel&&delete options.scrollwheel,clone?(clone=$.extend(options,this.settings.toGoogleMapsOptions()),!(clone=$.extend({},clone)).center instanceof google.maps.LatLng&&(clone.center instanceof WPGMZA.LatLng||"object"==typeof clone.center)&&(clone.center={lat:parseFloat(clone.center.lat),lng:parseFloat(clone.center.lng)}),"1"==this.settings.wpgmza_hide_point_of_interest&&(clone.styles||(clone.styles=[]),clone.styles.push({featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]})),this.googleMap.setOptions(clone)):this.googleMap.setOptions(options)},WPGMZA.GoogleMap.prototype.addMarker=function(marker){marker.googleMarker.setMap(this.googleMap),Parent.prototype.addMarker.call(this,marker)},WPGMZA.GoogleMap.prototype.removeMarker=function(marker){marker.googleMarker.setMap(null),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.GoogleMap.prototype.addPolygon=function(polygon){polygon.googlePolygon.setMap(this.googleMap),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.GoogleMap.prototype.removePolygon=function(polygon){polygon.googlePolygon.setMap(null),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.GoogleMap.prototype.addPolyline=function(polyline){polyline.googlePolyline.setMap(this.googleMap),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.GoogleMap.prototype.removePolyline=function(polyline){polyline.googlePolyline.setMap(null),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.GoogleMap.prototype.addCircle=function(circle){circle.googleCircle.setMap(this.googleMap),Parent.prototype.addCircle.call(this,circle)},WPGMZA.GoogleMap.prototype.removeCircle=function(circle){circle.googleCircle.setMap(null),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.GoogleMap.prototype.addRectangle=function(rectangle){rectangle.googleRectangle.setMap(this.googleMap),Parent.prototype.addRectangle.call(this,rectangle)},WPGMZA.GoogleMap.prototype.removeRectangle=function(rectangle){rectangle.googleRectangle.setMap(null),Parent.prototype.removeRectangle.call(this,rectangle)},WPGMZA.GoogleMap.prototype.getCenter=function(){var latLng=this.googleMap.getCenter();return{lat:latLng.lat(),lng:latLng.lng()}},WPGMZA.GoogleMap.prototype.setCenter=function(latLng){WPGMZA.Map.prototype.setCenter.call(this,latLng),latLng instanceof WPGMZA.LatLng?this.googleMap.setCenter({lat:latLng.lat,lng:latLng.lng}):this.googleMap.setCenter(latLng)},WPGMZA.GoogleMap.prototype.panTo=function(latLng){latLng instanceof WPGMZA.LatLng?this.googleMap.panTo({lat:latLng.lat,lng:latLng.lng}):this.googleMap.panTo(latLng)},WPGMZA.GoogleMap.prototype.getZoom=function(){return this.googleMap.getZoom()},WPGMZA.GoogleMap.prototype.setZoom=function(value){if(isNaN(value))throw new Error("Value must not be NaN");return this.googleMap.setZoom(parseInt(value))},WPGMZA.GoogleMap.prototype.getBounds=function(){var nativeBounds=this.googleMap.getBounds(),northEast=nativeBounds.getNorthEast(),southWest=nativeBounds.getSouthWest(),nativeBounds=new WPGMZA.LatLngBounds({});return nativeBounds.north=northEast.lat(),nativeBounds.south=southWest.lat(),nativeBounds.west=southWest.lng(),nativeBounds.east=northEast.lng(),nativeBounds.topLeft={lat:northEast.lat(),lng:southWest.lng()},nativeBounds.bottomRight={lat:southWest.lat(),lng:northEast.lng()},nativeBounds},WPGMZA.GoogleMap.prototype.fitBounds=function(southWest,nativeBounds){var bounds;southWest instanceof WPGMZA.LatLng&&(southWest={lat:southWest.lat,lng:southWest.lng}),nativeBounds instanceof WPGMZA.LatLng?nativeBounds={lat:nativeBounds.lat,lng:nativeBounds.lng}:southWest instanceof WPGMZA.LatLngBounds&&(southWest={lat:(bounds=southWest).south,lng:bounds.west},nativeBounds={lat:bounds.north,lng:bounds.east});nativeBounds=new google.maps.LatLngBounds(southWest,nativeBounds);this.googleMap.fitBounds(nativeBounds)},WPGMZA.GoogleMap.prototype.fitBoundsToVisibleMarkers=function(){for(var bounds=new google.maps.LatLngBounds,i=0;i<this.markers.length;i++)markers[i].getVisible()&&bounds.extend(markers[i].getPosition());this.googleMap.fitBounds(bounds)},WPGMZA.GoogleMap.prototype.enableBicycleLayer=function(enable){this.bicycleLayer||(this.bicycleLayer=new google.maps.BicyclingLayer),this.bicycleLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.enableTrafficLayer=function(enable){this.trafficLayer||(this.trafficLayer=new google.maps.TrafficLayer),this.trafficLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.enablePublicTransportLayer=function(enable){this.publicTransportLayer||(this.publicTransportLayer=new google.maps.TransitLayer),this.publicTransportLayer.setMap(enable?this.googleMap:null)},WPGMZA.GoogleMap.prototype.showPointsOfInterest=function(show){var styles=$("textarea[name='theme_data']").val();styles&&((styles=JSON.parse(styles)).push({featureType:"poi",stylers:[{visibility:show?"on":"off"}]}),this.googleMap.setOptions({styles:styles}))},WPGMZA.GoogleMap.prototype.getMinZoom=function(){return parseInt(this.settings.min_zoom)},WPGMZA.GoogleMap.prototype.setMinZoom=function(value){this.googleMap.setOptions({minZoom:value,maxZoom:this.getMaxZoom()})},WPGMZA.GoogleMap.prototype.getMaxZoom=function(){return parseInt(this.settings.max_zoom)},WPGMZA.GoogleMap.prototype.setMaxZoom=function(value){this.googleMap.setOptions({minZoom:this.getMinZoom(),maxZoom:value})},WPGMZA.GoogleMap.prototype.latLngToPixels=function(scale){var map=this.googleMap,worldPoint=new google.maps.LatLng({lat:parseFloat(scale.lat),lng:parseFloat(scale.lng)}),topRight=map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()),bottomLeft=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()),scale=Math.pow(2,map.getZoom()),worldPoint=map.getProjection().fromLatLngToPoint(worldPoint);return{x:(worldPoint.x-bottomLeft.x)*scale,y:(worldPoint.y-topRight.y)*scale}},WPGMZA.GoogleMap.prototype.pixelsToLatLng=function(x,y){null==y&&("x"in x&&"y"in x?(y=x.y,x=x.x):console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)"));var map=this.googleMap,latLng=map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()),bottomLeft=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()),scale=Math.pow(2,map.getZoom()),latLng=new google.maps.Point(x/scale+bottomLeft.x,y/scale+latLng.y),latLng=map.getProjection().fromPointToLatLng(latLng);return{lat:latLng.lat(),lng:latLng.lng()}},WPGMZA.GoogleMap.prototype.onElementResized=function(event){this.googleMap&&google.maps.event.trigger(this.googleMap,"resize")},WPGMZA.GoogleMap.prototype.enableAllInteractions=function(){var options={scrollwheel:!0,draggable:!0,disableDoubleClickZoom:!1};this.googleMap.setOptions(options)}}),jQuery(function($){var Parent;WPGMZA.GoogleMarker=function(row){var self=this;Parent.call(this,row),this._opacity=1;var settings={};if(row)for(var name in row)row[name]instanceof WPGMZA.LatLng?settings[name]=row[name].toGoogleLatLng():row[name]instanceof WPGMZA.Map||"icon"==name||(settings[name]=row[name]);this.googleMarker=new google.maps.Marker(settings),(this.googleMarker.wpgmzaMarker=this).googleMarker.setPosition(new google.maps.LatLng({lat:parseFloat(this.lat),lng:parseFloat(this.lng)})),this.anim&&this.googleMarker.setAnimation(this.anim),this.animation&&this.googleMarker.setAnimation(this.animation),google.maps.event.addListener(this.googleMarker,"click",function(){self.dispatchEvent("click"),self.dispatchEvent("select")}),google.maps.event.addListener(this.googleMarker,"mouseover",function(){self.dispatchEvent("mouseover")}),google.maps.event.addListener(this.googleMarker,"dragend",function(){var googleMarkerPosition=self.googleMarker.getPosition();self.setPosition({lat:googleMarkerPosition.lat(),lng:googleMarkerPosition.lng()}),self.dispatchEvent({type:"dragend",latLng:self.getPosition()})}),this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.GoogleMarker.prototype=Object.create(Parent.prototype),WPGMZA.GoogleMarker.prototype.constructor=WPGMZA.GoogleMarker,Object.defineProperty(WPGMZA.GoogleMarker.prototype,"opacity",{get:function(){return this._opacity},set:function(value){this._opacity=value,this.googleMarker.setOpacity(value)}}),WPGMZA.GoogleMarker.prototype.setLabel=function(label){label?(this.googleMarker.setLabel({text:label}),this.googleMarker.getIcon()||this.googleMarker.setIcon(WPGMZA.settings.default_marker_icon)):this.googleMarker.setLabel(null)},WPGMZA.GoogleMarker.prototype.setPosition=function(latLng){Parent.prototype.setPosition.call(this,latLng),this.googleMarker.setPosition({lat:this.lat,lng:this.lng})},WPGMZA.GoogleMarker.prototype.updateOffset=function(){var self=this,icon=this.googleMarker.getIcon(),img=new Image,x=this._offset.x,y=this._offset.y,params="string"==typeof(icon=icon||WPGMZA.settings.default_marker_icon)?{url:icon}:icon;img.onload=function(){var defaultAnchor_x=img.width/2,defaultAnchor_y=img.height;params.anchor=new google.maps.Point(defaultAnchor_x-x,defaultAnchor_y-y),self.googleMarker.setIcon(params)},img.src=params.url},WPGMZA.GoogleMarker.prototype.setOptions=function(options){this.googleMarker.setOptions(options)},WPGMZA.GoogleMarker.prototype.setAnimation=function(animation){Parent.prototype.setAnimation.call(this,animation),this.googleMarker.setAnimation(animation)},WPGMZA.GoogleMarker.prototype.setVisible=function(visible){Parent.prototype.setVisible.call(this,visible),this.googleMarker.setVisible(!!visible)},WPGMZA.GoogleMarker.prototype.getVisible=function(visible){return this.googleMarker.getVisible()},WPGMZA.GoogleMarker.prototype.setDraggable=function(draggable){this.googleMarker.setDraggable(draggable)},WPGMZA.GoogleMarker.prototype.setOpacity=function(opacity){this.googleMarker.setOpacity(opacity)}}),jQuery(function($){WPGMZA.GoogleModernStoreLocatorCircle=function(map,settings){var self=this;WPGMZA.ModernStoreLocatorCircle.call(this,map,settings),this.intervalID=setInterval(function(){var mapSize={width:$(self.mapElement).width(),height:$(self.mapElement).height()};mapSize.width==self.mapSize.width&&mapSize.height==self.mapSize.height||(self.canvasLayer.resize_(),self.canvasLayer.draw(),self.mapSize=mapSize)},1e3),$(document).bind("webkitfullscreenchange mozfullscreenchange fullscreenchange",function(){self.canvasLayer.resize_(),self.canvasLayer.draw()})},WPGMZA.GoogleModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.GoogleModernStoreLocatorCircle.prototype.constructor=WPGMZA.GoogleModernStoreLocatorCircle,WPGMZA.GoogleModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this;this.canvasLayer&&(this.canvasLayer.setMap(null),this.canvasLayer.setAnimate(!1)),this.canvasLayer=new CanvasLayer({map:this.map.googleMap,resizeHandler:function(event){self.onResize(event)},updateHandler:function(event){self.onUpdate(event)},animate:!0,resolutionScale:this.getResolutionScale()})},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setOptions=function(options){WPGMZA.ModernStoreLocatorCircle.prototype.setOptions.call(this,options),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setPosition=function(position){WPGMZA.ModernStoreLocatorCircle.prototype.setPosition.call(this,position),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setRadius=function(radius){WPGMZA.ModernStoreLocatorCircle.prototype.setRadius.call(this,radius),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){var spherical=google.maps.geometry.spherical,latitude=this.settings.center,result=new WPGMZA.LatLng({lat:0,lng:0}),latitude=new WPGMZA.LatLng({lat:latitude.lat,lng:0}),result=spherical.computeOffset(result.toGoogleLatLng(),1e3*km,90),result=.006395*km*(spherical.computeOffset(latitude.toGoogleLatLng(),1e3*km,90).lng()/result.lng());if(isNaN(result))throw new Error("here");return result},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvasLayer.canvas.width,height:this.canvasLayer.canvas.height}},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){var position=this.map.googleMap.getProjection().fromLatLngToPoint(this.canvasLayer.getTopLeft());return{x:-position.x,y:-position.y}},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getCenterPixels=function(){var center=new WPGMZA.LatLng(this.settings.center);return this.map.googleMap.getProjection().fromLatLngToPoint(center.toGoogleLatLng())},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvasLayer.canvas.getContext("2d")},WPGMZA.GoogleModernStoreLocatorCircle.prototype.getScale=function(){return Math.pow(2,this.map.getZoom())*this.getResolutionScale()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.setVisible=function(visible){WPGMZA.ModernStoreLocatorCircle.prototype.setVisible.call(this,visible),this.canvasLayer.scheduleUpdate()},WPGMZA.GoogleModernStoreLocatorCircle.prototype.destroy=function(){this.canvasLayer.setMap(null),this.canvasLayer=null,clearInterval(this.intervalID)}}),jQuery(function($){WPGMZA.GoogleModernStoreLocator=function(restrict){this.map=WPGMZA.getMapByID(restrict),WPGMZA.ModernStoreLocator.call(this,restrict);var options={fields:["name","formatted_address"],types:["geocode"]},restrict=wpgmaps_localize[restrict].other_settings.wpgmza_store_locator_restrict;this.addressInput=$(this.element).find(".addressInput, #addressInput")[0],this.addressInput&&(restrict&&restrict.length&&(options.componentRestrictions={country:restrict}),this.autoComplete=new google.maps.places.Autocomplete(this.addressInput,options)),this.map.googleMap.controls[google.maps.ControlPosition.TOP_CENTER].push(this.element)},WPGMZA.GoogleModernStoreLocator.prototype=Object.create(WPGMZA.ModernStoreLocator.prototype),WPGMZA.GoogleModernStoreLocator.prototype.constructor=WPGMZA.GoogleModernStoreLocator}),jQuery(function($){var Parent;WPGMZA.GooglePolygon=function(options,googleOptions){var self=this;Parent.call(this,options,googleOptions),googleOptions?this.googlePolygon=googleOptions:(this.googlePolygon=new google.maps.Polygon,options&&(googleOptions=$.extend({},options),options.polydata&&(googleOptions.paths=this.parseGeometry(options.polydata)),options.linecolor&&(googleOptions.strokeColor="#"+options.linecolor),options.lineopacity&&(googleOptions.strokeOpacity=parseFloat(options.lineopacity)),options.fillcolor&&(googleOptions.fillColor="#"+options.fillcolor),options.opacity&&(googleOptions.fillOpacity=parseFloat(options.opacity)),this.googlePolygon.setOptions(googleOptions))),this.googlePolygon.wpgmzaPolygon=this,google.maps.event.addListener(this.googlePolygon,"click",function(){self.dispatchEvent({type:"click"})})},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.GooglePolygon.prototype=Object.create(Parent.prototype),WPGMZA.GooglePolygon.prototype.constructor=WPGMZA.GooglePolygon,WPGMZA.GooglePolygon.prototype.getEditable=function(){return this.googlePolygon.getOptions().editable},WPGMZA.GooglePolygon.prototype.setEditable=function(value){this.googlePolygon.setOptions({editable:value})},WPGMZA.GooglePolygon.prototype.toJSON=function(){var result=WPGMZA.Polygon.prototype.toJSON.call(this);result.points=[];for(var path=this.googlePolygon.getPath(),i=0;i<path.getLength();i++){var latLng=path.getAt(i);result.points.push({lat:latLng.lat(),lng:latLng.lng()})}return result}}),jQuery(function($){WPGMZA.GooglePolyline=function(path,googleOptions){var self=this;WPGMZA.Polyline.call(this,path,googleOptions),googleOptions?this.googlePolyline=googleOptions:(this.googlePolyline=new google.maps.Polyline(this.settings),path&&(googleOptions=$.extend({},path),path.polydata&&(googleOptions.path=this.parseGeometry(path.polydata)),path.linecolor&&(googleOptions.strokeColor="#"+path.linecolor),path.linethickness&&(googleOptions.strokeWeight=parseInt(path.linethickness)),path.opacity&&(googleOptions.strokeOpacity=parseFloat(path.opacity))),path&&path.polydata&&(path=this.parseGeometry(path.polydata),this.setPoints(path))),this.googlePolyline.wpgmzaPolyline=this,google.maps.event.addListener(this.googlePolyline,"click",function(){self.dispatchEvent({type:"click"})})},WPGMZA.GooglePolyline.prototype=Object.create(WPGMZA.Polyline.prototype),WPGMZA.GooglePolyline.prototype.constructor=WPGMZA.GooglePolyline,WPGMZA.GooglePolyline.prototype.setEditable=function(value){this.googlePolyline.setOptions({editable:value})},WPGMZA.GooglePolyline.prototype.setPoints=function(points){this.googlePolyline.setOptions({path:points})},WPGMZA.GooglePolyline.prototype.toJSON=function(){var result=WPGMZA.Polyline.prototype.toJSON.call(this);result.points=[];for(var path=this.googlePolyline.getPath(),i=0;i<path.getLength();i++){var latLng=path.getAt(i);result.points.push({lat:latLng.lat(),lng:latLng.lng()})}return result}}),jQuery(function($){WPGMZA.GoogleText=function(options){WPGMZA.Text.apply(this,arguments),this.overlay=new WPGMZA.GoogleTextOverlay(options)},WPGMZA.extend(WPGMZA.GoogleText,WPGMZA.Text)}),jQuery(function($){WPGMZA.GoogleTextOverlay=function(options){this.element=$("<div class='wpgmza-google-text-overlay'><div class='wpgmza-inner'></div></div>"),(options=options||{}).position&&(this.position=options.position),options.text&&this.element.find(".wpgmza-inner").text(options.text),options.map&&this.setMap(options.map.googleMap)},window.google&&google.maps&&google.maps.OverlayView&&(WPGMZA.GoogleTextOverlay.prototype=new google.maps.OverlayView),WPGMZA.GoogleTextOverlay.prototype.onAdd=function(){var position=this.getProjection().fromLatLngToDivPixel(this.position.toGoogleLatLng());this.element.css({position:"absolute",left:position.x+"px",top:position.y+"px"}),this.getPanes().floatPane.appendChild(this.element[0])},WPGMZA.GoogleTextOverlay.prototype.draw=function(){var position=this.getProjection().fromLatLngToDivPixel(this.position.toGoogleLatLng());this.element.css({position:"absolute",left:position.x+"px",top:position.y+"px"})},WPGMZA.GoogleTextOverlay.prototype.onRemove=function(){this.element.remove()},WPGMZA.GoogleTextOverlay.prototype.hide=function(){this.element.hide()},WPGMZA.GoogleTextOverlay.prototype.show=function(){this.element.show()},WPGMZA.GoogleTextOverlay.prototype.toggle=function(){this.element.is(":visible")?this.element.hide():this.element.show()}}),jQuery(function($){"google-maps"==WPGMZA.settings.engine&&(WPGMZA.googleAPIStatus&&"USER_CONSENT_NOT_GIVEN"==WPGMZA.googleAPIStatus.code||(WPGMZA.GoogleVertexContextMenu=function(mapEditPage){var self=this;this.mapEditPage=mapEditPage,this.element=document.createElement("div"),this.element.className="wpgmza-vertex-context-menu",this.element.innerHTML="Delete",google.maps.event.addDomListener(this.element,"click",function(event){return self.removeVertex(),event.preventDefault(),event.stopPropagation(),!1})},WPGMZA.GoogleVertexContextMenu.prototype=new google.maps.OverlayView,WPGMZA.GoogleVertexContextMenu.prototype.onAdd=function(){var self=this,map=this.getMap();this.getPanes().floatPane.appendChild(this.element),this.divListener=google.maps.event.addDomListener(map.getDiv(),"mousedown",function(e){e.target!=self.element&&self.close()},!0)},WPGMZA.GoogleVertexContextMenu.prototype.onRemove=function(){google.maps.event.removeListener(this.divListener),this.element.parentNode.removeChild(this.element),this.set("position"),this.set("path"),this.set("vertex")},WPGMZA.GoogleVertexContextMenu.prototype.open=function(map,path,vertex){this.set("position",path.getAt(vertex)),this.set("path",path),this.set("vertex",vertex),this.setMap(map),this.draw()},WPGMZA.GoogleVertexContextMenu.prototype.close=function(){this.setMap(null)},WPGMZA.GoogleVertexContextMenu.prototype.draw=function(){var point=this.get("position"),projection=this.getProjection();point&&projection&&(point=projection.fromLatLngToDivPixel(point),this.element.style.top=point.y+"px",this.element.style.left=point.x+"px")},WPGMZA.GoogleVertexContextMenu.prototype.removeVertex=function(){var path=this.get("path"),vertex=this.get("vertex");path&&null!=vertex&&path.removeAt(vertex),this.close()}))}),jQuery(function($){var Parent=WPGMZA.Circle;WPGMZA.OLCircle=function(options,olFeature){this.center={lat:0,lng:0},this.radius=0,this.fillcolor="#ff0000",this.opacity=.6,Parent.call(this,options,olFeature),this.olStyle=new ol.style.Style(this.getStyleFromSettings()),this.vectorLayer3857=this.layer=new ol.layer.Vector({source:new ol.source.Vector,style:this.olStyle}),olFeature?this.olFeature=olFeature:this.recreate()},WPGMZA.OLCircle.prototype=Object.create(Parent.prototype),WPGMZA.OLCircle.prototype.constructor=WPGMZA.OLCircle,WPGMZA.OLCircle.prototype.recreate=function(){var x,y,circle3857;this.olFeature&&(this.layer.getSource().removeFeature(this.olFeature),delete this.olFeature),this.center&&this.radius&&(circle3857=1e3*parseFloat(this.radius)/2,x=this.center.lng,y=this.center.lat,circle3857=ol.geom.Polygon.circular([x,y],circle3857,64).clone().transform("EPSG:4326","EPSG:3857"),this.olFeature=new ol.Feature(circle3857),this.layer.getSource().addFeature(this.olFeature))},WPGMZA.OLCircle.prototype.getStyleFromSettings=function(){var params={};return this.opacity&&(params.fill=new ol.style.Fill({color:WPGMZA.hexOpacityToRGBA(this.fillColor,this.opacity)})),params},WPGMZA.OLCircle.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLCircle.prototype.setVisible=function(visible){this.layer.setVisible(!!visible)},WPGMZA.OLCircle.prototype.setCenter=function(center){WPGMZA.Circle.prototype.setCenter.apply(this,arguments),this.recreate()},WPGMZA.OLCircle.prototype.setRadius=function(radius){WPGMZA.Circle.prototype.setRadius.apply(this,arguments),this.recreate()}}),jQuery(function($){WPGMZA.OLGeocoder=function(){},WPGMZA.OLGeocoder.prototype=Object.create(WPGMZA.Geocoder.prototype),WPGMZA.OLGeocoder.prototype.constructor=WPGMZA.OLGeocoder,WPGMZA.OLGeocoder.prototype.getResponseFromCache=function(query,callback){WPGMZA.restAPI.call("/geocode-cache",{data:{query:JSON.stringify(query)},success:function(response,xhr,status){response.lng=response.lon,callback(response)},useCompressedPathVariable:!0})},WPGMZA.OLGeocoder.prototype.getResponseFromNominatim=function(options,callback){var data={q:options.address,format:"json"};options.componentRestrictions&&options.componentRestrictions.country&&(data.countrycodes=options.componentRestrictions.country),$.ajax("https://nominatim.openstreetmap.org/search/",{data:data,success:function(response,xhr,status){callback(response)},error:function(response,xhr,status){callback(null,WPGMZA.Geocoder.FAIL)}})},WPGMZA.OLGeocoder.prototype.cacheResponse=function(query,response){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_store_nominatim_cache",query:JSON.stringify(query),response:JSON.stringify(response)},method:"POST"})},WPGMZA.OLGeocoder.prototype.clearCache=function(callback){$.ajax(WPGMZA.ajaxurl,{data:{action:"wpgmza_clear_nominatim_cache"},method:"POST",success:function(response){callback(response)}})},WPGMZA.OLGeocoder.prototype.getLatLngFromAddress=function(options,callback){return WPGMZA.OLGeocoder.prototype.geocode(options,callback)},WPGMZA.OLGeocoder.prototype.getAddressFromLatLng=function(options,callback){return WPGMZA.OLGeocoder.prototype.geocode(options,callback)},WPGMZA.OLGeocoder.prototype.geocode=function(options,callback){var finish,location,self=this;if(!options)throw new Error("Invalid options");if(WPGMZA.LatLng.REGEXP.test(options.address)){var latLng=WPGMZA.LatLng.fromString(options.address);callback([{geometry:{location:latLng},latLng:latLng,lat:latLng.lat,lng:latLng.lng}],WPGMZA.Geocoder.SUCCESS)}else{if(options.location&&(options.latLng=new WPGMZA.LatLng(options.location)),options.address)location=options.address,finish=function(response,status){for(var i=0;i<response.length;i++)response[i].geometry={location:new WPGMZA.LatLng({lat:parseFloat(response[i].lat),lng:parseFloat(response[i].lon)})},response[i].latLng={lat:parseFloat(response[i].lat),lng:parseFloat(response[i].lon)},response[i].bounds=new WPGMZA.LatLngBounds(new WPGMZA.LatLng({lat:response[i].boundingbox[1],lng:response[i].boundingbox[2]}),new WPGMZA.LatLng({lat:response[i].boundingbox[0],lng:response[i].boundingbox[3]})),response[i].lng=response[i].lon;callback(response,status)};else{if(!options.latLng)throw new Error("You must supply either a latLng or address");location=options.latLng.toString(),finish=function(address,status){address=address[0].display_name;callback([address],status)}}var query={location:location,options:options};this.getResponseFromCache(query,function(response){response.length?finish(response,WPGMZA.Geocoder.SUCCESS):self.getResponseFromNominatim($.extend(options,{address:location}),function(response,status){status!=WPGMZA.Geocoder.FAIL?0!=response.length?(finish(response,WPGMZA.Geocoder.SUCCESS),self.cacheResponse(query,response)):callback([],WPGMZA.Geocoder.ZERO_RESULTS):callback(null,WPGMZA.Geocoder.FAIL)})})}}}),jQuery(function($){var Parent;WPGMZA.OLInfoWindow=function(mapObject){var self=this;Parent.call(this,mapObject),this.element=$("<div class='wpgmza-infowindow ol-info-window-container ol-info-window-plain'></div>")[0],$(this.element).on("click",".ol-info-window-close",function(event){self.close()})},Parent=WPGMZA.isProVersion()?WPGMZA.ProInfoWindow:WPGMZA.InfoWindow,WPGMZA.OLInfoWindow.prototype=Object.create(Parent.prototype),WPGMZA.OLInfoWindow.prototype.constructor=WPGMZA.OLInfoWindow,Object.defineProperty(WPGMZA.OLInfoWindow.prototype,"isPanIntoViewAllowed",{get:function(){return!0}}),WPGMZA.OLInfoWindow.prototype.open=function(map,mapObject){var self=this,latLng=mapObject.getPosition();if(!Parent.prototype.open.call(this,map,mapObject))return!1;this.parent=map,this.overlay&&this.mapObject.map.olMap.removeOverlay(this.overlay),this.overlay=new ol.Overlay({element:this.element,stopEvent:!1}),this.overlay.setPosition(ol.proj.fromLonLat([latLng.lng,latLng.lat])),self.mapObject.map.olMap.addOverlay(this.overlay),$(this.element).show(),WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER&&WPGMZA.getImageDimensions(mapObject.getIcon(),function(size){$(self.element).css({left:Math.round(size.width/2)+"px"})}),this.trigger("infowindowopen"),this.trigger("domready")},WPGMZA.OLInfoWindow.prototype.close=function(event){$(this.element).hide(),this.overlay&&(WPGMZA.InfoWindow.prototype.close.call(this),this.trigger("infowindowclose"),this.mapObject.map.olMap.removeOverlay(this.overlay),this.overlay=null)},WPGMZA.OLInfoWindow.prototype.setContent=function(html){$(this.element).html("<i class='fa fa-times ol-info-window-close' aria-hidden='true'></i>"+html)},WPGMZA.OLInfoWindow.prototype.setOptions=function(options){options.maxWidth&&$(this.element).css({"max-width":options.maxWidth+"px"})},WPGMZA.OLInfoWindow.prototype.onOpen=function(){var self=this,imgs=$(this.element).find("img"),numImages=imgs.length,numImagesLoaded=0;function inside(a,b){a=$(a)[0].getBoundingClientRect(),b=$(b)[0].getBoundingClientRect();return a.left>=b.left&&a.left<=b.right&&a.right<=b.right&&a.right>=b.left&&a.top>=b.top&&a.top<=b.bottom&&a.bottom<=b.bottom&&a.bottom>=b.top}function panIntoView(){var offset=.45*-$(self.element).height();self.mapObject.map.animateNudge(0,offset,self.mapObject.getPosition())}WPGMZA.InfoWindow.prototype.onOpen.apply(this,arguments),this.isPanIntoViewAllowed&&(imgs.each(function(index,el){el.onload=function(){++numImagesLoaded!=numImages||inside(self.element,self.mapObject.map.element)||panIntoView()}}),0!=numImages||inside(self.element,self.mapObject.map.element)||panIntoView())}}),jQuery(function($){var Parent;WPGMZA.OLMap=function(element,viewOptions){var self=this;Parent.call(this,element),this.setOptions(viewOptions);var marker,viewOptions=this.settings.toOLViewOptions();$(this.element).html(""),this.olMap=new ol.Map({target:$(element)[0],layers:[this.getTileLayer()],view:new ol.View(viewOptions)}),this.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan?interaction.setActive("yes"!=self.settings.wpgmza_settings_map_draggable):interaction instanceof ol.interaction.DoubleClickZoom?interaction.setActive(!self.settings.wpgmza_settings_map_clickzoom):interaction instanceof ol.interaction.MouseWheelZoom&&interaction.setActive("yes"!=self.settings.wpgmza_settings_map_scroll)},this),"greedy"!=this.settings.wpgmza_force_greedy_gestures&&"yes"!=this.settings.wpgmza_force_greedy_gestures&&(this.gestureOverlay=$("<div class='wpgmza-gesture-overlay'></div>"),this.gestureOverlayTimeoutID=null,WPGMZA.isTouchDevice()||(this.olMap.on("wheel",function(event){if(!ol.events.condition.platformModifierKeyOnly(event))return self.showGestureOverlay(),event.originalEvent.preventDefault(),!1}),this.gestureOverlay.text(WPGMZA.localized_strings.use_ctrl_scroll_to_zoom))),this.olMap.getControls().forEach(function(control){control instanceof ol.control.Zoom&&"yes"==WPGMZA.settings.wpgmza_settings_map_zoom&&self.olMap.removeControl(control)},this),"yes"!=WPGMZA.settings.wpgmza_settings_map_full_screen_control&&this.olMap.addControl(new ol.control.FullScreen),WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER&&(this.markerLayer=new ol.layer.Vector({source:new ol.source.Vector({features:[]})}),this.olMap.addLayer(this.markerLayer),this.olMap.on("click",function(marker){marker=self.olMap.getFeaturesAtPixel(marker.pixel);marker&&marker.length&&((marker=marker[0].wpgmzaMarker)&&(marker.trigger("click"),marker.trigger("select")))})),this.olMap.on("movestart",function(event){self.isBeingDragged=!0}),this.olMap.on("moveend",function(event){self.wrapLongitude(),self.isBeingDragged=!1,self.dispatchEvent("dragend"),self.onIdle()}),this.olMap.getView().on("change:resolution",function(event){self.dispatchEvent("zoom_changed"),self.dispatchEvent("zoomchanged"),setTimeout(function(){self.onIdle()},10)}),this.olMap.getView().on("change",function(){self.onBoundsChanged()}),self.onBoundsChanged(),this.storeLocator&&(marker=this.storeLocator.centerPointMarker)&&(this.olMap.addOverlay(marker.overlay),marker.setVisible(!1)),$(this.element).on("click contextmenu",function(event){var isRight;event=event||window.event;var latLng=self.pixelsToLatLng(event.offsetX,event.offsetY);return"which"in event?isRight=3==event.which:"button"in event&&(isRight=2==event.button),1==event.which||1==event.button?self.isBeingDragged||$(event.target).closest(".ol-marker").length?void 0:void self.trigger({type:"click",latLng:latLng}):isRight?self.onRightClick(event):void 0}),WPGMZA.isProVersion()||(this.trigger("init"),this.dispatchEvent("created"),WPGMZA.events.dispatchEvent({type:"mapcreated",map:this}),$(this.element).trigger("wpgooglemaps_loaded"))},Parent=WPGMZA.isProVersion()?WPGMZA.ProMap:WPGMZA.Map,WPGMZA.OLMap.prototype=Object.create(Parent.prototype),WPGMZA.OLMap.prototype.constructor=WPGMZA.OLMap,WPGMZA.OLMap.prototype.getTileLayer=function(){var options={};return WPGMZA.settings.tile_server_url&&(options.url=WPGMZA.settings.tile_server_url),new ol.layer.Tile({source:new ol.source.OSM(options)})},WPGMZA.OLMap.prototype.wrapLongitude=function(){var center=ol.proj.transform(this.olMap.getView().getCenter(),"EPSG:3857","EPSG:4326"),center={lat:center[1],lng:center[0]};-180<=center.lng&&center.lng<=180||(center.lng=center.lng-360*Math.floor(center.lng/360),180<center.lng&&(center.lng-=360),this.setCenter(center))},WPGMZA.OLMap.prototype.getCenter=function(){var lonLat=ol.proj.toLonLat(this.olMap.getView().getCenter());return{lat:lonLat[1],lng:lonLat[0]}},WPGMZA.OLMap.prototype.setCenter=function(latLng){var view=this.olMap.getView();WPGMZA.Map.prototype.setCenter.call(this,latLng),view.setCenter(ol.proj.fromLonLat([latLng.lng,latLng.lat])),this.wrapLongitude(),this.onBoundsChanged()},WPGMZA.OLMap.prototype.getBounds=function(){var bottomRight=this.olMap.getView().calculateExtent(this.olMap.getSize()),nativeBounds=new WPGMZA.LatLngBounds,topLeft=ol.proj.toLonLat([bottomRight[0],bottomRight[1]]),bottomRight=ol.proj.toLonLat([bottomRight[2],bottomRight[3]]);return nativeBounds.north=topLeft[1],nativeBounds.south=bottomRight[1],nativeBounds.west=topLeft[0],nativeBounds.east=bottomRight[0],nativeBounds},WPGMZA.OLMap.prototype.fitBounds=function(southWest,extent){southWest instanceof WPGMZA.LatLng&&(southWest={lat:southWest.lat,lng:southWest.lng}),extent instanceof WPGMZA.LatLng?extent={lat:extent.lat,lng:extent.lng}:southWest instanceof WPGMZA.LatLngBounds&&(southWest={lat:(view=southWest).south,lng:view.west},extent={lat:view.north,lng:view.east});var view=this.olMap.getView(),extent=ol.extent.boundingExtent([ol.proj.fromLonLat([parseFloat(southWest.lng),parseFloat(southWest.lat)]),ol.proj.fromLonLat([parseFloat(extent.lng),parseFloat(extent.lat)])]);view.fit(extent,this.olMap.getSize())},WPGMZA.OLMap.prototype.panTo=function(latLng,zoom){var view=this.olMap.getView(),options={center:ol.proj.fromLonLat([parseFloat(latLng.lng),parseFloat(latLng.lat)]),duration:500};1<arguments.length&&(options.zoom=parseInt(zoom)),view.animate(options)},WPGMZA.OLMap.prototype.getZoom=function(){return Math.round(this.olMap.getView().getZoom())},WPGMZA.OLMap.prototype.setZoom=function(value){this.olMap.getView().setZoom(value)},WPGMZA.OLMap.prototype.getMinZoom=function(){return this.olMap.getView().getMinZoom()},WPGMZA.OLMap.prototype.setMinZoom=function(value){this.olMap.getView().setMinZoom(value)},WPGMZA.OLMap.prototype.getMaxZoom=function(){return this.olMap.getView().getMaxZoom()},WPGMZA.OLMap.prototype.setMaxZoom=function(value){this.olMap.getView().setMaxZoom(value)},WPGMZA.OLMap.prototype.setOptions=function(options){Parent.prototype.setOptions.call(this,options),this.olMap&&this.olMap.getView().setProperties(this.settings.toOLViewOptions())},WPGMZA.OLMap.prototype.addMarker=function(marker){WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT?this.olMap.addOverlay(marker.overlay):(this.markerLayer.getSource().addFeature(marker.feature),marker.featureInSource=!0),Parent.prototype.addMarker.call(this,marker)},WPGMZA.OLMap.prototype.removeMarker=function(marker){WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT?this.olMap.removeOverlay(marker.overlay):(this.markerLayer.getSource().removeFeature(marker.feature),marker.featureInSource=!1),Parent.prototype.removeMarker.call(this,marker)},WPGMZA.OLMap.prototype.addPolygon=function(polygon){this.olMap.addLayer(polygon.layer),Parent.prototype.addPolygon.call(this,polygon)},WPGMZA.OLMap.prototype.removePolygon=function(polygon){this.olMap.removeLayer(polygon.layer),Parent.prototype.removePolygon.call(this,polygon)},WPGMZA.OLMap.prototype.addPolyline=function(polyline){this.olMap.addLayer(polyline.layer),Parent.prototype.addPolyline.call(this,polyline)},WPGMZA.OLMap.prototype.removePolyline=function(polyline){this.olMap.removeLayer(polyline.layer),Parent.prototype.removePolyline.call(this,polyline)},WPGMZA.OLMap.prototype.addCircle=function(circle){this.olMap.addLayer(circle.layer),Parent.prototype.addCircle.call(this,circle)},WPGMZA.OLMap.prototype.removeCircle=function(circle){this.olMap.removeLayer(circle.layer),Parent.prototype.removeCircle.call(this,circle)},WPGMZA.OLMap.prototype.addRectangle=function(rectangle){this.olMap.addLayer(rectangle.layer),Parent.prototype.addRectangle.call(this,rectangle)},WPGMZA.OLMap.prototype.removeRectangle=function(rectangle){this.olMap.removeLayer(rectangle.layer),Parent.prototype.removeRectangle.call(this,rectangle)},WPGMZA.OLMap.prototype.pixelsToLatLng=function(x,lonLat){null==lonLat&&("x"in x&&"y"in x?(lonLat=x.y,x=x.x):console.warn("Y coordinate undefined in pixelsToLatLng (did you mean to pass 2 arguments?)"));lonLat=this.olMap.getCoordinateFromPixel([x,lonLat]);if(!lonLat)return{x:null,y:null};lonLat=ol.proj.toLonLat(lonLat);return{lat:lonLat[1],lng:lonLat[0]}},WPGMZA.OLMap.prototype.latLngToPixels=function(pixel){pixel=ol.proj.fromLonLat([pixel.lng,pixel.lat]),pixel=this.olMap.getPixelFromCoordinate(pixel);return pixel?{x:pixel[0],y:pixel[1]}:{x:null,y:null}},WPGMZA.OLMap.prototype.enableBicycleLayer=function(value){value?(this.bicycleLayer||(this.bicycleLayer=new ol.layer.Tile({source:new ol.source.OSM({url:"http://{a-c}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png"})})),this.olMap.addLayer(this.bicycleLayer)):this.bicycleLayer&&this.olMap.removeLayer(this.bicycleLayer)},WPGMZA.OLMap.prototype.showGestureOverlay=function(){var self=this;clearTimeout(this.gestureOverlayTimeoutID),$(this.gestureOverlay).stop().animate({opacity:"100"}),$(this.element).append(this.gestureOverlay),$(this.gestureOverlay).css({"line-height":$(this.element).height()+"px",opacity:"1.0"}),$(this.gestureOverlay).show(),this.gestureOverlayTimeoutID=setTimeout(function(){self.gestureOverlay.fadeOut(2e3)},2e3)},WPGMZA.OLMap.prototype.onElementResized=function(event){this.olMap.updateSize()},WPGMZA.OLMap.prototype.onRightClick=function(event){if($(event.target).closest(".ol-marker, .wpgmza_modern_infowindow, .wpgmza-modern-store-locator").length)return!0;var latLng=$(this.element).offset(),relX=event.pageX-latLng.left,latLng=event.pageY-latLng.top,latLng=this.pixelsToLatLng(relX,latLng);return this.trigger({type:"rightclick",latLng:latLng}),$(this.element).trigger({type:"rightclick",latLng:latLng}),event.preventDefault(),!1},WPGMZA.OLMap.prototype.enableAllInteractions=function(){this.olMap.getInteractions().forEach(function(interaction){(interaction instanceof ol.interaction.DragPan||interaction instanceof ol.interaction.DoubleClickZoom||interaction instanceof ol.interaction.MouseWheelZoom)&&interaction.setActive(!0)},this)}}),jQuery(function($){var Parent;WPGMZA.OLMarker=function(row){var self=this;Parent.call(this,row);var origin=ol.proj.fromLonLat([parseFloat(this.lng),parseFloat(this.lat)]);if(WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT){var img=$("<img alt=''/>")[0];img.onload=function(event){self.updateElementHeight(),self.map&&self.map.olMap.updateSize()},img.src=WPGMZA.defaultMarkerIcon,this.element=$("<div class='ol-marker'></div>")[0],$(this.element).attr("title",this.title),this.element.appendChild(img),this.element.wpgmzaMarker=this,$(this.element).on("mouseover",function(event){self.dispatchEvent("mouseover")}),this.overlay=new ol.Overlay({element:this.element,position:origin,positioning:"bottom-center",stopEvent:!1}),this.overlay.setPosition(origin),this.animation&&this.setAnimation(this.animation),this.setLabel(this.settings.label),row&&row.draggable&&this.setDraggable(!0),this.rebindClickListener()}else{if(WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)throw new Error("Invalid marker render mode");this.feature=new ol.Feature({geometry:new ol.geom.Point(origin)}),this.feature.setStyle(this.getVectorLayerStyle()),this.feature.wpgmzaMarker=this}this.trigger("init")},Parent=WPGMZA.isProVersion()?WPGMZA.ProMarker:WPGMZA.Marker,WPGMZA.OLMarker.prototype=Object.create(Parent.prototype),WPGMZA.OLMarker.prototype.constructor=WPGMZA.OLMarker,WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT="element",WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER="vector",WPGMZA.OLMarker.renderMode=WPGMZA.OLMarker.RENDER_MODE_HTML_ELEMENT,"open-layers"==WPGMZA.settings.engine&&WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER&&(WPGMZA.OLMarker.defaultVectorLayerStyle=new ol.style.Style({image:new ol.style.Icon({anchor:[.5,1],src:WPGMZA.defaultMarkerIcon})}),WPGMZA.OLMarker.hiddenVectorLayerStyle=new ol.style.Style({})),WPGMZA.OLMarker.prototype.getVectorLayerStyle=function(){return this.vectorLayerStyle||WPGMZA.OLMarker.defaultVectorLayerStyle},WPGMZA.OLMarker.prototype.updateElementHeight=function(height,calledOnFocus){var self=this;0!=(height=height||$(this.element).find("img").height())||calledOnFocus||$(window).one("focus",function(event){self.updateElementHeight(!1,!0)}),$(this.element).css({height:height+"px"})},WPGMZA.OLMarker.prototype.addLabel=function(){this.setLabel(this.getLabelText())},WPGMZA.OLMarker.prototype.setLabel=function(label){WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?label?(this.label||(this.label=$("<div class='ol-marker-label'/>"),$(this.element).append(this.label)),this.label.html(label)):this.label&&$(this.element).find(".ol-marker-label").remove():console.warn("Marker labels are not currently supported in Vector Layer rendering mode")},WPGMZA.OLMarker.prototype.getVisible=function(visible){if(WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)return"none"!=this.overlay.getElement().style.display},WPGMZA.OLMarker.prototype.setVisible=function(visible){var style;Parent.prototype.setVisible.call(this,visible),WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?visible?(style=this.getVectorLayerStyle(),this.feature.setStyle(style)):this.feature.setStyle(null):this.overlay.getElement().style.display=visible?"block":"none"},WPGMZA.OLMarker.prototype.setPosition=function(origin){Parent.prototype.setPosition.call(this,origin);origin=ol.proj.fromLonLat([parseFloat(this.lng),parseFloat(this.lat)]);WPGMZA.OLMarker.renderMode==WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?this.feature.setGeometry(new ol.geom.Point(origin)):this.overlay.setPosition(origin)},WPGMZA.OLMarker.prototype.updateOffset=function(x,y){WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?(x=this._offset.x,y=this._offset.y,this.element.style.position="relative",this.element.style.left=x+"px",this.element.style.top=y+"px"):console.warn("Marker offset is not currently supported in Vector Layer rendering mode")},WPGMZA.OLMarker.prototype.setAnimation=function(anim){if(WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER)switch(Parent.prototype.setAnimation.call(this,anim),anim){case WPGMZA.Marker.ANIMATION_NONE:$(this.element).removeAttr("data-anim");break;case WPGMZA.Marker.ANIMATION_BOUNCE:$(this.element).attr("data-anim","bounce");break;case WPGMZA.Marker.ANIMATION_DROP:$(this.element).attr("data-anim","drop")}else console.warn("Marker animation is not currently supported in Vector Layer rendering mode")},WPGMZA.OLMarker.prototype.setDraggable=function(options){var self=this;WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?options?(options={disabled:!1},this.jQueryDraggableInitialized||(options.start=function(event){self.onDragStart(event)},options.stop=function(event){self.onDragEnd(event)}),$(this.element).draggable(options),this.jQueryDraggableInitialized=!0,this.rebindClickListener()):$(this.element).draggable({disabled:!0}):console.warn("Marker dragging is not currently supported in Vector Layer rendering mode")},WPGMZA.OLMarker.prototype.setOpacity=function(opacity){WPGMZA.OLMarker.renderMode!=WPGMZA.OLMarker.RENDER_MODE_VECTOR_LAYER?$(this.element).css({opacity:opacity}):console.warn("Marker opacity is not currently supported in Vector Layer rendering mode")},WPGMZA.OLMarker.prototype.onDragStart=function(event){this.isBeingDragged=!0,this.map.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan&&interaction.setActive(!1)})},WPGMZA.OLMarker.prototype.onDragEnd=function(event){var latLngAfterDrag=parseFloat($(this.element).css("top").match(/-?\d+/)[0]),offset_left=parseFloat($(this.element).css("left").match(/-?\d+/)[0]);$(this.element).css({top:"0px",left:"0px"});var pixelsBeforeDrag=this.getPosition(),pixelsBeforeDrag=this.map.latLngToPixels(pixelsBeforeDrag),latLngAfterDrag={x:pixelsBeforeDrag.x+offset_left,y:pixelsBeforeDrag.y+latLngAfterDrag},latLngAfterDrag=this.map.pixelsToLatLng(latLngAfterDrag);this.setPosition(latLngAfterDrag),this.isBeingDragged=!1,this.trigger({type:"dragend",latLng:latLngAfterDrag}),"yes"!=this.map.settings.wpgmza_settings_map_draggable&&this.map.olMap.getInteractions().forEach(function(interaction){interaction instanceof ol.interaction.DragPan&&interaction.setActive(!0)})},WPGMZA.OLMarker.prototype.onElementClick=function(self){self=self.currentTarget.wpgmzaMarker;self.isBeingDragged||(self.dispatchEvent("click"),self.dispatchEvent("select"))},WPGMZA.OLMarker.prototype.rebindClickListener=function(){$(this.element).off("click",this.onElementClick),$(this.element).on("click",this.onElementClick)}}),jQuery(function($){WPGMZA.OLModernStoreLocatorCircle=function(map,settings){WPGMZA.ModernStoreLocatorCircle.call(this,map,settings)},WPGMZA.OLModernStoreLocatorCircle.prototype=Object.create(WPGMZA.ModernStoreLocatorCircle.prototype),WPGMZA.OLModernStoreLocatorCircle.prototype.constructor=WPGMZA.OLModernStoreLocatorCircle,WPGMZA.OLModernStoreLocatorCircle.prototype.initCanvasLayer=function(){var self=this,mapElement=$(this.map.element),olViewportElement=mapElement.children(".ol-viewport");this.canvas=document.createElement("canvas"),this.canvas.className="wpgmza-ol-canvas-overlay",mapElement.append(this.canvas),this.renderFunction=function(event){self.canvas.width==olViewportElement.width()&&self.canvas.height==olViewportElement.height()||(self.canvas.width=olViewportElement.width(),self.canvas.height=olViewportElement.height(),$(this.canvas).css({width:olViewportElement.width()+"px",height:olViewportElement.height()+"px"})),self.draw()},this.map.olMap.on("postrender",this.renderFunction)},WPGMZA.OLModernStoreLocatorCircle.prototype.getContext=function(type){return this.canvas.getContext(type)},WPGMZA.OLModernStoreLocatorCircle.prototype.getCanvasDimensions=function(){return{width:this.canvas.width,height:this.canvas.height}},WPGMZA.OLModernStoreLocatorCircle.prototype.getCenterPixels=function(){return this.map.latLngToPixels(this.settings.center)},WPGMZA.OLModernStoreLocatorCircle.prototype.getWorldOriginOffset=function(){return{x:0,y:0}},WPGMZA.OLModernStoreLocatorCircle.prototype.getTransformedRadius=function(km){var centerPixels=new WPGMZA.LatLng(this.settings.center),outerPixels=new WPGMZA.LatLng(centerPixels);outerPixels.moveByDistance(km,90);centerPixels=this.map.latLngToPixels(centerPixels),outerPixels=this.map.latLngToPixels(outerPixels);return Math.abs(outerPixels.x-centerPixels.x)},WPGMZA.OLModernStoreLocatorCircle.prototype.getScale=function(){return 1},WPGMZA.OLModernStoreLocatorCircle.prototype.destroy=function(){$(this.canvas).remove(),this.map.olMap.un("postrender",this.renderFunction),this.map=null,this.canvas=null}}),jQuery(function($){WPGMZA.OLModernStoreLocator=function(map_id){WPGMZA.ModernStoreLocator.call(this,map_id),(WPGMZA.isProVersion()?$(".wpgmza_map[data-map-id='"+map_id+"']"):$("#wpgmza_map")).append(this.element)},WPGMZA.OLModernStoreLocator.prototype=Object.create(WPGMZA.ModernStoreLocator),WPGMZA.OLModernStoreLocator.prototype.constructor=WPGMZA.OLModernStoreLocator}),jQuery(function($){var Parent;WPGMZA.OLPolygon=function(options,olFeature){if(Parent.call(this,options,olFeature),this.olStyle=new ol.style.Style,olFeature)this.olFeature=olFeature;else{var coordinates=[[]];if(options&&options.polydata){for(var paths=this.parseGeometry(options.polydata),i=0;i<paths.length;i++)coordinates[0].push(ol.proj.fromLonLat([parseFloat(paths[i].lng),parseFloat(paths[i].lat)]));this.olStyle=new ol.style.Style(this.getStyleFromSettings())}this.olFeature=new ol.Feature({geometry:new ol.geom.Polygon(coordinates)})}this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]}),style:this.olStyle}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaPolygon:this})},Parent=WPGMZA.isProVersion()?WPGMZA.ProPolygon:WPGMZA.Polygon,WPGMZA.OLPolygon.prototype=Object.create(Parent.prototype),WPGMZA.OLPolygon.prototype.constructor=WPGMZA.OLPolygon,WPGMZA.OLPolygon.prototype.getStyleFromSettings=function(){var params={};return this.linecolor&&this.lineopacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA("#"+this.linecolor,this.lineopacity)})),this.opacity&&(params.fill=new ol.style.Fill({color:WPGMZA.hexOpacityToRGBA(this.fillcolor,this.opacity)})),params},WPGMZA.OLPolygon.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLPolygon.prototype.setEditable=function(editable){},WPGMZA.OLPolygon.prototype.toJSON=function(){var result=Parent.prototype.toJSON.call(this),coordinates=this.olFeature.getGeometry().getCoordinates()[0];result.points=[];for(var i=0;i<coordinates.length;i++){var latLng=ol.proj.toLonLat(coordinates[i]),latLng={lat:latLng[1],lng:latLng[0]};result.points.push(latLng)}return result}}),jQuery(function($){var Parent;WPGMZA.OLPolyline=function(params,olFeature){if(WPGMZA.Polyline.call(this,params),this.olStyle=new ol.style.Style,olFeature)this.olFeature=olFeature;else{var coordinates=[];if(params&&(params.polydata||params.points))for(var path=params.polydata?this.parseGeometry(params.polydata):params.points,i=0;i<path.length;i++){if(!$.isNumeric(path[i].lat))throw new Error("Invalid latitude");if(!$.isNumeric(path[i].lng))throw new Error("Invalid longitude");coordinates.push(ol.proj.fromLonLat([parseFloat(path[i].lng),parseFloat(path[i].lat)]))}params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.olFeature=new ol.Feature({geometry:new ol.geom.LineString(coordinates)})}this.layer=new ol.layer.Vector({source:new ol.source.Vector({features:[this.olFeature]}),style:this.olStyle}),this.layer.getSource().getFeatures()[0].setProperties({wpgmzaPolyline:this})},Parent=WPGMZA.Polyline,WPGMZA.OLPolyline.prototype=Object.create(Parent.prototype),WPGMZA.OLPolyline.prototype.constructor=WPGMZA.OLPolyline,WPGMZA.OLPolyline.prototype.getStyleFromSettings=function(){var params={};return this.settings.strokeOpacity&&(params.stroke=new ol.style.Stroke({color:WPGMZA.hexOpacityToRGBA(this.settings.strokeColor,this.settings.strokeOpacity),width:parseInt(this.settings.strokeWeight)})),params},WPGMZA.OLPolyline.prototype.updateStyleFromSettings=function(){var params=this.getStyleFromSettings();this.olStyle=new ol.style.Style(params),this.layer.setStyle(this.olStyle)},WPGMZA.OLPolyline.prototype.setEditable=function(editable){},WPGMZA.OLPolyline.prototype.setPoints=function(points){this.olFeature&&this.layer.getSource().removeFeature(this.olFeature);for(var coordinates=[],i=0;i<points.length;i++)coordinates.push(ol.proj.fromLonLat([parseFloat(points[i].lng),parseFloat(points[i].lat)]));this.olFeature=new ol.Feature({geometry:new ol.geom.LineString(coordinates)}),this.layer.getSource().addFeature(this.olFeature)},WPGMZA.OLPolyline.prototype.toJSON=function(){var result=Parent.prototype.toJSON.call(this),coordinates=this.olFeature.getGeometry().getCoordinates();result.points=[];for(var i=0;i<coordinates.length;i++){var latLng=ol.proj.toLonLat(coordinates[i]),latLng={lat:latLng[1],lng:latLng[0]};result.points.push(latLng)}return result}}),jQuery(function($){WPGMZA.OLText=function(){}}),jQuery(function($){WPGMZA.DataTable=function(element){var version,self=this;if(!$.fn.dataTable)return console.warn("The dataTables library is not loaded. Cannot create a dataTable. Did you enable 'Do not enqueue dataTables'?"),void(WPGMZA.settings.wpgmza_do_not_enqueue_datatables&&WPGMZA.getCurrentPage()==WPGMZA.PAGE_MAP_EDIT&&alert("You have selected 'Do not enqueue DataTables' in WP Google Maps' settings. No 3rd party software is loading the DataTables library. Because of this, the marker table cannot load. Please uncheck this option to use the marker table."));$.fn.dataTable.ext?$.fn.dataTable.ext.errMode="throw":(version=$.fn.dataTable.version||"unknown",console.warn("You appear to be running an outdated or modified version of the dataTables library. This may cause issues with table functionality. This is usually caused by 3rd party software loading an older version of DataTables. The loaded version is "+version+", we recommend version 1.10.12 or above.")),this.element=element,(this.element.wpgmzaDataTable=this).dataTableElement=this.getDataTableElement();var settings=this.getDataTableSettings();this.phpClass=$(element).attr("data-wpgmza-php-class"),(this.wpgmzaDataTable=this).useCompressedPathVariable=WPGMZA.restAPI.isCompressedPathVariableSupported&&WPGMZA.settings.enable_compressed_path_variables,this.method=this.useCompressedPathVariable?"GET":"POST",null==this.getLanguageURL()||"//cdn.datatables.net/plug-ins/1.10.12/i18n/English.json"==this.getLanguageURL()?(this.dataTable=$(this.dataTableElement).DataTable(settings),this.dataTable.ajax.reload()):$.ajax(this.getLanguageURL(),{success:function(response,status,xhr){self.languageJSON=response,self.dataTable=$(self.dataTableElement).DataTable(settings),self.dataTable.ajax.reload()},error:function(){self.dataTable=$(self.dataTableElement).DataTable(settings),self.dataTable.ajax.reload()}})},WPGMZA.DataTable.prototype.getDataTableElement=function(){return $(this.element).find("table")},WPGMZA.DataTable.prototype.onAJAXRequest=function(data,settings){var params={phpClass:this.phpClass},attr=$(this.element).attr("data-wpgmza-ajax-parameters");return attr&&$.extend(params,JSON.parse(attr)),$.extend(data,params)},WPGMZA.DataTable.prototype.onDataTableAjaxRequest=function(data,callback,options){var self=this,route=this.element,route=$(route).attr("data-wpgmza-rest-api-route"),options=this.onAJAXRequest(data,options),draw=options.draw;if(delete options.draw,!route)throw new Error("No data-wpgmza-rest-api-route attribute specified");options={method:"POST",useCompressedPathVariable:!0,data:options,dataType:"json",cache:!this.preventCaching,beforeSend:function(xhr){xhr.setRequestHeader("X-DataTables-Draw",draw)},success:function(response,status,xhr){response.draw=draw,self.lastResponse=response,callback(response),self.onAJAXResponse(response)}};return WPGMZA.restAPI.call(route,options)},WPGMZA.DataTable.prototype.getDataTableSettings=function(){var self=this,languageURL=this.element,options={};$(languageURL).attr("data-wpgmza-datatable-options")&&(options=JSON.parse($(languageURL).attr("data-wpgmza-datatable-options"))),options.deferLoading=!0,options.processing=!0,options.serverSide=!0,options.ajax=function(data,callback,settings){return WPGMZA.DataTable.prototype.onDataTableAjaxRequest.apply(self,arguments)},WPGMZA.AdvancedTableDataTable&&this instanceof WPGMZA.AdvancedTableDataTable&&WPGMZA.settings.wpgmza_default_items&&(options.iDisplayLength=parseInt(WPGMZA.settings.wpgmza_default_items)),options.aLengthMenu=[[5,10,25,50,100,-1],["5","10","25","50","100",WPGMZA.localized_strings.all]];languageURL=this.getLanguageURL();return languageURL&&(options.language={url:languageURL}),options},WPGMZA.DataTable.prototype.getLanguageURL=function(){if(!WPGMZA.locale)return null;var languageURL;switch(WPGMZA.locale.substr(0,2)){case"af":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Afrikaans.json";break;case"sq":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Albanian.json";break;case"am":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Amharic.json";break;case"ar":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Arabic.json";break;case"hy":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Armenian.json";break;case"az":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Azerbaijan.json";break;case"bn":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Bangla.json";break;case"eu":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Basque.json";break;case"be":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Belarusian.json";break;case"bg":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Bulgarian.json";break;case"ca":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Catalan.json";break;case"zh":languageURL="zh_TW"==WPGMZA.locale?WPGMZA.pluginDirURL+"languages/datatables/Chinese-traditional.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Chinese.json";break;case"hr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Croatian.json";break;case"cs":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Czech.json";break;case"da":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Danish.json";break;case"nl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Dutch.json";break;case"et":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Estonian.json";break;case"fi":languageURL=WPGMZA.locale.match(/^fil/)?WPGMZA.pluginDirURL+"languages/datatables/Filipino.json":WPGMZA.pluginDirURL+"languages/datatables/Finnish.json";break;case"fr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/French.json";break;case"gl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Galician.json";break;case"ka":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Georgian.json";break;case"de":languageURL=WPGMZA.pluginDirURL+"languages/datatables/German.json";break;case"el":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Greek.json";break;case"gu":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Gujarati.json";break;case"he":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Hebrew.json";break;case"hi":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Hindi.json";break;case"hu":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Hungarian.json";break;case"is":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Icelandic.json";break;case"id":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Indonesian.json";break;case"ga":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Irish.json";break;case"it":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Italian.json";break;case"ja":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Japanese.json";break;case"kk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Kazakh.json";break;case"ko":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Korean.json";break;case"ky":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Kyrgyz.json";break;case"lv":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Latvian.json";break;case"lt":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Lithuanian.json";break;case"mk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Macedonian.json";break;case"ml":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Malay.json";break;case"mn":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Mongolian.json";break;case"ne":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Nepali.json";break;case"nb":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Norwegian-Bokmal.json";break;case"nn":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Norwegian-Nynorsk.json";break;case"ps":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Pashto.json";break;case"fa":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Persian.json";break;case"pl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Polish.json";break;case"pt":languageURL="pt_BR"==WPGMZA.locale?WPGMZA.pluginDirURL+"languages/datatables/Portuguese-Brasil.json":"//cdn.datatables.net/plug-ins/1.10.12/i18n/Portuguese.json";break;case"ro":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Romanian.json";break;case"ru":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Russian.json";break;case"sr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Serbian.json";break;case"si":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Sinhala.json";break;case"sk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Slovak.json";break;case"sl":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Slovenian.json";break;case"es":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Spanish.json";break;case"sw":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Swahili.json";break;case"sv":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Swedish.json";break;case"ta":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Tamil.json";break;case"te":languageURL=WPGMZA.pluginDirURL+"languages/datatables/telugu.json";break;case"th":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Thai.json";break;case"tr":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Turkish.json";break;case"uk":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Ukrainian.json";break;case"ur":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Urdu.json";break;case"uz":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Uzbek.json";break;case"vi":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Vietnamese.json";break;case"cy":languageURL=WPGMZA.pluginDirURL+"languages/datatables/Welsh.json"}return languageURL},WPGMZA.DataTable.prototype.onAJAXResponse=function(response){},WPGMZA.DataTable.prototype.reload=function(){this.dataTable.ajax.reload(null,!1)}}),jQuery(function($){WPGMZA.AdminMarkerDataTable=function(element){var self=this;this.preventCaching=!0,WPGMZA.DataTable.call(this,element),$(element).on("click","[data-delete-marker-id]",function(event){self.onDeleteMarker(event)}),$(element).find(".wpgmza.select_all_markers").on("click",function(event){self.onSelectAll(event)}),$(element).find(".wpgmza.bulk_delete").on("click",function(event){self.onBulkDelete(event)}),$(element).on("click","[data-center-marker-id]",function(event){self.onCenterMarker(event)})},WPGMZA.AdminMarkerDataTable.prototype=Object.create(WPGMZA.DataTable.prototype),WPGMZA.AdminMarkerDataTable.prototype.constructor=WPGMZA.AdminMarkerDataTable,WPGMZA.AdminMarkerDataTable.createInstance=function(element){return new WPGMZA.AdminMarkerDataTable(element)},WPGMZA.AdminMarkerDataTable.prototype.getDataTableSettings=function(){var self=this,options=WPGMZA.DataTable.prototype.getDataTableSettings.call(this);return options.createdRow=function(row,data,meta){meta=self.lastResponse.meta[meta];row.wpgmzaMarkerData=meta},options},WPGMZA.AdminMarkerDataTable.prototype.onEditMarker=function(event){WPGMZA.animatedScroll("#wpgmaps_tabs_markers")},WPGMZA.AdminMarkerDataTable.prototype.onDeleteMarker=function(data){var self=this,id=$(data.currentTarget).attr("data-delete-marker-id"),data={action:"delete_marker",security:WPGMZA.legacyajaxnonce,map_id:WPGMZA.mapEditPage.map.id,marker_id:id};$.post(ajaxurl,data,function(response){WPGMZA.mapEditPage.map.removeMarkerByID(id),self.reload()})},WPGMZA.AdminMarkerDataTable.prototype.onApproveMarker=function(event){var data=$(this).attr("id"),data={action:"approve_marker",security:WPGMZA.legacyajaxnonce,map_id:WPGMZA.mapEditPage.map.id,marker_id:data};$.post(ajaxurl,data,function(response){wpgmza_InitMap(),wpgmza_reinitialisetbl()})},WPGMZA.AdminMarkerDataTable.prototype.onSelectAll=function(event){$(this.element).find("input[name='mark']").prop("checked",!0)},WPGMZA.AdminMarkerDataTable.prototype.onBulkDelete=function(event){var self=this,ids=[],map=WPGMZA.maps[0];$(this.element).find("input[name='mark']:checked").each(function(index,row){row=$(row).closest("tr")[0];ids.push(row.wpgmzaMarkerData.id)}),ids.forEach(function(marker){marker=map.getMarkerByID(marker);marker&&map.removeMarker(marker)}),WPGMZA.restAPI.call("/markers/",{method:"DELETE",data:{ids:ids},complete:function(){self.reload()}})},WPGMZA.AdminMarkerDataTable.prototype.onCenterMarker=function(latLng){latLng=null==latLng.currentTarget?latLng:$(latLng.currentTarget).attr("data-center-marker-id"),latLng=WPGMZA.mapEditPage.map.getMarkerByID(latLng);latLng&&(latLng=new WPGMZA.LatLng({lat:latLng.lat,lng:latLng.lng}),WPGMZA.mapEditPage.map.setCenter(latLng),WPGMZA.mapEditPage.map.setZoom(6),WPGMZA.animateScroll("#wpgmaps_tabs_markers"))},$(document).ready(function(event){$("[data-wpgmza-admin-marker-datatable]").each(function(index,el){WPGMZA.adminMarkerDataTable=WPGMZA.AdminMarkerDataTable.createInstance(el)})})});
js/v8/wp-google-maps.min.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["./wp-google-maps/js/v8/wp-google-maps.combined.js"],"names":["jQuery","$","key","core","MARKER_PULL_DATABASE","MARKER_PULL_XML","PAGE_MAP_LIST","PAGE_MAP_EDIT","PAGE_SETTINGS","PAGE_SUPPORT","PAGE_CATEGORIES","PAGE_ADVANCED","PAGE_CUSTOM_FIELDS","maps","events","settings","restAPI","localized_strings","loadingHTML","getCurrentPage","WPGMZA","getQueryParamValue","window","location","href","match","getScrollAnimationOffset","scroll_animation_offset","height","getScrollAnimationDuration","scroll_animation_milliseconds","animateScroll","element","milliseconds","offset","animate","scrollTop","top","extend","child","parent","constructor","prototype","Object","create","guid","d","Date","getTime","performance","now","replace","c","r","Math","random","floor","toString","hexOpacityToRGBA","colour","opacity","hex","parseInt","parseFloat","hexToRgba","test","substring","split","length","join","g","b","a","rgbaToString","rgba","latLngRegexp","isLatLngString","str","m","LatLng","lat","lng","stringToLatLng","result","Error","isHexColorString","imageDimensionsCache","getImageDimensions","src","callback","img","document","createElement","onload","event","width","decodeEntities","input","e","String","fromCharCode","isDeveloperMode","this","developer_mode","Cookies","get","isProVersion","_isProVersion","openMediaDialog","file_frame","uploader","param","set_to_post_id","open","wp","media","frames","title","button","text","multiple","on","attachment","state","first","toJSON","id","url","getCurrentPosition","error","watch","options","nativeFunction","userLocationDenied","code","message","navigator","geolocation","enableHighAccuracy","position","trigger","err","console","warn","watchPosition","runCatchableTask","friendlyErrorContainer","friendlyError","FriendlyError","html","append","show","assertInstanceOf","instance","instanceName","pro","engine","fullInstanceName","getMapByID","MYMAP","map","Map","isGoogleAutocompleteSupported","google","places","Autocomplete","CloudAPI","isBeingUsed","googleAPIStatus","wpgmza_google_api_status","isSafari","ua","userAgent","toLowerCase","isTouchDevice","isDeviceiOS","MSStream","platform","isModernComponentStyleAllowed","user_interface_style","isElementInView","pageTop","pageBottom","elementTop","elementBottom","isFullScreen","name","regex","RegExp","notification","time","arguments","setTimeout","find","remove","WPGMZA_localized_data","value","useLegacyGlobals","elements","filter","RestAPI","createInstance","cloudAPI","onScroll","each","index","el","isInView","wpgmzaScrollIntoViewTriggerFlag","fullscreenElement","warning","protocol","unsecure_geolocation","after","refreshOnLoad","reload","Compatibility","preventDocumentWriteGoogleMapsAPI","old","write","content","call","compatiblityModule","root","factory","exports","module","define","amd","bind","global","CSS","escape","cssEscape","TypeError","codeUnit","string","firstCodeUnit","charCodeAt","charAt","PI","deg2rad","deg","Distance","MILES","KILOMETERS","MILES_PER_KILOMETER","KILOMETERS_PER_MILE","uiToMeters","uiDistance","distance_units","uiToKilometers","uiToMiles","kilometersToUI","km","between","lat1","lon1","lat2","lon2","dLat","dLon","sin","cos","atan2","sqrt","EliasFano","isSupported","decodingTablesInitialised","createDecodingTable","decodingTableHighBits","decodingTableDocIDNumber","decodingTableHighBitsCarryover","Uint8Array","i","zeroCount","j","encode","list","lastDocID","buffer1","bufferLength1","buffer2","bufferLength2","compressedBufferPointer1","compressedBufferPointer2","averageDelta","averageDeltaLog","log2","lowBitsLength","lowBitsMask","prev","maxCompressedSize","ceil","compressedBuffer","forEach","docID","docIDDelta","isNumeric","unaryCodeLength","pointer","decode","docIDNumber","resultPointer","lowBitsPointer","listCount","lowBitsCount","lowBits","cb","highBitsPointer","EventDispatcher","_listenersByType","addEventListener","type","listener","thisObject","useCapture","types","Function","target","hasOwnProperty","obj","push","removeEventListener","arr","splice","off","hasEventListener","dispatchEvent","Event","path","unshift","phase","CAPTURING_PHASE","_cancelled","_triggerListeners","AT_TARGET","BUBBLING_PHASE","topMostElement","customEvent","AddressInput","HTMLInputElement","json","fields","attr","JSON","parse","wpgmza_store_locator_restrict","country","googleAutoComplete","setComponentRestrictions","cloudAutoComplete","CloudAutocomplete","bubbles","cancelable","PHASE_CAPTURE","stopPropagation","FancyControls","formatToggleSwitch","div","container","parentNode","trim","label","addClass","replaceWith","wrap","formatToggleButton","yes","no","Geocoder","SUCCESS","ZERO_RESULTS","FAIL","getConstructor","GoogleGeocoder","OLGeocoder","getLatLngFromAddress","address","parts","latLng","getAddressFromLatLng","geocode","GoogleAPIErrorHandler","_error","self","currentPage","is_admin","userCanAdministrator","googleMapsAPIErrorDialog","errorMessageList","templateListItem","messagesAlreadyDisplayed","onErrorMessage","apply","wpgmza_google_maps_api_key","addErrorMessage","no_google_maps_api_key","urls","li","clone","buttonContainer","buttonTemplate","documentation","css","z-index","googleAPIErrorHandler","InfoWindow","mapObject","onOpen","STATE_CLOSED","onMapObjectAdded","OPEN_BY_CLICK","OPEN_BY_HOVER","STATE_OPEN","GoogleProInfoWindow","GoogleInfoWindow","OLProInfoWindow","OLInfoWindow","getContent","Marker","disable_infowindows","wpgmza_settings_disable_infowindows","disableInfoWindow","close","setContent","setOptions","infoopen","arg","_lat","_lng","REGEXP","isValid","defineProperty","set","val","fromString","fromCurrentPosition","coords","latitude","longitude","geocodeAddress","results","fromGoogleLatLng","googleLatLng","toGoogleLatLngArray","nativeLatLng","toGoogleLatLng","toLatLngLiteral","moveByDistance","kilometers","heading","delta","theta","phi1","lambda1","sinPhi1","cosPhi1","sinDelta","cosDelta","sinTheta","sinPhi2","phi2","asin","y","x","lambda2","getGreatCircleDistance","arg1","arg2","other","toRadians","deltaPhi","deltaLambda","LatLngBounds","southWest","northEast","south","north","west","east","fromGoogleLatLngBounds","googleLatLngBounds","getSouthWest","getNorthEast","fromGoogleLatLngBoundsLiteral","southwest","northeast","isInInitialState","undefined","extendByPixelMargin","latLngToPixels","pixelsToLatLng","contains","min","max","toLiteral","MapEditPage","diplay_enable_interactions_notice","themePanel","ThemePanel","themeEditor","ThemeEditor","wpgmza_settings_map_scroll","wpgmza_settings_map_draggable","wpgmza_settings_map_clickzoom","disabled_interactions_notice","disabled_interactions_button","mapEditPage","enableAllInteractions","fadeOut","successNotice","interactions_enabled_notice","delay","fadeIn","onZoomLimitChanged","Version","compare","pro_version","EQUAL_TO","ProMapEditPage","minZoom","maxZoom","body","MapObject","row","map_id","modified","parseGeometry","pairs","Parent","Circle","engineCircle","center","radius","OLCircle","GoogleCircle","getCenter","setCenter","getRadius","setRadius","getMap","setMap","removeCircle","addCircle","MapSettingsPage","_keypressHistory","updateEngineSpecificControls","updateGDPRControls","hide","onKeyPress","showNoticeControls","prop","vgmCheckbox","showOverrideTextarea","flushGeocodeCache","clearCache","response","removeAttr","slice","_developerModeRevealed","mapSettingsPage","ready","MapSettings","getAttribute","addSettings","other_settings","toOLViewOptions","ol","proj","fromLonLat","zoom","empty","start_location","map_start_lng","map_start_lat","start_zoom","map_min_zoom","map_max_zoom","toGoogleMapsOptions","latLngCoords","formatCoord","coord","zoomControl","wpgmza_settings_map_zoom","panControl","wpgmza_settings_map_pan","mapTypeControl","wpgmza_settings_map_type","streetViewControl","wpgmza_settings_map_streetview","fullscreenControl","wpgmza_settings_map_full_screen_control","draggable","disableDoubleClickZoom","scrollwheel","wpgmza_force_greedy_gestures","gestureHandling","mapTypeId","MapTypeId","SATELLITE","HYBRID","TERRAIN","ROADMAP","wpgmza_theme_data","styles","GoogleMap","parseThemeData","HTMLElement","hasAttribute","wpgmzaMap","engineElement","markers","polygons","polylines","circles","rectangles","loadSettings","shortcodeAttributes","initStoreLocator","markerFilter","MarkerFilter","nightTimeThemeData","elementType","stylers","color","featureType","GoogleProMap","OLProMap","OLMap","getZoom","setZoom","storeLocatorElement","storeLocator","StoreLocator","getGeographicDistance","setDimensions","addMarker","marker","removeMarker","infoWindow","indexOf","getMarkerByID","getMarkerByTitle","removeMarkerByID","addPolygon","polygon","Polygon","removePolygon","getPolygonByID","removePolygonByID","getPolylineByID","addPolyline","polyline","Polyline","removePolyline","removePolylineByID","circle","getCircleByID","removeCircleByID","nudgeLatLng","pixels","isNaN","nudge","nudged","animateNudge","origin","onWindowResize","onElementResized","onBoundsChanged","onIdle","hasVisibleMarkers","marker_id","markers_visible","marker_array","isFilterable","closeAllInfoWindows","MapsEngineDialog","wpgmzaUnbindSaveReminder","remodal","onButtonClicked","ajax","ajaxurl","method","data","action","nonce","success","status","xhr","wpgmza_maps_engine_dialog_done","mapsEngineDialog","getFilteringParameters","params","update","onFilteringComplete","MarkerPanel","markerPanel","_offset","description","link","icon","approved","pic","heatmap","setPosition","onAdded","handleLegacyGlobals","GoogleProMarker","GoogleMarker","OLProMarker","OLMarker","ANIMATION_NONE","ANIMATION_BOUNCE","ANIMATION_DROP","updateOffset","onClick","onMouseOver","onSelect","openInfoWindow","wpgmaps_localize_marker_data","cloned","initInfoWindow","lastInteractedMarker","info_window_open_by","getIcon","stripProtocol","defaultMarkerIcon","default_marker_icon","getPosition","setOffset","getAnimation","animation","setAnimation","getVisible","setVisible","visible","getDraggable","setDraggable","setOpacity","panIntoView","ModernStoreLocatorCircle","mapElement","mapSize","initCanvasLayer","shadowColor","shadowBlur","centerRingRadius","centerRingLineWidth","numInnerRings","innerRingLineWidth","innerRingFade","numOuterRings","ringLineWidth","mainRingLineWidth","numSpokes","spokesStartAngle","numRadiusLabels","radiusLabelsStartAngle","radiusLabelFont","GoogleModernStoreLocatorCircle","OLModernStoreLocatorCircle","onResize","draw","onUpdate","functionName","substr","toUpperCase","getResolutionScale","devicePixelRatio","getTransformedRadius","getContext","getCanvasDimensions","validateSettings","canvasDimensions","canvasWidth","canvasHeight","context","clearRect","setTransform","scale","getScale","getWorldOriginOffset","translate","worldPoint","getCenterPixels","ringSpacing","strokeStyle","lineWidth","beginPath","arc","stroke","closePath","grad","createRadialGradient","start","end","addColorStop","save","spokeAngle","setLineDash","moveTo","lineTo","restore","font","textAlign","textBaseline","fillStyle","textAngle","radiusString","rotate","measureText","fillText","ModernStoreLocator","original","inner","placeholder","items","numCategories","icons","closest","addressInput","wpgmaps_localize","store_locator_query_string","titleSearch","store_locator_name_string","keyCode","searchButton","searchLocations","onSearch","resetButton","resetLocations","STATE_APPLIED","STATE_INITIAL","children","category_id","wpgmza_category_data","image","background-image","prepend","optionsButton","before","setInterval","padding-left","outerWidth","hasClass","removeClass","onMouseOverCategory","onMouseLeaveCategory","store_locator_not_found_message","zero_results","alert","position_cat","$p_map","p_cat","outerHeight","padding-bottom","GoogleModernStoreLocator","OLModernStoreLocator","currentTarget","stop","NativeMapsAppIcon","begin","Array","external","enginePolygon","paths","GoogleProPolygon","GooglePolygon","OLProPolygon","OLPolygon","engineObject","googlePolyline","GooglePolyline","OLPolyline","getPoints","points","PopoutPanel","sendAJAXFallbackRequest","route","addNonce","CONTEXT_AJAX","URL","resturl","useAJAXFallback","CONTEXT_REST","serverCanInflate","disable_compressed_path_variables","enable_compressed_path_variables","compressParams","encoded","suffix","markerIDs","compressed","pako","deflate","ch","btoa","midcbp","stringify","TextEncoder","raw","getNonce","pattern","matches","restnoncetable","sort","setRESTNonce","setRequestHeader","restnonce","base","beforeSend","compressedParams","compressedRoute","attemptedCompressedPathVariable","fallbackRoute","fallbackParams","post","useCompressedPathVariable","isCompressedPathVariableSupported","isCompressedPathVariableAllowed","base64","isServerIIS","cache","skip_cache","maxURLLength","compressedPathVariableURLLimitWarningDisplayed","nativeCallFunction","dismiss_blocked_notice","SettingsPage","tabs","useLegacyHTML","settingsPage","_center","wpgmzaStoreLocator","onGeocodeComplete","which","onReset","store_locator_distance","_bounds","store_locator_bounce","_marker","_circle","wpgmza_store_locator_radius_style","strokeColor","strokeOpacity","strokeWeight","fillColor","fillOpacity","clickable","circleStrokeColor","bounds","filteringParams","factor","distanceUnits","Text","GoogleText","OLText","appendTo","initHTML","updatePosition","features","all","administrative","landscape","poi","road","transit","water","geometry","labels","textarea","parseJSON","isArray","jsonCopy","highlightFeatures","highlightElements","loadElementStylers","v","feature","ii","vv","hue","lightness","xaturation","gamma","visibility","weight","writeElementStylers","new_feature_element_stylers","indexJSON","saturation","invert_lightness","updateMapTheme","click","owlCarousel","dots","onThemePresetClick","previewImageCenter","previewImageZoom","selectedData","existingData","allPresetData","confirm","overwrite_theme_data","invalid_theme_data","GREATER_THAN","LESS_THAN","v1","v2","v1parts","v2parts","Integration","integrationModules","__","registerBlockType","InspectorControls","_wp$components","Dashicon","PanelBody","i18n","blocks","editor","components","_wp$editor","BlockControls","Toolbar","Button","Tooltip","TextareaControl","CheckboxControl","TextControl","SelectControl","RichText","Gutenberg","getBlockDefinition","getBlockTitle","getBlockInspectorControls","props","React","class","adminurl","aria-hidden","getBlockAttributes","_this","category","keywords","attributes","edit","isSelected","className","gutenberg","onclick","GoogleUICompatibility","style","vendor","head","googleUICompatibility","googleCircle","wpgmzaCircle","addListener","googleOptions","getGoogleGeocoder","CloudGeocoder","componentRestrictions","GeocoderStatus","OK","nativeStatus","geocoder","NO_RESULTS","formatted_address","GoogleHTMLOverlay","googleMap","OverlayView","onAdd","getPanes","overlayMouseTarget","appendChild","onRemove","updateElementPosition","projection","getProjection","fromLatLngToDivPixel","left","setMapObject","Z_INDEX","ProInfoWindow","googleObject","googleMarker","googlePolygon","createGoogleInfoWindow","googleInfoWindow","setZIndex","intervalID","clearInterval","wpgmzaMapObject","google_api_not_loaded","loadGoogleMap","wpgmzaEvent","ProMap","eval","bicycle","enableBicycleLayer","traffic","enableTrafficLayer","transport","enablePublicTransportLayer","showPointsOfInterest","show_point_of_interest","initializing","converted","wpgmza_hide_point_of_interest","addRectangle","rectangle","googleRectangle","removeRectangle","panTo","getBounds","nativeBounds","topLeft","bottomRight","fitBounds","fitBoundsToVisibleMarkers","enable","bicycleLayer","BicyclingLayer","trafficLayer","TrafficLayer","publicTransportLayer","TransitLayer","getMinZoom","min_zoom","setMinZoom","getMaxZoom","max_zoom","setMaxZoom","topRight","fromLatLngToPoint","bottomLeft","pow","Point","fromPointToLatLng","_opacity","wpgmzaMarker","anim","googleMarkerPosition","ProMarker","setLabel","setIcon","Image","defaultAnchor","anchor","canvasLayer","resize_","setAnimate","CanvasLayer","resizeHandler","updateHandler","resolutionScale","scheduleUpdate","spherical","equator","offsetAtEquator","computeOffset","canvas","getTopLeft","destroy","restrict","autoComplete","controls","ControlPosition","TOP_CENTER","polydata","linecolor","lineopacity","fillcolor","wpgmzaPolygon","ProPolygon","getEditable","getOptions","editable","setEditable","getPath","getLength","getAt","linethickness","setPoints","wpgmzaPolyline","overlay","GoogleTextOverlay","floatPane","toggle","is","GoogleVertexContextMenu","innerHTML","addDomListener","removeVertex","preventDefault","divListener","getDiv","removeListener","removeChild","vertex","point","removeAt","olFeature","olStyle","Style","getStyleFromSettings","vectorLayer3857","layer","Vector","source","recreate","circle3857","getSource","removeFeature","geom","circular","transform","Feature","addFeature","fill","Fill","updateStyleFromSettings","setStyle","getResponseFromCache","query","lon","getResponseFromNominatim","q","format","countrycodes","cacheResponse","finish","boundingbox","display_name","olMap","removeOverlay","Overlay","stopEvent","addOverlay","renderMode","RENDER_MODE_VECTOR_LAYER","size","round","maxWidth","max-width","imgs","numImages","numImagesLoaded","inside","viewport","getBoundingClientRect","right","bottom","isPanIntoViewAllowed","viewOptions","layers","getTileLayer","view","View","getInteractions","interaction","DragPan","setActive","DoubleClickZoom","MouseWheelZoom","gestureOverlay","gestureOverlayTimeoutID","condition","platformModifierKeyOnly","showGestureOverlay","originalEvent","use_ctrl_scroll_to_zoom","getControls","control","Zoom","removeControl","addControl","FullScreen","markerLayer","addLayer","getFeaturesAtPixel","pixel","isBeingDragged","wrapLongitude","getView","centerPointMarker","isRight","offsetX","offsetY","onRightClick","tile_server_url","Tile","OSM","transformed","lonLat","toLonLat","calculateExtent","getSize","extent","boundingExtent","fit","duration","setProperties","RENDER_MODE_HTML_ELEMENT","featureInSource","removeLayer","getCoordinateFromPixel","getPixelFromCoordinate","clearTimeout","line-height","updateSize","parentOffset","relX","pageX","relY","pageY","updateElementHeight","positioning","rebindClickListener","getVectorLayerStyle","defaultVectorLayerStyle","Icon","hiddenVectorLayerStyle","vectorLayerStyle","calledOnFocus","one","addLabel","getLabelText","getElement","display","setGeometry","disabled","jQueryDraggableInitialized","onDragStart","onDragEnd","currentLatLng","pixelsBeforeDrag","pixelsAfterDrag","latLngAfterDrag","onElementClick","olViewportElement","renderFunction","outer","centerPixels","outerPixels","abs","un","coordinates","getFeatures","Stroke","getGeometry","getCoordinates","LineString","DataTable","version","fn","dataTable","wpgmza_do_not_enqueue_datatables","ext","errMode","wpgmzaDataTable","dataTableElement","getDataTableElement","getDataTableSettings","phpClass","getLanguageURL","languageJSON","onAJAXRequest","onDataTableAjaxRequest","dataType","preventCaching","lastResponse","onAJAXResponse","deferLoading","processing","serverSide","AdvancedTableDataTable","wpgmza_default_items","iDisplayLength","aLengthMenu","languageURL","language","locale","pluginDirURL","AdminMarkerDataTable","onDeleteMarker","onSelectAll","onBulkDelete","onCenterMarker","createdRow","meta","wpgmzaMarkerData","onEditMarker","animatedScroll","security","legacyajaxnonce","onApproveMarker","cur_id","wpgmza_InitMap","wpgmza_reinitialisetbl","ids","complete","adminMarkerDataTable"],"mappings":"AAMAA,OAAO,SAASC,GAEf,IA6sBQC,IA7sBJC,KAAO,CACVC,qBAAsB,IACtBC,gBAAkB,IAElBC,cAAkB,WAClBC,cAAiB,WACjBC,cAAiB,eACjBC,aAAgB,cAEhBC,gBAAkB,aAClBC,cAAiB,WACjBC,mBAAqB,gBAOrBC,KAAM,GAONC,OAAQ,KAORC,SAAU,KAOVC,QAAS,KAOTC,kBAAmB,KAEnBC,YAAa,mFAEbC,eAAgB,WAEf,OAAOC,OAAOC,mBAAmB,SAEhC,IAAK,sBACJ,OAAGC,OAAOC,SAASC,KAAKC,MAAM,gBAAkBH,OAAOC,SAASC,KAAKC,MAAM,cACnEL,OAAOb,cAERa,OAAOd,cAGf,IAAK,+BACJ,OAAOc,OAAOZ,cAGf,IAAK,8BACJ,OAAOY,OAAOX,aAGf,IAAK,iCACJ,OAAOW,OAAOV,gBAGf,IAAK,+BACJ,OAAOU,OAAOT,cAGf,IAAK,oCACJ,OAAOS,OAAOR,mBAGf,QACC,OAAO,OAYVc,yBAA0B,WACzB,OAAQN,OAAOL,SAASY,yBAA2B,GAAK1B,EAAE,eAAe2B,UAG1EC,2BAA4B,WAC3B,OAAGT,OAAOL,SAASe,+BAGX,KAWTC,cAAe,SAASC,QAASC,cAEhC,IAAIC,OAASd,OAAOM,2BAGnBO,aADGA,cACYb,OAAOS,6BAEvB5B,EAAE,cAAckC,QAAQ,CACvBC,UAAWnC,EAAE+B,SAASE,SAASG,IAAMH,QACnCD,eAIJK,OAAQ,SAASC,MAAOC,QAEvB,IAAIC,YAAcF,MAElBA,MAAMG,UAAY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OAAS9d,IAAIke,cAAc8B,QAE5BlC,QACF9d,IAAI+d,aAAaD,UAGnB1mB,OAAOJ,QAAQ6M,KAAK,YAAa,CAChC8c,OAAQ,SACRC,KAAM,CACL+sB,IAAKA,KAENC,SAAU,WACT3/B,KAAK1K,aAKRnM,OAAOu1C,qBAAqBj0C,UAAUq0C,eAAiB,SAASjxC,QAO9DgC,OAFyB2W,MAAvB3Y,OAAM6vB,cAEH7vB,OAGA7F,EAAE6F,OAAM6vB,eAAengB,KAAK,yBAG9BsS,OAAS1mB,OAAOwe,YAAY5V,IAAIke,cAAcpgB,QAE/CggB,SACElQ,OAAS,IAAIxW,OAAO2D,OAAO,CAC9BC,IAAK8iB,OAAO9iB,IACZC,IAAK6iB,OAAO7iB,MAKb7D,OAAOwe,YAAY5V,IAAI0X,UAAU9J,QACjCxW,OAAOwe,YAAY5V,IAAIud,QAFN,GAGjBnmB,OAAOW,cAAc,2BAMvB9B,EAAE0F,UAAUud,MAAM,SAASpd,OAE1B7F,EAAE,wCAAwC2M,KAAK,SAASC,MAAOC,IAC9D1L,OAAOy2C,qBAAuBz2C,OAAOu1C,qBAAqBlqC,eAAeK"}
js/wpgmaps-admin-core.js CHANGED
@@ -400,7 +400,8 @@ jQuery(function($) {
400
  });
401
 
402
  var geocoder = WPGMZA.Geocoder.createInstance();
403
- wpgmza_InitMap();
 
404
 
405
  jQuery("body").on("click", ".wpgmza_del_btn", function() {
406
 
@@ -961,6 +962,8 @@ MYMAP.init = function(selector, latLng, zoom) {
961
  this.map.setOptions({
962
  mapTypeId: maptype
963
  });
 
 
964
  //this.bounds = new google.maps.LatLngBounds();
965
 
966
  if ("undefined" !== typeof wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] && wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] !== false && wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] !== "") {
@@ -1227,12 +1230,15 @@ function add_marker(marker_data) {
1227
  d_string = "<p style='min-width:100px; display:block;'>"+Math.round(marker_data.d,2)+" "+wpgmaps_lang_km_away+"</p>";
1228
  }
1229
  } else { d_string = ''; }
1230
- infoWindow[marker_data.marker_id] = WPGMZA.InfoWindow.createInstance(marker);
 
 
1231
  var html='<span style=\'min-width:100px; display:block;\'>'+marker_data.address+'</span>'+d_string;
1232
  if (marker_data.infoopen === "1") {
1233
- infoWindow[marker_data.marker_id].setContent(html);
1234
- infoWindow[marker_data.marker_id].open(marker_data.map, wpgmaps_markers_array[marker_data.marker_id]);
1235
  }
 
1236
  temp_actiontype = 'click';
1237
  if (typeof wpgmaps_localize_global_settings.wpgmza_settings_map_open_marker_by !== "undefined" && wpgmaps_localize_global_settings.wpgmza_settings_map_open_marker_by == '2') {
1238
  temp_actiontype = 'mouseover';
@@ -1240,8 +1246,8 @@ function add_marker(marker_data) {
1240
 
1241
  marker.on(temp_actiontype, function() {
1242
  close_infowindows();
1243
- infoWindow[marker_data.marker_id].setContent(html);
1244
- infoWindow[marker_data.marker_id].open(marker_data.map, wpgmaps_markers_array[marker_data.marker_id]);
1245
  });
1246
 
1247
  }
400
  });
401
 
402
  var geocoder = WPGMZA.Geocoder.createInstance();
403
+
404
+ wpgmza_InitMap();
405
 
406
  jQuery("body").on("click", ".wpgmza_del_btn", function() {
407
 
962
  this.map.setOptions({
963
  mapTypeId: maptype
964
  });
965
+
966
+ jQuery(document.body).trigger('wpgmza_map_editor_init');
967
  //this.bounds = new google.maps.LatLngBounds();
968
 
969
  if ("undefined" !== typeof wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] && wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] !== false && wpgmaps_localize[wpgmaps_mapid]['other_settings']['wpgmza_theme_data'] !== "") {
1230
  d_string = "<p style='min-width:100px; display:block;'>"+Math.round(marker_data.d,2)+" "+wpgmaps_lang_km_away+"</p>";
1231
  }
1232
  } else { d_string = ''; }
1233
+
1234
+ infoWindow[marker.id] = WPGMZA.InfoWindow.createInstance(marker);
1235
+
1236
  var html='<span style=\'min-width:100px; display:block;\'>'+marker_data.address+'</span>'+d_string;
1237
  if (marker_data.infoopen === "1") {
1238
+ infoWindow[marker.id].setContent(html);
1239
+ infoWindow[marker.id].open(marker_data.map, wpgmaps_markers_array[marker_data.marker_id]);
1240
  }
1241
+
1242
  temp_actiontype = 'click';
1243
  if (typeof wpgmaps_localize_global_settings.wpgmza_settings_map_open_marker_by !== "undefined" && wpgmaps_localize_global_settings.wpgmza_settings_map_open_marker_by == '2') {
1244
  temp_actiontype = 'mouseover';
1246
 
1247
  marker.on(temp_actiontype, function() {
1248
  close_infowindows();
1249
+ infoWindow[marker.id].setContent(html);
1250
+ infoWindow[marker.id].open(marker_data.map, marker);
1251
  });
1252
 
1253
  }
js/wpgmaps.js CHANGED
@@ -132,6 +132,7 @@ jQuery(function($) {
132
  });
133
 
134
  InitMap();
 
135
  jQuery('body').on('tabsactivate', function(){setTimeout(function(){InitMap();}, 500); });
136
  jQuery('body').on('tabsshow', function(){setTimeout(function(){InitMap();}, 500); });
137
  jQuery('body').on('accordionactivate', function(){setTimeout(function(){InitMap();}, 500); });
132
  });
133
 
134
  InitMap();
135
+ jQuery(document).ready(function(){ InitMap(); });
136
  jQuery('body').on('tabsactivate', function(){setTimeout(function(){InitMap();}, 500); });
137
  jQuery('body').on('tabsshow', function(){setTimeout(function(){InitMap();}, 500); });
138
  jQuery('body').on('accordionactivate', function(){setTimeout(function(){InitMap();}, 500); });
legacy-core.php CHANGED
@@ -1462,17 +1462,7 @@ function wpgmaps_tag_basic( $atts )
1462
 
1463
  $user_api_key = get_option( 'wpgmza_google_maps_api_key' );
1464
 
1465
- if (!function_exists('wpgmaps_admin_styles_pro')) {
1466
- $wpgmaps_extra_css = ".wpgmza_map img { max-width:none; } .wpgmza_widget { overflow: auto; }";
1467
- wp_add_inline_style( 'wpgmaps-style', stripslashes( $wpgmaps_extra_css ) );
1468
-
1469
- $wpgmza_main_settings = get_option("WPGMZA_OTHER_SETTINGS");
1470
- if (isset($wpgmza_main_settings['wpgmza_custom_css']) && $wpgmza_main_settings['wpgmza_custom_css'] != "") {
1471
- wp_add_inline_style( 'wpgmaps-style', stripslashes( $wpgmza_main_settings['wpgmza_custom_css'] ) );
1472
- }
1473
-
1474
- }
1475
- if (isset($atts['zoom'])) {
1476
  $zoom_override = (int)$atts['zoom'];
1477
  $wpgmza_override['zoom'] = $zoom_override;
1478
  }
@@ -1609,10 +1599,20 @@ function wpgmaps_tag_basic( $atts )
1609
  if($index = array_search('wpgmza-google-vertex-context-menu', $core_dependencies))
1610
  array_splice($core_dependencies, $index, 1);
1611
  }
1612
-
1613
  wp_enqueue_script('wpgmaps_core', plugins_url('/js/wpgmaps.js',__FILE__), $core_dependencies, $wpgmza_version.'b' , false);
1614
 
1615
  $wpgmza->loadScripts();
 
 
 
 
 
 
 
 
 
 
1616
 
1617
  wp_localize_script('wpgmaps_core', 'wpgmza_circle_data_array', wpgmza_get_circle_data(1));
1618
  wp_localize_script('wpgmaps_core', 'wpgmza_rectangle_data_array', wpgmza_get_rectangle_data(1));
1462
 
1463
  $user_api_key = get_option( 'wpgmza_google_maps_api_key' );
1464
 
1465
+ if (isset($atts['zoom'])) {
 
 
 
 
 
 
 
 
 
 
1466
  $zoom_override = (int)$atts['zoom'];
1467
  $wpgmza_override['zoom'] = $zoom_override;
1468
  }
1599
  if($index = array_search('wpgmza-google-vertex-context-menu', $core_dependencies))
1600
  array_splice($core_dependencies, $index, 1);
1601
  }
1602
+
1603
  wp_enqueue_script('wpgmaps_core', plugins_url('/js/wpgmaps.js',__FILE__), $core_dependencies, $wpgmza_version.'b' , false);
1604
 
1605
  $wpgmza->loadScripts();
1606
+
1607
+ if (!function_exists('wpgmaps_admin_styles_pro')) {
1608
+ $wpgmaps_extra_css = ".wpgmza_map img { max-width:none; } .wpgmza_widget { overflow: auto; }";
1609
+ wp_add_inline_style( 'wpgmza-common', stripslashes( $wpgmaps_extra_css ) );
1610
+
1611
+ $wpgmza_main_settings = get_option("WPGMZA_OTHER_SETTINGS");
1612
+ if (isset($wpgmza_main_settings['wpgmza_custom_css']) && $wpgmza_main_settings['wpgmza_custom_css'] != "") {
1613
+ wp_add_inline_style( 'wpgmza-common', stripslashes( $wpgmza_main_settings['wpgmza_custom_css'] ) );
1614
+ }
1615
+ }
1616
 
1617
  wp_localize_script('wpgmaps_core', 'wpgmza_circle_data_array', wpgmza_get_circle_data(1));
1618
  wp_localize_script('wpgmaps_core', 'wpgmza_rectangle_data_array', wpgmza_get_rectangle_data(1));
readme.txt CHANGED
@@ -216,6 +216,10 @@ Please update your WP Google Maps version to 6.2.1 to ensure you are using the l
216
 
217
  == Changelog ==
218
 
 
 
 
 
219
  = 8.0.28 - 2020-11-26 - Low priority =
220
  * Tested the plugin with WP5.6 RC1 - All seems in order
221
  * Modified the Google Places Autocomplete functionality to reduce the amount of API calls originating from basic users
@@ -1596,6 +1600,13 @@ For more, please view the WP Google Maps site
1596
 
1597
 
1598
 
 
 
 
 
 
 
 
1599
 
1600
 
1601
 
216
 
217
  == Changelog ==
218
 
219
+ = 8.0.29 - 2020-12-11 - High priority =
220
+ * Tested up to WordPress 5.6
221
+ * Added support for jQuery 3
222
+
223
  = 8.0.28 - 2020-11-26 - Low priority =
224
  * Tested the plugin with WP5.6 RC1 - All seems in order
225
  * Modified the Google Places Autocomplete functionality to reduce the amount of API calls originating from basic users
1600
 
1601
 
1602
 
1603
+
1604
+
1605
+
1606
+
1607
+
1608
+
1609
+
1610
 
1611
 
1612
 
wpGoogleMaps.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Google Maps
4
  Plugin URI: https://www.wpgmaps.com
5
  Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
6
- Version: 8.0.28
7
  Author: WP Google Maps
8
  Author URI: https://www.wpgmaps.com
9
  Text Domain: wp-google-maps
@@ -11,6 +11,10 @@ Domain Path: /languages
11
  */
12
 
13
  /*
 
 
 
 
14
  * 8.0.28 - 2020-11-26 - Low priority
15
  * Tested the plugin with WP5.6 RC1 - All seems in order
16
  * Modified the Google Places Autocomplete functionality to reduce the amount of API calls originating from basic users
3
  Plugin Name: WP Google Maps
4
  Plugin URI: https://www.wpgmaps.com
5
  Description: The easiest to use Google Maps plugin! Create custom Google Maps with high quality markers containing locations, descriptions, images and links. Add your customized map to your WordPress posts and/or pages quickly and easily with the supplied shortcode. No fuss.
6
+ Version: 8.0.29
7
  Author: WP Google Maps
8
  Author URI: https://www.wpgmaps.com
9
  Text Domain: wp-google-maps
11
  */
12
 
13
  /*
14
+ * 8.0.29 - 2020-12-11 - High priority
15
+ * Tested up to WordPress 5.6
16
+ * Added support for jQuery 3
17
+ *
18
  * 8.0.28 - 2020-11-26 - Low priority
19
  * Tested the plugin with WP5.6 RC1 - All seems in order
20
  * Modified the Google Places Autocomplete functionality to reduce the amount of API calls originating from basic users