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C;EACJ;AACD,CAAE,CAAC,C","sources":["webpack://travel-booking/./assets/js/frontend/booking.js"],"sourcesContent":["/**\n * Booking tour js\n *\n * @author physcode\n * @version 2.0.8\n */\n\n( function( $ ) {\n\n\t'use strict';\n\tconst date_validate = [];\n\tconst date_can_book = [];\n\tlet tour_month = [];\n\tconst tour_days = '';\n\tconst date_book = '';\n\tlet load_notify = false;\n\n\tlet el_tourBookingForm = null;\n\tlet el_tour_date_checkin_checkout = null;\n\tlet el_tour_datepicker_range_checkin_checkout = null;\n\tlet el_input_tour_datepicker_range_checkin_checkout = null;\n\tlet el_number_ticket = null;\n\tlet el_price_ticket = null;\n\tlet el_show_price_ticket = null;\n\tlet el_number_children = null;\n\tlet el_price_children = null;\n\tlet el_show_price_children = null;\n\tlet el_field_travel_booking = null;\n\tlet el_input_date_book = null;\n\tlet tour_have_children_ticket = false;\n\tlet el_tour_date_starts_after = null;\n\tlet el_tour_duration_number = null;\n\tlet el_tour_group_discount_data_phys;\n\tlet tour_group_discount_data;\n\tlet el_label_tour_group_discount = null;\n\tlet el_tour_deposit = null;\n\tlet el_tour_variations_options;\n\tlet tour_variation_options;\n\tlet info_user;\n\tlet el_show_total_price;\n\tconst price_dates_tour = {};\n\tlet num_decimals = 0;\n\n\t$.fn.tour_booking_init = function() {\n\t\tel_tourBookingForm = $( 'form#tourBookingForm' );\n\n\t\tif ( getCookie( 'info_user' ) ) {\n\t\t\tinfo_user = JSON.parse( getCookie( 'info_user' ) );\n\t\t}\n\n\t\tif ( el_tourBookingForm.length > 0 ) {\n\t\t\t$.fn._get_elms_tour_booking_form();\n\t\t\t$.fn.tour_booking();\n\n\t\t\tif ( info_user ) {\n\t\t\t\t$( 'input[name=first_name]' ).val( info_user.first_name );\n\t\t\t\t$( 'input[name=last_name]' ).val( info_user.last_name );\n\t\t\t\t$( 'input[name=email_tour]' ).val( info_user.email );\n\t\t\t\t$( 'input[name=phone]' ).val( info_user.phone );\n\t\t\t}\n\t\t}\n\n\t\tif ( info_user ) {\n\t\t\t// for billing\n\t\t\t$( 'input[name=billing_first_name]' ).val( info_user.first_name );\n\t\t\t$( 'input[name=billing_last_name]' ).val( info_user.last_name );\n\t\t\t$( 'input[name=billing_email]' ).val( info_user.email );\n\t\t\t$( 'input[name=billing_phone]' ).val( info_user.phone );\n\t\t}\n\t};\n\n\t$.fn._get_elms_tour_booking_form = function() {\n\t\tel_price_ticket = el_tourBookingForm.find( 'input[name=price_ticket]' );\n\t\tel_number_ticket = el_tourBookingForm.find( 'input[name=number_ticket]' );\n\t\tel_show_price_ticket = el_tourBookingForm.find( '.price_ticket' );\n\t\tel_number_children = el_tourBookingForm.find( 'input[name=number_children]' );\n\t\tel_price_children = el_tourBookingForm.find( 'input[name=price_children]' );\n\t\tel_field_travel_booking = el_tourBookingForm.find( '.field-travel-booking' );\n\t\tel_show_price_children = el_tourBookingForm.find( '.price_child' );\n\t\tel_tour_date_checkin_checkout = el_tourBookingForm.find( '.tour_date_checkin_checkout' );\n\t\tel_input_date_book = el_tourBookingForm.find( 'input[name=date_book]' );\n\t\tel_tour_date_starts_after = el_tourBookingForm.find( 'input[name=tour_date_starts_after]' );\n\t\tel_tour_duration_number = el_tourBookingForm.find( 'input[name=tour_duration_number]' );\n\t\tel_tour_group_discount_data_phys = el_tourBookingForm.find( 'input[name=tour_group_discount_data_phys]' );\n\t\tel_label_tour_group_discount = el_tourBookingForm.find( '.label-tour-group-discount' );\n\t\tel_tour_deposit = el_tourBookingForm.find( 'input[name=webtomizer_tour_deposit]' );\n\t\tel_tour_variations_options = el_tourBookingForm.find( 'input[name=_tour_variations_options]' );\n\t\tconst el_tour_month = el_tourBookingForm.find( 'input[name=tour_month]' );\n\t\tel_show_total_price = el_tourBookingForm.find( '.tour-subtotal' );\n\t\tnum_decimals = $( 'input[name=woocommerce_price_num_decimals]' ).val();\n\n\t\tif ( el_number_children.length > 0 ) {\n\t\t\ttour_have_children_ticket = true;\n\t\t}\n\n\t\tif ( el_tour_month.length ) {\n\t\t\ttour_month = el_tour_month.val().split( ',' );\n\t\t}\n\t};\n\n\t$._dates_disable = null;\n\t$._max_year = null;\n\t$._date_format_default = 'yy/mm/dd';\n\t$._date_format_default_datepicker_range = 'YYYY/MM/DD';\n\t$._tour_date_format = null;\n\t// $._date_format_convert_php_js = {};\n\t// $._date_format_convert_php_js['d/m/Y'] = 'dd/mm/yy';\n\t// $._date_format_convert_php_js['Y/m/d'] = 'yy/mm/dd';\n\t// $._date_format_convert_php_js['D, d M, Y'] = 'D, d M, yy';\n\t// $._date_format_convert_php_js['l, d F, Y'] = 'DD, d MM, yy';\n\t$._date_format_convert_php_js = {\n\t\t'Y/m/d': 'yy/mm/dd',\n\t\t'Y-m-d': 'yy-mm-dd',\n\t\t'd/m/Y': 'dd/mm/yy',\n\t\t'd-m-Y': 'dd-mm-yy',\n\t\t'm/d/Y': 'mm/dd/yy',\n\t\t'm-d-Y': 'mm-dd-yy',\n\t\t'D, d M, Y': 'D, d M, yy',\n\t\t'l, d F, Y': 'DD, d MM, yy',\n\t};\n\t$._tour_date_check_in_old = '';\n\tlet phys_tour_price_dates_type = null;\n\tlet el_tour_date_check_in = null;\n\tlet el_tour_date_check_out = null;\n\t$._tour_price_of_dates_option = null;\n\n\t$.fn.tour_booking = function() {\n\t\tlet tour_date_starts_after = 0;\n\t\tconst date_now = new Date();\n\t\tconst date_min_can_book = new Date();\n\t\tconst el_phys_tour_dates_disable = el_tourBookingForm.find( 'input[name=phys_tour_dates_disable]' );\n\t\tconst el_phys_tour_max_year_enable = el_tourBookingForm.find( 'input[name=phys_tour_max_year_enable]' );\n\t\t// let el_tour_date_format = el_tourBookingForm.find('input[name=tour_date_format]');\n\t\tphys_tour_price_dates_type = el_tourBookingForm.find( 'input[name=phys_tour_price_dates_type]' ).val();\n\t\tconst el_phys_tour_price_of_dates_option = el_tourBookingForm.find( 'input[name=phys_tour_price_of_dates_option]' );\n\n\t\tif ( el_tour_variations_options.length > 0 ) {\n\t\t\ttry {\n\t\t\t\ttour_variation_options = JSON.parse( el_tour_variations_options.val() );\n\t\t\t\t//el_tour_variations_options.val( '' );\n\n\t\t\t\t//console.log( tour_variation_options );\n\t\t\t} catch ( e ) {\n\t\t\t\ttour_variation_options = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( el_tour_group_discount_data_phys.length ) {\n\t\t\ttry {\n\t\t\t\ttour_group_discount_data = JSON.parse( el_tour_group_discount_data_phys.val() );\n\t\t\t\t//el_tour_group_discount_data_phys.val( '' );\n\t\t\t} catch ( e ) {\n\t\t\t\ttour_group_discount_data = null;\n\t\t\t}\n\t\t}\n\n\t\t/*** Get subtotal price ***/\n\t\t$.fn.update_tour_total_price();\n\n\t\tif ( el_phys_tour_price_of_dates_option.length > 0 && el_phys_tour_price_of_dates_option.val() !== '' && el_phys_tour_price_of_dates_option.val() !== '{}' ) {\n\t\t\ttry {\n\t\t\t\t$._tour_price_of_dates_option = JSON.parse( el_phys_tour_price_of_dates_option.val() );\n\t\t\t\t//el_phys_tour_price_of_dates_option.val( '' );\n\t\t\t} catch ( e ) {\n\t\t\t\t$._tour_price_of_dates_option = null;\n\t\t\t}\n\t\t}\n\n\t\t/*** Set date format ***/\n\t\t$._tour_date_format = $._date_format_default;\n\n\t\tif ( $._date_format_convert_php_js[ travel_booking.tour_date_format ] !== undefined ) {\n\t\t\t$._tour_date_format = $._date_format_convert_php_js[ travel_booking.tour_date_format ];\n\t\t}\n\n\t\t$._max_year = el_phys_tour_max_year_enable.val();\n\n\t\tif ( el_phys_tour_dates_disable.length > 0 && el_phys_tour_dates_disable.val() !== '' ) {\n\t\t\t$._dates_disable = JSON.parse( el_phys_tour_dates_disable.val() );\n\t\t}\n\n\t\t/*** Start After ***/\n\t\tif ( el_tour_date_starts_after.length > 0 ) {\n\t\t\tif ( el_tour_date_starts_after.val() != '' && parseInt( el_tour_date_starts_after.val() ) !== 0 ) {\n\t\t\t\ttour_date_starts_after = parseInt( el_tour_date_starts_after.val() );\n\t\t\t}\n\t\t}\n\n\t\tif ( $._dates_disable !== null ) {\n\t\t\tlet dateMinCanBookStr = $.fn._convert_date_obj_by_format_default( date_min_can_book );\n\n\t\t\twhile ( $._dates_disable.indexOf( dateMinCanBookStr ) > -1 ) {\n\t\t\t\tdate_min_can_book.setDate( date_min_can_book.getDate() + 1 );\n\t\t\t\tdateMinCanBookStr = $.fn._convert_date_obj_by_format_default( date_min_can_book );\n\t\t\t}\n\n\t\t\tdate_min_can_book.setDate( date_min_can_book.getDate() + tour_date_starts_after );\n\n\t\t\t// console.log(date_min_can_book);\n\t\t} else {\n\t\t\tdate_min_can_book.setDate( date_now.getDate() + tour_date_starts_after );\n\t\t}\n\n\t\tconst option_date_picker = {\n\t\t\tdateFormat: $._tour_date_format,\n\t\t\tminDate: date_min_can_book,\n\t\t\tyearRange: date_min_can_book.getFullYear() + ':' + $._max_year,\n\t\t};\n\n\t\tif ( $._dates_disable !== null ) {\n\t\t\toption_date_picker.beforeShowDay = function( date ) {\n\t\t\t\tdate = $.fn._convert_date_obj_by_format_default( date );\n\n\t\t\t\tconst indexOf = $._dates_disable.indexOf( date );\n\n\t\t\t\tif ( indexOf > -1 ) {\n\t\t\t\t\treturn [ false, '', '' ];\n\t\t\t\t}\n\t\t\t\treturn [ true, '', 'Available' ];\n\t\t\t};\n\t\t}\n\n\t\t// Date book\n\t\tif ( el_input_date_book.length > 0 ) {\n\t\t\tdelete el_input_date_book.beforeShowDay;\n\t\t\tif ( jQuery().datepicker ) {\n\t\t\t\tel_input_date_book.datepicker( option_date_picker );\n\t\t\t\tel_input_date_book.datepicker( 'setDate', date_min_can_book );\n\t\t\t\tconst duration = parseInt( el_tour_duration_number.val() );\n\n\t\t\t\tconst function_anonymous_beforeShowDays = function( date ) {\n\t\t\t\t\t$._tour_dates_choose = [];\n\n\t\t\t\t\tif ( el_input_date_book.val() !== '' ) {\n\t\t\t\t\t\tconst date_start_obj = new Date( $.fn._convert_date_to_format_default( el_input_date_book.val() ) );\n\t\t\t\t\t\tconst date_next = date_start_obj;\n\t\t\t\t\t\tconst start_date = $.fn._convert_date_obj_by_format_default( date_start_obj );\n\t\t\t\t\t\tconst end_date_obj = new Date( $.fn._convert_date_to_format_default( el_input_date_book.val() ) );\n\t\t\t\t\t\tend_date_obj.setDate( date_start_obj.getDate() + duration );\n\t\t\t\t\t\tconst end_date = $.fn._convert_date_obj_by_format_default( end_date_obj );\n\n\t\t\t\t\t\twhile ( date_next < end_date_obj ) {\n\t\t\t\t\t\t\t// console.log(date_next);\n\t\t\t\t\t\t\tconst date_string_by_format_default = $.fn._convert_date_obj_by_format_default( date_next );\n\t\t\t\t\t\t\t$._tour_dates_choose.push( date_string_by_format_default );\n\t\t\t\t\t\t\tdate_next.setDate( date_next.getDate() + 1 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdate = $.fn._convert_date_obj_by_format_default( date );\n\t\t\t\t\t\tconst indexOf = $._tour_dates_choose.indexOf( date );\n\n\t\t\t\t\t\tif ( $._dates_disable !== null ) {\n\t\t\t\t\t\t\tconst indexOfDatesDisable = $._dates_disable.indexOf( date );\n\n\t\t\t\t\t\t\tif ( indexOf > -1 ) {\n\t\t\t\t\t\t\t\tif ( indexOfDatesDisable > -1 ) {\n\t\t\t\t\t\t\t\t\tif ( date == start_date ) {\n\t\t\t\t\t\t\t\t\t\treturn [ false, 'date-picked start-date', '' ];\n\t\t\t\t\t\t\t\t\t} else if ( date == end_date ) {\n\t\t\t\t\t\t\t\t\t\treturn [ false, 'date-picked end-date', '' ];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn [ false, 'date-picked', '' ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( date == start_date ) {\n\t\t\t\t\t\t\t\t\treturn [ true, 'date-picked start-date', 'Available' ];\n\t\t\t\t\t\t\t\t} else if ( date == end_date ) {\n\t\t\t\t\t\t\t\t\treturn [ true, 'date-picked end-date', 'Available' ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn [ true, 'date-picked', 'Available' ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( indexOfDatesDisable > -1 ) {\n\t\t\t\t\t\t\t\treturn [ false, '', '' ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn [ true, '', 'Available' ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( indexOf > -1 ) {\n\t\t\t\t\t\t\tif ( date == start_date ) {\n\t\t\t\t\t\t\t\treturn [ true, 'date-picked start-date', '' ];\n\t\t\t\t\t\t\t} else if ( date == end_date ) {\n\t\t\t\t\t\t\t\treturn [ true, 'date-picked end-date', '' ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn [ true, 'date-picked', '' ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ true, '', '' ];\n\t\t\t\t\t}\n\t\t\t\t\tdate = $.fn._convert_date_obj_by_format_default( date );\n\t\t\t\t\tif ( $._dates_disable !== null ) {\n\t\t\t\t\t\tconst indexOf = $._dates_disable.indexOf( date );\n\n\t\t\t\t\t\tif ( indexOf > -1 ) {\n\t\t\t\t\t\t\treturn [ false, '', '' ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ true, '', 'Available' ];\n\t\t\t\t\t}\n\t\t\t\t\treturn [ true, '', 'Available' ];\n\t\t\t\t};\n\n\t\t\t\tel_input_date_book.datepicker( 'option', 'beforeShowDay', function_anonymous_beforeShowDays );\n\t\t\t\tel_input_date_book.datepicker( 'option', 'onClose', function( date ) {\n\t\t\t\t\t$.fn.update_tour_total_price();\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\t// Date checkin & checkout\n\t\tif ( el_tour_date_checkin_checkout.length > 0 ) {\n\t\t\tel_tour_date_check_in = el_tour_date_checkin_checkout.find( 'input[name=tour_date_check_in]' );\n\t\t\tel_tour_date_check_out = el_tour_date_checkin_checkout.find( 'input[name=tour_date_check_out]' );\n\n\t\t\tif ( jQuery().datepicker ) {\n\t\t\t\tel_tour_date_check_in.datepicker( option_date_picker );\n\n\t\t\t\tel_tour_date_check_in.datepicker( 'option', 'onClose', function( date ) {\n\t\t\t\t\t$.fn._show_range_dates_choose();\n\t\t\t\t\t// console.log(date);\n\t\t\t\t\tif ( date !== '' ) {\n\t\t\t\t\t\tconst date_next = new Date( $.fn._convert_date_to_format_default( date ) );\n\n\t\t\t\t\t\tdate_next.setDate( date_next.getDate() + 1 );\n\n\t\t\t\t\t\tel_tour_date_check_out.datepicker( 'option', 'minDate', date_next );\n\n\t\t\t\t\t\t$.fn.update_tour_total_price();\n\n\t\t\t\t\t\tif ( date !== $._tour_date_check_in_old ) {\n\t\t\t\t\t\t\t$._tour_date_check_in_old = date;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tel_tour_date_check_out.datepicker( {\n\t\t\t\t\tdateFormat: $._tour_date_format,\n\t\t\t\t\tminDate: date_min_can_book,\n\t\t\t\t\tyearRange: date_min_can_book.getFullYear() + ':' + $._max_year,\n\t\t\t\t} );\n\n\t\t\t\tel_tour_date_check_out.datepicker( 'option', 'onClose', function( date ) {\n\t\t\t\t\t$.fn._show_range_dates_choose();\n\t\t\t\t\t$.fn.update_tour_total_price();\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\t// Date checkin & checkout range\n\t\tel_tour_datepicker_range_checkin_checkout = el_tourBookingForm.find( '.tour-datepicker-range-checkin-checkout' );\n\t\tif ( el_tour_datepicker_range_checkin_checkout.length > 0 ) {\n\t\t\tel_input_tour_datepicker_range_checkin_checkout = el_tour_datepicker_range_checkin_checkout.find( 'input[name=tour_datepicker_range_checkin_checkout]' );\n\n\t\t\tconst option_datepicker_range = {\n\t\t\t\tminDate: date_min_can_book,\n\t\t\t\topens: 'left',\n\t\t\t\tdrops: 'up',\n\t\t\t\tlocale: {\n\t\t\t\t\tformat: $._date_format_default_datepicker_range,\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tel_input_tour_datepicker_range_checkin_checkout.daterangepicker( option_datepicker_range, function( start, end ) {\n\t\t\t\t//console.log( start, end );\n\t\t\t} );\n\t\t}\n\n\t\tif ( el_field_travel_booking.length > 0 ) {\n\t\t\tel_field_travel_booking.on( 'change keyup', function( i ) {\n\t\t\t\t$.fn.update_tour_total_price();\n\t\t\t} );\n\t\t}\n\t};\n\n\t$.fn.get_price_tours_default = function() {\n\t\tprice_dates_tour.regular_price_dates = parseFloat( el_price_ticket.val() );\n\n\t\tif ( tour_have_children_ticket ) {\n\t\t\tprice_dates_tour.child_price_dates = parseFloat( el_price_children.val() );\n\t\t}\n\n\t\t// Variation\n\t\tif ( tour_variation_options ) {\n\t\t\t$.each( tour_variation_options, function( k_variation, variation ) {\n\t\t\t\tif ( variation.set_price == 1 && variation.enable == 1 ) {\n\t\t\t\t\tif ( ! price_dates_tour[ k_variation ] ) {\n\t\t\t\t\t\tprice_dates_tour[ k_variation ] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each( variation.variation_attr, function( k_attr, attribute ) {\n\t\t\t\t\t\tprice_dates_tour[ k_variation ][ k_attr ] = parseFloat( attribute.price );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t};\n\n\t$.fn.update_tour_total_price = function() {\n\t\t$.fn.get_price_tours_default();\n\n\t\tlet subtotal = 0;\n\t\tconst el_field_travel_booking = $( '.field-travel-booking' );\n\t\tlet total_person = 0;\n\t\tconst total_adult = parseInt( el_number_ticket.val() );\n\t\ttotal_person += total_adult;\n\n\t\tlet total_child = 0;\n\t\tif ( el_number_children.length ) {\n\t\t\ttotal_child = parseInt( el_number_children.val() );\n\t\t\ttotal_person += total_child;\n\t\t}\n\n\t\t/*** Get price by dates ***/\n\t\tconst isDateRangeFill = el_tour_date_check_in && el_tour_date_check_in.length && el_tour_date_check_out && el_tour_date_check_out.length &&\n\t\t\tel_tour_date_check_in.val() !== '' && el_tour_date_check_out.val() !== '';\n\n\t\tconst hasPriceDateTourOption = $._tour_price_of_dates_option && $._tour_price_of_dates_option.price_dates_range && ! $.isEmptyObject( $._tour_price_of_dates_option.price_dates_range );\n\n\t\tlet date_check_in;\n\t\tlet date_check_out;\n\t\tif ( el_input_date_book.length && el_input_date_book.val() !== '' ) { // is Fixed date\n\t\t\tconst duration = parseFloat( el_tour_duration_number.val() );\n\t\t\tdate_check_in = new Date( $.fn._convert_date_to_format_default( el_input_date_book.val() ) );\n\t\t\tdate_check_out = structuredClone(date_check_in);\n\t\t\tif ( duration > 1 ) {\n\t\t\t\tdate_check_out.setDate( date_check_out.getDate() + duration );\n\t\t\t} else if ( duration === 1 ) {\n\t\t\t\tdate_check_out.setDate( date_check_out.getDate() + 1 );\n\t\t\t}\n\t\t} else if ( isDateRangeFill ) {\n\t\t\tdate_check_in = new Date( $.fn._convert_date_to_format_default( el_tour_date_check_in.val() ) );\n\t\t\tdate_check_out = new Date( $.fn._convert_date_to_format_default( el_tour_date_check_out.val() ) );\n\t\t}\n\n\t\tif ( ! date_check_in || ! date_check_out ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet date_next = structuredClone(date_check_in);\n\t\tconst price_dates_tour_tmp = {};\n\n\t\t// Get total days\n\t\tconst total_night = $.fn._calculate_total_night( date_check_in, date_check_out );\n\t\t// let total_days = $.fn._calculate_total_days(date_check_in, date_check_out);\n\t\tconst el_number_day = $( '.number-day' );\n\t\tel_number_day.text( total_night );\n\n\t\twhile ( date_next < date_check_out ) {\n\t\t\tif ( hasPriceDateTourOption ) {\n\t\t\t\tconst dateExistsOption = [];\n\t\t\t\t$.each( $._tour_price_of_dates_option.price_dates_range, function( k_price_dates_range, price_dates_range ) {\n\t\t\t\t\tconst startDate = new Date( price_dates_range.start_date );\n\t\t\t\t\tconst endDate = new Date( price_dates_range.end_date );\n\n\t\t\t\t\tif ( date_next >= startDate && date_next <= endDate ) {\n\t\t\t\t\t\tdateExistsOption.push( date_next );\n\t\t\t\t\t\t$.each( price_dates_range.prices, function( k_price, v_price ) {\n\t\t\t\t\t\t\tif ( price_dates_tour[ k_price ] ) {\n\t\t\t\t\t\t\t\tif ( k_price === 'regular_price_dates' || k_price === 'child_price_dates' ) {\n\t\t\t\t\t\t\t\t\tlet price_attr = parseFloat( v_price.price );\n\n\t\t\t\t\t\t\t\t\tif ( isNaN( price_attr ) || price_attr <= 0 ) {\n\t\t\t\t\t\t\t\t\t\tprice_attr = price_dates_tour[ k_price ];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( ! price_dates_tour_tmp[ k_price ] ) {\n\t\t\t\t\t\t\t\t\t\tprice_dates_tour_tmp[ k_price ] = price_attr;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tprice_dates_tour_tmp[ k_price ] += price_attr;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// Variations\n\t\t\t\t\t\t\t\t\t$.each( v_price, function( k_variation, variation_attr ) {\n\t\t\t\t\t\t\t\t\t\tif ( price_dates_tour[ k_price ][ k_variation ] ) {\n\t\t\t\t\t\t\t\t\t\t\tlet price_attr = parseFloat( variation_attr.price );\n\n\t\t\t\t\t\t\t\t\t\t\tif ( isNaN( price_attr ) || price_attr <= 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tprice_attr = price_dates_tour[ k_price ][ k_variation ];\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif ( ! price_dates_tour_tmp[ k_price ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\tprice_dates_tour_tmp[ k_price ] = {};\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif ( ! price_dates_tour_tmp[ k_price ][ k_variation ] ) {\n\t\t\t\t\t\t\t\t\t\t\t\tprice_dates_tour_tmp[ k_price ][ k_variation ] = price_attr;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tprice_dates_tour_tmp[ k_price ][ k_variation ] += price_attr;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\t// get price regular\n\t\t\t\tif ( dateExistsOption.indexOf( date_next ) === -1 ) {\n\t\t\t\t\t$.fn.getPriceDatesDefaultByDateRange( price_dates_tour_tmp, price_dates_tour );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// get price regular\n\t\t\t\t$.fn.getPriceDatesDefaultByDateRange( price_dates_tour_tmp, price_dates_tour );\n\t\t\t}\n\n\t\t\tdate_next.setDate( date_next.getDate() + 1 );\n\t\t}\n\n\t\t// console.log(price_dates_tour_tmp);\n\n\t\t/*** Set total price days ***/\n\t\tprice_dates_tour.regular_price_dates = price_dates_tour_tmp.regular_price_dates;\n\t\tprice_dates_tour.child_price_dates = price_dates_tour_tmp.child_price_dates == undefined ? 0 : price_dates_tour_tmp.child_price_dates;\n\n\t\t// Variations\n\t\t//console.log(price_dates_tour);\n\t\t$.each( price_dates_tour, function( k_price, v_price ) {\n\t\t\tif ( k_price !== 'regular_price_dates' && k_price !== 'child_price_dates' ) {\n\t\t\t\t$.each( v_price, function( k_attr, v_attr ) {\n\t\t\t\t\tif ( price_dates_tour_tmp[ k_price ] && price_dates_tour_tmp[ k_price ][ k_attr ] ) {\n\t\t\t\t\t\tprice_dates_tour[ k_price ][ k_attr ] = price_dates_tour_tmp[ k_price ][ k_attr ];\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t\t/*** End set total price days ***/\n\n\t\t// console.log(price_dates_tour);\n\n\t\t/*** Get subtotal ***/\n\t\t$.each( price_dates_tour, function( k, v ) {\n\t\t\tif ( k == 'regular_price_dates' ) {\n\t\t\t\tconst totalPriceAdult = price_dates_tour[ k ] * total_adult;\n\t\t\t\tsubtotal += totalPriceAdult;\n\n\t\t\t\tel_show_price_ticket.text( $.fn.tour_price_format( price_dates_tour[ k ] ) );\n\t\t\t} else if ( k == 'child_price_dates' ) {\n\t\t\t\tconst totalPriceChild = price_dates_tour[ k ] * total_child;\n\t\t\t\tsubtotal += totalPriceChild;\n\n\t\t\t\tel_show_price_children.text( $.fn.tour_price_format( price_dates_tour[ k ] ) );\n\t\t\t} else {\n\t\t\t\t$.each( v, function( k_variation, k_attr ) {\n\t\t\t\t\tvar price_variation = price_dates_tour[ k ][ k_variation ];\n\n\t\t\t\t\tswitch ( tour_variation_options[ k ].type_variation ) {\n\t\t\t\t\tcase 'quantity':\n\t\t\t\t\t\tvar qtyVariation = parseInt( $( 'input[name=' + k_variation + ']' ).val() );\n\t\t\t\t\t\tvar totalPriceVariation = price_variation * qtyVariation;\n\t\t\t\t\t\tsubtotal += totalPriceVariation;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'checkbox':\n\t\t\t\t\t\tvar elVariation = $( 'input[name=' + k_variation + ']' );\n\n\t\t\t\t\t\tif ( elVariation.is( ':checked' ) ) {\n\t\t\t\t\t\t\tsubtotal += price_variation;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\tvar elVariation = $( 'input[name=' + k + ']:checked' );\n\n\t\t\t\t\t\tif ( elVariation.val() == k_variation ) {\n\t\t\t\t\t\t\tvar price_variation = price_dates_tour[ k ][ k_variation ];\n\n\t\t\t\t\t\t\tsubtotal += price_variation;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'select':\n\t\t\t\t\t\tvar k_attr_selected = $( 'select[name=' + k + ']' ).val();\n\n\t\t\t\t\t\tif ( k_attr_selected == k_variation && price_dates_tour[ k ][ k_attr_selected ] ) {\n\t\t\t\t\t\t\tsubtotal += price_variation;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t$( '.price_' + k_variation ).text( $.fn.tour_price_format( price_variation ) );\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t// Group discount\n\t\tif ( tour_group_discount_data ) {\n\t\t\tconst el_show_val_discount = el_label_tour_group_discount.find( '.val-discount' );\n\t\t\tconst el_currency_group_discount = el_label_tour_group_discount.find( '.woocommerce-Price-currencySymbol' );\n\t\t\tconst el_show_total_people = el_label_tour_group_discount.find( '.total-people' );\n\n\t\t\ttry {\n\t\t\t\tlet customer_number_match = 0;\n\t\t\t\tlet discount_val = 0;\n\n\t\t\t\t$.each( tour_group_discount_data, function( k, v ) {\n\t\t\t\t\tconst number_customer = parseInt( v.number_customer );\n\n\t\t\t\t\tif ( number_customer <= total_person && customer_number_match < number_customer ) {\n\t\t\t\t\t\tcustomer_number_match = number_customer;\n\t\t\t\t\t\tdiscount_val = v.discount;\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tif ( customer_number_match !== 0 ) {\n\t\t\t\t\tconst patter = /\\%$/;\n\n\t\t\t\t\tel_show_val_discount.text( discount_val );\n\t\t\t\t\tel_show_total_people.text( total_person );\n\t\t\t\t\tel_label_tour_group_discount.show();\n\n\t\t\t\t\tif ( patter.test( discount_val ) ) {\n\t\t\t\t\t\tel_currency_group_discount.hide();\n\t\t\t\t\t\tdiscount_val = parseFloat( discount_val );\n\n\t\t\t\t\t\tsubtotal = subtotal - ( subtotal * discount_val / 100 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiscount_val = parseFloat( discount_val );\n\t\t\t\t\t\tel_show_val_discount.text( discount_val.toFixed( num_decimals ) );\n\t\t\t\t\t\tel_currency_group_discount.show();\n\t\t\t\t\t\tsubtotal = subtotal - discount_val;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tel_label_tour_group_discount.hide();\n\t\t\t\t}\n\t\t\t} catch ( e ) {\n\t\t\t\tconsole.error( e );\n\t\t\t}\n\t\t}\n\n\t\tel_show_total_price.text( $.fn.tour_price_format( subtotal ) );\n\t};\n\n\t$.fn.getPriceDatesDefaultByDateRange = function( price_dates_tour_tmp, price_dates_tour ) {\n\t\tif ( ! price_dates_tour_tmp.regular_price_dates ) {\n\t\t\tprice_dates_tour_tmp.regular_price_dates = price_dates_tour.regular_price_dates;\n\t\t} else {\n\t\t\tprice_dates_tour_tmp.regular_price_dates += price_dates_tour.regular_price_dates;\n\t\t}\n\n\t\tif ( ! price_dates_tour_tmp.child_price_dates ) {\n\t\t\tprice_dates_tour_tmp.child_price_dates = price_dates_tour.child_price_dates;\n\t\t} else {\n\t\t\tprice_dates_tour_tmp.child_price_dates += price_dates_tour.child_price_dates;\n\t\t}\n\n\t\t// Variation\n\t\t$.each( price_dates_tour, function( k_price, v_price ) {\n\t\t\tif ( k_price != 'regular_price_dates' && k_price != 'child_price_dates' ) {\n\t\t\t\t$.each( v_price, function( k_attr, v_attr ) {\n\t\t\t\t\tif ( ! price_dates_tour_tmp[ k_price ] ) {\n\t\t\t\t\t\tprice_dates_tour_tmp[ k_price ] = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! price_dates_tour_tmp[ k_price ][ k_attr ] ) {\n\t\t\t\t\t\tprice_dates_tour_tmp[ k_price ][ k_attr ] = price_dates_tour[ k_price ][ k_attr ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprice_dates_tour_tmp[ k_price ][ k_attr ] += price_dates_tour[ k_price ][ k_attr ];\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t};\n\n\t$.fn.tour_booking_submit = function() {\n\t\t$( '.btn-booking' ).on( 'click', function( e ) {\n\t\t\te.preventDefault();\n\t\t\tconst el_btn_booking = $( this );\n\t\t\tlet flag_errors = false;\n\t\t\tconst input_first_name = $( 'input[name=first_name]' );\n\t\t\tconst input_last_name = $( 'input[name=last_name]' );\n\t\t\tconst input_email = $( 'input[name=email_tour]' );\n\t\t\tconst input_phone = $( 'input[name=phone]' );\n\t\t\tconst input_qty = $( 'input[name=number_ticket]' );\n\t\t\tconst qty_tour = parseInt( input_qty.val() );\n\t\t\tconst tb_phys_ajax_url = $( 'input[name=url_home]' ).val();\n\t\t\tconst el_deposit_radio = $( 'input[name=deposit_radio]' );\n\t\t\tconst max_qty_per = parseInt( input_qty.attr( 'max' ) );\n\t\t\tconst el_tour_variation_item = $( '.tour-variation-item' );\n\t\t\t// let el_tour_variations_options = $('input[name=tour_variations_options]');\n\n\t\t\tif ( input_first_name.length > 0 ) {\n\t\t\t\tif ( input_first_name.val().length == 0 ) {\n\t\t\t\t\tinput_first_name.attr( 'placeholder', travel_booking.message_er_first_name );\n\t\t\t\t\tinput_first_name.addClass( 'error' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( input_last_name.length > 0 ) {\n\t\t\t\tif ( input_last_name.val().length == 0 ) {\n\t\t\t\t\tinput_last_name.attr( 'placeholder', travel_booking.message_er_last_name );\n\t\t\t\t\tinput_last_name.addClass( 'error' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( input_email.length > 0 ) {\n\t\t\t\tif ( ! checkValidateEmail( input_email.val() ) ) {\n\t\t\t\t\tinput_email.attr( 'placeholder', travel_booking.message_er_email );\n\t\t\t\t\tinput_email.addClass( 'error' );\n\t\t\t\t\tinput_email.val( '' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( input_phone.length > 0 ) {\n\t\t\t\tif ( input_phone.val().length == 0 ) {\n\t\t\t\t\tinput_phone.attr( 'placeholder', travel_booking.message_er_phone );\n\t\t\t\t\tinput_phone.addClass( 'error' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( el_input_date_book.length > 0 ) {\n\t\t\t\tif ( el_input_date_book.val().length == 0 ) {\n\t\t\t\t\tel_input_date_book.attr( 'placeholder', travel_booking.message_er_date );\n\t\t\t\t\tel_input_date_book.addClass( 'error' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( isNaN( qty_tour ) || qty_tour <= 0 ) {\n\t\t\t\tinput_qty.val( 1 );\n\t\t\t} else if ( qty_tour > max_qty_per ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction checkValidateEmail( email ) {\n\t\t\t\tconst regex = /^([a-zA-Z0-9_.+-])+\\@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n\t\t\t\treturn regex.test( email );\n\t\t\t}\n\n\t\t\t// run ajax add to cart\n\t\t\tif ( ! el_btn_booking.hasClass( 'disable' ) ) {\n\t\t\t\tconst data = {\n\t\t\t\t\tnonce: $( 'input[name=nonce]' ).val(),\n\t\t\t\t\ttour_id: $( 'input[name=tour_id]' ).val(),\n\t\t\t\t\tdate_booking: el_input_date_book.val(),\n\t\t\t\t};\n\n\t\t\t\tdata.number_ticket = input_qty.val();\n\n\t\t\t\t/*** Children ***/\n\t\t\t\tif ( el_number_children.length > 0 ) {\n\t\t\t\t\tlet number_children = el_number_children.val();\n\n\t\t\t\t\tif ( isNaN( number_children ) || parseFloat( number_children ) < 0 ) {\n\t\t\t\t\t\tnumber_children = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tdata.number_children = number_children;\n\t\t\t\t}\n\n\t\t\t\t/*** Variation ***/\n\t\t\t\tif ( el_tour_variations_options.length > 0 ) {\n\t\t\t\t\tdata.tour_variations = {};\n\n\t\t\t\t\t$.each( el_tour_variation_item, function( i ) {\n\t\t\t\t\t\tconst el_tour_variation_item = $( this );\n\t\t\t\t\t\tconst variation_id = el_tour_variation_item.data( 'variation-id' );\n\t\t\t\t\t\tconst variation_type = el_tour_variation_item.data( 'type_variation' );\n\t\t\t\t\t\tconst variation_required = parseInt( el_tour_variation_item.data( 'required' ) );\n\t\t\t\t\t\tconst el_variation_attr_field = el_tour_variation_item.find( '.field-travel-booking' );\n\t\t\t\t\t\tconst total_el_variation_attr_field = el_variation_attr_field.length;\n\t\t\t\t\t\tlet variation_attr_id = 0;\n\n\t\t\t\t\t\tif ( variation_type === 'quantity' && ! flag_errors ) {\n\t\t\t\t\t\t\tlet flag_error_variation_quantity = true;\n\n\t\t\t\t\t\t\t$.each( el_variation_attr_field, function( i ) {\n\t\t\t\t\t\t\t\tconst el_variation_attr_field = $( this );\n\t\t\t\t\t\t\t\tvariation_attr_id = parseInt( el_variation_attr_field.attr( 'name' ) );\n\n\t\t\t\t\t\t\t\tif ( parseFloat( el_variation_attr_field.val() ) > 0 ) {\n\t\t\t\t\t\t\t\t\tif ( data.tour_variations[ variation_id ] === undefined ) {\n\t\t\t\t\t\t\t\t\t\tdata.tour_variations[ variation_id ] = {};\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdata.tour_variations[ variation_id ][ variation_attr_id ] = {};\n\t\t\t\t\t\t\t\t\tdata.tour_variations[ variation_id ][ variation_attr_id ].quantity = el_variation_attr_field.val();\n\n\t\t\t\t\t\t\t\t\tflag_error_variation_quantity = false;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ( variation_required ) {\n\t\t\t\t\t\t\t\t\tif ( flag_error_variation_quantity && i === total_el_variation_attr_field - 1 ) {\n\t\t\t\t\t\t\t\t\t\tflag_errors = true;\n\t\t\t\t\t\t\t\t\t\tel_tour_variation_item.addClass( 'errors' );\n\t\t\t\t\t\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\t\t\t\t\t\tel_tour_variation_item.removeClass( 'errors' );\n\t\t\t\t\t\t\t\t\t\t}, 2000 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} else if ( variation_type === 'select' && ! flag_errors ) {\n\t\t\t\t\t\t\tconst el_variation_attr_field = el_tour_variation_item.find( '.field-travel-booking' );\n\t\t\t\t\t\t\tvariation_attr_id = parseInt( el_variation_attr_field.val() );\n\n\t\t\t\t\t\t\tif ( variation_attr_id > 0 ) {\n\t\t\t\t\t\t\t\tif ( data.tour_variations[ variation_id ] === undefined ) {\n\t\t\t\t\t\t\t\t\tdata.tour_variations[ variation_id ] = {};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdata.tour_variations[ variation_id ][ variation_attr_id ] = {};\n\t\t\t\t\t\t\t} else if ( variation_required ) {\n\t\t\t\t\t\t\t\tflag_errors = true;\n\t\t\t\t\t\t\t\tel_variation_attr_field.addClass( 'errors' );\n\t\t\t\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\t\t\t\tel_variation_attr_field.removeClass( 'errors' );\n\t\t\t\t\t\t\t\t}, 2000 );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if ( variation_type === 'checkbox' && ! flag_errors ) {\n\t\t\t\t\t\t\tlet flag_errors_variation_checkbox = true;\n\n\t\t\t\t\t\t\t$.each( el_variation_attr_field, function( i ) {\n\t\t\t\t\t\t\t\tconst el_variation_attr_field = $( this );\n\t\t\t\t\t\t\t\tif ( el_variation_attr_field.is( ':checked' ) ) {\n\t\t\t\t\t\t\t\t\tif ( data.tour_variations[ variation_id ] === undefined ) {\n\t\t\t\t\t\t\t\t\t\tdata.tour_variations[ variation_id ] = {};\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvariation_attr_id = parseInt( el_variation_attr_field.val() );\n\n\t\t\t\t\t\t\t\t\tdata.tour_variations[ variation_id ][ variation_attr_id ] = {};\n\n\t\t\t\t\t\t\t\t\tflag_errors_variation_checkbox = false;\n\t\t\t\t\t\t\t\t\tflag_errors = false;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ( variation_required ) {\n\t\t\t\t\t\t\t\t\tif ( flag_errors_variation_checkbox && i === total_el_variation_attr_field - 1 ) {\n\t\t\t\t\t\t\t\t\t\tflag_errors = true;\n\t\t\t\t\t\t\t\t\t\tel_tour_variation_item.addClass( 'errors' );\n\t\t\t\t\t\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\t\t\t\t\t\tel_tour_variation_item.removeClass( 'errors' );\n\t\t\t\t\t\t\t\t\t\t}, 2000 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} else if ( variation_type === 'radio' && ! flag_errors ) {\n\t\t\t\t\t\t\tlet flag_errors_variation_radio = true;\n\n\t\t\t\t\t\t\t$.each( el_variation_attr_field, function( i ) {\n\t\t\t\t\t\t\t\tconst el_variation_attr_field = $( this );\n\n\t\t\t\t\t\t\t\tif ( el_variation_attr_field.is( ':checked' ) ) {\n\t\t\t\t\t\t\t\t\tif ( data.tour_variations[ variation_id ] === undefined ) {\n\t\t\t\t\t\t\t\t\t\tdata.tour_variations[ variation_id ] = {};\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvariation_attr_id = parseInt( el_variation_attr_field.val() );\n\t\t\t\t\t\t\t\t\tdata.tour_variations[ variation_id ][ variation_attr_id ] = {};\n\n\t\t\t\t\t\t\t\t\tflag_errors_variation_radio = false;\n\t\t\t\t\t\t\t\t\tflag_errors = false;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ( variation_required ) {\n\t\t\t\t\t\t\t\t\tif ( flag_errors_variation_radio && i === total_el_variation_attr_field - 1 ) {\n\t\t\t\t\t\t\t\t\t\tflag_errors = true;\n\t\t\t\t\t\t\t\t\t\tel_tour_variation_item.addClass( 'errors' );\n\t\t\t\t\t\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\t\t\t\t\t\tel_tour_variation_item.removeClass( 'errors' );\n\t\t\t\t\t\t\t\t\t\t}, 2000 );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\t//console.log( data.tour_variations );\n\n\t\t\t\t\tdata.tour_variations = JSON.stringify( ( data.tour_variations ) );\n\t\t\t\t}\n\n\t\t\t\t/*** Price dates ***/\n\t\t\t\tif ( el_tour_date_checkin_checkout.length > 0 ) {\n\t\t\t\t\tif ( el_tour_date_check_in.length > 0 && el_tour_date_check_out.length > 0 ) {\n\t\t\t\t\t\tif ( el_tour_date_check_in.val() === '' ) {\n\t\t\t\t\t\t\tel_tour_date_check_in.attr( 'placeholder', travel_booking.message_er_date_checkin );\n\t\t\t\t\t\t\tel_tour_date_check_in.addClass( 'error' );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( el_tour_date_check_out.val() === '' ) {\n\t\t\t\t\t\t\tel_tour_date_check_out.attr( 'placeholder', travel_booking.message_er_date_checkout );\n\t\t\t\t\t\t\tel_tour_date_check_out.addClass( 'error' );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdata.date_check_in = el_tour_date_check_in.val();\n\t\t\t\t\t\tdata.date_check_out = el_tour_date_check_out.val();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/*** Deposit ***/\n\t\t\t\tif ( el_tour_deposit.length > 0 ) {\n\t\t\t\t\t$.each( el_tour_deposit, function( i ) {\n\t\t\t\t\t\tif ( $( this ).is( ':checked' ) ) {\n\t\t\t\t\t\t\tdata.webtomizer_tour_deposit = $( this ).val();\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// console.log(data);\n\t\t\t\t// return;\n\t\t\t\tconst custom_form_fields = el_tourBookingForm.find( '.form-field.custom-field *' );\n\n\t\t\t\tcustom_form_fields.each(function() {\n\t\t\t\t\tdata[$( this ).attr('name')] = $( this ).val();\n\t\t\t\t});\n\n\t\t\t\tif ( ! flag_errors ) {\n\t\t\t\t\t$( '.spinner' ).show();\n\t\t\t\t\tel_btn_booking.addClass( 'disable' );\n\t\t\t\t\t$.ajax( {\n\t\t\t\t\t\turl: tb_phys_ajax_url + '?tb-ajax=add_tour_to_cart_phys',\n\t\t\t\t\t\ttype: 'post',\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\tsuccess( result ) {\n\t\t\t\t\t\t\tif ( result.status === 'success' ) {\n\t\t\t\t\t\t\t\tconst user_info = {\n\t\t\t\t\t\t\t\t\tfirst_name: input_first_name.val(),\n\t\t\t\t\t\t\t\t\tlast_name: input_last_name.val(),\n\t\t\t\t\t\t\t\t\temail: input_email.val(),\n\t\t\t\t\t\t\t\t\tphone: input_phone.val(),\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\tdocument.cookie = 'info_user=' + JSON.stringify( user_info ) + '; path=/';\n\t\t\t\t\t\t\t\twindow.location = $( 'input[name=checkout_url]' ).val();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\talert( result.message );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, error( result ) {\n\t\t\t\t\t\t\tconsole.error( result );\n\t\t\t\t\t\t},\n\t\t\t\t\t} ).done( function() {\n\t\t\t\t\t\t$( '.spinner' ).hide();\n\t\t\t\t\t\tel_btn_booking.removeClass( 'disable' );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t};\n\n\t$.fn.tour_orderby = function() {\n\t\t$( '.tour-ordering' ).find( '.orderby' ).on( 'change', function() {\n\t\t\t$( '.tour-ordering' ).submit();\n\t\t} );\n\t};\n\n\t$.fn.load_ajax_notify = function() {\n\t\tload_notify = false;\n\t\tconst limit = $( 'input[name=notify_limit]' ).val();\n\t\tconst tb_phys_ajax_url = $( 'input[name=url_home]' ).val();\n\n\t\t$.ajax( {\n\t\t\turl: tb_phys_ajax_url + '?tb-ajax=notify_new_order',\n\t\t\ttype: 'post',\n\t\t\tdata: 'limit=' + limit,\n\t\t\tdataType: 'json',\n\t\t\tsuccess( result ) {\n\t\t\t\tif ( result.status == 'success' ) {\n\t\t\t\t\t$( '.list-order-tour' ).html( result.html );\n\t\t\t\t\tload_notify = true;\n\t\t\t\t}\n\t\t\t},\n\t\t} );\n\t};\n\n\t$.fn.load_notify_products_of_order = function() {\n\t\tconst notify_available = $( 'input[name=notify_available]' );\n\t\tif ( notify_available.length ) {\n\t\t\tload_notify = true;\n\t\t\tlet refresh = $( 'input[name=notify_refresh]' ).val();\n\t\t\tif ( refresh == '' ) {\n\t\t\t\trefresh = 10000;\n\t\t\t}\n\n\t\t\tsetInterval( function() {\n\t\t\t\tif ( load_notify ) {\n\t\t\t\t\t$.fn.load_ajax_notify();\n\t\t\t\t}\n\t\t\t}, refresh );\n\t\t}\n\t};\n\n\t$.fn._convert_date_to_format_default = function( date_string ) {\n\t\tlet date_convert = '';\n\t\tlet date = '';\n\t\tlet month = '';\n\t\tlet year = '';\n\t\tconst separator_date = '/';\n\n\t\tif ( $._tour_date_format === 'yy/mm/dd' ) {\n\t\t\tconst date_arr = date_string.split( '/' );\n\t\t\tdate = date_arr[ 2 ];\n\t\t\tmonth = date_arr[ 1 ];\n\t\t\tyear = date_arr[ 0 ];\n\t\t} else if ( $._tour_date_format === 'yy-mm-dd' ) {\n\t\t\tconst date_arr = date_string.split( '-' );\n\t\t\tdate = date_arr[ 2 ];\n\t\t\tmonth = date_arr[ 1 ];\n\t\t\tyear = date_arr[ 0 ];\n\t\t} else if ( $._tour_date_format === 'dd/mm/yy' ) {\n\t\t\tconst date_arr = date_string.split( '/' );\n\t\t\tdate = date_arr[ 0 ];\n\t\t\tmonth = date_arr[ 1 ];\n\t\t\tyear = date_arr[ 2 ];\n\t\t} else if ( $._tour_date_format === 'dd-mm-yy' ) {\n\t\t\tconst date_arr = date_string.split( '-' );\n\t\t\tdate = date_arr[ 0 ];\n\t\t\tmonth = date_arr[ 1 ];\n\t\t\tyear = date_arr[ 2 ];\n\t\t} else if ( $._tour_date_format === 'mm/dd/yy' ) {\n\t\t\tconst date_arr = date_string.split( '/' );\n\t\t\tdate = date_arr[ 1 ];\n\t\t\tmonth = date_arr[ 0 ];\n\t\t\tyear = date_arr[ 2 ];\n\t\t} else if ( $._tour_date_format === 'mm-dd-yy' ) {\n\t\t\tconst date_arr = date_string.split( '-' );\n\t\t\tdate = date_arr[ 1 ];\n\t\t\tmonth = date_arr[ 0 ];\n\t\t\tyear = date_arr[ 2 ];\n\t\t} else if ( $._tour_date_format === 'DD, d MM, yy' ) {\n\t\t\tconst date_arr = date_string.split( ',' );\n\t\t\tconst date_month_arr = date_arr[ 1 ].trim().split( ' ' );\n\t\t\tdate = date_month_arr[ 0 ];\n\t\t\tmonth = tour_month.indexOf( date_month_arr[ 1 ] ) + 1;\n\n\t\t\tif ( parseInt( month ) < 10 ) {\n\t\t\t\tmonth = '0' + month;\n\t\t\t}\n\n\t\t\tyear = date_arr[ 2 ];\n\t\t}\n\n\t\tdate_convert += year + separator_date + month + separator_date + date;\n\n\t\t// console.log(date_convert);\n\n\t\treturn date_convert;\n\t};\n\n\t$.fn._convert_date_obj_by_format_default = function( date_obj ) {\n\t\tlet date_convert = '';\n\t\tconst year = date_obj.getFullYear();\n\t\tconst month = ( '0' + ( date_obj.getMonth() + 1 ) ).slice( -2 );\n\t\tconst date = ( '0' + date_obj.getDate() ).slice( -2 );\n\n\t\tdate_convert += year + '/' + month + '/' + date;\n\n\t\treturn date_convert;\n\t};\n\n\t$.fn._calculate_total_days = function( start_date, end_date ) {\n\t\tconst start_date_obj = new Date( start_date );\n\t\tconst end_date_obj = new Date( end_date );\n\t\tconst date_next = start_date_obj;\n\t\tlet total_day = 0;\n\n\t\twhile ( date_next <= end_date_obj ) {\n\t\t\tdate_next.setDate( date_next.getDate() + 1 );\n\t\t\ttotal_day += 1;\n\t\t}\n\n\t\treturn total_day;\n\t};\n\n\t/**\n\t * Total night\n\t *\n\t * @param string start_date\n\t * @param start_date_obj\n\t * @param end_date_obj\n\t * @return {number}\n\t */\n\t$.fn._calculate_total_night = function( start_date_obj, end_date_obj ) {\n\t\tconst date_next = new Date( start_date_obj.getTime() );\n\t\tlet total_day = 0;\n\n\t\twhile ( date_next < end_date_obj ) {\n\t\t\tdate_next.setDate( date_next.getDate() + 1 );\n\t\t\ttotal_day += 1;\n\t\t}\n\n\t\treturn total_day;\n\t};\n\n\t$.fn._show_range_dates_choose = function() {\n\t\tconst tour_date_check_in = el_tour_date_check_in.val();\n\t\tconst tour_date_check_out = el_tour_date_check_out.val();\n\n\t\tif ( tour_date_check_in != '' && tour_date_check_out != '' ) {\n\t\t\t$._tour_dates_choose = [];\n\t\t\tconst start_date = new Date( $.fn._convert_date_to_format_default( el_tour_date_check_in.val() ) );\n\t\t\tconst end_date = new Date( $.fn._convert_date_to_format_default( el_tour_date_check_out.val() ) );\n\t\t\tconst date_next = start_date;\n\n\t\t\tend_date.setDate( end_date.getDate() + 1 );\n\n\t\t\twhile ( date_next < end_date ) {\n\t\t\t\t// console.log(date_next);\n\t\t\t\tconst date_string_by_format_default = $.fn._convert_date_obj_by_format_default( date_next );\n\t\t\t\t$._tour_dates_choose.push( date_string_by_format_default );\n\t\t\t\tdate_next.setDate( date_next.getDate() + 1 );\n\t\t\t}\n\n\t\t\tconst function_anonymous_beforeShowDay = function( date ) {\n\t\t\t\tdate = $.fn._convert_date_obj_by_format_default( date );\n\t\t\t\t// console.log(date);\n\t\t\t\tconst indexOf = $._tour_dates_choose.indexOf( date );\n\n\t\t\t\t// console.log(indexOf, indexOfDatesDisable)\n\t\t\t\tif ( $._dates_disable !== null ) {\n\t\t\t\t\tconst indexOfDatesDisable = $._dates_disable.indexOf( date );\n\n\t\t\t\t\tif ( indexOf > -1 ) {\n\t\t\t\t\t\tif ( indexOfDatesDisable > -1 ) {\n\t\t\t\t\t\t\tif ( date == start_date ) {\n\t\t\t\t\t\t\t\treturn [ false, 'date-picked start-date', '' ];\n\t\t\t\t\t\t\t} else if ( date == end_date ) {\n\t\t\t\t\t\t\t\treturn [ false, 'date-picked end-date', '' ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn [ false, 'date-picked', '' ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( date == start_date ) {\n\t\t\t\t\t\t\treturn [ true, 'date-picked start-date', 'Available' ];\n\t\t\t\t\t\t} else if ( date == end_date ) {\n\t\t\t\t\t\t\treturn [ true, 'date-picked end-date', 'Available' ];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ true, 'date-picked', 'Available' ];\n\t\t\t\t\t}\n\t\t\t\t\tif ( indexOfDatesDisable > -1 ) {\n\t\t\t\t\t\treturn [ false, '', '' ];\n\t\t\t\t\t}\n\t\t\t\t\treturn [ true, '', 'Available' ];\n\t\t\t\t}\n\t\t\t\tif ( indexOf > -1 ) {\n\t\t\t\t\tif ( date == start_date ) {\n\t\t\t\t\t\treturn [ true, 'date-picked start-date', '' ];\n\t\t\t\t\t} else if ( date == end_date ) {\n\t\t\t\t\t\treturn [ true, 'date-picked end-date', '' ];\n\t\t\t\t\t}\n\t\t\t\t\treturn [ true, 'date-picked', '' ];\n\t\t\t\t}\n\t\t\t\treturn [ true, '', '' ];\n\t\t\t};\n\n\t\t\tconst function_anonymous_beforeShowDay_x = function( date ) {\n\t\t\t\tdate = $.fn._convert_date_obj_by_format_default( date );\n\t\t\t\t// console.log(date);\n\t\t\t\tconst indexOf = $._tour_dates_choose.indexOf( date );\n\n\t\t\t\t// console.log(indexOf, indexOfDatesDisable)\n\n\t\t\t\tif ( indexOf > -1 ) {\n\t\t\t\t\tif ( date == start_date ) {\n\t\t\t\t\t\treturn [ true, 'date-picked start-date', '' ];\n\t\t\t\t\t} else if ( date == end_date ) {\n\t\t\t\t\t\treturn [ true, 'date-picked end-date', '' ];\n\t\t\t\t\t}\n\t\t\t\t\treturn [ true, 'date-picked', '' ];\n\t\t\t\t}\n\t\t\t\treturn [ true, '', '' ];\n\t\t\t};\n\n\t\t\tif ( jQuery().datepicker ) {\n\t\t\t\tel_tour_date_check_in.datepicker( 'option', 'beforeShowDay', function_anonymous_beforeShowDay );\n\n\t\t\t\tel_tour_date_check_out.datepicker( 'option', 'beforeShowDay', function_anonymous_beforeShowDay_x );\n\t\t\t}\n\t\t}\n\n\t\t//console.log(start_date, end_date);\n\t};\n\n\t$.fn.filter_tour_price_widget = function() {\n\t\tconst el_tour_price_range = document.getElementById( 'tour-price-range' );\n\n\t\tif ( el_tour_price_range ) {\n\t\t\tconst el_tour_min_price_show = $( '.tour-min-price' );\n\t\t\tconst el_tour_max_price_show = $( '.tour-max-price' );\n\t\t\tconst tour_start_price_filter = parseFloat( $( 'input[name=tour_start_price_fitler]' ).val() );\n\t\t\tconst tour_end_price_filter = parseFloat( $( 'input[name=tour_end_price_filter]' ).val() );\n\t\t\tconst el_tour_max_price = $( 'input[name=tour_max_price]' );\n\t\t\tconst el_tour_min_price = $( 'input[name=tour_min_price]' );\n\t\t\tconst min_price = parseFloat( el_tour_min_price.val() );\n\t\t\tconst max_price = parseFloat( el_tour_max_price.val() );\n\n\t\t\t// console.log(min_price, max_price);\n\t\t\tif ( min_price < max_price ) {\n\t\t\t\tif ( ! el_tour_price_range.noUiSlider ) {\n\t\t\t\t\twindow.noUiSlider.create(el_tour_price_range, {\n\t\t\t\t\t\tstart: [min_price, max_price],\n\t\t\t\t\t\tconnect: true,\n\t\t\t\t\t\trange: {\n\t\t\t\t\t\t\tmin: tour_start_price_filter,\n\t\t\t\t\t\t\tmax: tour_end_price_filter,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tel_tour_price_range.noUiSlider.on( 'update', function( values ) {\n\t\t\t\t\t// console.log(values);\n\t\t\t\t\tconst min_price = values[ 0 ];\n\t\t\t\t\tconst max_price = values[ 1 ];\n\n\t\t\t\t\tel_tour_min_price.val( min_price );\n\t\t\t\t\tel_tour_max_price.val( max_price );\n\t\t\t\t\tel_tour_min_price_show.text( min_price );\n\t\t\t\t\tel_tour_max_price_show.text( max_price );\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t};\n\t$.fn.tour_price_format = function (val) { \n\t\tval = val.toFixed(num_decimals);\n\t\tconst parts = val.split('.');\n\t\tif (travel_booking.thousand_separator) {\n\t\t\tparts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, travel_booking.thousand_separator);\n\t\t}\n\t\treturn parts.join(travel_booking.decimal_separator || '.');\n\t};\n\n\tfunction getCookie( cname ) {\n\t\tconst name = cname + '=';\n\t\tconst decodedCookie = decodeURIComponent( document.cookie );\n\t\tconst ca = decodedCookie.split( ';' );\n\t\tfor ( let i = 0; i < ca.length; i++ ) {\n\t\t\tlet c = ca[ i ];\n\t\t\twhile ( c.charAt( 0 ) == ' ' ) {\n\t\t\t\tc = c.substring( 1 );\n\t\t\t}\n\t\t\tif ( c.indexOf( name ) == 0 ) {\n\t\t\t\treturn c.substring( name.length, c.length );\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t}\n}( jQuery, 'tour-booking-phys' ) );\n\njQuery( function( $ ) {\n\t'use strict';\n\t$.fn.tour_booking_init();\n\t$.fn.tour_booking_submit();\n\t// $.fn.tour_orderby();\n\t$.fn.load_notify_products_of_order();\n\t$.fn.filter_tour_price_widget();\n\n\tif ( $( '#tour_rating' ).length ) {\n\t\t$( '#tour_rating' ).barrating( {\n\t\t\ttheme: 'css-stars',\n\t\t} );\n\t}\n} );\n"],"names":["$","date_validate","date_can_book","tour_month","tour_days","date_book","load_notify","el_tourBookingForm","el_tour_date_checkin_checkout","el_tour_datepicker_range_checkin_checkout","el_input_tour_datepicker_range_checkin_checkout","el_number_ticket","el_price_ticket","el_show_price_ticket","el_number_children","el_price_children","el_show_price_children","el_field_travel_booking","el_input_date_book","tour_have_children_ticket","el_tour_date_starts_after","el_tour_duration_number","el_tour_group_discount_data_phys","tour_group_discount_data","el_label_tour_group_discount","el_tour_deposit","el_tour_variations_options","tour_variation_options","info_user","el_show_total_price","price_dates_tour","num_decimals","fn","tour_booking_init","getCookie","JSON","parse","length","_get_elms_tour_booking_form","tour_booking","val","first_name","last_name","email","phone","find","el_tour_month","split","_dates_disable","_max_year","_date_format_default","_date_format_default_datepicker_range","_tour_date_format","_date_format_convert_php_js","_tour_date_check_in_old","phys_tour_price_dates_type","el_tour_date_check_in","el_tour_date_check_out","_tour_price_of_dates_option","tour_date_starts_after","date_now","Date","date_min_can_book","el_phys_tour_dates_disable","el_phys_tour_max_year_enable","el_phys_tour_price_of_dates_option","e","update_tour_total_price","travel_booking","tour_date_format","undefined","parseInt","dateMinCanBookStr","_convert_date_obj_by_format_default","indexOf","setDate","getDate","option_date_picker","dateFormat","minDate","yearRange","getFullYear","beforeShowDay","date","jQuery","datepicker","duration","function_anonymous_beforeShowDays","_tour_dates_choose","date_start_obj","_convert_date_to_format_default","date_next","start_date","end_date_obj","end_date","date_string_by_format_default","push","indexOfDatesDisable","_show_range_dates_choose","option_datepicker_range","opens","drops","locale","format","daterangepicker","start","end","on","i","get_price_tours_default","regular_price_dates","parseFloat","child_price_dates","each","k_variation","variation","set_price","enable","variation_attr","k_attr","attribute","price","subtotal","total_person","total_adult","total_child","isDateRangeFill","hasPriceDateTourOption","price_dates_range","isEmptyObject","date_check_in","date_check_out","structuredClone","price_dates_tour_tmp","total_night","_calculate_total_night","el_number_day","text","dateExistsOption","k_price_dates_range","startDate","endDate","prices","k_price","v_price","price_attr","isNaN","getPriceDatesDefaultByDateRange","v_attr","k","v","totalPriceAdult","tour_price_format","totalPriceChild","price_variation","type_variation","qtyVariation","totalPriceVariation","elVariation","is","k_attr_selected","el_show_val_discount","el_currency_group_discount","el_show_total_people","customer_number_match","discount_val","number_customer","discount","patter","show","test","hide","toFixed","console","error","tour_booking_submit","preventDefault","el_btn_booking","flag_errors","input_first_name","input_last_name","input_email","input_phone","input_qty","qty_tour","tb_phys_ajax_url","el_deposit_radio","max_qty_per","attr","el_tour_variation_item","message_er_first_name","addClass","message_er_last_name","checkValidateEmail","message_er_email","message_er_phone","message_er_date","regex","hasClass","data","nonce","tour_id","date_booking","number_ticket","number_children","tour_variations","variation_id","variation_type","variation_required","el_variation_attr_field","total_el_variation_attr_field","variation_attr_id","flag_error_variation_quantity","quantity","setTimeout","removeClass","flag_errors_variation_checkbox","flag_errors_variation_radio","stringify","message_er_date_checkin","message_er_date_checkout","webtomizer_tour_deposit","custom_form_fields","ajax","url","type","dataType","success","result","status","user_info","document","cookie","window","location","alert","message","done","tour_orderby","submit","load_ajax_notify","limit","html","load_notify_products_of_order","notify_available","refresh","setInterval","date_string","date_convert","month","year","separator_date","date_arr","date_month_arr","trim","date_obj","getMonth","slice","_calculate_total_days","start_date_obj","total_day","getTime","tour_date_check_in","tour_date_check_out","function_anonymous_beforeShowDay","function_anonymous_beforeShowDay_x","filter_tour_price_widget","el_tour_price_range","getElementById","el_tour_min_price_show","el_tour_max_price_show","tour_start_price_filter","tour_end_price_filter","el_tour_max_price","el_tour_min_price","min_price","max_price","noUiSlider","create","connect","range","min","max","values","parts","thousand_separator","replace","join","decimal_separator","cname","name","decodedCookie","decodeURIComponent","ca","c","charAt","substring","barrating","theme"],"sourceRoot":""}