// source --> https://watersportswest.com/wp-content/plugins/woocommerce/assets/js/frontend/cart-fragments.min.js?ver=10.7.0 
jQuery(function(e){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,r=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function n(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function o(e){t&&(localStorage.setItem(r,e),sessionStorage.setItem(r,e))}var a={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(r){r&&r.fragments&&(e.each(r.fragments,function(t,r){e(t).replaceWith(r)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(r.fragments)),o(r.cart_hash),r.cart_hash&&n()),e(document.body).trigger("wc_fragments_refreshed"))},error:function(){e(document.body).trigger("wc_fragments_ajax_error")}};function s(){e.ajax(a)}if(t){var i=null;e(document.body).on("wc_fragment_refresh updated_wc_div",function(){s()}),e(document.body).on("added_to_cart removed_from_cart",function(e,t,a){var s=sessionStorage.getItem(r);null!==s&&s!==undefined&&""!==s||n(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),o(a)}),e(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(s,864e5)}),e(window).on("storage onstorage",function(e){r===e.originalEvent.key&&localStorage.getItem(r)!==sessionStorage.getItem(r)&&s()}),e(window).on("pageshow",function(t){t.originalEvent.persisted&&(e(".widget_shopping_cart_content").empty(),e(document.body).trigger("wc_fragment_refresh"))});try{var c=JSON.parse(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(r),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=1*m+864e5,w=(new Date).getTime();if(d<w)throw"Fragment expired";i=setTimeout(s,d-w)}if(!c||!c["div.widget_shopping_cart_content"]||_!==g)throw"No fragment";e.each(c,function(t,r){e(t).replaceWith(r)}),e(document.body).trigger("wc_fragments_loaded")}catch(f){s()}}else s();Cookies.get("woocommerce_items_in_cart")>0?e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),e(document.body).on("adding_to_cart",function(){e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()}),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){s()})});
// source --> https://watersportswest.com/wp-content/plugins/shopengine/assets/js/shopengine-modal.js?ver=4.8.9 
jQuery((function(o){"use strict";var e=o(".se-modal-wrapper");e.on(o.modal.OPEN,(function(o,e){if(!0!==e.options.ifIframe)return;let t=e.$elm.find("iframe");t.on("load",(function(){t.contents().find("head").append('<base target="_parent" />'),e.$elm.addClass("se-loaded iframeLoaded")}))})),e.on(o.modal.AFTER_CLOSE,(function(o,e){e.$elm.removeClass("se-loaded iframeLoaded ajaxLoaded")}))})),function(o){"object"==typeof module&&"object"==typeof module.exports?o(require("jquery"),window,document):o(jQuery,window,document)}((function(o,e,t,i){var s=[],l=function(){return s.length?s[s.length-1]:null},n=function(){var o,e=!1;for(o=s.length-1;o>=0;o--)s[o].$blocker&&(s[o].$blocker.toggleClass("current",!e).toggleClass("behind",e),e=!0)};o.modal=function(e,t){var i,n;if(this.$body=o("body"),this.options=o.extend({},o.modal.defaults,t),this.options.doFade=!isNaN(parseInt(this.options.fadeDuration,10)),this.$blocker=null,this.options.closeExisting)for(;o.modal.isActive();)o.modal.close();if(s.push(this),e.is("a"))if(n=e.attr("href"),this.anchor=e,/^#/.test(n)){if(this.$elm=o(n),1!==this.$elm.length)return null;this.$body.append(this.$elm),this.open()}else this.$elm=o("<div>"),this.$body.append(this.$elm),i=function(o,e){e.elm.remove()},this.showSpinner(),e.trigger(o.modal.AJAX_SEND),o.get(n).done((function(t){if(o.modal.isActive()){e.trigger(o.modal.AJAX_SUCCESS);var s=l();s.$elm.empty().append(t).on(o.modal.CLOSE,i),s.hideSpinner(),s.open(),e.trigger(o.modal.AJAX_COMPLETE)}})).fail((function(){e.trigger(o.modal.AJAX_FAIL),l().hideSpinner(),s.pop(),e.trigger(o.modal.AJAX_COMPLETE)}));else this.$elm=e,this.anchor=e,this.$body.append(this.$elm),this.open()},o.modal.prototype={constructor:o.modal,open:function(){var e=this;this.block(),this.anchor.blur(),this.options.doFade?setTimeout((function(){e.show()}),this.options.fadeDuration*this.options.fadeDelay):this.show(),o(t).off("keydown.modal").on("keydown.modal",(function(o){var e=l();27===o.which&&e.options.escapeClose&&e.close()})),this.options.clickClose&&this.$blocker.click((function(e){e.target===this&&o.modal.close()}))},close:function(){s.pop(),this.unblock(),this.hide(),o.modal.isActive()||o(t).off("keydown.modal")},block:function(){this.$elm.trigger(o.modal.BEFORE_BLOCK,[this._ctx()]),this.$doc=o(t),this.$prevWidth=this.$doc.width(),this.$body.css("overflow","hidden").css("padding-right",this.$doc.width()-this.$prevWidth),this.$blocker=o('<div class="'+this.options.blockerClass+' se-blocker current"></div>').appendTo(this.$body),n(),this.options.doFade&&this.$blocker.css("opacity",0).animate({opacity:1},this.options.fadeDuration),this.$elm.trigger(o.modal.BLOCK,[this._ctx()])},unblock:function(e){!e&&this.options.doFade?this.$blocker.fadeOut(this.options.fadeDuration,this.unblock.bind(this,!0)):(this.$blocker.children().appendTo(this.$body),this.$blocker.remove(),this.$blocker=null,n(),o.modal.isActive()||this.$body.css({overflow:"","padding-right":""}))},show:function(){this.$elm.trigger(o.modal.BEFORE_OPEN,[this._ctx()]),this.options.showClose&&(this.closeButton=o('<a title="Close Modal" href="#close-modal" rel="modal:close" class="se-close-modal '+this.options.closeClass+'">'+this.options.closeText+"</a>"),this.$elm.append(this.closeButton)),this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker),this.options.doFade?this.$elm.css({opacity:0,display:"inline-block"}).animate({opacity:1},this.options.fadeDuration):this.$elm.css("display","inline-block"),this.$elm.trigger(o.modal.OPEN,[this._ctx()])},hide:function(){this.$elm.trigger(o.modal.BEFORE_CLOSE,[this._ctx()]),this.closeButton&&this.closeButton.remove();var e=this;this.options.doFade?this.$elm.fadeOut(this.options.fadeDuration,(function(){e.$elm.trigger(o.modal.AFTER_CLOSE,[e._ctx()])})):this.$elm.hide(0,(function(){e.$elm.trigger(o.modal.AFTER_CLOSE,[e._ctx()])})),this.$elm.trigger(o.modal.CLOSE,[this._ctx()])},showSpinner:function(){this.options.showSpinner&&(this.spinner=this.spinner||o('<div class="se-'+this.options.modalClass+'-spinner"></div>').append(this.options.spinnerHtml),this.$body.append(this.spinner),this.spinner.show())},hideSpinner:function(){this.spinner&&this.spinner.remove()},_ctx:function(){return{elm:this.$elm,$elm:this.$elm,$blocker:this.$blocker,options:this.options,$anchor:this.anchor}}},o.modal.close=function(e){if(o.modal.isActive()){e&&e.preventDefault();var t=l();return t.close(),t.$elm}},o.modal.isActive=function(){return s.length>0},o.modal.getCurrent=l,o.modal.defaults={closeExisting:!0,escapeClose:!0,clickClose:!0,closeText:"Close",closeClass:"",modalClass:"se-modal",blockerClass:"jquery-modal",spinnerHtml:'<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',showSpinner:!0,showClose:!0,fadeDuration:null,fadeDelay:1},o.modal.BEFORE_BLOCK="modal:before-block",o.modal.BLOCK="modal:block",o.modal.BEFORE_OPEN="modal:before-open",o.modal.OPEN="modal:open",o.modal.BEFORE_CLOSE="modal:before-close",o.modal.CLOSE="modal:close",o.modal.AFTER_CLOSE="modal:after-close",o.modal.AJAX_SEND="modal:ajax:send",o.modal.AJAX_SUCCESS="modal:ajax:success",o.modal.AJAX_FAIL="modal:ajax:fail",o.modal.AJAX_COMPLETE="modal:ajax:complete",o.fn.seModal=function(e){return 1===this.length&&new o.modal(this,e),this},o.fn.modal&&o.fn.modal.Constructor||(o.fn.modal=o.fn.seModal),o(t).on("click.semodal",'a[rel~="modal:close"]',o.modal.close),o(t).on("click.semodal",'a[rel~="modal:open"]',(function(e){e.preventDefault(),o(this).seModal()}))}));