var wc;(()=>{"use strict";var e={7137:(e,t,o)=>{o.d(t,{navigate:()=>c});var a=o(3097);const n=window.wc.wcSettings,r=(0,n.getSetting)("isBlockTheme"),s=(0,n.getSetting)("isProductArchive"),i=(0,n.getSetting)("needsRefreshForInteractivityAPI",!1);function c(e,t={}){const o=new URL(e);return o.pathname=o.pathname.replace(/\/page\/[0-9]+/i,""),o.searchParams.delete("paged"),o.searchParams.forEach(((e,t)=>{t.match(/^query(?:-[0-9]+)?-page$/)&&o.searchParams.delete(t)})),e=o.href,i||!r&&s?window.location.href=e:(0,a.navigate)(e,t)}(0,a.store)("woocommerce/product-filters",{state:{isDialogOpen:()=>(0,a.getContext)().isDialogOpen},actions:{openDialog:()=>{const e=(0,a.getContext)();document.body.classList.add("wc-modal--open"),e.hasPageWithWordPressAdminBar=Boolean(document.getElementById("wpadminbar")),e.isDialogOpen=!0},closeDialog:()=>{const e=(0,a.getContext)();document.body.classList.remove("wc-modal--open"),e.isDialogOpen=!1}},callbacks:{maybeNavigate:()=>{const{params:e,originalParams:t}=(0,a.getContext)();if(function(e,t){const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(const a of o)if(e[a]!==t[a])return!1;return!0}(e,t))return;const o=new URL(window.location.href),{searchParams:n}=o;for(const e in t)n.delete(e,t[e]);for(const t in e)n.set(t,e[t]);c(o.href)}}})},3097:e=>{e.exports=window.wc.__experimentalInteractivity}},t={};function o(a){var n=t[a];if(void 0!==n)return n.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{o.r(a);var e=o(3097),t=o(7137);const n=e=>{const t=new URL(window.location.href),{searchParams:o}=t;return""!==e?o.set("filter_stock_status",e):o.delete("filter_stock_status"),t.href};(0,e.store)("woocommerce/product-filter-stock-status",{actions:{onCheckboxChange:()=>{const o=(0,e.getContext)("woocommerce/interactivity-checkbox-list").items.filter((e=>e.checked)).map((e=>e.value));(0,t.navigate)(n(o.join(",")))},onDropdownChange:()=>{const o=((0,e.getContext)("woocommerce/interactivity-dropdown").selectedItems||[]).map((e=>e.value));(0,t.navigate)(n(o.join(",")))},updateProducts:e=>{const o=new URL(window.location.href).searchParams.get("filter_stock_status")||"",a=""===o?[]:o.split(",");if(e.target.checked)o.includes(e.target.value)||a.push(e.target.value);else{const t=a.indexOf(e.target.value);t>-1&&a.splice(t,1)}(0,t.navigate)(n(a.join(",")))},removeFilter:()=>{const{value:o}=(0,e.getContext)(),a=new URL(window.location.href).searchParams.get("filter_stock_status")||"",r=""===a?[]:a.split(","),s=r.indexOf(o);s>-1&&r.splice(s,1),(0,t.navigate)(n(r.join(",")))}}})})(),(wc=void 0===wc?{}:wc)["product-filter-stock-status"]=a})();