PageSourceSearch

https://prenotaora.net/wp-content/cache/min/1/wp-content/themes/li…/jquery.city-autocomplete.js?ver=1791325721

js prenotaora.net collected 2026-10-09 17:53:05 UTC 4,874 bytes, 9 lines download raw bytes

1(function($){var lpregions=!1;var lpattern=jQuery('#page').data('lpattern');if(lpattern==="with_region"){lpregions=!0}
2$.fn.cityAutocomplete=function(options){var autocompleteService=new google.maps.places.AutocompleteService();var predictionsDropDown=$('<div class="city-autocomplete"></div>').appendTo('body');var input=this;input.keyup(function(){var searchStr=$(this).val();if(searchStr.length>0){if(!lpregions){var params={input:searchStr,types:['(cities)']}}else{var params={input:searchStr,types:['(regions)']}}
3if(input.data('country').length>0){params.componentRestrictions={country:input.data('country')}}
4autocompleteService.getPlacePredictions(params,updatePredictions)}else{predictionsDropDown.hide()}});predictionsDropDown.delegate('div','click',function(){substrr=$(this).text();substrr=substrr.split(",");if(substrr[1]=='undefined'||substrr[1]==''||substrr[1]==null){substrr=substrr[0]}else{substrr=substrr[0]+','+substrr[1]}
5jQuery('input[name=lp_s_loc]').val(substrr);jQuery('input[name=location]').val(substrr);input.val($(this).text());input.data('isseleted','true');predictionsDropDown.hide()});$(document).mouseup(function(e){if(!predictionsDropDown.is(e.target)&&predictionsDropDown.has(e.target).length===0){predictionsDropDown.hide()}});$(window).resize(function(){updatePredictionsDropDownDisplay(predictionsDropDown,input)});updatePredictionsDropDownDisplay(predictionsDropDown,input);function updatePredictions(predictions,status){if(google.maps.places.PlacesServiceStatus.OK!=status){predictionsDropDown.hide();return}
6predictionsDropDown.empty();var predcities=[];$.each(predictions,function(i,prediction){if(!lpregions){predcities.push($.fn.cityAutocomplete.transliterate(prediction.terms[0].value))}else{predcities.push(prediction.description)}});if(!lpregions){predcities=predcities.filter((v,i,a)=>a.indexOf(v)===i)}
7$.each(predcities,function(i,cities){predictionsDropDown.append('<div class="help">'+cities+'</div')});predictionsDropDown.show()}
8return input};$.fn.cityAutocomplete.transliterate=function(s){s=String(s);var char_map={'À':'A','Á':'A','Â':'A','Ã':'A','Ä':'A','Å':'A','Æ':'AE','Ç':'C','È':'E','É':'E','Ê':'E','Ë':'E','Ì':'I','Í':'I','Î':'I','Ï':'I','Ð':'D','Ñ':'N','Ò':'O','Ó':'O','Ô':'O','Õ':'O','Ö':'O','Ő':'O','Ø':'O','Ù':'U','Ú':'U','Û':'U','Ü':'U','Ű':'U','Ý':'Y','Þ':'TH','ß':'ss','à':'a','á':'a','â':'a','ã':'a','ä':'a','å':'a','æ':'ae','ç':'c','è':'e','é':'e','ê':'e','ë':'e','ì':'i','í':'i','î':'i','ï':'i','ð':'d','ñ':'n','ò':'o','ó':'o','ô':'o','õ':'o','ö':'o','ő':'o','ø':'o','ù':'u','ú':'u','û':'u','ü':'u','ű':'u','ý':'y','þ':'th','ÿ':'y','©':'(c)','Α':'A','Β':'B','Γ':'G','Δ':'D','Ε':'E','Ζ':'Z','Η':'H','Θ':'8','Ι':'I','Κ':'K','Λ':'L','Μ':'M','Ν':'N','Ξ':'3','Ο':'O','Π':'P','Ρ':'R','Σ':'S','Τ':'T','Υ':'Y','Φ':'F','Χ':'X','Ψ':'PS','Ω':'W','Ά':'A','Έ':'E','Ί':'I','Ό':'O','Ύ':'Y','Ή':'H','Ώ':'W','Ϊ':'I','Ϋ':'Y','α':'a','β':'b','γ':'g','δ':'d','ε':'e','ζ':'z','η':'h','θ':'8','ι':'i','κ':'k','λ':'l','μ':'m','ν':'n','ξ':'3','ο':'o','π':'p','ρ':'r','σ':'s','τ':'t','υ':'y','φ':'f','χ':'x','ψ':'ps','ω':'w','ά':'a','έ':'e','ί':'i','ό':'o','ύ':'y','ή':'h','ώ':'w','ς':'s','ϊ':'i','ΰ':'y','ϋ':'y','ΐ':'i','Ş':'S','İ':'I','Ç':'C','Ü':'U','Ö':'O','Ğ':'G','ş':'s','ı':'i','ç':'c','ü':'u','ö':'o','ğ':'g','А':'A','Б':'B','В':'V','Г':'G','Д':'D','Е':'E','Ё':'Yo','Ж':'Zh','З':'Z','И':'I','Й':'J','К':'K','Л':'L','М':'M','Н':'N','О':'O','П':'P','Р':'R','С':'S','Т':'T','У':'U','Ф':'F','Х':'H','Ц':'C','Ч':'Ch','Ш':'Sh','Щ':'Sh','Ъ':'','Ы':'Y','Ь':'','Э':'E','Ю':'Yu','Я':'Ya','а':'a','б':'b','в':'v','г':'g','д':'d','е':'e','ё':'yo','ж':'zh','з':'z','и':'i','й':'j','к':'k','л':'l','м':'m','н':'n','о':'o','п':'p','р':'r','с':'s','т':'t','у':'u','ф':'f','х':'h','ц':'c','ч':'ch','ш':'sh','щ':'sh','ъ':'','ы':'y','ь':'','э':'e','ю':'yu','я':'ya','Є':'Ye','І':'I','Ї':'Yi','Ґ':'G','є':'ye','і':'i','ї':'yi','ґ':'g','Č':'C','Ď':'D','Ě':'E','Ň':'N','Ř':'R','Š':'S','Ť':'T','Ů':'U','Ž':'Z','č':'c','ď':'d','ě':'e','ň':'n','ř':'r','š':'s','ť':'t','ů':'u','ž':'z','Ą':'A','Ć':'C','Ę':'e','Ł':'L','Ń':'N','Ó':'o','Ś':'S','Ź':'Z','Ż':'Z','ą':'a','ć':'c','ę':'e','ł':'l','ń':'n','ó':'o','ś':'s','ź':'z','ż':'z','Ā':'A','Č':'C','Ē':'E','Ģ':'G','Ī':'i','Ķ':'k','Ļ':'L','Ņ':'N','Š':'S','Ū':'u','Ž':'Z','ā':'a','č':'c','ē':'e','ģ':'g','ī':'i','ķ':'k','ļ':'l','ņ':'n','š':'s','ū':'u','ž':'z'};for(var k in char_map){s=s.replace(new RegExp(k,'g'),char_map[k])}
9return s};function updatePredictionsDropDownDisplay(dropDown,input){dropDown.css({'width':input.outerWidth(),'left':input.offset().left,'top':input.offset().top+input.outerHeight()})}}(jQuery))

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.