<commit_before><div class="map-place-{{$name}}-{{$lang}}">

    <div class="form-group{{ $errors->has($name) ? ' has-error' : '' }}">

        @if(isset($title))
            <label for="field-{{$name}}">{{$title}}</label>
        @endif

        <div class="input-group">
            <input class="form-control {{$class or ''}}" id="place-{{str_slug($name)}}-{{$lang}}"
                   name="{{$prefix}}[{{$lang}}]{{$name}}[name]" value="{{$value['name'] or ''}}"
                   placeholder="Адрес ...">
            <input type="hidden" id="lat-{{str_slug($name)}}-{{$lang}}" name="{{$prefix}}[{{$lang}}]{{$name}}[lat]"
                   value="{{$value['lat'] or ''}}">
            <input type="hidden" id="lng-{{str_slug($name)}}-{{$lang}}" name="{{$prefix}}[{{$lang}}]{{$name}}[lng]"
                   value="{{$value['lng'] or ''}}">
            <span class="input-group-btn">
        <button class="btn btn-default" type="button" data-toggle="modal"
                data-target="#map-place-{{str_slug($name)}}-{{$lang}}"><i
                    class="fa fa-map-marker"></i></button>
    </span>
        </div>
    </div>


        @if(isset($help))
            <p class="help-block">{{$help}}</p>
        @endif
</div>



<!-- Modal -->
<div class="modal fade" id="map-place-{{str_slug($name)}}-{{$lang}}" tabindex="-1" role="dialog"
     aria-labelledby="map-place-{{str_slug($name)}}-{{$lang}}">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">Google Maps</h4>
            </div>
            <div class="modal-body">
                <div id="map-place-{{str_slug($name)}}-{{$lang}}-canvas" class="google-maps-canvas"
                     style="width: 100%; height: 300px"></div>
            </div>
        </div>
    </div>
</div>



<script>

    document.addEventListener("DOMContentLoaded", function () {
        var input = document.getElementById("place-{{str_slug($name)}}-{{$lang}}");
        var autocomplete{{str_slug($name)}}{{$lang}} = new google.maps.places.Autocomplete(input);


        autocomplete{{str_slug($name)}}{{$lang}}.addListener('place_changed', function () {
            var cors = autocomplete{{$name}}{{$lang}}.getPlace().geometry.location;
            $('#lat-{{str_slug($name)}}-{{$lang}}').val(cors.lat());
            $('#lng-{{str_slug($name)}}-{{$lang}}').val(cors.lng());
        });


        $('#map-place-{{str_slug($name)}}-{{$lang}}').on('show.bs.modal', function (e) {


            setTimeout(function () {
                var myLatLng = {
                    lat: parseFloat($('#lat-{{str_slug($name)}}-{{$lang}}').val()),
                    lng: parseFloat($('#lng-{{str_slug($name)}}-{{$lang}}').val())<commit_msg>Не работают ни одни скрипты, поставил обработчик на карту маршрута<commit_after><div class="map-place-{{$name}}-{{$lang}}">

    <div class="form-group{{ $errors->has($name) ? ' has-error' : '' }}">

        @if(isset($title))
            <label for="field-{{$name}}">{{$title}}</label>
        @endif

        <div class="input-group">
            <input class="form-control {{$class or ''}}" id="place-{{str_slug($name)}}-{{$lang}}"
                   name="{{$prefix}}[{{$lang}}]{{$name}}[name]" value="{{$value['name'] or ''}}"
                   placeholder="Адрес ...">
            <input type="hidden" id="lat-{{str_slug($name)}}-{{$lang}}" name="{{$prefix}}[{{$lang}}]{{$name}}[lat]"
                   value="{{$value['lat'] or ''}}">
            <input type="hidden" id="lng-{{str_slug($name)}}-{{$lang}}" name="{{$prefix}}[{{$lang}}]{{$name}}[lng]"
                   value="{{$value['lng'] or ''}}">
            <span class="input-group-btn">
        <button class="btn btn-default" type="button" data-toggle="modal"
                data-target="#map-place-{{str_slug($name)}}-{{$lang}}"><i
                    class="fa fa-map-marker"></i></button>
    </span>
        </div>
    </div>


        @if(isset($help))
            <p class="help-block">{{$help}}</p>
        @endif
</div>



<!-- Modal -->
<div class="modal fade" id="map-place-{{str_slug($name)}}-{{$lang}}" tabindex="-1" role="dialog"
     aria-labelledby="map-place-{{str_slug($name)}}-{{$lang}}">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">Google Maps</h4>
            </div>
            <div class="modal-body">
                <div id="map-place-{{str_slug($name)}}-{{$lang}}-canvas" class="google-maps-canvas"
                     style="width: 100%; height: 300px"></div>
            </div>
        </div>
    </div>
</div>



<script>

    document.addEventListener("DOMContentLoaded", function () {
        var input = document.getElementById("place-{{str_slug($name)}}-{{$lang}}");
        var autocomplete{{str_slug($name)}}{{$lang}} = new google.maps.places.Autocomplete(input);


        autocomplete{{str_slug($name)}}{{$lang}}.addListener('place_changed', function () {
            var cors = autocomplete{{str_slug($name)}}{{$lang}}.getPlace().geometry.location;
            $('#lat-{{str_slug($name)}}-{{$lang}}').val(cors.lat());
            $('#lng-{{str_slug($name)}}-{{$lang}}').val(cors.lng());
        });


        $('#map-place-{{str_slug($name)}}-{{$lang}}').on('show.bs.modal', function (e) {


            setTimeout(function () {
                var myLatLng = {
                    lat: parseFloat($('#lat-{{str_slug($name)}}-{{$lang}}').val()),
                    lng: parseFloat($('#lng-{{str_slug($name)}}-{{$lang}}').val())
{'fraction_non_alphanumeric': 0.25594735954108316, 'fraction_numerical': 0.003036949552893538, 'mean_word_length': 2.6502463054187193, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 83, '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': '4735656', 'n_tokens_mistral': 1954, 'n_tokens_neox': 1874, 'n_words': 240}