LittleDemon WebShell


Linux server27.hostingraja.org 2.6.32-954.3.5.lve1.4.93.el6.x86_64 #1 SMP Wed Oct 4 17:04:29 UTC 2023 x86_64
Path : /home/udaipurk/public_html/websites/rishh/XStore Theme/xstore/js/modules/
File Upload :
Command :
Current File : //home/udaipurk/public_html/websites/rishh/XStore Theme/xstore/js/modules/ethemeCheckoutPage.min.js

!function(p){"use strict";p(window).on("elementor/frontend/init",function(){var o=elementorModules.frontend.handlers.Base.extend({onInit:function(){elementorModules.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.openedStep=!1,this.$openedStepTitle=!1,this.toggleSlideEffect=!0,this.run()},getDefaultSettings:function(){return{selectors:{accordionTitle:".step-title",accordionStepsWrapper:".etheme-checkout-page-steps-footer",accordionPrevStep:".etheme-checkout-page-previous-step",accordionNextStep:".etheme-checkout-page-next-step",formRow:".form-row",loginFormBox:".etheme-elementor-cart-checkout-page-login-form",showLoginForm:".show_login",loginForm:".woocommerce-form-login",loginSubmit:".woocommerce-form-login button",applyCoupon:".checkout_coupon button",couponBox:".etheme-elementor-cart-checkout-page-coupon",orderDetailsWrapper:".etheme-elementor-checkout-page-order-details-wrapper",cartTotalsWrapper:".etheme-elementor-cart-page-totals-wrapper",shipToDifferentAddress:"#ship-to-different-address",newAccountInput:"input#createaccount"},classes:{multistepWrapper:"design-type-multistep",billingFields:"woocommerce-billing-fields",shippingFields:"woocommerce-shipping-fields",accountFields:"woocommerce-account-fields",additionalInformationFields:"woocommerce-shipping-additional-information",shippingMethodsFields:"woocommerce-shipping-methods-fields",paymentWrapper:"woocommerce-checkout-payment-wrapper",processing:"processing",woocommerceInvalid:"woocommerce-invalid",woocommerceInvalidRequired:"woocommerce-invalid-required-field"}}},getDefaultElements:function(){var e=this.getSettings("selectors");return{$accordionTitle:this.$element.find(e.accordionTitle),$accordionStepsWrapper:this.$element.find(e.accordionStepsWrapper),$accordionPrevStep:this.$element.find(e.accordionPrevStep),$accordionNextStep:this.$element.find(e.accordionNextStep),$formRow:this.$element.find(e.formRow),$loginFormBox:this.$element.find(e.loginFormBox),$showLoginForm:this.$element.find(e.showLoginForm),$loginForm:this.$element.find(e.loginForm),$loginSubmit:this.$element.find(e.loginSubmit),$applyCoupon:this.$element.find(e.applyCoupon),$couponBox:this.$element.find(e.couponBox),$orderDetailsWrapper:this.$element.find(e.orderDetailsWrapper),$cartTotalsWrapper:this.$element.find(e.cartTotalsWrapper),$shipToDifferentAddress:this.$element.find(e.shipToDifferentAddress),$newAccountInput:this.$element.find(e.newAccountInput)}},runMultistepLayout:function(){let o=this,t=-1<p.inArray(o.getWidgetType(),["woocommerce-checkout-etheme_page_multistep"]),n=elementorFrontend.isEditMode(),s=n?elementorFrontend.elements.$body:o.$element.parents("form.woocommerce-checkout"),a=o.getSettings("selectors"),r=o.getSettings("classes");if(n||!s.data("et_multistep_steps_done")){var i=s.find("."+r.multistepWrapper);let e=i.first();var c=new URLSearchParams(window.location.search).get("step");if(c)switch(c){case"billing_details":e=s.find("."+r.billingFields);break;case"new_account":e=s.find("."+r.accountFields);break;case"shipping_details":e=s.find("."+r.shippingFields);break;case"shipping_methods":e=s.find("."+r.shippingMethodsFields);break;case"payment_methods":e=s.find("."+r.paymentWrapper);break;case"additional_information":e=s.find("."+r.additionalInformationFields)}e.addClass(r.processing).find(a.accordionTitle).addClass("opened inited"),o.openedStep=!0,o.$openedStepTitle=e.find(a.accordionTitle),s.find("."+r.multistepWrapper+":not(."+r.processing+")").find(a.accordionTitle).addClass("inited").next().slideUp(this.toggleSlideEffect?400:0),i.removeClass(r.processing),i.each(function(e,t){var o=e+1;p(this).attr("data-step",o);let n=!1;p(this).hasClass(r.billingFields)?n="billing_details":p(this).hasClass(r.shippingFields)?n="shipping_details":p(this).hasClass(r.accountFields)?n="new_account":p(this).hasClass(r.additionalInformationFields)?n="additional_information":p(this).hasClass(r.paymentWrapper)?n="payment_methods":p(this).hasClass(r.shippingMethodsFields)&&(n="shipping_methods"),n&&p(this).attr("data-step-name",n),p(this).find(a.accordionPrevStep).attr("data-step",e),p(this).find(a.accordionNextStep).attr("data-step",o+1)}),t||(n||i.each(function(e,t){var e=e+1,o=p(this).find(a.accordionPrevStep),n=s.find("."+r.multistepWrapper+'[data-step="'+(e-1)+'"]').find(a.accordionTitle).text(),i=p(this).find(a.accordionNextStep),e=s.find("."+r.multistepWrapper+'[data-step="'+(e+1)+'"]').find(a.accordionTitle).text();if(n)o.find("span").text(o.find("span").text().replace("{{step_title}}",n));else{let e=o.data("fallback-text");o.attr("data-fallback-url")&&(e='<a href="'+o.attr("data-fallback-url")+'">'+e+"</a>"),o.html(e)}e?i.find("span").text(i.find("span").text().replace("{{step_title}}",e)):i.text(i.data("fallback-text"))}),s.find(a.accordionStepsWrapper).removeClass("loading")),s.data("et_multistep_steps_done","yes")}this.elements.$accordionTitle.on("click",function(e,t){if(o.toggleSlideEffect||void 0===e.originalEvent)if(s.data("et_multistep_steps_done")){let e=!0;void((e=t&&t.validationsSkiped?e:o.runValidations(o,s,o.openedStep?o.$openedStepTitle:p(this)))&&o.runMultistepLayoutStep(o,s,p(this)))}else o.runMultistepLayoutStep(o,s,p(this))}),this.elements.$accordionPrevStep.on("click",function(){o.runPrevNextStep(o,a,s,p(this).attr("data-step"))}),this.elements.$accordionNextStep.on("click",function(){o.runPrevNextStep(o,a,s,p(this).attr("data-step"))})},runPrevNextStep:function(e,t,o,n){e.openedStep&&!e.runValidations(e,o,e.$openedStepTitle)||e.runPrevNextStepValidated(e,t,o,n)},runPrevNextStepValidated:function(e,t,o,n){e.runMultistepLayoutSteps(e,t,o,n,{validationsSkipped:!1})},runValidations:function(e,t,o){var e=e.getSettings("classes"),n=o.parents("."+e.multistepWrapper);let i=!0,s=!1;switch(n.attr("data-step-name")){case"billing_details":s=!0;break;case"shipping_details":n.find("#ship-to-different-address input").is(":checked")&&(s=!0);break;case"account_details":"yes"===wc_checkout_params.option_guest_checkout&&n.find("input#createaccount").is(":checked")&&(s=!0)}return s&&(n.find(".input-text, select, input:checkbox").trigger("validate"),n.find("."+e.woocommerceInvalid).length)&&(i=!1,p("html, body").animate({scrollTop:n.offset().top},1e3)),i},runMultistepLayoutSteps:function(e,t,o,n,i=!1){n<1||(e=e.getSettings("classes"),(o=o.find("."+e.multistepWrapper+'[data-step="'+n+'"]')).length&&o.find(t.accordionTitle).trigger("click",{validationsSkiped:i}))},runMultistepLayoutStep:function(e,t,o){var n=e.getSettings("classes"),i=(o.addClass(n.processing),o.parents("."+n.multistepWrapper).attr("data-step-name"));o.hasClass("opened")?(o.removeClass("opened"),o.next().slideUp(e.toggleSlideEffect?400:0),p(document).trigger("etheme_elementor_checkout_multistep_action",{inactive_step:i}),o.removeClass(n.processing),this.openedStep=!1):(o.addClass("opened"),t.find("."+n.multistepWrapper).find(".step-title:not(.processing)").removeClass("opened").next().slideUp(e.toggleSlideEffect?400:0),p(document).trigger("etheme_elementor_checkout_multistep_action",{active_step:i}),o.next().slideDown(e.toggleSlideEffect?400:0),o.removeClass(n.processing),t=e.$element.offset().top,window.pageYOffset>t&&p("html, body").animate({scrollTop:e.$element.offset().top},1e3),this.openedStep=!0),this.$openedStepTitle=o},runStickyColumn:function(e,t,o){var n,i;e[t+"_sticky_on"].indexOf(elementorFrontend.getCurrentDeviceMode())<0||(n={offset_top:e[t+"_sticky_top_offset"]||0,bottoming:!0,parent:".etheme-elementor-cart-checkout-page-wrapper"},i=o,imagesLoaded(p(n.parent),function(){setTimeout(function(){i.stick_in_parent(n)},500)}))},runFieldsSorting:function(){if("undefined"==typeof wc_address_i18n_params)return!1;let a="form-row-first",r="form-row-last",c="form-row-wide",l=[a,r,c],d="et-waiting-for-class-modification";p(document).on("country_to_state_changing",function(e,t,o){var s=o,o=JSON.parse(wc_address_i18n_params.locale_fields);p.each(o,function(e,t){var n,i=s.find(t);if(p(i).attr("data-o_class")){let o=p(i).attr("data-o_class").split(" ");if(p.each(l,function(e,t){o.includes(t)&&p(i).removeClass(l.join(" ")).addClass(t)}),p(i).is(":hidden")){let e=null;p(i).hasClass(a)?e=p(i).next():p(i).hasClass(r)&&(e=p(i).prev(),p(i).next()),e&&(p(i).addClass(d),p(e).hasClass(a)||p(e).hasClass(r))&&(p(e).attr("data-et_o_class")||p(e).attr("data-et_o_class",p(e).attr("class")),p(e).removeClass(l.join(" ")).addClass(c))}else p(i).hasClass(d)&&(p(i).removeClass(d),t=p(i).next(),n=p(i).prev(),t&&p(t).removeClass(l.join(" ")).addClass(p(t).attr("data-et_o_class")),n)&&p(n).removeClass(l.join(" ")).addClass(p(n).attr("data-et_o_class"))}})})},runEmptyCartTrigger:function(){let e=this.$element;p(document).on("wc_cart_emptied",function(){e.find(".elementor-element").each(function(){elementorFrontend.elementsHandler.runReadyTrigger(p(this))}),e.addClass("full-width")})},runRemoveElementOnECartEmpty:function(){let e=this.$element;p(document).on("wc_cart_emptied",function(){e.remove()})},bindEvents(){this.elements.$showLoginForm.on("click",e=>{e.preventDefault(),this.elements.$loginForm.slideToggle()}),this.elements.$applyCoupon.on("click",e=>{e.preventDefault(),this.applyCoupon()}),this.elements.$loginSubmit.on("click",e=>{e.preventDefault(),this.loginUser()})},applyCoupon(){if(wc_checkout_params){let t=this.getSettings("classes");this.startProcessing(t,this.elements.$couponBox);const o={security:wc_checkout_params.apply_coupon_nonce,coupon_code:this.elements.$couponBox.find('input[name="coupon_code"]').val()};jQuery.ajax({type:"POST",url:wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","apply_coupon"),context:this,data:o,success(e){jQuery(".woocommerce-error, .woocommerce-message").remove(),this.elements.$couponBox.removeClass(t.processing).unblock(),e&&(this.elements.$couponBox.before(e),elementorFrontend.elements.$body.trigger("applied_coupon_in_checkout",[o.coupon_code]),elementorFrontend.elements.$body.trigger("update_checkout",{update_shipping_method:!1}))},dataType:"html"})}},loginUser(){if(!elementorFrontend.isEditMode()){let t=this.getSettings("classes");this.startProcessing(t,this.elements.$loginFormBox);var e={action:"elementor_woocommerce_checkout_login_user",username:this.elements.$loginFormBox.find('input[name="username"]').val(),password:this.elements.$loginFormBox.find('input[name="password"]').val(),nonce:this.elements.$loginFormBox.find('input[name="woocommerce-login-nonce"]').val(),remember:this.elements.$loginFormBox.find("input#rememberme").prop("checked")};jQuery.ajax({type:"POST",url:etConfig.ajaxurl,context:this,data:e,success(e){e=JSON.parse(e),this.elements.$loginFormBox.removeClass(t.processing).unblock(),jQuery(".woocommerce-error, .woocommerce-message").remove(),e.logged_in?location.reload():(this.elements.$loginFormBox.before(e.message),elementorFrontend.elements.$body.trigger("checkout_error",[e.message]))}})}},startProcessing(e,t){t.hasClass(e.processing)||t.addClass(e.processing).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},runRemoveItem:function(o){let e=this,t=new URL(window.location.href);t.searchParams.get("removed_item")&&setTimeout(function(){p.each(e.elements.$formRow,function(e,t){p(t).removeClass(o.woocommerceInvalid),p(t).removeClass(o.woocommerceInvalidRequired)})},300)},maybeActivateCheckbox:function(e,t,o){!o.length||e[t+"_checkbox_active"]&&!o.is(":checked")&&o.trigger("click")},run:function(){var e=this.getElementSettings();let t=this;var o=t.getWidgetType(),n=t.getSettings("selectors"),i=t.getSettings("classes");let s=!1,a=!1,r=!1;switch(o){case"woocommerce-checkout-etheme_page":case"woocommerce-checkout-etheme_page_separated":case"woocommerce-checkout-etheme_page_multistep":s="order_review",a=t.elements.$orderDetailsWrapper,r=n.orderDetailsWrapper,t.maybeActivateCheckbox(e,"shipping_details",t.elements.$shipToDifferentAddress.find("input")),t.maybeActivateCheckbox(e,"new_account",t.elements.$newAccountInput),this.runRemoveItem(i),"woocommerce-checkout-etheme_page_multistep"==o&&this.runFieldsSorting();break;case"woocommerce-cart-etheme_page":case"woocommerce-cart-etheme_page_separated":s="cart_totals",a=t.elements.$cartTotalsWrapper,r=n.cartTotalsWrapper,t.runEmptyCartTrigger();break;case"woocommerce-cart-etheme_table":case"woocommerce-cart-etheme_totals":t.runEmptyCartTrigger(),"woocommerce-cart-etheme_totals"==o&&t.runRemoveElementOnECartEmpty();break;case"woocommerce-checkout-etheme_billing_details":case"woocommerce-checkout-etheme_shipping_details":this.runFieldsSorting()}"multistep"==e.design_type&&(t.runMultistepLayout(),"accordant"==e.design_type_multistep)&&(this.toggleSlideEffect=!1),s&&e[s+"_sticky"]&&(t.runStickyColumn(e,s,a,r),p(document).on("updated_cart_totals updated_checkout",function(){1<t.$element.find(r).length&&t.$element.find(r).first().nextAll().remove()}))}});p.each(["etheme_billing_details","etheme_shipping_details","etheme_additional_information","etheme_payment_methods","etheme_order_review","etheme_page","etheme_page_separated","etheme_page_multistep"],function(e,t){elementorFrontend.hooks.addAction("frontend/element_ready/woocommerce-checkout-"+t+".default",function(e){elementorFrontend.elementsHandler.addHandler(o,{$element:e})})}),p.each(["etheme_page","etheme_page_separated","etheme_table"],function(e,t){elementorFrontend.hooks.addAction("frontend/element_ready/woocommerce-cart-"+t+".default",function(e){elementorFrontend.elementsHandler.addHandler(o,{$element:e})})})})}(jQuery);

LittleDemon - FACEBOOK
[ KELUAR ]