<!-- ======= Footer ======= -->

  <footer id="footer" class="footer">

   

    <div class="credits">

     <p>2023 © Designed by Ample eBussiness </p>

    </div>

  </footer><!-- End Footer -->



  <a href="#" class="back-to-top d-flex align-items-center justify-content-center" style="background-color: #004f6f;"><i class="bi bi-arrow-up-short"></i></a>

@yield('script')

  <!-- Vendor JS Files -->

  <script src="{{asset('assets/vendor/apexcharts/apexcharts.min.js')}}"></script>

  <script src="{{asset('assets/vendor/bootstrap/js/bootstrap.bundle.min.js')}}"></script>

  <script src="{{asset('assets/vendor/chart.js/chart.umd.js')}}"></script>

  <script src="{{asset('assets/vendor/echarts/echarts.min.js')}}"></script>

  <script src="{{asset('assets/vendor/quill/quill.min.js')}}"></script>

  <script src="{{asset('assets/vendor/simple-datatables/simple-datatables.js')}}"></script>

  <script src="{{asset('assets/vendor/tinymce/tinymce.min.js')}}"></script>

  <script src="{{asset('assets/vendor/php-email-form/validate.js')}}"></script>



  <!-- Template Main JS File -->

  <script src="{{asset('assets/js/main.js')}}"></script>


    <!-- Datatable Script New -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.0/jquery.validate.js"></script>
    <script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
    <script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js"></script>
    <!-- -------------------- -->


    <script src="https://code.jquery.com/jquery-3.5.1.js"></script>
    <script src="https://cdn.datatables.net/1.13.4/js/jquery.dataTables.min.js"></script>
    <script src="https://cdn.datatables.net/responsive/2.4.1/js/dataTables.responsive.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.3.6/js/dataTables.buttons.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.3.6/js/buttons.colVis.min.js"></script>
    <script>
        $(document).ready(function() {
            $('#example').DataTable( {
                dom: 'Bfrtip',
                stateSave: true,
                "bDestroy": true,
            } );
        } );
    </script>
     <!-- Validetor -->

    <script src="{{asset('plugins/jquery-validation/jquery.validate.min.js')}}"></script>



    <!-- Init files -->

    <!-- <script src="{{asset('js/dashboard/dashboard-1.js')}}"></script> -->

    <script src="{{asset('js/plugins-init/datatables.init.js')}}"></script>

    <script src="{{asset('js/plugins-init/jquery.validate-init.js')}}"></script>



     <!-- tinymce -->

    <script src="{{asset('plugins/tinymce/tinymce.min.js')}}"></script>

    <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
        $('.select2').select2();
    });
    </script>

    <script type="text/javascript">

        $(document).ready(function (e) {


           $('#image').change(function(){

            let reader = new FileReader();

            reader.onload = (e) => {

              $('#preview-image-before-upload').attr('src', e.target.result);
            }

            reader.readAsDataURL(this.files[0]);

           });

        });

    </script>

    <script>

        tinymce.init({

            selector: ".summernote",

            height: 400,

            menubar: false,

            plugins: 'print preview paste importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons',

            toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | forecolor backcolor removeformat | alignleft aligncenter alignright alignjustify | insertfile image media link | outdent indent |  numlist bullist | pagebreak | charmap emoticons | fullscreen  preview print | ltr rtl | codesample code',

            toolbar_sticky: true,

            toolbar_mode: 'sliding',

            emoticons_append: {

                custom_mind_explode: {

                  keywords: ['brain', 'mind', 'explode', 'blown'],

                  char: '🤯'

                }

              },



            /* enable title field in the Image dialog*/

            image_title: true,

            /* enable automatic uploads of images represented by blob or data URIs*/

            automatic_uploads: true,

            /*

                URL of our upload handler (for more details check: https://www.tiny.cloud/docs/configure/file-image-upload/#images_upload_url)

                images_upload_url: 'postAcceptor.php',

                here we add custom filepicker only to Image dialog

            */

            file_picker_types: 'image',

            /* and here's our custom image picker*/

            file_picker_callback: function (cb, value, meta) {

                var input = document.createElement('input');

                input.setAttribute('type', 'file');

                input.setAttribute('accept', 'image/*');



                /*

                Note: In modern browsers input[type="file"] is functional without

                even adding it to the DOM, but that might not be the case in some older

                or quirky browsers like IE, so you might want to add it to the DOM

                just in case, and visually hide it. And do not forget do remove it

                once you do not need it anymore.

                */



                input.onchange = function () {

                var file = this.files[0];



                var reader = new FileReader();

                reader.onload = function () {

                    /*

                    Note: Now we need to register the blob in TinyMCEs image blob

                    registry. In the next release this part hopefully won't be

                    necessary, as we are looking to handle it internally.

                    */

                    var id = 'blobid' + (new Date()).getTime();

                    var blobCache =  tinymce.activeEditor.editorUpload.blobCache;

                    var base64 = reader.result.split(',')[1];

                    var blobInfo = blobCache.create(id, file, base64);

                    blobCache.add(blobInfo);



                    /* call the callback and populate the Title field with the file name */

                    cb(blobInfo.blobUri(), { title: file.name });

                };

                reader.readAsDataURL(file);

                };



                input.click();

            },

            //content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'

    });

    $().ready(function(){

      $('.alert').delay(2000);
       $('.alert').hide(3000);
    })

  </script>

  <script type="text/javascript">
    $(document).ready(function () {
        $('#tabl').DataTable({
            order: [],
        });
    });
  </script>

  <script type="text/javascript">
    $("document").ready(function(){
       setTimeout(function()
       {
           $("div.alert").remove();

       }, 3000);
    });

</script>

 <script>
    $(document).ready(function() {
        
        $('#phoneno').on('keypress', function(e) {
          
            var phone = jQuery('#phoneno').val();
            console.log(phone);
            var regex = new RegExp("^[0-9\b]+$");
            var str = String.fromCharCode(!e.charCode ? e.which : e.charCode);
            // for 10 digit number only
            if (phone.length > 9) {
                e.preventDefault();
                return false;
            }
            
            if (regex.test(str)) {
                return true;
            }
            e.preventDefault();
            return false;
        });

   });
</script>

</body>



</html>