Fix File
•
/
home
/
sportsfe...
/
httpdocs
/
clone
/
wp-conte...
/
plugins
/
interact...
/
assets
/
public
/
map-acti...
•
File:
actions.min.js
•
Content:
function igm_display_below(e,t){iMapsActions.contentBelow(e,t,!1),window.dispatchEvent(new Event("resize"))}function igm_display_below_scroll(e,t){iMapsActions.contentBelow(e,t,!0),window.dispatchEvent(new Event("resize"))}function igm_display_above(e,t){iMapsActions.contentAbove(e,t,!1),window.dispatchEvent(new Event("resize"))}function igm_display_page_below(e,t){iMapsActions.pageBelow(e,t,!1)}function igm_display_page_below_and_scroll(e,t){iMapsActions.pageBelow(e,t,!0)}function igm_display_right_1_3(e,t){iMapsActions.contentRight(e,t,"igm_content_left_2_3","igm_content_right_1_3"),window.dispatchEvent(new Event("resize"))}function igm_lightbox(e,t){iMapsActions.lightboxAction(e,t,"inline"),window.dispatchEvent(new Event("resize"))}function igm_lightbox_image(e,t){iMapsActions.lightboxAction(e,t,"image")}function igm_lightbox_iframe(e,t){iMapsActions.lightboxAction(e,t,"external")}(iMapsActions={init:function(){for(var e=document.querySelectorAll(".igm-live-filter"),t=0;t<e.length;t++)iMapsActions.buildFilter(e[t]);for(var n=document.querySelectorAll(".igm-live-filter-dropdown"),t=0;t<n.length;t++)iMapsActions.buildDropdownFilter(n[t]);if(0<(i=document.querySelectorAll(".igm_select_choices")).length)for(t=0;t<i.length;t++)iMapsActions.buildDropdown(i[t]);else for(var i=document.querySelectorAll(".igm_select"),t=0;t<i.length;t++)i[t].addEventListener("change",function(e){var t,e=e.target,n=e.getAttribute("data-map-id"),n=parseInt(n);"undefined"!=typeof iMapsManager?iMapsManager.select(n,e.value,!0):e.getAttribute("data-url")&&((n=e.getAttribute("data-url").split("#")[1])?(t=e.getAttribute("data-url").replace("#"+n,""),window.open(t+"?mregion="+e.value+"#"+n,"_self")):window.open(e.getAttribute("data-url")+"?mregion="+e.value,"_self"))});for(var o=document.querySelectorAll(".igm_entries_list"),t=0;t<o.length;t++)iMapsActions.buildLists(o[t])},buildDropdown:function(n){var e=n.getAttribute("data-noresults"),t=n.getAttribute("data-select");new Choices(n,{noResultsText:e,position:"bottom",itemSelectText:t,resetScrollPosition:!1,searchChoices:!0,fuseOptions:{threshold:.4,findAllMatches:!0,shouldSort:!0},searchFloor:2,searchResultLimit:50,searchFields:["label","value","customProperties"]}).passedElement.element.addEventListener("change",function(){var e,t=n.getAttribute("data-map-id"),t=parseInt(t);"undefined"!=typeof iMapsManager&&iMapsManager.select(t,this.value,!0),n.getAttribute("data-url")&&((t=n.getAttribute("data-url").split("#")[1])?(e=n.getAttribute("data-url").replace("#"+t,""),window.open(e+"?mregion="+n.value+"#"+t,"_self")):window.open(n.getAttribute("data-url")+"?mregion="+n.value,"_self"))})},buildLists:function(e){for(var n=e.getAttribute("data-map-id"),t=e.querySelectorAll("li"),i=0;i<t.length;i++){var o=t[i];o.addEventListener("click",function(e){var t;"undefined"!=typeof iMapsManager?(t=e.target.getAttribute("data-code"),iMapsManager.select(n,t,!0)):e.target.getAttribute("data-url")&&window.open(e.target.getAttribute("data-url")+"?mregion="+e.target.getAttribute("data-code"),"_self")}),o.addEventListener("mouseover",function(e){"undefined"!=typeof iMapsManager&&(e=e.target.getAttribute("data-code"),iMapsManager.highlight(n,e))}),o.addEventListener("mouseout",function(e){"undefined"!=typeof iMapsManager&&iMapsManager.clearHighlighted(n)})}},buildDropdownFilter:function(e){var i=e.getAttribute("data-base-map-id"),o=void 0!==(o=e.getAttribute("data-keep-base-map"))&&"1"===o,i=parseInt(i);e.addEventListener("change",function(e){e=e.target.value,e=parseInt(e);if((iMapsManager.filteredMap=e)===i)iMapsManager.activeMap=i,"undefined"!=typeof iMapsManager&&(iMapsManager.filteredMap=i,iMapsManager.showAllSeries(e));else if("undefined"!=typeof iMapsManager){iMapsManager.hideAllSeries(i,o);var t=iMaps.maps[i].seriesById[e];if(t&&0<t.length)for(var n=0;n<t.length;n++)t[n].show()}void 0!==iMaps.maps[e]&&(iMaps.maps[e].map.goHome(),iMaps.maps[e].map.dispatchImmediately("zoomlevelchanged"))})},buildFilter:function(e){for(var o=e.getAttribute("data-base-map-id"),a=void 0!==(a=e.getAttribute("data-keep-base-map"))&&"1"===a,o=parseInt(o),r=e.querySelectorAll("li"),t=0;t<r.length;t++)r[t].addEventListener("click",function(e){for(var t=0;t<r.length;t++)r[t].classList.remove("igm-live-filter-active");e.target.classList.add("igm-live-filter-active");e=e.target.getAttribute("data-map-id"),e=parseInt(e);if((iMapsManager.filteredMap=e)===o)"undefined"!=typeof iMapsManager&&(iMapsManager.filteredMap=o,iMapsManager.showAllSeries(e),iMapsManager.resetDrilldown(e));else if("undefined"!=typeof iMapsManager){iMapsManager.hideAllSeries(o,a);var n=iMaps.maps[o].seriesById[e];if(n&&0<n.length)for(var i=0;i<n.length;i++)n[i].show()}void 0!==iMaps.maps[o]&&(iMaps.maps[o].map.goHome(),iMaps.maps[o].map.dispatchImmediately("zoomlevelchanged"))})},lightbox:!1,lightboxIsRunning:!1,lightboxAction:function(e,t,n){var i=[],o=iMapsActionOptions.lightboxWidth,a=iMapsActionOptions.lightboxHeight,r={};"inline"===n?(t.content="#"+iMapsActions.getIDfromData(t),i.push({href:t.content,type:n,width:o,height:a})):"external"===n?("auto"===a&&(a=parseInt(.8*window.innerHeight)),i.push({href:t.content,type:n,width:o,height:a})):""!==t.content&&t.content.includes(",")?t.content.split(",").forEach(function(e,t){i.push({href:e,type:n,width:o,height:a})}):i.push({href:t.content,type:n,width:o,height:a}),r={touchNavigation:!1,draggable:!1,keyboardNavigation:!1,loopAtEnd:!1,loop:!1,zoomable:!1,elements:i,closeButton:!1,closeOnOutsideClick:!0},768<window.innerWidth&&iMapsActions.isTouchScreenDevice()&&(r.closeOnOutsideClick=!1),iMapsActions.lightbox=GLightbox(r),iMapsActions.lightbox.on("open",function(){let n=document.querySelector(".ginner-container .gslide-media .igm_close");n||((n=document.createElement("span")).classList.add("igm_close"),n.innerHTML="╳",document.querySelectorAll(".ginner-container .gslide-media").forEach(function(e){var t=n.cloneNode(!0);t.addEventListener("click",function(){iMapsActions.lightbox.close()}),e.prepend(t)}))}),""!==t.content&&iMapsActions.lightbox&&!iMapsActions.lightboxIsRunning?(iMapsActions.lightbox.open(),iMapsActions.lightboxIsRunning=!0):console.log("Empty Action Content or Incorrect Request - Lightbox not triggered"),iMapsActions.lightbox.on("close",function(){iMapsManager.clearSelected(e),iMaps.maps[e].map.lastClickedEntry=!1,iMapsActions.lightboxIsRunning=!1})},contentBelow:function(e,t,n){var e=document.getElementById("map_"+e).parentNode.parentNode.parentNode,i=e.parentNode.querySelector(".igm_content_below"),o=document.getElementById("igm-hidden-footer-content");t.content="[id='"+iMapsActions.getIDfromData(t)+"']",null===i&&((i=document.createElement("div")).classList.add("igm_content_below"),e.parentNode.insertBefore(i,e.nextSibling)),(e=i.children)&&e.length&&o&&Array.from(e).forEach(e=>{e.style&&(e.style.display="none"),o.appendChild(e)}),(e=document.querySelector(t.content))&&(i.appendChild(e),e.style)&&(e.style.display="block"),n&&(t=Math.floor(i.getBoundingClientRect().top-100),window.scrollBy({top:t,left:0,behavior:"smooth"}))},contentAbove:function(e,t,n){var e=document.getElementById("map_"+e).parentNode.parentNode.parentNode,i=e.parentNode.querySelector(".igm_content_above"),o=document.getElementById("igm-hidden-footer-content");t.content="[id='"+iMapsActions.getIDfromData(t)+"']",null===i&&((i=document.createElement("div")).classList.add("igm_content_above"),e.parentNode.insertBefore(i,e.parentNode.childNodes[0])),(e=i.firstChild)&&o&&(e.style.display="none",o.appendChild(e)),(o=document.querySelector(t.content))&&(i.appendChild(o),o.style.display="block"),n&&(originalTop=Math.floor(i.getBoundingClientRect().top-100),window.scrollBy({top:originalTop,left:0,behavior:"smooth"}))},contentRight:function(e,t,n,i){var e=document.getElementById("map_"+e).parentNode.parentNode.parentNode,o=e.parentNode.querySelector("."+i),a=e.parentNode.querySelector("."+n),r=document.getElementById("igm-hidden-footer-content");t.content="[id='"+iMapsActions.getIDfromData(t)+"']",null===a&&(a=e.parentNode.querySelector(".map_box")).classList.add(n),null===o&&((o=document.createElement("div")).classList.add(i),e.parentNode.insertBefore(o,e.nextSibling)),(a=o.firstChild)&&r&&(a.style.display="none",r.appendChild(a)),(n=document.querySelector(t.content))&&(o.appendChild(n),n.style.display="block")},pageBelow:function(e,t,n){var i,o,a;""!==t.content&&(t=parseInt(t.content),t=iMapsActionOptions.restURL+"pages/"+t,o=document.getElementById("map_"+e).parentNode.parentNode.parentNode.parentNode.querySelector(".igm_content_below"),(a=new XMLHttpRequest).open("GET",t),a.onload=function(){var e;200<=a.status&&a.status<400?(e=JSON.parse(a.response),o.innerHTML=e.content.rendered,n&&(i=Math.floor(o.getBoundingClientRect().top-100),window.scrollBy({top:i,left:0,behavior:"smooth"}))):console.log("We connected to the server, but it returned an error.")},a.onerror=function(){console.log("Connection error")},a.send())},getIDfromData:function(e){t=(t=(void 0!==e.originalID?e.originalID:(Number.isInteger(e.id)&&(e.id=e.id.toString()),e.id)).replace(/\s/g,"")).replace(/,/g,"_");var t=iMapsActions.wpFeSanitizeTitle(t);return e.content=t+"_"+e.mapID,e.content.toLowerCase()}}).wpFeSanitizeTitle=function(e){return e=e.replace(/\ /g,"").replace(/\,/g,"_"),e=encodeURIComponent(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%/g,"").toLowerCase()},iMapsActions.resetContainer=function(e,t){var n=document.getElementById("map_wrapper_"+e),i=document.getElementById("igm-hidden-footer-content");null!==n&&null!==(n=n.querySelector(t))&&((t=n.firstChild)&&i&&(t.style.display="none",i.appendChild(t)),what2display=document.getElementById("default_"+e))&&(n.appendChild(what2display),what2display.style.display="block")},iMapsActions.resetActions=function(e){iMapsActions.resetContainer(e,".igm_content_below"),iMapsActions.resetContainer(e,".igm_content_above"),iMapsActions.resetContainer(e,".igm_content_right_1_3")},iMapsActions.isTouchScreenDevice=function(){return"ontouchstart"in window||navigator.maxTouchPoints},iMapsActions.loadScript=function(e,t){var n=document.createElement("script");n.type="text/javascript",n.src=e,n.onreadystatechange=t,n.onload=t,document.head.appendChild(n)},iMapsActions.loadScripts=function(e,t){function n(){++i>=e.length&&t.call(this,arguments)}var i=0;e.forEach(function(e,t){iMapsActions.loadScript(e,n)})},void 0!==iMapsActionOptions.async&&Array.isArray(iMapsActionOptions.urls)&&0<iMapsActionOptions.urls.length?iMapsActions.loadScripts(iMapsActionOptions.urls,function(){iMapsActions.init()}):iMapsActions.init();
•
Search:
•
Replace:
Function
Edit by line
Download
Information
Rename
Copy
Move
Delete
Chmod
List