PageSourceSearch

https://olaspain.com/wp-content/litespeed/js/1/3e025351a8860923d2eb34867ddbdf26.js?ver=bdf26

js olaspain.com collected 2026-10-08 09:14:50 UTC 11,182 bytes, 38 lines download raw bytes

1(function($){var requestRunning=!1;var xhr;var hasFilter=!1;var data=URLToArrayNew();jQuery(function($){if($('.st-style-elementor.search-result-page').length){$('.show-filter-mobile .button-filter').on('click',function(){$('.sidebar-filter').fadeIn()});$('.sidebar-filter .close-sidebar').on('click',function(){$('.sidebar-filter').fadeOut()})}
2var resizeId;function doneResizing(){ajaxFilterHandler()}});$('.toolbar .layout span.layout-item').on('click',function(){if(!$(this).hasClass('active')){$(this).parent().find('span').removeClass('active');$(this).addClass('active');data.layout=$(this).data('value');ajaxFilterHandler(!1)}});$('.sort-menu input.service_order').on('change',function(){data.orderby=$(this).data('value');ajaxFilterHandler()});$('.btn-apply-price-range').on('click',function(e){e.preventDefault();data.price_range=$(this).closest('.range-slider').find('.price_range').val();data.page=1;ajaxFilterHandler()});var filter_checkbox={};$('.filter-item').each(function(){if(!Object.keys(filter_checkbox).includes($(this).data('type'))){filter_checkbox[$(this).data('type')]=[]}});$('.filter-item').on('change',function(){var t=$(this);var filter_type=t.data('type');if(t.is(':checked')){filter_checkbox[filter_type].push(t.val())}else{var index=filter_checkbox[filter_type].indexOf(t.val());if(index>-1){filter_checkbox[filter_type].splice(index,1)}}
3if(filter_checkbox[filter_type].length){data[filter_type]=filter_checkbox[filter_type].toString()}else{if(typeof data[filter_type]!='undefined'){delete data[filter_type]}}
4data.page=1;ajaxFilterHandler()});var arrTax=[];$('.filter-tax').each(function(){if(!Object.keys(arrTax).includes($(this).data('type'))){arrTax[$(this).data('type')]=[]}
5if($(this).is(':checked')){arrTax[$(this).data('type')].push($(this).val())}});$(document).on('click','.pagination a.page-numbers:not(.current, .dots)',function(e){e.preventDefault();var t=$(this);var pagUrl=t.attr('href');pageNum=1;if(typeof pagUrl!==typeof undefined&&pagUrl!==!1){var arr=pagUrl.split('/');var pageNum=arr[arr.indexOf('page')+1];if(isNaN(pageNum)){pageNum=1}
6data.page=pageNum;ajaxFilterHandler();if($('.modern-search-result-popup').length){$('.col-left-map').animate({scrollTop:0},'slow')}
7if($('#modern-result-string').length){window.scrollTo({top:$('#modern-result-string').offset().top-20,behavior:'smooth'})}
8return!1}else{return!1}});$('.filter-tax').on('change',function(){var t=$(this);var filter_type=t.data('type');if(t.is(':checked')){arrTax[filter_type].push(t.val())}else{var index=arrTax[filter_type].indexOf(t.val());if(index>-1){arrTax[filter_type].splice(index,1)}}
9if(arrTax[filter_type].length){if(typeof data.taxonomy=='undefined')
10data.taxonomy={};data['taxonomy['+filter_type+']']=arrTax[filter_type].toString()}else{if(typeof data.taxonomy=='undefined')
11data.taxonomy={};if(typeof data['taxonomy['+filter_type+']']!='undefined'){delete data['taxonomy['+filter_type+']']}}
12if(Object.keys(data.taxonomy).length<=0){delete data.taxonomy}
13data.page=1;ajaxFilterHandler()});$('.toolbar-action-mobile .btn-date').on('click',function(e){e.preventDefault();var me=$(this);window.scrollTo({top:0,behavior:'auto'});$('.popup-date').each(function(){var t=$(this);var checkinOut=t.find('.check-in-out');var options={singleDatePicker:!1,autoApply:!0,disabledPast:!0,dateFormat:t.data('format'),customClass:'popup-date-custom',widthSingle:500,onlyShowCurrentMonth:!0,alwaysShowCalendars:!0,};if(typeof locale_daterangepicker=='object'){options.locale=locale_daterangepicker}
14checkinOut.daterangepicker(options,function(start,end,label){me.text(start.format(t.data('format'))+' - '+end.format(t.data('format')));data.start=start.format(t.data('format'));data.end=end.format(t.data('format'));if($('#modern-result-string').length){window.scrollTo({top:$('#modern-result-string').offset().top-20,behavior:'smooth'})}
15ajaxFilterHandler();t.hide()});checkinOut.trigger('click');t.fadeIn()})});$('.toolbar-action-mobile .btn-sort').on('click',function(e){e.preventDefault();$('.sort-menu-mobile').fadeIn()});$('.sort-menu-mobile .close-filter').on('click',function(){$(this).closest('.sort-menu-mobile').fadeOut()});$('.toolbar-action-mobile .btn-filter').on('click',function(e){e.preventDefault();window.scrollTo({top:'46',});$('.sidebar-filter').fadeIn();$('.top-filter').fadeIn();$('.sidebar-filter .sidebar-item-wrapper').fadeIn();$('.sidebar-filter .sidebar-search-form').hide();$('html, body').css({overflow:'hidden'})});$('.sidebar-filter .close-filter').on('click',function(){$(this).closest('.sidebar-filter').fadeOut(function(){$('html, body').css({overflow:'auto'})})});$('.top-filter .close-filter').on('click',function(){$(this).closest('.top-filter').fadeOut(function(){$('html, body').css({overflow:'auto'})})});$('.popup-close').on('click',function(){$(this).closest('.st-popup').hide()});$('.show-map-mobile').on('click',function(){var t=$(this);$('.page-half-map').find('.maparea').show();$('body').css({'overflow':'hidden'});ajaxFilterMapHandler()});$('.close-map-new').on('click',function(){var t=$(this);t.closest('.maparea').fadeOut();$('body').css({'overflow':'auto'})});function ajaxFilterHandler(loadMap=!0){if(requestRunning){xhr.abort()}
16data.layout=data.layout||$('.search-result-page').attr('data-style');if($('#tour-top-search').length>0){data.top_search=1}
17hasFilter=!0;$('html, body').css({'overflow':'auto'});if(window.matchMedia('(max-width: 991px)').matches){$('.sidebar-filter').fadeOut();if($('#modern-result-string').length){window.scrollTo({top:$('#modern-result-string').offset().top-20,behavior:'smooth'})}}
18$('.filter-loading').show();var layout=$('#modern-search-result').data('layout');data.format=$('#modern-search-result').data('format');if($('.modern-search-result-popup').length){data.is_popup_map='1'}
19data.action='st_filter_tour_ajax';data.is_search_page=1;data._s=st_params._s;if(typeof data.page=='undefined'){data.page=1}
20var divResult=$('.modern-search-result');var divResultString=$('.modern-result-string');var divPagination=$('.moderm-pagination');divResult.addClass('loading');$('.map-content-loading').each(function(index){$(this).fadeIn()});if($('.search-result-page.tour-layout6, .search-result-page.tour-layout7, .search-result-page.tour-layout8').length){let wrapper=$('.search-result-page');data.version='elementorv2';data.version_layout=wrapper.data('layout');data.version_format=wrapper.data('format');if(window.matchMedia('(max-width: 767px)').matches){if($('.st-style-elementor.search-result-page').length){if(data.layout!=='grid'){data.layout='grid';data.layout_old='list'}}}else{if($('.st-style-elementor.search-result-page').length){if(typeof data.layout_old!=='undefined'&&data.layout_old!=''){data.layout=data.layout_old;data.layout_old=''}}}}
21xhr=$.ajax({url:st_params.ajax_url,dataType:'json',type:'get',data:data,success:function(doc){divResult.each(function(){$(this).html(doc.content)});divResultString.each(function(){$(this).html(doc.count)});divPagination.each(function(){$(this).html(doc.pag)});$('.map-full-height, .full-map-form').each(function(){var t=$(this);var data_map=doc.data_map;initHalfMap(t,data_map.data_map,data_map.map_lat_center,data_map.map_lng_center,'',data_map.map_icon,data.version,data.move_map)})},complete:function(){divResult.removeClass('loading');$('.map-content-loading').each(function(){$(this).fadeOut()});var time=0;divResult.find('img').one("load",function(){$(this).addClass('loaded');if(divResult.find('img.loaded').length===divResult.find('img').length){console.log("All images loaded!");if($('.has-matchHeight').length){$('.has-matchHeight').matchHeight({remove:!0});$('.has-matchHeight').matchHeight()}}});if(checkClearFilter()){$('.btn-clear-filter').fadeIn()}else{$('.btn-clear-filter').fadeOut()}
22requestRunning=!1},});requestRunning=!0}
23var resizeMap=0;jQuery(function($){if(window.matchMedia('(min-width: 992px)').matches){ajaxFilterMapHandler()}});function ajaxFilterMapHandler(){var layout=$('#modern-search-result').data('layout');if($('.search-result-page').length){let wrapper=$('.search-result-page');
23if(wrapper.hasClass('layout5')||wrapper.hasClass('layout6')){data.version='elementorv2';data.version_layout=wrapper.data('layout');data.version_format=wrapper.data('format')}}
24data.action='st_filter_tour_map';data.is_search_page=1;data._s=st_params._s;if(typeof data.page=='undefined'){data.page=1}
25$('.map-loading').fadeIn();$.ajax({url:st_params.ajax_url,dataType:'json',type:'get',data:data,success:function(doc){$('.map-full-height, .full-map-form').each(function(){var t=$(this);initHalfMap(t,doc.data_map,doc.map_lat_center,doc.map_lng_center,'',doc.map_icon,data.version,data.move_map)})},complete:function(){$('.map-loading').fadeOut();$('.filter-loading').hide();resizeMap=0},})}
26jQuery(function($){if(checkClearFilter()){$('.btn-clear-filter').fadeIn()}else{$('.btn-clear-filter').fadeOut()}
27$(document).on('click','#btn-clear-filter , .btn-clear-filter',function(){var arrResetTax=[];$('.filter-tax').each(function(){if(!Object.keys(arrResetTax).includes($(this).data('type'))){arrResetTax[$(this).data('type')]=[]}
28if($(this).length){$(this).prop('checked',!1)}});if(Object.keys(arrResetTax).length){for(var i=0;i<Object.keys(arrResetTax).length;i++){if(typeof data['taxonomy['+Object.keys(arrResetTax)[i]+']']!='undefined'){delete data['taxonomy['+Object.keys(arrResetTax)[i]+']']}}}
29if(typeof data.price_range!='undefined'){delete data.price_range;$('input[name="price_range"]').each(function(){var sliderPrice=$(this).data("ionRangeSlider");sliderPrice.reset()})}
30if(typeof data.star_rate!='undefined'){delete data.star_rate}
31if($('.filter-item').length){$('.filter-item').prop('checked',!1)}
32if($('.filter-tax').length){$('.filter-tax').prop('checked',!1)}
33if($('.sort-item').length){data.orderby='';$('.sort-item').find('input').prop('checked',!1);$('.sort-item').find('input[data-value=""]').prop('checked',!0)}
34$(document).trigger('st_clear_filter_action');ajaxFilterHandler();hasFilter=!1;$(this).fadeOut()})});function checkClearFilter(){if(((typeof data.price_range!='undefined'&&data.price_range.length)||(typeof data.star_rate!='undefined'&&data.star_rate.length)||(typeof data['taxonomy[durations]']!='undefined'&&data['taxonomy[durations]'].length)||(typeof data['taxonomy[st_tour_type]']!='undefined'&&data['taxonomy[st_tour_type]'].length)||(typeof data['taxonomy[languages]']!='undefined'&&data['taxonomy[languages]'].length)||(typeof data.orderby!='undefined'&&data.orderby.length&&data.orderby!='new'))&&hasFilter){return!0}else{return!1}}
35function decodeQueryParam(p){if(typeof p!='undefined'){return decodeURIComponent(p.replace(/\+/g,' '))}}
36function URLToArrayNew(){var res={};$('.toolbar .layout span').each(function(){if($(this).hasClass('active')){res.layout=$(this).data('value')}});res.orderby='';var sPageURL=window.location.search.substring(1);if(sPageURL!=''){var sURLVariables=sPageURL.split('&');if(sURLVariables.length){for(var i=0;i<sURLVariables.length;i++){var sParameterName=sURLVariables[i].split('=');if(sParameterName.length){let val=decodeQueryParam(sParameterName[1]);res[decodeURIComponent(sParameterName[0])]=val=='undefined'?'':val}}}}
37return res}})(jQuery)
38;

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.