File: /storage/v4513/ivenusin/public_html/wp-content/plugins/fluid-checkout/js/checkout-steps-230.min.js
!function(e,t){"function"==typeof define&&define.amd?define([],t()):"object"==typeof exports?module.exports=t():e.CheckoutSteps=t()}("undefined"!=typeof global?global:this.window||this.global,function(e){"use strict";function a(){var e={},t=!1,r=0;for("[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],r++);r<arguments.length;r++){o=void 0;var o,s=arguments[r];for(o in s)s.hasOwnProperty(o)&&(t&&"[object Object]"===Object.prototype.toString.call(s[o])?e[o]=a(e[o],s[o]):e[o]=s[o])}return e}function h(){var e=document.querySelector(q.stepsWrapperSelector);return e?Array.from(e.querySelectorAll(q.stepSelector)):[]}function C(e){var t,r;e&&(r=e.querySelector(q.substepFieldsSelector),t=e.querySelector(q.substepTextSelector),CollapsibleBlock.collapse(r),CollapsibleBlock.expand(t),e.classList.remove(q.isEditingClass),(r=e.querySelector(q.substepEditButtonSelector))&&r.focus(),k(e))}function A(e){w&&x(e).block({message:null,overlayCSS:{background:"#fff",opacity:.6}})}function t(e,t){if(t&&t.fragments)for(var r in t.fragments){r=document.querySelector(r);r&&r.classList.remove(q.isLoadingClass)}}function k(e){var t,r;e&&(t=S(),r=p(e)+-1*q.scrollOffset+-1*t,window.setTimeout(function(){window.scrollTo({top:r,behavior:q.scrollBehavior})},q.scrollDelay))}function r(e,t){y(),m()}function o(e,t){for(var r=document.querySelectorAll(q.substepSelector),o=0;o<r.length;o++){var s=r[o],l=s.querySelector(q.substepEditableStateFieldSelector),l=(l&&"no"===l.value?s.setAttribute(q.substepEditableStateAttribute,l.value):s.removeAttribute(q.substepEditableStateAttribute),s.querySelector(q.substepVisibleStateFieldSelector));l&&"no"===l.value?s.setAttribute(q.substepVisibleStateAttribute,l.value):s.removeAttribute(q.substepVisibleStateAttribute)}}function i(){var e,t,r,o;document.body.matches(q.placeOrderSkipMoveSelector)||(e=window.innerWidth,t=document.querySelector(q.placeOrderSectionMainSelector),r=document.querySelector(q.placeOrderPlaceholderMainSelector),o=document.querySelector(q.placeOrderPlaceholderSidebarSelector),e<1e3&&o.parentNode!==t.parentNode?o.parentNode.insertBefore(t,o.nextSibling):1e3<=e&&r.parentNode!==t.parentNode&&r.parentNode.insertBefore(t,r.nextSibling))}function s(e){var t;e.defaultPrevented||(e.key!=c.ENTER&&e.key!=c.SPACE||!e.target.closest(q.substepEditButtonSelector)&&!e.target.closest(q.substepSaveButtonSelector)?e.key==c.ENTER&&e.target.closest(q.fieldSubmitFormSelector)&&(e.preventDefault(),window.CheckoutValidation&&(t=e.target.closest(q.fieldSubmitFormSelector),CheckoutValidation.validateField(t))):v(e))}function n(){window.addEventListener("click",v),document.addEventListener("keydown",s,!0),w&&(x(document.body).on("updated_checkout",r),x(document.body).on("updated_checkout",o),x(document.body).on("updated_checkout",t)),document.body.classList.add(q.bodyClass),u=!0}var x=jQuery,w=null!=x,u=!1,l={},q={bodyClass:"has-fc-checkout-steps",bodyClassActiveStepPattern:"fc-checkout-step--active-{ID}",isMultistepLayout:"yes",maybeDisablePlaceOrderButton:"yes",wrapperSelector:".fc-wrapper",progressBarSelector:".fc-progress-bar",progressBarCurrentSelector:".fc-progress-bar__current-step",progressBarItemSelector:".fc-progress-bar__bar",stepsWrapperSelector:".fc-checkout-steps",stepSelector:".fc-checkout-step",currentStepSelector:"[data-step-current]",lastStepSelector:"[data-step-last]",nextStepSelector:"[data-step-current] ~ .fc-checkout-step",nextStepButtonSelector:"[data-step-next]",focusableElementsSelector:'a[role="button"], a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled]), details, summary, iframe, object, embed, [contenteditable] [tabindex]:not([tabindex="-1"])',fieldSubmitFormSelector:'input[type="text"], input[type="checkbox"], input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="email"], input[type="file"], input[type="image"], input[type="month"], input[type="number"], input[type="password"], input[type="radio"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], input[type="week"]',substepSelector:".fc-step__substep",substepTextContentSelector:".fc-step__substep-text-content",substepFieldsSelector:".fc-step__substep-fields",substepTextSelector:".fc-step__substep-text",substepEditButtonSelector:"[data-step-edit]",substepSaveButtonSelector:"[data-step-save]",expansibleSectionToggleSelector:"[data-expansible-section-toggle]",expansibleSectionExpandAttribute:"data-expansible-section-expand",expansibleSectionCollapseAttribute:"data-expansible-section-collapse",stepCompleteAttribute:"data-step-complete",stepCurrentAttribute:"data-step-current",stepIndexAttribute:"data-step-index",stepIdAttribute:"data-step-id",isEditingClass:"is-editing",isLoadingClass:"is-loading",isCurrentClass:"is-current",isCompleteClass:"is-complete",stepNextIncompleteClass:"fc-checkout-step--next-step-incomplete",currentStepClassTemplate:"fc-checkout-step-current--##STEP_ID##",currentLastStepClass:"fc-checkout-step-current-last",substepEditableStateFieldSelector:'.fc-substep-editable-state[type="hidden"]',substepEditableStateAttribute:"data-substep-editable",substepVisibleStateFieldSelector:'.fc-substep-visible-state[type="hidden"]',substepVisibleStateAttribute:"data-substep-visible",invalidFieldRowSelector:".woocommerce-invalid .input-text, .woocommerce-invalid select",placeOrderButtonSelector:".fc-place-order-button",placeOrderSkipMoveSelector:".has-place-order--below_order_summary",placeOrderSectionMainSelector:".fc-place-order__section--main",placeOrderPlaceholderMainSelector:".fc-inside .fc-place-order__section-placeholder",placeOrderPlaceholderSidebarSelector:".fc-sidebar .fc-place-order__section-placeholder",placeOrderRefreshRate:50,scrollOffsetSelector:".fc-checkout-header",scrollBehavior:"smooth",scrollOffset:0,scrollDelay:50},c={ENTER:"Enter",SPACE:" "},p=function(e,t){for(var r=0;e&&(!t||t!=e);)r+=e.offsetTop,e=e.offsetParent;return r},d=function(e){var t,r;e&&(t=e.querySelector(q.substepFieldsSelector),r=e.querySelector(q.substepTextSelector),CollapsibleBlock.expand(t),CollapsibleBlock.collapse(r),e.classList.add(q.isEditingClass))},b=function(e){var t;e&&(window.CheckoutValidation&&!CheckoutValidation.validateAllFields(e)?(t=e.querySelector(q.invalidFieldRowSelector))&&t.focus():(C(e),w&&(t=e.querySelector(q.substepTextContentSelector),A(t),x(".woocommerce-error, .woocommerce-message").remove(),x(document.body).trigger("update_checkout"))))},S=function(){var e=0,t=document.querySelector(q.progressBarSelector);if(t&&(e+=t.getBoundingClientRect().height),window.StickyStates){var r=document.querySelectorAll(q.scrollOffsetSelector);if(r&&0<r.length)for(var o=0;o<r.length;o++){var s=r[o];StickyStates.isStickyPosition(s)&&(e+=s.getBoundingClientRect().height)}}return e},f=function(e){if(e)if(window.CheckoutValidation&&!CheckoutValidation.validateAllFields(e))(l=e.querySelector(q.invalidFieldRowSelector))&&l.focus();else{e.setAttribute(q.stepCompleteAttribute,"");for(var t=e.querySelectorAll(q.substepSelector),r=0;r<t.length;r++){var o=t[r],s=o.querySelector(q.substepTextContentSelector);s&&(s.classList.add(q.isLoadingClass),A(s)),C(o)}for(var l=e.parentElement.querySelector(q.nextStepSelector),c=(l.setAttribute(q.stepCurrentAttribute,""),e.removeAttribute(q.stepCurrentAttribute),h()),a=c.indexOf(e),r=0;r<c.length;r++)r<a&&c[r].classList.remove(q.stepNextIncompleteClass);if(n=document.querySelector(q.currentStepSelector)){var i=parseInt(n.getAttribute(q.stepIndexAttribute)),i=isNaN(i)?-1:i,n=document.querySelector(q.progressBarSelector);if(n){for(var u=n.querySelectorAll(q.progressBarItemSelector),p=u.length,d=0;d<u.length;d++){var b=u[d],S=parseInt(b.getAttribute(q.stepIndexAttribute));(S=isNaN(S)?-1:S)==i?b.classList.add(q.isCurrentClass):b.classList.remove(q.isCurrentClass),S<=i?b.classList.add(q.isCompleteClass):b.classList.remove(q.isCompleteClass)}var f=(f=i+1)<=p?f:p,p=n.querySelector(q.progressBarCurrentSelector);p&&(p.innerText=f)}}for(var y,m=null,v=Array.from((l||document).querySelectorAll(q.focusableElementsSelector)),r=0;r<v.length;r++){var g=v[r];if(!!((y=g).offsetWidth||y.offsetHeight||y.getClientRects().length)){m=g;break}}m&&m.focus(),k(e),w&&x(document.body).trigger("update_checkout")}},y=function(){if("yes"===q.maybeDisablePlaceOrderButton&&"yes"===q.isMultistepLayout){for(var e=h(),t=0;t<e.length;t++){var r=e[t].getAttribute(q.stepIdAttribute),o=q.currentStepClassTemplate.replace("##STEP_ID##",r);document.body.classList.remove(o)}var s=document.querySelector(q.currentStepSelector),l=document.querySelector(q.lastStepSelector);s&&(r=s.getAttribute(q.stepIdAttribute),o=q.currentStepClassTemplate.replace("##STEP_ID##",r),document.body.classList.add(o),l&&(s=s.getAttribute(q.stepIdAttribute),l.getAttribute(q.stepIdAttribute)===s&&document.body.classList.add(q.currentLastStepClass)))}},m=function(){if("yes"===q.maybeDisablePlaceOrderButton&&"yes"===q.isMultistepLayout){var e=document.querySelector(q.currentStepSelector),t=document.querySelector(q.lastStepSelector);if(e&&t)for(var r=e.getAttribute(q.stepIdAttribute)!==t.getAttribute(q.stepIdAttribute),o=document.querySelectorAll(q.placeOrderButtonSelector),s=0;s<o.length;s++)o[s].disabled=r}},v=function(e){var t,r;e.target.closest(q.nextStepButtonSelector)?(e.preventDefault(),t=e.target.closest(q.stepSelector),f(t)):e.target.closest(q.substepEditButtonSelector)?(e.preventDefault(),r=e.target.closest(q.substepSelector),d(r)):e.target.closest(q.substepSaveButtonSelector)&&(e.preventDefault(),r=e.target.closest(q.substepSelector),b(r))};return l.init=function(e){var o,s,l,c;u||(q=a(q,e),i(),window.ResizeObserver&&new ResizeObserver((o=i,s=q.placeOrderRefreshRate,function(){var e=this,t=arguments,r=l&&!c;clearTimeout(c),c=setTimeout(function(){c=null,l||o.apply(e,t)},s),r&&o.apply(e,t)})).observe(document.body),window.CollapsibleBlock?n():window.RequireBundle&&RequireBundle.require(["collapsible-block"],function(){n()}))},l});
//# sourceMappingURL=maps/checkout-steps-230.min.js.map