<commit_before>jQuery(function ($) {

	// make columns selection draggable
    $('body.page-find .columns-overlay ul').sortable();

    // show/hide columns selection
    $('body.page-find .columns-select').click(function () {
        $('body.page-find .columns-overlay').toggle();
        return false;
    });

    // activate filter after click on <li>
    $('body.page-find .filters li span').click(function () {
        var input = $(this).prev('input[type="checkbox"]');
        if (input.attr('checked')) {
        	input.removeAttr('checked');
        } else {
        	input.attr('checked', 'checked');
        }
    });

    // show filter after click on <select>
    $('body.page-find .filter-selector').change(function () {
        $('body.page-find .filter-' + $(this).val()).slideDown();
        $('body.page-find .filter-selector option[value="'+$(this).val()+'"]').attr('disabled', 'disabled');
        $(this).val('');
    });

    // hide filter on clear
    $('body.page-find .clear').click(function () {
    	var div = $(this).closest('div');
        div.slideUp('fast');
        $('input', div).attr('disabled', 'disabled');
        $('#search-form').submit();
        return false;
    });

    var map;
    var latlng = new google.maps.LatLng(46.8, 8.233333); // CH
    var myOptions = {
        center: latlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        maxZoom: 18,
        minZoom: 5,
        mapTypeControl: false,
        zoom: 8
    };
    var overlay;
    var control;

    // show map
    $('body.page-find .map-select').click(function () {
        $('body.page-find .map-overlay').css('left', '50%');

        // init map for area selection 
        map = new google.maps.Map(document.getElementById('map-canvas'), myOptions);

        // geometry control to draw on map
        control = new GeometryControl(map, function () {
            if (overlay) {
                overlay.overlay.setMap(null);
            }
        });
        
        //create searchbar
        var searchBar = document.createElement('div');
	    var inputSearch = document.createElement('input');
	    searchBar.appendChild(input);
	    searchBar.setAttribute('id', 'search_container');
	    inputSearch.setAttribute('id', 'search_input');
		map.controls[google.maps.ControlPosition.TOP_LEFT].push(searchBar);
		var ac = new google.maps.places.Autocomplete(inputSearch, {
			types : [ 'geocode' ]
		});
		ac.bindTo('bounds', map);
		google.maps.event.addListener(ac, 'place_changed', function() {
			var place = ac.getPlace();
			if (place.geometry.viewport) {
				map.fitBounds(place.geometry.viewport);
			} else {
				map.setCenter(place.geometry.location);
				map.setZoom(17);
			}
		});
		google.maps.event.addListener(map, 'bounds_changed', function() {
			inputSearch.blur();
			inputSearch.value = '';<commit_msg>map search for find module<commit_after>jQuery(function ($) {

	// make columns selection draggable
    $('body.page-find .columns-overlay ul').sortable();

    // show/hide columns selection
    $('body.page-find .columns-select').click(function () {
        $('body.page-find .columns-overlay').toggle();
        return false;
    });

    // activate filter after click on <li>
    $('body.page-find .filters li span').click(function () {
        var input = $(this).prev('input[type="checkbox"]');
        if (input.attr('checked')) {
        	input.removeAttr('checked');
        } else {
        	input.attr('checked', 'checked');
        }
    });

    // show filter after click on <select>
    $('body.page-find .filter-selector').change(function () {
        $('body.page-find .filter-' + $(this).val()).slideDown();
        $('body.page-find .filter-selector option[value="'+$(this).val()+'"]').attr('disabled', 'disabled');
        $(this).val('');
    });

    // hide filter on clear
    $('body.page-find .clear').click(function () {
    	var div = $(this).closest('div');
        div.slideUp('fast');
        $('input', div).attr('disabled', 'disabled');
        $('#search-form').submit();
        return false;
    });

    var map;
    var latlng = new google.maps.LatLng(46.8, 8.233333); // CH
    var myOptions = {
        center: latlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        maxZoom: 18,
        minZoom: 5,
        mapTypeControl: false,
        zoom: 8
    };
    var overlay;
    var control;

    // show map
    $('body.page-find .map-select').click(function () {
        $('body.page-find .map-overlay').css('left', '50%');

        // init map for area selection 
        map = new google.maps.Map(document.getElementById('map-canvas'), myOptions);

        // geometry control to draw on map
        control = new GeometryControl(map, function () {
            if (overlay) {
                overlay.overlay.setMap(null);
            }
        });
        
        //create searchbar
        var searchBar = document.createElement('div');
	    var inputSearch = document.createElement('input');
	    searchBar.appendChild(inputSearch);
	    searchBar.setAttribute('id', 'search_container');
	    inputSearch.setAttribute('id', 'search_input');
		map.controls[google.maps.ControlPosition.TOP_LEFT].push(searchBar);
		var ac = new google.maps.places.Autocomplete(inputSearch, {
			types : [ 'geocode' ]
		});
		ac.bindTo('bounds', map);
		google.maps.event.addListener(ac, 'place_changed', function() {
			var place = ac.getPlace();
			if (place.geometry.viewport) {
				map.fitBounds(place.geometry.viewport);
			} else {
				map.setCenter(place.geometry.location);
				map.setZoom(17);
			}
		});
		google.maps.event.addListener(map, 'bounds_changed', function() {
			inputSearch.blur();
			inputSearch.value = '';
{'fraction_non_alphanumeric': 0.1740500787953073, 'fraction_numerical': 0.006303624584135878, 'mean_word_length': 2.5677701436602125, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '802305', 'n_tokens_mistral': 1824, 'n_tokens_neox': 1703, 'n_words': 328}