PageSourceSearch

https://ghostwhite-duck-238601.hostingersite.com/wp-content/plugin…/src/js/frontend-map-loader.js?ver=1.4.51

js ghostwhite-duck-238601.hostingersite.com collected 2026-10-03 04:24:38 UTC 2,594 bytes, 94 lines download raw bytes

1/**
2 * Map Loading State Management
3 */
4
5// Listen for map initialization complete
6document.addEventListener('oum:map_initialized', (event) => {
7  const { mapId } = event.detail;
8  
9  // Show map controls once initialization is complete
10  showMapControls(mapId);
11});
12
13/**
14 * Show map controls and hide loading overlay
15 */
16const showMapControls = (mapId) => {
17  if (!mapId) return;
18
19  const mapElement = document.getElementById(mapId);
20  if (!mapElement) return;
21
22  const mapWrap = mapElement.closest('.map-wrap');
23  if (!mapWrap) return;
24
25  const loadingOverlay = mapWrap.querySelector('.oum-loading-overlay');
26  const filterControls = mapWrap.querySelector('.oum-filter-controls');
27  const sidebar = document.querySelector('.oum-sidebar');
28  const advancedFilterFloatingControls = mapWrap.querySelector('.oum-advanced-filter-button, .oum-advanced-filter-panel');
29  const addLocationBtn = mapWrap.querySelector('.open-add-location-overlay');
30  const filterMarkersInput = mapWrap.querySelector('#oum_filter_markers');
31
32  // Hide loading overlay
33  if (loadingOverlay) {
34    loadingOverlay.classList.add('hidden');
35  }
36
37  // Show controls with a slight delay for smooth transition
38  setTimeout(() => {
39    // Remove the oum-hidden class and add visible class for filter controls
40    if (filterControls) {
41      filterControls.classList.remove('oum-hidden');
42      filterControls.classList.add('visible');
43    }
44
45    if (sidebar) {
46      sidebar.classList.remove('oum-hidden');
47      sidebar.classList.add('visible');
48    }
49
50    if (advancedFilterFloatingControls) {
51      advancedFilterFloatingControls.classList.remove('oum-hidden');
52      advancedFilterFloatingControls.classList.add('visible');
53    }
54
55    // Remove the oum-hidden class and add visible class for add location button
56    if (addLocationBtn) {
57      addLocationBtn.classList.remove('oum-hidden');
58      addLocationBtn.classList.add('visible');
59    }
60
61    // Handle filter markers input visibility
62    if (filterMarkersInput) {
63      filterMarkersInput.classList.remove('oum-hidden');
64      filterMarkersInput.classList.add('visible');
65    }
66  }, 300);
67};
68
69/**
70 * Map Loading State Handler
71 */
72const OUMLoader = (function() {
73  let loadingStates = {};
74
75  function initLoader(mapId) {
76    loadingStates[mapId] = {
77      initialized: false
78    };
79  }
80
81  function setMapInitialized(mapId) {
82    if (loadingStates[mapId]) {
83      loadingStates[mapId].initialized = true;
84      showMapControls(mapId);
85      delete loadingStates[mapId]; // Cleanup
86    }
87  }
88
89  // Public API
90  return {
91    initLoader,
92    setMapInitialized
93  };
94})(); 

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.