PageSourceSearch

https://www.hdrelay.com/wp-content/cache/minify/5fa69.js?x50602

js hdrelay.com collected 2026-09-26 02:02:12 UTC 320,312 bytes, 1 lines download raw bytes

1(function($){"use strict";var lfb_lastStepID=0,lfb_lastSteps=new Array,lfb_plannedSteps,lfb_gmapMatrixService=!1,lfb_tld_selectionMode=!1,lfb_calendars=new Array,lfb_stripe,lfb_mapStyles=new Array;function touchHandler(t){var a=t.changedTouches[0],e=document.createEvent("MouseEvent");e.initMouseEvent({touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"}[t.type],!0,!0,window,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(e)}function lfb_initMapStyles(){lfb_mapStyles.push({name:"default",styles:[]}),lfb_mapStyles.push({name:"aubergine",styles:[{elementType:"geometry",stylers:[{color:"#1d2c4d"}]},{elementType:"labels.text.fill",stylers:[{color:"#8ec3b9"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a3646"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#64779e"}]},{featureType:"administrative.province",elementType:"geometry.stroke",stylers:[{color:"#4b6878"}]},{featureType:"landscape.man_made",elementType:"geometry.stroke",stylers:[{color:"#334e87"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#023e58"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#283d6a"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#6f9ba5"}]},{featureType:"poi",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#023e58"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#3C7680"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#304a7d"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#2c6675"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#255763"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#b0d5ce"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{color:"#023e58"}]},{featureType:"transit",elementType:"labels.text.fill",stylers:[{color:"#98a5be"}]},{featureType:"transit",elementType:"labels.text.stroke",stylers:[{color:"#1d2c4d"}]},{featureType:"transit.line",elementType:"geometry.fill",stylers:[{color:"#283d6a"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#3a4762"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0e1626"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#4e6d70"}]}]}),lfb_mapStyles.push({name:"retro",styles:[{elementType:"geometry",stylers:[{color:"#ebe3cd"}]},{elementType:"labels.text.fill",stylers:[{color:"#523735"}]},{elementType:"labels.text.stroke",stylers:[{color:"#f5f1e6"}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#c9b2a6"}]},{featureType:"administrative.land_parcel",elementType:"geometry.stroke",stylers:[{color:"#dcd2be"}]},{featureType:"administrative.land_parcel",elementType:"labels.text.fill",stylers:[{color:"#ae9e90"}]},{featureType:"landscape.natural",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#93817c"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#a5b076"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#447530"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#f5f1e6"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#fdfcf8"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#f8c967"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#e9bc62"}]},{featureType:"road.highway.controlled_access",elementType:"geometry",stylers:[{color:"#e98d58"}]},{featureType:"road.highway.controlled_access",elementType:"geometry.stroke",stylers:[{color:"#db8555"}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{color:"#806b63"}]},{featureType:"transit.line",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"transit.line",elementType:"labels.text.fill",stylers:[{color:"#8f7d77"}]},{featureType:"transit.line",elementType:"labels.text.stroke",stylers:[{color:"#ebe3cd"}]},{featureType:"transit.station",elementType:"geometry",stylers:[{color:"#dfd2ae"}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#b9d3c2"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#92998d"}]}]}),lfb_mapStyles.push({name:"night",styles:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#172
163c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}]})}function initComboBox(){$.widget("custom.combobox",{_create:function(){this.wrapper=$("<span>").addClass("custom-combobox lfb_comboboxContainer").insertAfter(this.element),this.element.hide(),this._createAutocomplete(),this._createShowAllButton()},_createAutocomplete:function(){var t=this.element.children(":selected"),a=t.val()?t.text():"";this.input=$("<input>").appendTo(this.wrapper).val(a).attr("title","").addClass("custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left form-control").autocomplete({classes:{"ui-autocomplete":"lfb_dropdownAutocompleteMenu"},delay:0,minLength:0,appendTo:$("#lfb_form"),source:this._source.bind(this),change:function(t,a){$(this).closest(".lfb_itemBloc").find("select").trigger("change")},select:function(t,a){$(this).closest(".lfb_itemBloc").find("select").trigger("change")},open:function(t,a){$(".lfb_dropdownAutocompleteMenu").css({width:$(this).outerWidth()}),$(this).closest(".lfb_itemBloc").find(".fa-solid").addClass("fa-caret-up"),$(this).closest(".lfb_itemBloc").find(".fa-solid").removeClass("fa-caret-down")},close:function(t,a){$(this).closest(".lfb_itemBloc").find(".fa-solid").removeClass("fa-caret-up"),$(this).closest(".lfb_itemBloc").find(".fa-solid").addClass("fa-caret-down")}}),this._on(this.input,{autocompleteselect:function(t,a){a.item.option.selected=!0,this._trigger("select",t,{item:a.item.option})},autocompletechange:"_removeIfInvalid"})},_createShowAllButton:function(){var t=this.input,a=!1;$("<a>").attr("tabIndex",-1).attr("title","Show All Items").appendTo(this.wrapper).append('<i class="fa-solid fa-caret-down"></i>').removeClass("ui-corner-all").addClass("custom-combobox-toggle ui-corner-right lfb_dropdownAutocompleteBtn").on("mousedown",function(){a=t.autocomplete("widget").is(":visible")}).on("click",function(){t.trigger("focus"),a||t.autocomplete("search","")})},_source:function(t,a){var e=new RegExp($.ui.autocomplete.escapeRegex(t.term),"i");a(this.element.children("option").map(function(){var a=$(this).text();if(this.value&&(!t.term||e.test(a)))return{label:a,value:a,option:this}}))},_removeIfInvalid:function(t,a){if(!a.item){var e=this.input.val(),r=e.toLowerCase(),l=!1;this.element.children("option").each(function(){if($(this).text().toLowerCase()===r)return this.selected=l=!0,!1}),l||(this.input.val("").attr("title",e+" didn't match any item"),this.element.val(""),this.input.autocomplete("instance").term="")}},_destroy:function(){this.wrapper.remove(),this.element.show()}}),$("#lfb_form .lfb_combobox").combobox()}function lfb_initDocReady(){$(".lfb_dynamicHide").hide().removeClass("lfb_dynamicHide"),$("#lfb_form").length>0&&(document.location.href.indexOf("lfb_action=preview")>-1&&$("#lfb_form:not(.lfb_fullscreen)").remove(),lfb_removeEmptyLayoutArtifacts(),initFlatUI(),window.Dropzone.autoDiscover=!1,lfb_initForms(),lfb_removeEmptyLayoutArtifacts(),jQuery.each(lfb_forms,function(){lfb_checkItems(this.formID),lfb_initListeners(this.formID)}))}function lfb_initWinReady(){$("#lfb_form").length>0&&(lfb_removeEmptyLayoutArtifacts(),lfb_onResize(),$(window).resize(lfb_onResize),$(window).on("popstate",function(t){null!==t.originalEvent.state&&(t.preventDefault(),lfb_previousStep(lfb_forms[0].formID))})),$(document).on("scroll",function(){$("#lfb_form .lfb_datepicker").trigger("blur")}),$("body,html,#lfb_form").on("scroll",function(){$("#lfb_form .lfb_datepicker").trigger("blur")}),$("#ajax-loading-screen").fadeOut(),$("#ajax-content-wrap >.container-wrap").css({opacity:1,display:"block"}),$("#lfb_form").on("lfb_getForm",function(t,a){return lfb_getForm(a)}),$("#lfb_form").on("lfb_updatePrice",function(t,a){lfb_updatePrice(a)}),$("#lfb_form").on("lfb_order",function(t,a){lfb_order(a)}),$("#lfb_form").on("lfb_nextStep",function(t,a){lfb_nextStep(a)}),$("#lfb_form").on("lfb_checkStepItemsValid",function(t,a,e){return lfb_checkStepItemsValid(a,e)}),$("#lfb_form").on("lfb_changeStep",function(t,a,e){lfb_changeStep(a,e)}),$("#lfb_form").on("lfb_getUrlVariablesByFormID",function(t,a){return lfb_getUrlVariablesByFormID(a)}),$("#lfb_form").on("lfb_itemClick",function(t,a,e,r){lfb_itemClick($(a),e,r)}),$("#lfb_form").on("lfb_getVariableByID",function(t,a,e){return lfb_getVariableByID(lfb_getForm(a),e)}),$("#lfb_form").on("lfb_setVariableByID",function(t,a,e,r){var l=lfb_getVariableByID(lfb_getForm(a),e);l&&(l.value=r)}),$("#lfb_form canvas.img").each(function(){$(this).parent().children("img").css("opacity",0),$(this).parent().children("img").show(),$(this).css({width:$(this).parent().children("img").get(0).width,height:$(this).parent().children("img").get(0).height}),$(this).parent().children("img").hide()}),jQuery.each(lfb_forms,function(){var t=this;if(1==t.useCaptcha&&""!=t.recaptcha3Key&&$(".grecaptcha-badge").length>0&&0==$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #finalSlide .grecaptcha-badge').length){var a=$(".grecaptcha-badge").clone();$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #finalSlide .lfb_genContentSlide').append(a)}})}function lfb_isEmptyLayoutArtifact(t){var a=t.tagName?t.tagName.toLowerCase():"";if("br"==a)return!0;
1if("p"!=a&&"div"!=a)return!1;if("div"==a&&($(t).attr("id")||$.trim($(t).attr("class")||"").length>0))return!1;if($.trim($(t).text()).length>0)return!1;for(var e=0;e<t.childNodes.length;e++){var r=t.childNodes[e];if((3!=r.nodeType||0!=$.trim(r.nodeValue).length)&&(8!=r.nodeType&&(1!=r.nodeType||!r.tagName||"br"!=r.tagName.toLowerCase())))return!1}return!0}function lfb_removeEmptyLayoutArtifacts(){$("#lfb_form.lfb_bootstraped").each(function(){var t=$(this);t.find(".genPrice .progress .progress-bar-price > br").remove(),t.find("> p, > br, #lfb_panel > p, #lfb_panel > br, #lfb_panel > .container-fluid > p, #lfb_panel > .container-fluid > br, #lfb_panel > .container-fluid > .row > p, #lfb_panel > .container-fluid > .row > br, #lfb_panel > .container-fluid > .row > div, #lfb_mainPanel > p, #lfb_mainPanel > br, .lfb_btnNextContainer > br, .lfb_btnNextContainerStripe > br").each(function(){lfb_isEmptyLayoutArtifact(this)&&$(this).remove()})})}function lfb_setSelectedPaymentMethod(t,a,e){if(a){var r=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]');t.selectedPaymentMethod=a,r.attr("data-selectedpaymentmethod",a),r.find(".lfb_paymentSelector .lfb_paymentOption").each(function(){var t=$(this).attr("data-payment")==a;$(this).toggleClass("is-selected",t),$(this).attr("aria-checked",t?"true":"false")}),r.find(".lfb_paymentMethodDetails").each(function(){$(this).attr("data-payment-details")==a?($(this).removeClass("lfb-hidden"),!1===e?$(this).show():$(this).stop(!0,!0).slideDown(180)):!1===e?$(this).hide().addClass("lfb-hidden"):$(this).stop(!0,!0).slideUp(120,function(){$(this).addClass("lfb-hidden")})})}}function lfb_initPaymentSelectors(t){var a=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]'),e=a.find(".lfb_paymentSelector .lfb_paymentOption"),r=t.selectedPaymentMethod||a.attr("data-defaultpaymentmethod")||"";e.filter(".is-selected").length>0?r=e.filter(".is-selected").first().attr("data-payment"):!r&&e.length>0&&(r=e.first().attr("data-payment")),r&&lfb_setSelectedPaymentMethod(t,r,!1),e.off("click.lfbPayment").on("click.lfbPayment",function(){lfb_setSelectedPaymentMethod(t,$(this).attr("data-payment"))})}function lfb_showBankTransferModal(t){var a=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]'),e=a.find("#lfb_bankTransferModal");0!=e.length?(e.find('[data-info="amount"]').html(a.find("#lfb_finalPrice").html()),e.find('[data-action="confirmBankTransfer"]').off("click.lfbBankTransfer").on("click.lfbBankTransfer",function(a){a.preventDefault(),e.modal("hide"),lfb_order(t.formID)}),e.modal("show")):lfb_order(t.formID)}function lfb_processPaymentMethod(t,a){var e=t.formID,r=$('#lfb_form.lfb_bootstraped[data-form="'+e+'"]');if(lfb_setSelectedPaymentMethod(t,a),"paypal"==a)t.stripeToken="",t.useRazorpay=!1,t.useStripePayment=!1,$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_razorPayCt').slideUp(),$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_btnOrderPaypal').trigger("click");else if("razorpay"==a){lfb_checkStepItemsValid("final",e)&&lfb_checkCaptcha(t,function(){setTimeout(function(){$('#lfb_form.lfb_bootstraped[data-form="'+e+'"]').is(".lfb_fullscreen")?$('#lfb_form.lfb_bootstraped[data-form="'+e+'"]').animate({scrollTop:$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_razorPayCt').offset().top-(80+parseInt(lfb_getScrollTopMargin(t)))},2*t.animationsSpeed):$("body,html").animate({scrollTop:$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_razorPayCt').offset().top-(80+parseInt(lfb_getScrollTopMargin(t)))},2*t.animationsSpeed)},350),lfb_lastSteps.length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_mainPanel #lfb_razorPayCt .linkPrevious').fadeIn(),$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #btnOrderRazorpay').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #btnOrderRazorpay').trigger("click")})}else if("stripe"==a){t.useRazorpay=!1,t.useStripePayment=!0,$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_razorPayCt').slideUp(),lfb_checkStepItemsValid("final",e)&&($('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_captcha').length>0?jQuery.ajax({url:t.ajaxurl,type:"post",data:{action:"lfb_checkCaptcha",formID:e,captcha:$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_captchaField').val()},success:function(a){"1"==a?($('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_captchaPanel').slideUp(100),lfb_showWinStripePayment(t)):$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_captchaField').closest(".form-group").addClass("has-error")}}):($('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_captchaPanel').slideUp(100),lfb_showWinStripePayment(t)))}
1else"bankTransfer"==a?(t.stripeToken="",t.useRazorpay=!1,t.useStripePayment=!1,$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_razorPayCt').slideUp(),0==r.find(".lfb_paymentSelector").length&&r.find("#lfb_bankTransferModal").length>0?lfb_showBankTransferModal(t):lfb_order(e)):(t.stripeToken="",t.useRazorpay=!1,t.useStripePayment=!1,$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_razorPayCt').slideUp(),lfb_order(e))}function lfb_submitSelectedPaymentMethod(t){var a=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]'),e=t.selectedPaymentMethod||a.attr("data-defaultpaymentmethod")||"";!e&&a.find(".lfb_paymentSelector .lfb_paymentOption").length>0&&(e=a.find(".lfb_paymentSelector .lfb_paymentOption").first().attr("data-payment")),e?lfb_processPaymentMethod(t,e):lfb_order(t.formID)}function lfb_clearFixedElements(){$("*:not(#lfb_bootstraped)").each(function(){0==$(this).closest("#lfb_bootstraped").length&&"static"!=$(this).css("position")&&$(this).css("position","static"),0==$(this).closest("#lfb_bootstraped").length&&$(this).css("will-change","unset")})}function lfb_openColorpicker(t){if(0!=t.length&&"function"==typeof $.fn.colpick&&t.data("colpickId")){var a=t.closest('[data-itemtype="colorpicker"]').find(".lfb_colorPreview"),e=a.length>0?a:t,r=e.offset()||{left:0,top:0},l=$.Event("click");l.pageX=r.left+Math.round(e.outerWidth()/2),l.pageY=r.top+Math.round(e.outerHeight()/2),t.trigger(l);var i=$("#"+t.data("colpickId"));i.length>0&&(i.css({left:r.left+"px",top:r.top+e.outerHeight()+8+"px",zIndex:999999999}),i.is(":visible")||i.fadeIn(),$("html").off("mousedown.lfbColorpickerManual").on("mousedown.lfbColorpickerManual",function(t){0==$(t.target).closest(".colpick, .lfb_colorPreview").length&&($("body > .colpick").hide(),$("html").off("mousedown.lfbColorpickerManual"))}),i.off("mousedown.lfbColorpickerManual").on("mousedown.lfbColorpickerManual",function(t){t.stopPropagation()}))}}function lfb_initColorpickers(t,a){a=a||0;var e=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_colorpicker:not(.lfb_colorpickerReady)');0!=e.length&&(e.each(function(){var a=$(this).val()||t.colorA;$(this).closest('[data-itemtype="colorpicker"]').find(".lfb_colorPreview").off("click.lfbColorpicker").on("click.lfbColorpicker",function(a){a.preventDefault(),a.stopImmediatePropagation(),lfb_isSelectionMode(t.formID)||lfb_openColorpicker($(this).closest('[data-itemtype="colorpicker"]').find(".lfb_colorpicker"))}).css({backgroundColor:a})}),"function"==typeof $.fn.colpick?e.each(function(){var a=$(this).val()||t.colorA;$(this).addClass("lfb_colorpickerReady").colpick({color:a,layout:"hex",onSubmit:function(){$("body > .colpick").fadeOut()},onChange:function(t,a,e,r,l){$(r).val("#"+a),$(r).closest('[data-itemtype="colorpicker"]').find(".lfb_colorPreview").css({backgroundColor:"#"+a})}})}):a<40&&setTimeout(function(){lfb_initColorpickers(t,a+1)},100))}function lfb_formatSliderTooltipValue(t){var a=parseFloat(t);return isNaN(a)?t:Number.isInteger(a)?String(a):String(parseFloat(a.toFixed(2)))}function lfb_initForms(){jQuery.each(lfb_forms,function(){var t=this;t.price=0,t.priceSingle=0,t.priceMax=0,t.step=0,t.gFormDesignCheck=0,t.timer_gFormSubmit=null,t.timer_gFormDesign=null,t.animationsSpeed*=1e3,t.reductionResult=0,t.reduction=0,t.discountCode="",t.discountCodeDisplayed=!1,t.initialPrice=parseFloat(t.initialPrice),t.contactSent=0,t.gravitySent=!1,t.shineFxIndex=0,t.subscriptionText=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_finalPrice span:eq(1)').html(),t.richtextsContent=new Array,t.emailSent=!1,t.autoStart=!1,t.urlVariables="",t.useRazorpay=!1,t.razorpayReady=!1,t.stripeToken="",t.selectedPaymentMethod=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').attr("data-defaultpaymentmethod")||"",t.itemsData=new Array,t.signature=!1,$('#lfb_form[data-form="'+t.formID+'"]').data("lfb_form",t),lfb_initVerificationCodeModal(t),setTimeout(function(){$('#lfb_form[data-form="'+t.formID+'"] [data-toggle="tooltip"][data-tooltiptext]:not([title])').each(function(){$(this).attr("title",$(this).attr("data-tooltiptext"))})},400);var a=!1;
1if(t.stepsColorBackground){var e=t.stepsColorBackground.substring(1),r=parseInt(e,16);.2126*(r>>16&255)+.7152*(r>>8&255)+.0722*(255&r)<40&&(a=!0)}a&&($('#lfb_form[data-form="'+t.formID+'"]').addClass("lfb_darkStepBg"),$('#lfb_form[data-form="'+t.formID+'"]').closest("#lfb_bootstraped").addClass("lfb_darkStepBg")),$('#lfb_form[data-form="'+t.formID+'"] #lfb_btnStart').length>0&&$('#lfb_form[data-form="'+t.formID+'"] #lfb_btnStart').on("click",function(){lfb_startFormIntro(t.formID)}),$('#lfb_form[data-form="'+t.formID+'"] #lfb_couponBtn').length>0&&$('#lfb_form[data-form="'+t.formID+'"] #lfb_couponBtn').on("click",function(){lfb_applyCouponCode(t.formID)}),$('#lfb_form[data-form="'+t.formID+'"] a.lfb_btnSaveForm').length>0&&$('#lfb_form[data-form="'+t.formID+'"] a.lfb_btnSaveForm').on("click",function(){lfb_saveForLater(t.formID)}),$('#lfb_form[data-form="'+t.formID+'"] a.lfb_btnFloatingSummary').length>0&&$('#lfb_form[data-form="'+t.formID+'"] a.lfb_btnFloatingSummary').on("click",function(){lfb_toggleFloatingSummary(t.formID)}),$('#lfb_form[data-form="'+t.formID+'"]').is(".lfb_visualEditing")&&lfb_clearFixedElements(),$('#lfb_form[data-form="'+t.formID+'"]').is(".lfb_fullscreen")&&$('#lfb_form[data-form="'+t.formID+'"]').closest("#lfb_bootstraped").parents().css({position:"static",display:"block"}),1==t.useSignature&&(t.signature=$('#lfb_form[data-form="'+t.formID+'"] #lfb_signature').signature({thickness:4,guideline:!1,guidelineOffset:26,background:"#fff"}),$('#lfb_form[data-form="'+t.formID+'"] #lfb_resetSignature').on("click",function(){t.signature.signature("clear")}),setTimeout(function(){$('#lfb_form[data-form="'+t.formID+'"] #lfb_signature canvas').attr("width",$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_signature').width()),$('#lfb_form[data-form="'+t.formID+'"] #lfb_signature canvas').css("width",$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_signature').width())},500));for(var l=0;l<t.variables.length;l++)t.variables[l].value=t.variables.defaultValue;$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_btnPayStripe').on("click",function(){t.selectedPaymentMethod="stripe",lfb_showWinStripePayment(t)}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_richtext[data-itemid]').each(function(){t.richtextsContent[$(this).attr("data-itemid").toString()]=$(this).html()}),setTimeout(()=>{$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-prefill]').each(function(){if($(this).attr("data-prefill").length>0){var t=lfb_findGetParameter($(this).attr("data-prefill"));null!==t&&$(this).val(t).trigger("change")}})},200),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-tooltiptext][data-tooltipimg!=""]').each(function(){$(this).attr("data-tooltiptext",$(this).attr("data-tooltiptext")+"<br/><img src='"+$(this).attr("data-tooltipimg")+"' alt='"+$(this).attr("data-tooltiptext")+"'/>")}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-type="numberfield"]:not([value])').each(function(){var t=0;$(this).is("[min]")&&(t=parseInt($(this).attr("min"))),$(this).val(t)});var i=t.formID;lfb_initPaymentSelectors(t),1==t.save_to_cart?t.save_to_cart=!0:t.save_to_cart=!1,1==t.save_to_cart_edd?t.save_to_cart_edd=!0:t.save_to_cart_edd=!1,t.gravityFormID>0&&jQuery.ajax({url:t.ajaxurl,type:"post",data:{action:"get_currentRef",formID:i},success:function(a){t.current_ref=a}});var o=new Array;$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]  #lfb_mainPanel .lfb_genSlide .lfb_timepicker').each(function(){$(this).timepicker({showMeridian:parseInt(t.timeModeAM),appendWidgetTo:'#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]'}),$(this).on("click",function(){$(this).timepicker("showWidget")}),$(this).timepicker().on("changeTime.timepicker",function(t){var a=$(this).attr("data-mintime"),e=$(this).attr("data-maxtime");if(""!=a&&a.indexOf(":")>0){var r=parseInt(a.substr(0,a.indexOf(":"))),l=parseInt(a.substr(a.indexOf(":")+1,2));a.indexOf("PM")>0&&12!=r&&(r+=12);var i=t.time.hours;"PM"==t.time.meridian&&(i+=12),(i<r||i==r&&t.time.minutes<l)&&$(this).val("")}if(""!=e&&e.indexOf(":")>0){var o=parseInt(e.substr(0,e.indexOf(":"))),f=parseInt(e.substr(e.indexOf(":")+1,2));e.indexOf("PM")>0&&12!=o&&(o+=12);i=t.time.hours;"PM"==t.time.meridian&&(i+=12),(i>o||i==o&&t.time.minutes>f)&&$(this).val("")}})});var f=lfb_forms[0].dateFormat;function s(t){var a=t.siblings(".lfb_textareaCounter").first();0!=a.length&&a.find(".lfb_textareaCounterCurrent").text((t.val()||"").length)}f=f.replace(/\\\//g,"/"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]  #lfb_mainPanel .lfb_genSlide .lfb_datepicker:not(.lfb_datepickerReady)').each(function(){var a=new Date;if($(this).addClass("lfb_datepickerReady"),$(this).is('[data-allowpast="1"]')||$(this).is('[data-datetype="time"]'))a=null;else if($(this).is('[data-allowpast="0"]')&&parseInt($(this).attr("data-startdays"))>0){var e=parseInt($(this).attr("data-startdays"));a.setDate(a.getDate()+e)}var r=new Array;$(this).is("[data-daysweek]")&&""!=$(this).attr("data-daysweek")&&jQuery.each($(this).attr("data-daysweek").split(","),function(){r.push(parseInt(this))});var l=$(this).is('[data-dateinline="1"]'),i=".lfb_itemContainer_"+$(this).attr("data-itemid"),s=($(this).attr("data-dateformat")||"").replace(/\\\//g,"/"),n=s.length>0?s:f,d={daysOfWeekDisabled:r,language:t.datePickerLanguage,fontAwesome:!0,timeZone:"",startDate:a,showMeridian:parseInt(t.timeModeAM),pickerPosition:"bottom-left",container:i},b=$(this).attr("data-datetype");"date"==b?(d.format=n,d.minView=2,a&&(a.setHours(0),a.setMinutes(0)),$(this).attr("data-disableminutes","0")):"time"==b?(1==parseInt(t.timeModeAM)?d.format="H:ii P":d.format="hh:ii",d.startView=1,$(this).is('[data-disableminutes="1"]')&&(d.minView=1,a&&a.setMinutes(0))):(1==parseInt(t.timeModeAM)?d.format=n+" H:ii P":d.format=n+" hh:ii",$(this).is('[data-disableminutes="1"]')&&(d.minView=1)),$(this).datetimepicker(d
1).on("show",function(a){l||($(this).data("lastdate",$(this).val()),$(this).val(""),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .datetimepicker:not(.lfb_datepicker_inline_widget)').css("z-index",2147483647),function(t){if(!t.is('[data-dateinline="1"]')){var a=t.closest(".lfb_itemBloc"),e=a.children(".datetimepicker:not(.lfb_datepicker_inline_widget)").last();if(0!=a.length&&0!=e.length){var r=a.offset(),l=t.offset(),i=l.top-r.top+t.outerHeight()+8,o=l.left-r.left,f=Math.max(0,a.outerWidth()-e.outerWidth());e.css({top:i,left:Math.max(0,Math.min(o,f)),right:"auto",zIndex:2147483647})}}}($(this)))}).on("hide",function(t){l||""==$(this).val()&&""!=$(this).data("lastdate")&&$(this).val($(this).data("lastdate"))}).on("changeDay",function(t){var a=moment.utc(t.date).format("YYYY-MM-DD"),e=$(this).attr("data-eventduration"),r=$(this).attr("data-eventdurationtype"),i=lfb_getDisabledHours($(this).attr("data-calendarid"),a,e,r),o=t.date.getDay();if($(this).attr("data-daysweek").indexOf(o.toString())>-1){i=new Array;for(var f=0;f<24;f++)i.push(parseInt(f))}$(this).data("date",a),$(this).datetimepicker("setHoursDisabled",i),$(this).addClass("checked");var s=lfb_getForm($(this).closest("#lfb_form").attr("data-form"));if(!l&&$(this).is('[data-datetype="date"]')&&"1"==s.autocloseDatepicker){var n=$(this);$('#lfb_form.lfb_bootstraped[data-form="'+s.formID+'"]  .datetimepicker:not(.lfb_datepicker_inline_widget)').hide(),"1"==s.groupAutoClick&&n.closest(".lfb_genSlide").is("[data-required=true]")&&setTimeout(function(){0==n.closest(".lfb_genSlide").find("[data-itemid]").not('[data-itemid="'+n.attr("data-itemid")+'"]').not('[data-itemtype="separator"]').not(".lfb_richtext").not('[data-group="'+n.data("group")+'"]').not(".lfb_disabled").length&&0==n.closest(".lfb_genSlide").find('[data-group="'+n.data("group")+'"] .quantityBtns').length&&0==n.closest(".lfb_genSlide").find('[data-group="'+n.data("group")+'"] .lfb_qtfield').length&&lfb_nextStep(s.formID)},500)}}).on("changeMinute",function(a){var e=$(this);$(this).addClass("checked"),l||1!=t.autocloseDatepicker||($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]  .datetimepicker:not(.lfb_datepicker_inline_widget)').hide(),"1"==t.groupAutoClick&&e.closest(".lfb_genSlide").is("[data-required=true]")&&setTimeout(function(){0==e.closest(".lfb_genSlide").find("[data-itemid]").not('[data-itemid="'+e.attr("data-itemid")+'"]').not('[data-itemtype="separator"]').not(".lfb_richtext").not('[data-group="'+e.data("group")+'"]').not(".lfb_disabled").length&&0==e.closest(".lfb_genSlide").find('[data-group="'+e.data("group")+'"] .quantityBtns').length&&0==e.closest(".lfb_genSlide").find('[data-group="'+e.data("group")+'"] .lfb_qtfield').length&&lfb_nextStep(t.formID)},500))}).on("changeHour",function(a){var e=$(this);if($(this).addClass("checked"),!l&&$(this).is('[data-datetype="dateTime"]')&&"1"==t.autocloseDatepicker&&$(this).is('[data-disableminutes="1"]')&&($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]  .datetimepicker:not(.lfb_datepicker_inline_widget)').hide(),"1"==t.groupAutoClick&&e.closest(".lfb_genSlide").is("[data-required=true]")&&setTimeout(function(){0==e.closest(".lfb_genSlide").find("[data-itemid]").not('[data-itemid="'+e.attr("data-itemid")+'"]').not('[data-itemtype="separator"]').not(".lfb_richtext").not('[data-group="'+e.data("group")+'"]').not(".lfb_disabled").length&&0==e.closest(".lfb_genSlide").find('[data-group="'+e.data("group")+'"] .quantityBtns').length&&0==e.closest(".lfb_genSlide").find('[data-group="'+e.data("group")+'"] .lfb_qtfield').length&&lfb_nextStep(t.formID)},500)),$(this).is('[data-datetype="time"]')&&$(this).is('[data-disableminutes="1"]')){var r=moment(a.date).utc();r.subtract(moment(a.date).minutes(),"minutes");var i=this;setTimeout(function(){$(i).datetimepicker("setDate",new Date(r.format("YYYY-MM-DD HH:00")))},1),l||1!=t.autocloseDatepicker||($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]  .datetimepicker:not(.lfb_datepicker_inline_widget)').hide(),"1"==t.groupAutoClick&&e.closest(".lfb_genSlide").is("[data-required=true]")&&setTimeout(function(){0==e.closest(".lfb_genSlide").find("[data-itemid]").not('[data-itemid="'+e.attr("data-itemid")+'"]').not('[data-itemtype="separator"]').not(".lfb_richtext").not('[data-group="'+e.data("group")+'"]').not(".lfb_disabled").length&&0==e.closest(".lfb_genSlide").find('[data-group="'+e.data("group")+'"] .quantityBtns').length&&0==e.closest(".lfb_genSlide").find('[data-group="'+e.data("group")+'"] .lfb_qtfield').length&&lfb_nextStep(t.formID)},500))}else{var o=moment.utc(a.date).format("YYYY-MM-DD"),f=moment.utc(a.date).format("HH"),s=$(this).attr("data-eventduration"),n=$(this).attr("data-eventdurationtype"),d=lfb_getDisabledMinutes($(this).attr("data-calendarid"),o,f,s,n);if($(this).data("date",moment.utc(a.date).format("YYYY-MM-DD HH:00")),$(this).is('[data-disableminutes="1"]')){var b=moment.utc(a.date).format("YYYY-MM-DD HH:00");$(this).data("date",b),$(this).addClass("checked");var m=this;setTimeout(function(){var t=moment(b);t.subtract(moment(t).minutes(),"minutes"),$(this).data("date",t.toDate()),$(m).datetimepicker("setDate",new Date),$(m).datetimepicker("setDate",t.toDate());var a="";$(m).val().indexOf("PM")>$(m).val().indexOf(":")?a=" PM":$(m).val().indexOf("AM")>$(m).val().indexOf(":")&&(a=" AM"),$(m).val($(m).val().split(":")[0]+":00"+a)},50)}$(this).datetimepicker("setMinutesDisabled",d)}});var m=this,p=$(this).closest(".form-group").next(".datetimepicker");0===p.length&&(p=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .datetimepicker').last()),p.find(".datetimepicker-hours thead tr:first-child th").on("click",function(){var t=this;setTimeout(function(){var a=$(t).closest(".datetimepicker").prev(".form-group").find(".lfb_datepicker"),e=$(m).datetimepicker("getViewDate");a.val("");var r=moment(e).format("YYYY-MM-DD"),l=a.attr("data-eventduration"),i=a.attr("data-eventdurationtype"),o=lfb_getDisabledHours(a.attr("data-calendarid"),r,l,i);a.data("date",r),a.is("[data-daysweek]")&&void 0!==$(this).attr("data-daysweek")&&jQuery.each(a.attr("data-daysweek").split(","),function(){if(this==e.getDay()){o=new Array;for(var t=0;t<24;t++)o.push(t)}}),a.datetimepicker("setHoursDisabled",o)},10)}),"date"==b?$(this).on("show",function(){$(".datetimepicker .table-condensed .prev").show(),$(".datetimepicker .table-condensed .switch").show(),$(".datetimepicker .table-condensed .next").show()}):"time"==b?$(this).on("show",function(){$(".datetimepicker .table-condensed .prev").hide(),$(".datetimepicker .table-condensed .switch").hide(),$(".datetimepicker .table-condensed .next").hide()}):$(this).on("show",function(){$(".datetimepicker .table-condensed .prev").show(),$(".datetimepicker .table-condensed .switch").show(),$(".datetimepicker .table-condensed .next").show()}),0!=$(this).attr("data-calendarid")&&parseInt($(this).attr("data-calendarid"))>0&&-1==jQuery.inArray($(this).attr("data-calendarid"),o)&&o.push($(this).attr("data-calendarid"));var c=$(this).attr("data-defaultvalue")||"";if(c.length>0&&0==$(this).val().length){var _=(n||"").toString().replace(/yyyy/g,"YYYY").replace(/yy/g,"YY").replace(/dd/g,"DD").replace(/(^|[^A-Za-z])d([^A-Za-z]|$)/g,"$1D$2").replace(/MM/g,"MMMM").replace(/(^|[^A-Za-z])M([^A-Za-z]|$)/g,"$1MMM$2").replace(/mm/g,"MM").replace(/(^|[^A-Za-z])m([^A-Za-z]|$)/g,"$1M$2"),u=moment(c,[_,"MM/DD/YYYY","DD/MM/YYYY","YYYY-MM-DD"],!0);u.isValid()||(u=moment(new Date(c))),u.isValid()?$(this).datetimepicker("setDate",u.toDate()):$(this).val(c)}else 0==$(this).attr("placeholder").length&&0==$(this).val().length&&($(this).is('[data-disableminutes="1"]')||"0"!=$(this).attr("data-calendarid")||$(this).datetimepicker("setDate",new Date));if($(this).on("keypress",function(t){t.preventDefault()}),!$(this).is('[data-mindatepicker="0"]')&&!$(this).is('[data-datetype="time"]')){var h=$(this),g=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-itemid="'+$(this).attr("data-mindatepicker")+'"]');g.on("changeDate",function(){var t=moment(h.datetimepicker("getDate")).format("YYYY-MM-DD HH:mm"),a=moment(g.datetimepicker("getDate")).add(parseInt(h.attr("data-startdays")),"day");(a=a.add(parseInt(g.attr("data-eventduration")),g.attr("data-eventdurationtype"))).format("YYYY-MM-DD HH:mm")>t&&h.datetimepicker("setDate",a.toDate())}),h.on("changeDate",function(){var t=moment(h.datetimepicker("getDate")).format("YYYY-MM-DD HH:mm"),a=(moment(g.datetimepicker("getDate")),moment(g.datetimepicker("getDate")).add(parseInt(g.attr("data-startdays")),"day"));if((a=a.add(parseInt(g.attr("data-eventduration")),g.attr("data-eventdurationtype"))).format("YYYY-MM-DD HH:mm")>t){var e=moment(h.datetimepicker("getDate")).subtract(parseInt(h.attr("data-startdays")),"day");e=e.subtract(parseInt(g.attr("data-eventduration")),g.attr("data-eventdurationtype")),g.datetimepicker("setDate",e.toDate())}})}if(l){var v=$(this);v.datetimepicker("show");var y=v.closest(".form-group").next(".datetimepicker");y.addClass("lfb_datepicker_inline_widget"),y.css({position:"relative",top:"auto",left:"auto",display:"block",width:"100%","margin-top":"5px"}),v.hide()}}),o.length>0&&lfb_getBusyDates(t.formID,o),navigator.userAgent.toLowerCase().match(/(iPad|iPhone|iPod)/i)&&$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-flipfx="1"]').removeAttr("data-flipfx"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').is('[data-emaillaststep="1"]')&&($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #finalSlide .linkPrevious').addClass("lfb-hidden"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_btnOrder').addClass("lfb-hidden")),1==t.hideFinalbtn&&$('#lfb_form[data-form="'+t.formID+'"] #lfb_btnOrder').addClass("lfb-hidden"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .form-control').on("focus",function(){0==t.disableTipMobile&&lfb_is_touch_device()&&$(this).tooltip("show")}).on("focusout",function(){0==t.disableTipMobile&&lfb_is_touch_device()&&($("#lfb_form :not(.ui-slider-handle) > .tooltip").remove(),$("body > .tooltip").remove(),$('#lfb_form[data-form="'+t.formID+'"] > .tooltip').remove())}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_mainPanel .lfb_genSlide .lfb_genContent div.lfb_selectable span.icon_select.lfb_fxZoom').css({textShadow:"-2px 0px "+$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_mainPanel').css("background-color")}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').is(".lfb_popup")&&!$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').closest("#lfb_bootstraped").parent().is("body")&&$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').closest("#lfb_bootstraped").detach().appendTo("body"),$('#lfb_form[data-form="'+t.formID+'"]').is(".lfb_fullscreen")&&$("html,body").css("overflow-y","hidden"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_paypalForm').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_paypalForm').attr("target","_self"),"undefined"!=typeof google&&$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_gmap').each(function(){$(this).css("height",$(this).attr("data-height"));var a=$(this),e={lat:0,lng:0},r=lfb_getMapStyle($(this).attr("data-mapstyle")),l=new google.maps.Map(document.getElementById("lfb_mapCt_"+a.attr("data-itemid")),{zoom:parseInt(a.attr("data-mapzoom")),controlSize:32,center:e,styles:r});if($(this).data("gmap",l),"marker"==$(this).attr("data-maptype")){var i=a.attr("data-address");if(i.length>3)(new google.maps.Geocoder).geocode({address:i},function(t,a){if(void 0!==t[0]){e=t[0].geometry.location,l.setCenter(e);var r=new google.maps.Marker({position:t[0].geometry.location,map:l});$(this).data("mapMarker",r)}})}else if($(this).is("[data-itinerary]")){var o=new google.maps.DirectionsRenderer;o.setMap(l),$(this).data("directionRenderer",o),lfb_updateGmapItinerary($(this),t.formID)}}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-lazy-src]').each(function(){$(this).parent().on("click",function(a){lfb_itemClick($(this),!0,t.formID)})}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_paymentMethodBtns').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_paymentMethodBtns [data-payment]').on("click",function(a){a.preventDefault(),lfb_processPaymentMethod(t,$(this).attr("data-payment"))}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #btnOrderRazorpay').on("click",function(){t.selectedPaymentMethod="razorpay",t.useRazorpay=!0,lfb_order(i)}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] input:not([type=checkbox])').on("change",function(){lfb_updatePrice(i,$(this).attr("data-itemid"))}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] textarea').on("change",function(){lfb_updatePrice(i,$(this).attr("data-itemid"))}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] textarea[data-maxlength]').each(function(){s($(this))}).on("input keyup change",function(){s($(this))}),1==t.enableShineFxBtn&&($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("a.btn-primary").append('<canvas class="lfb_shineCanvas"></canvas>'),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("a.btn-primary").on("mouseover",function(){0==t.shineFxIndex&&lfb_shineBtn(i,$(this).find(".lfb_shineCanvas"))})),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_dropzone').each(function(){var a=null;$(this).attr("data-maxfiles")>0&&(a=$(this).attr("data-maxfiles"));
1var e=$(this);$(this).dropzone({url:t.ajaxurl+"?form="+i,paramName:"file",maxFilesize:$(this).attr("data-filesize"),maxFiles:a,addRemoveLinks:!0,dictRemoveFile:"",dictCancelUpload:"",acceptedFiles:$(this).attr("data-allowedfiles"),dictDefaultMessage:t.filesUpload_text,dictFileTooBig:t.filesUploadSize_text,dictInvalidFileType:t.filesUploadType_text,dictMaxFilesExceeded:t.filesUploadLimit_text,init:function(){this.on("thumbnail",function(t,a){var r=$(t.previewElement),l=t.name.replace(/\//g,"");l=(l=(l=(l=l.replace(/ /g,"_")).replace(/'/g,"_")).replace(/"/g,"_")).replace(/[^a-zA-Z0-9._-]/g,""),r.attr("data-file",l+"_"+e.data("currentFileIndex"))}),this.on("sending",function(a,r,l){e.closest(".lfb_genSlide").find(".lfb_btn-next").fadeOut(),e.closest(".lfb_genSlide").find(".btn-primary").fadeOut(),l.append("action","lfb_upload_form"),l.append("formSession",$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').attr("data-formsession")),l.append("itemID",e.attr("data-itemid"))}),this.on("complete",function(a,r){0!=e.find(".dz-preview:not(.dz-complete)").length&&0!=e.find(".dz-preview").length||(e.closest(".lfb_genSlide").find(".lfb_btn-next").fadeIn(),e.closest(".lfb_genSlide").find(".btn-primary").fadeIn()),lfb_updatePrice(t.formID)}),this.on("success",function(a,e){var r=$(a.previewElement),l=a.name.replace(/\//g,"");if(l=(l=(l=(l=l.replace(/ /g,"_")).replace(/'/g,"_")).replace(/"/g,"_")).replace(/[^a-zA-Z0-9._-]/g,""),1==t.emailCustomerLinks){var i=e.split("||"),o=i[0];r.attr("data-url",o),e=i[1]}void 0===e||null==e||"undefined"==e?(r.addClass("dz-error"),r.find("[data-dz-errormessage]").html("There is an error, please try again")):r.attr("data-file",e+"_"+l)}),this.on("removedfile",function(a,e){lfb_updatePrice(t.formID)})}})});var n="function"==typeof $.fn.rate;$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find(".lfb_rate").each(function(){if(n){var t=parseInt($(this).closest(".lfb_itemBloc").attr("data-max")),a=parseInt($(this).closest(".lfb_itemBloc").attr("data-value"));isNaN(a)&&(a=5);var e="#bdc3c7";""!=$(this).closest(".lfb_itemBloc").attr("data-color")&&(e=$(this).closest(".lfb_itemBloc").attr("data-color")),-1==e.indexOf("#")&&(e="#"+e);$(this).closest(".lfb_itemBloc").attr("data-interval");$(this).rate({initial_value:a,max_value:t,step_size:1,cursor:"pointer"}).on("change",function(t,a){$(this).closest(".lfb_itemBloc").addClass("checked"),$(this).closest(".lfb_itemBloc").addClass("lfb_changed"),lfb_updatePrice(i,$(this).closest(".lfb_itemBloc").attr("data-itemid"))}).css({color:e})}}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('.form-control[data-validation="mask"][data-mask]').each(function(){$(this).attr("data-mask").trim().length>0&&$(this).mask($(this).attr("data-mask"),{clearIfNotMatch:!0})}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('input[type="text"][data-itemid],textarea[data-itemid]').each(function(){$(this).attr("data-initialvalue",$(this).val())}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-itemid][data-type="slider"]').each(function(){var a=parseInt($(this).attr("data-min"));isNaN(a)&&(a=0);var e=parseInt($(this).attr("data-max"));0==e&&(e=30);var r=parseFloat($(this).attr("data-value"));$(this).is("[data-qtdefault]")&&(r=parseFloat($(this).attr("data-qtdefault")));var l=a;!isNaN(r)&&r>=a&&r<=e&&(l=r);var o=$('<div class="tooltip bs-tooltip-top lfb_sliderTooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner">'+lfb_formatSliderTooltipValue(l)+"</div></div>").css({position:"absolute",top:-42,left:"50%",transform:"translateX(-50%)",opacity:1}).hide(),f=$(this).is('[data-keeptooltip="1"]');f&&o.addClass("lfb_sliderTooltipPermanent").show();var s=1;$(this).is("[data-stepslider]")&&parseFloat($(this).attr("data-stepslider"))>0&&(s=parseFloat($(this).attr("data-stepslider")));var n="min";$(this).is(".lfb_range")&&(n=!0);if($(this).slider({min:a,max:e,value:l,step:s,range:n,disabled:!1,orientation:"horizontal",change:function(a,e){lfb_isSelectionMode(t.formID)||($(e.handle).find(".tooltip-inner").html(lfb_formatSliderTooltipValue(e.value)),a.originalEvent&&lfb_updatePrice(i,$(this).attr("data-itemid")))},start:function(a,e){if(lfb_isSelectionMode(t.formID))return!1},slide:function(a,e){if(lfb_isSelectionMode(t.formID))return!1;$(e.handle).find(".tooltip-inner").html(lfb_formatSliderTooltipValue(e.value));var r=this;a.originalEvent&&(setTimeout(function(){lfb_updatePrice(i,$(r).attr("data-itemid")),$(r).addClass("lfb_changed")},30),$(e.handle).find(".tooltip").show()),lfb_updatePrice(i,$(r).attr("data-itemid"))},stop:function(t,a){if($(a.handle).find(".tooltip-inner").html(lfb_formatSliderTooltipValue(a.value)),lfb_updatePrice(i,$(this).attr("data-itemid")),f||$(a.handle).find(".tooltip").hide(),!0===n){var e=lfb_formatSliderTooltipValue(a.values[0])+" - "+lfb_formatSliderTooltipValue(a.values[1]);$(this).find(".ui-slider-range").attr("title",e),$(this).find(".ui-slider-range").attr("data-bs-original-title",e)}}}).find(".ui-slider-handle").append(o).on("mouseenter",function(){lfb_isSelectionMode(t.formID)||$(this).find(".tooltip").show()}).on("mouseleave",function(){f||$(this).find(".tooltip").hide()}),!0===n){$(this).find(".ui-slider-range").attr("title",lfb_formatSliderTooltipValue(a)+" - "+lfb_formatSliderTooltipValue(e)).tooltip({html:!0,container:'#lfb_form[data-form="'+t.formID+'"]'});var d=$(this);$(this).find(".ui-slider-range").on("mouseenter",function(){var t=lfb_formatSliderTooltipValue(d.slider("values")[0])+" - "+lfb_formatSliderTooltipValue(d.slider("values")[1]);$(this).attr("title",t),$(this).attr("data-bs-original-title",t)})}}),lfb_initColorpickers(t),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('.lfb_colorPreview[data-urltarget],input[type="text"][data-itemid]:not(.lfb_colorpicker)[data-urltarget],textarea[data-itemid][data-urltarget],select[data-itemid][data-urltarget],input[type="number"][data-urltarget]').each(function(){$(this).on("click",function(){if(!lfb_isSelectionMode(t.formID)){var a=window.open($(this).attr("data-urltarget"),"_blank");"null"!=typeof a&&null!=a&&a.focus()}})}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("[data-fieldtype]").each(function(){$(this).attr("name",$(this).attr("data-fieldtype"))}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('[data-autocomplete="1"]').each(function(){var t={};"city"==$(this).attr("data-fieldtype")?t.types=["(cities)"]:"address"==$(this).attr("data-fieldtype")?$(this).closest(".lfb_genContent").find('[data-fieldtype="city"]').length>0&&(t.types=["address"]):("country"==$(this).attr("data-fieldtype")||"zip"==$(this).attr("data-fieldtype"))&&(t.types=["(regions)"]);var a=new google.maps.places.Autocomplete($(this).get(0),t);a.field=$(this),"zip"==$(this).attr("data-fieldtype")?google.maps.event.addListener(a,"place_changed",function(){for(var t=a.getPlace(),e=0;e<t.address_components.length;e++)for(var r=0;r<t.address_components[e].types.length;r++)"postal_code"==t.address_components[e].types[r]&&a.field.val(t.address_components[e].long_name)}):"country"==$(this).attr("data-fieldtype")&&google.maps.event.addListener(a,"place_changed",function(){for(var t=a.getPlace(),e=0;e<t.address_components.length;e++)for(var r=0;r<t.address_components[e].types.length;r++)"country"==t.address_components[e].types[r]&&a.field.val(t.address_components[e].long_name)})}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]  #lfb_mainPanel .lfb_genSlide [data-group]').each(function(){var a=$(this);"1"==t.groupAutoClick&&""!=a.prop("data-group")&&a.closest(".lfb_genSlide").is("[data-required=true]")&&0==a.closest(".lfb_genSlide").find("[data-itemid]:not(.lfb_disabled)").not(".lfb_richtext").not('[data-group="'+a.data("group")+'"]').not(".lfb_disabled").length&&0==a.closest(".lfb_genSlide").find('[data-group="'+a.data("group")+'"] .quantityBtns').length&&0==a.closest(".lfb_genSlide").find('[data-group="'+a.data("group")+'"] .lfb_qtfield').length&&a.closest(".lfb_genSlide").find(".lfb_btn-next").addClass("lfb-hidden")}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]  #lfb_mainPanel .lfb_genSlide div.lfb_selectable.prechecked,#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]  #lfb_mainPanel .lfb_genSlide a.lfb_button.prechecked,#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_mainPanel .lfb_genSlide input[type=checkbox][data-price].prechecked').each(function(){lfb_itemClick($(this),!1,i)}),lfb_initPrice(i),lfb_updatePrice(i),lfb_initGform(i),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_paypalForm').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_paypalForm').attr("target","_self"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .quantityBtns > a').on("click",function(){lfb_isSelectionMode(t.formID)||("less"==$(this).attr("data-btn")?(void 0!==$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .quantityBtns > a[data-btn="more"]').data("incrementInterval")&&clearInterval($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .quantityBtns > a[data-btn="more"]').data("incrementInterval")),lfb_quantity_less(this,i)):(void 0!==$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .quantityBtns > a[data-btn="less"]').data("incrementInterval")&&clearInterval($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .quantityBtns > a[data-btn="less"]').data("incrementInterval")),lfb_quantity_more(this,i)))}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .linkPrevious').on("click",function(){lfb_isSelectionMode(t.formID)||lfb_previousStep(i)}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_btn-next').on("click",function(){lfb_isSelectionMode(t.formID)||lfb_nextStep(i)}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_btnOrderPaypal').on("click",function(){lfb_isSelectionMode(t.formID)||(t.selectedPaymentMethod="paypal",lfb_order(i))}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #finalSlide [data-toggle="switch"]').on("change",function(){lfb_toggleField($(this).attr("data-fieldid"),i)});var d=!1;if($(".gform_wrapper").each(function(){$(this).attr("id").substr($(this).attr("id").lastIndexOf("_")+1,$(this).attr("id").length)==t.gravityFormID&&(d?$(this).remove():(d=!0,$(this).detach().insertAfter('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_finalPrice')))}),setTimeout(function(){if($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #finalSlide .gform_wrapper').length>1){var a=!1;$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #finalSlide .gform_wrapper').each(function(){a?$(this).remove():a=!0})}},500),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_qtfield').attr("type","number"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_qtfield').on("focusout",function(){$(this).val().indexOf("-")>-1&&(!$(this).is("[min]")||$(this).attr("min").indexOf("-")<0)&&$(this).val(parseInt($(this).attr("min"))),parseFloat($(this).val())<parseInt($(this).attr("min"))&&$(this).val($(this).attr("min")),parseFloat($(this).val())>parseInt($(this).attr("max"))&&$(this).val($(this).attr("max")),lfb_updatePrice(t.formID),lfb_updateSummary(t.formID)}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] input[type="number"][data-itemid]').on("keydown",function(t){return 69!=t.keyCode}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] input[type="number"][data-itemid]').on("focusin",function(){0==$(this).val()&&$(this).val("")}
1),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] input[type="number"][data-itemid]').on("keyup change",function(){lfb_updatePrice(t.formID),lfb_updateSummary(t.formID)}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] input[type="number"][data-itemid]').on("focusout",function(a){""==$(this).val()&&$(this).val(0),(0!=$(this).val()||$(this).is('[data-required="true"]'))&&($(this).val().indexOf("-")>-1&&(!$(this).is("[min]")||$(this).attr("min").indexOf("-")<0)&&$(this).val(parseInt($(this).attr("min"))),parseFloat($(this).val())<parseFloat($(this).attr("min"))&&$(this).val($(this).attr("min")),parseFloat($(this).val())>parseFloat($(this).attr("max"))&&$(this).val($(this).attr("max")),(""==$(this).val()||isNaN(parseInt($(this).val())))&&$(this).val(0),""!=$(this).val()&&($(this).is('[data-valueasqt="0"]')||$(this).val()>0)?$(this).addClass("checked"):$(this).removeClass("checked")),void 0!==a.originalEvent&&(lfb_updatePrice(t.formID),lfb_updateSummary(t.formID))}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_sliderQt').each(function(){var t=parseInt($(this).closest(".quantityBtns").attr("data-min"));0==t&&(t=1);var a=$('<div class="tooltip top" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner">'+t+"</div></div>").css({position:"absolute",top:-55,left:-20,opacity:1}).hide(),e=1;$(this).closest(".quantityBtns").is("[data-stepslider]")&&parseInt($(this).closest(".quantityBtns").attr("data-stepslider"))>0&&(e=parseInt($(this).closest(".quantityBtns").attr("data-stepslider")));$(this).slider({min:t,max:parseInt($(this).closest(".quantityBtns").attr("data-max")),value:parseInt($(this).closest(".quantityBtns").next(".icon_quantity").html()),orientation:"horizontal",range:"min",disabled:!1,step:e,change:function(t,e){a.find(".tooltip-inner").html(e.value),$(this).closest(".quantityBtns").next(".icon_quantity").html(e.value),t.originalEvent&&lfb_updatePrice(i,$(this).attr("data-itemid"))},slide:function(t,e){$(this).closest(".quantityBtns").next(".icon_quantity").html(e.value),a.find(".tooltip-inner").html(e.value),t.originalEvent&&lfb_updatePrice(i,$(this).attr("data-itemid"))}}).find(".ui-slider-handle").append(a).on("mouseenter",function(){a.show()}).on("mouseleave",function(){a.hide()})}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').is(".lfb_visualEditing")||lfb_loadStoredForm(t.formID),lfb_initRichTextValues(t.formID),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').is(".lfb_visualEditing")||"0"==t.intro_enabled&&($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_btnFloatingSummary').css({display:"inline-block"}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_btnSaveForm').css({display:"inline-block"}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_btnStart,#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #startInfos').hide(),"2"!=t.showSteps?$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .genPrice').fadeIn(500):$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .genPrice').hide(),3==t.showSteps&&$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stepper').fadeIn(500),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_mainPanel').fadeIn(t.animationsSpeed,function(){t.autoStart||$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').is(".lfb_visualEditing")||lfb_nextStep(t.formID)})),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]  #lfb_loader').fadeOut(),"free"===t.lfb_tier){var b=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]');if(0===b.find(".lfb_poweredBy").length){b.append('<div class="lfb_poweredBy" style="text-align:center;padding:12px 0 4px;opacity:0.6;font-size:12px;"><a href="https://wp-cost-estimation-payment-forms.com/" target="_blank" rel="noopener" style="color:inherit;text-decoration:none;">Powered by WP Cost Estimation</a></div>')}}})}function lfb_initGform(t){var a=lfb_getForm(t);a.gravityFormID>0&&(a.gravitySent=!1,a.gFormDesignCheck++,a.timer_gFormDesign&&$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide').delay(100).animate({opacity:1},1e3),$("#gform_wrapper_"+a.gravityFormID+" input[type=radio]").not('[data-toggle="radio"]').attr("data-toggle","radio"),$("#gform_wrapper_"+a.gravityFormID+"  .ginput_container input,#gform_wrapper_"+a.gravityFormID+"  .ginput_container select,#gform_wrapper_"+a.gravityFormID+" .ginput_container textarea").attr("title","control"),$("#gform_wrapper_"+a.gravityFormID+"  .ginput_container input,#gform_wrapper_"+a.gravityFormID+"  .ginput_container textarea, #gform_wrapper_"+a.gravityFormID+" .ginput_container select").not("[type=checkbox]").not("[type=radio]").not("[type=submit]").addClass("form-control"),$("#gform_wrapper_"+a.gravityFormID+"  .ginput_container").addClass("form-group"),$("#gform_wrapper_"+a.gravityFormID+"  .gform_button").attr("class","btn btn-wide btn-primary"),$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper input[type="radio"]:not(.ready)').each(function(){$(this).addClass("ready");$("#gform_wrapper_"+a.gravityFormID+' .gform_wrapper label[for="'+$(this).attr("id")+'"]').html();$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').parent("li").css("display","inline-block"),$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').append($(this)),$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').addClass("radio"),$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').prepend('<span class="icons"><span class="first-icon far fa-square"></span><span class="second-icon far fa-check-square"></span></span>'),$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').parent("li").next().is("br")||$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').parent("li").after("<br/>"),$(this).is(":checked")&&$(this).trigger("click")}),$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper input[type="checkbox"]:not(.ready)').each(function(){$(this).addClass("ready");$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').html();$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').parent("li").css("display","inline-block"),$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').append($(this)),$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').addClass("checkbox"),$(this).before('<span class="icons"><span class="first-icon far fa-square"></span><span class="second-icon far fa-check-square"></span></span>'),$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').parent("li").next().is("br")||$("#gform_wrapper_"+a.gravityFormID+'  .gform_wrapper label[for="'+$(this).attr("id")+'"]').parent("li").after("<br/>")}),$("#gform_wrapper_"+a.gravityFormID+"  .gform_wrapper label.checkbox").each(function(){$(this).find("[type=checkbox]").length>0&&$(this).find("[type=checkbox]").eq(1).remove(),$(this).find("[type=checkbox]").is(":checked")&&$(this).find("[type=checkbox]").trigger("click")}),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm  #lfb_btnOrderPaypal').hide(),$(" #gform_submit_button_"+a.gravityFormID).on("click",function(e){if(!lfb_isSelectionMode(a.formID)&&!a.gravitySent){a.gravitySent=!0,$(this).addClass("anim"),a.gFormDesignCheck=0,$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide').delay(1e3).animate({opacity:0}
1,1e3);$(this);setTimeout(function(){a.timer_gFormDesign=setTimeout(function(){lfb_initGform(t)},2e3)},1e3)}}))}function lfb_initPrice(t){var a=lfb_getForm(t);a.max_price>0?a.priceMax=a.max_price:($('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel .lfb_genSlide [data-price]').each(function(){if($(this).data("price")&&$(this).data("price")>0)if($(this).find(".icon_quantity").length>0)t=(t=parseFloat($(this).find(".icon_quantity").html()))>10&&parseFloat($(this).data("price"))>100?10:t>30?30:parseFloat($(this).find(".quantityBtns").data("max")),"-"==$(this).data("operation")||"/"==$(this).data("operation")||(a.priceMax+=parseFloat($(this).data("price"))*t);else if($(this).find(".lfb_qtfield").length>0){var t;t=(t=parseFloat($(this).find(".lfb_qtfield").val()))>10&&parseFloat($(this).data("price"))>100?10:t>30?30:parseFloat($(this).find(".lfb_qtfield").attr("max").length>0)?parseFloat($(this).find(".lfb_qtfield").attr("max")):30,"-"==$(this).data("operation")||"/"==$(this).data("operation")||(a.priceMax+=parseFloat($(this).data("price"))*t)}else"+"==$(this).data("operation")&&(a.priceMax+=parseFloat($(this).data("price")))}),a.priceMax+=a.initialPrice,$(' #lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel .lfb_genSlide [data-price][data-operation="x"]').each(function(){if($(this).find(".icon_quantity").length>0)for(var t=0;t<parseFloat($(this).find(".icon_quantity").html());t++)a.priceMax=a.priceMax+a.priceMax*parseFloat($(this).data("price"))/100;else a.priceMax=a.priceMax+a.priceMax*parseFloat($(this).data("price"))/100}))}function initFlatUI(){$("#lfb_form.lfb_bootstraped .input-group").on("focus",".form-control",function(){$(this).closest(".input-group, .form-group").addClass("focus")}).on("blur",".form-control",function(){$(this).closest(".input-group, .form-group").removeClass("focus")}),$("#lfb_form.lfb_bootstraped .pagination").on("click","a",function(){$(this).parent().siblings("li").removeClass("active").end().addClass("active")}),$("#lfb_form.lfb_bootstraped .btn-group").on("click","a",function(){$(this).siblings().removeClass("active").end().addClass("active")}),$('#lfb_form.lfb_bootstraped [data-toggle="switch"][data-checkboxstyle="switch"]').wrap('<div class="switch"  data-on-label="<i class=\'fas fa-check\'></i>" data-off-label="<i class=\'fas fa-times\'></i>" />').parent().bootstrapSwitch(),$('#lfb_form.lfb_bootstraped [data-toggle="switch"][data-checkboxstyle="switch"]').on("change",function(){$(this).is(":checked")||$(this).removeClass("checked")}),$("#lfb_form.lfb_bootstraped input[type=checkbox][data-urltarget]").each(function(){$(this).on("change",function(){if(!lfb_isSelectionMode(0)&&$(this).is(":checked"))if($(this).is('[data-urltargetmode="_self"]'))document.location.href=$(this).attr("data-urltarget");else{var t=window.open($(this).attr("data-urltarget"),"_blank");"null"!=typeof t&&null!=t&&t.focus()}})}),$("#lfb_form.lfb_bootstraped .lfb_selectpicker").length>0&&($("#lfb_form.lfb_bootstraped .lfb_selectpicker").selectpicker(),$("#lfb_form.lfb_bootstraped .lfb_selectpicker").each(function(){$(this).closest(".lfb_itemBloc").find(".btn-group.lfb_bootstrap-select").attr("data-originaltitle",$(this).attr("data-originaltitle")),$(this).closest(".lfb_itemBloc").find(".btn-group.lfb_bootstrap-select").attr("data-bs-original-title",$(this).attr("data-bs-original-title")),$(this).closest(".lfb_itemBloc").find(".btn-group.lfb_bootstrap-select").attr("data-tooltiptext",$(this).attr("data-tooltiptext")),$(this).closest(".lfb_itemBloc").find(".btn-group.lfb_bootstrap-select").attr("data-tooltipimg",$(this).attr("data-tooltipimg")),$(this).closest(".lfb_itemBloc").find(".btn-group.lfb_bootstrap-select").attr("data-toggle",$(this).attr("data-toggle")),$(this).closest(".lfb_itemBloc").find(".btn-group.lfb_bootstrap-select").attr("data-placement",$(this).attr("data-placement"))})),$("#lfb_form .input-group-addon").on("click",function(){$(this).next("input").trigger("focus")}),$("#lfb_form .form-control.lfb_customQtSelector").each(function(){const t=$('<div class="lfb_numberFieldQtSelectorContainer"></div>');$(this).wrap(t);const a=$('<a href="javascript:" class="lfb_numberFieldQtSelector" data-lfbdirection="-">-</a>');a.insertBefore($(this));const e=$('<a href="javascript:" class="lfb_numberFieldQtSelector" data-lfbdirection="+">+</a>');e.insertAfter($(this)),e.on("click",function(){var t=$(this).closest("#lfb_form").attr("data-form");void 0!==a.data("incrementInterval")&&clearInterval(a.data("incrementInterval")),void 0!==e.data("incrementInterval")&&clearInterval(e.data("incrementInterval"));var r=parseFloat($(this).parent().find("input").val())+1;$(this).parent().find("input").attr("max")&&r>parseFloat($(this).parent().find("input").attr("max"))&&(r=parseFloat($(this).parent().find("input").attr("max"))),$(this).parent().find("input").attr("min")&&r<parseFloat($(this).parent().find("input").attr("min"))&&(r=parseFloat($(this).parent().find("input").attr("min"))),$(this).parent().find("input").val(r),lfb_updatePrice(t)}),a.on("click",function(){var t=$(this).closest("#lfb_form").attr("data-form");void 0!==a.data("incrementInterval")&&clearInterval(a.data("incrementInterval")),void 0!==e.data("incrementInterval")&&clearInterval(e.data("incrementInterval"));var r=parseFloat($(this).parent().find("input").val())-1;$(this).parent().find("input").attr("max")&&r>parseFloat($(this).parent().find("input").attr("max"))&&(r=parseFloat($(this).parent().find("input").attr("max"))),$(this).parent().find("input").attr("min")&&r<parseFloat($(this).parent().find("input").attr("min"))&&(r=parseFloat($(this).parent().find("input").attr("min"))),$(this).parent().find("input").val(r),lfb_updatePrice(t)})})}function lfb_getRepeaterConfig(t){var a={};try{a=JSON.parse(t.attr("data-repeaterconfig")||"{}")}catch(t){a={}}return a.columns=$.isArray(a.columns)?a.columns:[],a.minRows=parseInt(a.minRows,10)||0,a.maxRows=parseInt(a.maxRows,10)||0,a.defaultRows=parseInt(a.defaultRows,10)||0,a.addButtonLabel=a.addButtonLabel||"Add row",a.removeButtonLabel=a.removeButtonLabel||"Remove",a.showLineTotal=0===a.showLineTotal||"0"===a.showLineTotal?0:1,a}function lfb_repeaterEscapeHtml(t){return String(null==t?"":t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function lfb_repeaterFieldValue(t,a){return t?t.values&&void 0!==t.values[a]?t.values[a]:void 0!==t[a]?t[a]:"":""}
1function lfb_repeaterBuildField(t,a){var e=1==t.required?' data-required="true"':"",r=' data-repeaterrole="'+lfb_repeaterEscapeHtml(t.priceRole||"")+'"',l=' class="form-control lfb_repeaterField" data-repeaterkey="'+lfb_repeaterEscapeHtml(t.key||"")+'" data-repeatertype="'+lfb_repeaterEscapeHtml(t.type||"text")+'"'+r+e;if("textarea"==t.type)return"<textarea"+l+">"+lfb_repeaterEscapeHtml(a)+"</textarea>";if("select"==t.type){var i="<select"+l+'><option value=""></option>';return $.each(t.options||[],function(){var t=String(a)==String(this.label||"")?" selected":"";i+='<option value="'+lfb_repeaterEscapeHtml(this.label||"")+'" data-price="'+(parseFloat(this.price)||0)+'"'+t+">"+lfb_repeaterEscapeHtml(this.label||"")+"</option>"}),i+"</select>"}if("checkbox"==t.type){var o=1==a||!0===a||"true"==a||"on"==a?" checked":"",f=t.options&&t.options.length?t.options[0]:{};return'<label class="lfb_repeaterCheckbox"><input type="checkbox" class="lfb_repeaterField" data-repeaterkey="'+lfb_repeaterEscapeHtml(t.key||"")+'" data-repeatertype="checkbox"'+r+e+' data-price="'+(parseFloat(f.price)||0)+'"'+o+" /> <span>"+lfb_repeaterEscapeHtml(f.label||t.label||"")+"</span></label>"}var s="number"==t.type||"quantity"==t.type||"unit_price"==t.type?"number":"text";return'<input type="'+s+'"'+l+("number"==s?' step="any"':"")+("quantity"==t.type?' min="0"':"")+' value="'+lfb_repeaterEscapeHtml(a)+'" />'}function lfb_repeaterAddRow(t,a){var e=lfb_getRepeaterConfig(t),r=parseInt(e.maxRows,10)||0;if(!(r>0&&t.find("tbody tr").length>=r)){var l='<tr class="lfb_repeaterRow">';$.each(e.columns,function(){var t=lfb_repeaterFieldValue(a,this.key);a||"quantity"!=this.type||""!==t||(t=1),l+='<td data-repeaterkey="'+lfb_repeaterEscapeHtml(this.key||"")+'">'+lfb_repeaterBuildField(this,t)+"</td>"}),e.showLineTotal&&(l+='<td class="lfb_repeaterLineTotal">0</td>'),l+='<td class="lfb_repeaterActions"><a href="javascript:" class="btn btn-danger btn-circle btn-sm lfb_repeaterRemoveRow"><span class="fas fa-trash"></span><span class="lfb-hidden">'+lfb_repeaterEscapeHtml(e.removeButtonLabel)+"</span></a></td>",l+="</tr>",t.find("tbody").append(l)}}function lfb_updateRepeaterTotal(t,a){var e=lfb_getForm(a),r=0,l=0;t.find("tbody tr").each(function(){var t=1,i=0,o=0,f=!1;$(this).find(".lfb_repeaterField").each(function(){var a="",e=$(this).attr("data-repeaterrole")||"",r=$(this).attr("data-repeatertype")||"",l=0;$(this).is(":checkbox")?(a=$(this).is(":checked")?"1":"",$(this).is(":checked")&&(l=parseFloat($(this).attr("data-price"))||0)):$(this).is("select")?(a=$(this).val(),l=parseFloat($(this).find("option:selected").attr("data-price"))||0):a=$(this).val(),""!==a&&null!==a&&"quantity"!=e&&"quantity"!=r&&(f=!0),"quantity"==e||"quantity"==r?t=parseFloat(a)||0:"unit_price"==e||"unit_price"==r?i=parseFloat(a)||0:"price"==e&&(o+=parseFloat(a)||0),o+=l});var s=f?t*(i+o):0;if(l+=f?1:0,r+=s,$(this).attr("data-rowtotal",s),$(this).find(".lfb_repeaterLineTotal").length>0){var n=lfb_formatPrice(parseFloat(s).toFixed(2),a);n="left"==e.currencyPosition?e.currency+n:n+e.currency,$(this).find(".lfb_repeaterLineTotal").html(n)}}),t.attr("data-price",r),t.attr("data-resprice",r),t.attr("data-resqt",l),l>0?t.addClass("checked"):t.removeClass("checked")}function lfb_initListeners(t){var a=lfb_getForm(t);$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').on("lfb_setAnimImmediate",lfb_setAnimImmediate),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').on("lfb_resizeAll",lfb_resizeAll),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide div.lfb_selectable .img,  #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide div.lfb_selectable .icon_select').on("click",function(){lfb_isSelectionMode(t)||lfb_itemClick($(this).parent(),!0,t)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide a.lfb_button').on("click",function(){lfb_isSelectionMode(t)||lfb_itemClick($(this),!0,t)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-callnextstep="1"]').on("click",function(){lfb_isSelectionMode(t)||!$(this).is(".checked")&&!$(this).is("a.lfb_button")||lfb_nextStep(t)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide .lfb_ptSelectBtn').on("click",function(){var a=$(this).closest(".lfb_ptCol"),e=$(this).closest(".lfb_pricetable"),r=parseFloat(a.attr("data-colprice"))||0;e.find(".lfb_ptCol").removeClass("lfb_ptSelected"),a.addClass("lfb_ptSelected"),e.attr("data-price",r),e.addClass("checked"),e.attr("data-selectedlabel",a.find(".lfb_ptColTitle").text()),lfb_updatePrice(t)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide .lfb_repeater').each(function(){var a=$(this),e=lfb_getRepeaterConfig(a),r=parseInt(e.defaultRows,10)||0;if(r<parseInt(e.minRows,10)&&(r=parseInt(e.minRows,10)),0==a.find("tbody tr").length)for(var l=0;l<r;l++)lfb_repeaterAddRow(a);lfb_updateRepeaterTotal(a,t)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide .lfb_repeaterAddRow').off("
1click.lfbRepeater").on("click.lfbRepeater",function(){var a=$(this).closest(".lfb_repeater");lfb_repeaterAddRow(a),lfb_updateRepeaterTotal(a,t),lfb_updatePrice(t,a.attr("data-itemid"))}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide .lfb_repeaterTable').off("click.lfbRepeater",".lfb_repeaterRemoveRow").on("click.lfbRepeater",".lfb_repeaterRemoveRow",function(){var a=$(this).closest(".lfb_repeater"),e=lfb_getRepeaterConfig(a),r=parseInt(e.minRows,10)||0;a.find("tbody tr").length>r&&($(this).closest("tr").remove(),lfb_updateRepeaterTotal(a,t),lfb_updatePrice(t,a.attr("data-itemid")))}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide .lfb_repeaterTable').off("change.lfbRepeater keyup.lfbRepeater",".lfb_repeaterField").on("change.lfbRepeater keyup.lfbRepeater",".lfb_repeaterField",function(){var a=$(this).closest(".lfb_repeater");lfb_updateRepeaterTotal(a,t),lfb_updatePrice(t,a.attr("data-itemid"))}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide .lfb_ipCard').on("click",function(){var a=$(this),e=a.closest(".lfb_iconpicker"),r=e.attr("data-selectionmode")||"radio",l=parseFloat(a.attr("data-optprice"))||0;if("radio"===r)e.find(".lfb_ipCard").removeClass("lfb_ipSelected"),a.addClass("lfb_ipSelected"),e.attr("data-price",l),e.addClass("checked"),e.attr("data-selectedlabel",a.attr("data-optlabel"));else{a.toggleClass("lfb_ipSelected");var i=0,o=[];e.find(".lfb_ipCard.lfb_ipSelected").each(function(){i+=parseFloat($(this).attr("data-optprice"))||0,o.push($(this).attr("data-optlabel"))}),e.attr("data-price",i),o.length>0?(e.addClass("checked"),e.attr("data-selectedlabel",o.join(", "))):(e.removeClass("checked"),e.attr("data-price",0),e.attr("data-selectedlabel",""))}lfb_updatePrice(t)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel input[type=checkbox][data-price]').on("change",function(){$(this).is('[data-usedistance="true"]')&&lfb_removeDistanceError($(this).attr("data-itemid"),t);var a=$(this);a.data("group")&&a.closest(".lfb_genSlide").find('a.lfb_button.checked[data-group="'+a.data("group")+'"]:not([data-itemid="'+a.attr("data-itemid")+'"])').each(function(){lfb_itemClick($(this),!1,t),$(this).removeClass("checked")}),lfb_updatePrice(t,$(this).attr("data-itemid"))}),$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel input[type=checkbox][data-group]').on("change",function(a){var e=$(this);e.is(":checked")&&($(this).closest(".lfb_genSlide").find('div.lfb_selectable.checked[data-group="'+e.data("group")+'"]').each(function(){lfb_itemClick($(this),!1,t)}),$(this).closest(".lfb_genSlide").find('input[type=checkbox][data-group="'+e.data("group")+'"]:checked').each(function(){$(this).is(e)||$(this).trigger("click.auto")}),$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"]').is('[data-autoclick="1"]')&&0==e.closest(".lfb_genSlide").find("[data-itemid]").not('[data-group="'+e.data("group")+'"]').not(".lfb_richtext").not(".lfb_disabled").length&&lfb_nextStep(lfb_getForm(t).formID))}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide select[data-itemid]').on("change",function(){var a=$(this).val(),e=0;$(this).find("option").each(function(){$(this).attr("value")==a&&(e=$(this).attr("data-price"))}),$(this).attr("data-price",e),$(this).data("price",e),lfb_updatePrice(t)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide select[data-itemid]').trigger("change"),$(' #lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel input[type=checkbox][data-price]').on("change",function(){}),$(' #lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel .lfb_genSlide input.lfb_qtfield').on("change",function(){lfb_updatePrice(t,$(this).attr("data-itemid"))}),$(' #lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel .lfb_genSlide').find("input[type=text][data-title],textarea[data-title],input[type=file][data-title],input[type=number][data-title]").on("change",function(){$(this).val().length>0?($(this).addClass("checked"),$(this).addClass("lfb_changed")):$(this).removeClass("checked")}),$(' #lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel .lfb_genSlide div.lfb_selectable .icon_quantity').on("click",function(){lfb_isSelectionMode(t)||(lfb_hideQuantityBtns($(".quantityBtns").not($(this).parent().find(".quantityBtns")),250),!$(this).parent().find(".quantityBtns").is(".open")&&$(this).parent().is(".checked")?($(this).parent().find(".quantityBtns .tooltip-inner").length>0&&$(this).parent().find(".quantityBtns .tooltip-inner").html(parseInt($(this).parent().find(".icon_quantity").html())),lfb_showQuantityBtns($(this).parent().find(".quantityBtns"),250)):lfb_hideQuantityBtns($(this).parent().find(".quantityBtns"),250))}),$("#lfb_orderMessageCheck").on("change",function(){$(this).is(":checked")?$("#lfb_orderMessage").slideDown(250):$("#lfb_orderMessage").slideUp(250)}),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_btnOrder').on("click",function(){lfb_isSelectionMode(t)||($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_paymentSelector').length>0?lfb_submitSelectedPaymentMethod(a):"bankTransfer"==$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').attr("data-defaultpaymentmethod")&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_bankTransferModal').length>0?lfb_processPaymentMethod(a,"bankTransfer"):lfb_order(t))}),$("#gform_wrapper_"+a.gravityFormID+" form").on("submit",function(e){var r=$(this);if($(this).is(".submit"))$(this).removeClass("submit");else if(e.preventDefault(),$(this).addClass("submit"),a.save_to_cart){var l=new Array,i=JSON.parse(JSON.stringify(lfb_lastSteps));"final"!=a.step&&-1==jQuery.inArray(parseInt(a.step),i)?i.push(parseInt(a.step)):"final"==a.step&&-1==jQuery.inArray("final",i)&&i.push("final"),jQuery.each(i,function(){$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+this+'"]').find('div.lfb_selectable.checked:not(.lfb_disabled),a.lfb_button.checked:not(.lfb_disabled),input[type=checkbox]:checked:not(.lfb_disabled),[data-type="slider"]:not(.lfb_disabled)').each(function(){var t=1;parseInt($(this).data("resqt"))>0&&(t=parseInt($(this).data("resqt"))),$(this).is('[data-type="slider"]')&&(t=parseInt($(this).slider("value")),isNaN(parseInt($(this).find(".tooltip-inner").html()))||(t=parseInt($(this).find(".tooltip-inner").html()))),parseInt($(this).data("prodid"))>0&&l.push({quantity:t,product_id:parseInt($(this).data("prodid")),variation:parseInt($(this).attr("data-woovar"))})})}),jQuery.ajax({url:a.ajaxurl,type:"post",data:{action:"lfb_cart_save",ref:a.current_ref,emptyWooCart:a.emptyWooCart,products:l},success:function(){a.timer_gFormSubmit=setInterval(function(){lfb_check_gform_response(a.formID)},300),setTimeout(function(){r.submit()},700)}})}else a.timer_gFormSubmit=setInterval(function(){lfb_check_gform_response(a.formID)},300),setTimeout(function(){r.submit()},700)})}function lfb_checkItems(t){var a=lfb_getForm(t);$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel .lfb_genSlide div.lfb_selectable img[data-tint="true"]').each(function(){$(this).css("opacity",0),$(this).show();var t=$('<canvas class="img"></canvas>');t.css({width:$(this).get(0).width,height:$(this).get(0).height}),$(this).hide(),$(this).after(t);var e=t.get(0).getContext("2d"),r=new Image;r.onload=function(){e.fillStyle=a.colorA,e.fillRect(0,0,t.get(0).width,t.get(0).height),e.fill(),e.globalCompositeOperation="destination-in",e.drawImage(r,0,0,t.get(0).width,t.get(0).height)},$(this).is("[data-lazy-src]")?r.src=$(this).attr("data-lazy-src"):r.src=$(this).attr("src")}),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel .lfb_genSlide div.lfb_selectable img[data-tint="false"]').each(function(){$(this).is("[data-src]")&&$(this).attr("src",$(this).attr("data-src"))}),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel .lfb_genSlide div.lfb_selectable.checked , #lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel .lfb_genSlide  input[type=checkbox]:checked').on("mouseenter",function(){$(this).addClass("lfb_hover")}).on("mouseleave",function(){$(this).removeClass("lfb_hover")})}function lfb_getForm(t){for(var a=!1,e=0;e<lfb_forms.length;e++)if(lfb_forms[e].formID==t){a=lfb_forms[e];break}return a}function lfb_onResize(){$("#lfb_form.lfb_fullscreen:not(.lfb_visualEditing)").css({minHeight:$(window).height()}),$("#lfb_form .lfb_stepDescription").css("top",""),$("#lfb_form .lfb_genContent").css("paddingTop","")}function lfb_updatePlannedSteps(t){var a=parseInt($('#lfb_form.lfb_bootstraped[data-form="'+t+'"]  #lfb_mainPanel .lfb_genSlide[data-start="1"]').attr("data-stepid"));(lfb_plannedSteps=new Array).push(a),lfb_plannedSteps=lfb_scanPlannedSteps(a,t)}function lfb_scanPlannedSteps(t,a){new Array;var e=lfb_findPotentialsSteps(t,a);return e.length>0&&"final"!=e[0]?(lfb_plannedSteps.push(e[0]),lfb_scanPlannedSteps(e[0],a),lfb_plannedSteps):lfb_plannedSteps}function lfb_getStepQuantities(t,a,e){var r=lfb_getForm(t),l=0;if(jQuery.inArray(parseInt(a),lfb_lastSteps)>-1||a==r.step){var i=lfb_getFormContent(t,!0,a)[2];jQuery.each(i,function(){if(this.itemid!=e&&"row"!=this.type&&"column"!=this.type){isNaN(this.quantity)?l++:l+=parseInt(this.quantity)}})}return l}function lfb_getTotalQuantities(t,a,e){lfb_getForm(t);var r=lfb_getFormContent(t,!0)[2],l=0,i=!0;(isNaN(a)||0==a)&&(i=!1);var o=!1;return jQuery.each(r,function(){if(this.itemid!=e){var t=this;i&&!o&&t.stepid==a&&(o=!0),o&&t.stepid!=a||(isNaN(t.quantity)?l++:l+=parseInt(t.quantity))}}),l}function lfb_showQuantityBtns(t,a,e){a=void 0===a?250:a,e=parseInt(e,10),isNaN(e)&&(e=0),t.stop(!0,!0).delay(e).queue(function(t){$(this).addClass("open").css({display:"flex",opacity:0}
1),t()}).animate({opacity:1},a)}function lfb_hideQuantityBtns(t,a){a=void 0===a?250:a,t.stop(!0,!0).removeClass("open").fadeOut(a)}function lfb_itemClick(t,a,e){var r=lfb_getForm(e),l=t;a&&(lfb_hideQuantityBtns($('#lfb_form[data-form="'+r.formID+'"] .quantityBtns'),250),navigator.userAgent.toLowerCase().match(/(iPad|iPhone|iPod)/i)&&($("body :not(.ui-slider-handle) > .tooltip").remove(),$("body > .tooltip").remove(),$('#lfb_form[data-form="'+r.formID+'"] > .tooltip').remove()));if(a&&l.addClass("action"),a||!l.is(".action")){if("zoom"!=r.imgIconStyle&&l.find("span.icon_select").animate({bottom:160,opacity:0},200),l.is(".checked"))if(a&&l.data("required"));else{"zoom"==r.imgIconStyle?(l.delay(200).css("transition-delay","0.2s"),l.find("span.icon_select").css("transition-delay","0s")):l.css("transition-delay","0s");var i=220;"zoom"==r.imgIconStyle&&(i=0),l.delay(i).removeClass("checked"),"zoom"!=r.imgIconStyle?l.delay(220).find("span.icon_select").removeClass("fa-check").addClass("fa-times"):l.find("span.icon_select").css("transition-delay","0s"),l.delay(400).css("transition-delay","0s"),l.find(".icon_quantity").delay(300).fadeOut(200)}else if(l.css("transition-delay","0s"),0!=r.disableTipMobile&&lfb_is_touch_device()||t.is('[data-type="slider"]')||t.is(".lfb_button")||""!=r.imgTitlesStyle||t.tooltip("show"),"zoom"==r.imgIconStyle&&l.find("span.icon_select").css("transition-delay",".5s"),l.is('[type="checkbox"][data-checkboxstyle="checkbox"]')||l.delay(220).addClass("checked"),"zoom"!=r.imgIconStyle&&l.delay(220).find("span.icon_select").removeClass("fa-times").addClass("fa-check"),l.find(".quantityBtns").length>0&&!l.is("[data-distanceqt]")&&(l.find(".icon_quantity").delay(300).fadeIn(200),lfb_showQuantityBtns(l.find(".quantityBtns"),200,500),t.find(".lfb_sliderQt").length>0&&setTimeout(function(){lfb_updatePrice(r.formID,t.attr("data-itemid"))},50)),l.data("urltarget")&&""!=l.data("urltarget")){var o=l.data("urltargetmode");"_self"!=o&&"_blank"!=o&&(o="_blank");var f=window.open(l.data("urltarget"),o);"null"!=typeof f&&null!=f&&f.focus()}"zoom"!=r.imgIconStyle&&l.find("span.icon_select").delay(300).animate({bottom:0,opacity:1},200),a&&l.data("group")&&(l.closest(".lfb_genSlide").find('div.lfb_selectable.checked[data-group="'+l.data("group")+'"]:not([data-itemid="'+l.attr("data-itemid")+'"])').each(function(){lfb_itemClick($(this),!1,e),$(this).removeClass("checked")}),l.closest(".lfb_genSlide").find('input[type=checkbox][data-group="'+l.data("group")+'"]:checked:not([data-itemid="'+l.attr("data-itemid")+'"])').trigger("click.auto"),l.closest(".lfb_genSlide").find('a.lfb_button.checked[data-group="'+l.data("group")+'"]:not([data-itemid="'+l.attr("data-itemid")+'"])').each(function(){lfb_itemClick($(this),!1,e),$(this).removeClass("checked")}),"1"==r.groupAutoClick&&l.is(".checked")&&l.closest(".lfb_genSlide").is("[data-required=true]")&&setTimeout(function(){0==l.closest(".lfb_genSlide").find("[data-itemid]").not('[data-itemtype="separator"]').not(".lfb_richtext").not('[data-group="'+l.data("group")+'"]').not(".lfb_disabled").length&&0==l.closest(".lfb_genSlide").find('[data-group="'+l.data("group")+'"] .quantityBtns').length&&0==l.closest(".lfb_genSlide").find('[data-group="'+l.data("group")+'"] .lfb_qtfield').length&&lfb_nextStep(r.formID)},500)),setTimeout(function(){lfb_updatePrice(e),l.removeClass("action")},420)}setTimeout(function(){l.is('[data-usedistance="true"]')&&lfb_removeDistanceError(l.attr("data-itemid"),e)},200)}function lfb_nl2br(t,a){return((t=t.replace(/\n\n/g,"\n"))+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+(a||void 0===a?"<br />":"<br>")+"$2")}function lfb_findGetParameter(t){var a=null,e=[];return location.search.substr(1).split("&").forEach(function(r){(e=r.split("="))[0]===t&&(a=decodeURIComponent(e[1]))}),a}function lfb_replaceAllBackSlash(t){for(var a=t.indexOf("\\");a>=0;)a=(t=t.replace("\\","")).indexOf("\\");return t}function lfb_getRepeaterRowsData(t){var a=[];return t.find("tbody tr").each(function(){var t={},e={},r=!1,l=parseFloat($(this).attr("data-rowtotal"))||0;$(this).find(".lfb_repeaterField").each(function(){var a=$(this).attr("data-repeaterkey")||"",l="",i=l;$(this).is(":checkbox")?(l=$(this).is(":checked")?"1":"",i=$(this).is(":checked")?$.trim($(this).closest("label").text()):""):$(this).is("select")?(l=$(this).val(),i=$(this).find("option:selected").text()):i=l=$(this).val();var o=$(this).attr("data-repeaterrole")||"",f=$(this).attr("data-repeatertype")||"";""!==l&&null!==l&&"quantity"!=o&&"quantity"!=f&&(r=!0),t[a]=l,e[a]=i}),r&&a.push({values:t,labels:e,total:l})}),a}function lfb_formatRepeaterSummary(t,a,e){if(!a||0==a.length)return"";var r=t.length>0?lfb_getRepeaterConfig(t):{columns:[],showLineTotal:1},l='<table class="lfb_repeaterSummaryTable"><thead><tr>';return $.each(r.columns,function(){l+="<th>"+lfb_repeaterEscapeHtml(this.label||this.key||"")+"</th>"}),r.showLineTotal&&(l+="<th>Total</th>"),l+="</tr></thead><tbody>",$.each(a,function(){var t=this;l+="<tr>",$.each(r.columns,function(){l+="<td>"+lfb_repeaterEscapeHtml(t.labels[this.key]||t.values[this.key]||"")+"</td>"}),r.showLineTotal&&(l+="<td>"+lfb_repeaterEscapeHtml(lfb_formatRepeaterPrice(t.total,e))+"</td>"),l+="</tr>"}),l+="</tbody></table>"}function lfb_formatRepeaterText(t){var a=[];return $.each(t||[],function(t){var e=[];$.each(this.labels||this.values||{},function(t,a){""!==a&&null!==a&&e.push(t+": "+a)}),e.length>0&&a.push(t+1+". "+e.join(", "))}),a.join("\n")}function lfb_formatRepeaterPrice(t,a){var e=lfb_getForm(a);t=parseFloat(t)||0;var r=lfb_formatPrice(parseFloat(t).toFixed(2),a);return"left"==e.currencyPosition?e.currency+r:r+e.currency}function lfb_getItemDataFromItem(t,a){var e=!1,r=new Array,l=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_itemContainer_'+a),i=l.closest(".lfb_genSlide").attr("data-stepid"),o=l.closest(".lfb_genSlide"),f=!0;if(l.is(".lfb_disabled")){a=l.find("[data-itemid]").attr("data-itemid");t.itemsData=jQuery.grep(t.itemsData,function(t){return t.itemid!=a})}else{var s=l.find('div[data-type="repeater"]');if(s.length>0){lfb_updateRepeaterTotal(s,t.formID),!o.is('[data-showstepsum="0"]')&&s.is('[data-showinsummary="true"]')||(f=!1);var n=lfb_getRepeaterRowsData(s);n.length>0&&(r.push(s.attr("data-itemid")),e={label:s.attr("data-originallabel")||l.find(".lfb_itemLabel").text()||s.attr("data-title"),itemid:s.attr("data-itemid"),t
1ype:"repeater",value:lfb_formatRepeaterSummary(s,n,t.formID),textValue:lfb_formatRepeaterText(n),rows:n,rowCount:n.length,price:parseFloat(s.attr("data-resprice"))||parseFloat(s.attr("data-price"))||0,quantity:n.length,operation:s.attr("data-operation")||"+",step:o.attr("data-title"),stepid:i,showInSummary:f,isSinglePrice:s.is('[data-singleprice="true"]')})}if(l.find("div.lfb_selectable.checked").length>0){var d=l.find("div.lfb_selectable.checked").get(0);$(d).is("[data-resqt]")&&$(d).data("resqt",$(d).attr("data-resqt")),$(d).is("[data-resprice]")&&$(d).data("resprice",$(d).attr("data-resprice")),!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1);var b=parseFloat($(d).data("resqt")),m=parseFloat($(d).data("resprice"));0==b&&(b=1),b>1&&b+"x ",$(d).data("price")&&("+"==$(d).data("operation")?"left"==t.currencyPosition?m=t.currency+m:m+=t.currency:"-"==$(d).data("operation")?"left"==t.currencyPosition?m="-"+t.currency+m:m+="-"+t.currency:m="/"==$(d).data("operation")?"-"+$(d).data("price")+"%":"+"+$(d).data("price")+"%");var p=parseFloat($(d).data("resprice"));isNaN(p)&&(p=parseFloat($(d).data("price")));var c=!1;if($(d).is('[data-singleprice="true"]')&&(c=!0),$(d).is('[data-hidezeropricesum="true"]')&&0==p&&(f=!1),-1==jQuery.inArray($(d).attr("data-itemid"),r)){r.push($(d).attr("data-itemid"));var _=$(d).attr("data-title");$(d).is("[data-bs-original-title]")&&$(d).is("[data-reducqt]")&&(_=$(d).attr("data-bs-original-title")),$(d).is("[data-originaltitle]")&&$(d).is('[data-showprice="1"]')&&(_=$(d).attr("data-originaltitle")),$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),e={label:_,type:l.attr("data-itemtype"),itemid:$(d).attr("data-itemid"),price:p,quantity:b,step:o.attr("data-title"),stepid:i,showInSummary:f,isSinglePrice:c,image:$(d).find(".img").attr("src")}}}if(l.find("a.lfb_button.checked").length>0){d=l.find("a.lfb_button.checked").get(0),m=parseFloat($(d).data("price"));if(!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1),$(d).data("price")){"+"==$(d).data("operation")?"left"==t.currencyPosition?m=t.currency+m:m+=t.currency:"-"==$(d).data("operation")?"left"==t.currencyPosition?m="-"+t.currency+m:m+="-"+t.currency:m="/"==$(d).data("operation")?"-"+m+"%":"+"+m+"%";$(d).attr("data-originaltitle");$(d).is("select")&&" ("+$(d).val()+")"}else{$(d).attr("data-originaltitle");$(d).is("select")&&" : "+$(d).val()}_=$(d).attr("data-title");$(d).is("[data-originaltitle]")&&$(d).is('[data-showprice="1"]')&&(_=$(d).attr("data-originaltitle")),$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),$(d).is("select")&&(_+=" : "+$(d).val());c=!1;$(d).is('[data-singleprice="true"]')&&(c=!0),$(d).is('[data-hidezeropricesum="true"]')&&0==p&&(f=!1),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),price:parseFloat($(d).data("resprice")),quantity:1,step:o.attr("data-title"),stepid:i,showInSummary:f,isSinglePrice:c})}if(l.find("input[type=checkbox]:checked").length>0){d=l.find("input[type=checkbox]:checked").get(0),m=parseFloat($(d).data("price"));if(!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1),$(d).data("price")){"+"==$(d).data("operation")?"left"==t.currencyPosition?m=t.currency+m:m+=t.currency:"-"==$(d).data("operation")?"left"==t.currencyPosition?m="-"+t.currency+m:m+="-"+t.currency:m="/"==$(d).data("operation")?"-"+m+"%":"+"+m+"%";$(d).attr("data-originaltitle");$(d).is("select")&&" ("+$(d).val()+")"}else{$(d).attr("data-originaltitle");$(d).is("select")&&" : "+$(d).val()}_=$(d).attr("data-title");$(d).is("[data-originaltitle]")&&$(d).is('[data-showprice="1"]')&&(_=$(d).attr("data-originaltitle")),$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),$(d).is("select")&&(_+=" : "+$(d).val());c=!1;$(d).is('[data-singleprice="true"]')&&(c=!0),$(d).is('[data-hidezeropricesum="true"]')&&0==p&&(f=!1),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),t
1ype:l.attr("data-itemtype"),price:parseFloat($(d).data("resprice")),quantity:1,step:o.attr("data-title"),stepid:i,showInSummary:f,isSinglePrice:c})}if(l.is(".lfb_richtext")&&!l.is(".lfb_shortcode")){d=l.get(0);!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:$(d).attr("data-title"),itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),value:$(d).html(),step:o.attr("data-title"),stepid:i,showInSummary:f})}if(l.find('div[data-type="slider"][data-itemid].lfb_range').length>0){d=l.find('div[data-type="slider"]').get(0);!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1);var u=parseFloat($(d).slider("values")[0]),h=parseFloat($(d).slider("values")[1]);_=$(d).attr("data-title");$(d).is("[data-originaltitle]")&&$(d).is('[data-showprice="1"]')&&(_=$(d).attr("data-originaltitle")),$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),$(d).is('[data-hidezeropricesum="true"]')&&0==p&&(f=!1),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),price:0,quantity:0,step:o.attr("data-title"),stepid:i,showInSummary:f,isSinglePrice:!1,value:u+" - "+h,minValue:u,maxValue:h})}if(l.find('div[data-type="slider"][data-itemid]:not(.lfb_range)').length>0){d=l.find('div[data-type="slider"]').get(0),m=parseFloat($(d).data("price"));if(!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1),0==(b=parseFloat($(d).slider("value")))&&(b=1),b>1&&b+"x ",$(d).data("price")){"+"==$(d).data("operation")?"left"==t.currencyPosition?m=t.currency+m:m+=t.currency:"-"==$(d).data("operation")?"left"==t.currencyPosition?m="-"+t.currency+m:m+="-"+t.currency:m="/"==$(d).data("operation")?"-"+m+"%":"+"+m+"%";$(d).attr("data-originaltitle");$(d).is("select")&&" ("+$(d).val()+")"}else{$(d).attr("data-originaltitle");$(d).is("select")&&" : "+$(d).val()}_=$(d).attr("data-title");$(d).is("[data-originaltitle]")&&$(d).is('[data-showprice="1"]')&&(_=$(d).attr("data-originaltitle")),$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),$(d).is("select")&&(_+=" : "+$(d).val());c=!1;$(d).is('[data-singleprice="true"]')&&(c=!0),$(d).is('[data-hidezeropricesum="true"]')&&0==p&&(f=!1),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),price:parseFloat($(d).data("resprice")),quantity:parseFloat($(d).slider("value")),step:o.attr("data-title"),stepid:i,showInSummary:f,isSinglePrice:c})}if(l.find("select[data-itemid]").length>0){d=l.find("select[data-itemid]").get(0),m=parseFloat($(d).data("price"));if(!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1),$(d).data("price")&&$(d).data("price")>0){"+"==$(d).data("operation")?"left"==t.currencyPosition?m=t.currency+m:m+=t.currency:"-"==$(d).data("operation")?"left"==t.currencyPosition?m="-"+t.currency+m:m+="-"+t.currency:m="/"==$(d).data("operation")?"-"+m+"%":"+"+m+"%";$(d).attr("data-originaltitle");$(d).is("select")&&" ("+$(d).val()+")"}else{$(d).attr("data-originaltitle");$(d).is("select")&&" : "+$(d).val()}_=$(d).attr("data-title");$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel"));c=!1;$(d).is('[data-singleprice="true"]')&&(c=!0),$(d).is('[data-hidezeropricesum="true"]')&&0==p&&(f=!1);var g=$(d).val();null==g&&(g=""),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),price:parseFloat($(d).data("resprice")),value:g,quantity:1,step:o.attr("data-title"),stepid:i,showInSummary:f,isSinglePrice:c})}if(l.find("input[type=file]").length>0){d=l.find("input[type=file]").get(0);!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1);_=$(d).data("title");$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),$(d).is('[data-hidezeropricesum="true"]')&&0==p&&(f=!1),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),t
1ype:l.attr("data-itemtype"),value:$(d).val(),step:o.attr("data-title"),stepid:i,showInSummary:f,isFile:!0})}if(l.find(".lfb_dropzone").length>0){d=l.find(".lfb_dropzone").get(0);!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1);var v="",y=new Array;$(d).find(".dz-preview[data-file]:not(.dz-error)").each(function(){y.push($(this).attr("data-file").replace(/ /g,"_")),1==t.emailCustomerLinks?(v+=' - <a href="'+$(this).attr("data-url")+'">'+$(this).attr("data-file").replace(/ /g,"_")+"</a><br/>"," - "+$(this).attr("data-url")+"\n"):(v+=' - <span class="lfb_file">'+$(this).attr("data-file").replace(/ /g,"_")+"</span><br/>"," - "+$(this).attr("data-file").replace(/ /g,"_")+"\n")});_=$(d).data("title");$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),y.length>0&&($(d).is('[data-hidezeropricesum="true"]')&&0==p&&(f=!1),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),value:v,step:o.attr("data-title"),stepid:i,showInSummary:f,isFile:!0,files:y}))}if(l.find("input[type=text][data-itemid]:not(.lfb_colorpicker)").length>0){d=l.find("input[type=text]:not(.lfb_colorpicker)").get(0);!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1);_=$(d).data("title");$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),$(d).is('[data-hidezeropricesum="true"]')&&0==p&&(f=!1),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),value:$(d).val(),step:o.attr("data-title"),stepid:i,showInSummary:f})}if(l.find("input[type=number][data-itemid]:not(.lfb_colorpicker)").length>0){d=l.find("input[type=number]:not(.lfb_colorpicker)").get(0);!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1),(b=parseFloat($(d).val()))+"x ";var I=$(d).val(),D=void 0;p=void 0;$(d).is('[data-valueasqt="1"]')&&(I=void 0,D=parseFloat($(d).val()),p=parseFloat($(d).data("resprice")),isNaN(p)&&(p=parseFloat($(d).data("price"))));c=!1;$(d).is('[data-singleprice="true"]')&&(c=!0);_=$(d).data("title");$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),$(d).is('[data-hidezeropricesum="true"]')&&0==p&&(f=!1),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),value:
1I,quantity:D,price:p,step:o.attr("data-title"),stepid:i,showInSummary:f,isSinglePrice:c})}if(l.find(".lfb_colorPreview").length>0){d=l.find(".lfb_colorPreview").get(0);!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1);_=$(d).data("title");$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),value:$(d).closest('[data-itemtype="colorpicker"]').find(".lfb_colorpicker").val(),step:o.attr("data-title"),stepid:i,showInSummary:f})}if(l.find("textarea[data-itemid]").length>0){d=l.find("textarea[data-itemid]").get(0);!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1);_=$(d).data("title");$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),value:lfb_nl2br($(d).val()),step:o.attr("data-title"),stepid:i,showInSummary:f})}if(l.find(".lfb_rate").length>0){d=l.get(0);!o.is('[data-showstepsum="0"]')&&$(d).is('[data-showinsummary="true"]')||(f=!1);_=$(d).data("title");$(d).is("[data-originallabel]")&&(_=$(d).attr("data-originallabel")),-1==jQuery.inArray($(d).attr("data-itemid"),r)&&(r.push($(d).attr("data-itemid")),e={label:_,itemid:$(d).attr("data-itemid"),type:l.attr("data-itemtype"),value:l.find(".lfb_rate").rate("getValue"),step:o.attr("data-title"),stepid:i,showInSummary:f})}var S=l.find('div[data-type="pricetable"].checked');if(S.length>0&&!e){var P=l.find(".lfb_itemLabel").text();P||(P=S.attr("data-title")),r.push(S.attr("data-itemid")),e={label:P,itemid:S.attr("data-itemid"),type:"pricetable",value:S.attr("data-selectedlabel")||"",price:parseFloat(S.attr("data-price"))||0,quantity:1,operation:S.attr("data-operation")||"+",step:o.attr("data-title"),stepid:i,showInSummary:f}}var k=l.find('div[data-type="iconpicker"].checked');if(k.length>0&&!e){var x=l.find(".lfb_itemLabel").text();x||(x=k.attr("data-title")),r.push(k.attr("data-itemid")),e={label:x,itemid:k.attr("data-itemid"),type:"iconpicker",value:k.attr("data-selectedlabel")||"",price:parseFloat(k.attr("data-price"))||0,quantity:1,operation:k.attr("data-operation")||"+",step:o.attr("data-title"),stepid:i,showInSummary:f}}e&&(l.find('[data-showprice="0"]').length>0?e.showPrice=!1:e.showPrice=!0)}return e}function lfb_updateItemData(t,a){for(var e=!1,r=-1,l=0;l<t.itemsData.length;l++)if(t.itemsData[l].itemid==a){e=t.itemsData[l],r=l;break}if($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_itemContainer_'+a).is(".lfb_disabled"))e&&(t.itemsData=jQuery.grep(t.itemsData,function(t){return t.itemid!=a}));else{var i=lfb_getItemDataFromItem(t,a);e&&i?t.itemsData[r]=i:e&&!i?t.itemsData.splice(r,1):i&&t.itemsData.push(i)}}function lfb_getItemData(t,a){for(var e=!1,r=0;r<t.itemsData.length;r++)if(t.itemsData[r].itemid==a){(e=t.itemsData[r])&&e.stepid==t.step&&(e=lfb_getItemDataFromItem(t,a));break}return e||(e=lfb_getItemDataFromItem(t,a)),e}function lfb_getFormContent(t,a,e){var r=lfb_getForm(t),l="",i="",o="",f=new Array;i+="Ref : "+r.current_ref+" \n";var s=JSON.parse(JSON.stringify(lfb_lastSteps));a&&"final"!=r.step&&s.push(r.step),"final"==r.step&&s.push("final"),void 0!==e&&0!=e&&(s=new Array).push(e);for(var n=new Array,d=0;d<s.length;d++){var b=s[d],m=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+b+'"]');if(("final"==m.attr("data-stepid")||jQuery.inArray(parseInt(m.attr("data-stepid")),lfb_plannedSteps)>=0)&&!$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-title][data-stepid="'+b+'"]').is(".lfb_disabled")){var p=m.attr("data-stepid");"final"!=p&&(p=parseInt(p)),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is('[data-sumhidesteps="1"]')||(l+="<br/><p><u><b>"+m.attr("data-title")+" :</b></u></p><br/>",i+="\n\n---------"+m.attr("data-title")+" :---------\n");var c=new Array;m.find(".lfb_itemBloc:not(.lfb_disabled)").each(function(){var t=0;if(t=$(this).find("[data-itemid]").length>0?$(this).find("[data-itemid]").attr("data-itemid"):$(this).attr("data-itemid"),-1==n.indexOf(t)){n.push(t);var a=lfb_getItemData(r,t);a&&(f.push(a),c.push(a))}});for(var _=0;_<c.length;_++)if("richtext"!=c[_].type&&c[_].showInSummary&&void 0!==c[_].label){var u=c[_].value,h=c[_].value;if("repeater"==c[_].type&&void 0!==c[_].textValue&&(u=lfb_repeaterEscapeHtml(c[_].textValue).replace(/\n/g,"<br/>"),h=c[_].textValue),void 0!==c[_].price&&0!=c[_].price&&c[_].showPrice){var g=lfb_formatPrice(parseFloat(c[_].price).toFixed(2),t)+r.currency;"left"==r.currencyPosition&&(g=r.currency+lfb_formatPrice(parseFloat(c[_].price).toFixed(2),t)),void 0!==c[_].value?(l+="    - "+c[_].label+": "+u+" ("+g+")<br/>",i+=" - "+c[_].label+": "+h+" ("+g+")\n"):void 0!==c[_].quantity&&c[_].quantity>1?(l+="    - "+c[_].label+": "+c[_].quantity+" ("+g+")<br/>",i+=" - "+c[_].label+": "+c[_].quantity+" ("+g+")\n"):(l+="    - "+c[_].label+": "+g+"<br/>",i+=" - "+c[_].label+": "+g+"\n")}else void 0!==c[_].value?""!=c[_].value&&(l+="    - "+c[_].label+": "+u+"<br/>",i+=" - "+c[_].label+": "+h+"\n"):void 0!==c[_].quantity&&c[_].quantity>1?(l+="    - "+c[_].label+": "+c[_].quantity+"<br/>",i+=" - "+c[_].label+": "+c[_].quantity+"\n"):(l+="    - "+c[_].label+"<br/>",i+=" - "+c[_].label+"\n")}}}(!r.price||r.price<0)&&(r.price=0);if(/^\d+(\.\d{2})?$/.test(r.price)||(r.price=parseFloat(r.price).toFixed(2)),""!=r.discountCode)if(r.reductionResult>0){var v=parseFloat(r.reductionResult).toFixed(2)+r.currency;"left"==r.currencyPosition&&(v=r.currency+parseFloat(r.reductionResult).toFixed(2)),l+="<br/> Coupon : "+r.discountCode+" ("+v+")"}else l+="<br/> Coupon : "+r.discountCode;return"left"==r.currencyPosition?(o+=r.currency+lfb_formatPrice(parseFloat(r.price).toFixed(2),t),i+="\n\nTotal : "+r.currency+lfb_formatPrice(parseFloat(r.price).toFixed(2),t)):(o+=lfb_formatPrice(parseFloat(r.price).toFixed(2),t)+r.currency,i+="\n\nTotal : "+lfb_formatPrice(parseFloat(r.price).toFixed(2),t)+r.currency),new Array(l,o,f,i)}function lfb_check_gform_response(t){var a=lfb_getForm(t);if($('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #gforms_confirmation_message').length>0)if(clearInterval(a.timer_gFormSubmit),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm').length>0&&a.price>0){var e=lfb_getPaymentAmountForBase(a,a.price);if(e=parseFloat(e).toFixed(2),a.priceSingle>0){var r=lfb_getPaymentAmountForBase(a,a.priceSingle);0==$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=a1]').length&&($('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm').append('<input type="hidden" name="a1" value="
10">'),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm').append('<input type="hidden" name="p1" value="1">'),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm').append('<input type="hidden" name="t1" value="M">')),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=a1]').val(r),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=p1]').val($('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=p3]').val())}else $('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=a1]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=t1]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=p1]').remove();$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=amount]').val(e),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=a3]').val(e),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=item_number]').val(a.current_ref),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=item_name]').val($('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [name=item_name]').val()+" - "+a.current_ref),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm [type="submit"]').trigger("click")}else $('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] .gfield_error').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] .gform_footer').show(),$("#finalText").html($("#gform_wrapper_"+a.gravityFormID+" .gforms_confirmation_message").html()),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide #gforms_confirmation_message').fadeIn(),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide #lfb_summary').fadeOut(),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide #lfb_couponContainer').fadeOut(),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide #lfb_legalNoticeContent').fadeOut(),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide .linkPrevious').fadeOut(),lfb_finalStep(t)}function lfb_quantity_less(t,a){var e=$(t).parent().parent().find(".icon_quantity"),r=parseFloat($(t).parent().data("min")),l=parseInt(e.html());l>1&&l>r&&(l--,e.html(l),lfb_updatePrice(a))}function lfb_quantity_more(t,a){var e=$(t).parent().parent().find(".icon_quantity"),r=parseFloat($(t).parent().data("max")),l=parseFloat(e.html());(l<r||0==r)&&(l++,e.html(l),lfb_updatePrice(a))}function lfb_checkEmail(t){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}function lfb_isIframe(){try{return window.self!==window.top}catch(t){return!0}}function lfb_cloneSummary(t,a){var e=lfb_getForm(a),r=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_summary').clone();const l=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"]').attr("data-stylefields");"table-row"!=r.find("#lfb_summaryDiscountTr").css("display")&&r.find("#lfb_summaryDiscountTr").remove(),$("body").is(".rtl")&&(r.css({textAlign:"right",direction:"rtl"}),r.find("table").css({textAlign:"right",direction:"rtl"})),r.addClass("lfb-hidden"),r.uniqueId();var i=4;return"1"==e.summary_showAllPricesEmail&&r.find(".lfb_hidePrice").removeClass("lfb_hidePrice").removeClass("lfb-hidden"),r.find("thead th").each(function(){$(this).is(".lfb-hidden")&&i--}),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_summary').after(r),r.children("h4").remove(),r.find("*:not(.lfb_value)").each(function(){$(this).css({fontSize:$(this).css("font-size"),padding:$(this).css("padding"),textAlign:$(this).css("text-align"),lineHeight:$(this).css("line-height")})}),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_summary table thead > tr > th:eq(1)').is(".lfb-hidden")&&(r.find("table thead > tr > th:eq(1)").remove(),r.find("table tbody td.lfb_valueTd").remove()),r.find("th.lfb_summaryStep").attr("align","center"),r.find("table").attr("width","90%"),r.find("table").css("width","90%"),r.find("table").attr("border","1"),r.find("table").attr("bordercolor",lfb_rgb2hex(r.find("table").css("border-color"))),r.find("table").attr("style","width:90%;margin:0 auto;"),r.find("thead td, thead th").each(function(){"glassmorphic"==l?($(this).attr("bgcolor",e.color_summaryTheadBg),$(this).css("background",e.color_summaryTheadBg),$(this).css("color",e.color_summaryTheadTxt),$(this).attr("color",e.color_summaryTheadTxt)):($(this).attr("bgcolor",lfb_rgb2hex(r.find("thead").css("background-color"))),$(this).css("background",lfb_rgb2hex(r.find("thead").css("background-color"))))}),r.find("tbody th").each(function(){"glassmorphic"==l&&($(this).attr("bgcolor",e.color_summaryStepBg),$(this).css("color",e.color_summaryStepTxt),$(this).attr("color",e.color_summaryStepTxt))}),r.find("th").each(function(){"glassmorphic"!=l&&$(this).attr("bgcolor",lfb_rgb2hex($(this).css("background-color")))}),r.find("td").each(function(){"glassmorphic"==l?($(this).attr("bgcolor",e.color_summaryTbodyBg),$(this).css("color",e.color_summaryTbodyTxt),$(this).attr("color",e.color_summaryTbodyTxt)):$(this).attr("style").indexOf("background-color")>-1||$(this).attr("style").indexOf("background")>-1?$(this).attr("bgcolor",lfb_rgb2hex($(this).css("background-color"))):$(this).attr("bgcolor",lfb_rgb2hex($(this).closest("table").css("background-color")))}),"glassmorphic"==l?r.find("td,th").each(function(){$(this).html('<span style="color: '+lfb_rgb2hex($(this).css("color"))+"; font-size: "+$(this).css("font-size")+'">'+$(this).html()+"</span>")}):r.find("td,th").each(function(){$(this).attr("color",lfb_rgb2hex($(this).css("color"))),$(this).html('<span style="color: '+lfb_rgb2hex($(this).css("color"))+"; font-size: "+$(this).css("font-size")+'">'+$(this).html()+"</span>")}),r.find("table .lfb-hidden").remove(),r.find("table").attr("cellspacing","0"),r.f
1ind("table").attr("cellpadding","8"),r.find("table").attr("bgcolor","#FFFFFF"),r.find("td,th").each(function(){$(this).attr("align",$(this).css("text-align")),$(this).css("padding",$(this).css("padding"))}),"1"==e.summary_showAllPricesEmail&&(r.find(".lfb_summaryStep").attr("colspan",i),r.find("#lfb_summaryDiscountTr>th:eq(0),#lfb_summaryTotalTr>th:eq(0)").attr("colspan",i-1)),3==i?(r.find("td:not(:first-child)").each(function(){$(this).attr("width","164")}),r.find("th:not(:first-child)").each(function(){$(this).attr("width","164")}),r.find("tr>td:first-child").each(function(){$(this).attr("width","340")}),r.find("tr>th:first-child").each(function(){$(this).attr("width","340")})):2==i?(r.find("td:not(:first-child)").each(function(){$(this).attr("width","50%")}),r.find("th:not(:first-child)").each(function(){$(this).attr("width","50%")}),r.find("tr>td:first-child").each(function(){$(this).attr("width","50%")}),r.find("tr>th:first-child").each(function(){$(this).attr("width","50%")})):(r.find("td:not(:first-child)").each(function(){$(this).attr("width","103")}),r.find("th:not(:first-child)").each(function(){$(this).attr("width","103")}),r.find("tr>td:first-child").each(function(){$(this).attr("width","332")}),r.find("tr>th:first-child").each(function(){$(this).attr("width","332")})),r.find("*:not(.lfb_value)").each(function(){var t=lfb_rgb2hex($(this).css("color"));$(this).css({color:""}),$(this).attr("style",$(this).attr("style")+";color:"+t),$(this).attr("style").length>0?$(this).attr("style",$(this).attr("style")+";color:"+t):$(this).attr("style","color:"+t)}),r.find("[data-tldinit]").removeAttr("data-tldinit"),r.find(".lfb_file").each(function(){$(this).removeAttr("style"),$(this).removeAttr("data-tldinit")}),r.html('<div id="lfb_summaryCt" style="padding-top: 24px;padding-bottom: 24px; text-align: center;">'+r.html()+"</div>"),r}function lfb_getContactInformations(t,a){if(a)var e={email:"",phone:"",firstName:"",lastName:"",address:"",city:"",state:"",zip:"",country:"",job:"",phoneJob:"",url:"",company:""};else(e=new Array).email="",e.phone="",e.firstName="",e.lastName="",e.address="",e.city="",e.state="",e.zip="",e.country="",e.job="",e.phoneJob="",e.url="",e.company="";$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="email"]').each(function(){$(this).val().length>0&&lfb_checkEmail($(this).val())&&(a?e.email=$(this).val():e.email=$(this).val())});$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="phone"]').each(function(){$(this).val().length>3&&(a?e.phone=$(this).val():e.phone=$(this).val())});$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="firstName"]').each(function(){$(this).val().length>0&&(a?e.firstName=$(this).val():e.firstName=$(this).val())});$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="lastName"]').each(function(){$(this).val().length>0&&(a?e.lastName=$(this).val():e.lastName=$(this).val())});$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="address"]').each(function(){$(this).val().length>0&&(a?e.address=$(this).val():e.address=$(this).val())});$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="city"]').each(function(){$(this).val().length>0&&(a?e.city=$(this).val():e.city=$(this).val())});return $('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="state"]').each(function(){$(this).val().length>0&&(a?e.state=$(this).val():e.state=$(this).val())}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="zip"]').each(function(){$(this).val().length>0&&(a?e.zip=$(this).val():e.zip=$(this).val())}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="country"]').each(function(){$(this).val().length>0&&(a?e.country=$(this).val():e.country=$(this).val())}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="job"]').each(function(){$(this).val().length>0&&(a?e.job=$(this).val():e.job=$(this).val())}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="phoneJob"]').each(function(){$(this).val().length>0&&(a?e.phoneJob=$(this).val():e.phoneJob=$(this).val())}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="url"]').each(function(){$(this).val().length>0&&(a?e.url=$(this).val():e.url=$(this).val())}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="company"]').each(function(){$(this).val().length>0&&(a?e.company=$(this).val():e.company=$(this).val())}),e}function lfb_getUrlVariablesByFormID(t){lfb_getForm(t);var a=lfb_getUrlVariables(t,lfb_getFormContent(t)[2],!0);return $('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').data("lfb_urlVariables",a),a}function lfb_getUrlVariables(t,a){var e=lfb_getForm(t),r="",l=new Array;jQuery.each(a,function(){if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemid="'+this.itemid+'"]').length>0){var a=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemid="'+this.itemid+'"]');if(a.is('[data-urlvariable="1"]')){if("repeater"==this.type){var i=a.attr("data-variablename");i=i.length>0&&i.replace(/ /g,"").length>0?lfb_formatForUrl(i):lfb_formatForUrl(this.label);var o={};return o[i+"_count"]=this.rowCount||0,o[i+"_total"]=void 0!==this.price?this.price:0,o[i+"_json"]=JSON.stringify(this.rows||[]),$.each(this.rows||[],function(t,a){$.each(a.values||{},function(a,e){o[i+"_row_"+(t+1)+"_"+lfb_formatForUrl(a)]=e})}),$.each(o,function(t,a){-1==l.indexOf(t)&&(l.push(t),r+="&"+encodeURIComponent(t)+"="+encodeURIComponent(a))}),!0}var f="0";"quantity"==a.attr("data-sentattribute")?a.is(".lfb_dropzone")?(f=(f=(f=(f="").replace(/<span class="lfb_file">/g,"")).replace(/<\/span>/g,"")).substr(3,f.length),1==e.emailCustomerLinks&&(f="",a.find(".dz-success.dz-complete").each(function(){f+=$(this).attr("data-url")+","}),f.length>0&&(f=f.substr(0,f.length-1)))):void 0!==this.value?f=this.value.replace(/\+/g,"%2b"):void 0!==this.quantity&&(f=this.quantity):"title"==a.attr("data-sentattribute")?f=a.attr("data-originallabel"):void 0!==this.price&&(f=this.price);var s=a.attr("data-variablename");s=s.length>0&&s.replace(/ /g,"").length>0?lfb_formatForUrl(s):lfb_formatForUrl(this.label),"string"==typeof f&&(f=f.replace(/<br\s*[\/]?>/gi,"\n")),-1==l.indexOf(s)&&(l.push(s),r+="&"+encodeURIComponent(s)+"="+encodeURIComponent(f))}}});for(var i=0;i<e.variables.length;i++)1==e.variables[i].sendAsGet&&void 0!==e.variables[i].value&&"function"==typeof e.variables[i].value.replace&&(r+="&"+encodeURIComponent(lfb_formatForUrl(e.variables[i].title))+"="+encodeURIComponent(e.variables[i].value.replace(/\+/g,"%2b")));if(r.length>0){if(r="?"+r.substr(1,r.length),void 0!==e.orderRef){var o=e.refVarName;r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(e.orderRef)}""!=e.discountCode&&(r+="&coupon="+encodeURIComponent(e.discountCode)+"&discount="+encodeURIComponent(e.reductionResult))}else if(void 0!==e.orderRef){o=e.refVarName;r+="?"+encodeURIComponent(o)+"="+encodeURIComponent(e.orderRef),""!=e.discountCode&&(r+="&coupon="+encodeURIComponent(e.discountCode)+"&discount="+encodeURIComponent(e.reductionResult))}else""!=e.discountCode&&(r+="?coupon="+encodeURIComponent(e.discountCode)+"&discount="+encodeURIComponent(e.reductionResult));return r}function lfb_formatForUrl(t){return t=(t=t.replace(/ /g,"_")).replace(/[^\w\s]/gi,"")}function lfb_getPreviousEnabledStep(t,a){var e=-1,r=a[a.length-1];return!$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]  #lfb_mainPanel .lfb_genSlide[data-stepid="'+r+'"]').is(".lfb_disabled")&&($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+r+'"] .lfb_item:not(.lfb_row ):not(.lfb-hidden)').length>0||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+r+'"] .lfb_distanceError').length>0)?e=r:(a.pop(),e=a.length>0?lfb_getPreviousEnabledStep(t,a):$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_genSlide[data-start="1"]').attr("data-stepid")),lfb_lastSteps=a,e}function lfb_previousStep(t){var a=lfb_getForm(t),e=navigator.userAgent.toLowerCase(),r=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]  #lfb_mainPanel').offset().top-100;1!=a.disableScroll&&($('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is(".lfb_fullscreen")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is(".lfb_popup")?(r=0,a.intro_enabled>0&&(r=lfb_zeroIfNan($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #startInfos').height())+100),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').animate({scrollTop:r},250)):($("header").length>0&&lfb_isAnyParentFixed($("header"))&&(r-=lfb_zeroIfNan($("header").height())),r-=48+parseInt(lfb_getScrollTopMargin(a)),"1"==a.scrollTopPage?$("body,html").animate({scrollTop:0},2*a.animationsSpeed):$("body,html").animate({scrollTop:r},250))),e.match(/(iPad|iPhone|iPod)/i)&&($("#lfb_form :not(.ui-slider-handle) > .tooltip").remove(),$("body > .tooltip").remove(),$('#lfb_form[data-form="'+a.formID+'"] > .tooltip').remove()),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] .lfb_errorMsg').hide(),$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find("a.lfb_button.checked:not(.prechecked)").each(function(){lfb_itemClick($(this),!1,t)}),$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find("div.lfb_selectable.checked:not(.prechecked)").each(function(){lfb_itemClick($(this),!1,t)}),$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find('input[data-toggle="switch"]:checked:not(.prechecked)').each(function(){$(this).trigger("click.auto")});var l=!1,i=0,o=0;jQuery.each(lfb_lastSteps,function(e){var r=this;parseInt(r)==parseInt(a.step)&&(l=!0),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+r+'"] .lfb_executed').removeClass("lfb_executed"),l||($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+r+'"] .lfb_item:not(.lfb-hidden)').length>0||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+r+'"] .lfb_distanceError').length>0)&&!$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+r+'"]').is(".lfb_disabled")&&(i=r,o=e)}),lfb_lastSteps=jQuery.grep(lfb_lastSteps,function(t,a){if(a<=o)return t}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide.lfb_activeStep').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+i+'"] .lfb_genContent').css("opacity",0),lfb_changeStep(i,t)}function lfb_returnToStep(t,a){var e=lfb_getForm(a);if(t!=e.step){navigator.userAgent.toLowerCase().match(/(iPad|iPhone|iPod)/i)&&($("#lfb_form :not(.ui-slider-handle) > .tooltip").remove(),$("body > .tooltip").remove(),$('#lfb_form[data-form="'+e.formID+'"] > .tooltip').remove()),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] .lfb_errorMsg').hide(),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+e.step+'"]').find("a.lfb_button.checked:not(.prechecked)").each(function(){lfb_itemClick($(this),!1,a)}),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+e.step+'"]').find("div.lfb_selectable.checked:not(.prechecked)").each(function(){lfb_itemClick($(this),!1,a)}),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+e.step+'"]').find('input[data-toggle="switch"]:checked:not(.prechecked)').each(function(){$(this).trigger("click.auto")});for(var r=lfb_lastSteps.indexOf(t),l=[],i=r+1;i<lfb_lastSteps.length;
1i++)l.push(lfb_lastSteps[i]);e.itemsData=jQuery.grep(e.itemsData,function(t,a){if(-1==l.indexOf(parseInt(t.stepid)))return t}),lfb_lastSteps=jQuery.grep(lfb_lastSteps,function(t,a){if(a<=r)return t}),lfb_changeStep(t,a),setTimeout(function(){lfb_updateSummary(a,!0)},350),setTimeout(function(){lfb_updateStep(a)},2e3)}}function lfb_prepareStepEntrance(t,a){if(t.removeClass("lfb_stepPrepared lfb_stepEntered"),t.find(".lfb_genContent .lfb_itemBloc").each(function(){this.style.removeProperty("--lfb-step-item-delay")}),!window.matchMedia||!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var e=0;t.find(".lfb_genContent .lfb_itemBloc:not(.lfb_row)").each(function(){this.style.setProperty("--lfb-step-item-delay",220+55*Math.min(e,10)+"ms"),e++}),t.addClass("lfb_stepPrepared")}}function lfb_playStepEntrance(t,a){t.is(".lfb_stepPrepared")&&(t.find(".lfb_stepDescription, .lfb_genContent").stop(!0,!1).css("opacity",""),(window.requestAnimationFrame||function(t){return setTimeout(t,16)})(function(){t.addClass("lfb_stepEntered")}),setTimeout(function(){t.removeClass("lfb_stepPrepared lfb_stepEntered"),t.find(".lfb_genContent .lfb_itemBloc").each(function(){this.style.removeProperty("--lfb-step-item-delay")})},Math.max(650,a.animationsSpeed+1e3)))}function lfb_changeStep(t,a){var e=lfb_getForm(a);if($("#lfb_form :not(.ui-slider-handle) > .tooltip").remove(),$("body > .tooltip").remove(),$('#lfb_form[data-form="'+e.formID+'"] > .tooltip').remove(),$('#lfb_form[data-form="'+e.formID+'"] .datetimepicker ').hide(),e.intro_enabled>0||e.step>0){var r=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"]  #lfb_mainPanel').offset().top-100;1!=e.disableScroll&&($('#lfb_form.lfb_bootstraped[data-form="'+a+'"]').is(".lfb_fullscreen")||$('#lfb_form.lfb_bootstraped[data-form="'+a+'"]').is(".lfb_popup")?(r=0,e.intro_enabled>0&&(r=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #startInfos').height()+100),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"]').animate({scrollTop:r},250)):($("header").length>0&&lfb_isAnyParentFixed($("header"))&&(r-=$("header").height()),r-=48+parseInt(lfb_getScrollTopMargin(e)),"1"==e.scrollTopPage?$("body,html").animate({scrollTop:0},2*e.animationsSpeed):$("body,html").animate({scrollTop:r},250)))}lfb_hideQuantityBtns($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] .quantityBtns'),e.animationsSpeed/4),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide').fadeOut(2*e.animationsSpeed),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_btn-next').fadeOut(e.animationsSpeed/2),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_btnNextContainer').fadeOut(e.animationsSpeed/2),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_linkPreviousCt').fadeOut(e.animationsSpeed/2),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_distanceError').fadeOut(e.animationsSpeed/2);var l=!0;(0==$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnPayStripe').length&&0==$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paypalForm').length&&0==$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_razorPayCt').length&&(l=!1),"final"==t)&&(lfb_updateSummary(a),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] [data-activatePaypal="true"]:not(:checked):not(.checked)').each(function(){var t=$(this).closest(".lfb_genSlide").attr("data-stepid");"final"!=t&&(t=parseInt(t)),-1==jQuery.inArray(t,lfb_lastSteps)||(l=!1)}),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"]').find('[data-dontactivatepaypal="true"].checked,[data-dontactivatepaypal="true"]:checked').length>0&&(l=!1),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] .lfb_paymentSelector').length>0?(lfb_initPaymentSelectors(e),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paymentMethodBtns').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_razorPayCt').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnPayStripe').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnPayStripe').closest(".lfb_btnNextContainer").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] .lfb_btnNextContainerStripe').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paypalForm').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnOrder').closest(".lfb_btnNextContainer").show(),l=!1):l?($('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paymentMethodBtns').show(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paymentMethodBtns').length>0?($('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_razorPayCt').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnPayStripe').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnPayStripe').closest(".lfb_btnNextContainer").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paypalForm').hide()):($('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnPayStripe').length>0&&($('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnPayStripe').show(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] .lfb_btnNextContainerStripe').show(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnOrder').closest(".lfb_btnNextContainer").hide()),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_razorPayCt').show(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paypalForm').length>0&&($('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paypalForm').show(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnOrder').closest(".lfb_btnNextContainer").hide(),setTimeout(function(){$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paypalForm .lfb_btnNextContainer').fadeIn()},2*e.animationsSpeed)))):($('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paymentMethodBtns').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_razorPayCt').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnPayStripe').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paypalForm').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] .lfb_btnNextContainerStripe').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnPayStripe').closest(".lfb_btnNextContainer").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_btnOrder').closest(".lfb_btnNextContainer").show()),!$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"]').is('[data-emaillaststep="1"]')||e.emailSent||e.selectedPaymentMethod||setTimeout(function(){lfb_updatePrice(a),setTimeout(function(){lfb_order(a)},1e3)},1200));var i=$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]'),o=i.find(".lfb_stepTitle"),f=i.find("p.lfb_stepDescription"),s=i.find(".lfb_genContent"),n=i.find(".lfb_totalBottomContainer");if(s.find(".lfb_genContentSlide").removeClass("active"),s.find(".lfb_genContentSlide").eq(0).addClass("active"),lfb_prepareStepEntrance(i,e),s.animate({opacity:0}
1,e.animationsSpeed),f.animate({opacity:0},e.animationsSpeed),o.removeClass("positioned"),o.css({"-webkit-transition":"none",transition:"none"}),n.animate({opacity:0},e.animationsSpeed),"undefined"!=typeof ga)try{ga("set","page",location.pathname+"#"+encodeURIComponent(o.html()).replace(/%20/g,"+")),ga("send","pageview")}catch(t){}if("undefined"!=typeof gtag)try{gtag("event","page_view",{page_location:window.location.href,page_path:location.pathname+"#"+encodeURIComponent(o.html()).replace(/%20/g,"+"),page_title:document.title+" "+o.html()}),gtag("set","page",location.pathname+"#"+encodeURIComponent(o.html()).replace(/%20/g,"+")),gtag("send","pageview")}catch(t){}i.css("opacity",0).show(),i.hide().css("opacity",1);var d=4.5*e.animationsSpeed;if(i.is('[data-start="1"]')?(lfb_initPanelResize(a),d=2.5*e.animationsSpeed,i.fadeIn(2*e.animationsSpeed)):i.delay(2*e.animationsSpeed).fadeIn(2*e.animationsSpeed),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #finalSlide .estimation_project').length>0){var b=lfb_getFormContent(a)[3];$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #finalSlide .estimation_project textarea').val(b),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #finalSlide .estimation_total:not(.gfield_price) input').val(e.price),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #finalSlide .estimation_total.gfield_price .ginput_product_price').html(e.price),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #finalSlide .estimation_total.gfield_price input[id^="ginput_base_price"]').val(e.price)}0==d&&(d=100),setTimeout(function(){(o.css({"-webkit-transition":"all 0.3s ease-out",transition:"all 0.3s ease-out"}).addClass("positioned"),lfb_playStepEntrance(i,e),s.css({paddingTop:""}),s.delay(2*e.animationsSpeed).animate({opacity:1},e.animationsSpeed),f.delay(e.animationsSpeed).animate({opacity:1},e.animationsSpeed),n.delay(2*e.animationsSpeed).animate({opacity:1},e.animationsSpeed),setTimeout(function(){lfb_resize(e),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel').css("max-height","none")},2*e.animationsSpeed),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btn-next').is(".lfb_disabledBtn")?$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btn-next').hide():($(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btn-next').css("display","inline-block").hide(),setTimeout(function(){$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btn-next').is(".lfb_disabledBtn")||($(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btn-next').fadeIn(500),setTimeout(function(){$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btn-next').is(".lfb_disabledBtn")&&$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btn-next').hide()},550))},2*e.animationsSpeed)),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"]  #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .datetimepicker').hide(),"final"==t?(l?0==$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paymentMethodBtns').length&&$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_razorPayCt').length>0&&$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_genContentSlide > .lfb_btnNextContainer').hide():($(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btnNextContainer').fadeIn(500),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btnNextContainerStripe').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_paymentMethodBtns').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_stripeForm  .lfb_stripeContainer').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_stripeForm .lfb_btnNextContainer').hide()),1==e.useSignature&&($('#lfb_form[data-form="'+e.formID+'"] #lfb_signature canvas').attr("width",$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_signature').width()),$('#lfb_form[data-form="'+e.formID+'"] #lfb_signature canvas').css("width",$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] #lfb_signature').width()),e.signature.signature("clear"))):0==e.animationsSpeed?$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btnNextContainer').show():$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_btnNextContainer').fadeIn(500),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"]').is('[data-previousstepbtn="true"]')&&"final"==t?setTimeout(function(){$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"] .lfb_genSlide[data-stepid="'+t+'"] ').find(".linkPrevious").css({marginTop:0}),lfb_lastSteps.length>0&&($(' #lfb_form.lfb_bootstraped[data-form="'+a+'"][data-previousstepbtn="true"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_linkPreviousCt').delay(3*e.animationsSpeed).fadeIn(500),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"]:not([data-previousstepbtn="true"]) #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_linkPreviousCt').delay(3*e.animationsSpeed).css({opacity:0,display:"inline-block"}).animate({opacity:1},600))},1e3):lfb_lastSteps.length>0&&($(' #lfb_form.lfb_bootstraped[data-form="'+a+'"][data-previousstepbtn="true"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_linkPreviousCt').delay(3*e.animationsSpeed).fadeIn(500),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"]:not([data-previousstepbtn="true"]) #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_linkPreviousCt').delay(3*e.animationsSpeed).css({opacity:0,display:"inline-block"}).animate({opacity:1},600)),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] .lfb_distanceError').delay(3*e.animationsSpeed).fadeIn(500),0!=e.disableTipMobile&&lfb_is_touch_device()
1)||(navigator.userAgent.toLowerCase().match(/(iPad|iPhone|iPod)/i)?s.delay(750).find('[data-toggle="tooltip"]').tooltip({html:!0,container:'#lfb_form[data-form="'+a+'"]',trigger:"manual"}).on("show.bs.tooltip",function(){$(this).find(".tooltip-inner").css({maxWidth:$(window).width()})}):s.delay(750).find('[data-toggle="tooltip"]').tooltip({html:!0,container:'#lfb_form[data-form="'+a+'"]'}).on("show.bs.tooltip",function(t,e){$('#lfb_form[data-form="'+a+'"] .tooltip-inner').css({maxWidth:$(window).width()+"px"})}),s.on("enter",function(){"hover"!=this.options.trigger||document.documentElement}));setTimeout(function(){$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide.lfb_activeStep').removeClass("lfb_activeStep"),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').addClass("lfb_activeStep"),s.find(".lfb_itemQtField").each(function(){$(this).parent().next().is(".lfb_itemDes")&&$(this).css({marginTop:20+$(this).parent().next().outerHeight()})}),e.step=t,setTimeout(function(){lfb_updateStep(a),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find('[data-usedistance="true"]').each(function(){lfb_removeDistanceError($(this).attr("data-itemid"),a)},100),$("#lfb_form :not(.ui-slider-handle) > .tooltip").remove(),$("body > .tooltip").remove(),$('#lfb_form[data-form="'+a+'"] > .tooltip').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"]').attr("data-currentstep",t),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"]').trigger("stepChanged")},2*e.animationsSpeed+550),lfb_updatePrice(a),e.backFomFinal&&(e.backFomFinal=!1)},300)},d),0==e.animationsSpeed&&setTimeout(lfb_resizeAll,500),$("#lfb_form :not(.ui-slider-handle) > .tooltip").remove(),$("body > .tooltip").remove(),$('#lfb_form[data-form="'+a+'"] > .tooltip').remove(),lfb_updatePrice(a)}function lfb_findPotentialsSteps(t,a){var e=lfb_getForm(a),r=new Array,l=new Array,i=new Array,o=0;return jQuery.each(e.links,function(){var e=this;if(e.originID==t){var f=!1,s=!0;if(e.conditions&&"[]"!=e.conditions){e.conditionsO=JSON.parse(e.conditions);var n=lfb_checkConditions(e.conditionsO,a,t);f=n.error,s=n.errorOR}else i.push(e.destinationID),s=!1;("OR"==e.operator&&!s||"OR"!=e.operator&&!f)&&(e.conditionsO=JSON.parse(e.conditions),l.push({stepID:parseInt(e.destinationID),nbConditions:e.conditionsO.length}),e.conditionsO.length>
1o&&(o=e.conditionsO.length),r.push(parseInt(e.destinationID)))}}),0==t&&r.push(parseInt($('#lfb_form.lfb_bootstraped[data-form="'+a+'"]  #lfb_mainPanel .lfb_genSlide[data-start="1"]').attr("data-stepid"))),0==r.length?r.push("final"):i.length>0&&i.length<r.length&&(jQuery.each(i,function(){var t=this;r=jQuery.grep(r,function(a){return a!=t})}),o>0&&jQuery.each(r,function(t){jQuery.each(l,function(a){a.stepID==t&&a.nbConditions<o&&(r=jQuery.grep(r,function(a){return a!=t}))})})),r}function lfb_nextStep(t){var a=lfb_getForm(t);$("#lfb_bootstraped :not(.ui-slider-handle) > .tooltip").remove(),$('#lfb_form[data-form="'+a.formID+'"] > .tooltip').remove(),navigator.userAgent.toLowerCase().match(/(iPad|iPhone|iPod)/i)&&setTimeout(function(){$("#lfb_bootstraped :not(.ui-slider-handle) > .tooltip").remove()},500),lfb_updateShowSteps(t),$(".lfb_errorMsg").hide();var e=!0,r=!0,l=lfb_findPotentialsSteps(a.step,t);if(a.step>0&&(1==$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').data("required")&&(e=!1,($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find('select:not(.lfb_disabled):not([data-firstvaluedisabled="true"])').length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find("div.lfb_selectable.checked:not(.lfb_disabled)").length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find("a.lfb_button.checked:not(.lfb_disabled)").length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find('input[data-toggle="switch"]:checked:not(.lfb_disabled)').length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find("input[type=text][data-title].checked:not(.lfb_disabled)").length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find('[data-itemtype="rate"][data-title].checked:not(.lfb_disabled)').length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find("input[type=number][data-itemid].checked:not(.lfb_disabled)").length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find("input[type=file].checked:not(.lfb_disabled)").length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find(".lfb_colorPreview:not(.lfb_disabled)").length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find(".dz-preview[data-file].dz-success.dz-complete").length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find('div[data-type="pricetable"].checked:not(.lfb_disabled)').length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find('div[data-type="iconpicker"].checked:not(.lfb_disabled)').length>0||$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find('div[data-type="repeater"].checked:not(.lfb_disabled)').length>0)&&(e=!0),e||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"]').find('select:not(.lfb_disabled)[data-firstvaluedisabled="true"]').each(function(){(!$(this).is(".lfb_selectpicker")&&$(this).find("option:selected").index()>0||$(this).is(".lfb_selectpicker")&&$(this).find("option:selected").index()>1)&&(e=!0)})),r=lfb_checkStepItemsValid(a.step,t)),e&&r&&lfb_checkUserEmail(a)){lfb_lastStepID=a.step,parseFloat(lfb_lastStepID)!=parseInt(lfb_lastStepID)||isNaN(lfb_lastStepID)||-1==jQuery.inArray(parseInt(a.step),lfb_lastSteps)&&lfb_lastSteps.push(parseInt(a.step));$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+lfb_lastStepID+'"] .lfb_stepTitle').html();$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is(".lfb_fullscreen")&&!$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is(".lfb_popup")&&history.pushState({id:lfb_lastStepID},"","");var i=l[0];if("final"!=i&&-1==(i=lfb_getNextEnabledStep(t,l))&&(i="final"),1==a.sendContactASAP&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"] [data-fieldtype="email"]').length>0&&lfb_checkEmail($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"] [data-fieldtype="email"]').val())){a.contactSent=1;var o=lfb_getContactInformations(t);jQuery.ajax({url:a.ajaxurl,type:"post",data:{action:"lfb_sendCt",formID:t,email:o.email,lastName:o.lastName,firstName:o.firstName,phone:o.phone,country:o.country,zip:o.zip,state:o.state,city:o.city,address:o.address},success:function(t){}}
1)}lfb_changeStep(i,t)}else e||($(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_errorMsg').slideDown(),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').trigger("stepError"))}function lfb_getNextEnabledStep(t,a){var e=-1,r=a[0];return"final"!=r&&($('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is(".lfb_visualEditing")||!$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]  #lfb_mainPanel .lfb_genSlide[data-stepid="'+r+'"]').is(".lfb_disabled")&&($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+r+'"] .lfb_item:not(.lfb_row ):not(.lfb-hidden)').length>0||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+r+'"] .lfb_distanceError').length>0)?e=r:(lfb_lastSteps.push(parseInt(r)),lfb_updatePrice(t),e=lfb_getNextEnabledStep(t,lfb_findPotentialsSteps(parseInt(r),t)))),e}function lfb_openGenerator(t){var a=lfb_getForm(t);$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]  #startInfos').addClass("lfb_loaded"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]  #startInfos > p').slideDown(),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnFloatingSummary').css({display:"inline-block"}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').css({display:"inline-block"}),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_btnStart').parent().fadeOut(a.animationsSpeed),setTimeout(function(){"2"!=a.showSteps&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').find(".genPrice,#lfb_stepper").fadeIn(a.animationsSpeed),a.autoStart||($(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel').show(),setTimeout(function(){lfb_nextStep(t)},a.animationsSpeed+a.animationsSpeed/2))},a.animationsSpeed)}function lfb_changeContentSlide(t,a){var e=$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+form.step+'"]').find(".lfb_genContent").find(".lfb_genContentSlide.active").index();"left"==t?e>0?e--:e=$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+form.step+'"]').find(".lfb_genContent").find(".lfb_genContentSlide").length:e<$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+form.step+'"]').find(".lfb_genContent").find(".lfb_genContentSlide").length-1?e++:e=0,$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+form.step+'"]').find(".lfb_genContent").find(".lfb_genContentSlide.active").fadeOut(500,function(){$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+form.step+'"]').find(".lfb_genContent").find(".lfb_genContentSlide.active").removeClass("active"),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+form.step+'"]').find(".lfb_genContent").find(".lfb_genContentSlide").eq(e).delay(200).fadeIn(500,function(){$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+form.step+'"]').find(".lfb_genContent").find(".lfb_genContentSlide").eq(e).delay(250).addClass("active")})})}function lfb_toggleField(t,a){var e=lfb_getForm(a);$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #field_'+t+"_cb").is(":checked")?($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #field_'+t).addClass("opened"),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #field_'+t).slideDown(250)):($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #field_'+t).removeClass("opened"),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #field_'+t).slideUp(250)),setTimeout(function(){lfb_resize(e)},300)}function lfb_finalStep(t){var a=lfb_getForm(t);if(a.step++,1==a.enablePdfDownload){var e=window.open(a.homeUrl+"/index.php?EPFormsBuilder=downloadMyOrder","_blank");"null"!=typeof e&&null!=e&&(e.focus(),setTimeout(function(){e.close()},400))}$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').trigger("formSent"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_loader').delay(800).fadeOut(2*a.animationsSpeed),0==a.redirectionDelay&&(a.redirectionDelay=1),setTimeout(function(){var e=lfb_getRedirectionURL(t);""!=e&&"#"!=e&&" "!=e&&(""!=a.urlVariables&&e.indexOf("?")>-1&&a.urlVariables.replace("?","&"),document.location.href=e+a.urlVariables)},1e3*a.redirectionDelay)}function lfb_checkLastStepFields(t){var a=lfb_getForm(t),e=!0;return $('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide input[type=text],#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide input[type=email], #lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide textarea').each(function(){0==$(this).closest("#lfb_paypalForm").length&&($(this).is(".lfb_disabled")||($(this).attr("data-required")&&"true"==$(this).attr("data-required")&&$(this).val().length<1&&(e=!1,$(this).closest(".form-group").addClass("has-error"),$(this).is("#lfb_captchaField")||1!=a.disableScroll&&($('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"]').is(".lfb_fullscreen")||$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"]').is(".lfb_popup")?$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"]').animate({scrollTop:$(this).parent().offset().top-(80+parseInt(lfb_getScrollTopMargin(a)))},2*a.animationsSpeed):"1"==a.scrollTopPage?$("body,html").animate({scrollTop:0},2*a.animationsSpeed):$("body,html").animate({scrollTop:$(this).parent().offset().top-(80+parseInt(lfb_getScrollTopMargin(a)))},2*a.animationsSpeed))),$(this).is(".emailField")&&!lfb_checkEmail($(this).val())&&(e=!1,$(this).closest(".form-group").addClass("has-error"),1!=a.disableScroll&&($('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"]').is(".lfb_fullscreen")||$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"]').is(".lfb_popup")?$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"]').animate({scrollTop:$(this).parent().offset().top-(80+parseInt(lfb_getScrollTopMargin(a)))},2*a.animationsSpeed):"1"==a.scrollTopPage?$("body,html").animate({scrollTop:0},2*a.animationsSpeed):$("body,html").animate({scrollTop:$(this).parent().offset().top-(80+parseInt(lfb_getScrollTopMargin(a)))},2*a.animationsSpeed)))))}),e}function lfb_checkConditions(t,a,e,r){var l=!1,i=lfb_getForm(a),o=!0;void 0===r&&(r=!1);var f=JSON.parse(JSON.stringify(lfb_lastSteps));return"final"!=i.step&&-1==jQuery.inArray(parseInt(i.step),f)?f.push(parseInt(i.step)):"final"==i.step&&-1==jQuery.inArray("final",f)&&f.push("final"),jQuery.each(t,function(){var t=this;if("_"!=t.interaction.substr(0,1)&&"v_"!=t.interaction.substr(0,2)){0==(I=t.interaction.substr(0,t.interaction.indexOf("_")))&&(I="final");var s=!0;if(r&&-1==f.indexOf(parseInt(I))&&(l=!t.action||"unclicked"!=t.action,s=!1),t.value&&"string"==typeof t.value&&(t.value=t.value.replace(/&lt;/g,"<"),t.value=t.value.replace(/&gt;/g,">")),s){var n=t.interaction.substr(t.interaction.indexOf("_")+1,t.interaction.length);if($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+I+'"] .lfb_genContent [data-itemid="'+n+'"]').length>0){var d=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+I+'"] .lfb_genContent [data-itemid="'+n+'"]');if(d.is(".lfb_disabled")||d.closest(".lfb_genSlide").is(".lfb_disabled"))"unclicked"!=t.action?l=!0:o=!1;else{if(t.value&&"string"==typeof t.value&&t.value.indexOf("_")>-1)if("_"!=t.value.substr(0,1)){var b=t.value.substr(0,t.value.indexOf("_")),m=t.value.substr(t.value.indexOf("-")+1,t.value.length);0==b&&(b="final");var p=t.value.substr(t.value.indexOf("_")+1,t.value.indexOf("-")-(t.value.indexOf("_")+1));if("v"==b)t.value=parseFloat(lfb_getVariableByID(i,p).value);else if("stepqt"==m)t.value=lfb_getStepQuantities(I,a,n);else{(y=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+b+'"] .lfb_genContent [data-itemid="'+p+'"]')).length>0&&(""==m?void 0!==y.data("resprice")?t.value=parseFloat(y.data("resprice")):y.is("[data-resqt]")&&(t.value=parseFloat(y.attr("data-resqt"))):"quantity"==m?y.is(".lfb_disabled")?t.value=0:y.is('input[type="number"]')?t.value=y.val():y.find(".lfb_qtfield").length>0?t.value=parseInt(y.find(".lfb_qtfield").val()):t.value=parseInt(y.find(".icon_quantity").html()):"value"==m&&(y.is(".lfb_disabled")?t.value="":(t.value=y.val(),y.is(".lfb_datepicker")&&(t.value=moment.utc(y.datetimepicker("getDate")).format("YYYY-MM-DD")),t.value=t.value.replace(/\`/g,"'"))))}}else"_total"==t.value||"_total-"==t.value?t.value=i.price:"_total_qt"==t.value&&(t.value=lfb_getTotalQuantities(a,e,n));else t.value&&"string"==typeof t.value&&(t.value=t.value.replace(/\`/g,"'"));switch(t.action){case"clicked":d.closest(".lfb_itemBloc").is(".lfb_disabled")?l=!0:d.is('[type="checkbox"]')?(d.is(":checked")||(l=!0),d.is(":checked")&&(o=!1)):(d.is(".checked")||d.is(":checked")||(l=!0),(d.is(".checked")||d.is(":checked"))&&(o=!1));break;case"unclicked":d.closest(".lfb_itemBloc").is(".lfb_disabled")?(o=!1,l=!1):((d.is(':not([type="checkbox"]).checked')||d.is(":checked"))&&(l=!0),d.is(':not([type="checkbox"]).checked')||d.is(":checked")||(o=!1));break;case"filled":d.is(".lfb_dropzone")?0==d.find(".dz-preview[data-file].dz-success.dz-complete").length?l=!0:o=!1:0==d.val().length?l=!0:o=!1;break;case"equal":d.is(".lfb_datepicker")?d.is('[data-datetype="date"]')?(moment.utc(d.datetimepicker("getDate")).format("YYYY-MM-DD")!=t.value&&(l=!0),moment.utc(d.datetimepicker("getDate")).format("YYYY-MM-DD")==t.value&&(o=!1)):d.is('[data-datetype="time"]')?(moment(d.datetimepicker("getDate")).format("HH:mm")!=t.value&&(l=!0),moment(d.datetimepicker("getDate")).format("HH:mm")==t.value&&(o=!1)):(moment.utc(d.datetimepicker("getDate")).isSame(moment.utc(t.value).format("YYYY-MM-DD HH:mm"))||(l=!0),moment.utc(d.datetimepicker("getDate")).isSame(moment.utc(t.value).format("YYYY-MM-DD HH:mm"))&&(o=!1)):d.val()!=t.value?l=!0:o=!1;break;case"different":d.val()==t.value?l=!0:o=!1;break;case"PriceSuperior":var c=parseFloat(d.data("resprice"));(d.is(".lfb_button:not(.checked)")||d.is(".lfb_selectable:not(.checked)")||d.is("input[type=checkbox]:not(:checked)")||c<=t.value)&&(l=!0),(d.is(".checked")||d.is(":checked"))&&c>t.value&&(o=!1);break;
1case"PriceInferior":c=parseFloat(d.data("resprice"));(d.is(".lfb_button:not(.checked)")||d.is(".lfb_selectable:not(.checked)")||d.is("input[type=checkbox]:not(:checked)")||c>=t.value)&&(l=!0),(d.is(".checked")||d.is(":checked"))&&c<t.value&&(o=!1);break;case"PriceEqual":c=parseFloat(d.data("resprice"));(d.is(".lfb_button:not(.checked)")||d.is(".lfb_selectable:not(.checked)")||d.is("input[type=checkbox]:not(:checked)")||c!=t.value)&&(l=!0),(d.is(".checked")||d.is(":checked"))&&c==t.value&&(o=!1);break;case"PriceDifferent":c=parseFloat(d.data("resprice"));(d.is(".lfb_button:not(.checked)")||d.is(".lfb_selectable:not(.checked)")||d.is("input[type=checkbox]:not(:checked)")||c==t.value)&&(l=!0),(d.is(".checked")||d.is(":checked"))&&c!=t.value&&(o=!1);break;case"QtSuperior":(d.is(".lfb_selectable:not(.checked)")||d.find(".icon_quantity").length>0&&parseInt(d.find(".icon_quantity").html())<=t.value||d.find(".lfb_qtfield").length>0&&parseInt(d.find(".lfb_qtfield").val())<=t.value||d.is('[data-type="slider"]')&&d.is(".ui-slider")&&parseInt(d.slider("value"))<=t.value)&&(l=!0),d.is(".lfb_selectable")?(d.is(".lfb_selectable.checked")&&parseInt(d.find(".icon_quantity").html())>t.value||parseInt(d.find(".lfb_qtfield").val())>t.value)&&(o=!1):d.is('[data-type="slider"]')&&d.is(".ui-slider")&&parseInt(d.slider("value"))>t.value&&(o=!1),d.is("input")&&(parseInt(d.val())<=t.value&&(l=!0),parseInt(d.val())>t.value&&(o=!1));break;case"QtInferior":(d.is(".lfb_selectable:not(.checked)")||d.find(".icon_quantity").length>0&&parseInt(d.find(".icon_quantity").html())>=t.value||d.find(".lfb_qtfield").length>0&&parseInt(d.find(".lfb_qtfield").val())>=t.value||d.is('[data-type="slider"]')&&d.is(".ui-slider")&&parseInt(d.slider("value"))>=t.value)&&(l=!0),d.is(".lfb_selectable")?(d.is(".lfb_selectable.checked")&&parseInt(d.find(".icon_quantity").html())<t.value||parseInt(d.find(".lfb_qtfield").val())<t.value)&&(o=!1):d.is('[data-type="slider"]')&&d.is(".ui-slider")&&parseInt(d.slider("value"))<t.value&&(o=!1),d.is("input")&&(parseInt(d.val())>=t.value&&(l=!0),parseInt(d.val())<t.value&&(o=!1));break;case"QtEqual":(d.is(".lfb_selectable:not(.checked)")||d.find(".icon_quantity").length>0&&parseInt(d.find(".icon_quantity").html())!=t.value||d.find(".lfb_qtfield").length>0&&parseInt(d.find(".lfb_qtfield").val())!=t.value||d.is('[data-type="slider"]')&&d.is(".ui-slider")&&parseInt(d.slider("value"))!=t.value)&&(l=!0),d.is(".lfb_selectable")?(d.is(".lfb_selectable.checked")&&parseInt(d.find(".icon_quantity").html())==t.value||parseInt(d.find(".lfb_qtfield").val())==t.value)&&(o=!1):d.is('[data-type="slider"]')&&d.is(".ui-slider")&&parseInt(d.slider("value"))==t.value&&(o=!1),d.is("input")&&(parseInt(d.val())!=t.value&&(l=!0),parseInt(d.val())==t.value&&(o=!1));break;case"QtDifferent":(d.is(".lfb_selectable:not(.checked)")||d.find(".icon_quantity").length>0&&parseInt(d.find(".icon_quantity").html())==t.value||d.find(".lfb_qtfield").length>0&&parseInt(d.find(".lfb_qtfield").val())==t.value||d.is('[data-type="slider"]')&&d.is(".ui-slider")&&parseInt(d.slider("value"))==t.value)&&(l=!0),d.is(".lfb_selectable")?(d.is(".lfb_selectable.checked")&&parseInt(d.find(".icon_quantity").html())!=t.value||parseInt(d.find(".lfb_qtfield").val())!=t.value)&&(o=!1):d.is('[data-type="slider"]')&&d.is(".ui-slider")&&parseInt(d.slider("value"))!=t.value&&(o=!1),d.is("input")&&(parseInt(d.val())==t.value&&(l=!0),parseInt(d.val())!=t.value&&(o=!1));break;case"superior":if(d.is(".lfb_datepicker"))d.is('[data-datetype="date"]')?(moment(d.datetimepicker("getDate")).format("YYYY-MM-DD 00:00")<=moment(t.value).format("YYYY-MM-DD 00:00")&&(l=!0),moment(d.datetimepicker("getDate")).format("YYYY-MM-DD 00:00")>moment(t.value).format("YYYY-MM-DD 00:00")&&(o=!1)):d.is('[data-datetype="time"]')?(moment(d.datetimepicker("getDate")).format("HH:mm")<=t.value&&(l=!0),moment.utc(d.datetimepicker("getDate")).format("HH:mm")>t.value&&(o=!1)):(moment.utc(d.datetimepicker("getDate")).isSameOrBefore(moment.utc(t.value).format("YYYY-MM-DD HH:mm"))&&(l=!0),moment.utc(d.datetimepicker("getDate")).isAfter(moment.utc(t.value).format("YYYY-MM-DD HH:mm"))&&(o=!1));else if(d.is(".lfb_timepicker")){var _=parseInt(t.value.substr(0,t.value.indexOf(":"))),u=parseInt(t.value.substr(t.value.indexOf(":")+1,2));t.value.indexOf("PM")>0&&12!=_&&(_+=12);var h=parseInt(d.val().substr(0,d.val().indexOf(":"))),g=parseInt(d.val().substr(d.val().indexOf(":")+1,2));d.val().indexOf("PM")>0&&12!=h&&(h+=12),(h<_||h==_&&g<=u)&&(l=!0),(h>_||h==_&&g>u)&&(o=!1)}else d.is('input[type="number"]')?(parseFloat(d.val())<=parseFloat(t.value)&&(l=!0),parseFloat(d.val())>parseFloat(t.value)&&(o=!1)):d.is('[data-itemtype="rate"]')&&(parseFloat(d.find(".lfb_rate").rate("getValue"))<=parseFloat(t.value)&&(l=!0),parseFloat(d.find(".lfb_rate").rate("getValue"))>parseFloat(t.value)&&(o=!1));break;case"inferior":if(d.is(".lfb_datepicker"))d.is('[data-datetype="date"]')?(moment.utc(d.datetimepicker("getDate")).format("YYYY-MM-DD")>=t.value&&(l=!0),moment.utc(d.datetimepicker("getDate")).format("YYYY-MM-DD")<t.value&&(o=!1)):d.is('[data-datetype="time"]')?(moment.utc(d.datetimepicker("getDate")).format("HH:mm")>=t.value&&(l=!0),moment.utc(d.datetimepicker("getDate")).format("HH:mm")<t.value&&(o=!1)):(moment.utc(d.datetimepicker("getDate")).isSameOrAfter(moment.utc(t.value).format("YYYY-MM-DD HH:mm"))&&(l=!0),moment.utc(d.datetimepicker("getDate")).isBefore(moment.utc(t.value).format("YYYY-MM-DD HH:mm"))&&(o=!1));else if(d.is(".lfb_timepicker")){_=parseInt(t.value.substr(0,t.value.indexOf(":"))),u=parseInt(t.value.substr(t.value.indexOf(":")+1,2));t.value.indexOf("PM")>0&&12!=_&&(_+=12);h=parseInt(d.val().substr(0,d.val().indexOf(":"))),g=parseInt(d.val().substr(d.val().indexOf(":")+1,2));d.val().indexOf("PM")>0&&12!=h&&(h+=12),(h>_||h==_&&g>=u)&&(l=!0),(h<_||h==_&&g<u)&&(o=!1)}else d.is('input[type="number"]')?(parseFloat(d.val())>=parseFloat(t.value)&&(l=!0),parseFloat(d.val())<parseFloat(t.value)&&(o=!1)):d.is('[data-itemtype="rate"]')&&(parseFloat(d.find(".lfb_rate").rate("getValue"))>=parseFloat(t.value)&&(l=!0),parseFloat(d.find(".lfb_rate").rate("getValue"))<parseFloat(t.value)&&(o=!1));break;case"equal":if(d.is(".lfb_datepicker"))d.is('[data-datetype="date"]')?(moment.utc(d.datetimepicker("getDate")).format("YYYY-MM-DD")!=t.value&&(l=!0),moment.utc(d.datetimepicker("getDate")).format("YYYY-MM-DD")==t.value&&(o=!1)):d.is('[data-datetype="time"]')?(moment.utc(d.datetimepicker("getDate")).format("HH:mm")!=t.value&&(l=!0),moment.utc(d.datetimepicker("getDate")).format("HH:mm")==t.value&&(o=!1)):(moment.utc(d.datetimepicker("getDate")).isSame(moment.utc(t.value).format("YYYY-MM-DD HH:mm"))||(l=!0),moment.utc(d.datetimepicker("getDate")).isSame(moment.utc(t.value).format("YYYY-MM-DD HH:mm"))&&(o=!1));else if(d.is(".lfb_timepicker")){_=parseInt(t.value.substr(0,t.value.indexOf(":"))),u=parseInt(t.value.substr(t.value.indexOf(":")+1,2));t.value.indexOf("PM")>0&&12!=_&&(_+=12);h=parseInt(d.val().substr(0,d.val().indexOf(":"))),g=parseInt(d.val().substr(d.val().indexOf(":")+1,2));d.val().indexOf("PM")>0&&12!=h&&(h+=12),h!=_&&(l=!0),h==_&&(o=!1)}else d.is('input[type="number"]')?(parseFloat(d.val())!=parseFloat(t.value)&&(l=!0),parseFloat(d.val())==parseFloat(t.value)&&(o=!1)):d.is('[data-itemtype="rate"]')&&(parseFloat(d.find(".lfb_rate").rate("getValue"))!=parseFloat(t.value)&&(l=!0),parseFloat(d.find(".lfb_rate").rate("getValue"))==parseFloat(t.value)&&(o=!1));break;case"different":if(d.is(".lfb_datepicker"))d.is('[data-datetype="date"]')?(moment.utc(d.datetimepicker("getDate")).format("YYYY-MM-DD")==t.value&&(l=!0),moment.utc(d.datetimepicker("getDate")).format("YYYY-MM-DD")!=t.value&&(o=!1)):d.is('[data-datetype="time"]')?(moment.utc(d.datetimepicker("getDate")).format("HH:mm")==t.value&&(l=!0),moment.utc(d.datetimepicker("getDate")).format("HH:mm")!=t.value&&(o=!1)):(moment.utc(d.datetimepicker("getDate")).isSame(moment.utc(t.value).format("YYYY-MM-DD HH:mm"))&&(l=!0),moment.utc(d.datetimepicker("getDate")).isSame(moment.utc(t.value).format("YYYY-MM-DD HH:mm"))||(o=!1));else if(d.is(".lfb_timepicker")){_=parseInt(t.value.substr(0,t.value.indexOf(":"))),u=parseInt(t.value.substr(t.value.indexOf(":")+1,2));t.value.indexOf("PM")>0&&12!=_&&(_+=12);h=parseInt(d.val().substr(0,d.val().indexOf(":"))),g=parseInt(d.val().substr(d.val().indexOf(":")+1,2));d.val().indexOf("PM")>0&&12!=h&&(h+=12),h==_&&(l=!0),h!=_&&(o=!1)}else d.is('input[type="number"]')?(parseFloat(d.val())==parseFloat(t.value)&&(l=!0),parseFloat(d.val())!=parseFloat(t.value)&&(o=!1)):d.is('[data-itemtype="rate"]')&&(parseFloat(d.find(".lfb_rate").rate("getValue"))==parseFloat(t.value)&&(l=!0),parseFloat(d.find(".lfb_rate").rate("getValue"))!=parseFloat(t.value)&&(o=!1))}}}}}else{if("v_"==t.interaction.substr(0,2)){p=t.interaction.substr(t.interaction.indexOf("_")+1,t.interaction.length-(t.interaction.indexOf("_")+1));var v=parseFloat(lfb_getVariableByID(i,p).value);if("text"==lfb_getVariableByID(i,p).type&&(v=lfb_getVariableByID(i,p).value),t.value&&"string"==typeof t.value&&t.value.indexOf("_")>-1)if("_"!=t.value.substr(0,1)){b=t.value.substr(0,t.value.indexOf("_")),m=t.value.substr(t.value.indexOf("-")+1,t.value.length);0==b&&(b="final");p=t.value.substr(t.value.indexOf("_")+1,t.value.indexOf("-")-(t.value.indexOf("_")+1));if("v"==b)t.value=parseFloat(lfb_getVariableByID(i,p).value);else if("stepqt"==m)t.value=lfb_getStepQuantities(I,a,n);else{var y;(y=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+b+'"] .lfb_genContent [data-itemid="'+p+'"]')).length>0&&(""==m?void 0!==y.data("resprice")?t.value=parseFloat(y.data("resprice")):y.is("[data-resqt]")&&(t.value=parseFloat(y.attr("data-resqt"))):"quantity"==m?y.is(".lfb_disabled")?t.value=0:y.is('input[type="number"]')?t.value=y.val():y.find(".lfb_qtfield").length>0?t.value=parseInt(y.find(".lfb_qtfield").val()):t.value=parseInt(y.find(".icon_quantity").html()):"value"==m&&(y.is(".lfb_disabled")?t.value="":(t.value=y.val(),y.is(".lfb_datepicker")&&(t.value=moment.utc(y.datetimepicker("getDate")).format("YYYY-MM-DD")),t.value=t.value.replace(/\`/g,"'"))))}}else"_total"==t.value||"_total-"==t.value?t.value=i.price:"_total_qt"==t.value&&(t.value=lfb_getTotalQuantities(a,e,n));else t.value&&"string"==typeof t.value&&(t.value=t.value.replace(/\`/g,"'"));switch(t.action){case"superior":v<=t.value&&(l=!0),v>t.value&&(o=!1);break;case"inferior":v>=t.value&&(l=!0),v<t.value&&(o=!1);break;case"equal":v!=t.value&&(l=!0),v==t.value&&(o=!1);break;case"different":v==t.value&&(l=!0),v!=t.value&&(o=!1)}}else if(t.interaction&&t.interaction.length>6&&"_step-"==t.interaction.substr(0,6)){var I;0==(I=t.interaction.substr(6,t.interaction.length))&&(I="final");var D=lfb_getStepQuantities(a,I,n);switch(t.action){case"superior":D<=t.value&&(l=!0),D>t.value&&(o=!1);break;case"inferior":D>=t.value&&(l=!0),D<t.value&&(o=!1);break;case"equal":D!=t.value&&(l=!0),D==t.value&&(o=!1);break;case"different":D==t.value&&(l=!0),D!=t.value&&(o=!1)}}
1if("_total"==t.interaction)switch(t.action){case"superior":parseFloat(i.price)<=parseFloat(t.value)&&(l=!0),parseFloat(i.price)>parseFloat(t.value)&&(o=!1);break;case"inferior":parseFloat(i.price)>=parseFloat(t.value)&&(l=!0),parseFloat(i.price)<parseFloat(t.value)&&(o=!1);break;case"equal":parseFloat(i.price)!=parseFloat(t.value)&&(l=!0),parseFloat(i.price)==parseFloat(t.value)&&(o=!1);break;case"different":parseFloat(i.price)==t.value&&(l=!0),parseFloat(i.price)!=t.value&&(o=!1)}else if("_total_qt"==t.interaction){D=lfb_getTotalQuantities(a,e);switch(t.action){case"superior":D<=t.value&&(l=!0),D>t.value&&(o=!1);break;case"inferior":D>=t.value&&(l=!0),D<t.value&&(o=!1);break;case"equal":D!=t.value&&(l=!0),D==t.value&&(o=!1);break;case"different":D==t.value&&(l=!0),D!=t.value&&(o=!1)}}}}),0==t.length&&(o=!1),{error:l,errorOR:o}}function lfb_scrollToItem(t,a,e){var r=lfb_getForm(e);1!=r.disableScroll&&($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').is(".lfb_fullscreen")||$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').is(".lfb_popup")?$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').animate({scrollTop:t.parent().offset().top-(80+parseInt(lfb_getScrollTopMargin(r)))},2*r.animationsSpeed):"1"==r.scrollTopPage?$("body,html").animate({scrollTop:0},2*r.animationsSpeed):$("body,html").animate({scrollTop:t.parent().offset().top-(80+parseInt(lfb_getScrollTopMargin(r)))},2*r.animationsSpeed))}function lfb_validateRepeater(t,a,e){if(t.closest(".lfb_itemBloc.lfb_disabled").length>0||t.is(".lfb_disabled"))return!0;var r=lfb_getRepeaterConfig(t),l=lfb_getRepeaterRowsData(t),i=parseInt(r.minRows,10)||0;if(t.is('[data-required="true"]')&&i<1&&(i=1),l.length<i)return t.closest(".lfb_itemBloc").addClass("has-error"),lfb_scrollToItem(t,a,e),!1;var o=!0;return t.find("tbody tr").each(function(){var t=$(this),a=!1;if(t.find(".lfb_repeaterField").each(function(){var t=$(this).is(":checkbox")?$(this).is(":checked")?"1":"":$(this).val();""!==t&&null!==t&&(a=!0)}),!a)return!0;t.find('.lfb_repeaterField[data-required="true"]').each(function(){var t=$(this).is(":checkbox")?$(this).is(":checked")?"1":"":$(this).val();""!==t&&null!==t||($(this).closest("td").addClass("has-error"),o=!1)})}),o||(t.closest(".lfb_itemBloc").addClass("has-error"),lfb_scrollToItem(t,a,e)),o}function lfb_checkStepItemsValid(t,a){var e=!0,r=!1,l=lfb_getForm(a);($(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find(".has-error").removeClass("has-error"),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find(".icon_select.lfb_error").removeClass("lfb_error"),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find("input[type=text]:not(.lfb_disabled),input[type=password]:not(.lfb_disabled),select").each(function(){if(0==$(this).closest(".lfb_itemBloc.lfb_disabled").length&&0==$(this).closest("#lfb_stripeForm").length&&0==$(this).closest("#lfb_paypalForm").length)if($(this).is('[data-required="true"]')&&$(this).val().length<1&&(e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a),r=!0),$(this).is('[data-validation="phone"]')&&$(this).val().length>0&&($(this).val().length<5||0==/^(?:(?:\(?(?:00|\+)([1-4]\d\d|[1-9]\d?)\)?)?[\-\.\ \\\/]?)?((?:\(?\d{1,}\)?[\-\.\ \\\/]?){0,})(?:[\-\.\ \\\/]?(?:#|ext\.?|extension|x)[\-\.\ \\\/]?(\d+))?$/i.test($(this).val())))e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a),r=!0;else if($(this).is('[data-validation="number"]')&&0==/^\d+$/.test($(this).val()))e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a),r=!0;else if($(this).is('[data-validation="email"]')&&$(this).val().length>0&&!lfb_checkEmail($(this).val()))e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a),r=!0;else if($(this).is('[data-validation="fill"]')&&0==$(this).val().length)e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a),r=!0;else if($(this).is('[data-validation="custom"]')&&$(this).val().length>0){var l=!1;if(parseInt($(this).attr("data-validmin"))>0&&$(this).val().length<parseInt($(this).attr("data-validmin"))&&(l=!0),parseInt($(this).attr("data-validmax"))>0&&$(this).val().length>parseInt($(this).attr("data-validmax"))&&(l=!0),$(this).is("[data-validcar]")&&""!=$(this).attr("data-validcar")){var i=$(this);if($(this).attr("data-validcar").indexOf(",")>-1){var o=$(this).attr("data-validcar").split(",");jQuery.each(o,function(){-1==i.val().indexOf(this)&&(l=!0)})}else-1==i.val().indexOf($(this).attr("data-validcar"))&&(l=!0)}l&&(e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a),r=!0)}}),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find("input[type=text][minlength]:not(.lfb_disabled)").each(function(){0==$(this).closest(".lfb_row.lfb_disabled").length&&$(this).val().length<$(this).attr("minlength")&&(e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a))}),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find('select[data-required="true"]:not(.lfb_disabled)').each(function(){0==$(this).closest(".lfb_row.lfb_disabled").length&&$(this).is('[data-firstvaluedisabled="true"]')&&(!$(this).is(".lfb_selectpicker")&&0==$(this).find("option:selected").index()||$(this).is(".lfb_selectpicker")&&$(this).val()==$(this).find("option").first().attr("value"))&&(e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a))}),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find("input[type=text][minlength]:not(.lfb_disabled)").each(function(){0==$(this).closest(".lfb_row.lfb_disabled").length&&$(this).val().length<$(this).attr("minlength")&&(e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a))}),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find('input[type=number][data-required="true"]:not(.lfb_disabled)').each(function(){0==$(this).closest(".lfb_row.lfb_disabled").length&&(""!=$(this).val()&&0!=$(this).val()||(e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a)))}),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find(".lfb_dropzone:not(.lfb_disabled)").each(function(){0==$(this).closest(".lfb_row.lfb_disabled").length&&($(this).is('[data-required="true"]')&&0==$(this).find(".dz-preview[data-file].dz-success.dz-complete").length||$(this).find(".dz-preview[data-file].dz-complete").length>parseInt($(this).attr("data-maxfiles")))&&(e=!1,$(this).parent().addClass("has-error"),r||lfb_scrollToItem($(this),t,a))}),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find('textarea[data-required="true"]:not(.lfb_disabled)').each(function(){0==$(this).closest(".lfb_row.lfb_disabled").length&&0==$(this).closest("#lfb_stripeForm").length&&0==$(this).closest("#lfb_paypalForm").length&&$(this).val().length<1&&(e=!1,$(this).closest(".form-group").addClass("has-error"),r||lfb_scrollToItem($(this),t,a))}),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find('input[type=checkbox][data-required="true"]:not(.lfb_disabled)').each(function(){$(this).is(":checked")||(!$(this).is("[data-group]")||""!=$(this).attr("data-group")&&0==$(' #lfb_form[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] [data-group="'+$(this).attr("data-group")+'"]:checked').length)&&0==$(this).closest(".lfb_row.lfb_disabled").length&&(e=!1,$(this).closest(".form-group,p,.lfb_itemBloc").addClass("has-error"),r||lfb_scrollToItem($(this),t,a))}),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find('.lfb_selectable[data-required="true"]:not(.lfb_disabled)').each(function(){$(this).is(".checked")||(!$(this).is("[data-group]")||""!=$(this).attr("data-group")&&0==$(' #lfb_form[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] [data-group="'+$(this).attr("data-group")+'"].checked').length)&&0==$(this).closest(".lfb_row.lfb_disabled").length&&(e=!1,$(this).find(".icon_select").addClass("lfb_error"),r||lfb_scrollToItem($(this),t,a))}),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find('.lfb_button[data-required="true"]:not(.lfb_disabled)').each(function(){$(this).is(".checked")||(!$(this).is("[data-group]")||""!=$(this).attr("data-group")&&0==$(' #lfb_form[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"] [data-group="'+$(this).attr("data-group")+'"].checked').length)&&0==$(this).closest(".lfb_row.lfb_disabled").length&&(e=!1,$(this).find(".icon_select").addClass("lfb_error"),r||lfb_scrollToItem($(this),t,a))}),$(' #lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t+'"]').find(".lfb_repeater:not(.lfb_disabled)").each(function(){lfb_validateRepeater($(this),t,a)||(e=!1,r=!0)}),"final"==t&&1==l.useSignature)&&(0==JSON.parse(l.signature.signature("toJSON")).lines.length&&(e=!1,$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_signature').addClass("has-error"),r||lfb_scrollToItem($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_signature'),t,a),r=!0));return e}function lfb_zeroIfNan(t){return isNaN(t)?0:t}function lfb_getPaymentAmountForBase(t,a){var e=parseFloat(a);(isNaN(e)||e<0)&&(e=0);var r=parseFloat(t.summary_depositPercent);if((1==t.displayPaymentAmount||"1"==t.displayPaymentAmount||1==t.summary_showDeposit||"1"==t.summary_showDeposit)&&!isNaN(r)&&r>0)return e*r/100;if("percent"==t.payMode){var l=parseFloat(t.percentToPay);return(isNaN(l)||l<=0)&&(l=100),e*l/100}if("fixed"==t.payMode){var i=parseFloat(t.fixedToPay);return(isNaN(i)||i<0)&&(i=0),i}return e}function lfb_getPaymentDisplayAmount(t){return lfb_getPaymentAmountForBase(t,t.price)}function lfb_getPaymentDisplayPercent(t){var a=parseFloat(t.summary_depositPercent);if(!isNaN(a)&&a>0)return a;
1if("percent"==t.payMode){var e=parseFloat(t.percentToPay);if(!isNaN(e)&&e>0)return e}return""}function lfb_getDistanceCalc(t,a,e,r,l,i){google.maps.UnitSystem.METRIC;if("route"==lfb_getForm(a).distancesMode)(lfb_gmapMatrixService=new google.maps.DistanceMatrixService).getDistanceMatrix({origins:[r],destinations:[l],travelMode:google.maps.TravelMode.DRIVING,unitSystem:google.maps.UnitSystem.METRIC,avoidHighways:!1,avoidTolls:!1},function(t,r){var l=!1;if(r==google.maps.DistanceMatrixStatus.OK){var o=0;t.rows[0].elements[0].distance?(o=t.rows[0].elements[0].distance.value,o/=1e3,"miles"==i?o*=.62:"mins"==i?o=Math.round(parseInt(t.rows[0].elements[0].duration.value)/60):"hours"==i&&(o=Math.round(parseInt(t.rows[0].elements[0].duration.value)/60/60))):l=!0;$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] [data-itemid="'+e+'"]');$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] [data-itemid="'+e+'"]').attr("data-distance",o),lfb_updateSummary(a),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_summary table tr[data-itemstep="'+e+'"] td:eq(2)').html(o),lfb_updatePrice(a),lfb_removeDistanceError(e,a)}else l=!0;l&&lfb_showDistanceError(e,a)});else{var o=new google.maps.Geocoder;o.geocode({address:r},function(t,r){if(void 0!==t[0]){var f=t[0].geometry.location;o.geocode({address:l},function(t,r){if(void 0!==t[0]){var l=t[0].geometry.location,o=google.maps.geometry.spherical.computeDistanceBetween(f,l);o/=1e3,"miles"==i&&(o*=.62);$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] [data-itemid="'+e+'"]');$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] [data-itemid="'+e+'"]').attr("data-distance",o),lfb_updateSummary(a),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_summary table tr[data-itemstep="'+e+'"] td:eq(2)').html(o),lfb_updatePrice(a),lfb_removeDistanceError(e,a)}else lfb_showDistanceError(e,a)})}else lfb_showDistanceError(e,a)})}return 0}function lfb_executeCalculation(calculation,formID,targetID){var _tierForm=lfb_getForm(formID);if(_tierForm&&"free"===_tierForm.lfb_tier){var _itemData=lfb_getItemData(_tierForm,targetID);return _itemData&&parseFloat(_itemData.price)||0}calculation=calculation.replace(/\\/g,"");var form=lfb_getForm(formID),price=0,i=0,elementsToReplace=new Array,itemData=lfb_getItemData(form,targetID),_stepID=itemData.stepid,isVariable=!1;for(calculation.indexOf("[variable]")>-1&&(isVariable=!0),calculation=calculation.replace(/\[variable\]/g,"[price]"),calculation=calculation.replace(/\[quantity\]/g,"[price]"),calculation=calculation.replace(/\[value\]/g,"[price]");-1!=(i=calculation.indexOf("variable-",i+1));){var variableID=calculation.substr(i+9,calculation.indexOf("]",i)-(i+9)),value=0,variable=lfb_getVariableByID(form,variableID);variable&&(value=variable.value,"text"==variable.type?value='"'+variable.value+'"':isNaN(value)&&(value=0)),elementsToReplace.push({oldValue:calculation.substr(i-1,calculation.indexOf("]",i)+1-(i-1)),newValue:value})}for(;-1!=(i=calculation.indexOf("item-",i+1));){var itemID=calculation.substr(i+5,calculation.indexOf("_",i)-(i+5)),action=calculation.substr(calculation.indexOf("_",i)+1,calculation.indexOf("]",i)-1-calculation.indexOf("_",i)),value=0,calItemData=lfb_getItemData(form,itemID);if(void 0!==calItemData&&calItemData){if("isChecked"==action&&(value=calItemData?"1==1":"1==0"),"isUnchecked"==action&&(value=calItemData?"1==0":"1==1"),"isFilled"==action)if("filefield"==calItemData.type)value=calItemData.files.length>0?"1==1":"1==0";else{var value=0;void 0===calItemData.value?void 0!==calItemData.quantity&&(value=calItemData.quantity):value=calItemData.value,value=value.length>0?"1==1":"1==0"}if("price"==action&&(value=0,"total"==itemID?value=form.price:(value=0,void 0!==calItemData.price&&(value=calItemData.price))),"quantity"==action&&(value=0,void 0!==calItemData.quantity&&(value=calItemData.quantity)),"min"==action&&(value=0,"range"==calItemData.type&&void 0!==calItemData.minValue&&(value=calItemData.minValue)),"max"==action&&(value=0,"range"==calItemData.type&&void 0!==calItemData.maxValue&&(value=calItemData.maxValue)),"value"==action&&(value=0,"numberfield"==calItemData.type?(void 0!==calItemData.quantity?value=calItemData.quantity:void 0!==calItemData.value&&(value=calItemData.value),isNaN(value)&&(value=0)):value="'"+calItemData.value+"'"),"date"==action){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+itemID+'"]');value=$item.is(".lfb_datepicker")&&null!=$item.datetimepicker("getDate")?"'"+moment($item.datetimepicker("getDate")).format("YYYY-MM-DD")+"'":"null"}}else"isUnchecked"==action&&(value="1==1");void 0===value&&(value=0),elementsToReplace.push({oldValue:calculation.substr(i-1,calculation.indexOf("]",i)+1-(i-1)),newValue:value})}for(;-1!=(i=calculation.indexOf("step-",i+1));){var stepID=calculation.substr(i+5,calculation.indexOf("_",i)-(i+5)),action=calculation.substr(calculation.indexOf("_",i)+1,calculation.indexOf("]",i)-1-calculation.indexOf("_",i));"quantity"==action&&(value=lfb_getStepQuantities(formID,stepID,targetID)),elementsToReplace.push({oldValue:calculation.substr(i-1,calculation.indexOf("]",i)+1-(i-1)),newValue:value})}var todayDate=new Date,month=todayDate.getMonth()+1;month<10&&(month="0"+month);var today=todayDate.getFullYear().toString()+month.toString()+todayDate.getDate().toString();if(calculation=calculation.replace(/\[currentDate\]/g,today),calculation.indexOf("dateDifference-")>-1)for(;-1!=(i=calculation.indexOf("dateDifference-",i+1));){var startDateAdPosEnd=calculation.indexOf("_",i+15)+1,startDate=calculation.substr(i+15,calculation.indexOf("_",i)-(i+15)),endDate=calculation.substr(startDateAdPosEnd,calculation.indexOf("]",startDateAdPosEnd)-startDateAdPosEnd);if("currentDate"==startDate)startDate=todayDate;else if($('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+startDate+'"]').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+startDate+'"]').val().length>0){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+startDate+'"]');startDate=$item.datetimepicker("getDate")}else startDate=todayDate;if("currentDate"==endDate)endDate=todayDate;else if($('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+endDate+'"]').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+endDate+'"]').val().length>0){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+endDate+'"]');endDate=$item.datetimepicker("getDate")}else endDate=todayDate;startDate.setMinutes(0),startDate.setHours(0),endDate.setMinutes(0),endDate.setHours(0);var timeDiff=Math.abs(endDate.getTime()-startDate.getTime()),result=Math.round(timeDiff/864e5);result<0&&(result=0),elementsToReplace.push({oldValue:calculation.substr(i-1,calculation.indexOf("]",i)+1-(i-1)),newValue:result})}if(calculation.indexOf("distance_")>-1){var $target=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+targetID+'"]');for($target.attr("data-usedistance","true");-1!=(i=calculation.indexOf("distance_",i+1));){var distanceType="km",departAdPosEnd=calculation.indexOf("-",i+9)+1,departAdress=calculation.substr(i+9,calculation.indexOf("-",i)-(i+9)),departCityPosEnd=calculation.indexOf("-",departAdPosEnd)+1,departCity=calculation.substr(departAdPosEnd,calculation.indexOf("-",departAdPosEnd)-departAdPosEnd),departZipPosEnd=calculation.indexOf("-",departCityPosEnd)+1,departZip=calculation.substr(departCityPosEnd,calculation.indexOf("-",departCityPosEnd)-departCityPosEnd),departCountryPosEnd=calculation.indexOf("_",departZipPosEnd)+1,departCountry=calculation.substr(departZipPosEnd,calculation.indexOf("_",departZipPosEnd)-departZipPosEnd),arrivalAdPosEnd=calculation.indexOf("-",departCountryPosEnd)+1,arrivalAdress=calculation.substr(departCountryPosEnd,calculation.indexOf("-",departCountryPosEnd)-departCountryPosEnd),arrivalCityPosEnd=calculation.indexOf("-",arrivalAdPosEnd)+1,arrivalCity=calculation.substr(arrivalAdPosEnd,calculation.indexOf("-",arrivalAdPosEnd)-arrivalAdPosEnd),arrivalZipPosEnd=calculation.indexOf("-",arrivalCityPosEnd)+1,arrivalZip=calculation.substr(arrivalCityPosEnd,calculation.indexOf("-",arrivalCityPosEnd)-arrivalCityPosEnd),arrivalCountryPosEnd=calculation.indexOf("_",arrivalZipPosEnd)+1,arrivalCountry=calculation.substr(arrivalZipPosEnd,calculation.indexOf("_",arrivalZipPosEnd)-arrivalZipPosEnd);if(distanceType=calculation.substr(arrivalCountryPosEnd,calculation.indexOf("]",arrivalCountryPosEnd)-arrivalCountryPosEnd),""!=departAdress)if($('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+departAdress+'"]').length>0){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+departAdress+'"]');departAdress=$item.val()}else departAdress=0;if(""!=departCity)if($('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+departCity+'"]').length>0){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+departCity+'"]');departCity=$item.val()}else departCity=0;if(""!=departZip)if($('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+departZip+'"]').length>0){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+departZip+'"]');departZip=$item.val()}else departZip=0;if(""!=departCountry)if($('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+departCountry+'"]').length>0){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+departCountry+'"]');departCountry=$item.val()}else departCountry=0;if(""!=arrivalAdress)if($('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+arrivalAdress+'"]').length>0){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+arrivalAdress+'"]');arrivalAdress=$item.val()}else arrivalAdress=0;if(""!=arrivalCity)if($('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+arrivalCity+'"]').length>0){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+arrivalCity+'"]');arrivalCity=$item.val()}else arrivalCity=0;if(""!=arrivalZip)if($('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+arrivalZip+'"]').length>0){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+arrivalZip+'"]');arrivalZip=$item.val()}else arrivalZip=0;if(""!=arrivalCountry)if($('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+arrivalCountry+'"]').length>0){var $item=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+arrivalCountry+'"]');arrivalCountry=$item.val()}else arrivalCountry=0;$target.closest(".lfb_genSlide").find(".lfb_distanceError").length>0&&lfb_removeDistanceError(targetID,formID);var distanceCode=calculation.substr(i-1,calculation.indexOf("]",i)+1-(i-1)),distance=0;if(""!=$target.attr("data-distance")&&(distance=parseFloat($target.attr("data-distance"))),""==departAdress&&""==departCity&&""==departCountry&&""==arrivalAdress&&""==arrivalCity&&""==arrivalCountry&&""==departZip&&""==arrivalZip)lfb_showDistanceError(targetID,formID);else if(""==form.gmap_key)lfb_showDistanceError(targetID,formID),c
1onsole.log("invalid gmap api key");else{var depart=departAdress+" "+departZip+" "+departCity+" "+departCountry,arrival=arrivalAdress+" "+arrivalZip+" "+arrivalCity+" "+arrivalCountry;$target.attr("data-departure")==depart&&arrival==$target.attr("data-arrival")||($target.attr("data-departure",depart),$target.attr("data-arrival",arrival),lfb_getDistanceCalc(distanceCode,formID,targetID,depart,arrival,distanceType))}elementsToReplace.push({oldValue:calculation.substr(i-1,calculation.indexOf("]",i)+1-(i-1)),newValue:distance})}}if(jQuery.each(elementsToReplace,function(){calculation=calculation.replace(this.oldValue,this.newValue)}),calculation=calculation.replace(/\[total_single\]/g,form.priceSingle),calculation=calculation.replace(/\[total_default\]/g,form.price),calculation=$('#lfb_form.lfb_bootstraped[data-form="'+formID+'"]').is("[data-isSubs]")&&(itemData&&itemData.isSinglePrice||$('[data-itemid="'+targetID+'"]').is('[data-singleprice="true"]'))?calculation.replace(/\[total\]/g,form.priceSingle):calculation.replace(/\[total\]/g,form.price),calculation.indexOf("[total_quantity]")>-1&&(calculation=calculation.replace(/\[total_quantity\]/g,lfb_getTotalQuantities(formID,_stepID,targetID))),-1==calculation.indexOf("[price]")){for(i=0;-1!=(i=calculation.indexOf("{",i+1));){var charsToEnd=calculation.substr(i+1,calculation.indexOf("}",i+1)-(i+1));/\S/.test(charsToEnd)&&(calculation=calculation.substr(0,i+1)+" price ="+calculation.substr(i+1,calculation.length),i+=8)}if(calculation.indexOf("if")<0)calculation="price = "+calculation;else{var charsToStart=calculation.substr(0,calculation.indexOf("if"));/\S/.test(charsToStart)&&(calculation="price = "+calculation)}calculation=lfb_removeDoubleSpaces(calculation),calculation=calculation.replace(/price =\n if/g,"\nif"),calculation=calculation.replace(/price = if/g,"if"),calculation=calculation.replace(/price = \nif/g,"\nif"),calculation=calculation.replace(/price = \n if/g,"\n if")}else calculation=calculation.replace(/\[price\]/g,"price"),calculation=calculation.replace(/\[quantity\]/g,"price"),calculation=calculation.replace(/\[variable\]/g,"price"),calculation=lfb_removeDoubleSpaces(calculation);if("price ="!=calculation.trim())try{eval(calculation)}catch(t){console.log("wrong calculation : "+calculation)}return isVariable?price:parseFloat(price)}function lfb_parseDate(t){var a=t;if("string"==typeof t){var e=t.match(/(\d+)/g);a=new Date(e[0],e[1]-1,e[2])}return a}function lfb_removeDoubleSpaces(t){return(t=(t=t.replace(/\t/g,"")).replace(/  /g," ")).indexOf("  ")>-1&&lfb_removeDoubleSpaces(t),t}function lfb_updateTshirtUnitPrice(t){var a=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]'),e=a.find(".lfb_tshirtConfigurator");if(0!=e.length){var r=0;e.find(".lfb_tshirtStylePicker .lfb_iconpicker.checked, .lfb_tshirtPrintPicker .lfb_iconpicker.checked, .lfb_tshirtAddonPicker .lfb_iconpicker.checked").each(function(){r+=parseFloat($(this).attr("data-price"))||0}),r>0&&(r=Math.ceil(r)),a.find('.lfb_tshirtSizeField input[data-valueasqt="1"], .lfb_tshirtTotalCalc input[data-valueasqt="1"]').each(function(){$(this).attr("data-price",r),$(this).data("price",r)})}}function lfb_removeDistanceError(t,a){var e=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+t+'"]');if(0==e.closest(".lfb_genSlide").find('[data-itemid][data-usedistance="true"]:not([data-distance]):not([type="checkbox"]).checked,[data-itemid][data-usedistance="true"]:not([data-distance]):checked,[data-itemid][data-usedistance="true"]:not([data-distance])[data-type="slider"]').length&&0==e.closest(".lfb_genSlide").find('[data-itemid][data-usedistance="true"][data-distance="0"]:not([type="checkbox"]).checked,[data-itemid][data-usedistance="true"][data-distance="0"]:checked,[data-itemid][data-usedistance="true"][data-distance="0"][data-type="slider"]').length){e.closest(".lfb_genSlide").find(".lfb_btn-next").fadeIn(),e.closest(".lfb_genSlide").find(".lfb_btnNextContainer").fadeIn(),e.closest(".lfb_genSlide").find(".lfb_btn-next").removeClass("lfb_disabledBtn");var r=e.closest(".lfb_genSlide").find(".lfb_distanceError");r.fadeOut(),setTimeout(function(){r.remove()},300)}}function lfb_showDistanceError(t,a){var e=lfb_getForm(a),r=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+t+'"]');r.closest(".lfb_genSlide").find(".lfb_btn-next").addClass("lfb_disabledBtn"),r.closest(".lfb_genSlide").find(".lfb_btn-next").hide(),0==r.closest(".lfb_genSlide").find(".lfb_distanceError").length&&r.closest(".lfb_genSlide").find(".lfb_btnNextContainer").before('<div class="lfb_distanceError alert alert-danger"><p>'+e.txtDistanceError+"</p></div>");var l=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] [data-itemid="'+t+'"]').closest(".lfb_genSlide").attr("data-stepid");"final"!=e.step||e.backFomFinal||(e.backFomFinal=!0,lfb_changeStep(l,a)),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"]').trigger("lfb_distanceError")}function lfb_updateLabelItem(t,a){lfb_getForm(a);if(!t.is(".dropzone")){if(t.is('[data-checkboxstyle="addon"]')){var e=t.attr("data-originallabel")||t.attr("data-originaltitle")||"";return void t.closest(".lfb_itemBloc").find("div > label").first().html(e)}t.closest(".lfb_itemBloc").find("label").each(function(){$(this).html().indexOf(":")>-1&&0==$(this).closest(".switch").length&&$(this).html(t.attr("data-original-label"))}),t.parent().children(".lfb_imgTitle").length>0&&t.is("[data-bs-original-title]")&&t.parent().children(".lfb_imgTitle").html(t.attr("data-bs-original-title")),t.is('[type="checkbox"]')&&t.closest(".lfb_itemBloc").find("div > label").first().html(t.attr("data-original-label")),t.find(".lfb_buttonTitle").length>0&&t.is("[data-bs-original-title]")&&t.find(".lfb_buttonTitle").html(t.attr("data-bs-original-title"))}}function getItemCalculation(t,a,e){var r="";if(1==t.debugCalculations){var l="calculation";"calculationQt"==e?l="calculationqt":"variableCalculation"==e?l="calculationvar":"distanceQt"==e&&(l="distanceqt"),r=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+a+'"]').attr("data-"+l)}
1else t.usingCalculationItems.forEach(t=>{t.id==a&&(r=t[e])});return r}function lfb_escapeTotalBottomRollChar(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function lfb_buildTotalBottomRollHtml(t,a){for(var e=String(t),r=String(a),l=e.match(/\d/g)||[],i=r.match(/\d/g)||[],o=l.length-i.length,f=0,s="",n=0;n<r.length;n++){var d=r.charAt(n);if(/\d/.test(d)){var b=o+f,m=b>=0&&b<l.length?l[b]:"",p=i[f];s+='<span class="lfb_totalBottomDigitRoll" data-old="'+lfb_escapeTotalBottomRollChar(m)+'" data-new="'+lfb_escapeTotalBottomRollChar(p)+'">',s+='<span class="lfb_totalBottomDigit lfb_totalBottomDigitOld">'+lfb_escapeTotalBottomRollChar(m)+"</span>",s+='<span class="lfb_totalBottomDigit lfb_totalBottomDigitNew">'+lfb_escapeTotalBottomRollChar(p)+"</span>",s+="</span>",f++}else s+=lfb_escapeTotalBottomRollChar(d)}return s}function lfb_setTotalBottomPriceHtml(t,a,e,r){t.each(function(){var t=$(this),l=t.data("lfbTotalBottomHtml"),i=!0===t.data("lfbTotalBottomReady"),o=parseFloat(e),f=parseFloat(r),s=i&&l!=a&&!isNaN(o)&&!isNaN(f)&&o!==f,n=f>o?"up":"down",d=function(){t.html(a).removeClass("lfb_totalBottomPriceRolling lfb_totalBottomPriceRollingUp lfb_totalBottomPriceRollingDown"),t.data("lfbTotalBottomHtml",a),t.data("lfbTotalBottomReady",!0)};void 0===l&&(l=t.html()),window.clearTimeout(t.data("lfbTotalBottomTimer")),s?(t.empty().append($('<span class="lfb_totalBottomRoller"></span>').attr("data-direction",n).html(lfb_buildTotalBottomRollHtml(l,a))).removeClass("lfb_totalBottomPriceRollingUp lfb_totalBottomPriceRollingDown").addClass("lfb_totalBottomPriceRolling lfb_totalBottomPriceRolling"+("up"==n?"Up":"Down")),t.data("lfbTotalBottomTimer",window.setTimeout(d,190))):d()})}function lfb_updatePrice(t,a){var e=!1,r=lfb_getForm(t);lfb_updatePlannedSteps(t),lfb_updateStep(t),lfb_updateShowItems(t),lfb_updateTshirtUnitPrice(t),r.lastPrice=r.price,r.lastPriceSingle=r.priceSingle||0,r.price=r.initialPrice,r.priceSingle=0;for(var l=JSON.parse(JSON.stringify(lfb_lastSteps)),i=0,o=0,f=0;f<r.variables.length;f++)r.variables[f].value=r.variables[f].defaultValue;"final"!=r.step&&-1==jQuery.inArray(parseInt(r.step),l)?l.push(parseInt(r.step)):"final"==r.step&&-1==jQuery.inArray("final",l)&&l.push("final");for(f=0;f<l.length;f++){var s=l[f];if(("final"==s||0!=parseInt(s))&&!$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+s+'"]').is(".lfb_disabled"))$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+s+'"]').find("[data-itemid]").each(function(){if($(this).is("div.lfb_selectable.checked")||$(this).is('div[data-type="slider"]')||$(this).is("a.lfb_button.checked")||$(this).is("input[type=checkbox]:checked")||$(this).is("select[data-itemid][data-price]")||$(this).is('input[type=number][data-valueasqt="1"]')||$(this).is('div[data-type="pricetable"].checked')||$(this).is('div[data-type="iconpicker"].checked')||$(this).is('div[data-type="repeater"].checked')){if(!$(this).is(".lfb_disabled")&&0==$(this).closest(".lfb_itemBloc.lfb_disabled").length&&!$(this).is(".lfb_disabled"))if($(this).is('[data-singleprice="true"]')&&(e=!0),$(this).is("[data-usecalculation]")||$(this).data("price",$(this).attr("data-price")),$(this).is("[data-usecalculation]")&&(s!=r.step&&$(this).is(".lfb_executed")?$(this).attr("data-price",$(this).data("price")):$(this).data("price",lfb_executeCalculation(getItemCalculation(r,$(this).attr("data-itemid"),"calculation"),t,$(this).attr("data-itemid")))),$(this).find(".icon_quantity").length>0||$(this).find(".lfb_qtfield").length>0||$(this).is('[data-type="slider"]')||$(this).is('input[type=number][data-valueasqt="1"]')){var l="",f=0,n=99999999999999;if($(this).find(".icon_quantity").length>0?(l=$(this).find(".icon_quantity").html(),f=parseFloat($(this).find(".quantityBtns").attr("data-min")),n=parseFloat($(this).find(".quantityBtns").attr("data-max"))):$(this).find(".lfb_qtfield").length>0?(l=$(this).find(".lfb_qtfield").val(),f=$(this).find(".lfb_qtfield").attr("min"),n=$(this).find(".lfb_qtfield").attr("max")):$(this).is('[data-type="slider"]')?(l=parseFloat($(this).slider("value")),f=$(this).attr("data-min"),n=$(this).attr("data-max")):$(this).is('input[type=number][data-valueasqt="1"]')&&(l=parseFloat($(this).val()),f=$(this).attr("min"),n=$(this).is("[max]")?$(this).attr("max"):1e17),!$(this).is("[data-usecalculationqt]")||$(this).is(".lfb_changed")||void 0!==a&&$(this).attr("data-itemid")==a||(l=lfb_executeCalculation(getItemCalculation(r,$(this).attr("data-itemid"),"calculationQt"),t,$(this).attr("data-itemid")),isNaN(l)&&(l=0),l>n&&(l=n),l<f&&(l=f),$(this).find(".icon_quantity").length>0?($(this).find(".icon_quantity").html(l),$(this).find(".lfb_sliderQt").length>0&&$(this).find(".lfb_sliderQt").slider("value",parseFloat(l)),$(this).find(".quantityBtns").addClass("lfb-hidden")):$(this).find(".lfb_qtfield").length>0?$(this).find(".lfb_qtfield").val(l):$(this).is('[data-type="slider"]')?$(this).slider("value",parseFloat(l)):$(this).is('input[type="number"]')&&$(this).val(l)),$(this).is("[data-distanceqt]")&&(lfb_executeCalculation(getItemCalculation(r,$(this).attr("data-itemid"),"distanceQt"),t,$(this).attr("data-itemid")),$(this).is("[data-distance]")&&(l=parseFloat($(this).attr("data-distance")).toFixed(2)),l<f?l=f:l>n&&(l=n),$(this).find(".lfb_qtfield").length>0?$(this).find(".lfb_qtfield").val(l):$(this).find(".lfb_sliderQt").length>0?($(this).find(".lfb_sliderQt").slider("value",l),$(this).find(".icon_quantity").html(l)):$(this).find(".quantityBtns").length>0?$(this).find(".icon_quantity").html(l):$(this).is('[data-type="slider"]')&&$(this).slider("value",l),$(this).is("[data-usecalculation]")&&$(this).data("price",lfb_executeCalculation(getItemCalculation(r,$(this).attr("data-itemid"),"calculation"),t,$(this).attr("data-itemid")))),$(this).attr("data-resqt",l),$(this).is("[data-price]"))if("-"==$(this).data("operation"))$(this).data("resprice",0-parseFloat($(this).data("price"))*parseFloat(l)),$(this).is('[data-singleprice="true"]')?r.priceSingle-=parseFloat($(this).data("price"))*parseFloat(l):r.price-=parseFloat($(this).data("price"))*parseFloat(l);else if("x"==$(this).data("operation"))for(var d=0;d<parseFloat(l);d++)0==d?(r.price=r.price,$(this).data("resprice",r.price)):$(this).is('[data-singleprice="true"]')?($(this).is('[data-addtototal!="no"]')&&(r.priceSingle+=o*parseFloat($(this).data("price"))/100),$(this).data("resprice",o*parseFloat($(this).data("price"))/100)):($(this).is('[data-addtototal!="no"]')&&(r.price+=i*parseFloat($(this).data("price"))/100),$(this).data("resprice",r.price*parseFloat($(this).data("price"))/100));else if("/"==$(this).data("operation"))for(d=0;d<parseFloat(l);d++)$(this).data("resprice",0-r.price*parseFloat($(this).data("price"))/100),$(this).is('[data-singleprice="true"]')?$(this).is('[data-addtototal!="no"]')&&(r.priceSingle=r.price-r.price*parseFloat($(this).data("price"))/100):$(this).is('[data-addtototal!="no"]')&&(r.price=r.price-r.price*parseFloat($(this).data("price"))/100);else{var b=-2;if($(this).data("reduc")&&$(this).data("reducqt").length>0){var m=$(this).data("reducqt");m=m.split("*");var p=new Array,c=0;jQuery.each(m,function(t){var a=m[t].split("|");p.push(a[1]),parseFloat(a[0])<=parseFloat(l)&&(b=t),(parseFloat(a[0])<c||0==c)&&(c=parseFloat(a[0]))})}if(b>=0){var _=parseFloat(p[b])*parseFloat(l);"0"==$(this).attr("data-price")&&(_=parseFloat(p[b])*(parseFloat(l)-c)),$(this).data("resprice",_),$(this).is('[data-singleprice="true"]')?$(this).is('[data-addtototal!="no"]')&&(r.priceSingle+=parseFloat(_)):$(this).is('[data-addtototal!="no"]')&&(r.price+=parseFloat(_)),"left"==r.currencyPosition?($(this).is('[data-showprice="1"]')?"+"==$(this).data("operation")?($(this).attr("title",$(this).data("originaltitle")+": "+r.currency+lfb_formatPrice(p[b],t)),$(this).attr("data-original-label",$(this).data("originallabel")+": "+r.currency+lfb_formatPrice(p[b],t)),$(this).attr("data-bs-original-title",$(this).data("originaltitle")+": "+r.currency+lfb_formatPrice(p[b],t)),0==r.disableTipMobile||lfb_is_touch_device(),lfb_updateLabelItem($(this),t)):"-"==$(this).data("operation")?($(this).attr("title",$(this).data("originaltitle")+": -"+r.currency+lfb_formatPrice(p[b],t)),0==r.disableTipMobile||lfb_is_touch_device(),$(this).attr("data-original-label",$(this).data("originallabel")+": -"+r.currency+lfb_formatPrice(p[b],t)),$(this).attr("data-bs-original-title",$(this).data("originaltitle")+": -"+r.currency+lfb_formatPrice(p[b],t)),0==r.disableTipMobile||lfb_is_touch_device(),lfb_updateLabelItem($(this),t)):"x"==$(this).data("operation")?($(this).attr("title",$(this).data("originaltitle")+": +"+lfb_formatPrice(p[b],t)+"%"),0==r.disableTipMobile||lfb_is_touch_device(),$(this).attr("data-original-label",$(this).data("originallabel")+": +"+r.currency+lfb_formatPrice(p[b],t)),$(this).attr("data-bs-original-title",$(this).data("originaltitle")+": +"+lfb_formatPrice(p[b],t)+"%"),0==r.disableTipMobile||lfb_is_touch_device(),lfb_updateLabelItem($(this),t)):($(this).attr("title",$(this).data("originaltitle")+": -"+lfb_formatPrice(p[b],t)+"%"),0==r.disableTipMobile||lfb_is_touch_device(),$(this).attr("data-original-label",$(this).data("originallabel")+": -"+r.currency+lfb_formatPrice(p[b],t)),$(this).attr("data-bs-original-title",$(this).data("originaltitle")+": -"+lfb_formatPrice(p[b],t)+"%"),0==r.disableTipMobile||lfb_is_touch_device(),lfb_updateLabelItem($(this),t)):($(this).attr("data-original-label",$(this).data("originallabel")),$(this).is("[data-tooltiptext]")?$(this).attr("data-bs-original-title",$(this).attr("data-tooltiptext")):$(this).attr("data-bs-original-title",$(this).data("originaltitle"))),$(this).find(".quantityBtns").is(".open")&&""==r.imgTitlesStyle&&(0!=r.disableTipMobile&&lfb_is_touch_device()||$(this).tooltip("show"))):($(this).is('[data-showprice="1"]')?"+"==$(this).attr("data-operation")?($(this).attr("title",$(this).data("originaltitle")+": "+lfb_formatPrice(p[b],t)+r.currency),$(this).attr("data-original-label",$(this).data("originallabel")+": "+lfb_formatPrice(p[b],t)+r.currency),$(this).attr("data-bs-original-title",$(this).data("originaltitle")+": "+lfb_formatPrice(p[b],t)+r.currency),0==r.disableTipMobile||lfb_is_touch_device(),lfb_updateLabelItem($(this),t)):"-"==$(this).attr("data-operation")?($(this).attr("title",$(this).data("originaltitle")+": -"+lfb_formatPrice(p[b],t)),$(this).attr("data-original-label",$(this).data("originallabel")+": -"+lfb_formatPrice(p[b],t)+r.currency),$(this).attr("data-bs-original-title",$(this).data("originaltitle")+": -"+lfb_formatPrice(p[b],t)+r.currency),0==r.disableTipMobile||lfb_is_touch_device(),lfb_updateLabelItem($(this),t)):"x"==$(this).attr("data-operation")?($(this).attr("data-original-label",$(this).data("originallabel")+": +"+lfb_formatPrice(p[b],t)+r.currency),$(this).attr("title",$(this).data("originaltitle")+": +"+lfb_formatPrice(p[b],t)+"%"),0==r.disableTipMobile||lfb_is_touch_device(),$(this).attr("data-original-label",$(this).data("originallabel")+": +"+lfb_formatPrice(p[b],t)+r.currency),$(this).attr("data-bs-original-title",$(this).data("originaltitle")+": +"+lfb_formatPrice(p[b],t)+"%"),0==r.disableTipMobile||lfb_is_touch_device(),lfb_updateLabelItem($(this),t)):($(this).attr("data-original-label",$(this).data("originallabel")+": -"+lfb_formatPrice(p[b],t)+r.currency),$(this).attr("title",$(this).data("originaltitle")+": --"+lfb_formatPrice(p[b],t)+"%"),0==r.disableTipMobile||lfb_is_touch_device(),$(this).attr("data-bs-original-title",$(this).data("originaltitle")+": -"+lfb_formatPrice(p[b],t)+"%"),0==r.disableTipMobile||lfb_is_touch_device(),lfb_updateLabelItem($(this),t)):($(this).attr("data-original-label",$(this).data("originallabel")),$(this).is("[data-tooltiptext]")?$(this).attr("data-bs-original-title",$(this).attr("data-tooltiptext")):$(this).attr("data-bs-original-title",$(this).data("originaltitle"))),$(this).find(".quantityBtns").is(".open")&&""==r.imgTitlesStyle&&(0!=r.disableTipMobile&&lfb_is_touch_device()||$(this).tooltip("show")))}else $(this).data("resprice",parseFloat($(this).data("price"))*parseFloat(l)),r.price=parseFloat(r.price),r.priceSingle=parseFloat(r.priceSingle),$(this).is('[data-singleprice="true"]')?$(this).is('[data-addtototal!="no"]')&&(r.priceSingle+=parseFloat($(this).data("price"))*parseFloat(l)):$(this).is('[data-addtototal!="no"]')&&(r.price+=parseFloat($(this).data("price"))*parseFloat(l)),lfb_updateItemTitleNoReduc($(this),r),$(this).find(".quantityBtns").is(".open")&&""==r.imgTitlesStyle&&(0!=r.disableTipMobile&&lfb_is_touch_device()||$(this).tooltip("show"))}else $(this).data("resprice","0")}
1else $(this).data("resqt","0"),$(this).data("price")?("-"==$(this).data("operation")?($(this).data("resprice",0-parseFloat($(this).data("price"))),$(this).is('[data-singleprice="true"]')?$(this).is('[data-addtototal!="no"]')&&(r.priceSingle-=parseFloat($(this).data("price"))):$(this).is('[data-addtototal!="no"]')&&(r.price-=parseFloat($(this).data("price")))):"x"==$(this).data("operation")?$(this).is('[data-singleprice="true"]')?($(this).data("resprice",r.priceSingle*parseFloat($(this).data("price"))/100),$(this).is('[data-addtototal!="no"]')&&(r.priceSingle=r.priceSingle+r.priceSingle*parseFloat($(this).data("price"))/100)):($(this).data("resprice",r.price*parseFloat($(this).data("price"))/100),$(this).is('[data-addtototal!="no"]')&&(r.price=r.price+r.price*parseFloat($(this).data("price"))/100)):"/"==$(this).attr("data-operation")?$(this).is('[data-singleprice="true"]')?($(this).data("resprice",0-r.priceSingle*parseFloat($(this).data("price"))/100),$(this).is('[data-addtototal!="no"]')&&(r.priceSingle=r.priceSingle-r.priceSingle*parseFloat($(this).data("price"))/100)):($(this).data("resprice",0-r.price*parseFloat($(this).data("price"))/100),$(this).is('[data-addtototal!="no"]')&&(r.price=r.price-r.price*parseFloat($(this).data("price"))/100)):($(this).data("resprice",$(this).data("price")),$(this).is('[data-singleprice="true"]')?$(this).is('[data-addtototal!="no"]')&&(r.priceSingle+=parseFloat($(this).data("price"))):$(this).is('[data-addtototal!="no"]')&&(r.price=parseFloat(r.price)+parseFloat($(this).data("price")))),lfb_updateItemTitleNoReduc($(this),r)):$(this).data("resprice","0");$(this).is("[data-usecalculationvar]")&&!$(this).is('[data-usecalculationvar="0"]')&&lfb_updateVariable(r,$(this).attr("data-usecalculationvar"),getItemCalculation(r,$(this).attr("data-itemid"),"variableCalculation"),$(this).attr("data-itemid"))}$(this).is('input[type!="checkbox"][data-usecalculationvar]')&&!$(this).is('[data-usecalculationvar="0"]')&&lfb_updateVariable(r,$(this).attr("data-usecalculationvar"),getItemCalculation(r,$(this).attr("data-itemid"),"variableCalculation"),$(this).attr("data-itemid")),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').trigger("priceUpdated",[$(this).attr("data-itemid")]),lfb_updateItemData(r,$(this).attr("data-itemid"))});i=r.price,o=r.priceSingle}r.reduction>0&&(r.reductionType&&"%"==r.reductionType?r.priceSingle>0?r.reductionResult=r.priceSingle*r.reduction/100:r.reductionResult=r.price*r.reduction/100:r.reductionResult=r.reduction,r.reductionResult=parseFloat(r.reductionResult),0==r.priceSingle?r.price-=r.reductionResult:r.priceSingle-=r.reductionResult),lfb_updateVAT(t),(!r.price||r.price<0)&&(r.price=0),(!e||!r.priceSingle||r.priceSingle<0)&&(r.priceSingle=0);var n=/^\d+(\.\d{2})?$/;n.test(r.price)||(r.price=parseFloat(r.price).toFixed(2));try{n.test(r.priceSingle)||(r.priceSingle=parseFloat(r.priceSingle).toFixed(2))}catch(t){}var d=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]'),b="single"==r.progressBarPriceType&&d.find(".lfb_tshirtConfigurator").length>0,m=b,p=r.currency+""+lfb_formatPrice(parseFloat(r.priceSingle),t,m),c=r.currency+""+lfb_formatPrice(parseFloat(r.price),t,m),_=$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').attr("data-rangelabelbetween"),u=$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').attr("data-rangelabeland");if($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').is("[data-totalrange]")&&parseFloat(r.price)>0){$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').is(".lfb_notNull")||$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').addClass("lfb_notNull");var h=parseInt($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').attr("data-totalrange")),g=parseFloat(r.price)-h/2,v=parseFloat(r.price)+h/2;$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').is('[data-rangemode="percent"]')&&(g=parseFloat(r.price)-parseFloat(r.price)*h/100,v=parseFloat(r.price)+parseFloat(r.price)*h/100),g<0&&(g=0),c=_+"<br/><strong>"+r.currency+lfb_formatPrice(g,t)+"</strong><br/>"+u+"<br/><strong>"+r.currency+lfb_formatPrice(v,t)+"</strong>"}else $('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').removeClass("lfb_notNull");if("left"!=r.currencyPosition)if(c=lfb_formatPrice(r.price,t,m)+""+r.currency,p=lfb_formatPrice(r.priceSingle,t,m)+""+r.currency,$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').is("[data-totalrange]")&&parseFloat(r.price)>0){$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').is(".lfb_notNull")||$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').addClass("lfb_notNull");h=parseInt($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').attr("data-totalrange")),g=parseFloat(r.price)-h/2,v=parseFloat(r.price)+h/2;$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').is('[data-rangemode="percent"]')&&(g=parseFloat(r.price)-parseFloat(r.price)*h/100,v=parseFloat(r.price)+parseFloat(r.price)*h/100),g<0&&(g=0),c=_+"<br/><strong>"+lfb_formatPrice(g,t)+r.currency+"</strong><br/>"+u+"<br/><strong>"+lfb_formatPrice(v,t)+r.currency+"</strong>"}else $('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').removeClass("lfb_notNull");if(1==r.showTotalBottom&&(e&&r.priceSingle>0?r.price<0?($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom').removeClass("lfb_priceSingle"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom>span.lfb_subPrice').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom>br').remove()):($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom').addClass("lfb_priceSingle"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom').each(function(){0==$(this).find(".lfb_subPrice").length&&$(this).find(">span:eq(0)").after('<br/><span class="lfb_subPrice">+ '+c+"</span>")})):($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom').removeClass("lfb_priceSingle"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom>span.lfb_subPrice').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom>br').remove()),e&&r.priceSingle>0?r.price<=0?(lfb_setTotalBottomPriceHtml($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom> span:first-child'),p,r.lastPriceSingle,r.priceSingle),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom> span.lfb_subPrice').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom> span:eq(2)').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom .lfb_subTxtBottom').hide()):($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom> span.lfb_subPrice').show(),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom> span:eq(2)').show(),lfb_setTotalBottomPriceHtml($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom> span:first-child'),p,r.lastPriceSingle,r.priceSingle),lfb_setTotalBottomPriceHtml($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom> span.lfb_subPrice'),"+ "+c,r.lastPrice,r.price),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom .lfb_subTxtBottom').show()):(r.price<=0?$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom .lfb_subTxtBottom').hide():$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom .lfb_subTxtBottom').show(),lfb_setTotalBottomPriceHtml($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .lfb_totalBottom>
1 span:first-child'),c,r.lastPrice,r.price))),0==r.showSteps){var y=$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price');y.children("br").remove(),e&&r.priceSingle>0?r.price<0?($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').removeClass("lfb_priceSingle"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price>span.lfb_subPrice').remove()):($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').addClass("lfb_priceSingle"),0==$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').length&&$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price>span:eq(0)').after('<span class="lfb_subPrice">+ '+c+"</span>")):($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').removeClass("lfb_priceSingle"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price>span.lfb_subPrice').remove()),e&&r.priceSingle>0?r.price<=0?($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("top","6px"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html(p),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:eq(2)').hide()):($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("top","-5px"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').show(),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:eq(2)').show(),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html(p),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span.lfb_subPrice').html("+ "+c)):($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').is('[data-isSubs="true"]')?$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("position","relative").css("top","6px"):$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("position","relative").css("top","0px"),r.price>0?($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').css("position","relative").css("top","0px"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:eq(1)').show()):$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:eq(1)').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html(c)),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').length>0&&($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price> span:first-child').html().length>8?parseInt($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').css("font-size"))>=16&&$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","16px"):$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","18px"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price > span:first-child').html().length>9&&parseInt($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').css("font-size"))>=14&&$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","14px"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price > span:first-child').html().length>10&&parseInt($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').css("font-size"))>=11&&$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').css("font-size","11px"));var I=r.price;$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').is('[data-isSubs="true"]')&&"single"==r.progressBarPriceType&&(I=r.priceSingle);var D=100*I/r.priceMax;1==r.showInitialPrice&&(D=100*(I-parseFloat(r.initialPrice))/r.priceMax),D>100&&(D=100),y.children("br").remove(),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar').
1css("width",D+"%"),$("body").is(".rtl")?$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').animate({right:D+"%"},70):$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] .genPrice .progress .progress-bar-price').animate({left:D+"%"},70)}var S=r.currency+""+lfb_formatPrice(parseFloat(r.price).toFixed(2),t),P=r.currency+""+lfb_formatPrice(parseFloat(r.priceSingle).toFixed(2),t);if("left"!=r.currencyPosition&&(S=lfb_formatPrice(parseFloat(r.price).toFixed(2),t)+""+r.currency,P=lfb_formatPrice(parseFloat(r.priceSingle).toFixed(2),t)+""+r.currency),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(S),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').is("[data-totalrange]")&&parseFloat(r.price)>0){_=$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').attr("data-rangelabelbetween"),u=$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').attr("data-rangelabeland"),h=parseInt($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').attr("data-totalrange")),g=parseFloat(r.price)-h/2,v=parseFloat(r.price)+h/2;if($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').is('[data-rangemode="percent"]')&&(g=parseFloat(r.price)-parseFloat(r.price)*h/100,v=parseFloat(r.price)+parseFloat(r.price)*h/100),g<0&&(g=0),c=_+"<br/><strong>"+r.currency+lfb_formatPrice(g,t)+"</strong><br/>"+u+"<br/><strong>"+r.currency+lfb_formatPrice(v,t)+"</strong>","left"!=r.currencyPosition){h=parseInt($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"]').attr("data-totalrange"));c=_+"<br/><strong>"+lfb_formatPrice(g,t)+r.currency+"</strong><br/>"+u+"<br/><strong>"+lfb_formatPrice(v,t)+r.currency+"</strong>"}$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(c.replace(/<br\/>/g," "))}lfb_updateSummary(t);var k=c;if(1!=r.displayPaymentAmount&&"1"!=r.displayPaymentAmount||e&&r.priceSingle>0||(k=lfb_formatPriceWithCurrency(lfb_getPaymentDisplayAmount(r),t)),e&&r.priceSingle>0)if($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(0)').html(p),r.price<=0)$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(1)').css("display","none"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(2)').css("display","none"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html("<strong>"+P+"</strong>");else{b?($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(0)').html(S),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(1)').html("").css("display","none"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(2)').css("display","none")):($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(2)').css("display","inline-block"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(1)').html("+"+c+r.subscriptionText),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(1)').css("display","block"));var x="<strong>"+P+"</strong> <br/>+"+S;b&&(x=S),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(x)}else 0==r.priceSingle&&0==r.price?($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(1)').css("display","none"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(2)').css("display","none"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(0)').html(k),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(1)').html(r.subscriptionText)):0==r.priceSingle&&r.price>0?($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(0)').html(k),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(1)').html(r.subscriptionText),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(2)').css("display","inline-block"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(1)').css("display","inline-block")):($('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(2)').css("display","inline-block"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(1)').css("display","inline-block"),$('#lfb_form.lfb_bootstraped[data-form="'+r.formID+'"] #lfb_finalPrice span:eq(0)').html(k));lfb_updateShowSteps(t),lfb_updateShowItems(t),lfb_updateLayerImages(t),lfb_updateStep(t),lfb_updateRichTextValues(t)}function lfb_updateItemTitleNoReduc(t,a){var e=a.formID;"left"==a.currencyPosition?t.is('[data-showprice="1"]')?"+"==t.data("operation")?(t.attr("title",t.data("originaltitle")+": "+a.currency+lfb_formatPrice(t.data("price"),e)),t.attr("data-original-label",t.data("originallabel")+": "+a.currency+lfb_formatPrice(t.data("price"),e)),t.attr("data-bs-original-title",t.data("originaltitle")+": "+a.currency+lfb_formatPrice(t.data("price"),e)),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,lfb_updateLabelItem(t,e)):"-"==t.data("operation")?(t.attr("data-original-label",t.data("originallabel")+": -"+a.currency+lfb_formatPrice(t.data("price"),e)),t.attr("title",t.data("originaltitle")+": -"+a.currency+lfb_formatPrice(t.data("price"),e)),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,t.attr("data-original-label",t.data("originallabel")+": -"+a.currency+lfb_formatPrice(t.data("price"),e)),t.attr("data-bs-original-title",t.data("originaltitle")+": -"+a.currency+lfb_formatPrice(t.data("price"),e)),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,lfb_updateLabelItem(t,e)):"x"==t.data("operation")?(t.attr("title",t.data("originaltitle")+": +"+lfb_formatPrice(t.data("price"),e)+"%"),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,t.attr("data-original-label",t.data("originallabel")+": +"+lfb_formatPrice(t.data("price"),e)+"%"),t.attr("data-bs-original-title",t.data("originaltitle")+": +"+lfb_formatPrice(t.data("price"),e)+"%"),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,lfb_updateLabelItem(t,e)):(t.attr("title",t.data("originaltitle")+": -"+lfb_formatPrice(t.data("price"),e)+"%"),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,t.attr("data-original-label",t.data("originallabel")+": -"+lfb_formatPrice(t.data("price"),e)+"%"),t.attr("data-bs-original-title",t.data("originaltitle")+": -"+lfb_formatPrice(t.data("price"),e)+"%"),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,lfb_updateLabelItem(t,e)):t.is("[data-tooltiptext]")?t.attr("data-bs-original-title",$(this).attr("data-tooltiptext")):t.attr("data-bs-original-title",t.data("originaltitle")):t.is('[data-showprice="1"]')?"+"==t.attr("data-operation")?(t.attr("title",t.data("originaltitle")+": "+lfb_formatPrice(t.data("price"),e)+a.currency),t.attr("data-bs-original-title",t.data("originaltitle")+": "+lfb_formatPrice(t.data("price"),e)+a.currency),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,lfb_updateLabelItem(t,e)):"-"==t.attr("data-operation")?(t.attr("title",t.data("originaltitle")+": -"+lfb_formatPrice(t.data("price"),e)),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,t.attr("data-bs-original-title",t.data("originaltitle")+": -"+lfb_formatPrice(t.data("price"),e)+a.currency),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,lfb_updateLabelItem(t,e)):"x"==t.attr("data-operation")?(t.attr("title",t.data("originaltitle")+": +"+lfb_formatPrice(t.data("price"),e)+"%"),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,t.attr("data-bs-original-title",t.data("originaltitle")+": +"+lfb_formatPrice(t.data("price"),e)+"%"),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,lfb_updateLabelItem(t,e)):(t.attr("title",t.data("originaltitle")+": -"+lfb_formatPrice(t.data("price"),e)+"%"),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,t.attr("data-bs-original-title",t.data("originaltitle")+": -"+lfb_formatPrice(t.data("price"),e)+"%"),0!=a.disableTipMobile&&lfb_is_touch_device()||!t.is('[data-type="slider"]')&&!t.is(".lfb_button")&&a.imgTitlesStyle,lfb_updateLabelItem(t,e)):t.is("[data-tooltiptext]")?t.attr("data-bs-original-title",$(this).attr("data-tooltiptext")):t.attr("data-bs-original-title",t.data("originaltitle")),t.parent().children(".lfb_imgTitle").length>0&&t.is("[data-bs-original-title]")&&t.parent().children(".lfb_imgTitle").html(t.attr("data-bs-original-title"))}function lfb_isDecimal(t){if(""==t)return!1;var a;for(a in t)if(-1=="0123456789".indexOf(t[a]))return!1;return!0}function lfb_formatPriceWithCurrency(t,a){var e=lfb_getForm(a);return t=lfb_formatPrice(t,a),"left"==e.currencyPosition?t=e.currency+t:t+=e.currency,t}function lfb_formatPrice(t,a,e){if(t||(t=0),void 0===e)e=!1;var r=t.toString();r.indexOf(".")>-1&&(r=parseFloat(t).toFixed(2).toString());var l=lfb_getForm(a);"1"==l.summary_noDecimals&&(r=Math.round(r).toString());var i=l.decimalsSeparator,o=l.thousandsSeparator,f=r,s=l.millionSeparator,n=l.billionsSeparator,d="";return r.indexOf(".")>-1?(f=r.substr(0,r.indexOf(".")),d=r.substr(r.indexOf(".")+1,2),r=r.replace(".",l.decimalsSeparator),1==d.toString().length&&(d=d.toString()+"0"),f.length>9?r=f.substr(0,f.length-9)+n+f.substr(f.length-9,3)+s+f.substr(f.length-6,3)+o+f.substr(f.length-3,f.length)+l.decimalsSeparator+d:f.length>
16?r=f.substr(0,f.length-6)+s+f.substr(f.length-6,3)+o+f.substr(f.length-3,f.length)+l.decimalsSeparator+d:f.length>3&&(r=f.substr(0,f.length-3)+o+f.substr(f.length-3,f.length)+l.decimalsSeparator+d)):(f.length>9?r=r=f.substr(0,f.length-9)+n+f.substr(f.length-9,3)+s+f.substr(f.length-6,3)+o+f.substr(f.length-3,f.length):f.length>6?r=f.substr(0,f.length-6)+s+f.substr(f.length-6,3)+o+f.substr(f.length-3,f.length):f.length>3&&(r=f.substr(0,f.length-3)+o+f.substr(f.length-3,f.length)),e&&(r+=i+"00")),r}function lfb_formatQuantity(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g," ")}function lfb_decodeCalculation(t){var a=new Array;a[0]=9,a[1]=3,a[2]=5,a[3]=8,a[4]=2,a[5]=6,a[6]=4,a[7]=1,a[8]=0,a[9]=7;for(var e="",r=0;r<t.length;r++)a.indexOf(parseInt(t[r]))>-1?e+=a[parseInt(t[r])]:e+=t[r];return e}function lfb_updateVAT(t){var a=lfb_getForm(t);a.vatPrice=0,1==a.useVAT&&(a.singlePrice>0?(a.vatPrice=a.singlePrice*a.vatAmount/100,a.singlePrice=a.singlePrice+a.vatPrice):(a.vatPrice=a.price*a.vatAmount/100,a.price=a.price+a.vatPrice))}function lfb_shineBtn(t,a){var e=lfb_getForm(t);a.attr({width:a.width(),height:a.height()}),a.css({borderRadius:a.parent().css("border-radius")});var r=a.get(0).getContext("2d");r.clearRect(0,0,a.width(),a.height());var l=r.createLinearGradient(0,0,a.width(),a.height());if(e.shineFxIndex+=.08,e.shineFxIndex>1)r.clearRect(0,0,a.width(),a.height()),e.shineFxIndex=0;else{var i=e.shineFxIndex,o=i-.1;o<0&&(o=0);var f=i+.1;f>1&&(f=1),l.addColorStop(0,"transparent"),l.addColorStop(o,"rgba(255,255,255,0)"),l.addColorStop(i,"rgba(255,255,255,0.3)"),l.addColorStop(f,"rgba(255,255,255,0)"),l.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=l,r.fillRect(0,0,a.width(),a.height()),setTimeout(function(){lfb_shineBtn(t,a)},30)}}function lfb_updateLayerImages(t){var a=lfb_getForm(t);$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_genSlide[data-stepid="'+a.step+'"] .lfb_layeredImage').each(function(){var e=$
1(this).closest(".lfb_genSlide").attr("data-stepid"),r=parseInt(e);isNaN(r)&&(r=0);var l=JSON.parse(JSON.stringify(lfb_lastSteps));"final"!=a.step&&-1==jQuery.inArray(parseInt(a.step),l)?l.push(parseInt(a.step)):"final"==a.step&&l.push("final"),$(this).find("img:not(.lfb_baseLayer)").each(function(){var a=lfb_replaceAllBackSlash($(this).attr("data-showconditions"));if((a=a.replace(/'/g,'"')).length>0)try{var e=lfb_checkConditions(a=JSON.parse(a),t,r),l=$(this).attr("data-showconditionsoperator");"OR"==l&&!e.errorOR||"OR"!=l&&!e.error?$(this).fadeIn():$(this).fadeOut()}catch(t){$(this).fadeIn()}else $(this).fadeIn()})})}function lfb_updateShowSteps(t){for(var a=0;a<lfb_plannedSteps.length;a++){var e=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_genSlide[data-stepid="'+lfb_plannedSteps[a]+'"]');if(e.is("[data-useshowconditions]")){var r=lfb_replaceAllBackSlash(e.attr("data-showconditions"));if(""!=(r=r.replace(/'/g,'"')))try{var l=lfb_checkConditions(r=JSON.parse(r),t,parseInt(e.attr("data-stepid"))),i=e.attr("data-showconditionsoperator");"OR"==i&&!l.errorOR||"OR"!=i&&!l.error?e.is(".lfb_disabled")&&(e.css({opacity:0}),e.removeClass("lfb_disabled")):e.is(".lfb_disabled")||e.addClass("lfb_disabled")}catch(t){}}}$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_genSlide[data-useshowconditions]').each(function(){})}function lfb_updateShowItems(t){var a=lfb_getForm(t),e=JSON.parse(JSON.stringify(lfb_lastSteps));"final"!=a.step&&-1==jQuery.inArray(parseInt(a.step),e)?e.push(parseInt(a.step)):"final"==a.step&&e.push("final");for(var r=0;r<e.length;r++){var l=e[r];$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_genSlide[data-stepid="'+l+'"] [data-useshowconditions]').each(function(){var a=lfb_replaceAllBackSlash($(this).attr("data-showconditions"));if(""!=(a=a.replace(/'/g,'"')))try{var e=lfb_checkConditions(a=JSON.parse(a),t,l),r=$(this).attr("data-showconditionsoperator");"OR"==r&&!e.errorOR||"OR"!=r&&!e.error?($(this).is(".lfb_itemBloc")&&$(this).is(".lfb_disabled")||$(this).closest(".lfb_itemBloc").length>0&&$(this).closest(".lfb_itemBloc").is(".lfb_disabled"))&&($(this).removeClass("lfb_disabled"),$(this).closest(".lfb_itemBloc").removeClass("lfb_disabled"),$(this).stop().animate({opacity:1},300),$(this).is("input.prechecked")&&!$(this).is(":checked")&&lfb_itemClick($(this),!1,t),$(this).is(".lfb_selectable.prechecked")&&!$(this).is(".checked")&&lfb_itemClick($(this),!1,t),$(this).is(".lfb_button.prechecked")&&!$(this).is(".checked")&&lfb_itemClick($(this),!1,t),($(this).is('input[type="text"]')||$(this).is("textarea"))&&$(this).is("[data-initialvalue]")&&$(this).val($(this).attr("data-initialvalue")),$(this).closest(".lfb_itemBloc").stop().fadeIn(100)):$(this).is(".lfb_disabled")||($(this).css({opacity:1}),$(this).is(":checked")&&lfb_itemClick($(this),!1,t),$(this).is(".checked")&&lfb_itemClick($(this),!1,t),$(this).is(".lfb_dropzone")&&$(this).find(".dz-preview").remove(),$(this).addClass("lfb_disabled"),$(this).closest(".lfb_itemBloc").addClass("lfb_disabled"),$(this).stop().animate({opacity:0}
1,300),$(this).closest(".lfb_itemBloc").stop().fadeOut(300))}catch(t){}})}lfb_refreshVisualBuilderRows(t),setTimeout(function(){lfb_resize(a)},200)}function lfb_refreshVisualBuilderRows(t){$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]:not(.lfb_visualEditing) #lfb_mainPanel .lfb_genSlide .lfb_row').each(function(){var t=!1;$(this).find(".lfb_column").each(function(){var a=!1;$(this).find(".lfb_item:not(.lfb_disabled):not(.lfb-hidden)").length>0&&(a=!0,t=!0),a?$(this).removeClass("lfb-hidden"):$(this).addClass("lfb-hidden")}),$(this).children(".lfb_item:not(.lfb_disabled):not(.lfb-hidden)").length>0&&(t=!0),t?$(this).removeClass("lfb-hidden"):$(this).addClass("lfb-hidden")})}function lfb_removeFile(t,a){var e=lfb_getForm(t);jQuery.ajax({url:e.ajaxurl,type:"post",data:{action:"lfb_removeFile",formSession:$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"]').attr("data-formsession"),file:a}})}function lfb_disablesThemeScripts(){var t=!1;$("script").each(function(){if(t)if($(this).attr("src")&&$(this).attr("src").indexOf("WP_Helper_Creator")>0);else if($(this).attr("src")&&$(this).attr("src").indexOf("VisitorsTracker")>0);else if($(this).attr("src")&&$(this).attr("src").indexOf("WP_Visual_Chat")>0);else if($(this).attr("src")&&$(this).attr("src").indexOf("gravityforms")>0);else{(this.innerText||this.textContent).indexOf("analytics")<0&&0==$(this).parents(".gform_wrapper").length&&$(this).attr("disabled","disabled")}$(this).attr("src")&&$(this).attr("src").indexOf("lfb_form")>0&&(t=!0)})}function lfb_toggleFloatingSummary(t){$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').is(".lfb_open")?lfb_closeFloatingSummary(t):lfb_showFloatingSummary(t)}function lfb_closeFloatingSummary(t){$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').removeClass("lfb_open"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').stop().slideUp()}function lfb_showFloatingSummary(t){$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').addClass("lfb_open"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').stop().slideDown()}function lfb_updateOtherSummary(t){$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemtype="summary"]').each(function(){var a=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #finalSlide >.lfb_genContent > .lfb_genContentSlide  > #lfb_summary').first().clone();a.removeAttr("id"),a.removeClass("lfb-hidden"),a.find("h3").html($(this).attr("data-title")),"1"==$(this).attr("data-hideinfo")&&(a.find(".lfb_valueTh").addClass("lfb-hidden"),a.find(".lfb_valueTd").addClass("lfb-hidden"));var e=$(this),r=4;(a.find(".lfb_valueTh").is(".lfb-hidden")||"none"==a.find(".lfb_valueTh").css("display"))&&r--,a.find("thead .lfb_quantityTh").is(".lfb-hidden")&&r--,a.find("thead .lfb_priceTh").is(".lfb-hidden")&&r--,a.find(".lfb_summaryStep").attr("colspan",r),a.find(".lfb_static [colspan]").attr("colspan",r-1),e.find(".lfb_summaryItemContent").html(a)})}function lfb_updateFloatingSummary(t){var a=lfb_getForm(t);if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').length>0){var e=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary').clone(),r=!1;"1"==a.floatSummary_showInfo&&(r=!0),0==e.find("tbody").children(":not(.lfb_static)").length&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').is('[data-numberstep="1"]')?(lfb_closeFloatingSummary(t),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnFloatingSummary:not(.disabled)').addClass("disabled")):($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnFloatingSummary').removeClass("disabled"),e.find("h4").remove(),e.attr("id","lfb_floatingSummaryContent"),e.removeClass("lfb-hidden"),r||e.find(".lfb_valueTd,.lfb_valueTh").addClass("lfb-hidden"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').is('[data-hideprices="1"]')&&(e.find(".lfb_priceTd,.lfb_priceTh").addClass("lfb-hidden"),e.find("#lfb_summaryDiscountTr,#lfb_summaryTotalTr,#lfb_summaryDepositTr").addClass("lfb-hidden")),e.find(".lfb_summaryStep").attr("colspan",e.find("thead th:not(.lfb-hidden)").length),r||e.find("tr.lfb_noPriceRow").remove(),e.find("#lfb_vatRow>th:eq(0),#lfb_summaryDiscountTr>th:eq(0),#lfb_summaryTotalTr>th:eq(0),#lfb_summaryDepositTr>th:eq(0)").attr("colspan",e.find("thead th:not(.lfb-hidden)").length-1),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary #lfb_floatingSummaryInner').html(e),e.find(".lfb_summaryStep").on("click",function(){var t=$(this).closest("#lfb_form").attr("data-form"),a=lfb_getForm(t),e=parseInt($(this).attr("data-step"));(void 0===a.canGoprevious||a.canGoprevious)&&lfb_returnToStep(e,t)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').is('[data-numberstep="1"]')&&e.find(".lfb_summaryStep").each(function(t){var a=t+1;$(this).find("strong").html(a+". "+$(this).find("strong").html())}))}}function lfb_updateSummaryDeposit(t){var a=lfb_getForm(t),e=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [id="lfb_summaryDepositTr"]');if(0!=e.length)if((1==a.summary_showDeposit||"1"==a.summary_showDeposit)&&1!=a.summary_hidePrices){var r=lfb_getPaymentDisplayAmount(a),l=lfb_formatPriceWithCurrency(parseFloat(r).toFixed(2),t);1==a.summary_hideZeroDecimals&&Number.isInteger(r)&&(l=lfb_formatPriceWithCurrency(parseInt(r),t));var i=a.summary_depositLabel||"Deposit",o=lfb_getPaymentDisplayPercent(a);if(""!==o){var f=o;f=Number.isInteger(o)?parseInt(o):lfb_formatPrice(o,t),i=(i=(i=i.replace(/\{\{percent\}\}/g,f)).replace(/\[percent\]/g,f)).replace(/%percent%/g,f)}e.each(function(){var t=$(this),a=t.closest(".lfb_summary").find('[id="lfb_summaryTotalTr"]').children("th").first().attr("colspan");t.removeClass("lfb-hidden lfb_hidePrice").css("display","table-row"),t.children("th").first().html(i),t.find('[id="lfb_summaryDeposit"]>span').html(l),a&&t.children("th").first().attr("colspan",a)})}else e.addClass("lfb-hidden lfb_hidePrice").css("display","none")}function lfb_updateSummary(t,a){var e=lfb_getForm(t);if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary').length>0||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').length>0){var r=!0;a&&(r=!1);var l=lfb_getFormContent(t,r)[2],i=-1,o=!1;$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody tr:not(.lfb_static)').remove();var f="";if(1==e.summary_hidePrices&&(f="lfb-hidden lfb_hidePrice"),jQuery.each(l,function(){var a=this;if(null!=a.label&&""!=a.label&&"undefined"!=a.label&&"summary"!=a.type&&!$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemid="'+a.itemid+'"]').is(".lfb_disabled")&&0==$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemid="'+a.itemid+'"]').closest(".lfb_disabled").length&&0==$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody tr[data-item="'+a.itemid+'"]').length&&(isNaN(a.stepid)&&(a.stepid="final"),"final"!=a.stepid||"1"!=e.summary_hideFinalStep)){if(a.stepid!=i&&!$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is('[data-sumhidesteps="1"]')){var r=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_genSlide[data-stepid="'+a.stepid+'"]').attr("data-title");$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody #lfb_summaryDiscountTr').before('<tr><th colspan="4" class="lfb_summaryStep" data-step="'+a.stepid+'">'+r+"</th>")}i=a.stepid,isNaN(a.quantity)&&(a.quantity=1);var l="";isNaN(a.price)&&(l="lfb_noPriceRow",a.price=0);var s=a.value;void 0===a.value?s="":l+=" lfb_infoRow",""!=s&&a.showInSummary&&(o=!0);var n=a.price,d=lfb_formatPrice(a.quantity,t);
1if(""!=s&&0==n&&1==d)d="",n="";else{var b=!1;parseFloat(n)<0&&(b=!0,n*=-1),n="left"==e.currencyPosition?1==e.summary_hideZeroDecimals&&Number.isInteger(n)?e.currency+""+lfb_formatPrice(parseInt(n),t):e.currency+""+lfb_formatPrice(parseFloat(n).toFixed(2),t):1==e.summary_hideZeroDecimals&&Number.isInteger(n)?lfb_formatPrice(parseInt(n),t)+""+e.currency:lfb_formatPrice(parseFloat(n).toFixed(2),t)+""+e.currency,b&&(n="- "+n)}var m="";a.isFile,"repeater"==a.type&&s.indexOf("lfb_repeaterSummaryTable")>-1&&(m+=" lfb_repeaterSummaryCell");var p="";1==e.summary_hideQt&&(p="lfb-hidden"),1==e.summary_hideZero&&0==a.price&&(n=""),1==e.summary_hideZeroQt&&0==a.quantity&&(d="");var c="";a.showInSummary||(c="lfb-hidden"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemid="'+a.itemid+'"]').is('[data-hideqtsum="true"]')&&(d=""),e.priceSingle>0&&!a.isSinglePrice&&(""!=n||n>0)&&(n+=" "+e.subscriptionText),e.price<=0?$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary .lfb_subTxt').addClass("lfb-hidden"):$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary .lfb_subTxt').removeClass("lfb-hidden"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemid="'+a.itemid+'"]').is('[data-hidepricesum="true"]')&&(n="");var _="";1==e.summary_showDescriptions&&($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_itemContainer_'+a.itemid+" .lfb_itemDes").length>0&&""!=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_itemContainer_'+a.itemid+" .lfb_itemDes").html()?_='<br/><span class="lfb_sumItemDes" style="font-size:12px;">'+$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_itemContainer_'+a.itemid+" .lfb_itemDes").html()+"</span>":$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_itemContainer_'+a.itemid+" .lfb_imageButtonDescription").length>0&&(_='<br/><span class="lfb_sumItemDes">'+$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_itemContainer_'+a.itemid+" .lfb_imageButtonDescription").html()+"</span>"));var u=!0;$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemid="'+a.itemid+'"]').is('[data-hidezeropricesum="true"]')&&0==a.price&&(u=!1),u&&($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_itemContainer_'+a.itemid).is('[data-itemtype="filefield"]')||"repeater"==a.type?$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody #lfb_summaryDiscountTr').before('<tr data-item="'+a.itemid+'" data-itemstep="'+a.stepid+'" class="'+l+" "+c+'"><td>'+a.label+_+'</td><td class="lfb_valueTd '+m+'">'+s+'</td><td class="lfb_quantityTd '+p+'">'+d+'</td><td class="lfb_priceTd '+f+'">'+n+"</td></tr>"):$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody #lfb_summaryDiscountTr').before('<tr data-item="'+a.itemid+'" data-itemstep="'+a.stepid+'" class="'+l+" "+c+'"><td>'+a.label+_+'</td><td class="lfb_valueTd '+m+'"><span class="lfb_value">'+s+'</span></td><td class="lfb_quantityTd '+p+'">'+d+'</td><td class="lfb_priceTd '+f+'">'+n+"</td></tr>"))}}),e.reductionResult>0){var s=parseFloat(e.reductionResult).toFixed(2)+e.currency;if("left"==e.currencyPosition&&(s=e.currency+parseFloat(e.reductionResult).toFixed(2)),s="-"+s,$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_summaryDiscount>span').html(s),!e.discountCodeDisplayed){var n=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan]').html();0==$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan] i').length&&(":"==n.substr(n.length-1,1)?$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan]').html(n.substr(0,n.length-1)+" <i>("+e.discountCode+")</i> :"):$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_summaryDiscountTr th[colspan]').html(n+" <i>("+e.discountCode+")</i>"))}$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_summaryDiscountTr').css("display","table-row"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary #lfb_summaryDiscountTr').css("display","table-row")}if(1==e.useVAT){if(0==$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_vatRow').length){var d=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_summaryDiscountTr').clone();d.attr("id","lfb_vatRow"),d.find("#lfb_summaryDiscount").attr("id","lfb_summaryVat"),d.children("th").first().html(e.vatLabel+" "+e.vatAmount+"% :"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_summaryDiscountTr').after(d)}var b=e.currency+lfb_formatPrice(parseFloat(e.vatPrice).toFixed(2),t);1==e.summary_hideZeroDecimals&&Number.isInteger(e.price)&&(b=e.currency+lfb_formatPrice(parseInt(e.vatPrice),t)),"left"!=e.currencyPosition&&(b=lfb_formatPrice(parseFloat(e.vatPrice).toFixed(2),t)+e.currency,1==e.summary_hideZeroDecimals&&Number.isInteger(e.price)&&(b=lfb_formatPrice(parseInt(e.vatPrice),t)+e.currency)),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_summaryVat').html(b)}(!e.price||e.price<0)&&(e.price=0),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tr th.lfb_summaryStep').each(function(){0==$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tr[data-itemstep="'+$(this).attr("data-step")+'"]:not(.lfb-hidden)').length&&$(this).parent().addClass("lfb-hidden")});var m=e.currency+""+lfb_formatPrice(parseFloat(e.price).toFixed(2),t);e.currency,lfb_formatPrice(parseFloat(e.priceSingle).toFixed(2),t);if(1==e.summary_hideZeroDecimals&&Number.isInteger(e.price)&&(m=e.currency+""+lfb_formatPrice(parseInt(e.price),t),e.currency+""+lfb_formatPrice(parseInt(e.priceSingle),t)),"left"!=e.currencyPosition&&(1==e.summary_hideZeroDecimals&&Number.isInteger(e.price)?(m=lfb_formatPrice(parseInt(e.price),t)+""+e.currency,lfb_formatPrice(parseInt(e.priceSingle),t)+""+e.currency):(m=lfb_formatPrice(parseFloat(e.price).toFixed(2),t)+""+e.currency,lfb_formatPrice(parseFloat(e.priceSingle).toFixed(2),t)+""+e.currency)),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(m),$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"]').is("[data-totalrange]")&&parseFloat(e.price)>0){var p=$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"]').attr("data-rangelabelbetween"),c=$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"]').attr("data-rangelabeland"),_=parseFloat($('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"]').attr("data-totalrange")),u=parseFloat(e.price)-_/2,h=parseFloat(e.price)+_/2;$('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"]').is('[data-rangemode="percent"]')&&(u=parseFloat(e.price)-parseFloat(e.price)*_/100,h=parseFloat(e.price)+parseFloat(e.price)*_/100),u<0&&(u=0),h<0&&(h=0);var g=p+" <strong>"+e.currency+lfb_formatPrice(u,t)+"</strong> "+c+" <strong>"+e.currency+lfb_formatPrice(h,t)+"</strong>";if("left"!=e.currencyPosition){_=parseInt($('#lfb_form.lfb_bootstraped[data-form="'+e.formID+'"]').attr("data-totalrange"));g=p+" <strong>"+lfb_formatPrice(u,t)+e.currency+"</strong> "+c+" <strong>"+lfb_formatPrice(h,t)+e.currency+"</strong>"}$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table #lfb_summaryTotal>span:eq(0)').html(g)}var v=4;1==e.summary_hideQt&&(v-=1),1==e.summary_hidePrices&&(v-=1),o?($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table thead th:eq(1)').show().removeClass("lfb-hidden"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody tr:eq(1)').show(),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody td.lfb_valueTd').show(),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody tr#lfb_summaryTotalTr th[colspan]').attr("colspan",v-1),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody tr#lfb_summaryDiscountTr th[colspan]').attr("colspan",v-1),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody tr th.lfb_summaryStep').attr("colspan",v)):(v-=1,$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table td.lfb_valueTd').hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table thead th:eq(1)').hide().addClass("lfb-hidden"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody tr#lfb_summaryTotalTr th[colspan]').attr("colspan",v-1),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody tr#lfb_summaryDiscountTr th[colspan]').attr("colspan",v-1),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary table tbody tr th.lfb_summaryStep').attr("colspan",v))}$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_vatRow').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_vatRow').children("th").first().attr("colspan",$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary #lfb_summaryDiscountTr').children("th").first().attr("colspan")),lfb_updateSummaryDeposit(t),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is('[data-sumstepsclick="1"]')&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_summary .lfb_summaryStep:not([data-step="final"])').each(function(){$(this).css("cursor","pointer"),$(this).on("click",function(){var t=$(this).closest("#lfb_form").attr("data-form"),a=lfb_getForm(t),e=parseInt($(this).attr("data-step"));(void 0===a.canGoprevious||a.canGoprevious)&&lfb_returnToStep(e,t)})}),setTimeout(function(){lfb_updateFloatingSummary(t),lfb_updateOtherSummary(t)},300),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').trigger("summaryUpdated")}function lfb_orderSend(t,a,e,r){var l=lfb_getForm(t),i=lfb_getFormContent(t),o=i[0];o=o.replace(/<br\/>/g,"[n]");var f=i[1],s=i[2];l.urlVariables="",1==l.sendUrlVariables&&(l.urlVariables=lfb_getUrlVariables(t,i[2],!0)),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is("[data-subs]")&&(f+=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').attr("data-subs"));var n=l.selectedPaymentMethod||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').attr("data-selectedpaymentmethod")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').attr("data-defaultpaymentmethod")||"",d=0,b=!0;$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-activatePaypal="true"]:not(:checked):not(.checked)').each(function(){var t=$(this).closest(".lfb_genSlide").attr("data-stepid");"final"!=t&&(t=parseInt(t)),-1==jQuery.inArray(t,lfb_lastSteps)||(b=!1)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').find('[data-dontactivatepaypal="true"].checked,[data-dontactivatepaypal="true"]:checked').length>0&&(b=!1),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_paypalForm').is('[data-useipn="1"]')&&(d=1);var m=lfb_cloneSummary(!1,t),p=m.html();m.remove();var c=lfb_getContactInformations(t);e=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .emailField').val(),lfb_checkEmail(c.email)&&(e=c.email);var _=parseFloat(l.price),u=0,h="",g=$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"]').attr("data-formtitle");$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"]').is('[data-isSubs="true"]')&&(_=parseFloat(l.priceSingle),u=parseFloat(l.price),h=l.subscriptionText);var v=new Array;$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #finalSlide input[type=text],#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #finalSlide input[type=email], #lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #finalSlide textarea').each(function(){0==$(this).closest("#lfb_paypalForm").length&&v.push({fieldID:$(this).prop("id").substr(6,9),value:lfb_nl2br($(this).val())})});b=!0;$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-activatePaypal="true"]:not(:checked):not(.checked)').each(function(){var t=$(this).closest(".lfb_genSlide").attr("data-stepid");"final"!=t&&(t=parseInt(t)),-1==jQuery.inArray(t,lfb_lastSteps)||(b=!1)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').find('[data-dontactivatepaypal="true"].checked,[data-dontactivatepaypal="true"]:checked').length>0&&(b=!1),n&&"paypal"!=n&&(b=!1,d=0);if("undefined"!=typeof ga)try{ga("set","page",location.pathname+"#Form+sent"),ga("send","pageview")}catch(t){}if("undefined"!=typeof gtag)try{gtag("event","page_view",{page_location:window.location.href,page_path:location.pathname+"#Form+sent",page_title:document.title+" Form sent"})}catch(t){}l.emailSent=!0,null!==localStorage.getItem("lfb_savedFormID")&&parseInt(localStorage.getItem("lfb_savedFormID"))==t&&null!==localStorage.getItem("lfb_savedForm")&&(localStorage.removeItem("lfb_savedFormID"),localStorage.removeItem("lfb_formsession"),localStorage.removeItem("lfb_savedForm"),localStorage.removeItem("lfb_savedFormPastSteps"),localStorage.removeItem("lfb_savedFormStep")),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').fadeOut();var y=new Array;$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_datepicker[data-calendarid!="0"][data-registerevent="1"]').each(function(){if(""!=$(this).val()){var a={};if(a.calendarID=parseInt($(this).attr("data-calendarid")),a.duration=parseInt($(this).attr("data-eventduration")),a.durationType=$(this).attr("data-eventdurationtype"),"mins"==a.durationType&&(a.durationType="minutes"),a.isBusy=parseInt($(this).attr("data-eventbusy")),a.categoryID=parseInt($(this).attr("data-eventcategory")),a.startDate=moment($(this).datetimepicker("getDate")).format("YYYY-MM-DD HH:mm"),a.endDate=moment($(this).datetimepicker("getDate")).add(a.duration,a.durationType).format("YYYY-MM-DD HH:mm"),a.title=$
1(this).attr("data-eventtitle"),"date"==$(this).attr("data-datetype")){var e=moment($(this).datetimepicker("getDate"));a.startDate=e.format("YYYY-MM-DD");var r=moment($(this).datetimepicker("getDate")).add(a.duration,a.durationType);a.endDate=r.format("YYYY-MM-DD"),a.startDate!=a.endDate&&24!=r.diff(e,"hours")||(a.fullDay=1)}else a.fullDay=0;if("1"==$(this).attr("data-useasdaterange")){var l=$(this).attr("data-enddaterangeid");$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemid="'+l+'"]').length>0&&(a.fullDay=0,"date"==$(this).attr("data-datetype")?a.endDate=moment($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemid="'+l+'"]').datetimepicker("getDate")).format("YYYY-MM-DD"):a.endDate=moment($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-itemid="'+l+'"]').datetimepicker("getDate")).format("YYYY-MM-DD HH:mm"))}y.push(a)}}),void 0!==l.verifiedEmail&&l.verifiedEmail?e=l.verifiedEmail:l.verifiedEmail="";var I="";1==l.useSignature&&(I=l.signature.signature("toDataURL","image/png"));var D=$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_finalPrice').clone(),S=-1;D.find("span").each(function(t){"none"==$(this).css("display")&&(S=t)}),S>-1&&D.children("span")[S].remove();var P=D.text();jQuery.ajax({url:l.ajaxurl,type:"post",data:{action:"send_email",formID:l.formID,informations:a,email:e,customerInfos:lfb_getContactInformations(l.formID,!0),summary:p,stripeCustomerID:l.stripeCustomerID,stripeToken:l.stripeToken,stripeSrc:l.stripeSrc,paymentMethod:n,totalTxt:f,email_toUser:l.email_toUser,usePaypalIpn:d,discountCode:l.discountCode,formSession:$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_formSession').val(),totalText:P,total:_,totalSub:u,subFrequency:h,formTitle:g,contactSent:l.contactSent,contentTxt:o,items:s,fieldsLast:v,activatePaypal:b,captcha:l.captcha,useRtl:$("body").is(".rtl"),finalUrl:lfb_getRedirectionURL(l.formID),eventsData:JSON.stringify(y),razorpayReady:l.razorpayReady,variables:JSON.stringify(l.variables),verifiedEmail:l.verifiedEmail,signature:I,vatPrice:l.vatPrice,vatLabel:l.vatLabel,vatAmount:l.vatAmount},success:function(a){if(l.orderRef=a,1==l.sendUrlVariables&&(l.urlVariables=lfb_getUrlVariables(t,i[2])),m.remove(),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_loader').delay(1e3).fadeOut(),b&&void 0===l.stripePaid&&$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm').length>0&&(l.price>0||l.priceSingle>0)){var e=lfb_getPaymentAmountForBase(l,l.price);if(e=parseFloat(e).toFixed(2),l.priceSingle>0){var r=lfb_getPaymentAmountForBase(l,l.priceSingle);r=parseFloat(r).toFixed(2),0==$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=a1]').length&&($('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm').append('<input type="hidden" name="a1" value="0"/>'),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm').append('<input type="hidden" name="p1" value="1"/>'),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm').append('<input type="hidden" name="t1" value="M"/>')),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=a1]').val(r),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=p1]').val($('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=p3]').val()),e<=0&&($('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=cmd]').val("_xclick"),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=a3]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=t3]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=p3]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=bn]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=no_note]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=src]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=a1]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=t1]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=p1]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm').append('<input type="hidden" name="amount" value="'+r+'"/>'))}else $('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=a1]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=t1]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=p1]').remove(),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=amount]').val(e);$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name="return"]').val(lfb_getRedirectionURL(t));var f=lfb_getRedirectionURL(t);""!=f&&"#"!=f&&" "!=f&&l.save_to_cart&&""!=l.cartPage&&(f=l.cartPage),""!=f&&"#"!=f&&" "!=f&&(""!=l.urlVariables&&f.indexOf("?")>-1&&l.urlVariables.replace("?","&"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_paypalForm input[name="return"]').val(f+l.urlVariables)),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=a3]').val(e),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=custom]').val(a),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=item_number]').val(a),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=item_name]').val($('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [name=item_name]').val()+" - "+a),$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm [type="submit"]').trigger("click")}if(b&&$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_paypalForm').length>0&&(l.price>0||l.priceSingle>0)&&void 0===l.stripePaid||$('#lfb_form.lfb_bootstraped[data-form="'+l.formID+'"] #lfb_stripeForm').length>0&&l.price>0||l.save_to_cart||l.save_to_cart_edd||lfb_finalStep(t),l.save_to_cart_edd){var s=new Array,n=JSON.parse(JSON.stringify(lfb_lastSteps));"final"!=l.step&&-1==jQuery.inArray(parseInt(l.step),n)?n.push(parseInt(l.step)):"final"==l.step&&-1==jQuery.inArray("final",n)&&n.push("final"),jQuery.each(n,function(){$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+this+'"]').find('div.lfb_selectable.checked:not(.lfb_disabled),a.lfb_button.checked:not(.lfb_disabled),input[type=checkbox]:checked:not(.lfb_disabled),[data-type="slider"]:not(.lfb_disabled)').each(function(){var t=1;parseInt($(this).data("resqt"))>0&&(t=parseInt($(this).data("resqt"))),$(this).is('[data-type="slider"]')&&(t=parseInt($(this).slider("value")),isNaN(parseInt($(this).find(".tooltip-inner").html()))||(t=parseInt($(this).find(".tooltip-inner").html()))),parseInt($(this).data("prodid"))>0&&s.push({quantity:t,product_id:parseInt($(this).data("prodid")),variation:parseInt($(this).data("eddvar"))})})}),jQuery.ajax({url:l.ajaxurl,type:"post",data:{action:"lfb_cartdd_save",products:s},success:function(){lfb_finalStep(t)}})}if(l.save_to_cart){s=new Array,n=JSON.parse(JSON.stringify(lfb_lastSteps));"final"!=l.step&&-1==jQuery.inArray(parseInt(l.step),n)?n.push(parseInt(l.step)):"final"==l.step&&-1==jQuery.inArray("final",n)&&n.push("final"),jQuery.each(n,function(){$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+this+'"]').find('div.lfb_selectable.checked:not(.lfb_disabled),a.lfb_button.checked:not(.lfb_disabled),input[type=checkbox]:checked:not(.lfb_disabled),[data-type="numberfield"]:not(.lfb_disabled),[data-type="slider"]:not(.lfb_disabled),select[data-itemid]:not(.lfb_disabled)').each(function(){var t=1;if(parseInt($(this).data("resqt"))>0&&(t=parseInt($(this).data("resqt"))),$(this).is('[data-type="slider"]')&&(t=parseInt($(this).slider("value"))),$(this).is('[data-type="numberfield"]')&&(t=$(this).val()),parseInt($(this).data("prodid"))>0){var a=$(this).attr("data-originaltitle");$(this).is("[data-originallabel]")&&(a=$(this).attr("data-originallabel"));var e={quantity:t,title:a,product_id:parseInt($(this).data("prodid")),variation:parseInt($(this).attr("data-woovar")),price:parseFloat($(this).data("resprice")/t).toFixed(2)};void 0!==$(this).data("imageProduct")&&""!=$(this).data("imageProduct")&&(e.imageProduct=$(this).data("imageProduct")),s.push(e)}})}),jQuery.ajax({url:l.ajaxurl,type:"post",data:{action:"lfb_cart_save",formID:t,ref:a,emptyWooCart:l.emptyWooCart,products:s,contentTxt:o},success:function(){lfb_finalStep(t)}})}}})}function lfb_order(t){var a=lfb_getForm(t),e=!0,r="",l=new Array;$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide .form-group').removeClass("has-error"),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide').find('.lfb_item input:not([type="checkbox"])[data-itemid],.lfb_item textarea[data-itemid],.lfb_item select[data-itemid]').each(function(){if(0==$(this).closest("#lfb_paypalForm").length)if($(this).is(".lfb_disabled"));else if($(this).is("#lfb_couponField"));else if($(this).is("#lfb_captchaField"));else{var t=":";$(this).closest(".lfb_item").find("label").html().lastIndexOf(":")==$(this).closest(".lfb_item").find("label").html().length-1&&(t=""),$("body").is(".rtl")?r+='<p><b><span class="lfb_value">'+$(this).val()+"</span></b>
1"+t+" "+$(this).closest(".lfb_item").find("label").html()+"</p>":r+="<p>"+$(this).closest(".lfb_item").find("label").html()+" "+t+' <b><span class="lfb_value">'+$(this).val()+"</span></b></p>"}}),e=lfb_checkStepItemsValid("final",t),1==a.legalNoticeEnable&&($('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_legalCheckbox').is(":checked")||($('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_legalCheckbox').closest(".form-group").addClass("has-error"),e=!1)),1==e&&lfb_checkUserEmail(a)&&lfb_checkCaptcha(a,function(){var t=$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+a.step+'"] [data-fieldtype="email"][data-required="true"]').last().val();$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide').find("#lfb_btnOrder,.linkPrevious").fadeOut(250),lfb_uploadFiles(a.formID,r,t,l)})}function lfb_showFinalStepPending(t){var a=lfb_getForm(t),e=a.selectedPaymentMethod||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').attr("data-selectedpaymentmethod")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').attr("data-defaultpaymentmethod")||"",r=!0;$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-activatePaypal="true"]:not(:checked):not(.checked)').each(function(){var t=$(this).closest(".lfb_genSlide").attr("data-stepid");"final"!=t&&(t=parseInt(t)),-1!=jQuery.inArray(t,lfb_lastSteps)&&(r=!1)}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').find('[data-dontactivatepaypal="true"].checked,[data-dontactivatepaypal="true"]:checked').length>0&&(r=!1),e&&"paypal"!=e&&(r=!1),a.save_to_cart||a.save_to_cart_edd||r&&$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_paypalForm').length>0&&(a.price>0||a.priceSingle>0)&&void 0===a.stripePaid||$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_stripeForm').length>0&&a.price>0||($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #finalText').css({opacity:1,display:"block"}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_loader').delay(400).fadeOut(2*a.animationsSpeed))}function lfb_uploadFiles(t,a,e,r){var l=!0,i=lfb_getForm(t);if(i.useRazorpay&&!i.razorpayReady){l=!1;var o=i.price,f=0;$('#lfb_form.lfb_bootstraped[data-form="'+i.formID+'"]').is('[data-isSubs="true"]')&&(f=i.price,o=0,i.priceSingle>0&&(o=i.priceSingle)),jQuery.ajax({url:i.ajaxurl,type:"post",data:{action:"lfb_makeRazorPayment",formID:t,singleCost:o,subCost:f,ref:i.current_ref,email:e},success:function(e){if(-1==e.trim().indexOf("error")){var l,o=e.trim(),f="",s="",n=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .emailField').val();$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="firstName"]').length>0&&(f=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="firstName"]').val()),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="lastName"]').length>0&&(s=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-fieldtype="lastName"]').val()),l=f+" "+s;var d={key:i.razorpay_publishKey,name:i.title,description:"",image:i.razorpay_logoImg,handler:function(e){i.razorpayReady=!0,lfb_uploadFiles(t,a,n,r)},prefill:{name:l,email:n},theme:{color:i.colorA}};0==o.indexOf("sub_")?d.subscription_id=o:d.order_id=o,new Razorpay(d).open()}else alert(e)}})}else $('#lfb_form.lfb_bootstraped[data-form="'+i.formID+'"]').is('[data-emaillaststep="1"]')||(1!=i.disableScroll&&($('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is(".lfb_fullscreen")?($('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').css("overflow-y","hidden"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').animate({scrollTop:0},2*i.animationsSpeed)):"1"==i.scrollTopPage?$("body,html").animate({scrollTop:0},2*i.animationsSpeed):$("body,html").animate({scrollTop:$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').offset().top-(80+parseInt(lfb_getScrollTopMargin(i)))},2*i.animationsSpeed)),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnFloatingSummary').fadeOut(i.animationsSpeed),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_floatingSummary').fadeOut(i.animationsSpeed),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_loader').fadeIn(2*i.animationsSpeed),setTimeout(function(){$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel').fadeOut(2*i.animationsSpeed),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #startInfos').fadeOut(2*i.animationsSpeed),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #genPrice').fadeOut(2*i.animationsSpeed),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_stepper').fadeOut(2*i.animationsSpeed),$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide').fadeOut(2*i.animationsSpeed),$(' #lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_btn-next').fadeOut(i.animationsSpeed),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_btnNextContainer').fadeOut(i.animationsSpeed),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #finalText').css({opacity:0,display:"block"}),setTimeout(function(){1!=i.disableScroll&&($('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is(".lfb_fullscreen")?$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').animate({scrollTop:0},2*i.animationsSpeed):"1"==i.scrollTopPage?$("body,html").animate({scrollTop:0},2*i.animationsSpeed):$("body,html").animate({scrollTop:$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').offset().top-(80+parseInt(lfb_getScrollTopMargin(i))
1)},2*i.animationsSpeed)),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #finalText').animate({opacity:1},2*i.animationsSpeed),lfb_showFinalStepPending(t)},4*i.animationsSpeed+50)},2*i.animationsSpeed+50));l&&lfb_orderSend(t,a,e,r)}function lfb_isAnyParentFixed(t,a){if(!a)a=!1;try{t.parent().length>0&&"fixed"==t.parent().css("position")&&(a=!0)}catch(t){}return!a&&t.parent().length>0&&(a=lfb_isAnyParentFixed(t.parent(),a)),a}function lfb_is_touch_device(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}function lfb_applyCouponCode(t){var a=lfb_getForm(t),e=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_couponField').val();$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_couponField').closest(".form-group").removeClass("has-error"),e.length<3?$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_couponField').closest(".form-group").addClass("has-error"):jQuery.ajax({url:a.ajaxurl,type:"post",data:{action:"lfb_applyCouponCode",formID:t,code:e},success:function(r){setTimeout(function(){if("0"==r||""==r)$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_couponField').closest(".form-group").addClass("has-error");else{$('#lfb_form[data-form="'+t+'"] #lfb_couponContainer').length>0&&$('#lfb_form[data-form="'+t+'"] #lfb_couponContainer').slideUp();var l=r;r.indexOf("%")>0&&(l=r.substr(0,r.length-1),a.reductionType="%"),a.discountCode=e,a.reduction=parseFloat(l),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #finalSlide .lfb_genContent').animate({opacity:0}
1,a.animationsSpeed),setTimeout(function(){lfb_updatePrice(t),lfb_changeStep("final",t)},a.animationsSpeed+100)}},200)}})}function lfb_getRedirectionURL(t){var a=lfb_getForm(t),e=a.close_url;return 1==a.useRedirectionConditions&&jQuery.each(a.redirections,function(){var a=this.conditions.replace(/'/g,'"');a=a.replace(/\\"/g,'"');var r=lfb_checkConditions(a=JSON.parse(a),t,"final"),l=r.error,i=r.errorOR;("OR"==this.conditionsOperator&&!i||"OR"!=this.conditionsOperator&&!l)&&(e=this.url)}),e}function lfb_showWinStripePayment(t){var a=lfb_checkStepItemsValid("final",t.formID);1==t.legalNoticeEnable&&($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_legalCheckbox').is(":checked")||($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_legalCheckbox').closest(".form-group").addClass("has-error"),a=!1)),a&&lfb_checkCaptcha(t,function(){var a=!0;if($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-activatePaypal="true"]:not(:checked):not(.checked)').each(function(){var t=$(this).closest(".lfb_genSlide").attr("data-stepid");"final"!=t&&(t=parseInt(t)),-1==jQuery.inArray(t,lfb_lastSteps)||(a=!1)}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('[data-dontactivatepaypal="true"].checked,[data-dontactivatepaypal="true"]:checked').length>0&&(a=!1),!a||0==t.price&&0==t.priceSingle)lfb_order(t.formID);else{$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-info="amount"]').html($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_finalPrice').html()),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-panel="loading"]').show(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal .modal-footer").hide(),lfb_stripe=Stripe(t.stripePubKey);var e=parseFloat(t.price),r=0;$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').is('[data-isSubs="true"]')&&(e=parseFloat(t.priceSingle),r=parseFloat(t.price));var l="<span>"+lfb_formatPriceWithCurrency(e=lfb_getPaymentAmountForBase(t,e),t.formID)+"</span>";if($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-info="amount"]').html(l),""==t.stripeToken||void 0!==t.stripeAmountSingle&&t.stripeAmountSingle!=e||void 0!==t.stripeAmountSingle&&t.stripeAmountSub!=r)jQuery.ajax({url:t.ajaxurl,type:"post",data:{action:"lfb_getStripePaymentIntent",singleTotal:e,subTotal:r,formID:t.formID,customerInfos:lfb_getContactInformations(t.formID,!0)},success:function(a){a=JSON.parse(a),t.stripeToken=a.token,t.stripeCustomerID=a.customerID,t.stripeAmountSingle=e,t.stripeAmountSub=r;var l=lfb_stripe.elements();t.cardElement=l.create("cardNumber"),t.cardElement.mount('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-element'),t.cardExp=l.create("cardExpiry"),t.cardExp.mount('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_expiration-element'),t.cardExp.addEventListener("change",function(a){a.error?$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html(a.error.message):$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html("")}),t.cardCvc=l.create("cardCvc"),t.cardCvc.mount('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_cvc-element'),t.cardCvc.addEventListener("change",function(a){a.error?$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html(a.error.message):$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html("")}),t.cardElement.addEventListener("change",function(a){a.error?$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html(a.error.message):$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html("")}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-panel="form"]').show(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal .modal-footer").slideDown()}});else{var i=lfb_stripe.elements();t.cardElement=i.create("cardNumber"),t.cardElement.mount('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-element'),t.cardElement.addEventListener("change",function(a){a.error?$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html(a.error.message):$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html("")}),t.cardExp=i.create("cardExpiry"),t.cardExp.mount('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_expiration-element'),t.cardExp.addEventListener("change",function(a){a.error?$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html(a.error.message):$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html("")}
1),t.cardCvc=i.create("cardCvc"),t.cardCvc.mount('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_cvc-element'),t.cardCvc.addEventListener("change",function(a){a.error?$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html(a.error.message):$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripe_card-error').html("")});e=parseFloat(t.price),r=0;$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').is('[data-isSubs="true"]')&&(e=parseFloat(t.priceSingle),r=parseFloat(t.price));l="<span>"+lfb_formatPriceWithCurrency(e=lfb_getPaymentAmountForBase(t,e),t.formID)+"</span>";$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-info="amount"]').html(l),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-panel="form"]').show(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal .modal-footer").slideDown()}$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripeModal a[data-action="pay"]').unbind("click"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripeModal a[data-action="pay"]').on("click",function(){var a=!1;$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripeModal .has-error').removeClass("has-error"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripeModal [name="ownerName"]').val().length<3&&($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripeModal [name="ownerName"]').closest(".form-group").addClass("has-error"),a=!0),a||($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-panel="loading"]').show(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal .modal-footer").hide(),lfb_stripe.createPaymentMethod({type:"card",card:t.cardElement}).then(function(a){a.error?($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-info="error"]').html(a.error.message),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-panel="fail"]').show()):(t.stripeSrc=a.paymentMethod.id,r>0?jQuery.ajax({url:t.ajaxurl,type:"post",data:{action:"lfb_processStripeSubscription",formID:t.formID,stripeSrc:t.stripeSrc,customerID:t.stripeCustomerID,singleTotal:e,subTotal:r},success:function(a){if((a=a.trim()).indexOf("stripeError:")>-1)return $('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-info="error"]').html(a.replace("stripeError:","")),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-panel="fail"]').show(),void $('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal .modal-footer").show();1==a?e>0?lfb_stripe.handleCardPayment(t.stripeToken,t.cardElement,{payment_method_data:{billing_details:{name:$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripeModal [name="ownerName"]').val()}}}).then(function(a){a.error?($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-info="error"]').html(a.error),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-panel="fail"]').show()):($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal").modal("hide"),t.stripePaid=!0,lfb_order(t.formID))}):($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal").modal("hide"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal").modal("hide"),t.stripePaid=!0,lfb_order(t.formID)):a.indexOf("pi_")>-1&&lfb_stripe.confirmCardPayment(a,{payment_method:t.stripeSrc}).then(function(a){a.error?($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-info="error"]').html(a.error.message),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-panel="fail"]').show()):e>0?lfb_stripe.handleCardPayment(t.stripeToken,t.cardElement,{payment_method_data:{billing_details:{name:$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripeModal [name="ownerName"]').val()}}}).then(function(a){a.error?($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-info="error"]').html(a.error),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-panel="fail"]').show()):($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal").modal("hide"),t.stripePaid=!0,lfb_order(t.formID))}):($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal").modal("hide"),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal").modal("hide"),t.stripePaid=!0,lfb_order(t.formID))})}}):lfb_stripe.handleCardPayment(t.stripeToken,t.cardElement,{payment_method_data:{billing_details:{name:$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_stripeModal [name="ownerName"]').val()}}}).then(function(a){a.error?($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] [data-info="error"]').html(a.error),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal [data-panel]").hide(),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find('#lfb_stripeModal [data-panel="fail"]').show()):($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal").modal("hide"),t.stripePaid=!0,lfb_order(t.formID))}))}))}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"]').find("#lfb_stripeModal").modal("show")}})}function lfb_checkCaptcha(t,a){1==t.useCaptcha&&""!=t.recaptcha3Key?grecaptcha.ready(function(){gre
1captcha.execute(t.recaptcha3Key,{action:"sending_form"}).then(function(e){t.captcha=e,a(t)}).catch(function(e){console.log("Erreur lors de l'exécution de reCAPTCHA: ",e),a(t)})}):a(t)}function lfb_updateVariable(t,a,e,r){for(var l=0;l<t.variables.length;l++)if(t.variables[l].id==a){var i=t.variables[l];i.value=lfb_executeCalculation(e,t.formID,r),"integer"==i.type?i.value=Math.round(i.value):"float"==i.type&&(i.value=i.value);break}}function lfb_getVariableByID(t,a){for(var e=!1,r=0;r<t.variables.length;r++)if(t.variables[r].id==a){e=t.variables[r];break}return e}function lfb_initVerificationCodeModal(t){const a=t.formID;$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_verification-char').on("input",function(){1==$(this).val().length&&($(this).next().length>0?$(this).next().focus():lfb_checkVerificationCode(t))}),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] .lfb_verification-char').on("keydown",function(t){8==t.which&&$(this).prev().focus()}),$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_verificationModal .lfb_verification-code-inputs .lfb_verification-char').first().on("paste",function(e){e.preventDefault();for(var r=(e.originalEvent.clipboardData||window.clipboardData).getData("text"),l=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_verificationModal .lfb_verification-code-inputs .lfb_verification-char'),i=0;i<Math.min(r.length,l.length);i++)$(l[i]).val(r[i]);r.length>0&&$(l[Math.min(r.length,l.length)-1]).focus(),lfb_checkVerificationCode(t)})}function lfb_checkVerificationCode(t){var a="";$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_verificationModal .lfb_verification-code-inputs .lfb_verification-char').each(function(){a+=$(this).val()}),$.ajax({url:t.ajaxurl,type:"post",data:{action:"lfb_checkVerificationCode",formID:t.formID,code:a,email:t.emailProposed},success:function(a){(a=JSON.parse(a)).success?($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_verificationModal').modal("hide"),t.verifiedEmail=t.emailProposed,lfb_nextStep(t.formID)):($('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_verificationModal .lfb_verification-code-inputs .lfb_verification-char').val(""),$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_verificationModal .lfb_verification-code-inputs .lfb_verification-char').first().focus())}})}function lfb_checkUserEmail(t){var a=!0,e=t.formID;if(1==t.verifyEmail&&void 0===t.stripePaid&&(void 0===t.verifiedEmail||!t.verifiedEmail)&&$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t.step+'"] [data-fieldtype="email"][data-required="true"]').length>0){a=!1;var r=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+t.step+'"] [data-fieldtype="email"][data-required="true"]').last().val();t.emailProposed=r,$.ajax({url:t.ajaxurl,type:"post",data:{action:"lfb_sendVerificationCode",formID:e,email:r},success:function(t){t=JSON.parse(t),$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_verificationModal').modal("show"),$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_verificationModal .lfb_verification-code-inputs .lfb_verification-char').val(""),$('#lfb_form.lfb_bootstraped[data-form="'+e+'"] #lfb_verificationModal .lfb_verification-code-inputs .lfb_verification-char').first().focus(),t.success||alert(t.message)}})}return a}function lfb_isSelectionMode(t){return t>0?$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').is(".lfb_tldSelection"):$("#lfb_form.lfb_bootstraped[data-form]").is(".lfb_tldSelection")}function lfb_startFormIntro(t){lfb_isSelectionMode(t)||lfb_openGenerator(t)}function lfb_saveForLater(t){var a=lfb_getForm(t);if("0"!=a.step)if(null!==localStorage.getItem("lfb_savedFormID")&&parseInt(localStorage.getItem("lfb_savedFormID"))==t&&null!==localStorage.getItem("lfb_savedForm"))localStorage.removeItem("lfb_savedFormID"),localStorage.removeItem("lfb_formsession"),localStorage.removeItem("lfb_savedForm"),localStorage.removeItem("lfb_savedFormPastSteps"),localStorage.removeItem("lfb_savedFormStep"),localStorage.removeItem("lfb_savedFormTime"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fa,.fas,.fab").attr("class","fas "+$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-originalicon")),""!=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-defaulttext")&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm span:not(.fa):not(.fas):not(.fab)').html($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-defaulttext"));else{var e=lfb_getFormContent(t,!0)[2];localStorage.setItem("lfb_savedFormID",t),localStorage.setItem("lfb_formsession",$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').attr("data-formsession")),localStorage.setItem("lfb_savedForm",JSON.stringify(e)),localStorage.setItem("lfb_savedFormPastSteps",JSON.stringify(lfb_lastSteps)),localStorage.setItem("lfb_savedFormStep",a.step),localStorage.setItem("lfb_savedFormTime",Date.now());$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fa,.fab,.fas").length>0&&($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fa,.fas,.fab").attr("class"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fa,.fas,.fab").attr("class","fas fa-check")),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').removeClass("btn-default").addClass("btn-primary"),""!=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-defaulttext")&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm span:not(.fa):not(.fas):not(.fab)').html($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-deltext")),setTimeout(function(){$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fas,.fa,.fab").length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fas,.fa,.fab").attr("class","fas fa-redo"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').removeClass("btn-primary").addClass("btn-default")},1500)}}function lfb_getStoredSelectionItemID(t,a){var e=!1;return jQuery.each(t,function(){this.itemid==a&&(e=this)}),e}function lfb_restoreRepeaterRows(t,a,e){var r=t.closest(".lfb_repeater");if(0==r.length&&(r=t),r.find("tbody").empty(),a&&a.rows&&a.rows.length>0)$.each(a.rows,function(){lfb_repeaterAddRow(r,this)});else for(var l=lfb_getRepeaterConfig(r),i=parseInt(l.defaultRows,10)||0,o=0;o<i;o++)lfb_repeaterAddRow(r);lfb_updateRepeaterTotal(r,e)}function lfb_loadStoredForm(t){var a=lfb_getForm(t),e=new Date(parseInt(a.lastS));if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').length>0)if(null!==localStorage.getItem("lfb_savedFormID")&&parseInt(localStorage.getItem("lfb_savedFormID"))==t&&null!==localStorage.getItem("lfb_savedForm"))if(new Date(parseInt(localStorage.getItem("lfb_savedFormTime")))>e){$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fas,.fa,.fab").attr("class","fas fa-redo"),""!=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-defaulttext")&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm span:not(.fas):not(.fa):not(.fab)').html($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-deltext")),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"]').attr("data-formsession",localStorage.getItem("lfb_formsession"));var r=JSON.parse(localStorage.getItem("lfb_savedForm")),l=JSON.parse(localStorage.getItem("lfb_savedFormPastSteps")),i=localStorage.getItem("lfb_savedFormStep");-1==jQuery.inArray(i,l)&&l.push(i),l.length>0&&(a.autoStart=!0,jQuery.each(l,function(){var e=this.toString();$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-stepid="'+e+'"] [data-itemid]').each(function(){var e=$
1(this),l=lfb_getStoredSelectionItemID(r,parseInt(e.attr("data-itemid")));if(e.is('[data-type="repeater"]'))0!=l&&lfb_restoreRepeaterRows(e,l,t);else if(e.is(".lfb_selectable"))0!=l?(e.find(".icon_quantity").length>0?(e.find(".icon_quantity").html(l.quantity),e.find(".lfb_sliderQt").length>0&&e.find(".lfb_sliderQt").slider("value",parseInt(l.quantity))):e.find(".lfb_qtfield").length>0?e.find(".lfb_qtfield").val(parseInt(l.quantity)):e.is('[data-type="slider"]')&&e.slider("value",parseInt(l.quantity)),e.is(".checked")||lfb_itemClick($(this),!1,t)):e.is(".checked")&&lfb_itemClick($(this),!1,t);else if(e.is(".lfb_button"))0!=l?e.is(".checked")||lfb_itemClick($(this),!1,t):e.is(".checked")&&lfb_itemClick($(this),!1,t);else if(e.is('[data-toggle="switch"]'))0!=l?e.is(":checked")||e.trigger("click"):e.is(".checked")&&lfb_itemClick($(this),!1,t);else if(e.is(".lfb_colorPreview"))0!=l&&e.closest(".lfb_itemBloc").find(".lfb_colorpicker").val(l.value);else if(e.is(".lfb_datepicker"))0!=l&&e.val(l.value);else if(e.is(".lfb_dropzone")){if(0!=l){var i=Dropzone.forElement("#"+e.attr("id")),o=l.value,f={name:o=(o=(o=(o=o.replace('- <span class="lfb_file">',"")).replace(" ","")).replace("</span>","")).replace("<br/>",""),size:12345,accepted:!0,kind:"image"};i.emit("addedfile",f),i.files.push(f),i.createThumbnailFromUrl(f,a.imgPreview,function(){i.emit("complete",f)},"anonymous")}}else e.is('[data-type="numberfield"]')?0!=l&&(e.is('[data-valueasqt="1"]')?e.val(l.quantity):e.val(l.value)):e.is("select")?0!=l&&e.val(l.value):e.is('[data-type="slider"]')?0!=l&&e.slider("value",parseInt(l.quantity)):e.is("textarea")?0!=l&&e.val(l.value):e.is('input[type="text"]')&&0!=l&&e.val(l.value)}),e!=i?lfb_lastSteps.push(parseInt(e)):($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] [data-stepid="'+e+'"] .lfb_errorMsg').hide(),"1"==a.intro_enabled?($('#lfb_form.lfb_bootstraped[data-form="'+t+'"]  #startInfos > p').slideDown(),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnFloatingSummary').css({display:"inline-block"}),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').css({display:"inline-block"}),$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_btnStart').parent().fadeOut(a.animationsSpeed,function(){"2"!=a.showSteps&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]').find(".genPrice,#lfb_stepper").fadeIn(a.animationsSpeed),$(' #lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_mainPanel').fadeIn(a.animationsSpeed+a.animationsSpeed/2,function(){lfb_changeStep(i,t)})})):lfb_changeStep(i,t))})),setTimeout(function(){$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] .lfb_genSlide.lfb_activeStep').css("opacity",1)},2e3)}else localStorage.removeItem("lfb_formsession"),localStorage.removeItem("lfb_savedFormID"),localStorage.removeItem("lfb_savedForm"),localStorage.removeItem("lfb_savedFormPastSteps"),localStorage.removeItem("lfb_savedFormStep"),localStorage.removeItem("lfb_savedFormTime"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fa").attr("class","fa "+$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-originalicon")),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fab").attr("class","fab "+$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-originalicon")),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fas").attr("class","fas "+$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-originalicon")),""!=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-defaulttext")&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm span:not(.fas):not(.fab):not(.fa)').html($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-defaulttext"));else $('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fa").attr("class","fa "+$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-originalicon")),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fab").attr("class","fab "+$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-originalicon")),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').children(".fas").attr("class","fas "+$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-originalicon")),""!=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-defaulttext")&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm span:not(.fas):not(.fab):not(.fa)').html($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_btnSaveForm').attr("data-defaulttext"))}function lfb_updateStep(t){var a=lfb_getForm(t);if(1==a.showSteps){var e=new Array,r=!1;jQuery.each(lfb_plannedSteps,function(){r||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+this+'"]').is(".lfb_disabled")||!($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+this+'"] .lfb_item:not(.lfb-hidden)').length>0||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+this+'"] .lfb_distanceError').length>0)||e.push(this)});var l=0;jQuery.each(e,function(t,e){parseInt(e)==parseInt(a.step)&&(l=t)}),0==++l&&(l=1),"final"==a.step&&(l=e.length+1);var i=e.length+1;l>i&&(l=i);var o=100*l/i;$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .genPrice .progress .progress-bar-price> span:first-child').html(l+"/"+i),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .genPrice .progress .progress-bar').
1css("width",o+"%")}else if(3==a.showSteps){$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_stepper *:not(#lfb_stepperBar)').remove();r=!1,e=new Array;jQuery.each(lfb_plannedSteps,function(){r||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+this+'"]').is(".lfb_disabled")||!($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+this+'"] .lfb_item:not(.lfb-hidden)').length>0||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+this+'"] .lfb_distanceError').length>0)||e.push(this)});var f=!1,s=parseInt($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_genSlide.lfb_activeStep').attr("data-stepid"));jQuery.each(e,function(a){var r=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide[data-stepid="'+this+'"] .lfb_stepTitle').html(),l=$('<a href="javascript:"  class="lfb_stepperPoint" data-stepid="'+this+'" title="'+r+'"></a>');$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_stepper').append(l),l.tooltip({html:!0,container:'#lfb_form[data-form="'+t+'"]',placement:"bottom"}),f?l.addClass("lfb_disabledPoint"):parseInt(this)==s?(l.addClass("lfb_currentPoint"),f=!0):l.on("click",function(){lfb_returnToStep(parseInt($(this).attr("data-stepid")),t)});var i=100/e.length*a;100!=i&&0!=i||1!=e.length?i+=100/e.length/2:i=50,l.css({left:i+"%"}),parseInt(this)==s&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_stepper #lfb_stepperBar').css({width:i+"%"})}),"final"==a.step&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_stepper #lfb_stepperBar').css({width:"100%"})}}function lfb_initPanelResize(t){var a=lfb_getForm(t);$(window).resize(function(){lfb_resize(a)})}function lfb_resizeAll(){$(window).trigger("resize")}function lfb_resize(t){var a=$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_mainPanel'),e=a.find('.lfb_genSlide[data-stepid="'+t.step+'"]'),r=e.length>0?e.outerHeight(!0):0,l=300;0==t.animationsSpeed&&(l=0),r>0?a.stop(!0,!1).animate({minHeight:r},l,function(){a.css("minHeight","")}):a.css("minHeight",""),1==t.useSignature&&$('#lfb_form[data-form="'+t.formID+'"] #lfb_signature canvas').attr("width",$('#lfb_form.lfb_bootstraped[data-form="'+t.formID+'"] #lfb_signature').width())}function lfb_rgb2hex(t){if(!(t.indexOf("rgb")>-1))return t;try{function a(t){return("0"+parseInt(t).toString(16)).slice(-2)}return"#"+a((t=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/))[1])+a(t[2])+a(t[3])}catch(e){return t}}function lfb_padDatePart(t){return t<10?"0"+t:t.toString()}function lfb_formatDateValue(t,a){if("undefined"!=typeof moment)return moment(t).format(a);var e=t.getHours(),r=e%12;0===r&&(r=12);var l={YYYY:t.getFullYear().toString(),YY:t.getFullYear().toString().substr(2),MM:lfb_padDatePart(t.getMonth()+1),M:(t.getMonth()+1).toString(),DD:lfb_padDatePart(t.getDate()),D:t.getDate().toString(),HH:lfb_padDatePart(e),H:e.toString(),hh:lfb_padDatePart(r),h:r.toString(),mm:lfb_padDatePart(t.getMinutes()),m:t.getMinutes().toString(),ss:lfb_padDatePart(t.getSeconds()),s:t.getSeconds().toString(),A:e>=12?"PM":"AM",a:e>=12?"pm":"am"};return a.replace(/YYYY|YY|MM|DD|HH|hh|mm|ss|M|D|H|h|m|s|A|a/g,function(t){return l[t]})}function lfb_initRichTextValues(t){var a=lfb_getForm(t);$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_richtext[data-itemid]:not(.lfb_shortcode)').each(function(){var t=0,e=new Array;parseInt($(this).closest(".lfb_genSlide").attr("data-stepid"));if(void 0!==a.richtextsContent[$(this).attr("data-itemid").toString()]){for(var r=a.richtextsContent[$(this).attr("data-itemid").toString()];-1!=(t=r.indexOf("[variable-",t+1));){var l='<span class="lfb_richVariable" data-varvariableid="'+r.substr(t+10,r.indexOf("]",t)-(t+10))+'"></span>';e.push({oldValue:r.substr(t,r.indexOf("]",t)+1-t),newValue:l})}for(t=0;-1!=(t=r.indexOf("item-",t+1));){l='<span class="lfb_richVariable" data-varitemid="'+r.substr(t+5,r.indexOf("_",t)-(t+5))+'" data-action="'+r.substr(r.indexOf("_",t)+1,r.indexOf("]",t)-1-r.indexOf("_",t))+'"></span>';e.push({oldValue:r.substr(t-1,r.indexOf("]",t)+1-(t-1)),newValue:l})}if(r.indexOf("dateDifference-")>-1)for(;-1!=(t=r.indexOf("dateDifference-",t+1));){var i=r.indexOf("_",t+15)+1;l='<span class="lfb_richVariable" data-varitemid="'+r.substr(t+15,r.indexOf("_",t)-(t
1+15))+'" data-action="'+"dateDifference"+'" data-enddateid="'+r.substr(i,r.indexOf("]",i)-i)+'"></span>';e.push({oldValue:r.substr(t-1,r.indexOf("]",t)+1-(t-1)),newValue:l})}if(r.indexOf("distance_")>-1)for($target.attr("data-usedistance","true");-1!=(t=r.indexOf("distance_",t+1));){var o=r.indexOf("-",t+9)+1,f=r.substr(t+9,r.indexOf("-",t)-(t+9)),s=r.indexOf("-",o)+1,n=r.substr(o,r.indexOf("-",o)-o),d=r.indexOf("-",s)+1,b=r.substr(s,r.indexOf("-",s)-s),m=r.indexOf("_",d)+1,p=r.substr(d,r.indexOf("_",d)-d),c=r.indexOf("-",m)+1,_=r.substr(m,r.indexOf("-",m)-m),u=r.indexOf("-",c)+1,h=r.substr(c,r.indexOf("-",c)-c),g=r.indexOf("-",u)+1,v=r.substr(u,r.indexOf("-",u)-u),y=r.indexOf("_",g)+1,I=r.substr(g,r.indexOf("_",g)-g);l='<span class="lfb_richVariable" data-action="'+"distance"+'" data-distancetype="'+r.substr(y,r.indexOf("]",y)-y)+'" data-departadress="'+f+'" data-departcity="'+n+'" data-departzip="'+b+'" data-departcountry="'+p+'" data-arrivaladress="'+_+'" data-arrivalcity="'+h+'" data-arrivalzip="'+v+'" data-arrivalcountry="'+I+'" ></span>';e.push({oldValue:r.substr(t-1,r.indexOf("]",t)+1-(t-1)),newValue:l})}var D=new Date,S=D.getMonth()+1;S<10&&(S="0"+S);D.getFullYear().toString(),S.toString(),D.getDate().toString();var P=lfb_forms[0].dateFormat.toUpperCase();P=(P=(P=P.replace(/\\\//g,"/")).replace(/d /g,"DD ")).replace(/yyyy/g,"YYYY"),r=(r=(r=(r=r.replace(/\[currentDate\]/g,lfb_formatDateValue(D,P))).replace(/\[total\]/g,'<span class="lfb_richVariable" data-action="total"></span>')).replace(/\[payment_amount\]/g,'<span class="lfb_richVariable" data-action="payment_amount"></span>')).replace(/\[total_quantity\]/g,'<span class="lfb_richVariable" data-action="total_quantity"></span>'),jQuery.each(e,function(){r=r.replace(this.oldValue,this.newValue)}),$(this).html(r)}})}function lfb_updateRichTextValues(t){var a=lfb_getForm(t),e=new Date,r=e.getMonth()+1;r<10&&(r="0"+r);var l=e.getFullYear().toString()+r.toString()+e.getDate().toString();$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_genSlide[data-stepid="'+a.step+'"] .lfb_richtext[data-itemid]:not(.lfb_shortcode) .lfb_richVariable[data-varvariableid]').each(function(){var e=$
1(this).attr("data-varvariableid"),r=lfb_getVariableByID(a,e),l=0;r&&(l="float"==r.type?lfb_formatPrice(parseFloat(r.value),t):r.value),$(this).html(l)});var i=JSON.parse(JSON.stringify(lfb_lastSteps));"final"!=a.step&&-1==jQuery.inArray(parseInt(a.step),i)?i.push(parseInt(a.step)):"final"==a.step&&i.push("final"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .lfb_genSlide[data-stepid="'+a.step+'"] .lfb_richtext[data-itemid]:not(.lfb_shortcode) .lfb_richVariable:not([data-varvariableid])').each(function(){var r=parseInt($(this).closest(".lfb_genSlide").attr("data-stepid")),o=$(this).closest(".lfb_richtext").attr("data-itemid"),f=$(this).attr("data-varitemid"),s=$(this).attr("data-action"),n=0,d=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]')).closest(".lfb_genSlide").attr("data-stepid");if("final"!=d&&(d=parseInt(d)),"price"==s&&(n=0,jQuery.inArray(d,i)>-1&&("total"==f?n=a.price:($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is(".checked")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is(":checked")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is("select")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is('[data-type="slider"]'))&&(n=parseFloat($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').data("resprice")),isNaN(n)&&(n=0)),n=lfb_formatPrice(parseFloat(n),t,!0),"left"==a.currencyPosition?n=a.currency+n:n+=a.currency)),"payment_amount"==s&&(n=lfb_formatPriceWithCurrency(lfb_getPaymentDisplayAmount(a),t)),"title"!=s&&"label"!=s||(n=jQuery.inArray(d,i)>-1&&!_.is(".lfb_disabled")&&($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is(".checked")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is(":checked")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is("select")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is('[type="text"]')||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is('[type="number"]')||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is("textarea")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is(".lfb_colorPreview")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is("lfb_layeredImage")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is('[data-type="slider"]')||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is(".lfb_dropzone")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is('[data-type="slider"]'))?_.attr("data-originallabel"):""),"quantity"==s&&jQuery.inArray(d,i)>-1&&(_.is("input")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is(".checked")||$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is(":checked")?(n=_.is("input")?_.val():_.find(".icon_quantity").length>0?parseFloat(_.find(".icon_quantity").html()):_.find(".lfb_qtfield").val(),isNaN(n)&&(n=0)):$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is('[data-type="slider"]')&&(n=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').slider("value")),n=lfb_formatPrice(parseFloat(n),t)),"image"==s&&(n=jQuery.inArray(d,i)>-1&&!_.is(".lfb_disabled")&&_.is(".checked")?'<img src="'+$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"] img').attr("src")+'" alt=""/>':""),"value"==s&&(n=jQuery.inArray(d,i)>-1&&!_.is(".lfb_disabled")?($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').is("select"),$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').val()):""),"date"==s&&(n=jQuery.inArray(d,i)>-1&&_.is(".lfb_datepicker")&&null!=_.datetimepicker("getDate")?moment.utc(_.datetimepicker("getDate")).format("YYYY-MM-DD"):"null"),"dateDifference"==s){var b=f,m=$(this).attr("data-enddateid");if("currentDate"==b)b=e;else if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+b+'"]').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+b+'"]').val().length>0){b=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+b+'"]')).datetimepicker("getDate")}else b=e;if("currentDate"==m)m=l;else if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+m+'"]').length>0&&$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+m+'"]').val().length>0){m=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+m+'"]')).datetimepicker("getDate")}else m=e;var p=Math.abs(m.getTime()-b.getTime()),c=Math.ceil(p/864e5);c<0&&(c=0),n=c}if("distance"==s){var _,u=$(this).attr("data-departadress"),h=$(this).attr("data-departcity"),g=$(this).attr("data-departzip"),v=$(this).attr("data-departcountry"),y=$(this).attr("data-arrivaladress"),I=$(this).attr("data-arrivalcity"),D=$(this).attr("data-arrivalzip"),S=$(this).attr("data-arrivalcountry"),P=$(this).attr("data-distancetype");if(""!=u)if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+u+'"]').length>0)u=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+u+'"]')).val();else u=0;if(""!=h)if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+h+'"]').length>0)h=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+h+'"]')).val();else h=0;if(""!=g)if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+g+'"]').length>0)g=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+g+'"]')).val();else g=0;if(""!=v)if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+v+'"]').length>0)v=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+v+'"]')).val();else v=0;if(""!=y)if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+y+'"]').length>0)y=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+y+'"]')).val();else y=0;if(""!=I)if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+I+'"]').length>0)I=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+I+'"]')).val();else I=0;if(""!=D)if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+D+'"]').length>0)D=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+D+'"]')).val();else D=0;if(""!=S)if($('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+S+'"]').length>0)S=(_=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+S+'"]')).val();else S=0;$target.closest(".lfb_genSlide").find(".lfb_distanceError").length>0&&lfb_removeDistanceError(o,t);var k=content.substr(-1,content.indexOf("]",0)+1- -1),x=0;
1if(""!=$target.attr("data-distance")&&(x=parseFloat($target.attr("data-distance"))),""==u&&""==h&&""==v&&""==y&&""==I&&""==S&&""==g&&""==D)lfb_showDistanceError(o,t);else if(""==a.gmap_key)lfb_showDistanceError(o,t),console.log("invalid gmap api key");else{var F=u+" "+g+" "+h+" "+v,w=y+" "+D+" "+I+" "+S;$target.attr("data-departure")==F&&w==$target.attr("data-arrival")||($target.attr("data-departure",F),$target.attr("data-arrival",w),lfb_getDistanceCalc(k,t,o,F,w,P))}n=x}"total"==s?n=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"]  #lfb_finalPrice').html():"total_quantity"==s&&(n=lfb_getTotalQuantities(t,r,o)),$(this).html(n)})}function lfb_getCalendarByID(t){var a=!1;return jQuery.each(lfb_calendars,function(){this.id==t&&(a=this)}),a}function lfb_getDisabledHours(t,a,e,r){var l=new Array,i=lfb_getCalendarByID(t);if(0!=i){var o=$('#lfb_form .lfb_datepicker[data-calendarid="'+i.id+'"]').is('[data-disableminutes="0"]'),f=parseInt($('#lfb_form .lfb_datepicker[data-calendarid="'+i.id+'"]').attr("data-maxevents"));(isNaN(f)||0==f)&&(f=1);var s=r;"mins"==r&&(s="minutes");var n=new Date(a),d=new Array;if($('#lfb_form .lfb_datepicker[data-calendarid="'+i.id+'"]').attr("data-daysweek").indexOf(",")>-1&&(d=$('#lfb_form .lfb_datepicker[data-calendarid="'+i.id+'"]').attr("data-daysweek").split(",")),""!=n.getDay()&&($('#lfb_form .lfb_datepicker[data-calendarid="'+i.id+'"]').attr("data-daysweek")==n.getDay()||d.indexOf(n.getDay())>-1))for(var b=0;b<24;b++)l.push(parseInt(b));else{if(""!=$('#lfb_form .lfb_datepicker[data-calendarid="'+i.id+'"][data-hoursdisabled]').attr("data-hoursdisabled")){var m=$('#lfb_form .lfb_datepicker[data-calendarid="'+i.id+'"]').attr("data-hoursdisabled");m.indexOf(",")>-1?jQuery.each(m.split(","),function(){var t=parseInt(this);if(l.push(t),"hours"==r)for(var a=0;a<parseInt(e);a++)-1==jQuery.inArray(t-a,l)&&l.push(t-a);else if("mins"==r)for(a=0;a<=Math.floor(e/60);a++)-1==jQuery.inArray(t-a,l)&&l.push(t-a)}):l.push(parseInt(m))}var p=[];for(b=0;b<24;b++)p[b]=0;jQuery.each(i.events,function(){var t=moment(this.startDate);t=(t=t.subtract(parseInt(e),s)).add(5,"minute");for(var r=0;r<24;r++){var i=r;r<10&&(i="0"+r);var n=moment(a+" "+i+":00");(!o&&n.isSameOrAfter(t,"hour")||o&&n.isAfter(t,"hour"))&&n.isBefore(moment(this.endDate),"hour")&&(p[r]++,p[r]>=f&&-1==jQuery.inArray(r,l)&&l.push(parseInt(r)))}})}}return l}function lfb_getDisabledMinutes(t,a,e,r,l){var i=new Array,o=lfb_getCalendarByID(t);if(0!=o){var f=parseInt($('#lfb_form .lfb_datepicker[data-calendarid="'+o.id+'"]').attr("data-maxevents"));(isNaN(f)||0==f)&&(f=1);var s=lfb_getDisabledHours(t,a,r,l),n=l;"mins"==l&&(n="minutes");var d=$('#lfb_form .lfb_datepicker[data-calendarid="'+o.id+'"]').attr("data-hoursdisabled");if(d.indexOf(",")>-1&&jQuery.each(d.split(","),function(){for(var t=parseInt(this),l=moment(new Date(a+" "+t+":00")).subtract(parseInt(r),n).add(1,"minute").format("YYYY-MM-DD HH:mm"),o=0;o<=11;o++)moment(new Date(a+" "+e+":"+5*o)).isAfter(moment(new Date(l)))&&moment(new Date(a+" "+e+":"+5*o)).isBefore(moment(new Date(moment(new Date(a+" "+t+":00")))))&&-1==jQuery.inArray(5*o,i)&&i.push(parseInt(5*o))}),jQuery.inArray(parseInt(e),s)>-1)for(var b=0;b<=11;b++)-1==jQuery.inArray(5*b,i)&&i.push(parseInt(5*b));var m=[];for(b=0;b<=11;b++)m[parseInt(5*b)]=0;jQuery.each(o.events,function(){var t=moment(this.startDate);t=(t=t.subtract(parseInt(r),n)).add(5,"minute");var l=parseInt(e);l<10&&(l="0"+l);var o=moment(a+" "+l+":00");if(o.isAfter(t,"hour")&&o.isBefore(moment(this.endDate),"hour"))for(var s=0;s<=11;s++)m[parseInt(5*s)]++,m[parseInt(5*s)]>=f&&-1==jQuery.inArray(5*s,i)&&i.push(parseInt(5*s));else if(o.isSame(t,"hour"))for(s=0;s<=11;s++)t.isSame(moment(this.endDate),"hour")?5*s>=t.format("mm")&&5*s<moment(this.endDate).format("mm")&&(m[parseInt(5*s)]++,m[parseInt(5*s)]>=f&&-1==jQuery.inArray(5*s,i)&&i.push(parseInt(5*s))):5*s>=t.format("mm")&&(m[parseInt(5*s)]++,m[parseInt(5*s)]>=f&&-1==jQuery.inArray(5*s,i)&&i.push(parseInt(5*s)));else if(o.isSame(moment(this.endDate),"hour"))for(s=0;s<=11;s++)5*s<moment(this.endDate).format("mm")&&(m[parseInt(5*s)]++,m[parseInt(5*s)]>=f&&-1==jQuery.inArray(5*s,i)&&i.push(parseInt(5*s)))})}return i}function lfb_setAnimImmediate(t,a){lfb_getForm(a).animationsSpeed=0}function lfb_getCalendarEventsAtDate(t,a){var e=0;return jQuery.each(t.events,function(){var t=moment.utc(this.startDate),r=moment.utc(this.endDate);a.isSameOrAfter(t)&&(this.fullDay||a.isSameOrBefore(r))&&e++}),e}function lfb_getBusyDates(t,a){var e=lfb_getForm(t);jQuery.ajax({url:e.ajaxurl,type:"post",data:{action:"lfb_getBusyDates",formID:t,calendarsIDs:a},success:function(t){t=t.trim(),t=JSON.parse(t,!0),lfb_calendars=t.calendars,jQuery.each(t.calendars,function(){var t=this;$('#lfb_form .lfb_datepicker[data-calendarid="'+this.id+'"]').each(function(){var a=$(this),e=new Array;jQuery.each(t.events,function(){if(1==this.fullDay){var r=moment.utc(this.startDate);(f=moment.utc(this.endDate)).subtract(1,"minutes");var l=r.format("YYYY-MM-DD");lfb_getCalendarEventsAtDate(t,r)>=a.attr("data-maxevents")&&e.push(l);for(var i=1;i<=f.diff(r,"days");i++){var o=r.add(i,"days");lfb_getCalendarEventsAtDate(t,o)>=a.attr("data-maxevents")&&e.push(o.format("YYYY-MM-DD"))}}else{r=moment.utc(this.startDate),a.attr("data-eventdurationtype");"mins"==a.attr("data-eventdurationtype")&&"minutes",this.startDate=r.format("YYYY-MM-DD HH:mm");var f=moment.utc(this.endDate);l=r.format("YYYY-MM-DD");if(f.diff(r,"hours")>24){var s=1;0==r.format("m")&&(s=0);for(i=s;i<=f.diff(r,"days");i++){o=r.clone().add(i,"days");lfb_getCalendarEventsAtDate(t,o)>=a.attr("data-maxevents")&&e.push(o.format("YYYY-MM-DD"))}}}}),a.datetimepicker("setDatesDisabled",e)})})}})}function lfb_downloadAsPDF(t){var a=lfb_getForm(t),e=lfb_cloneSummary(!1,t),r=e.html();e.remove();var l=lfb_getFormContent(t),i=l[0];i=i.replace(/<br\/>/g,"[n]");var o=l[1],f=l[2],s=lfb_getContactInformations(t);email=$('#lfb_form.lfb_bootstraped[data-form="'+t+'"] .emailField').val(),lfb_checkEmail(s.email)&&(email=s.email);var n="";$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #finalSlide').find('.lfb_item input:not([type="checkbox"])[data-itemid],.lfb_item textarea[data-itemid],.lfb_item select[data-itemid]').each(function(){if(0==$(this).closest("#lfb_paypalForm").length)if($(this).is(".lfb_disabled"));else if($(this).is("#lfb_couponField"));else if($(this).is("#lfb_captchaField"));else{var t=":";$(this).closest(".lfb_item").find("label").html().lastIndexOf(":")==$(this).closest(".lfb_item").find("label").html().length-1&&(t=""),$("body").is(".rtl")?n+='<p><b><span class="lfb_value">'+$(this).val()+"</span></b>
1"+t+" "+$(this).closest(".lfb_item").find("label").html()+"</p>":n+="<p>"+$(this).closest(".lfb_item").find("label").html()+" "+t+' <b><span class="lfb_value">'+$(this).val()+"</span></b></p>"}}),jQuery.ajax({url:a.ajaxurl,type:"post",data:{action:"lfb_downloadOrderPDF",formID:a.formID,informations:n,email:email,customerInfos:lfb_getContactInformations(a.formID,!0),summary:r,totalTxt:o,formSession:$('#lfb_form.lfb_bootstraped[data-form="'+a.formID+'"] #lfb_formSession').val(),items:f,useRtl:$("body").is(".rtl"),variables:JSON.stringify(a.variables)},success:function(t){var e=window.open(a.homeUrl+"/index.php?EPFormsBuilder=downloadMyOrder","_blank");"null"!=typeof e&&null!=e&&(e.focus(),setTimeout(function(){e.close()},300))}})}function lfb_updateGmapItinerary(t,a){var e=t.attr("data-itinerary"),r=t.data("directionRenderer"),l=(t.data("gmap"),!1);t.is(".lfb_gmapInit")||(l=!0,t.addClass("lfb_gmapInit"));var i,o=e.indexOf("-",10)+1,f=e.substr(10,e.indexOf("-",1)-10),s=e.indexOf("-",o)+1,n=e.substr(o,e.indexOf("-",o)-o),d=e.indexOf("-",s)+1,b=e.substr(s,e.indexOf("-",s)-s),m=e.indexOf("_",d)+1,p=e.substr(d,e.indexOf("_",d)-d),c=e.indexOf("-",m)+1,_=e.substr(m,e.indexOf("-",m)-m),u=e.indexOf("-",c)+1,h=e.substr(c,e.indexOf("-",c)-c),g=e.indexOf("-",u)+1,v=e.substr(u,e.indexOf("-",u)-u),y=(e.indexOf("_",g),e.substr(g,e.indexOf("_",g)-g));""!=f&&($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]').length>0?(f=(i=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+f+'"]')).val(),l&&i.on("focusout change",function(){lfb_updateGmapItinerary(t,a)})):f=0);""!=n&&($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+n+'"]').length>0?(n=(i=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+n+'"]')).val(),l&&i.on("focusout change",function(){lfb_updateGmapItinerary(t,a)})):n=0);""!=b&&($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+b+'"]').length>0?(b=(i=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+b+'"]')).val(),l&&i.on("focusout change",function(){lfb_updateGmapItinerary(t,a)})):b=0);""!=p&&($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+p+'"]').length>0?(p=(i=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+p+'"]')).val(),l&&i.on("focusout change",function(){lfb_updateGmapItinerary(t,a)})):p=0);""!=_&&($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+_+'"]').length>0?(_=(i=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+_+'"]')).val(),l&&i.on("focusout change",function(){lfb_updateGmapItinerary(t,a)})):_=0);""!=h&&($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+h+'"]').length>0?(h=(i=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+h+'"]')).val(),l&&i.on("focusout change",function(){lfb_updateGmapItinerary(t,a)})):h=0);""!=v&&($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+v+'"]').length>0?(v=(i=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+v+'"]')).val(),l&&i.on("focusout change",function(){lfb_updateGmapItinerary(t,a)})):v=0);""!=y&&($('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+y+'"]').length>0?(y=(i=$('#lfb_form.lfb_bootstraped[data-form="'+a+'"] #lfb_mainPanel .lfb_genSlide [data-itemid="'+y+'"]')).val(),l&&i.on("focusout change",function(){lfb_updateGmapItinerary(t,a)})):y=0);var I=f+" "+b+" "+n+" "+p,D=_+" "+v+" "+h+" "+y;I.replaceAll(" ","").length>2&&D.replaceAll(" ","").length>2&&(new google.maps.DirectionsService).route({origin:{query:I},destination:{query:D},travelMode:google.maps.TravelMode.DRIVING},(t,a)=>{"OK"===a&&r.setDirections(t)})}function lfb_getMapStyle(t){for(var a=lfb_mapStyles[0],e=0;e<lfb_mapStyles.length;e++)if(lfb_mapStyles[e].name==t){a=lfb_mapStyles[e].styles;break}return a}function lfb_getScrollTopMargin(t){return $(window).width()<=480?t.scrollTopMarginMobile:t.scrollTopMargin}lfb_initMapStyles(),$(document).ready(function(){initComboBox(),lfb_initDocReady(),$("body").on("lfb_initDocReady",function(t){lfb_initDocReady()}),$("body").on("lfb_initWinReady",function(t){lfb_initWinReady()}),$("body").on("lfb_resize",function(t){lfb_onResize()}),$("#lfb_signature").length>0&&(document.addEventListener("touchstart",touchHandler,!0),document.addEventListener("touchmove",touchHandler,!0),document.addEventListener("touchend",touchHandler,!0),document.addEventListener("touchcancel",touchHandler,!0))}),$(window).on("load",function(){lfb_initWinReady()})})(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.