text: !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=228)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(72)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},function(e,t,n){var r;
  /*!
    Copyright (c) 2017 Jed Watson.
    Licensed under the MIT License (MIT), see
    http://jedwatson.github.io/classnames
  */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"v",(function(){return i})),n.d(t,"z",(function(){return c})),n.d(t,"s",(function(){return a})),n.d(t,"n",(function(){return u})),n.d(t,"p",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"A",(function(){return p})),n.d(t,"l",(function(){return f})),n.d(t,"m",(function(){return d})),n.d(t,"k",(function(){return b})),n.d(t,"c",(function(){return g})),n.d(t,"o",(function(){return m})),n.d(t,"D",(function(){return v})),n.d(t,"E",(function(){return y})),n.d(t,"w",(function(){return O})),n.d(t,"a",(function(){return w})),n.d(t,"x",(function(){return j})),n.d(t,"b",(function(){return S})),n.d(t,"r",(function(){return E})),n.d(t,"g",(function(){return I})),n.d(t,"y",(function(){return _})),n.d(t,"h",(function(){return R})),n.d(t,"u",(function(){return P})),n.d(t,"t",(function(){return C})),n.d(t,"C",(function(){return D})),n.d(t,"B",(function(){return T})),n.d(t,"d",(function(){return M})),n.d(t,"e",(function(){return A})),n.d(t,"f",(function(){return H})),n.d(t,"q",(function(){return N})),n.d(t,"F",(function(){return L}));var r=n(4),o=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),p=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),f=Object(r.getSetting)("displayItemizedTaxes",!1),d=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),b=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),g=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),m=Object(r.getSetting)("isShippingCalculatorEnabled",!0),h=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),v=Object(r.getSetting)("wcBlocksAssetUrl",""),y=Object(r.getSetting)("wcBlocksBuildUrl",""),O=Object(r.getSetting)("shippingCountries",{}),w=Object(r.getSetting)("allowedCountries",{}),j=Object(r.getSetting)("shippingStates",{}),S=Object(r.getSetting)("allowedStates",{}),E=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),I=Object(r.getSetting)("checkoutShowLoginReminder",!0),x={id:0,title:"",permalink:""},k=Object(r.getSetting)("storePages",{shop:x,cart:x,checkout:x,privacy:x,terms:x}),_=k.shop.permalink,R=(k.checkout.id,k.checkout.permalink),P=k.privacy.permalink,C=k.privacy.title,D=k.terms.permalink,T=k.terms.title,M=(k.cart.id,k.cart.permalink),A=Object(r.getSetting)("checkoutAllowsGuest",!1),H=Object(r.getSetting)("checkoutAllowsSignup",!1),N=Object(r.getSetting)("loginUrl","/wp-login.php"),L=(n(44),function(){return h>1})},function(e,t,n){var r=n(81),o=n(82),i=n(65),c=n(83);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},,function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){var r=n(67);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},,,function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(27);function o(e,t){if(null==e)return{};var n,o,i=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},,,,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},,function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},,,function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},,function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(71);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(33),o=n(29);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";var r=n(7),o=n.n(r),i=(n(3),n(2)),c=n(5),a=n.n(c);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,u=void 0===c?{}:c,l=null!=n,p=null!=r;return!l&&p?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||i.Fragment,l&&p&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(28),i=n.n(o),c=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},,function(e,t){!function(){e.exports=this.wp.blocks}()},,,function(e,t,n){"use strict";var r=n(35),o=n.n(r),i=n(36),c=n.n(i),a=n(29),u=n.n(a),s=n(37),l=n.n(s),p=n(38),f=n.n(p),d=n(30),b=n.n(d),g=n(7),m=n.n(g),h=(n(3),n(2)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.D,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!",'woocommerce'):r,i=e.text,c=void 0===i?Object(v.__)("There was an error loading the content.",'woocommerce'):i,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:",'woocommerce'):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),c&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},c),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(74);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f()(this,n)}}var j=function(e){l()(n,e);var t=w(n);function n(){var e;o()(this,n);for(var r=arguments.length,i=new Array(r),c=0;c<r;c++)i[c]=arguments[c];return e=t.call.apply(t,[this].concat(i)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,i=e.errorMessagePrefix,c=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof c?c({errorMessage:u}):React.createElement(O,{errorMessage:r?u:null,header:t,imageUrl:n,text:o,errorMessagePrefix:i}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(h.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(h.Component);j.defaultProps={showErrorMessage:!0};t.a=j},function(e,t,n){var r=n(99),o=n(100),i=n(65),c=n(101);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return p}));var r=n(23),o=n(19),i=n(5),c=n.n(i),a=n(0);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=function(e){return Object(a.createElement)("path",e)},p=function(e){var t=e.className,n=e.isPressed,r=s(s({},Object(o.a)(e,["className","isPressed"])),{},{className:c()(t,{"is-pressed":n})||void 0,role:"img","aria-hidden":!0,focusable:!1});return Object(a.createElement)("svg",r)}},,,,,,,,,function(e,t,n){var r=n(66);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=Object(r.createContext)("page"),i=function(){return Object(r.useContext)(o)};o.Provider},,function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(73);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,c){if(c!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},,,,,,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,i=Object(r.useRef)(null),c=Object(r.useRef)([]),a=n.leading,u=void 0===n.trailing||n.trailing,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),p=Object(r.useRef)(!1),f=Object(r.useRef)(e);f.current=e;var d=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(i.current),i.current=null,c.current=[],l.current=null,s.current=!1}),[]);Object(r.useEffect)((function(){return p.current=!1,function(){p.current=!0}}),[]);var b=Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c.current=e,clearTimeout(l.current),s.current&&(s.current=!1),l.current||!a||s.current||(f.current.apply(f,e),s.current=!0),l.current=setTimeout((function(){var t=!0;a&&s.current&&(t=!1),d(),!p.current&&u&&t&&f.current.apply(f,e)}),t),o&&!i.current&&u&&(i.current=setTimeout((function(){var e=c.current;d(),p.current||f.current.apply(null,e)}),o))}),[o,t,d,a,u]),g=Object(r.useCallback)((function(){l.current&&(f.current.apply(null,c.current),d())}),[d]);return[b,d,g]}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(10),o=n.n(r),i=n(0),c=function(){var e=Object(i.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},function(e,t,n){"use strict";e.exports=n(142)},,,,,function(e,t,n){var r=n(66);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),o=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return m}));var r=n(10),o=n.n(r),i=n(18),c=n(14),a=n(0),u=n(69),s=n(105),l=n(28),p=n.n(l),f=n(8),d=n(42),b=function(e){var t=Object(u.a)();e=e||t;var n=Object(c.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},g=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(c.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e,s])]},m=function(e,t){var n=Object(u.a)(),r=b(t=t||n),i=o()(r,2),c=i[0],l=i[1],g=Object(d.a)(c),m=Object(d.a)(e),h=Object(s.a)(m),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){p()(h,m)||(l(Object(f.assign)({},g,m)),v.current=!0)}),[g,m,h,l]),v.current?[c,l]:[e,l]}},,,,function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function i(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return o(n.overflowY,t)||o(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function c(e,t,n,r,o,i,c,a){return i<e&&c>t||i>e&&c<t?0:i<=e&&a<=n||c>=t&&a>=n?i-e-r:c>t&&a<n||i<e&&a>n?c-t+o:0}t.a=function(e,t){var n=window,o=t.scrollMode,a=t.block,u=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,p="function"==typeof s?s:function(e){return e!==s};if(!r(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,d=[],b=e;r(b)&&p(b);){if((b=b.parentNode)===f){d.push(b);break}b===document.body&&i(b)&&!i(document.documentElement)||i(b,l)&&d.push(b)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),O=y.height,w=y.width,j=y.top,S=y.right,E=y.bottom,I=y.left,x="start"===a||"nearest"===a?j:"end"===a?E:j+O/2,k="center"===u?I+w/2:"end"===u?S:I,_=[],R=0;R<d.length;R++){var P=d[R],C=P.getBoundingClientRect(),D=C.height,T=C.width,M=C.top,A=C.right,H=C.bottom,N=C.left;if("if-needed"===o&&j>=0&&I>=0&&E<=m&&S<=g&&j>=M&&E<=H&&I>=N&&S<=A)return _;var L=getComputedStyle(P),B=parseInt(L.borderLeftWidth,10),V=parseInt(L.borderTopWidth,10),K=parseInt(L.borderRightWidth,10),F=parseInt(L.borderBottomWidth,10),U=0,q=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-B-K:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-F:0;if(f===P)U="start"===a?x:"end"===a?x-m:"nearest"===a?c(v,v+m,m,V,F,v+x,v+x+O,O):x-m/2,q="start"===u?k:"center"===u?k-g/2:"end"===u?k-g:c(h,h+g,g,B,K,h+k,h+k+w,w),U=Math.max(0,U+v),q=Math.max(0,q+h);else{U="start"===a?x-M-V:"end"===a?x-H+F+W:"nearest"===a?c(M,H,D,V,F+W,x,x+O,O):x-(M+D/2)+W/2,q="start"===u?k-N-B:"center"===u?k-(N+T/2)+$/2:"end"===u?k-A+K+$:c(N,A,T,B,K+$,k,k+w,w);var Y=P.scrollLeft,z=P.scrollTop;x+=z-(U=Math.max(0,Math.min(z+U,P.scrollHeight-D+W))),k+=Y-(q=Math.max(0,Math.min(Y+q,P.scrollWidth-T+$)))}_.push({el:P,top:U,left:q})}return _}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),i=n(7),c=n.n(i),a=n(0),u=n(47);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=[".wp-block-woocommerce-cart"],f=function(e){var t=e.Block,n=e.containers,r=e.getProps,i=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=i(e,n),c=s(e,n),p=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,c,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:p})))),e)}))},d=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,i=e.wrappers,c=document.body.querySelectorAll(o);i.length>0&&Array.prototype.filter.call(c,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),f({Block:t,containers:c,getProps:n,getErrorBoundaryProps:r})},b=function(e){var t=document.body.querySelectorAll(p.join(","));d(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,i,c,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,i=n.getErrorBoundaryProps,c=n.selector,a=n.wrapper.querySelectorAll(c),f({Block:r,containers:a,getProps:o,getErrorBoundaryProps:i})}))}))}},,,,function(e,t){},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(18),o=n(14),i=n(0),c=n(93),a=n(42),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,p=void 0===l?{}:l,f=e.shouldSelect,d=void 0===f||f;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(i.useRef)({results:[],isLoading:!0}),g=Object(a.a)(p),m=Object(a.a)(s),h=Object(c.a)(),v=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],c=o.getCollectionError.apply(o,i);return c&&h(c),{results:o.getCollection.apply(o,i),isLoading:!o.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,d]);return null!==v&&(b.current=v),b.current}},,,,,,,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(15),c=n.n(i),a=n(56),u=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]);return React.createElement(a.b,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(7),o=n.n(r),i=n(15),c=n.n(i),a=n(2);n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=c()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},,function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(18),c=n(14);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(c.useSelect)((function(e,t){if(n.current){var r=e(i.SCHEMA_STORE_KEY),o=r.isResolving,c=r.hasFinishedResolution,a=t.dispatch(i.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||c("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},function(e,t,n){"use strict";
  /** @license React v16.13.1
   * react-is.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,c=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case f:case c:case u:case a:case b:return e;default:switch(e=e&&e.$$typeof){case l:case d:case h:case m:case s:return e;default:return t}}case i:return t}}}function S(e){return j(e)===f}t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=d,t.Fragment=c,t.Lazy=h,t.Memo=m,t.Portal=i,t.Profiler=u,t.StrictMode=a,t.Suspense=b,t.isAsyncMode=function(e){return S(e)||j(e)===p},t.isConcurrentMode=S,t.isContextConsumer=function(e){return j(e)===l},t.isContextProvider=function(e){return j(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return j(e)===d},t.isFragment=function(e){return j(e)===c},t.isLazy=function(e){return j(e)===h},t.isMemo=function(e){return j(e)===m},t.isPortal=function(e){return j(e)===i},t.isProfiler=function(e){return j(e)===u},t.isStrictMode=function(e){return j(e)===a},t.isSuspense=function(e){return j(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===c||e===f||e===u||e===a||e===b||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===l||e.$$typeof===d||e.$$typeof===y||e.$$typeof===O||e.$$typeof===w||e.$$typeof===v)},t.typeOf=j},,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(2),o=n(86);function i(e,t){return e===t}function c(e,t,n){var c=n&&n.equalityFn?n.equalityFn:i,a=Object(r.useState)(e),u=a[0],s=a[1],l=Object(o.a)(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),p=l[0],f=l[1],d=l[2],b=Object(r.useRef)(e);return Object(r.useEffect)((function(){c(b.current,e)||(p(e),b.current=e)}),[e,p,c]),[u,f,d]}},function(e,t,n){"use strict";var r=n(1),o=(n(3),n(5)),i=n.n(o),c=n(40),a=(n(170),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(r.__)("Go",'woocommerce'):o,u=e.onClick,s=e.screenReaderLabel,l=void 0===s?Object(r.__)("Apply filter",'woocommerce'):s;return React.createElement("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:u},React.createElement(c.a,{label:a,screenReaderLabel:l}))});a.defaultProps={disabled:!1},t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(9),o=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),i=function(e){if(e)return o.find((function(t){return t.id===e}))},c=function(e){if(e)return o.find((function(t){return t.taxonomy===e}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(8),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),c=i.length?i[0]:null;if(c&&c.slug&&Array.isArray(c.slug)&&c.slug.includes(o)){var a=c.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(c.slug=a.sort(),u.push(c)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",c=e.filter((function(e){return e.attribute!==n.taxonomy}));0===o.length?t(c):(c.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(o,"slug").sort()}),t(Object(r.sortBy)(c,"attribute")))}},,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(15),c=n.n(i),a=(n(3),n(5)),u=n.n(a),s=n(1),l=n(139),p=n(138),f=(n(122),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,a=void 0===i?"li":i,s=e.className,l=void 0===s?"":s,p=e.radius,f=void 0===p?"small":p,d=e.children,b=void 0===d?null:d,g=c()(e,["text","screenReaderText","element","className","radius","children"]),m=a,h=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+f),v=Boolean(r&&r!==t);return React.createElement(m,o()({className:h},g),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),b)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,a=e.disabled,d=void 0!==a&&a,b=e.onRemove,g=void 0===b?function(){}:b,m=e.removeOnAnyClick,h=void 0!==m&&m,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,w=c()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),j=h?"span":"button";if(!n){var S=O&&"string"==typeof O?O:v;n="string"!=typeof S?Object(s.__)("Remove",'woocommerce'):Object(s.sprintf)(Object(s.__)('Remove "%s"','woocommerce'),S)}var E={"aria-label":n,disabled:d,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},I=h?E:{},x=h?{"aria-hidden":!0}:E;return React.createElement(f,o()({},w,I,{className:u()(i,"is-removable"),element:h?"button":w.element,screenReaderText:O,text:v}),React.createElement(j,o()({className:"wc-block-components-chip__remove"},x),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},,,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(7),o=n.n(r),i=n(48),c=n.n(i),a=n(33),u=n.n(a),s=n(10),l=n.n(s),p=n(0),f=n(109),d=n(126),b=n(69),g=n(152),m=n(8),h=n(42);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=function(e){var t=e.queryAttribute,n=e.queryPrices,r=e.queryState,o=Object(b.a)();o="".concat(o,"-collection-data");var i=Object(f.a)(o),a=l()(i,1)[0],s=Object(f.b)("calculate_attribute_counts",[],o),v=l()(s,2),O=v[0],w=v[1],j=Object(f.b)("calculate_price_range",null,o),S=l()(j,2),E=S[0],I=S[1],x=Object(h.a)(t||{}),k=Object(h.a)(n);Object(p.useEffect)((function(){"object"===u()(x)&&Object.keys(x).length&&(O.find((function(e){return e.taxonomy===x.taxonomy}))||w([].concat(c()(O),[x])))}),[x,O,w]),Object(p.useEffect)((function(){E!==k&&void 0!==k&&I(k)}),[k,I,E]);var _=Object(p.useState)(!1),R=l()(_,2),P=R[0],C=R[1],D=Object(g.a)(P,200),T=l()(D,1)[0];P||C(!0);var M=Object(p.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(m.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(a)}),[a]);return Object(d.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:y(y({},r),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},M),shouldSelect:T})}},,function(e,t,n){e.exports=n(286)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(141),o=n(118),i=n(7),c=n.n(i),a=n(10),u=n.n(a),s=n(1),l=n(39),p=n(109),f=n(126),d=n(226),b=n(42),g=n(105),m=n(0),h=n(48),v=n.n(h),y=n(3),O=n.n(y),w=n(5),j=n.n(w),S=(n(231),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,o=e.options,i=void 0===o?[]:o,c=e.checked,a=void 0===c?[]:c,l=e.isLoading,p=void 0!==l&&l,f=e.isDisabled,d=void 0!==f&&f,b=e.limit,g=void 0===b?10:b,h=Object(m.useState)(!1),y=u()(h,2),O=y[0],w=y[1],S=Object(m.useMemo)((function(){return v()(Array(5)).map((function(e,t){return React.createElement("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),E=Object(m.useMemo)((function(){var e=i.length-g;return!O&&React.createElement("li",{key:"show-more",className:"show-more"},React.createElement("button",{onClick:function(){w(!0)},"aria-expanded":!1,"aria-label":Object(s.sprintf)(Object(s._n)("Show %s more option","Show %s more options",e,'woocommerce'),e)},Object(s.sprintf)(Object(s._n)("Show %s more","Show %s more",e,'woocommerce'),e)))}),[i,g,O]),I=Object(m.useMemo)((function(){return O&&React.createElement("li",{key:"show-less",className:"show-less"},React.createElement("button",{onClick:function(){w(!1)},"aria-expanded":!0,"aria-label":Object(s.__)("Show less options",'woocommerce')},Object(s.__)("Show less",'woocommerce')))}),[O]),x=Object(m.useMemo)((function(){var e=i.length>g+5;return React.createElement(m.Fragment,null,i.map((function(t,n){return React.createElement(m.Fragment,{key:t.value},React.createElement("li",e&&!O&&n>=g&&{hidden:!0},React.createElement("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:a.includes(t.value),disabled:d}),React.createElement("label",{htmlFor:t.value},t.label)),e&&n===g-1&&E)})),e&&I)}),[i,r,a,O,g,I,E,d]),k=j()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":p},t);return React.createElement("ul",{className:k},p?S:x)}),E=n(27),I=n(6),x=n(13),k=n(113),_=n(2),R=(n(94),n(114)),P=0;function C(e){return"function"==typeof e?e:D}function D(){}function T(e,t){e&&Object(R.a)(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function M(e,t){return e===t||e.contains&&e.contains(t)}function A(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function H(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function N(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function L(){return String(P++)}function B(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function V(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function K(e){return"string"==typeof e.type}function F(e){return e.props}var U=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function q(e){void 0===e&&(e={});var t={};return U.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function $(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=W(t,r)?t[r]:e[r],n}),{})}function W(e,t){return void 0!==e[t]}function Y(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function z(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var c=t+e;c<0?c=o?i:0:c>i&&(c=o?0:i);var a=Q(e,c,n,r,o);return-1===a?t>=n?-1:t:a}function Q(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var c=t+1;c<n;c++)if(!r(c).hasAttribute("disabled"))return c}else for(var a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return o?e>0?Q(1,0,n,r,!1):Q(-1,n-1,n,r,!1):-1}function G(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(M(t,e)||r&&M(t,n.activeElement))}))}var X=A((function(){Z().textContent=""}),500);function J(e,t){var n=Z(t);e&&(n.textContent=e,X())}function Z(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var ee=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),te=function(){var e=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+L(),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=q(t),n.internalSetState(Object(I.a)({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=q(t),n.internalSetState(Object(I.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},c="function"==typeof e;return!c&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,Object(I.a)({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var a=c?e(t):e;a=n.props.stateReducer(t,a),r=a.hasOwnProperty("selectedItem");var u={},s={};return r&&a.selectedItem!==t.selectedItem&&(o=a.selectedItem),a.type=a.type||0,Object.keys(a).forEach((function(e){t[e]!==a[e]&&(i[e]=a[e]),"type"!==e&&(s[e]=a[e],W(n.props,e)||(u[e]=a[e]))})),c&&a.hasOwnProperty("inputValue")&&n.props.onInputValueChange(a.inputValue,Object(I.a)({},n.getStateAndHelpers(),a)),u}),(function(){C(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,c=void 0===i?"ref":i,a=o.ref,u=Object(E.a)(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;n.getRootProps.called=!0,n.getRootProps.refKey=c,n.getRootProps.suppressRefError=l;var p=n.getState().isOpen;return Object(I.a)(((r={})[c]=N(a,n.rootRef),r.role="combobox",r["aria-expanded"]=p,r["aria-haspopup"]="listbox",r["aria-owns"]=p?n.menuId:null,r["aria-labelledby"]=n.labelId,r),u)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=z(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=z(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset(Object(I.a)({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=Object(I.a)({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=Object(I.a)({},n.keyDownHandlers,{Home:function(e){var t=this;e.preventDefault();var n=this.getItemCount(),r=this.getState().isOpen;if(!(n<=0)&&r){var o=Q(1,0,n,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}},End:function(e){var t=this;e.preventDefault();var n=this.getItemCount(),r=this.getState().isOpen;if(!(n<=0)&&r){var o=Q(-1,n-1,n,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:8})}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick,o=(t.onPress,t.onKeyDown),i=t.onKeyUp,c=t.onBlur,a=Object(E.a)(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),u=n.getState().isOpen,s={onClick:H(r,n.buttonHandleClick),onKeyDown:H(o,n.buttonHandleKeyDown),onKeyUp:H(i,n.buttonHandleKeyUp),onBlur:H(c,n.buttonHandleBlur)},l=a.disabled?{}:s;return Object(I.a)({type:"button",role:"button","aria-label":u?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l,a)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=Y(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(Object(x.a)(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return Object(I.a)({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,c=t.onInput,a=(t.onChangeText,Object(E.a)(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),u={};var s,l=n.getState(),p=l.inputValue,f=l.isOpen,d=l.highlightedIndex;a.disabled||((s={}).onChange=H(i,c,n.inputHandleChange),s.onKeyDown=H(r,n.inputHandleKeyDown),s.onBlur=H(o,n.inputHandleBlur),u=s);return Object(I.a)({"aria-autocomplete":"list","aria-activedescendant":f&&"number"==typeof d&&d>=0?n.getItemId(d):null,"aria-controls":f?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},u,a)},n.inputHandleKeyDown=function(e){var t=Y(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(Object(x.a)(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,c=void 0===i?"ref":i,a=o.ref,u=Object(E.a)(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;return n.getMenuProps.called=!0,n.getMenuProps.refKey=c,n.getMenuProps.suppressRefError=l,Object(I.a)(((r={})[c]=N(a,n.menuRef),r.role="listbox",r["aria-labelledby"]=u&&u["aria-label"]?null:n.labelId,r.id=n.menuId,r),u)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,c=r.onClick,a=(r.onPress,r.index),u=r.item,s=void 0===u?void 0:u,l=Object(E.a)(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===a?(n.items.push(s),a=n.items.indexOf(s)):n.items[a]=s;var p=c,f=((t={onMouseMove:H(o,(function(){a!==n.getState().highlightedIndex&&(n.setHighlightedIndex(a,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:H(i,(function(e){e.preventDefault()}))}).onClick=H(p,(function(){n.selectItemAtIndex(a,{type:9})})),t),d=l.disabled?{onMouseDown:f.onMouseDown}:f;return Object(I.a)({id:n.getItemId(a),role:"option","aria-selected":n.getState().highlightedIndex===a},d,l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=q(e),n.internalSetState((function(t){var r=t.selectedItem;return Object(I.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=q(e),n.internalSetState((function(t){var r=t.isOpen;return Object(I.a)({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),C(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=A((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(Object(I.a)({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,J(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,c=void 0===i?o:i,a=r.defaultIsOpen,u=r.initialIsOpen,s=void 0===u?a:u,l=r.initialInputValue,p=void 0===l?"":l,f=r.initialSelectedItem,d=void 0===f?null:f,b=n.getState({highlightedIndex:c,isOpen:s,inputValue:p,selectedItem:d});return null!=b.selectedItem&&void 0===n.props.initialInputValue&&(b.inputValue=n.props.itemToString(b.selectedItem)),n.state=b,n}Object(k.a)(t,e);var n=t.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},n.getState=function(e){return void 0===e&&(e=this.state),$(e,this.props)},n.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},n.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},n.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},n.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=z(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},n.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,c=this.id,a=this.getRootProps,u=this.getToggleButtonProps,s=this.getLabelProps,l=this.getMenuProps,p=this.getInputProps,f=this.getItemProps,d=this.openMenu,b=this.closeMenu,g=this.toggleMenu,m=this.selectItem,h=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,O=this.clearSelection,w=this.clearItems;return{getRootProps:a,getToggleButtonProps:u,getLabelProps:s,getMenuProps:l,getInputProps:p,getItemProps:f,reset:this.reset,openMenu:d,closeMenu:b,toggleMenu:g,selectItem:m,selectItemAtIndex:h,selectHighlightedItem:v,setHighlightedIndex:y,clearSelection:O,clearItems:w,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:c,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},n.componentDidMount=function(){var e=this;var t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!G(t.target,[e._rootNode,e._menuNode],e.props.environment.document)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},i=function(t){var n=G(t.target,[e._rootNode,e._menuNode],e.props.environment.document,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},c=this.props.environment;c.addEventListener("mousedown",t),c.addEventListener("mouseup",n),c.addEventListener("touchstart",r),c.addEventListener("touchmove",o),c.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),c.removeEventListener("mousedown",t),c.removeEventListener("mouseup",n),c.removeEventListener("touchstart",r),c.removeEventListener("touchmove",o),c.removeEventListener("touchend",i)}},n.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},n.componentDidUpdate=function(e,t){W(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var e=V(this.props.children,D);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=V(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:K(t)?Object(_.cloneElement)(t,this.getRootProps(F(t))):void 0:null},t}(_.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:B,itemToString:function(e){return null==e?"":String(e)},onStateChange:D,onInputValueChange:D,onUserAction:D,onChange:D,onSelect:D,onOuterClick:D,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:T},e.stateChangeTypes=ee,e}();A((function(e,t){J(e(),t)}),200);var ne={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:T,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};O.a.array.isRequired,O.a.func,O.a.func,O.a.func,O.a.bool,O.a.number,O.a.number,O.a.number,O.a.bool,O.a.bool,O.a.bool,O.a.any,O.a.any,O.a.any,O.a.string,O.a.string,O.a.string,O.a.func,O.a.string,O.a.func,O.a.func,O.a.func,O.a.func,O.a.func,O.a.shape({addEventListener:O.a.func,removeEventListener:O.a.func,document:O.a.shape({getElementById:O.a.func,activeElement:O.a.any,body:O.a.any})});Object(I.a)({},ne,{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}});O.a.array.isRequired,O.a.func,O.a.func,O.a.func,O.a.bool,O.a.number,O.a.number,O.a.number,O.a.bool,O.a.bool,O.a.bool,O.a.any,O.a.any,O.a.any,O.a.string,O.a.string,O.a.string,O.a.string,O.a.string,O.a.string,O.a.func,O.a.string,O.a.string,O.a.func,O.a.func,O.a.func,O.a.func,O.a.func,O.a.func,O.a.shape({addEventListener:O.a.func,removeEventListener:O.a.func,document:O.a.shape({getElementById:O.a.func,activeElement:O.a.any,body:O.a.any})});Object(I.a)({},ne,{getA11yStatusMessage:B,circularNavigation:!0});O.a.array,O.a.array,O.a.array,O.a.func,O.a.func,O.a.func,O.a.number,O.a.number,O.a.number,O.a.func,O.a.func,O.a.string,O.a.string,O.a.shape({addEventListener:O.a.func,removeEventListener:O.a.func,document:O.a.shape({getElementById:O.a.func,activeElement:O.a.any,body:O.a.any})});var re=te,oe=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,o=e.isDisabled,i=e.onFocus,c=e.onRemoveItem,a=e.placeholder,u=e.tabIndex,s=e.value;return React.createElement("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:o,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&c(t[t.length-1])},placeholder:a,tabIndex:u}))},ie=function(e){var t=e.children,n=e.onClick;return React.createElement("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},ce=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,o=e.highlightedIndex,i=e.options;return React.createElement("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),i.map((function(e,r){var i=t.includes(e.value);return React.createElement("li",n({key:e.value,className:j()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":i,"is-highlighted":o===r}),index:r,item:e.value,"aria-label":i?Object(s.sprintf)(Object(s.__)("Remove %s filter",'woocommerce'),e.name):null}),e.label)})))},ae=n(159),ue=function(e){var t=e.onRemoveItem,n=e.option;return React.createElement(ae.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:function(){t(n.value)},ariaLabel:Object(s.sprintf)(Object(s.__)("Remove %s filter",'woocommerce'),n.name),text:n.label,radius:"large"})},se=n(139),le=n(138),pe=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,o=Object(m.useRef)(null);return Object(m.useEffect)((function(){o.current.focus()}),[o]),React.createElement("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},React.createElement("button",{ref:o,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Replace current %s filter",'woocommerce'),r.name)},r.label),React.createElement("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Remove %s filter",'woocommerce'),r.name)},React.createElement(se.a,{srcElement:le.a,size:16})))};n(230);function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var be=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,o=e.checked,i=void 0===o?[]:o,c=e.inputLabel,a=void 0===c?"":c,u=e.isDisabled,l=void 0!==u&&u,p=e.isLoading,f=void 0!==p&&p,d=e.multiple,b=void 0!==d&&d,g=e.onChange,h=void 0===g?function(){}:g,v=e.options,y=void 0===v?[]:v,O=Object(m.useRef)(null),w=j()(r,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":l,"is-loading":f}),S=Object(m.useCallback)((function(e,t){switch(t.type){case re.stateChangeTypes.keyDownEnter:case re.stateChangeTypes.clickItem:return de(de({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:b,inputValue:""});case re.stateChangeTypes.blurInput:case re.stateChangeTypes.mouseUp:return de(de({},t),{},{inputValue:e.inputValue});default:return t}}),[b]);return React.createElement(re,{onChange:h,selectedItem:null,stateReducer:S},(function(e){var t=e.getInputProps,r=e.getItemProps,o=e.getLabelProps,c=e.getMenuProps,u=e.highlightedIndex,p=e.inputValue,f=e.isOpen,d=e.openMenu;return React.createElement("div",{className:j()(w,{"is-multiple":b,"is-single":!b,"has-checked":i.length>0,"is-open":f})},React.createElement("label",o({className:"screen-reader-text"}),a),React.createElement(ie,{isOpen:f,onClick:function(){return O.current.focus()}},i.map((function(e){var t=y.find((function(t){return t.value===e})),n=function(e){h(e),O.current.focus()};return b?React.createElement(ue,{key:e,onRemoveItem:n,option:t}):React.createElement(pe,{key:e,onClick:function(){return O.current.focus()},onRemoveItem:n,option:t})})),React.createElement(oe,{checked:i,getInputProps:t,inputRef:O,isDisabled:l,onFocus:d,onRemoveItem:function(e){h(e),O.current.focus()},placeholder:i.length>0&&b?null:Object(s.sprintf)(Object(s.__)("Any %s",'woocommerce'),n),tabIndex:!b&&i.length>0?"-1":"0",value:p})),f&&!l&&React.createElement(ce,{checked:i,getItemProps:r,getMenuProps:c,highlightedIndex:u,options:y.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},ge=n(153),me=n(28),he=n.n(me),ve=n(25),ye=n(154),Oe=n(155),we=n(40),je=function(e){var t=e.name,n=e.count;return React.createElement(m.Fragment,null,t,Number.isFinite(n)&&React.createElement(we.a,{label:n,screenReaderLabel:Object(s.sprintf)(Object(s._n)("%s product","%s products",n,'woocommerce'),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},Se=[{value:"preview-1",name:"Blue",label:React.createElement(je,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:React.createElement(je,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:React.createElement(je,{name:"Red",count:2})}],Ee={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(229);function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ke=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,o=t.isPreview&&!t.attributeId?Ee:Object(ye.a)(t.attributeId),i=Object(m.useState)([]),c=u()(i,2),a=c[0],h=c[1],v=Object(m.useState)(t.isPreview&&!t.attributeId?Se:[]),y=u()(v,2),O=y[0],w=y[1],j=Object(p.a)(),E=u()(j,1)[0],I=Object(p.b)("attributes",[]),x=u()(I,2),k=x[0],_=x[1],R=Object(f.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[o.id],shouldSelect:t.attributeId>0}),P=R.results,C=R.isLoading,D="dropdown"!==t.displayStyle&&"and"===t.queryType,T=Object(d.a)({queryAttribute:{taxonomy:o.taxonomy,queryType:t.queryType},queryState:xe(xe({},E),{},{attributes:D?E.attributes:null})}),M=T.results,A=T.isLoading,H=Object(m.useCallback)((function(e){return M.attribute_counts?M.attribute_counts.find((function(t){return t.term===e})):null}),[M]);Object(m.useEffect)((function(){if(!C&&!A){var e=P.map((function(e){var n,r=H(e.id);if(!(r||a.includes(e.slug)||(n=e.slug,null!=E&&E.attributes&&E.attributes.some((function(e){var t=e.attribute,r=e.slug,i=void 0===r?[]:r;return t===o.taxonomy&&i.includes(n)})))))return null;var i=r?r.count:0;return{value:e.slug,name:Object(ve.decodeEntities)(e.name),label:React.createElement(je,{name:Object(ve.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);w(e)}}),[o.taxonomy,P,C,t.showCounts,A,H,a,E.attributes]),Object(m.useEffect)((function(){t.showFilterButton||K(a)}),[t.showFilterButton,a,K]);var N=Object(m.useMemo)((function(){return k.filter((function(e){return e.attribute===o.taxonomy})).flatMap((function(e){return e.slug}))}),[k,o.taxonomy]),L=Object(b.a)(N),B=Object(g.a)(L);Object(m.useEffect)((function(){he()(B,L)||he()(a,L)||h(L)}),[a,L,B]);var V=Object(m.useCallback)((function(e){return P.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[P]),K=Object(m.useCallback)((function(e){r||Object(Oe.b)(k,_,o,V(e),"or"===t.queryType?"in":"and")}),[r,k,_,o,V,t.queryType]),F="dropdown"!==t.displayStyle||"or"===t.queryType,U=Object(m.useCallback)((function(e){var t,n=function(e){return O.find((function(t){return t.value===e})).name},r=function(e){var t=e.filterAdded,r=e.filterRemoved,o=t?n(t):null,i=r?n(r):null;o&&i?Object(l.speak)(Object(s.sprintf)(Object(s.__)("%1$s filter replaced with %2$s.",'woocommerce'),o,i)):o?Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter added.",'woocommerce'),o)):i&&Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter removed.",'woocommerce'),i))},o=a.includes(e);F?(t=a.filter((function(t){return t!==e})),o?r({filterRemoved:e}):(t.push(e),t.sort(),r({filterAdded:e}))):(t=o?[]:[e],r({filterAdded:o?null:e,filterRemoved:1===a.length?a[0]:null}));h(t)}),[a,O,F]);if(0===O.length&&!C)return null;var q="h".concat(t.headingLevel),$=!t.isPreview&&C,W=!t.isPreview&&A;return React.createElement(m.Fragment,null,!r&&t.heading&&React.createElement(q,null,t.heading),React.createElement("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?React.createElement(be,{attributeLabel:o.label,checked:a,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:$,multiple:F,onChange:U,options:O}):React.createElement(S,{className:"wc-block-attribute-filter-list",options:O,checked:a,onChange:U,isLoading:$,isDisabled:W}),t.showFilterButton&&React.createElement(ge.a,{className:"wc-block-attribute-filter__button",disabled:$||W,onClick:function(){return K(a)}})))};Object(o.a)({selector:".wp-block-woocommerce-attribute-filter",Block:Object(r.a)(ke),getProps:function(e){return{attributes:{attributeId:parseInt(e.dataset.attributeId||0,10),showCounts:"true"===e.dataset.showCounts,queryType:e.dataset.queryType,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3,displayStyle:e.dataset.displayStyle,showFilterButton:"true"===e.dataset.showFilterButton}}}})}]);